text:
Q: How to configure GitLab CI Pipeline only on merge requests and that too only for specific branches? I have following configuration for enabling pipeline on merge requests. I want this pipeline to run only on merge request to few specific branches only.
For Ex: "release/some-xyz-branch"  and "develop" branches.
How to do it ?
test_job:
    stage: test
    only:
        - merge_requests
    script:
        - npm run test

I have tried adding the branch name after "- merge_requests" as follows but it is not working as expected.
test_job:
    stage: test
    only:
        - merge_requests
        - develop
        - release/some-xyz-branch
    script:
        - npm run test

A: You can use variables along with refs to run the pipeline.
test_async:
  script:
    - echo "Test Async"
  only:
    refs:
      - merge_requests
    variables:
      - $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^release\/.*$/

test_db:
  script:
    - echo "Test db"
  only:
    - master

In above yaml, test_async will only run when merge request is created and the target branch is either develop or starts with release/. test_db will only run when commited to master.

A: We can use the $CI_COMMIT_REF_NAME predefined environment variable in combination with only:variables to accomplish this behavior
test_job:
    stage: test
    only: [merge_requests]
    except:
      variables:
         - $CI_COMMIT_REF_NAME =~ /^docs-/
    script:
        - npm run test

Note: docs- represents refs/merge-requests/:iid/head


text:
Q: Can a managed package be an extension of another extension package? Is there a limitation how deep the nesting of base and extension packages (managed ones) is in Salesforce?
So can Package EEB extend Package EB extend Package B?

A: There is no documented limit on the recursion depth possible, but there are other limits that apply to this question.
Execution Time: The entire time for a transaction is 10,000ms; this time is shared. Multiple packages are likely to reach this limit sooner.
Referenced Namespaces: You can reference at most 10 namespaces in a single transaction. Assuming each package in a chain were all dependent upon the same object, the maximum recursion depth may well be 10.
DML Operations: There is a limit on the number of records you can process per transaction; this may affect the maximum number of commands you can chain.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Looking to create a bot for an online java based game I am currently doing research on how I am going to do this.
I need a program to read the screen of my computer(pixels, edges, etc) and an answer that I think might work is opencv. However everything I look into about opencv reads from a video camera and not from a computer screen. Is it possible to record the screen and use it in the same fashion that I see video cameras being used in opencv?
If so can anyone point me to some reading on this? So far I havent found any examples that apply to what I am looking for
EDIT: I am not looking for anybody to write code for me. Im simply asking if it is possible to use the screen as a video feed for opencv. I am not familiar with opencv nor have I ever used it before.

A: Does the system have to use OpenCV and C++? I know that Java can do this very easily using its built it Robot class the code being:
 try {
    Robot robot = new Robot();
Rectangle captureSize = new Rectangle(0, 0, 500, 500);
    BufferedImage bufferedImage = robot.createScreenCapture(captureSize);
}
catch(AWTException e) {
    System.err.println("Error");
}

If you really want to use OpenCV and C++ you could connect to them via JNI but this would probably be making life harder than it needs to be.


text:
Q: Sharepoint Feature Creation Approach I want to create a feature,  once the feature is activated by the administrator a number of lists, items and workflows will be created.
What would be the best approach to implementing this?
The only way i have currently came across is using SPFeatureReceiver and creating the objects on the FeatureActivated function.
Any other suggestions?

A: hope following links will helps you,
http://weblogs.asp.net/sreejukg/archive/2011/10/27/developing-sharepoint-2010-features-using-visual-studio-2010.aspx
here how workflow realtes stuffs into featureactiviated.
http://www.stuartroberts.net/index.php/2011/01/19/package-deploy-sharepoint-designer-workflow/
http://devendra-sharepoint.blogspot.in/2012/01/creating-list-programatically-in_30.html


text:
Q: Database design for different, but related, objects I'm new to relational databases having enjoyed the flexibility of nosql to date.
I want to store data about 'estimates'. An estimate takes a set of parameters that depend on which product it is an estimate for. I think there are two ways forwards:
Tables for each product category
I was planning to have a table for estimates and one for each product category (a category could be "cards", and this might cover product such as "business cards" and "postcards":
estimates (id, name, user_id, category("Cards", "Books",...), linked_id (=one of the ids in the following tables)
cards(id, product, size, weight)
books(id, product, fold, coating)
...

I've read on Stack overflow some posts about conditional joins, but never got the impression that this was 'best practise', although I also did not see alternatives.
A table where not all fields are completed
Here I would have an estimate table that has every possible field for products, but only use those that are relevant for the product stored in that row,
estimates (id, name, user_id, category,size, weight, fold, coating, ...)
# example row
# id: 100, name: Recipe book, category: book, size: 77, weight: 20, fold: null, coating: null,...

Does the above make sense; what do I need to watch out for?


text:
Q: search in record set / update value I created a record set using structs, vector and added couple of records. This is the code that does it. This should run as is - on an Arduino/ESP8266/ESP32.
#include <string>
#include <vector>

struct student {

  std::string studentName; // I only load this once at startup. So can be const
  std::string studentSlot; // <= This should be updateable
  bool wasPresent;         // <= This should be updateable

  student(const char* stName, const char* stSlot, bool stPresent) :
    studentName(stName),
    studentSlot(stSlot),
    wasPresent(stPresent)
  {}
};

std::vector<student> studentRecs;

void setup() {
  delay(1000);

  Serial.begin(115200);

  // Add couple of records
  student record1("K.Reeves", "SLT-AM-03", false);
  student record2("J.Wick", "SLT-PM-01", true);

  studentRecs.push_back(record1);
  studentRecs.push_back(record2);
}

void loop() {

  Serial.println();

  // Get the size
  int dsize = static_cast<int>(studentRecs.size());

  // Loop, print the records
  for (int i = 0; i < dsize; ++i) {
    Serial.print(studentRecs[i].studentName.c_str());
    Serial.print(" ");
    Serial.print(studentRecs[i].studentSlot.c_str());
    Serial.print(" ");
    Serial.println(String(studentRecs[i].wasPresent));
  }

  // Add a delay, continue with the loop()
  delay(5000);
}

I am able to read the individual records using the for loop. I am not sure if it's the best way but it does work.
I need to be able to do couple of things on this record set.
1) Search/find a record by studentName. I can find it by looping but that comes across as inefficient+ugly to me.
2) Be able to update studentSlot and wasPresent
With some research and experimentation I found that I could do this to change wasPresent
studentRecs[0].wasPresent = false;

Again I am not sure if that is the best way but it works. I want to be able to change studentSlot and I am not sure about that as this is my first time dealing with structs and vector. The studentName is constant ( I only need to load it once at startup ) where the studentSlot can change during runtime. I am not sure how to change that. It may need me to remove the const char*, do some strcpy thingy or something but I am stuck at that. In short there are 3 things I need a little help on
1) Search/find a record by studentName
2) Be able to update studentSlot
3) Delete all the records. Note: I just figured out that studentRecs.clear() does this
I am not sure if I have been able to explain this clearly enough. So any questions please shoot. Thanks.

A: Well, I think your best bet is to go with for loop to search for studentName. Depending on what C++ revision you are using:
student searchForName(const std::string & name)
{
    for (auto item : studentRecs)
    {
        if (item.studentName == name)
            return item;
    }
    return student();
}

or if you are constrained to pre-C++11:
student searchForName(const std::string & name)
{
    for (std::size_t cnt = 0; cnt < studentRecs.size(); ++cnt)
    {
        if (studentRecs[cnt].studentName == name)
            return item;
    }
    return student();
}

