text:
Q: RaphaelJS Path object image fill & Gradient doesnt work in CodeIgniter? i just faced a very strange problem today.
My Application Structure is:
/app
- /controllers
----/editor.php
- / views
----/test.php
/public
/system
i use codeigniter for php and raphaeljs library for canvas operations.
There is this trich with RaphaelJS about filling path objects with image:
http://www.irunmywebsite.com/raphael/additionalhelp.php?q=path#PAGETOP
i tested it under public directory and it worked perfectly
but whenever i try to run same exact codes under /app dir. with codeigniter, it is somehow blocking gradient and image filling and instead filling objects with black color.
i guess it's about the way codeigniter handles URLs
i've got this function in editor controller class :
public function test()
{
    $this->load->view('editor/test');
}

test.php :

<?php $this->load->helper('url'); ?>
<base href="<?php echo base_url(); ?>">

A: removing base tag solves the problem.


text:
Q: Twig display function I cant quite get a hold of Twig really. I want to just simply display a function in a twig file but nothing is shown. My function:
public function ratings(){
        $overall_vote_rows = $blog_vote_overall_rows;
        $overall_vote_rate = $blog_vote_overall_rate;
        $overall_vote_dec_rate = $blog_vote_overall_dec_rate;
        $ip_vote_rate = $blog_vote_ip_rate;

    echo '<input type="hidden" name="blog_content_id" id="blog_content_id" value="1"/>';
                $stars = '';
                echo '
';
                for ($i = 1; $i <= floor($overall_vote_rate); $i++) {
                    $stars .= '

';
                }
                //THE OVERALL RATING (THE OPAQUE STARS)
                echo '

' . $stars . '
';

                //THE TRANSPARENT STARS (OPAQUE STARS WILL COVER AS MANY STARS AS THE RATING REPRESENTS)
                echo '

(' . $blog_vote_overall_dec_rate . '/5, ' . $overall_vote_rows . ' ' . ($overall_vote_rows > 1 ? ' votes' : ' vote') . ') ' . ($blog_vote_ip_rate > 0 ? 'You rated this: ' . $blog_vote_ip_rate . '' : '') . '

';
                echo '
';

    $this->twig->display('boat/boat_list.twig',$data);

Now when i try to display the function it wont show up. i guess i completly missunderstand the principle as such since even trough reading in the documentation im to simple minded to get it.
{{ratings}}

shouldnt this do the trick?
Thanks in advance. Id love to just use the php code since i cant figure how to properly translate it into the twig syntax.

A: You shouldn't use a function for this imho. You just need to create a extra twig template which you then can include inside the current template
blog.twig
...
{% include "rating.twig.html" %}

rating.twig.html
<input type="hidden" name="blog_content_id" id="blog_content_id" value="1"/>

    {% set stars = '' %}
    {% for i in 1..overall_vote_rate|round(0, 'floor') %}
        {% set stars = '

    {% endfor %}

{{ stars | raw }}

       //THE TRANSPARENT STARS (OPAQUE STARS WILL COVER AS MANY STARS AS THE RATING REPRESENTS)

            {{ blog_vote_overall_dec_rate }}/5 {{ overall_vote_rows }} {{ overall_vote_rows > 1 ? ' votes' : ' vote' }}
            {% if blog_vote_ip_rate > 0 %}You rated this: {{ blog_vote_ip_rate }} {% endif %}

A: You should register your function like described here: http://twig.sensiolabs.org/doc/advanced.html#functions
Something like this:
$function = new Twig_SimpleFunction('ratings', function () {
    $html = '
Your function content here
';
    $html .= '<input>';
    $html .= '<select></select>';
    // ...
    return $html;
});
$this->twig->addFunction($function);

Then in template call your function:
{{ ratings()|raw }}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Actionscript 3 problems with "Call to a possibly undefined method" Thanks partly to info from people here, I'm getting more comfortable with Actionscript 3, but I've got a problem that is very puzzling.
The program (done entirely in AS3, no Flash) has several different screens.  One does music and it's working very well.  Another does video.  Obviously when somebody goes from music to video we need to make sure the music is turned off.  There is a Main screen that handles going from one to the other.
I started out doing it this way, and the reason I got "Call to a possibly undefined method" is obvious.  The following is in the Main class, with the "private var" part inside the class but external to the functions and the "music = new MusicPanel" part in one of the functions:
private var music:MusicPanel;

music = new MusicPanel(trackNames.songNames, trackNames.numSongs);

When switching to the video panel, I added a public function in MusicPanel called StopMusic and called it when the user went to the video panel:
if(music != null)
    music.StopMusic();

That got the error:
Call to a possibly undefined method StopMusic

I was checking to make sure music was not null, but that error didn't seem like a bad thing.  So I changed the code to:
private var music:MusicPanel = new MusicPanel();
and added a function that would get the song names and number of songs to the music class.  That did not help- I got the same error, and in fact the function that tried to put the song names and number of songs got the error also.
At the same time, the Video panel does not give me that error, even though I have laid it out in exactly the same way.
private var video:VideoPanel = new VideoPanel;
video.PlayVideo();

I do a fair amount of setup on the music screen when it gets called as a new class, I do less setup for the video screen.  I'm not sure if that makes a difference.
Clearly there is something I don't understand here.  Anybody got any idea what's going on?  I've looked at a number of questions about this, but have not found an answer.  I think I'm doing this right, but the compiler thinks I'm doing it wrong, so I must be doing it wrong.
Later Note: One answer mentioned the difference between Sprite and MovieClip.  I gave that a try, changing to MovieClip does not help, and the VideoPanel, which works, extends Sprite.

A: What is the base class of MusicPanel, Sprite or MovieClip?  If Sprite, change to MovieClip and see what that does. In AS3 Sprites are not dynamic, so can't take properties that are not inherent in the class.

A: It appears that the problem is coming either from Actionscript 3 or from FlashDevelop.  I built a new module (SongsPanel) which is very close to the same as the original MusicPanel.  It works.  If I add a public function in MusicPanel the compiler comes back with the same error. If I add a public function in SongsPanel everything works.
Does FlashDevelop keep track of errors in some hidden file?  I'm guessing that's what's going on, and that there is a bug in the way that is done.
PITA!- but at least it now works.


text:
Q: How Does One Go About Saving an Aggregate (Parent and Children) in a Repository? According to Dylan's answer for the questions 'Using The Repository Pattern, Is It Best To Save Parent and Children Objects Together Or Separately?', a repository saves the entire aggregate (parent and children).
How does one go about this, would this be coded in the actually stored procedure (if using them); would you call the child repositories as well...
for instance, having a parent class Country with a list of City children:
class Country
{
    List<City> cities;
    ...
}

and a repository snippet:
public Save(Country country)
{
    ...

    ICityRepository cityRepository = new CityRepository();

    foreach (City city in country.Cities)
    {
        cityRepository.Save(city);
    }

    ...
}

or is there a better alternative?
Also, does calling the child repository as in the example above, have heavy performance implications if there are a lot of children?

A: If the Country is the aggregate root, which in your case it looks like it is, then you shouldn't have a separate repository for Cities. Repositories are only necessary for aggregate roots.
So forget the ICityRepository/CityRepository and just save the Cities themselves in your Country repository.

A: You can pass the city objects to the country stored procedure as xml.
Then it just takes one update/insert/delete query to fix them all.


text:
Q: Design API to update a document with a field containing list. Add & Remove in single request I have an API which should update a document. Document contains a list, to which items can be added and removed in the same request. How should I model my client.
Example:
Student
{
  id: 1,
  name: Bob,
  languages: [English, French, Korean]
}

Now I am designing /updateStudent API.
How should I model my UpdateStudentRequest which removes a language and adds another language.
Option1:
Replace existing languages with the languages from UpdateStudentRequest.
Request:
updateStudentRequest = updateStudentRequestBuilder.withId(1)
                         .withLanguages(Arrays.asList("English", "French", "German"))
                         .build();
client.updateStudent(updateStudentRequest);

Downside: Users should know what are the existing languages in order to update them.
Option2:
Provide add and remove lists in the UpdateStudentRequest.
Request:
updateStudentRequest = updateStudentRequestBuilder.withId(1)
                         .addLanguages(Arrays.asList("German"))
                         .removeLanguages(Arrays.asList("Korean"));
                         .build();
client.updateStudent(updateStudentRequest);

Downside: Users need to write additional code.
Option3:
Have both add and remove lists in the same request
Request:
List<String> addLanguages = Arrays.asList("German");
List<String> removeLanguages = Arrays.asList("Korean");

updateStudentRequest = updateStudentRequestBuilder.withId(1)
                         .withLanguages(addLanguages, removeLanguages);
                         .build();
client.updateStudent(updateStudentRequest);

Downside: Confusion, mistakes like replacing add with remove is common.
What is the best practice when designing REST APIs like this.


text:
Q: mvc 5 validation and change DOM elements I have a MVC 5 normal application.
In a textbot user need to write ad username (or maybe "name surname"). I use the [Remote] Annotation and a Validation function on controller is called.
Into the Validation function I make a LDAP query and if I find only 1 result I give true to validation, otherwise if nothing found or more than 1 result is found I return false.
Until here, there is no problem.
If validation is ok, I would to set the textbox value (or maybe an hidden value) with the exact AD username.
For example:
In my domain there is user marco.rossi, and is the only Marco in AD.
If I search "Marco" in AD validation is ok. But When user will submit I want pass domain\marco.rossi.
So I would set into an hidden or better change the textbox value from marco to domain\marco.rossi.
How I can set Textbox value into validation function?
Thank you in advance.

A: OK, after a lot of search, the solution is not the BEST solution, but it's working.
I read this post: http://www.garethelms.org/2011/01/asp-net-mvc-remote-validation-what-about-success-messages/
Gareth suggest to modify the jquery.validate.js
After the "hack", for every REMOTE validation, is called a javascript function that have {Action name}_response name.
So for this:
 [Required]
 [Remote("CheckADUserValidation", "CONTROLLER")]
 public virtual string ad_username { get; set; }

I provided this function: (in the script section of the view)
function CheckADUserValidation_response(bIsValid, aErrors, oValidator)
{
    // I disable immediatly the submit button to wait the right username
    // so, also if validation is ok, I cannot submit until the right value is on the ad_username textbox
    $('#btnSubmit').attr('disabled', 'disabled');

    if (bIsValid == true) {
       // after I call an Ajax on an Action, that instead of giving me true or error messages, give me the username

            $.ajax({
                type: "GET",
                dataType: 'json',
                url: '/CONTROLLER/ActionToHaveUsername/',
                contentType: 'application/json;charset=UTF-8;',
                async: true,
                data: 'ad_username=' + $('#ad_username').val(),
                success: function (response) {

                    if (response != '') {
                        // Ok there is the response
                        $('#ad_username').val(response);

                        $('#btnSubmit').removeAttr('disabled');
                        return true;
                    } else {

                        $('#btnSubmit').attr('disabled', 'disabled');
                        return false;
                    }

                },
                error: function (jqXHR, textStatus, errorThrown) {

                    alert(textStatus);
                },
                complete: function (jqXHR, textStatus) {

                }

            });

    } else {

        return false;
    }
}

And this is the Action called on the Controller:
 public JsonResult ActionToHaveUsername(string ad_username)
    {
        string tmpADName;
        JsonResult tmpResult = new JsonResult();

        // this function make the dirty work to take in input a name and search for unique ActiveDirectory Username, and return me in tmpADNName
        AppGlobals.functions.CheckADUserValidation(ad_username, out tmpADName);

        tmpResult.Data = tmpADName;
        tmpResult.JsonRequestBehavior = JsonRequestBehavior.AllowGet;

        return tmpResult;
    }

The best result is encapsulating the ajax request into a timer that fires after 500ms, because I notice that sometimes the remote validation start also while writing on textbox.
So, for every character an async validation start, but when the validation return ok, the submit button is disabled and after 500ms the second request start and change the name for username. Every new character reset the timer, so only the last character fires really the second ajax.
At the end... 2 ajax is not the best scenario, but I really tried to use the JsonResult to have more data in return without lose the validation mechanism. But I don't find a way.


text:
Q: Button label color change doesn't work if font is also changed Here is a simple example custom button that is set as a class of a button in IB:
#import "TestButton.h"
@implementation TestButton

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    UIFont * font = [UIFont systemFontOfSize:8];
    if ( self.setFont )
        self.titleLabel.font = font;
    self.titleLabel.textColor = [UIColor redColor];
}

@end

If setFont is false, that is, the font is unchanged, the the label text color is red as expected.  But if it is true, the button text color is whatever it is set to in IB.
So the question is what's going on here, and how can I change both the text and the font of a button that is assigned in IB programmatically.
In case someone wants to see these peculiarities and also how funky IBDesignable can be, see demo project

A: Replace
self.titleLabel.textColor = [UIColor redColor];

with
[self setTitleColor:[UIColor redColor] forState:UIControlStateNormal];

A: The below code is for setting text:
[self setTitle:@"New Text" forState:UIControlStateNormal];

If you wanted to set the title or the color of the title anywhere other than within the button file itself, you could try adding two public properties to the button. One NSString property for the title (self.titleString) and one UIColor property for the title color. You could then set the title and or title color anywhere like in your view controller or view. You would then use these properties within your button file like
[self setTitle:self.titleString forState:UIControlStateNormal];


text:
Q: post_detail() view missing required positional arguments: I'm beginner to django . I am facing this problem that I can't get the post detail view with year , month and post .
Error is post_detail() missing 4 required positional arguments: 'year', 'month', 'day', and 'post'.
this is models.py
 from django.db import models
    from django.utils import timezone
    from django.contrib.auth.models import User
    from django.core.urlresolvers import reverse

    class Post(models.Model):
        STAUTS_CHOICE = ( ('draft','Draft'),('published','Published'),)
        title =models.CharField(max_length =250)
        slug = models.SlugField(max_length =250)
        author = models.ForeignKey(User,related_name='blog_post')
        body = models.TextField()
        publish =models.DateTimeField(default = timezone.now)
        created = models.DateTimeField(auto_now_add=True)
        udated = models.DateTimeField(auto_now=True)
        status = models.CharField(max_length =250 ,
        choices = STAUTS_CHOICE , default = 'draft')

        class Meta:
             ordering = ('-publish',)

        def get_absolute_url(self):
            return reverse('blog:post_detail', args = [self.slug, self.publish.year , self.publish.strftime('%m'), self.publish.strftime('%d')]])

        def __str__(self):
             return self.title
    ______________________________________________________________

this is  views.py
from django.shortcuts import render , get_object_or_404
from .models import Post

def post_list(request):
    post = Post.objects.all()
    return render(request,'blog/post/list.html',{'post':post})

def post_detail(request,slug,year, month,day,post):
    post = get_object_or_404(Post, slug = slug , status = 'published' ,publish_year = year, publish_month = month , publish_day = day)
    return render(request,'blog/post/detail.html',{'post':post})

this is urls.py
from django.conf.urls import url
from .import views

    urlpatterns = [
        url(r'^post_list',views.post_list,name ='post_list'),
        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/'r'(?P<slug>[-\w]+)/$',views.post_detail,name='post_detail'),

this is post_detail.html page
{% extends 'blog/base.html' %}
    {% block title %}Post details{% endblock %}
     {% block content %}

{{post.title}}

published {{ post.published}} by {{ post.author}}

    {{ post.body|linebreaks }}
     {% endblock %}

this is list.html page :
{% extends 'blog/base.html' %} {% block head_title %}Posts list{% endblock %}
{% block content %}

My Blog

{% for x in posts %}

    {{x.title}}

published {{ x.published}} by {{ x.author}}

{{ x.body|truncatewords:30|linebreaks }} {% endfor %} {% endblock %}

this is base.html
{% load staticfiles %}
<!DOCTYPE html>

    <title>{% block head_title %}Welcome to my blog{% endblock %}</title>

        {% block content %} {% endblock %}

A: remove post parameter from post_detail view. and remove third url for same view. Now your requested url should be:
localhost:8000/2017/12/16/my-post

A: So far I guessed you want to resolve domain/year/month/day/slug URL.
The following changes will make it work.
views.py
def post_detail(request,slug,year, month,day):
    post = get_object_or_404(Post, slug = slug , status = 'published' ,publish__year = year, publish__month = month , publish__day = day)
    return render(request,'blog/post/detail.html',{'post':post})

urls.py
urlpatterns = [
        url(r'^post_list',views.post_list,name ='post_list'),
        url(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',views.post_detail,name='post_detail'),
    ]


text:
Q: Python nest list performance choice I am trying to understand if there is an advantage in space/time/programming to storing data from a signal processing system as nested list in either :

*

*data[channel][sample]

*data[sample][channel]
I can code processing for both - thou I personally find 1) easy to write and index to then 2).
However, 2) is the more common was my local group programs in and stores the data (either in excel/csv or from the data gathering systems).   While it is easy to transpose
dataA = map(list, zip(*dataB))

I was wondering if there are any storage or performance - or even - module compatibility issues with 1 over 2?
with 1) I can loop like this
for R in dataA :
   for C in R :
       process_channel(C)

matplotlib.loglog(dataA[0], dataA[i])

where dataA[0] is time or frequency and i is some other channel to plot
with 2)
for R in dataB :
    for C in R
        process_sample(C)

matplotlib.loglog([j[0] for j in dataB],[k[i] for k in dataB])

This looks worse in programming style.  Maybe I am missing a list method of making this easier?  I have also developed code to used dicts ... but this really breaks with general use.  So I am less inclined to continue to use dicts.  Although the dict storage is
dataC = list(['f':0.1,'chnl1':100.0],['f':0.2,'chnl1':110.0])

or some such. It seems that to be better integrated option 2 is better.  However, I am trying to understand how better to code when using option 2) when you wish to process over channels then samples?   Just transpose the matrix first and then do the work in option 1) space and transpose back the results:
dataA = smoothing(dataA, smooth_factor)