The rest is very similar.
BTW.: You can change:
...
  // Get the size
  int dsize = static_cast<int>(studentRecs.size());

  // Loop, print the records
  for (int i = 0; i < dsize; ++i) {
...

to:
...
  // Loop, print the records
  for (std::size_t i = 0; i < studentRecs.size(); ++i) {
...


text:
Q: Combobox + UF + Cidade + MySql + JavaScript Estou com a seguinte dúvida:
Tenho um projeto em Java JSP e nao sei como faço para selecionar o combo da UF e o de Cidade atualize conforme o que selecionei antes. abaixo eu tenho um exemplo com dados fixos, mas quero fazer em mysql, quero saber como que faço pra executar o select na tabela do banco. preciso de um exemplo no meu projeto
Já fiz de tudo que é forma e não sei como avançar.
tenho isso daqui feito no meu.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
</head>
<script type='text/javascript'>
    window.onload = function () {
        BindEvent();
    }
    function BindEvent()
    {
        var elemToBind = document.getElementById("uf");
        elemToBind.onchange = function () {
            SetSel(this);
        }
    }
    function SetSel(elem)
    {
        var secondCombo = document.getElementById("cidade");
        secondCombo.value = elem.value;
    }
</script>
<body>
    <select id="uf">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
    </select>
    <select id="cidade">
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
    </select>
</body>

vi que nesse outro tópico existe o que preciso mas não sei php
precisava fazer funcionar com o jsp e fazendo a consulta no banco certinho
Como selecionar uma opção em um <select> e carregar dados relacionados em outro?


text:
Q: Using templateRequest in angular + typescript ($templateRequest not a function) I'm building a directive which supposed to take html file, place it in dom and compile it with angular's compile
I'm getting an error:

$templateRequest is not a function

Clearly I am doing something wrong, don't know what,
This is my directive:
module Uni.Directives {

    export class uniTable implements ng.IDirective {

        public restrict: string = 'EA';

        public link: Function = (scope: ng.IScope,
            $templateRequest: ng.ITemplateRequestService,
            $compile: ng.ICompileService,
            element: ng.IAugmentedJQuery,
            attrs: ng.IAttributes) => {

           $templateRequest("template.html",false).then(function (html) {
                var template = angular.element(html);
                element.append(template);
                $compile(template)(scope);
            });
        }
    }

    angular
        .module('TModule')
        .directive('uniTable', [() => { return new Uni.Directives.uniTable() }]);

    // ******** End adding to module **********

}

A: The point here is: the link function is not part of IoC. Check this doc part:
Creating a Directive that Manipulates the DOM

In this example we will build a directive that displays the current time. Once a second, it updates the DOM to reflect the current time.
Directives that want to modify the DOM typically use the link option to register DOM listeners as well as update the DOM. It is executed after the template has been cloned and is where directive logic will be put.
link takes a function with the following signature, function link(scope, element, attrs, controller, transcludeFn) { ... }, where:

*

*scope is an Angular scope object.

*element is the jqLite-wrapped element that this directive matches.

*attrs is a hash object with key-value pairs of normalized attribute names and their corresponding attribute values.

*controller is the directive's required controller instance(s) or it's own controller (if any). The exact value depends on the
  directive's require property.

*transcludeFn is a transclude linking function pre-bound to the correct transclusion scope.

So, the way to go is - to use controller. That could use IoC and will be provided just with arguments we will ask for...

A: The second parameter to link-function is element. If you´re trying to inject $templateRequest and $compile you need to do it in the constructor:
export class uniTable implements ng.IDirective {
    constructor(private $templateRequest: ng.ITemplateRequestService, private $compile: ng.ICompileService){

    }
    public restrict: string = 'EA';

    public link: Function = (scope: ng.IScope,
        element: ng.IAugmentedJQuery,
        attrs: ng.IAttributes) => {

       this.$templateRequest("template.html",false).then(function (html) {
            var template = angular.element(html);
            element.append(template);
            $compile(template)(scope);
        });
    }
}

angular
    .module('TModule')
    .directive('uniTable', ['$templateRequest','$compile',($templateRequest,$compile) => { return new Uni.Directives.uniTable($templateRequest,$compile) }]);

I'd suggest using function when dealing with factory functions like the directive function. Following this structure:
function uniTable($templateRequest: ng.ITemplateRequestService, $compile: ng.ICompileService): ng.IDirective{
   return {
      restrict: 'EA',
      link: function(){
        $templateRequest()//doStuff
      }
   };
}
uniTable.$inject = ['$templateRequest', '$compile'];
angular.module('TModule')
.directive('uniTable', uniTable );


text:
Q: Why does ggplot remove 99% of my observations? I'm trying to show how the mean grades in advanced Swedish (SVENSKA2) has changed for students at our university over time and depending on programme. I'm using the following code:
totdata%>%
group_by(program,ADMISSIONROUND_ID)%>%
mutate(mean=mean(SVENSKA2),na.rm=T)%>%
ungroup%>%
ggplot(aes(x=ADMISSIONROUND_ID,y=mean, group=program, color=program))+geom_line()+scale_y_continuous(limits=c(0,20))

Strangely, the data removes 2458 out of 2468 rows, only keeping the onces from the "Ekonomi COOP"-programme.
There's only 13.5% missing values from SVENSKA2 so it shouldn't be that I think.
What in the earth is happening, why is this happening and how do I remedy this?
Small excerpt of data (containing ADMISSIONROUND_ID, progam and SVENSKA2):
structure(list(start_date = structure(c(15585, 15585, 15585,
15585, 15585, 15585, 15585, 15585, 15585, 15585, 15585, 15585,
15585, 15585, 15585, 15585, 15585, 15585, 15585, 15585), class = "Date"),
    ADMISSIONROUND_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("HT2012",
    "HT2013", "HT2014", "HT2015", "HT2016", "HT2017", "HT2018",
    "HT2019"), class = c("ordered", "factor")), program = c("Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom"), SVENSKA2 = c(20, 15, 15, NA, NA, 10, 15, 10, 10,
    20, 15, 15, NA, 20, 15, 20, 15, 15, 10, 15)), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"), row.names = c(NA, -20L), groups = structure(list(
    start_date = structure(15585, class = "Date"), .rows = list(
        1:20)), row.names = c(NA, -1L), class = c("tbl_df", "tbl",
"data.frame"), .drop = TRUE))

big excerpt of data(containing ADMISSIONROUND_ID, progam and SVENSKA2):
structure(list(start_date = structure(c(15585, 15585, 15585,
15585, 15585, 15585, 15585, 15585, 15585, 15585, 15585, 15585,
15585, 15585, 15585, 15585, 15585, 15585, 15585, 15949, 15949,
15949, 15949, 15949, 15949, 15949, 15949, 15949, 15949, 15949,
15949, 15949, 15949, 15949, 16313, 16313, 16313, 16313, 16313,
16313, 16313, 16313, 16313, 16313, 16677, 16677, 16677, 16677,
16677, 16677, 16677, 16677, 16677, 16677, 17041, 17041, 17041,
17041, 17041, 17041, 17041, 17041, 17041, 17041, 17041, 17041,
17041, 17041, 17041, 17041, 17041, 17041, 17041, 17405, 17405,
17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405,
17405, 17405, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
15585, 15585, 15585, 15585, 15585, 15585, 15585, 15949, 15949,
15949, 15949, 15949, 15949, 15949, 15949, 15949, 15949, 15949,
15949, 15949, 15949, 15949, 15949, 16313, 16313, 16313, 16313,
16313, 16313, 16313, 16677, 16677, 16677, 16677, 16677, 16677,
16677, 16677, 17041, 17041, 17041, 17041, 17041, 17041, 17041,
17041, 17041, 17041, 17041, 17041, 17041, 17041, 17405, 17405,
17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405,
17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
16677, 16677, 17041, 17041, 17041, 17041, 17041, 17041, 17041,
17041, 17041, 17041, 17041, 17041, 17405, 17405, 17405, 17405,
17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405,
17405, 17405, 17776, 17776, 17776, 17776, 17776, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, 16313, 16313, 16677, 16677, 16677,
17041, 17041, 17041, 17041, 17041, 17041, 17041, 17041, 17041,
17041, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405,
17405, 17405, 17405, 17405, 17405, 17405, 17405, 17405, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776, 17776,
17776, 17776, 17776, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140,
18140, 18140, 18140, 18140, 18140, 18140, 18140, 18140), class = "Date"),
    ADMISSIONROUND_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L,
    3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
    4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
    5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
    7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L,
    3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L,
    5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L,
    7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
    7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
    7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 4L, 4L, 5L, 5L,
    5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
    2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L,
    4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
    5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
    5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 3L, 3L, 4L,
    4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L,
    7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L,
    7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
    8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L), .Label = c("HT2012",
    "HT2013", "HT2014", "HT2015", "HT2016", "HT2017", "HT2018",
    "HT2019"), class = c("ordered", "factor")), SVENSKA2 = c(10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    10, 10, 10, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5,
    12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5, 12.5), program = c("Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Ekonom",
    "Ekonom", "Maklarekonom", "Ekonom", "Ekonom", "Ekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Maklarekonom", "Maklarekonom", "Ekonom", "Ekonom", "Maklarekonom",
    "Ekonom", "Ekonom", "Maklarekonom", "Maklarekonom", "Maklarekonom",
    "Ekonom", "Maklarekonom", "Ekonom", "Digitala_Medier", "Digitala_Medier",
    "Ekonom", "Maklarekonom", "Maklarekonom", "Ekonomi COOP",
    "Ekonomi COOP", "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Maklarekonom", "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Maklarekonom", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Ekonom", "Digitala_Medier",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Digitala_Medier",
    "Maklarekonom", "Digitala_Medier", "Digitala_Medier", "Maklarekonom",
    "Digitala_Medier", "Digitala_Medier", "Maklarekonom", "Ekonom",
    "Maklarekonom", "Ekonom", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Digitala_Medier", "Digitala_Medier", "Digitala_Medier",
    "Maklarekonom", "Maklarekonom", "Maklarekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom", "Ekonom",
    "Ekonom", "Ekonom", "Ekonom", "Ekonom")), class = c("grouped_df",
"tbl_df", "tbl", "data.frame"), row.names = c(NA, -500L), groups = structure(list(
    start_date = structure(c(15585, 15949, 16313, 16677, 17041,
    17405, 17776, 18140, NA), class = "Date"), .rows = list(c(1L,
    2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L,
    15L, 16L, 17L, 18L, 19L, 130L, 131L, 132L, 133L, 134L, 135L,
    136L), c(20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L,
    30L, 31L, 32L, 33L, 34L, 137L, 138L, 139L, 140L, 141L, 142L,
    143L, 144L, 145L, 146L, 147L, 148L, 149L, 150L, 151L, 152L
    ), c(35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 153L,
    154L, 155L, 156L, 157L, 158L, 159L, 425L, 426L), c(45L, 46L,
    47L, 48L, 49L, 50L, 51L, 52L, 53L, 54L, 160L, 161L, 162L,
    163L, 164L, 165L, 166L, 167L, 274L, 275L, 427L, 428L, 429L
    ), c(55L, 56L, 57L, 58L, 59L, 60L, 61L, 62L, 63L, 64L, 65L,
    66L, 67L, 68L, 69L, 70L, 71L, 72L, 73L, 168L, 169L, 170L,
    171L, 172L, 173L, 174L, 175L, 176L, 177L, 178L, 179L, 180L,
    181L, 276L, 277L, 278L, 279L, 280L, 281L, 282L, 283L, 284L,
    285L, 286L, 287L, 430L, 431L, 432L, 433L, 434L, 435L, 436L,
    437L, 438L, 439L), c(74L, 75L, 76L, 77L, 78L, 79L, 80L, 81L,
    82L, 83L, 84L, 85L, 86L, 182L, 183L, 184L, 185L, 186L, 187L,
    188L, 189L, 190L, 191L, 192L, 193L, 194L, 195L, 196L, 197L,
    198L, 199L, 200L, 201L, 288L, 289L, 290L, 291L, 292L, 293L,
    294L, 295L, 296L, 297L, 298L, 299L, 300L, 301L, 302L, 440L,
    441L, 442L, 443L, 444L, 445L, 446L, 447L, 448L, 449L, 450L,
    451L, 452L, 453L, 454L, 455L), c(87L, 88L, 89L, 90L, 91L,
    92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 101L, 102L,
    103L, 104L, 105L, 202L, 203L, 204L, 205L, 206L, 207L, 208L,
    209L, 210L, 211L, 212L, 213L, 214L, 215L, 216L, 217L, 218L,
    219L, 220L, 221L, 222L, 223L, 224L, 225L, 226L, 227L, 228L,
    229L, 230L, 231L, 232L, 233L, 234L, 235L, 236L, 237L, 303L,
    304L, 305L, 306L, 307L, 456L, 457L, 458L, 459L, 460L, 461L,
    462L, 463L, 464L, 465L, 466L, 467L, 468L, 469L, 470L, 471L,
    472L, 473L, 474L, 475L, 476L, 477L), c(106L, 107L, 108L,
    109L, 110L, 111L, 112L, 113L, 114L, 115L, 116L, 117L, 118L,
    119L, 120L, 121L, 122L, 123L, 124L, 125L, 126L, 127L, 128L,
    129L, 238L, 239L, 240L, 241L, 242L, 243L, 244L, 245L, 246L,
    247L, 248L, 249L, 250L, 251L, 252L, 253L, 254L, 255L, 256L,
    257L, 258L, 259L, 260L, 261L, 262L, 263L, 264L, 265L, 266L,
    267L, 268L, 269L, 270L, 271L, 272L, 273L, 308L, 309L, 310L,
    311L, 312L, 313L, 314L, 315L, 316L, 317L, 318L, 319L, 320L,
    321L, 322L, 323L, 324L, 325L, 326L, 327L, 328L, 329L, 330L,
    331L, 332L, 333L, 334L, 335L, 336L, 478L, 479L, 480L, 481L,
    482L, 483L, 484L, 485L, 486L, 487L, 488L, 489L, 490L, 491L,
    492L, 493L, 494L, 495L, 496L, 497L, 498L, 499L, 500L), 337:424)), row.names = c(NA,
-9L), class = c("tbl_df", "tbl", "data.frame"), .drop = TRUE))