def smoothing(d, s) :
    td = numpy.transpose(d)
    td = map(list, zip(*d))
    nd=[]
    for row in td :
       col = []
       for i in xrange(0,len(row)-step,step) :
           col.append(sum(row[i:i+step]/step)
       nd.append(col)
    nd = numpy.transpose(nd)
    return nd

while this construction works - transposing back and forth all the time looks - um - inefficient.


text:
Q: Primefaces p:tree worked successfully in v4 and failed to work in v5, v5.1, 5.2, 5.3 and 6 I developed and web application using Mojarra jsf 2.2 and Primefaces 4, Wildfly as web server and Eclipse Neon as IDE. and it was working nice. when I was trying to migrate to Primefaces 5 everything worked fine except p:tree failed to fire any select events. same thing occurred with v5.1, 5.2, 5.3 and 6.
So please any help will be appreciated
below is p:tree code snippet:
<h:form id="barForm">
                    <p:tree id="treeSingle" value="#{treeBackBean.root}" var="node"
                        selectionMode="single" selection="#{treeBackBean.selectedNode}"
                        dir="rtl" style="height: 100%; width: 200px;">
                        <p:ajax event="select" listener="#{treeBackBean.onNodeSelect}" />
                        <p:treeNode>
                            <h:outputLabel value="#{node}" />
                        </p:treeNode>
                    </p:tree>
                </h:form>

backing been classes are:
public class TreeNodeData {
public static final int NODE_TYPE_ROOT = 0;
public static final int NODE_TYPE_BRANCH = 1;
public static final int NODE_TYPE_LEAF = 2;

private String descreption;
private String url;
private int nodeType;

public TreeNodeData(String descreption,String url,int nodeType ){
    this.descreption = descreption;
    this.url = url;
    this.nodeType = nodeType;
}

public String getDescreption() {
    return descreption;
}

public void setDescreption(String descreption) {
    this.descreption = descreption;
}

public String getUrl() {
    return url;
}

public void setUrl(String url) {
    this.url = url;
}

@Override
public String toString() {
    return descreption;
}

public int getNodeType() {
    return nodeType;
}

public void setNodeType(int nodeType) {
    this.nodeType = nodeType;
}

}
I also used AppUtil to get property value from properties file.
import services.AppUtil;
import java.io.IOException;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.primefaces.event.NodeSelectEvent;
import org.primefaces.model.DefaultTreeNode;
import org.primefaces.model.TreeNode;

@ManagedBean
@SessionScoped
public class TreeBackBean implements Serializable {

private static final long serialVersionUID = 1L;

private TreeNode root;
private TreeNode selectedNode;

@SuppressWarnings("unused")
@PostConstruct
public void builtTree() {
    TreeNodeData nodeData = new TreeNodeData("Root", "", TreeNodeData.NODE_TYPE_ROOT);
    root = new DefaultTreeNode(nodeData, null);

    nodeData = new TreeNodeData(AppUtil.getPropertyValue("labels", "menuControlPanel"), "",
            TreeNodeData.NODE_TYPE_BRANCH);
    TreeNode settingsMenu = new DefaultTreeNode(nodeData, root);

 try{nodeData = new TreeNodeData(AppUtil.getPropertyValue("labels",          "applicationAdministartionSubMenu"), "",
                    TreeNodeData.NODE_TYPE_BRANCH);
            TreeNode applicationAdministartionSubMenu = new                 DefaultTreeNode(nodeData, settingsMenu);

 nodeData = new TreeNodeData(AppUtil.getPropertyValue("labels", "usersRoles"),
                                        "userRole.xhtml",                 TreeNodeData.NODE_TYPE_LEAF);
            TreeNode node1 = new DefaultTreeNode(nodeData,   applicationAdministartionSubMenu);
            //
            nodeData = new   TreeNodeData(AppUtil.getPropertyValue("labels", "Catogeries"),
                    "Catogery.xhtml", TreeNodeData.NODE_TYPE_LEAF);
            TreeNode node2 = new DefaultTreeNode(nodeData, applicationAdministartionSubMenu);
            //
            nodeData = new TreeNodeData(AppUtil.getPropertyValue("labels", "Units"),
                    "Unit.xhtml", TreeNodeData.NODE_TYPE_LEAF);
            TreeNode node3 = new DefaultTreeNode(nodeData, applicationAdministartionSubMenu);
            //
applicationAdministartionSubMenu.setExpanded(true);
 ///...........etc
   } catch (NullPointerException ex) {
        // ex.printStackTrace();
    }

public TreeNode getRoot() {
    return root;
}

public TreeNode getSelectedNode() {
    return selectedNode;
}

public void setSelectedNode(TreeNode selectedNode) {
    this.selectedNode = selectedNode;
}

public void onNodeSelect(NodeSelectEvent event) {
TreeNodeData treeNodeData = (TreeNodeData) event.getTreeNode().getData();
//remaining selection code goes here
//it just redirecting to selected page.
}

public void expand(TreeNode treeNode) {
    if (treeNode != null)
        if (treeNode.getParent() != null) {
            treeNode.getParent().setExpanded(true);
            expand(treeNode.getParent());
        }
}

}//class end


text:
Q: Range of ballistic missile on flat world The range of the Trident 2 submarine-launched ballistic missile is stated to be at least twelve thousand kilometres - the exact figure is classified, but taking it as 12,000 km exactly for purposes of discussion. That's on Earth, where the range is increased by the horizon dropping away under the missile in flight.
Suppose you fired such a missile on a flat world where the surface gravity is still 1g (or something like Larry Niven's Ringworld, where the radius is large enough that it can be treated as flat in this context). What would the range of the missile be in that scenario?

A: Since the missile is ballistic, we might discuss an unpowered ballistic trajectory without air resistance, and ignore earth rotation.
As long as the initial velocity is less than escape velocity the projectile will return to earth. The range depends on initial velocity and direction an can vary from zero up to a complete orbit. If the initial velocity is greater than escape velocity and the direction points away from surface the projectile will never come back. See also Newton's cannonball.
In a flat world with infinite extent gravity is constant, i.e independent of location and height. The maximum range is then obtained with an initial angle of 45 degrees and is $$d = \frac{v^2}{g}$$ where $v$ is the initial velocity and $g$ the gravitational acceleration. Note that this does not hold in a ring world.


text:
Q: Custom renovate presets on Butbucket-server I just tried to create a custom preset for renovate as described here. My goal was to ban certain versions of dependencies. So I created a JSON file my.json like this:
{
    "packageRules": [
        {
            "matchPackageNames": ["commons-logging"],
            "allowedVersions": "!/.*-does-not-exist$/"
        }
    ]
}

As we are using bitbucket-server, I've put it into a repository called renovate-config in a project lets say XYZ. I changed the renovate.json file on the master branch of one service to:
{
    "$schema": "https://docs.renovatebot.com/renovate-schema.json",
    "extends": [
        "config:base",
        "local>XYZ/renovate-config//my"
    ]
}

Unfortunately renovate is not picking this up. The provider is configured correctly and renovate is fully working with our bitbucket-server instance, but it is either not picking up the preset, or anything else is going amiss.
Any help welcome.

A: Ok. Here is the solution:
Actually my approach was correct. And the preset was retrieved and applied. I just made a mistake in formulating the rules:
This works:
{
    "packageRules": [
        {
            "matchPackageNames": [".*:commons-logging"],
            "allowedVersions": "!/.*-does-not-exist$/"
        }
    ]
}

Mind the .*: added at the beginning of the package name. For Maven artifacts this needs to include the groupId.
I also found that when activating debug or trace logging it is pretty clear what happens.


text:
Q: GWT - how to set and get the value attribute of a Button() I've got a Button element and i would like to set and then get the value attribute of this button.
Currently rendered:

<button type="button" class="gwt-Button">page 1</button>

What I want to achieve:

<button type="button" class="gwt-Button" value="1">page 1</button>

Code:

final Button b = new Button("page 1");
// HOW TO: set value for the button
b.addClickHandler(new ClickHandler() {
    public void onClick(ClickEvent event) {
        // HOW TO: get value for the button
    }
});

Documentation says nothing about this and the answer from this SO question doesn't even compile ("The method setValue(String) is undefined for the type Button")

A: I'm not a 100% sure about this but you could try to access the underlying button element itself and modify/read the value from there. Like:
button.getElement().<ButtonElement>cast().setValue("1");

See more:

*

*http://www.gwtproject.org/javadoc/latest/index.html

*http://www.gwtproject.org/javadoc/latest/com/google/gwt/dom/client/ButtonElement.html


text:
Q: Hide column of table dynamically using jquery $(object) I have a simple table with two columns and with custom property "data-cid". I want hide column based on data-cid proerpty.

$(document).ready(function() {
  $("th[data-cid='Col_17']").each(function(index, obj) {
    if ($(obj).prop("className") == "")
      $(obj).attr("class", "hide-elem");
    else
      $(obj).addClass("hide-elem");
  });

}
$("td[data-colId='Col_17']").each(function(index, obj) {
  if ($(obj).prop("class") == "")
    $(obj).attr("class", "hide-elem");
  else
    $(obj).addClass("hide-elem");
});
});

      sadf
      asdf

      sadf
      sadf

In the above browser wasn't able to add class to my th and td. can someone help me what's wrong??

A: Issue:-

You have an extra } in your code

Try this:-

$(document).ready(function() {
    $("th[data-cid='Col_17'], td[data-cid='Col_17']").each(function(index, obj) {
            if($(obj).prop("className") == ""){
                $(obj).attr("class", "hide-elem");
            }else{
                $(obj).addClass("hide-elem");
            }
        });

});

sadf
asdf

sadf
sadf

A: You have an extra } between the two loops. But you can simply combine them into a single loop by putting both selectors together. You also had a typo in the td selector, you had data-colId instead of data-cid.

$(document).ready(function() {
  $("th[data-cid='Col_17'], td[data-cid='Col_17']").each(function(index, obj) {
    if ($(obj).prop("className") == "")
      $(obj).attr("class", "hide-elem");
    else
      $(obj).addClass("hide-elem");
  });
});
.hide-elem {
  display: none;
}

      sadf
      asdf

      sadf
      sadf

A: You have one extra } and your jquery selector is wrong. it should be $("th[data-cid='Col_17']")instead $("th[data-cid='Col_17']")

$(document).ready(function() {

$("th[data-cid='Col_17']").each(function(index, obj) {
    if ($(obj).prop("className") == "")
      $(obj).attr("class", "hide-elem");
    else
      $(obj).addClass("hide-elem");
  });

$("td[data-cid=Col_17]").each(function(index, obj) {

  if ($(obj).prop("class") == "")
    $(obj).attr("class", "hide-elem");
  else
    $(obj).addClass("hide-elem");
});
});
.hide-elem{
  display:none;
}

      sadf
      asdf

      sadf
      sadf


text:
Q: Finding rows that are not duplicate I have two DB2 tables.
Table 1, called EmployeeFile
EmployeeFile has the following columns: EMP_ID, FNAME, LNAME, DOB
The data looks like this:
   EMP_ID, FNAME, LNAME, DOB
 - GB2342, John,  Smith, 1970-12-10
 - L3243C, Jane,  Jones, 1969-11-09

Table 2, called OriginalData
OriginalData has the following columns: INTERNAL_ID, FNAME, LNAME, DOB.
The data looks like this:
   INTERNAL_ID, FNAME, LNAME,    DOB
 - 6575678588,  Jane,  Jones,    1969-11-09
 - 1232145564,  Rob,   Mitchell, 1968-10-08
 - 3452345345,  John,  Smith,    1970-12-10
 - 6786478568,  John,  Smith,    1970-12-10

I want to show all rows of EmployeeFile for which the (FNAME, LNAME, DOB) combination occurs only once in OriginalData.
For example, if I ran the query on the example dataset shown above, it should return just the following row:

*

*Jane, Jones, 1969-11-09

I don't want 'John Smith' because although he exists in EmployeeFile, his (FNAME, LNAME, DOB) combination occurs twice in OriginalData.
I don't want 'Rob Mitchell' because he doesn't exist in EmployeeFile.
Question
How do I do this?
The only way I can think of is immensely ugly: Concatenate (FNAME, LNAME, DOB) (with some delimiter like ~) from both tables, do a join on that column, do a group by having count(that concatenated column) = 1, then do another select on EmployeeFile, selecting only those rows where the (FNAME, LNAME, DOB) match the parsed substrings of that concatenated string!

A: Pretty straightforward:
select e.*
from EmployeeFile e
inner join
(
  select FNAME, LNAME, DOB
  from OriginalData
  group by FNAME, LNAME, DOB
  having count(1) = 1
) o
on (e.FNAME, e.LNAME, e.DOB) = (o.FNAME, o.LNAME, o.DOB)


text:
Q: UML or CASE tool to analyze *huge* JavaScript code base? I have to figure out how a huge JavaScript code base works and I'm wondering if there are any CASE/UML tools to analyze its structure. I understand that there are several limitations because of the dynamic typing and existence of eval(), but I suppose if IDEs can offer meaningful inspections for JavaScript code these days, there must be some way to visualize dependencies, etc.

A: use JS/UML which is an eclipse plugin from jsuml.org

A: WAVI Web Application Viewer 2 (Node.js)
Generate a svg class diagram for your node.js web application.
WAVI is intended for developers who wish to document their web application or as a reverse engineering tool to recover the structure of a web application.
https://www.npmjs.com/package/wavi


text:
Q: C# WPF Issues With Balloon Tip On Click Repeating Actions I'm probably missing the obvious and please bear with me as I am learning as I go with this build, but I have a problem with a WPF application that uses balloon tips to notify the users of events and they then click the balloon tip to open a window to give them more information. This works fine but we need to multithread the balloon tips so more than one will show at a time, and this is when we get into an issue.
The first balloon tip is shown and when clicking on it we get the window opening properly, close the window and everything works great. When the second balloon tip shows and is clicked it generates 2 new windows, the third generates 3 and so on.
For simplicity the 2 events we are testing against are timers set by objects. I will run through the whole process as I am unsure as to where our issue sits.
The Objects are defined as follows :-
public class Item
    {
        public string ItemID { get; set; }
        public string ItemName { get; set; }
        public string ItemText { get; set; }
        public string ConfigValue { get; set; }
    }

We have 2 items set which we add to a list called repeatItems:-
Item1 (ItemID = "1", ItemName = "Item1", ItemText = "Test text for item1", ConfigValue = "1")
Item2 (ItemID = "2", ItemName = "Item2", ItemText = "Test text for item2", ConfigValue = "2")

We then use a task factory to allow us to setup 2 separate timers :-
//Create Task Factory to handle Repeat Items
var repTaskFactory = new TaskFactory();

//Create Thread for Repeat Items
foreach (Item item in repeatItems)
{
    repTaskFactory.StartNew(() => RepItem(item));
}

The RepItem function is defined as is follows :-
//Function to handle Repeat Items
        public async void RepItem(Item item)
        {
            //Create a new custom timer
            var repTimer = new CustomTimer();

            //assign Item details to the timer
            repTimer.item = item;

            //create and set the timer time value as confiog value is in Minutes
            var mil = Int32.Parse(nudge.ConfigValue) * 60 * 1000;
            repTimer.Interval = mil;

            //set the response for the timer ending
            repTimer.Elapsed += ItemAction;

            //cause timer to autorepeat
            repTimer.AutoReset = true;

            //Start the timer
            repTimer.Enabled = true;
        }

The CustomTimer called is set follows to allow it to carry additional information for later calls :-
class CustomTimer : System.Timers.Timer
    {
        public Item item;
    }

The action function is :-
public void ItemAction(Object source, ElapsedEventArgs e)
        {
            //Create ability to multi thread allowing multiple balloon tips to be displayed
            var balloonTaskFactory = new TaskFactory();

            //Get details from the sending time
            CustomTimer timer = (CustomTimer)source;

            //Get Item from the timer type
            Item item = new Item();
            item = timer.item;

            //Create new thread and show ballon tip
            balloonTaskFactory.StartNew(() => CreateItemBalloonTip(item));
        }

And finally we create and show the balloon tip :-
public void CreateItemBalloonTip(Item item)
        {
            //Set details of Balloon Tip
            m_notifyIcon.BalloonTipText = item.ItemText;
            m_notifyIcon.BalloonTipTitle = item.ItemName;
            m_notifyIcon.BalloonTipClicked += new EventHandler(ItemBalloonTipClicked);

            m_notifyIcon.ShowBalloonTip(2000);
        }

ItemBalloonTipClicked is fairly simple in that it opens a new window and passes the item.ItemName to it :-
public void ItemBalloonTipClicked(Object sender, EventArgs e)
        {
            NotifyIcon cust = (NotifyIcon)sender;

            string item = cust.BalloonTipTitle;
            Window1 win2 = new Window1(item);
            win2.Show();
        }

Somewhere I am guessing the listener for BalloonTipClicked is not closing down and is firing over and over? How do I handle this issue?
Thanks in advance.

A: Try to unregister the event handler to the BalloonTipClicked event in the click event handler:
public void ItemBalloonTipClicked(Object sender, EventArgs e)
{
    NotifyIcon cust = (NotifyIcon)sender;
    cust.BalloonTipClicked -= ItemBalloonTipClicked; // <--

    string item = cust.BalloonTipTitle;
    Window1 win2 = new Window1(item);
    win2.Show();
}


text:
Q: Better way to set global variable for IP address in AsyncTask? I have a number of AsyncTasks in which all their doInBackground methods do this:
Socket s = new Socket("12.345.67.89", 5555);

I want to set one global variable they can all access so when I change locations/IPs I don't have to comb through all the class files and change each IP address.
Off the top of my head I thought to make a class called GlobalInfo which contains all the (static?) variables I might need to share and then in each doInBackground call:
GlobalInfo derp = new GlobalInfo();
GlobalInfo.getIp();

But is there a better way to do this than my instantiating a new class each time approach?

A: If you need something like this, I would suggest creating a utility class (asa you wrote), with, for example:
public static final HOST_ADDRESS = "12.345.67.89";

Then in all your tasks (or even all classes) you can use it Like so (no need for instantiation whatsoever) :
MyUtilityClass.HOST_ADDRESS

Cheers,

A: Make a static class
public class GlobalInfo {
    public static final String IP_ADDRESS = "123.123.123.123";

}

and access it by
 Socket s = new Socket(GlobalInfo.IP_ADDRESS, 5555);

or
import static GlobalInfo.*;

Socket s = new Socket(IP_ADDRESS, 5555);

since its static creation only happens once.

A: You can make a constants class, and make the members of that class static, so that you don't need to create a new object everytime.
Something like:
public class C {
    public static final String IP = "12.345.67.89";
    public static final int PORT = 5555;
}

and then access it using:
Socket s = new Socket(C.IP, C.PORT);

A: Just use global static constants:
public class GlobalInfo {
    public static final String IP_ADDRESS = "12.345.67.89";
    public static final int PORT = 5555;

    private GlobalInfo(){}
}

then, your code becomes:
Socket s = new Socket(GlobalInfo.IP_ADDRESS, GlobalInfo.PORT);

A: All other answers are correct, but personally I opt to create an XML file with the content
<string name="server_ip">192.168.1.100</string>

and then simply do
getString(R.string.server_ip)

This way you keep configuration settings separated from code.


text:
Q: Why c++ string1.size() minus string2.size() got wrong answer? #include <string>
#include <iostream>
using namespace std;

int main()
{
  string haystack = "aaa";
  string needle = "aaaa";
  int i = 0;
  if(i <= haystack.size() - needle.size())
    cout<<"why 0<-1?"<<endl;
  return 0;
}

Output:
why 0<-1?
Press any key continue...
Why we got this output? I think "if" statement should not be executed cause 0 is greater than 3-4=-1.
Thanks!

A: For historical reasons the standard library generally uses size_t, which is an unsigned type, as the result type of size functions. One exception is std::count. But std::string::size() is among the size_t functions,
Since the language guarantees modular arithmetic for unsigned type expressions, you get wrap-around where -1 becomes the largest value of the unsigned type.

Another and IMO more obviously silly consequence is that
std::string( "Hello" ).size() < -1

is guaranteed. Just pure nonsense as source code text, when one recalls that the purpose of high level source code is to communicate more clearly to humans.

To avoid this mess you can define a logical signed Size type as an alias for ptrdiff_t (which is the signed type counterpart to size_t) and ditto size functions static_size, n_items and length, plus a checker is_empty, as follows:
sizes_and_lengths.hpp
#pragma once
// p/cppx/core_language_support/sizes_and_lengths.hpp
// Copyright © Alf P. Steinbach 2015. Boost Software License 1.0.

#include <p/cppx/core_language_support/basic_types.hpp>
#include <p/cppx/core_language_support/overloading.hpp>             // cppx::(Object_argument etc.)
#include <p/cppx/core_language_support/type_builders.hpp>           // cppx::(Ptr_, Ref_, Array_of_, ...)
#include <p/cppx/core_language_support/tmp/If_.hpp>                 // cppx::(If_, Is_)
#include <p/cppx/core_language_support/tmp/type_relationships.hpp>  // cppx::Is_convertible_to_

#include <string>           // std::basic_string
#include <utility>          // std::declval

namespace progrock{ namespace cppx{
    // These templates use size_t to accommodate g++, which has bug in this area.

    // static_size()
    // Static capacity of a collection.

    template< class Type, size_t n >
    constexpr
    auto static_size( In_ref_<Raw_array_of_<n, Type>> )
        -> Size
    { return n; }

    template< class Type, size_t n >
    constexpr
    auto static_size( In_ref_<Array_of_<n, Type>> )
        -> Size
    { return n; }

    template< size_t n >
    constexpr
    auto static_size( In_ref_<std::bitset<n>> )
        -> Size
    { return n; }

    // n_items() & is_empty()
    // Right-typed (signed integer) dynamic size of a collection.

    template< class Type >
    auto n_items( In_ref_<Type> o )
        -> Size
    { return o.size(); }

    template< size_t n >
    auto n_items( In_ref_<std::bitset<n>> o )
        -> Size
    { return o.count(); }       // Corresponds to std::set<int>::size()

    namespace impl {
        using std::declval;

        template< class Type >
        constexpr
        auto has_std_empty_checker( ... )
            -> bool
        { return false; }

        template< class Type >
        constexpr
        auto has_std_empty_checker( int )
            -> If_<
                Is_<bool, decltype( declval<const Type>().empty() )>,   // CFINAE
                Then_<bool>                                             // SFINAE
                >
        { return true; }

        struct Using_empty_method
        {
            template< class Type >
            auto is_empty( In_ref_<Type> o ) const
                -> bool
            { return o.empty(); }
        };

        struct Using_n_items_function
        {
            template< class Type >
            auto is_empty( In_ref_<Type> o ) const
                -> bool
            { return (n_items( o ) == 0); }
        };

    }  // namespace impl