text:
Q: How can I filter in spark sql correctly by a date range I have a problem with my date filter.
This simple query:
"select `date` from dummytesttable group by `date` order by `date`"

has the following output:
StructType(List(StructField(date,DateType,true)))
[Row(date=datetime.date(2021, 6, 14)), Row(date=datetime.date(2021, 6, 15)), Row(date=datetime.date(2021, 6, 16)), Row(date=datetime.date(2021, 6, 17)), Row(date=datetime.date(2021, 6, 18)), Row(date=datetime.date(2021, 6, 19)), Row(date=datetime.date(2021, 6, 20)), Row(date=datetime.date(2021, 6, 21)), Row(date=datetime.date(2021, 6, 22)), Row(date=datetime.date(2021, 6, 23)), Row(date=datetime.date(2021, 6, 24)), Row(date=datetime.date(2021, 6, 25)), Row(date=datetime.date(2021, 6, 26)), Row(date=datetime.date(2021, 6, 27))]

here you can see, that 27th is included
If I add the following condition,
select `date` from dummytesttable WHERE `date` between '2021-06-14' and '2021-06-27' group by `date` order by `date`

2021-06-27 is not included in the result.
If I change the condition to WHERE date between '2021-06-14' and '2021-06-28' it is again included.
I also tried '2021-06-27 23:59:59.999', but no luck.
If I convert the date again:
to_date(`date`,'yyyy-MM-dd') <= to_date('2021-06-27','yyyy-MM-dd')

Then 27th is included in the result.
If I do a date_format I get the following:
date_format(CAST(date AS TIMESTAMP), yyyy-MM-dd HH:mm:ss z)='2021-06-27 00:00:00 CEST'
How can I compare the dates correctly?

A: My solution was to cast the string to timestamps:
select `date` from dummytesttable WHERE `date` between cast('2021-06-14' as timestamp) and cast('2021-06-27' as timestamp) group by `date` order by `date`


text:
Q: Flow Mapping Lines by Magnitude
I am attempting to map the flow of remittances into Japan using the FlowMapper plugin in QGIS. When I use the Style--> Advanced--> Size Scale field--> magnitude command, the lines become so thick and varied that they are impossible to distinguish from one another (in fact my map becomes one giant block of "lines"). Does anyone have any advice on how to fix this other than manually changing the size of lines classified under equal intervals?
Is there a way to label the flow lines by country of origin so that the text is in and oriented with the flow line, not located on top (that is, once I'm able to get the flow lines to their desired thickness)?
How do I make the lines curved so they are more aesthetically pleasing?

A: I am the developer of the FlowMapper QGIS plugin and glad hearing that you utilize it.
Regarding your questions (based on v0.4 current release);
-You can define proportional width and graduated color to flow lines via the flow line symbology tool under the plugin menu. There are several (eq. interval, defined int., eq. classes, std. dev.) options and a fully manual option too
-Due to limitation of shapefiles, curves cannot be natively stored in shapefiles and FlowMapper can only create one-2-many or many-2-many straight lines between discreete nodes. There is a workaround to bend them by exporting to ESRI geodatabase format and defining geographic coord. sys., however I do not know any solution in QGIS.

*

*one reminder, flowmapper needs the interaction matrix to be square. (see sample data bundled in the installation folder or plugin zip file)

If you have any further questions, feel free to contact over the email on plugin website http://cempro.dyndns.org


text:
Q: Flutter - how to convert an image definition into an icon definition? In a Flutter app, initially many icons were implemented as png images in their 3 sizes like so:
child: new Image(
  image: new AssetImage(widget.featureNavMenu.image),
),

which expects a string
image: "assets/images/superCheckMark.png",

Now, I want to convert the children to a custom icon font (font glyphs).
However, changing to this...
child: new Icon((icon), size: 25.0,),

and trying to get it to accept this...
new Icon(MyIcons.superCheckMark, size: 30.0, color: Colors.white,),

breaks the app.
What is the correct way to get the app to accept an icon instead of image? I've actually tried many different things according to Flutter's somewhat general documentation and am stumped.

A: Instead of Image, you can use the ImageIcon class. This will give you a widget that behaves like an Icon.
ImageIcon(
     AssetImage("images/icon_more.png"),
     color: Color(0xFF3A5A98),
),

A: I was looking for this because I thought the leading element of a ListTile needed to be an Icon. So when I encountered issues creating an Icon from an Image, I got led here.
finally I found out ListTile will take an Image just fine
              ListTile(
                leading: Image.network(friend_map['picture_url']),
                title: Text(full_name),
                subtitle: Text(uuid_shorten),
              ),

I recommend you look at the parent object that required an Icon, see if it does not support Image object instead. or has a sibling widget that does..
hope this helps someone.


text:
Q: Trying to get value of url parameter with a regular expression I was trying to use a regular expression to get the value of the code parameter of the following url:
"http:\/\/instagram.com\/?code=wz6kmXaZbrDCHU8OdOW0PrshbZF60Zz8Aji4ivaG"

Unfortunately it didn't work out so I had ended up doing the following:
$jsonRedirectUriWithAuthCode = "http:\/\/instagram.com\/?code=wz6kmXaZbrDCHU8OdOW0PrshbZF60Zz8Aji4ivaG";

print "jsonRedirectUriWithAuthCode= " . $jsonRedirectUriWithAuthCode;
print "\n";
$query = parse_url($jsonRedirectUriWithAuthCode, PHP_URL_QUERY);
print "query= " . $query;
print "\n";
parse_str($query, $params);
print "params['code']= ". $params['code'];
die() ;

Which outputs:
jsonRedirectUriWithAuthCode= "http:\/\/instagram.com\/?code=wz6kmXaZbrDCHU8OdOW0PrshbZF60Zz8Aji4ivaG"
query= code=wz6kmXaZbrDCHU8OdOW0PrshbZF60Zz8Aji4ivaG"
params['code']= wz6kmXaZbrDCHU8OdOW0PrshbZF60Zz8Aji4ivaG"

The above does what I wanted to. But I'm still curious how this would be done if using a regular expression. Could someone
maybe show me how to extract the value of the code parameter with a regular expression?

A: Go with parse_url and parse_str.
To satisfy your curiosity, you can use something like:
preg_match_all('/code=(.*?)$/', $theUrl, $match);
echo $match[1][0];


text:
Q: Vault configuration in springboot application I'm working on micorservice using springboot . I have three questions here . Answers to any/all are much appreciated .Thanks in advance
Background: We need to read some key from vault during application startup and save it in variable for later use (to avoid hits on vault) . There will be TTL for this value so application should refresh and take whenever new value configured in vault.
Q1 : How to load and ensure values are loaded only once(i.e vault hit only once)
Q2  :How to get the new values whenever there is a change
Q3  : How to test locally.

A: Use guava cache to store values (assuming they are strings, but you can change it to any type) like this:
LoadingCache<String, String> vaultData = CacheBuilder.newBuilder()
   .expireAfterAccess(10, TimeUnit.MINUTES)
   .build(
       new CacheLoader<String, String>() {
         public String load(String key) throws AnyException {
           return actuallyLoadFromVault(String);
         }
       });

This way when your code will read some key from vaultData for the first time it will loaded using actuallLoadFromVault (which you need to write of cause) and after that any new access to that key via vaultData will hit the cached value that is stored in memory.
With proper configuration after 10 minutes the value will be wiped from the cache (please read https://github.com/google/guava/wiki/CachesExplained#when-does-cleanup-happen and How does Guava expire entries in its CacheBuilder? to configure that correctly).
You might need to set max cache size to limit the memory consumption. See documentation for details.


text:
Q: ¿Cómo quito unos corchetes de un imput? tengo el siguiente código:
const joinL = (l1,l2, l = []) => {
  if (isEmpty(l1) && isEmpty(l2)) {
    return []
  } else if (isEmpty(l1)) {
    return l2
  } else if (isEmpty(l2)) {
    return l1
  } else {
      return cons(l1,l2)
  }
}

console.log(joinL([],[]))
console.log(joinL([],[1, 2]))
console.log(joinL([3,5], []))
console.log(joinL([1,2,true],["FDP",3,8,2,7]))

la ultima me tira lo siguiente:
[ 1, [ 3, 8, 2, 7 ], 'FDP', 3, 8, 2, 7 ]
Y quiero quitar los corchetes del medio, alguna idea? Agradezco la ayuda.
Explicación:
first: primero de una lista.
rest: el resto de la lista (lo que sigue del primero).
isEmpty: Me dice si la lista está vacía.
Cons: Construye una lista.

A: La función flat concatena los elementos del sub-arreglo dentro del arreglo principal:

function cons(arr1, arr2){

   // combinar los arreglos

  let arrayCombinado = [ 1, [ 3, 8, 2, 7 ], 'FDP', 3, 8, 2, 7 ];

  return arrayCombinado.flat(1);
}

console.log(cons([],[]));

Referencia


text:
Q: Перемещение по карте через balloon Всем привет.
Только начал изучать API карт, возник вопрос:
Как сделать так, чтобы можно было перемещаться по карте, при нажатии на балун(как скроллинг).
Пример: Если балун с HTML контентом на помещается на карту в мобильной версии, то мне нужно как-то скроллить карту влево-вправо, чтобы посмотреть полностью содержимое балуна. Либо как организовать скроллинг по балуну?

A: В API Яндекс.Карт есть возможность настроить модель интерактивности объектов.
Таким образом можно игнорировать наличие балуна для скролла добавлением к нему опции interactivityModel. Например так:
myMap.balloon.open([51.85, 38.37], "Содержимое балуна", {
        interactivityModel: 'default#silent'
});


text:
Q: wpf page navigation in view model in my view I have a button. The button has a Relay Command, which do some action. After this action it should navigate to an other site. How can I do this. How can I navigate to this site inside my viewModel? I hope you understand what I mean.
Thanks for your help
holzleube

A: Unfortunately, the answer to that question may not be as straightforward as you'd like. I think everybody has a slightly different way of doing it, so this is just one way.
First off, we use the Prism/CAL library from Microsoft, which has this notion of "regions", which are named placeholder controls (i.e. ItemsControl, sort of). Then on all of our "pages", we take in an instance of a controller we make called a NavigationController, whose duty it is to swap out views. The NavigationController is full of methods like "GoToHome" which do things like: grab the Home ViewModel from dependency injection (or make a new instance, depending on your setup), clear out a certain region by obtaining it from the region manager, then load it with the new Home view model. Then we wire up the call in our "page"'s backing view model to call the controller.
So, in summary, it takes some plumbing. Once you've got the initial setup, it only takes a few minutes to add a new page, but there is no magical "link" because you have to know where you're going, where it loads, and how to obtain the backing viewmodel.


text:
Q: When setting MySQL schema, why use certain types? When I'm setting up a MySQL table, it asks me to define the name of the column, type of input, and length. My assumption, without having read anything about it, is that it's for minimization. Specify the smallest possible int/smallint/tinyint for your needs, and it will reduce overhead of some sort. If it's all positives, make it unsigned to double your space, etc.
What happens if I just make every field a varchar-200 characters? When/why is this bad, what will I miss out on, and when will any inefficiencies manifest themselves? 100k records?
I think about this every time I set up a DB, but I haven't built anything to scale enough where I've ever had my scheme setup inappropriately, either too "strict/small" or "loose/big". Can someone confirm that I'm making good assumptions about speed and efficiency?
Thanks!

A: Data types not only optimize storage, but how data is indexed. As your databases get bigger, it will become apparent that it's quicker to search for all the records that have a 1 in an integer field than those that have a "1" in a varchar field. This becomes especially important when you're joining data from more than one table and your database engine is having to do this sort of thing repeatedly. (Daren also rightly points out below that it's important that the types of the fields you're matching on are identical as well.)
The level at which these inefficiencies become an issue depends greatly on your hardware and your application design. We have big enough iron these days that if you're building moderate-scale apps, you may not see an appreciable difference. (Aside from feeling a little bit guilty about your database design!) But establishing good habits on small projects makes the bigger ones easier when they come along.

A: If you have two columns as varchar and put in the values 10 and 20 and add them, you'll get 1020 instead of 30 which you'd likely expect.

A: Sure, you could save everything as VARCHAR strings. But you'd be giving up a lot of functionality provided by the database engine.
You should choose the database type that most closely matches the intended use of the column. For example, using DATE or DATETIME to store dates provides you with all sorts of date/time functions that you don't get with basic VARCHAR types.
Likewise, fields used to count things or provide simple unique IDs should be INT or one of its related types. Also bear in mind that an INT occupies only 4 bytes, whereas a 9-digit string uses at least 9 bytes.
For character data, it's wise to use NVARCHAR for internationalized values that users in any locale are going to enter (esp. names and locations). If you know the text is limited to US or internal use only, VARCHAR is safe.


text:
Q: Qt - Reading file containing multiple NULL characters I have gotten a file, which contains multiple NULL charactes /0 in a line. My goal was to load the file and replace the /0 with something else, but I experience some problems doing that.
Qt stops reading the file, after it get's to the point, where the NULL character appears.
Code:
QTextStream fileContent;
QFile file(pendingFile);
if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{
    fileContent.append(file.readAll());
}

File:
Text
Text
Text /x00/x00/x00/x00/x00/x00/x00

More Text

I am currently using Qt 5.9.1 and develop with VS2017.

A: Read the file with as QDataStream
QFile file("raw.dat");
file.open(QIODevice::ReadOnly);
QDataStream fileStream(&file);

qint64 fileSize = file.size();

QByteArray data(fileSize, '\0');
fileStream.readRawData(data.data(), fileSize)

In the ByteArray you can replace all \0 elements.
Update (comments, look at underscore_d's answer):
data.replace('\0','_');
QString dataString(data);

A: The problem is not that QFile stops reading at NUL (i.e. '\0', not the NULL macro), but rather that QTextStream considers a NUL to mean end-of-string and thus stops append()ing after the first NUL it encounters.
Here is a previous thread on another site discussing something very similar, with a suggested alternative, which boils down to this:
You need to replace the NULs before feeding them into the QTextStream, as it will not pass them through. The suggestion there is to use a QDataStream. Maybe you don't need a TextStream or any Stream at all, and could just read the files into memory as binary and replace the NULs with your choice of substitute before writing out again.


text:
Q: How convert Untrust Code to Trusted Code in Meteor? I have read the documentation meteor, and the following code is running in a Trusted Code mode, it is a server code and is within a meteor methods
{multi: true} must be update the property of the all documents in the collection
brought by the query. But only updated only one document.
Why?
Next the code in server:
MyApp\imports\api\postulaciones\methods.js
export const actualizarPostVistoAgencia = new ValidatedMethod({
    name: '...',
    validate: new SimpleSchema({
        tiendaId: {...}
    }).validator(),
    run({tiendaId}) {
            const selector = {
                $and: [
                    {tiendaId: tiendaId},
                    {postVistoAgencia: false},
                    {estado: 1}
                ]};
            return Postulaciones.update(
                selector,
                {$set: {postVistoAgencia: true}},
                {multi: true}
            );
    }
});

MyApp\server\main.js
import '/imports/startup/server/index.js';

MyApp\imports\startup\server\index.js
import './security.js';
import './register-api.js';

MyApp\imports\startup\server\register-api.js
import '../../api/postulaciones/methods';
import '../../api/postulaciones/server/publish';

As you can see I import all files in register-api.js to wich will run in server.
So, Why only updates a document if my code is in Trusted Code mode and  multi: true?
The selector from update obtain data and updates only the first, but multi=true is not working (don't update all documents found).
I leave the documentation reference below:

The behavior of update differs depending on whether it is called by trusted or untrusted code. Trusted code includes server code and method code. Untrusted code includes client-side code such as event handlers and a browser's JavaScript console.
Trusted code can modify multiple documents at once by setting multi to true, and can use an arbitrary Mongo selector to find the documents to modify. It bypasses any access control rules set up by allow and deny. The number of affected documents will be returned from the update call if you don't pass a callback.
Untrusted code can only modify a single document at once, specified by its _id. The modification is allowed only after checking any applicable allow and deny rules. The number of affected documents will be returned to the callback. Untrusted code cannot perform upserts, except in insecure mode.

Please, any ideas?
Thanks for read and for your time


text:
Q: php session destroy issue in specific server I am creating 3 sessions and destroying with proper functions. However it throws weird issue to me where in Internet explorer, it doesn't destroy session, in firefox and chrome, I have to refresh the page twice. Here is the simple code I am using to check:
login.php
(This is to create sessions)

if(isset($_POST['create_session'])){
$_SESSION['user_id'] = '1';
$_SESSION['first_name'] = 'first name';
$_SESSION['last_name'] = 'last name';

echo "Session Created Successfully! Click here";
}

?>

<form method="post" action="">
    <input type="submit" value="Create Session" name="create_session">
</form>

index.php
(This is to check whether session has been created properly or not)
<?php
session_start();

echo "
";print_r($_SESSION);

echo "logout";

?>

logout.php
(This is how I destroy the session)
<?php

session_start();
session_destroy();
session_write_close();
header("location:login.php");

?>

Functions I have tried with referring stackoverlow itself are as blow:

*

*session_cache_limiter("nocache");

*session_cache_expire(0);

*session_write_close();

*ob_flush();

However none of the solution worked.
I am using cloudsites from liquid web to host above code, in case any one has faced same issue from same service provider. Their support says they use opcache engine in cloud, in case opcache is the reason, not sure about that.
It's a deadlock for me to host a project, so right solution will be really helpful.

A: try this please:
<?php
    session_start();
    session_unset();
    $_SESSION = array();
    session_destroy();
    header("Location: http://example.com");

?>

This should be enough to solve your problem.

A: If $_SESSION is used, use unset() to unregister a session variable.
This is the way:
session_start();

$_SESSION['user_id'] = '';
$_SESSION['first_name'] = '';
$_SESSION['last_name'] = '';
unset($_SESSION['user_id']);
unset($_SESSION['first_name']);
unset($_SESSION['last_name']);

header("location: /login.php");
exit;

Read the warnings and notices here:
http://php.net/manual/en/function.session-destroy.php
You do not have to call session_destroy() from usual code. Cleanup $_SESSION array rather than destroying session data.


text:
Q: Why are my two computers running linux producing different results from C code So I'm running some C code on a few different machines and on all of them except one I'm getting the same results. But on one machine, I am getting an incorrect value for Zth.
On my machine I get the correct value.  On the other machine I get 0.000 + 0.000 which is not right.  I'm guessing it has something to do with complex.h but I am not sure how to fix this.

A: Break the expression down into smaller and smaller pieces until you find the problem.
Double check your compiler command and make sure it isn't using a different set of options for the build, such as -ffast-math.

A: The floating point precision on different CPU models changes.
You should try using sizeof on float, double, long double and see if the results are the same.


text:
Q: Is it possible in C# make public virtual method private/internal in overriding class? Say we have a:
class A {
 public virtual Do(){}
}

Can we create class B that overloads A so that its Do would be private/protected?


text:
Q: how to upgrade already installed apache2 on debian (lenny) I have an debian lenny box up and running with apache2 2.11.6 (this was testing stream some month agotesting some)
Now on testing stream is 2.12.1 I want to upgrade my apache2, but not the other software on this machine.
So I think:
apt-get upgrade

.. is not an option.
How can I upgrade only single packages?

A: *

*add a line for testing to your /etc/apt/sources.list.
e.g. if you have the following sources.list already
deb http://your.favourite.mirror/debian/ stable main non-free contrib
then yank and paste it and change the copy to
deb http://your.favourite.mirror/debian/ testing main non-free contrib

*edit or create /etc/apt/preferences to assign Pinning priorities, like so

Package: *
Pin: release a=testing
Pin-Priority: 100

Package: *
Pin: release a=stable
Pin-Priority: 500

*run "apt-get update"

*install apache2 from testing (along with all required dependancies) with:
apt-get -t testing install apache2
from now on, when you run apt-get upgrade or apt-get install it will install packages from stable by default but you can override that at any time with "-t testing" to install specific packages (or even a full upgrade) from testing.
you can do the same thing with "unstable" too.  just add it with a lower priority than testing.
personally, i would use unstable instead of testing.  in my experience, testing is often more broken than unstable because there are often very long delays in getting crucial updates to migrate from unstable to testing - all it takes is one new (or duplicate) bug to be reported or a slightly new revision to be uploaded to unstable, and the automatic migration of a package from unstable to testing will be delayed for another week or two or more...which is more than enough time for yet another bug report or updated package to be uploaded to unstable to reset the delay all over again.

A: sudo apt-get install apache2

A: man dpkg

but what about dependencies ?

A: According to this page apt will try to resolve dependencies from testing if you use this format:
apt-get -t testing install package

But, if you use this other format, it will resolve dependencies from stable:
apt-get install package/testing


text:
Q: How to use a form data object to send an image from a responsive mobile site to a server I am updating a website that has a responsive mobile version. A user creates a profile that includes an image. In the browser version, all of the data including an image are uploaded. In the responsive version, all the data except the image are uploaded. It is my understanding from what I've learned on this site and others that I must use a getElementById() and a formData object to get an image from the mobile site to the server. In addition to the resources I've found in StackOverflow, I'm using code by Eric Bidelman of gist.githum.com. After many attempts, I can't get it to work. My formData code does not work, and I'm not sure how to integrate it into the existing code. I appreciate any help with these two problems.
Thanks in advance.
Here is the code I'm working with.
<form id="form" name="form" action="post.php" method="post" onsubmit="return check_inputs();" enctype="multipart/form-data"  >
             <fieldset>
                <legend>About Me</legend>

                Email:<input data-theme="a" name="email" type="text" value="<?php echo $email?>" maxlength="30" />*
                Image:<input data-theme="a" id="image" name="image" type="file"  accept="image/*" <?php echo $image?>" size="30" />

                xhr.send(FormData).html

            </fieldset>
            <fieldset>
            <input data-theme="a" data-ajax="false" name="submit" class="Submit" type="submit" value="Submit" />
            </fieldset>
</form>

post.php

//code to resize image file and send to images folder.

//code to write data to the database.

xhr.send(FormData).html

:

handle_file_upload.php
<?php
$fileName = $_FILES['image']['name'];
$fileType = $_FILES['image']['type'];
$fileContent = file_get_contents($_FILES['image']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);

$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,
));

echo $json;
?>

A: Looks like you have additional double quote.
Make it
<input data-theme="a" id="image" name="image" type="file"  accept="image/*" <?php echo $image?> size="30" />

(quotes before size= removed)
Also, why do you need the  in there?


text:
Q: perplexing things in c++ I am trying to copy an array of chars, into an other array of chars in reversed order.
This is my method:
void reversString(char* str){
    char* ptr = str;

    int i = 0;
    // getting length of str/ptr array
    while (*(ptr + i) != '\0'){
        i = i + 1;
    }

    char revStr [i];
    char * revStrChar = &revStr[0];
    int revStrPos = 0;

    cout << *(ptr + 3) << endl;

}

Here i am just trying to copy it in normal order, but if I print the last letter of the input ("abcd"), nothings happens. It prints only an empty line.
But if I delete the declaration of a new char array:
void reversString(char* str){
    char* ptr = str;

    int i = 0;
    // getting length of str/ptr array
    while (*(ptr + i) != '\0'){
        i = i + 1;
    }

    //char revStr [i];
    //char * revStrChar = &revStr[0];
    //int revStrPos = 0;

    cout << *(ptr + 3) << endl;

}

Then it prints the last letter correctly, which is "d". I do not understand how declaring a new char array influences the output!
(compiler is minGW, OS is Win10)

A: You tagged C++11 . . . why not actually do it a more modern STL way:
#include <iostream>
#include <string>
#include <algorithm>

int main()
{
   std::string str{"12345abc"};
   std::string copy = str;
   std::reverse(copy.begin(), copy.end());

   std::cout << copy << std::endl;

   return 0;
}

output:
cba54321


text:
Q: Stream intermediate operation -> IllegalStateException Well, I always thought that Java8 Stream intermediate operations don't do anything at all until a terminal operation operates on the stream.
So then why does this code throw an IllegalStateException?
Stream<Integer> s = Stream.of(1, 2, 3);
s.limit(1);
s.limit(1);

A: You've hit a common misconception about Streams. Due to their fluent API, the first instinct many developers have is that every method applied to a stream would just return it (similar, e.g., to how a StringBuilder acts - myStringBuilder.append("Stack").append(" Overflow").append(" is").append(" is awesome!").
This however is not true. The various operations indeed return a Stream, but not the same object, and the error you're getting indicates that you attempted to apply two operations on the same object, which is illegal. If you use a purely fluent form, this would work as expected:
Stream<Integer> s = Stream.of(1, 2, 3);
Integer i = s.limit(1).limit(1).findFirst().orElse(null); // returns 1;


text:
Q: How do I get values from list of object based on selected value in Wpf Updated with a simple example in the end
I have a list of objects that are rendered into a canvas. This objects holds another object that are an base class
public class FooBase()
{
}

public class Foo1 : FooBase()
{
}

public class Foo2 : FooBase()
{
   public ICollection<Bar> BarList() { get;set; }
}

public class Bar
{
   public BarIdentifier BarIdentifier {get; set;}
   public int Value1 {get; set;}
   public string Value2 {get; set; }
}

public class HolderClass()
{
   public FooBase FooClass() { get; set; }

   public int PosX {get;set;}
   public int PosY {get;set;}
}

In my Model I also have an selection of an active Bar class. This is set by using a dropdown. I also have a List of HolderClasses
public BarIdentifier SelectedBar {get;set;}

public List<ValveSystemOverviewGridContent> HolderList {get;set;}

In my markup/xaml I have this
<ItemsControl ItemsSource="{Binding HolderList}">
    <ItemsControl.ItemsPanel>
        <ItemsPanelTemplate>
            <Canvas />
        </ItemsPanelTemplate>
    </ItemsControl.ItemsPanel>
    <ItemsControl.ItemContainerStyle>
        <Style TargetType="ContentPresenter">
            <Setter Property="Canvas.Left" Value="{Binding Path=XPos, Mode=OneWay}" />
            <Setter Property="Canvas.Top" Value="{Binding Path=YPos, Mode=OneWay}" />
        </Style>
    </ItemsControl.ItemContainerStyle>
</ItemsControl>

and the datatemplates as this
<UserControl.Resources>
    <DataTemplate DataType="{x:Type entities:Foo1 }" >
        <Border BorderBrush="Black" BorderThickness="1">
            <StackPanel Orientation="Horizontal" >
                <Label Content="FooClass 1" />
            </StackPanel>
        </Border>
    </DataTemplate>
    <DataTemplate DataType="{x:Type entities:Foo2 }">
        <Border CornerRadius="4" Background="White" BorderThickness="2" BorderBrush="{DynamicResource NormalBorderBrush}" >
            <StackPanel Orientation="Vertical">
                <Label Content="Foo Class 2" />

                <Label Content="{Binding ????" />
            </StackPanel>
        </Border>
    </DataTemplate>

    <DataTemplate DataType="{x:Type entities:HolderClass }">
        <StackPanel Orientation="Horizontal"  >
            <Label Content="This is Holder Class" FontWeight="Bold" />
            <ContentControl Content="{Binding Path=FooClass}" />
        </StackPanel>
    </DataTemplate>

</UserControl.Resources>

What I would like to do in the FooBar2 datatemplate is to get one of the items in BarList that matches to the SelectedBar. This would I do normally by using
BarList.First(b => b.BarIdentifier.Id == modelView.SelectedBar.Id);

Is there any way to accomplish this filter/selection in my data template and display the Value1 and Value2 of Bar in effective way?
If I change the dropdown in main view I would like to display the Bar that matches that BarIdentifier
Update with example
As requested I tried to do a short example. Included a function GetCalcDataForCondition how to filter out the CalcData based on selected Condition.
MainWindow.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FilterSample
{
    public class CalcData
    {
        public Condition Condition { get; set; }
        public int Diameter { get; set; }
        public string Name { get; set; }
    }
    public class Condition
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
    public class BaseClass
    {
        public string Name { get; set; }
    }

    class TagClass : BaseClass
    {
    }

    class ConnectionClass : BaseClass
    {
        public List<CalcData> CalcData { get; set; }
    }

    public class Holder
    {
        public int PosX { get; set; }
        public int PosY { get; set; }

        public BaseClass Content { get; set; }
    }

    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public List<Condition> Conditions { get; set; }
        public List<Holder> Holders { get; set; }

        public int SelectedConditionId { get; set; }

        private void GenerateData()
        {
            Conditions = new List<Condition>();
            Conditions.Add(new Condition() { Id = 1, Name = "Condition 1" });
            Conditions.Add(new Condition() { Id = 2, Name = "Condition 2" });
            Conditions.Add(new Condition() { Id = 3, Name = "Condition 3" });
            Conditions.Add(new Condition() { Id = 4, Name = "Condition 4" });
            Conditions.Add(new Condition() { Id = 5, Name = "Condition 5" });

            Holders = new List<Holder>();
            Holders.Add(new Holder() { PosX = 10, PosY = 10, Content = new TagClass() { } });
            Holders.Add(new Holder() { PosX = 10, PosY = 110, Content = GenerateConnectionClass(1, Conditions) });
            Holders.Add(new Holder() { PosX = 10, PosY = 210, Content = new TagClass() { } });
            Holders.Add(new Holder() { PosX = 10, PosY = 310, Content = GenerateConnectionClass(2, Conditions) });
            Holders.Add(new Holder() { PosX = 10, PosY = 410, Content = new TagClass() { } });
        }

        private ConnectionClass GenerateConnectionClass(int index, List<Condition> conditions)
        {
            var conn = new ConnectionClass();

            conn.Name = "Connection " + index;
            conn.CalcData = new List<CalcData>();
            foreach (var c in conditions)
            {
                conn.CalcData.Add(new CalcData() { Condition = c, Name = "Calc values for condition " + c.Id, Diameter = c.Id * 100 });
            }

            return conn;
        }

        private CalcData GetCalcDataForCondition(ConnectionClass conn, Condition condition)
        {
            return conn.CalcData.First(c => c.Condition.Id == condition.Id);
        }

        public MainWindow()
        {
            GenerateData();
            SelectedConditionId = 1;
            InitializeComponent();

            DataContext = this;
        }
    }
}

MainWindow.xaml
<Window x:Class="FilterSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:FilterSample"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">

    <Window.Resources>
        <DataTemplate DataType="{x:Type local:TagClass }" >
            <Border BorderBrush="Black" BorderThickness="1">
                <StackPanel Orientation="Horizontal" >
                    <Label Content="Tag Class" />
                </StackPanel>
            </Border>
        </DataTemplate>
        <DataTemplate DataType="{x:Type local:ConnectionClass }">
            <Border CornerRadius="4" Background="White" BorderThickness="2" BorderBrush="{DynamicResource NormalBorderBrush}" >
                <StackPanel Orientation="Vertical">
                    <Label Content="Connection Class" />

                    <Label Content="HERE I WANT TO DISPLAY related CalcData.Name" />
                </StackPanel>
            </Border>
        </DataTemplate>

        <DataTemplate DataType="{x:Type local:Holder }">
            <StackPanel Orientation="Horizontal"  >
                <Label Content="This is Holder Class" FontWeight="Bold" />
                <ContentControl Content="{Binding Path=Content}" />
            </StackPanel>
        </DataTemplate>

    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <Label Content="Select condition " Height="24" />
            <ComboBox ItemsSource="{Binding Conditions}" SelectedValue="{Binding SelectedConditionId}" DisplayMemberPath="Name" SelectedValuePath="Id" Width="200" Height="24" />

        </StackPanel>

        <ItemsControl ItemsSource="{Binding Holders}" Grid.Row="1">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <Canvas />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemContainerStyle>
                <Style TargetType="ContentPresenter">
                    <Setter Property="Canvas.Left" Value="{Binding Path=PosX , Mode=OneWay}" />
                    <Setter Property="Canvas.Top" Value="{Binding Path=PosY, Mode=OneWay}" />
                </Style>
            </ItemsControl.ItemContainerStyle>
        </ItemsControl>
    </Grid>
</Window>

A: Basically, you need some way to transfer your selected condition Id to the inner data templates. My suggestion: Make the DataTemplate for Holder depend on the selected condition (move it from resources into the content as <ItemsControl.ItemTemplate>) and create a UserControl for Holder. Add a SelectedConditionId to the usercontrol and assign it:
<Window
        ...>

    <Grid x:Name="grid1">
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <Label Content="Select condition " Height="24" />
            <ComboBox x:Name="condSelector" ItemsSource="{Binding Conditions}" SelectedValue="{Binding SelectedConditionId}" DisplayMemberPath="Name" SelectedValuePath="Id" Width="200" Height="24" />
        </StackPanel>

        <ItemsControl ItemsSource="{Binding Holders}" Grid.Row="1">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <Canvas />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemContainerStyle>
                <Style TargetType="ContentPresenter">
                    <Setter Property="Canvas.Left" Value="{Binding Path=PosX , Mode=OneWay}" />
                    <Setter Property="Canvas.Top" Value="{Binding Path=PosY, Mode=OneWay}" />
                </Style>
            </ItemsControl.ItemContainerStyle>
            <!-- Here it is -->
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <local:HolderControl DataContext="{Binding}" SelectedConditionId="{Binding ElementName=condSelector,Path=SelectedValue}"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</Window>

Move most of your things into the holder control and use its SelectedConditionId with a MultiBinding to get the selected CalcData:
<UserControl
        ....
        x:Name="uc1">
    <UserControl.Resources>

        <local:SelectedCalcDataConverter x:Key="calcDataSelector"/>

        <DataTemplate DataType="{x:Type local:TagClass }" >
            <Border BorderBrush="Black" BorderThickness="1">
                <StackPanel Orientation="Horizontal" >
                    <Label Content="Tag Class" />
                </StackPanel>
            </Border>
        </DataTemplate>
        <DataTemplate DataType="{x:Type local:ConnectionClass }">
            <Border CornerRadius="4" Background="White" BorderThickness="2" BorderBrush="{DynamicResource NormalBorderBrush}" >
                <StackPanel Orientation="Vertical">
                    <StackPanel.DataContext>
                        <MultiBinding Converter="{StaticResource calcDataSelector}" Mode="OneWay">
                            <Binding Path="CalcData"/>
                            <Binding ElementName="uc1" Path="SelectedConditionId"/>
                        </MultiBinding>
                    </StackPanel.DataContext>
                    <Label Content="Connection Class" />

                    <!--Label Content="HERE I WANT TO DISPLAY related CalcData.Name" /-->
                    <Label Content="{Binding Name}"/>
                </StackPanel>
            </Border>
        </DataTemplate>

    </UserControl.Resources>
    <Grid>
        <StackPanel Orientation="Horizontal"  >
            <Label Content="This is Holder Class" FontWeight="Bold" />
            <ContentControl Content="{Binding Path=Content}" />
        </StackPanel>
    </Grid>
</UserControl>

Code behind:
public partial class HolderControl : UserControl
{
    public HolderControl()
    {
        InitializeComponent();
    }

    public int? SelectedConditionId
    {
        get { return (int?)GetValue(SelectedConditionIdProperty); }
        set { SetValue(SelectedConditionIdProperty, value); }
    }

    // Using a DependencyProperty as the backing store for SelectedConditionId.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty SelectedConditionIdProperty =
        DependencyProperty.Register("SelectedConditionId", typeof(int?), typeof(HolderControl), new FrameworkPropertyMetadata());
}

And the converter:
public class SelectedCalcDataConverter : IMultiValueConverter
{
    public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
    {
        var items = values[0] as IEnumerable<CalcData>;
        var selectedId = values[1] as int?;

        if (items != null)
        {
            var result = items.FirstOrDefault(x => x.Condition.Id == selectedId);
            return result;
        }
        return null;
    }

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}

There are other approaches to transport the selected ID around, but this one is relatively easy to understand.


text:
Q: What is the prefered approach for this? (distribution) Let's say I want to have a list of random numbers that follow a distribution. All random numbers should be between 0 and 100, and the mean is variable but doesn't change while we generate the randoms.
Behavior:

*

*The mean = 50, there's the same number of randoms on the two sides of the mean

*The mean = 25, there's more randoms on the right of the mean than there's on its left

*The mean = 75, there's more randoms on the left of the mean than there's on its right
But all the random numbers are between 0 and 100, always. I thought about normal distribution but there's no minimal or maximal value, and it's too symmetric.

A: Binomial distribution? 100 independent yes/no. Probability p for yes gives mean 100p.


text:
Q: Godaddy hosting server error I am trying to host my website in godaddy its MVC3 .net website after copying deployed version in the server i get the following error:

CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'System.Web'

Source Error:
Line 33:  <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
Line 34:    <namespaces>
Line 35:      <add namespace="System.Web.Helpers"/>
Line 36:      <add namespace="System.Web.Mvc"/>
Line 37:      <add namespace="System.Web.Mvc.Ajax"/>

Any suggestions?

A: Make sure that the System.Web.Helpers assembly is registered in the <assemblies> section:
<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </assemblies>
</compilation>

Also contact your hosting provider to ensure that he has ASP.NET MVC 3 installed and that those assemblies are available in the GAC. If this is not the case you may try to bin deploy your ASP.NET MVC 3 application.


text:
Q: MySQL JOIN query with only one of several specific values I have tables with one to many relationship.
rental
------
id
book_date

prices
------
rental_id
type_id
value

A normal JOIN query would give results
select * from rental a join prices b on a.id = b.rental_id;

id book_date  rental_id  type_id  value

1, 2016-10-04,  1,        8,       200
1, 2016-10-04,  1,       10,       300
2, 2016-10-04,  2,        8,       250
3, 2016-10-04,  3,        8,       200
3, 2016-10-04,  3,       10,       300

what I want is, if price record has type_id = 10, then take that row; if it doesn't, it's to take the row with type_id =8. The result I want:
1    2016-10-04    1    10    300
2    2016-10-04    2     8    250
3    2016-10-04    3    10    300

I have this query but it seems not to work on my case:
select * from rental a
join prices b
on a.id = b.rental_id and
      ( if(b.type_id = 10, b.type_id = 10, b.type_id = 8) )
ORDER BY a.id DESC LIMIT 20

A:
if price record has type_id = 10 then it's only join with type_id 10, if doesn't it's join with type_id =8

This logic can be enforced by choosing the record with the maximum type_id for every rental_id.  If so, then you can simply add a third join condition which will restrict the result set to only records matching this extra condition:
SELECT a.*, b.*
FROM rental a
INNER JOIN prices b
    ON a.id = b.rental_id
INNER JOIN
(
    SELECT rental_id,
           CASE WHEN MAX(CASE WHEN type_id = 10 THEN 1 END) = 1 THEN 10
                WHEN MAX(CASE WHEN type_id = 8 THEN 1 END)  = 1 THEN 8
                ELSE MAX(type_id)
           END AS type_id
    FROM prices
    GROUP BY rental_id
) c
    ON b.rental_id = c.rental_id AND
       b.type_id   = c.type_id

Follow the link below for a running demo:
SQLFiddle

A:
what I want is, if price record has type_id = 10 then it's only join
  with type_id 10, if doesn't it's join with type_id =8

This means that the record with type_id 8 is to be discarded if there is
another record with type_id 10. That "another" calls for another JOIN, a LEFT JOIN actually since the record to be compared might not exist:
SELECT a.*, b.* FROM rental a
JOIN prices b ON (a.id = b.rental_id)
LEFT JOIN prices check ON (a.id = check.rental_id AND check.type_id = 10)

WHERE b.type_id = 10 OR (b.type_id = 8 AND check.type_id IS NULL)

This means that the JOIN will get all type 8's and type 10's; then the LEFT JOIN will make it so the type 8's are taken only if there is no corresponding type 10:
       1 10 10
       2 8  10      # discarded
       2 10 10
       3 8  NULL
       4 15 NULL    # discarded
       4 8  NULL

ID 1 has only a 10 record, both query retrieve it, and it is accepted. ID 2 has both, so the 8-10 record is discarded because b type is 8, but c type is not NULL. ID 3 has only an 8 record, so the 10-seeking LEFT JOIN returns NULL, which fits the second part of the OR. ID 4 has type_ids 8 and 15, and the 15 one is discarded by both parts of the OR.


text:
Q: From RDD of array of arrays into dataframe After doing some operation, I got a rdd (like following one) of array(any)  where all the value are of type Int expect 3,8 and 13 are of type string.
Array[Array[Any]] = Array(Array(1, 2, 3, 4, 5), Array(6, 7, 8, 9, 10), Array(11, 12, 13, 14, 15))

Use following code for your reference:
var exp = sc.parallelize(Array(Array(1,2,"3",4,5),Array(6,7,"8",9,10),Array(11,12,"13",14,15)))

Now I am trying to create a dataframe from this array using case class where columns name and case class is following:
case class specialchar(alpha:Int,beta:Int,gamma:String,theta:Int,zeta:Int)

I need help how we can iterate through the rdd of Array[Array[Any]] and store in dataframe. Thanks in Advance.

A: Udf's to handle Any.
def toInt(x: Any): Option[Int] = x match {
  case i: Int => Some(i)
  case _ => None
}

def toStr(x: Any): Option[String] = x match {
  case i: String => Some(i)
  case _ => None
}

Case classes and converting Array to Df.
var exp = sc.parallelize(Array(Array(1,2,"3",4,5),Array(6,7,"8",9,10),Array(11,12,"13",14,15)))
case class specialchar(alpha:Int,beta:Int,gamma:String,theta:Int,zeta:Int)

var specialCharDf = Seq.empty[specialchar].toDF

exp.collect().foreach(x => {
    val a:Int = toInt(x(0)).getOrElse(1)
    val b:Int = toInt(x(1)).getOrElse(1)
    val c:String = toStr(x(2)).getOrElse("1")
    val d:Int = toInt(x(3)).getOrElse(1)
    val e:Int = toInt(x(4)).getOrElse(1)

    println(a, b, c, d, e)

    val specialcharTempDf =  Seq(specialchar(a,b,c,d,e)).toDF
    specialCharDf = specialcharTempDf.union(specialCharDf)
})

specialCharDf.printSchema() //follows schema desired.

EDIT EDIT EDIT -- akhil mentioned that at the end, they should all be in integers. The new solution is below:
    var exp = sc.parallelize(Array(Array(1,2,"3",4,5),Array(6,7,"8",9,10),Array(11,12,"13",14,15)))
    case class specialchar(alpha:Int,beta:Int,gamma:Int,theta:Int,zeta:Int)

    var specialCharDf = Seq.empty[specialchar].toDF

exp.collect().foreach(x => {
    val a:Int = toInt(x(0)).getOrElse(1)
    val b:Int = toInt(x(1)).getOrElse(1)
    val c:String = toStr(x(2)).getOrElse("1")
    val f = c.toInt
    val d:Int = toInt(x(3)).getOrElse(1)
    val e:Int = toInt(x(4)).getOrElse(1)

    println(a, b, f, d, e)

    val specialcharTempDf =  Seq(specialchar(a,b,f,d,e)).toDF
    specialCharDf = specialcharTempDf.union(specialCharDf)
})

specialCharDf.printSchema() //follows schema desired.


text:
Q: What do I need to use the DatePicker class in Wicket 1.4.10? Im using Netbeans 7.1, Wicket 1.4.10 with Wicket extension 1.4.10.
I want to use the datePicker, but Netbeans are not able to identify DatePicker as a class. I have searched the library and cant find it ither. Do I need to add som aditional libraries to be able to use the datePicker component? And if so, will I need to install it in som way? The extension I use now is just added usng the tools-librarymanager. Is this the correct way/installation?

A: You should add the wicket-datetime dependency to your project.
    ...
    <dependency>
        <groupId>org.apache.wicket</groupId>
        <artifactId>wicket-datetime</artifactId>
        <version>${wicket.version}</version>
    </dependency>
    ...

A: If the project is about to be started it's much easier using Apache Maven. Here's a page on how to create a Wicket archetype. Then, just open it from NetBeans. If still needed add the dependency to wicket-datetime as @magomi has explained.


text:
Q: Leer bloque de texto de un archivo Tengo un problema, quiero leer todo los SELECT de un archivo. Deben estar todos separados los SELECT.

Los SELECT están separados todos por un espacio.
Todos los SELECT deben ser almacenados en un ARRAY o en un IEnumerable.
Algo así quiero hacer, pero que me lea todos los SELECT:
public static string[] LeeArchivo()
        {
              return File.ReadAllLines(rutaArchivo)
                .TakeWhile(s => !string.IsNullOrWhiteSpace(s))
                .ToArray();
        }

¿Hay alguna manera de solucionarlo?
Saludos

A: Una manera muy simple que tienes de hacer esto es la siguiente:
List<string> listaSQL = new List<string>();
using (StreamReader rd = new StreamReader(rutaArchivo))
{
    string SQL = "";
    while (!rd.EndOfStream) //Mientras no llegue al final del documento seguimos en el bucle
    {
        string linea = rd.ReadLine(); //Leemos la linea actual
        if (string.IsNullOrEmpty(linea)) //Si la linea esta vacía entonces añadimos el contenido en la Lista porque ya pasa a la siguiente query
        {
            listaSQL.Add(SQL);
            SQL = "";
        }
        else //Sino seguimos construyendo la query
        {
            SQL += linea;
        }
    }
    //Al salir del bucle añadimos la ultima query
    listaSQL.Add(SQL);
}
string[] sArray = listaSQL.ToArray(); //Lo pasamos a Array

De esta manera vas construyendo las querys SQL linea por linea y cada vez que detecta un blanco añade la query que estabas construyendo a la lista y empieza a construir una nueva.

A: Si cada select está exactamente escrito en una línea de texto:
 List<string> selects = new List<string>();
 string line = "";
 new System.IO.StreamReader(@"c:\RutaArchivo.txt");
 while((line = file.ReadLine()) != null)
 {
      if(line.StartWith("SELECT"))
      {
           selects.Add(line);
      }
 }

 file.Close();
 string[] array = selects.ToArray();

con tu codigo
             return File.ReadAllLines(rutaArchivo)
            .TakeWhile(s => s.StartWith("SELECT"))
            .ToArray();

Multi lInea
 List<string> selects = new List<string>();
 new System.IO.StreamReader(@"c:\RutaArchivo.txt");
 string line = "";
 while((line = file.ReadLine()))
 {
      if(line.StartWith("SELECT"))
      {
           string select = "";
           while(line != "")
           {
               if(line = file.ReadLine())
               {
                    select +=line +"\n";

               }
           }
           selects.Add(select);
      }
 }

 file.Close();
 string[] array = selects.ToArray();

no se como hacer eso en lamda...


text:
Q: How to code parameters for a MTF strategy v5 pine script I am currently doing a multi time frame MA indicator but encountered a problem when turning it into a strategy so I can use my brute force optimiser. The strategy uses 4hr MA's on the 5 or 15 minutes depending on the currency/commodity.
I did not code in any parameters on the indicator therefore cannot optimise it automatically and have to do it manually.
Below is my code if someone can guide me through what to write, it would be very appreciated
indexHighTf = barstate.isrealtime ? 1 : 0
indexCurrTf = barstate.isrealtime ? 0 : 1

x_timeframe = request.security(symbol=syminfo.tickerid, timeframe='240', expression=close[indexHighTf])[indexCurrTf]

y_timeframe = request.security(symbol=syminfo.tickerid, timeframe='48', expression=close[indexHighTf])[indexCurrTf]

plot(x_timeframe, color=color.new(color.blue,0))
plot(y_timeframe, color=color.new(color.purple, 0))

goLong() => ta.crossover(y_timeframe, x_timeframe)
goShort() => ta.crossunder(y_timeframe, x_timeframe)


text:
Q: How to call Activity from a menu item in Android? I'm attempting to call startActivity(myIntent) from the click of a menu button but my application crashes at that point.
The same startActivity call works fine from a regular button click, so, I assume the menu button is missing information about the context? Or maybe I'm totally off the mark here.
So... what's the correct way to have a menu item take me to a specific Activity?
I've revised my code based on the initial set of advice.  Still crashing in the same place. The debugger doesn't enter the exception clause, the app just dies.
[EDITED WITH CODE SNIPPET]
public boolean onCreateOptionsMenu(Menu menu) {
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.menu, menu);
  return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
   try{
    switch (item.getItemId()) {
    case R.id.menuItemLang:
        startActivity(new Intent("com.my.project.SETTINGS"));
        return true;
    default:
        return super.onOptionsItemSelected(item);
    }
   }catch(Exception e){
      log(e);
   }
}