    template< class Type >
    constexpr
    auto has_std_empty_checker()
        -> bool
    { return impl::has_std_empty_checker<Type>( 42 ); }

    template< class Type >
    auto is_empty( In_ref_<Type> o )
        -> bool
    {
        using Impl = Ifc_<
            has_std_empty_checker<Type>(),
            Then_<impl::Using_empty_method>,
            Else_<impl::Using_n_items_function>
            >;
        return Impl().is_empty( o );
    }

    template< size_t n >
    auto is_empty( In_ref_<std::bitset<n>> bits )
        -> bool
    { return bits.none(); }

    // length() & length_of_literal() & is_empty
    // Lengths of strings.

    template< class Char, size_t n >
    constexpr
    auto length_of_literal( In_ref_<Raw_array_of_<n, Char>> )   // "length" wraps this.
        -> Size
    { return n - 1; }

    template< class Type >
    auto length( Object_argument, In_ref_<Type> s )
        -> Size
    { return s.length(); }

    template< class Char
        , class Enabled_ = If_< Is_in_< Character_types, Char > >
        >
    auto length( Pointer_argument, In_value_<Ptr_<const Char>> s )
        -> Size
    {
        auto p = s;
        while( *p != 0 ) { ++p; }
        return p - s;
    }

    template< class Char, size_t n
        , class Enabled_ = If_< Is_in_< Character_types, Char > >
        >
    auto constexpr length( Array_argument, In_ref_<Raw_array_of_<n, Char>> a )
        -> Size
    { return length_of_literal( a ); }

    template< class Type >
    auto length( In_ref_<Type> o )
        -> Size
    { return length( Arg_kind_<Type>(), o ); }

    template< class Char
        , class Enabled_ = If_< Is_in_< Character_types, Char > >
        >
    auto is_empty( In_value_<Ptr_<const Char>> s )
        -> bool
    { return (*s == 0); }

}}  // namespace progrock::cppx

If you want to use this code, in part or in whole, directly without bringing in the supporting files from the cppx library, you'll have to translate e.g. In_ to the type you prefer for a logical in-argument, and so on. The cppx library is just a thing very much in-progress, but it's usable as-is already. It provides stuff such as the above, the very basics that somehow missed becoming part of the standard library, or even being proposed.

A: The return type of std::string::size is std::size_t.
This is an unsigned type. Therefore since your subtraction results in a negative value, it will wrap around based on two's complement, resulting in a very large number far greater than 0.