A: First option
You have to override onOptionsItemSelected method in your Activity, which is called when user clicks on the item in Options menu. In the method you can check what item has been clicked.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
    case R.id.menu_item1:
        Intent intent = new Intent(this, ActivityForItemOne.class);
        this.startActivity(intent);
        break;
    case R.id.menu_item2:
        // another startActivity, this is for item with id "menu_item2"
        break;
    default:
        return super.onOptionsItemSelected(item);
    }

    return true;
}

There is also onContextItemSelected method which works similary, but for Context menu (I'm not sure, what menu you mean).
More information at http://developer.android.com/guide/topics/ui/menus.html
EDIT:
Second option
I think the first option is easier, but from your code I see, that you want to start activity as an action (because of String parameter in Intent constructor). To do this, you need to specify an action in your AndroidManifest.xml. So, if I would start activity ActivityForItemOne (from previous example) the <application> element in AndroidManifest.xml would look like this:
<application ...>
    ...

    <activity android:label="Activity For First Item" android:name=".ActivityForItemOne">
        <intent-filter>
            <action android:name="my.app.ITEMONE" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
</application>

And the Intent will be:
Intent intent = new Intent("my.app.ITEMONE");

The my.app. is package of your application. It's not necessary to use your application package, but it's recommended for uniqueness of actions.
More information at:
Class Intent - Action and Category constants
Action element
Intents and Intent Filters
Hope this solve your problem.

A: More optimice:
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case R.id.item1:
            return true;
        case R.id.item2:
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}