text:
Q: ImproperlyConfigured: The included urlconf .urls doesn't have any patterns in it I have a django (1.6.x) project that runs fine with the dev server, but is failing under Apache2 (2.2.22.1) and mod_wsgi (3.3-4) on Ubuntu 12.04.3 with the error
ImproperlyConfigured: The included urlconf erp.urls doesn't have any patterns in it
I don't understand why it would work with the dev server but not Apache2/mod_wsgi and I'm finding it difficult to track down where the error is coming from.
There are a number of other SO questions similar, but the only place I use reverse (one problem previously found) is in get_absolute_url in my models - this should be fine?
The project is set up a la Two Scoops style, in particular the layout is:
<repository_root>/<django_project_root>/<configuration_root>/
which translates to:
erp_root/erp/erp/
and the settings are
erp_root/erp/erp/settings/*py (including the __init__.py)
erp/urls.py;
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}, name='login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout_then_login', {}, name='logout'),
    url(r'^search/', include('haystack.urls')),
    url(r'^inventory/', include('inventory.urls')),
)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
    url(r'^__debug__/', include(debug_toolbar.urls)),
)

and inventory/urls.py:
from django.conf.urls import url, patterns
from .forms import CarrierWizardForm1, CarrierWizardForm2, MovementWizardForm1,MovementWizardForm2
from . import views

carrier_wizard_forms = [CarrierWizardForm1, CarrierWizardForm2]
movement_wizard_forms = [MovementWizardForm1, MovementWizardForm2]

urlpatterns = patterns('',
    url(r'^$', views.PartNumberListView.as_view(), name='inventory_list_index'),
    url(r'^parttype/$', views.part_type_list, name='index'),
    url(r'^parttype/(?P<parttype>\d{2})/$', views.part_type_view, name='part_type_view'),
    url(r'^partnumber/$', views.PartNumberListView.as_view(), name='partnumber_list'),
    url(r'^partnumber/add/$', views.PartNumberCreateView.as_view(), name='partnumber_add'),
    url(r'^partnumber/(?P<slug>[-\w]+)/$', views.PartNumberView.as_view(), name='partnumber_view'),
    url(r'^partnumber/(?P<slug>[-\w]+)/update/$', views.PartNumberUpdateView.as_view(), name='partnumber_update'),
    url(r'^partnumber/(?P<slug>[-\w]+)/delete/$', views.PartNumberDeleteView.as_view(), name='partnumber_delete'),
    ....
       )

and erp/settings/dev.py:
# Django settings for erp project.
# settings.py

from unipath import Path

PROJECT_DIR = Path(__file__).ancestor(3)
MEDIA_ROOT = PROJECT_DIR.child("media")
STATIC_ROOT = PROJECT_DIR.child("static")
STATICFILES_DIRS = (
  PROJECT_DIR.child("assets"),
)
TEMPLATE_DIRS = (
  PROJECT_DIR.child("templates"),
)

DEBUG = True
TEMPLATE_DEBUG = DEBUG

TIME_ZONE = 'Australia/Melbourne'
LANGUAGE_CODE = 'en-au'
SITE_ID = 1
USE_TZ = True

DATE_FORMAT = 'd/m/y'
SHORT_DATE_FORMAT = 'd/m/y'

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'stronghold.middleware.LoginRequiredMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'erp.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'erp.wsgi.application'

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.formtools',
    'django.contrib.humanize',
    'inventory',
    'django_extensions',
    'extra_views',
    'debug_toolbar',
    'django_tables2',
    'stronghold',
    'bootstrap3',
    'haystack',
)

LOGIN_URL = '/login'
LOGOUT_URL = '/logout'

# For Stronghold
STRONGHOLD_PUBLIC_NAMED_URLS = (
    'login',
    'logout',
)

# This is required by the debug toolbar middleware
INTERNAL_IPS = ('192.168.0.16','0.0.0.0','127.0.0.1','::1', '192.168.0.115')

# This is reqquired by django_tables2
TEMPLATE_CONTEXT_PROCESSORS = ("django.contrib.auth.context_processors.auth",
                           "django.core.context_processors.debug",
                           "django.core.context_processors.i18n",
                           "django.core.context_processors.media",
                           "django.core.context_processors.static",
                           "django.core.context_processors.tz",
                           "django.contrib.messages.context_processors.messages",
                           "django.core.context_processors.request"
                          )
}

LOGIN_REDIRECT_URL = '/inventory/'

DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
]

def show_toolbar(request):
    return True  # Always show toolbar, for example purposes only.

DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
'INSERT_BEFORE': '</body>',
'ENABLE_STACKTRACES': True,
}

# This is required for Haystack - the search engine
HAYSTACK_CONNECTIONS = {
      'default': {
    'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
    'URL': 'http://127.0.0.1:8085/solr/erp',
  },
}

My wsgi is the standard with minor settings mod:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "erp.settings.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

My apache2/sites-avail/erp.conf is:
<VirtualHost *:80>
   ServerName deverp
   ServerAdmin administrator
   DocumentRoot /path/www/dev/erp/erp/
   ErrorLog /var/log/apache2/dev/error.log
   CustomLog /var/log/apache2/dev/access.log combined
   WSGIDaemonProcess deverp python-path=/path/www/dev/erp/erp:/path/.virtualenvs/erp-dev/lib/python2.7/site-packages
   WSGIProcessGroup deverp
   WSGIScriptAlias / /path/www/dev/erp/erp/erp/wsgi.py
  <Directory /path/www/dev/erp/erp/erp>
  <Files wsgi.py>
    Order deny,allow
    Allow from all
  </Files>
  </Directory>
</VirtualHost>

A: I've suffered a similar problem after upgrading from django 1.5 to 1.6. I'm not sure if my experience is the same as yours.
First, can you scroll up the errors, and check the admin.autodiscover() is what's generating the problem? Alternatively comment out this line and see if a page will load.
The problem I found was related to wsgi.py. Is it possible for you to post this file?

A: So, I actually ran into a similar problem. Coincidentally after you posted in the issues for django-stronghold. The issue is in fact due to a missing setting in django-debug-toolbar.
The setting you are missing is:
DEBUG_TOOLBAR_PATCH_SETTINGS = False

It will work with runserver, but if you try to run it with honcho, or gunicorn, or anything else that uses the WSGI interface it blows up.
EDIT: as mentioned below by @japhyr, its useful to check out the explicit setup instructions: http://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup

A: I used reverse instead of reverse_lazy to define the url parameter of a RedirectView.
class YourRedirectView(RedirectView):
    url = reverse('reversed_url')

Since the urls.py has not been initialized yet the error is coming up. Just use:
class YourRedirectView(RedirectView):
    url = reverse_lazy('reversed_url')

A: I'm having a very similar problem. My project works fine on the test server, but when I try to deploy to gunicorn I get the same ImproperlyConfigured error.
If I comment out the urls which include another url file (i.e. url(r'^admin/', include(admin.site.urls)), then the rest of my urls work fine.
[UPDATE] I was able to further narrow it down to only one of my included url files, but couldn't find anything special about it. However, setting Debug=False in my settings.py file seems to have fixed for me.

A: Also make sure you have urlpatterns in the file you are including and that it is spelt correctly


text:
Q: using := gives unused error but using = don't in Go I have piece of code in which I get error when I use := but when I use = it compiles properly. What I learned is that := only requires only atleast one variable to be defined, others need not be defined, but considering this code is it a bug in Go?
Uncompilable code:
Error: services/db_service.go:16: Session declared and not used
package services

import (
    "gopkg.in/mgo.v2"
    "log"
)

const DB = "mmdb_dev"

var Session *mgo.Session

func InitMongo() bool {
    url := "mongodb://localhost"
    log.Println("Establishing MongoDB connection...")
    //var err error
    Session, err := mgo.Dial(url)
    if err != nil {
        log.Fatal("Cannot connect to MongoDB!")
        return true
    } else {
        return false
    }
}

func GetNewSession() mgo.Session {
    return *Session.Copy()
}

Compiled code
package services

import (
    "gopkg.in/mgo.v2"
    "log"
)

const DB = "mmdb_dev"

var Session *mgo.Session

func InitMongo() bool {
    url := "mongodb://localhost"
    log.Println("Establishing MongoDB connection...")
    var err error
    Session, err = mgo.Dial(url)
    if err != nil {
        log.Fatal("Cannot connect to MongoDB!")
        return true
    } else {
        return false
    }
}

func GetNewSession() mgo.Session {
    return *Session.Copy()
}

The change is
Session, err := mgo.Dial(url)

to
var err error
Session, err = mgo.Dial(url)

A: The operator := is used for short variable declaration. It declares and initializes the variable.
In your first example, you have declared Session variable in global scope and in main function you've declared a new variable having same name in the main scope (as you have used := operator). Therefore, the Session variable declared in the global scope is unused and hence the error.
In your second example, you have assigned global variable a value using assignment operator = and hence it is not declaring a new Session variable but assigning a value to existing global variable.
Please find an example showing difference between global and local variable.

A: You are shadowing your Session variable. Your first example is creating a new Session variable and now it won't compile b/c the other is declared but unused.

A: When you use := the variable definition is within the function. i.e. the scope of the variable changed, from global to local. And you're not using variable locally, hence the compilation error.


text:
Q: $.each() is not loading I have jquery:
$(".upload-cont").bind('drop',function(e){
    var files=e.dataTransfer.files;
    e.preventDefault();
    $.each(files, function(index, file){
        var fileReader = new FileReader();
        fileReader.onload = (function(file) {
            return function(e) {
            };
        })(files[index]);
   });

how to pass the value to the file in $.each()

A: jQuery doesn't normalize the dataTransfer object so you'll have to access it from the original event
var files=e.originalEvent.dataTransfer.files;


text:
Q: stale association data on ActiveRecord model instance? I'm using Rails 2, and I have a one-to-many association between the Project model and the Schedule model in this app.
I have an observer check when attributes of various things change, and in response, it iterates over an array of hashes with which to populate new Schedule instances.
Each Schedule instance should have an attribute, disp_order, which eventually tells the front end where to display it when showing them in a list. The disp_order is populated upon adding the schedule to the project, so that it equals one more than the current highest disp_order.
The problem is in the iteration in the observer. When I iterate over the array of hashes filled with Schedule data, each time through the iteration should calculate the disp_order as one higher than the previous one, to account for the Schedule it just added. However, in practice, it doesn't--unless I refresh the Project object in the middle of the iteration with project = Project.find(project.id), or else it seems always to calculate the same max value of the disp_orders, and doesn't have an accurate list of those Schedule instances to go on.
Is there a better way to do this? (Note: I just mean is there a better way so that I don't have to tell project to re-find itself. There are a number of places I'm actively cleaning up the rest of the code which follows, but for this question I'm really only interested in this one line and things that impact it.)
project.rb
class Project < ActiveRecord::Base
  # ...
  has_many :schedules, :dependent => :destroy
  # ...
  belongs_to :data, :polymorphic => true, :dependent => :destroy
    accepts_nested_attributes_for :data
  # ...

schedule.rb
class Schedule < ActiveRecord::Base
  belongs_to :project, :include => [:data]
  # ...

project_event_observer.rb
class ProjectEventObserver < ActiveRecord::Observer
  # ...
  def perform_actions(project, actions)
    # ...
    actions.each { |action|
      action.each { |a_type, action_list|
        action_list.each { |action_data|
          self.send(action_type.to_s.singularize, action_data, project)
          project = Project.find(project.id) #My question is about this line.
        }
      }
    }
  # ...

sample actions for the iteration above
[
  {:add_tasks => [
    {:name => "Do a thing", :section => "General"},
    {:name => "Do another thing", :section => "General"},
   ]
  },
  # More like this one.
]

the observer method that receives the rest of the action data
def add_task(hash, project)
  # ...
  sched = Schedule.new
  hash.each { |key, val|
    # ...
    sched.write_attribute(key, val)
    # ...
  }
  sched.add_to(project)
end

schedule.rb
def add_to(proj)
  schedules = proj.schedules
  return if schedules.map(&:name).include?(self.name)
  section_tasks = schedules.select{|sched| sched.section == self.section}
  if section_tasks.empty?
    self.disp_order = 1
  else
    self.disp_order = section_tasks.map(&:disp_order).max + 1 #always display after previously existing schedules
  end
  self.project = proj
  self.save
end

A: You're running into this issue because you're working off of a in-memory cached object.
Take a look at the association documentation.
You can pass the argument of true in your Schedule model's add_to function to reload the query.
Other options would include inverse_of but that's not available to you because you're using polymorphic associations, as per the docs.


text:
Q: Unable to access webcam in moodle I am trying to develop a plugin in which I need to access the webcam. but I am not able to open the webcam
if I do inspect I am getting accessibility and unable to play media. Does moodle need any additional settings?

*

*I have a simple view.php
require_once (__DIR__.'/../../config.php');
$PAGE->requires->js_call_amd('local_webcam/camera');
$PAGE->set_title("View Webcam here");

$PAGE->set_context(\context_system::instance());
$PAGE->set_url(new moodle_url('/local/webcam/view.php'));

$templatecontext = (object)[
"webcam" => 'Preview of Webcam'
];

echo $OUTPUT->header();

echo $OUTPUT->render_from_template('local_webcam/view', $templatecontext);

echo $OUTPUT->footer();

2.Template file
`
    <input type="button" class="btn btn-light" id="viewbutton" value="CLick me">
    <video id="liveview"  height="480" width="640" autoplay muted></video>`

*My javascript file
define(['jquery'],
 function($) {
    $('#viewbutton').click(function() {
        let liveview = $("#liveview");
    // eslint-disable-next-line promise/catch-or-return
        navigator.mediaDevices.getUserMedia({video: {width: 640, height: 480},
            audio: false}).then((stream) =>{
            liveview.srcObject = stream;
        });
    });

});`
This is the error I am getting. If I try to run in normal file. outside of moodle. It is working.


text:
Q: How to populate jTable using MS ACCESS on a button event? Here is my Code:
Its not displaying any data on Jtable please help me guys:
Connection con=null;
ResultSet rs=null;

PreparedStatement ps=null;
    try{
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   Connection co=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:\\a.accdb");
          String sql="Select * from expenses";
              ps=con.prepareStatement(sql);
        rs=ps.executeQuery();
       Table_Expenses.setModel(DbUtils.resultSetToTableModel(rs));
   }
   catch(Exception e)
   {

   }

A: Replace
rs=ps.executeQuery(sql);

By
rs=ps.executeQuery();

EDIT:
Now you failing to call your query
Replace
Connection co=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:\\a.accdb");

By
Connection con=DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:/a.accdb");

OR
ps=con.prepareStatement(sql);

By
ps=co.prepareStatement(sql);


text:
Q: Set domain name to be related to a project in Wakatime How do I associate domains in Chrome to a specific project? Is it somehow supposed to be added to the .wakatime-project file in my coding directory?
This is what I see when I open up the wakatime options in chrome:

A: You can use "Custom Rules" under "Settings".

*

*Add rules filtering by URL, contains, <domain-name>

*Set Project to <project-name>.

*Save/Apply.


text:
Q: Apache: mod_rewrite: Spcaes & Special Characters in URL not working i am using APACHE:mod_rewrite to define a set of rules for rewritting URLS
i want this link                                                           to be displayed as
/myDIR/walls.php?f=All&of=0&s=Newest -> All.html
so i am using the following rule
text from (.htaccess)
RewriteEngine  on
RewriteBase    /myDIR/
RewriteRule ^All\.html$  papers.php?f=All&of=0&s=Newest

now these variables that are being passed as
f=All of=0 s=Newest these are being used in query, OBVIOUSLY, and one of these variables, i.e f sometimes has values with spaces and special characters, and i can't avoid that because the database is already in-place and all i am doing rewrite of URLs....
NOW when i try to define a rule like this
i want this link                                                                                to be displayed as
/myDIR/walls.php?f=Characters & Supers&of=0&s=Newest -> Characters & Supers.html
which is wrong i know because there shouldn't be any spaces.. so to make it right i define the rule like this
RewriteRule ^Characters%20%26%20Supers\.html$  papers.php?f=Characters%20%26%20Supers&of=0&s=Newest

it lets me define the rule but when i click my link i get this
404 Not Found Error "The requested URL /wallz/Characters & Supers.html was not found on this server."
QUESTION: WHAT To Do ?
my guess is i am not supposed to be doing HTML URL Encoding inside .htaccess

A: Your guess is correct. By the time that a URL has reached mod_rewrite for processing, Apache has already decoded the URL for you. Therefore, if you want to check for any otherwise-encoded characters, you need to use their literal representations.
Since whitespace is used as a delimiter here, you'd also need to escape your spaces:
RewriteRule ^Characters\ &\ Supers\.html$ papers.php?f=%0&of=0&s=Newest

I believe that using quotation marks will also work, so the following should be equivalent (though it's untested):
RewriteRule "^Characters & Supers\.html$" papers.php?f=%0&of=0&s=Newest

A final note about Apache's decoding process is that it will automatically remove multiple slashes for you. While not relevant for your example, it's another example of how the URL is transformed prior to reaching your mod_rewrite rules.


text:
Q: (offlineimap) Email directory still empty after successful connection; force methods don't make any difference i have newly installed offlineimap, but after the first start my maildirectory is still empty. Furthermoore, the methods described here http://offlineimap.org/doc/FAQ.html#can-i-force-offlineimap-to-sync-a-folder-right-now don't make any difference. I use the newest stable Version.
Have I forgotton something?
Regards
% offlineimap
OfflineIMAP 6.5.7
  Licensed under the GNU GPL v2+ (v2 or any later version)
Account sync main:
 *** Processing account main
 Establishing connection to imap.kolabnow.com:993
Enter password for account 'mainRemote':
 *** Finished account 'main' in 0:08
 Next refresh in 1.0 minutes

% offlineimap -d maildir
OfflineIMAP 6.5.7
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Debug mode: Forcing to singlethreaded.
Now debugging for maildir: Maildir repository debugging
Now debugging for : Other offlineimap related sync messages
Account sync main:
 [maildir]: MaildirRepository initialized, sep is '.'
 *** Processing account main
 Establishing connection to imap.kolabnow.com:993
Enter password for account 'mainRemote':
 [maildir]: _GETFOLDERS_SCANDIR STARTING. root = /home/[username]/maildir, extension = None
 [maildir]:   toppath = /home/[username]/maildir
 [maildir]:   dirname =
 [maildir]: _GETFOLDERS_SCANDIR RETURNING []
 []: Copying folder structure from mainRemote to mainLocal
 *** Finished account 'main' in 0:09

% pkill -USR1 offlineimap
% offlineimap -u blinkenlights
[Connection successful etablished]
[Next sync in 1:00[

1: [active]      *Control: @
0: [active]          main: @

% ls maildir
my .offlineimaprc:
[general]
accounts = main

[Account main]
localrepository = mainLocal
remoterepository = mainRemote
synclabels = yes
autorefresh = 1
quick = 10

[Repository mainLocal]
type = Maildir
localfolders = ~/maildir/

[Repository mainRemote]
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-bundle.crt
type = IMAP
remotehost = imap.kolabnow.com
remoteuser = bluemorpho@kolabnow.com
holdconnectionopen = yes
keepalive = 60

this .offlineimap makes also no difference
[general]
accounts = main

[Account main]
localrepository = mainLocal
remoterepository = mainRemote
synclabels = yes
#autorefresh = 1
#quick = 10

[Repository mainLocal]
type = Maildir
localfolders = ~/maildir

[Repository mainRemote]
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-bundle.crt
type = IMAP
remotehost = imap.kolabnow.com
remoteuser = bluemorpho@kolabnow.com
holdconnectionopen = yes
keepalive = 60

EDIT
% offlineimap -d imap
OfflineIMAP 6.5.7
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync main:
 [imap]: Using authentication mechanisms ['GSSAPI', 'CRAM-MD5', 'PLAIN', 'LOGIN']
 *** Processing account main
 Establishing connection to imap.kolabnow.com:993
 [imap]:   27:13.11 Account sync main imaplib2 version 2.43
 [imap]:   27:13.11 Account sync main imaplib2 debug level 5, buffer level 3
imap.kolabnow.com writer:
 [imap]:   27:14.21 imap.kolabnow.com writer starting
imap.kolabnow.com reader:
 [imap]:   27:14.21 imap.kolabnow.com reader starting using poll
Account sync main:
 [imap]:   27:14.21 Account sync main _request_push(continuation, None, {}) = HMOO0
 [imap]:   27:14.21 Account sync main None:HMOO0.ready.wait
imap.kolabnow.com handler:
 [imap]:   27:14.31 imap.kolabnow.com handler starting
imap.kolabnow.com reader:
 [imap]:   27:14.36 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:14.36 imap.kolabnow.com reader rcvd 203
 [imap]:   27:14.36 imap.kolabnow.com reader < * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR] imapf01.mykolab.com Cyrus IMAP Murder 2.5.2.3-Kolab-2.5.2-3.el6.kolab_14 server ready\r\n
imap.kolabnow.com handler:
 [imap]:   27:14.36 imap.kolabnow.com handler _put_response(* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR] imapf01.mykolab.com Cyrus IMAP Murder 2.5.2.3-Kolab-2.5.2-3.el6.kolab_14 server ready)
 [imap]:   27:14.36 imap.kolabnow.com handler untagged_responses[OK] 0 += ["[CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR] imapf01.mykolab.com Cyrus IMAP Murder 2.5.2.3-Kolab-2.5.2-3.el6.kolab_14 server ready"]
 [imap]:   27:14.36 imap.kolabnow.com handler untagged_responses[CAPABILITY] 0 += ["IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR"]
 [imap]:   27:14.36 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:14.36 imap.kolabnow.com handler _request_pop(continuation, (False, '* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR] imapf01.mykolab.com Cyrus IMAP Murder 2.5.2.3-Kolab-2.5.2-3.el6.kolab_14 server ready')) = HMOO0
 [imap]:   27:14.36 imap.kolabnow.com handler None:HMOO0.ready.set
Account sync main:
 [imap]:   27:14.36 Account sync main _get_untagged_response(OK) => ['[CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR] imapf01.mykolab.com Cyrus IMAP Murder 2.5.2.3-Kolab-2.5.2-3.el6.kolab_14 server ready']
 [imap]:   27:14.36 Account sync main state => NONAUTH
 [imap]:   27:14.36 Account sync main [async] CAPABILITY ()
 [imap]:   27:14.36 Account sync main state_change_pending.acquire
 [imap]:   27:14.36 Account sync main state_change_pending.release
 [imap]:   27:14.36 Account sync main _request_push(HMOO1, CAPABILITY, {}) = HMOO1
 [imap]:   27:14.36 Account sync main data=HMOO1 CAPABILITY
 [imap]:   27:14.37 Account sync main CAPABILITY:HMOO1.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:14.37 imap.kolabnow.com writer > HMOO1 CAPABILITY\r\n
imap.kolabnow.com reader:
 [imap]:   27:14.41 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:14.41 imap.kolabnow.com reader rcvd 615
 [imap]:   27:14.41 imap.kolabnow.com reader < * CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE\r\n
 [imap]:   27:14.41 imap.kolabnow.com reader < HMOO1 OK Completed\r\n
imap.kolabnow.com handler:
 [imap]:   27:14.41 imap.kolabnow.com handler _put_response(* CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE)
 [imap]:   27:14.41 imap.kolabnow.com handler untagged_responses[CAPABILITY] 1 += ["IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE"]
 [imap]:   27:14.41 imap.kolabnow.com handler _put_response(HMOO1 OK Completed)
 [imap]:   27:14.41 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:14.41 imap.kolabnow.com handler _request_pop(HMOO1, ('OK', ['Completed'])) = HMOO1
 [imap]:   27:14.41 imap.kolabnow.com handler CAPABILITY:HMOO1.ready.set
Account sync main:
 [imap]:   27:14.42 Account sync main _get_untagged_response(CAPABILITY) => ['IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR', 'IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE']
 [imap]:   27:14.42 Account sync main _untagged_response(OK, ?, CAPABILITY) => ['IMAP4rev1 LITERAL+ ID ENABLE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR', 'IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE']
 [imap]:   27:14.42 Account sync main CAPABILITY: ('IMAP4REV1', 'LITERAL+', 'ID', 'ENABLE', 'ACL', 'RIGHTS=KXTEN', 'QUOTA', 'NAMESPACE', 'UIDPLUS', 'NO_ATOMIC_RENAME', 'UNSELECT', 'CHILDREN', 'MULTIAPPEND', 'BINARY', 'CATENATE', 'CONDSTORE', 'ESEARCH', 'SORT', 'SORT=MODSEQ', 'SORT=DISPLAY', 'SORT=UID', 'THREAD=ORDEREDSUBJECT', 'THREAD=REFERENCES', 'ANNOTATEMORE', 'ANNOTATE-EXPERIMENT-1', 'LIST-EXTENDED', 'LIST-STATUS', 'LIST-MYRIGHTS', 'WITHIN', 'QRESYNC', 'SCAN', 'XLIST', 'XMOVE', 'MOVE', 'SPECIAL-USE', 'CREATE-SPECIAL-USE', 'URLAUTH', 'URLAUTH=BINARY', 'X-NETSCAPE', 'MUPDATE=MUPDATE://MUPDATE.MYKOLAB.COM/', 'AUTH=LOGIN', 'AUTH=PLAIN', 'SASL-IR', 'COMPRESS=DEFLATE', 'X-QUOTA=STORAGE', 'X-QUOTA=MESSAGE', 'X-QUOTA=X-ANNOTATION-STORAGE', 'X-QUOTA=X-NUM-FOLDERS', 'IDLE')
 [imap]: Attempting PLAIN authentication
 [imap]:   27:14.42 Account sync main [sync] AUTHENTICATE ('PLAIN',)
 [imap]:   27:14.42 Account sync main state_change_pending.acquire
 [imap]:   27:14.42 Account sync main _request_push(HMOO2, AUTHENTICATE, {}) = HMOO2
 [imap]:   27:14.42 Account sync main data=HMOO2 AUTHENTICATE PLAIN
 [imap]:   27:14.42 Account sync main _request_push(continuation, None, {}) = HMOO3
 [imap]:   27:14.42 Account sync main None:HMOO3.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:14.42 imap.kolabnow.com writer > HMOO2 AUTHENTICATE PLAIN\r\n
imap.kolabnow.com reader:
 [imap]:   27:14.47 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:14.47 imap.kolabnow.com reader rcvd 4
 [imap]:   27:14.47 imap.kolabnow.com reader < + \r\n
imap.kolabnow.com handler:
 [imap]:   27:14.47 imap.kolabnow.com handler _put_response(+ )
 [imap]:   27:14.47 imap.kolabnow.com handler _request_pop(continuation, (True, '')) = HMOO3
 [imap]:   27:14.47 imap.kolabnow.com handler None:HMOO3.ready.set
Account sync main:
 [imap]:   27:14.47 Account sync main continuation => True,
Enter password for account 'mainRemote':
 [imap]: __plainhandler: returning bluemorpho@kolabnow.com(passwd)
 [imap]:   27:19.01 Account sync main _request_push(continuation, None, {}) = HMOO4
 [imap]:   27:19.01 Account sync main write literal size 52
 [imap]:   27:19.01 Account sync main None:HMOO4.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:19.01 imap.kolabnow.com writer > AGJsdWVtb3JwaG9Aa29sYWJub3cuY29tAFBoQHN1bDhtYW50NTdE\r\n
imap.kolabnow.com reader:
 [imap]:   27:19.12 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:19.12 imap.kolabnow.com reader rcvd 684
 [imap]:   27:19.12 imap.kolabnow.com reader < HMOO2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] Success (tls protection) SESSIONID=<imapf01.mykolab.com-22440-1433413633-1-1537824389138375231>\r\n
imap.kolabnow.com handler:
 [imap]:   27:19.12 imap.kolabnow.com handler _put_response(HMOO2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] Success (tls protection) SESSIONID=<imapf01.mykolab.com-22440-1433413633-1-1537824389138375231>)
 [imap]:   27:19.12 imap.kolabnow.com handler untagged_responses[CAPABILITY] 0 += ["IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE"]
 [imap]:   27:19.12 imap.kolabnow.com handler _request_pop(HMOO2, ('OK', ['[CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] Success (tls protection) SESSIONID=<imapf01.mykolab.com-22440-1433413633-1-1537824389138375231>'])) = HMOO2
 [imap]:   27:19.12 imap.kolabnow.com handler AUTHENTICATE:HMOO2.ready.set
 [imap]:   27:19.12 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:19.12 imap.kolabnow.com handler _request_pop(continuation, (False, 'HMOO2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] Success (tls protection) SESSIONID=<imapf01.mykolab.com-22440-1433413633-1-1537824389138375231>')) = HMOO4
 [imap]:   27:19.12 imap.kolabnow.com handler None:HMOO4.ready.set
Account sync main:
 [imap]:   27:19.12 Account sync main continuation => False, HMOO2 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE] Success (tls protection) SESSIONID=<imapf01.mykolab.com-22440-1433413633-1-1537824389138375231>
 [imap]:   27:19.12 Account sync main AUTHENTICATE:HMOO2.ready.wait
 [imap]:   27:19.12 Account sync main state => AUTH
 [imap]:   27:19.12 Account sync main state_change_pending.release
 [imap]:   27:19.12 Account sync main [async] CAPABILITY ()
 [imap]:   27:19.12 Account sync main state_change_pending.acquire
 [imap]:   27:19.12 Account sync main state_change_pending.release
 [imap]:   27:19.12 Account sync main _request_push(HMOO5, CAPABILITY, {}) = HMOO5
 [imap]:   27:19.12 Account sync main data=HMOO5 CAPABILITY
 [imap]:   27:19.12 Account sync main CAPABILITY:HMOO5.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:19.12 imap.kolabnow.com writer > HMOO5 CAPABILITY\r\n
imap.kolabnow.com reader:
 [imap]:   27:19.17 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:19.17 imap.kolabnow.com reader rcvd 599
 [imap]:   27:19.17 imap.kolabnow.com reader < * CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE\r\n
 [imap]:   27:19.17 imap.kolabnow.com reader < HMOO5 OK Completed\r\n
imap.kolabnow.com handler:
 [imap]:   27:19.17 imap.kolabnow.com handler _put_response(* CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE)
 [imap]:   27:19.17 imap.kolabnow.com handler untagged_responses[CAPABILITY] 1 += ["IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE"]
 [imap]:   27:19.17 imap.kolabnow.com handler _put_response(HMOO5 OK Completed)
 [imap]:   27:19.17 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:19.17 imap.kolabnow.com handler _request_pop(HMOO5, ('OK', ['Completed'])) = HMOO5
 [imap]:   27:19.17 imap.kolabnow.com handler CAPABILITY:HMOO5.ready.set
Account sync main:
 [imap]:   27:19.18 Account sync main _get_untagged_response(CAPABILITY) => ['IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE', 'IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE']
 [imap]:   27:19.18 Account sync main _untagged_response(OK, ?, CAPABILITY) => ['IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE', 'IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY X-NETSCAPE MUPDATE=mupdate://mupdate.mykolab.com/ LOGINDISABLED COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE']
 [imap]:   27:19.18 Account sync main [async] LIST ('', '""')
 [imap]:   27:19.18 Account sync main state_change_pending.acquire
 [imap]:   27:19.18 Account sync main state_change_pending.release
 [imap]:   27:19.18 Account sync main _request_push(HMOO6, LIST, {}) = HMOO6
 [imap]:   27:19.18 Account sync main data=HMOO6 LIST "" ""
 [imap]:   27:19.18 Account sync main LIST:HMOO6.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:19.18 imap.kolabnow.com writer > HMOO6 LIST "" ""\r\n
imap.kolabnow.com reader:
 [imap]:   27:19.23 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:19.23 imap.kolabnow.com reader rcvd 60
 [imap]:   27:19.23 imap.kolabnow.com reader < * LIST (\Noselect) "/" ""\r\n
 [imap]:   27:19.23 imap.kolabnow.com reader < HMOO6 OK Completed (0.000 secs)\r\n
imap.kolabnow.com handler:
 [imap]:   27:19.23 imap.kolabnow.com handler _put_response(* LIST (\Noselect) "/" "")
 [imap]:   27:19.23 imap.kolabnow.com handler untagged_responses[LIST] 0 += ["(\Noselect) "/" """]
 [imap]:   27:19.23 imap.kolabnow.com handler _put_response(HMOO6 OK Completed (0.000 secs))
 [imap]:   27:19.23 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:19.23 imap.kolabnow.com handler _request_pop(HMOO6, ('OK', ['Completed (0.000 secs)'])) = HMOO6
 [imap]:   27:19.23 imap.kolabnow.com handler LIST:HMOO6.ready.set
Account sync main:
 [imap]:   27:19.23 Account sync main _get_untagged_response(LIST) => ['(\\Noselect) "/" ""']
 [imap]:   27:19.23 Account sync main _untagged_response(OK, ?, LIST) => ['(\\Noselect) "/" ""']
 [imap]:   27:19.23 Account sync main [async] LIST ('', '*')
 [imap]:   27:19.23 Account sync main state_change_pending.acquire
 [imap]:   27:19.23 Account sync main state_change_pending.release
 [imap]:   27:19.23 Account sync main _request_push(HMOO7, LIST, {}) = HMOO7
 [imap]:   27:19.24 Account sync main data=HMOO7 LIST "" "*"
 [imap]:   27:19.24 Account sync main LIST:HMOO7.ready.wait
imap.kolabnow.com writer:
 [imap]:   27:19.24 imap.kolabnow.com writer > HMOO7 LIST "" "*"\r\n
imap.kolabnow.com reader:
 [imap]:   27:19.29 imap.kolabnow.com reader poll => [(4, 1)]
 [imap]:   27:19.29 imap.kolabnow.com reader rcvd 33
 [imap]:   27:19.29 imap.kolabnow.com reader < HMOO7 OK Completed (0.000 secs)\r\n
imap.kolabnow.com handler:
 [imap]:   27:19.29 imap.kolabnow.com handler _put_response(HMOO7 OK Completed (0.000 secs))
 [imap]:   27:19.29 imap.kolabnow.com handler state_change_free.set
 [imap]:   27:19.29 imap.kolabnow.com handler _request_pop(HMOO7, ('OK', ['Completed (0.000 secs)'])) = HMOO7
 [imap]:   27:19.30 imap.kolabnow.com handler LIST:HMOO7.ready.set
Account sync main:
 []: Copying folder structure from mainRemote to mainLocal
 *** Finished account 'main' in 0:06

EDIT2: BTW, i use fedora 22.


text:
Q: How to make an object move with a velocity to a point, and from that point with other velocity? Im trying to move an object with a velocity to a point, and make it stop when he reached that point.
  void FixedUpdate()
    {
      if (transform.position.y == 0f) {
        rb.velocity = new Vector2(-speed, 0f);
      } //first change of the velocity

      if (transform.position.x == 0f){
        rb.velocity = new Vector2(0f, 0f);
      }
    }//here i want to stop
.........................................................

public void MoveR()
    {
      rb.velocity = new Vector2(-speed, upSpeed);
    }

A: I don't understand your logic there. If you want to move an object to a specific position as you asked. There is a more simplified way of moving an object in Unity. See Unity Documentation.
public class Example : MonoBehaviour
{
    public Vector3 myTarget;

    private void Start()
    {
        StartCoroutine(MoveTo());
    }

    private IEnumerator MoveTo()
    {
        while (transform.position != myTarget)
        {
            transform.position = Vector3.MoveTowards(transform.position, myTarget, Time.deltaTime * 2f);

            yield return null;
        }

    Debug.Log("We reached Target. Done!");
    yield return null;
    }
}

If you want, you can declare myTarget as a GameObject. In that case, you will need to create an empty gameObject or select one that already exist.


text:
Q: Add a header to a UITextView I'm creating what I thought would be a pretty straight forward scene with text based content. I want the format to be a heading followed by a paragraph of text followed by another heading and so on.
Currently I'm using the interface builder and creating a label, then a UITextView, then another label then another UITextView and so on. Is there a better way as this seems a bit long winded.
Thanks
Shell

A: Why can't you try with the UITableView with as many as of Sections .
USe titleForHeaderInSection for heading && UItextField in the Cell.
    -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
        return 1 ;
    }

    -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView{
        return YourNEed;

    }

    -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
       // return header_Name accordind to the Sections
switch (section) {
        case 0:
            return @"1st Label";
           // ...........

    }


text:
Q: How to Generate a Unique, Shareable ID on Android I am trying to build a situation where a user can generate a "table" where other players can join them, much like how the Jackbox party games generate an easy link players can type into their phones to join a game without making an account.
However, whereas Jackbox is somewhat web based and uses URLs, I am trying to do everything within Firebase since this is a one man project. Obviously, this will mean that every user must have the app, which is fine for my use-case. I realize Firebase objects can create their own unique IDs, but those are pretty long, and I am not sure how to shorten them into a user-friendly code while guaranteeing that the generated code will not be a duplicate.
Any ideas?


text:
Q: How can I show a different theme for admin users? WP 3.8+ I've been searching around for a long while now. There seem to be plugins available for this, but hardly anything that is current.
Many of the plugins I have already tried do not work correctly with WordPress 3.8+
My needs are basic. All I want to do is load another theme if I am logged in as an admin, so that I see a different front-end.
Thanks,
Michael.

A: You can use the filter stylesheet:
<?php add_filter( 'stylesheet', 'wpse149620_stylesheet' );

function wpse149620_stylesheet( $stylesheet ) {
    if ( ! is_admin() && current_user_can( 'administrator' ) ) {
        $stylesheet = 'admin-theme';
    }

    return $stylesheet;
} ?>

However, this must be loaded before the first time the "current theme" is requested, which can only be done (without editing core) by putting this in a Must Use Plugin.
Create a directory called 'mu-plugins' in 'wp-content' and insert this code into a PHP file. WordPress will pick this up automatically. Make sure there are no spaces, line breaks or output before the PHP code to avoid a fatal error.