A: if There have 2 Class
1 MainActivity
2 Welcome
then you need to go from
welcom>MainActivity
@Override
    public boolean onCreateOptionsMenu(Menu menu) {
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.logout:
            Intent intent = new Intent(this, MainActivity.class);
            this.startActivity(intent);
            break;
        case R.id.settings:
            // another startActivity, this is for item with id "menu_item2"
            break;
        default:
            return super.onOptionsItemSelected(item);
    }

    return true;
}


text:
Q: VS 2017 Team Explorer - No Repositories Available I have a new Team Foundation Server that we are hosting - Version 16.131.28226.3. It is over an SSL connection and has a valid certificate.
I have created a new Team Project named "Test".
The project source control type is Git.
In Visual Studio 2017 - 15.9.4 Team Explorer, I can clone this git repo under Local Git Repositories. And I have successfully added and pushed to the server.
However, if I try to connect to this new Team Foundation Server - Manage Connections, Connect To a Project, Add TFS Server; when I add the TFS server, there is an exclamation icon next to and if I hover on the server name it says

No Repositories Available

when selected, the Connect button is disabled. In the screenshot below, the second highlighted server is the one in question:

So the Local Repo is not associated with the Team Repo, thus I can't assign Work Items to my checkins, etc..
I have explicitly added myself as a User to the Project, I don't know what else to do.  Any advice?

A: My issue was - on the server, Team Foundation Server Administrative Console, the Public URL was incorrect. Our public URL had changed to a full domain name with https and the public url was still set to the old http LAN address.

Bounty Edit:
This actually worked! I checked TfsMgmt.exe and had specified only https://MachineName for the Public URL.

I edited it and specified the Fully Qualified Domain Name, ignored an error when clicking the test link, then I restarted the TFS Server(s) including the SQL.
Ps I previously had to add the certificate, add a trusted URL: https://stackoverflow.com/a/43036526/495455 and I also added the TFS Server into Windows Credentials Manager with my username/password.

A: This happened to me a few days back when I am into a new project we use VSTS. The admin need to provide the permissions to you access the repo. If permission is given we need to make sure we are on the right URL and the branch you are permitted.

finally, Crosscheck

*

*You have permission to the repo

*You are on the correct branch

*URL is correct

*If nothing works Go and inform your admin


text:
Q: Arduino 16x2 LCD Stays Blank I am using an Arduino Mega with a 16x2 LCD. When I start the Arduino the LCD flashes white and sometimes random lines will show up and gradually fade out. The backlight is on, however, so the LCD is not inverted. At first I thought the Arduino was not getting enough power because I am using a Raspberry Pi to program it, but plugging in a 6V battery pack did not change the result. I tried plugging in a different 16x2 LCD to check if the one I was using is broken, but again, the result was the same. I have triple-checked my connections, adjusted the potentiometer, and fiddled around with where the LCD was connected on the breadboard in case some of the pins were broken, but to no avail.
Does the LCD have a problem with Arduino Mega boards? Or am I just unfortunate enough to have two broken LCDs?
Code:
#include <LiquidCrystal.h>
#define led_pin 22
#define buzzer_pin 7

LiquidCrystal lcd(12,11,5,4,3,2);

void setup() {
  pinMode(led_pin, OUTPUT);
  pinMode(buzzer_pin, OUTPUT);

  lcd.begin(16,2);

  digitalWrite(led_pin, HIGH);
  tone(buzzer_pin, 1000, 500);
  delay(500);
  digitalWrite(led_pin, LOW);

  lcd.print("LCD Test");
}

void loop() {
}

EDIT
I moved the LCD and wiring back to the other side of the breadboard and it did not change the output. I'm starting the think that the LCDs are just simply broken  because the LCDs will randomly flash and fade unevenly. I found that these LCDs can be easily fried by incorrectly adjusting the potentiometer.

A: *

*Make sure that you solder headers to the lcd, then press the headers into your breadboard and connect to arduino with jumper wires. Just resting the LCD on the headers without solder or jabbing the lcd pin holes with jumper wires don't make reliable connections. You WILL see random stuff

*Make sure you connect the LCD correctly. If you did, you wouldn't have got any problems. Post a picture.

*Make sure the pins you used in the code match pins you connected to the LCD.

*Best way to get arduino help is on arduino forum.

A: Specifically which LCD are you using?
Do you have datasheets for the exact LCD you are using so you can confirm you have the correct wiring and supply voltages?
If you still have no luck, you may want to try a LCD module that has a serial, i2c, or spi interface.
They are much easier to use than HD44780 parallel modules (im assuming this is what you have).
An example source of such modules is https://www.crystalfontz.com/c/character-lcd-displays/interface/24


text:
Q: load page with detailsview in insert mode I have an ASP.Net page with a gridview and detailsview...when I click an item in the gridview, the detailsview is displayed and populated with the details of the selected user from the gridview....currently, when I first load the page and no user is selected from the gridview, I don't see the detailsview...how can I display the detailsview in insert mode when the page is loaded...before a user has been selected from the gridview?

A: DetailsView1.DefaultMode = DetailsViewMode.Insert;