text:
Q: Copy Most Recent Date's row values where gaps in dates exist I am creating a report in Tableau for a new product that captures metrics such as previous applications pending, new apps end of day pending etc. In order to do this, I need a a snapshot of the end of day status for each application each day.  A decision was made above my pay grade to only capture a rolling seven day delta of the data.  So, what happens is an application that has not had a status change in the previous seven days stops appearing in the DB until something new happens which allows for gaps in dates and throws my numbers off in my report. What I need is a snapshot for each day for each application, so when there is a date gap, I want to grab the most recent previous day's record and insert to fill in the gaps between the two dates. Also, I join to a credit score table and we sometimes pull all three bureaus, sometimes two, sometimes one so there could be up to three rows per application per day.
I have looked on this site for similar issues which I seem some similar issues however none are an exact match to what I am trying to accomplish and I honestly do not know where to start.  Will a correlated subquery accomplish what I need?  I provided some code below to show what the data looks like currently.
drop table if exists #date
drop table if exists #test

create table #date
    (
        calendar_date date
    )

insert into #date
values
('2019-08-07'),
('2019-08-08'),
('2019-08-09'),
('2019-08-10'),
('2019-08-11'),
('2019-08-12')

create table #test
    (
        id int,
        period_date date,
        decision_status varchar(20),
        credit_score int,
        expired_flag bit
    )

insert into #test (id,period_date,decision_status,credit_score,expired_flag)
values
(1,'2019-08-08','declined',635,null),
(1,'2019-08-08','declined',642,null),
(1,'2019-08-09','declined',635,null),
(1,'2019-08-09','declined',642,null),
(1,'2019-08-10','declined',635,null),
(1,'2019-08-10','declined',642,null),
(1,'2019-08-11','declined',635,null),
(1,'2019-08-11','declined',642,null),
(1,'2019-08-12','declined',635,null),
(1,'2019-08-12','declined',642,null),
(2,'2019-08-08','review',656,null),
(2,'2019-08-08','review',648,null),
(2,'2019-08-09','review',656,null),
(2,'2019-08-09','review',648,null),
(2,'2019-08-12','review',656,null),
(2,'2019-08-12','review',648,null),
(3,'2019-08-08','preapproved',678,null),
(3,'2019-08-08','preapproved',689,null),
(3,'2019-08-08','preapproved',693,null),
(3,'2019-08-09','preapproved',678,null),
(3,'2019-08-09','preapproved',689,null),
(3,'2019-08-09','preapproved',693,null),
(3,'2019-08-11','preapproved',678,1),
(3,'2019-08-11','preapproved',689,1),
(3,'2019-08-11','preapproved',693,1),
(3,'2019-08-12','preapproved',678,1),
(3,'2019-08-12','preapproved',689,1),
(3,'2019-08-12','preapproved',693,1),
(4,'2019-08-08','onboarded',725,null),
(4,'2019-08-09','onboarded',725,null),
(4,'2019-08-10','onboarded',725,null),
(5,'2019-08-08','approved',685,null),
(5,'2019-08-08','approved',675,null),
(5,'2019-08-09','approved',685,null),
(5,'2019-08-09','approved',675,null),
(5,'2019-08-12','approved',685,1),
(5,'2019-08-12','approved',675,1)

And the query:
select id, calendar_date, period_date, decision_status, credit_score, expired_flag
from #date join
     #test
     on calendar_date=dateadd(day,-1,period_date)
order by id, calendar_date

I just need each application to show for each day.

A: You may just need a left join: just need a left join:
select t.id, d.calendar_date, t.period_date, t.decision_status, t.credit_score, t.expired_flag
from #date d left join
     #test t
     on d.calendar_date = dateadd(day, -1, t.period_date)
order by id, d.calendar_date;

If by "application" you mean the id in #test, then use cross join to generate the rows and a outer apply to fill in the values:
select t.id, d.calendar_date, t.period_date, t.decision_status, t.credit_score, t.expired_flag
from #date d cross join
     (select distinct id from #test) i outer apply
     (select top (1) t.*
      from #test t
      where t.id = i.id and t.date <= d.date
      order by t.date desc
     ) t

A: Update:
After receiving the reply from Gordon, which gave me some inspiration and set me in the right direction, and conducting some additional research, I appear to have found a solution that is working.  I wanted to share the solution here in case anyone else runs across this problem.  I am posting the code below:
drop table if exists #date
drop table if exists #test
drop table if exists #test1
drop table if exists #row_num

create table #date
    (
        calendar_date date
    )

insert into #date
values
('2019-08-07'),
('2019-08-08'),
('2019-08-09'),
('2019-08-10'),
('2019-08-11')

create table #test
    (
        id int,
        period_date date,
        decision_status varchar(20),
        credit_score int,
        expired_flag bit
    )

insert into #test (id,period_date,decision_status,credit_score,expired_flag)
values
(1,'2019-08-08','declined',635,null),
(1,'2019-08-08','declined',642,null),
(1,'2019-08-09','declined',635,null),
(1,'2019-08-09','declined',642,null),
(1,'2019-08-10','declined',635,null),
(1,'2019-08-10','declined',642,null),
(1,'2019-08-11','declined',635,null),
(1,'2019-08-11','declined',642,null),
(1,'2019-08-12','declined',635,null),
(1,'2019-08-12','declined',642,null),
(2,'2019-08-08','review',656,null),
(2,'2019-08-08','review',648,null),
(2,'2019-08-09','review',656,null),
(2,'2019-08-09','review',648,null),
(2,'2019-08-12','review',656,null),
(2,'2019-08-12','review',648,null),
(3,'2019-08-08','preapproved',678,null),
(3,'2019-08-08','preapproved',689,null),
(3,'2019-08-08','preapproved',693,null),
(3,'2019-08-09','preapproved',678,null),
(3,'2019-08-09','preapproved',689,null),
(3,'2019-08-09','preapproved',693,null),
(3,'2019-08-11','preapproved',678,1),
(3,'2019-08-11','preapproved',689,1),
(3,'2019-08-11','preapproved',693,1),
(3,'2019-08-12','preapproved',678,1),
(3,'2019-08-12','preapproved',689,1),
(3,'2019-08-12','preapproved',693,1),
(4,'2019-08-08','onboarded',725,null),
(4,'2019-08-09','onboarded',725,null),
(4,'2019-08-10','onboarded',725,null),
(5,'2019-08-08','approved',685,null),
(5,'2019-08-08','approved',675,null),
(5,'2019-08-09','approved',685,null),
(5,'2019-08-09','approved',675,null),
(5,'2019-08-12','approved',685,1),
(5,'2019-08-12','approved',675,1)

select id,calendar_date,decision_status,credit_score,expired_flag
      ,ROW_NUMBER() over(partition by id,calendar_date order by calendar_date) as row_id
      ,cast(ROW_NUMBER() over(partition by id,calendar_date order by calendar_date) as char(1)) as row_num
into #test1
from #date
join #test
    on calendar_date=dateadd(day,-1,period_date)
order by id,calendar_date

create table #row_num
    (
        row_id int,
        row_num char(1)
    )

insert into #row_num
values
(1,'1'),
(2,'2'),
(3,'3')

select i.id
       ,d.calendar_date
       ,coalesce(t.decision_status,t1.decision_status) as decision_status
       ,coalesce(t.credit_score,t1.credit_score) as credit_score
       ,coalesce(t.expired_flag,t1.expired_flag) as expired_flag
from #date d
     cross join
     (select distinct id
      from #test1 ) i
     cross join #row_num r
     left join #test1 t
        on t.id=i.id
        and t.row_id=r.row_id
        and t.calendar_date=d.calendar_date
     join
     (select id,row_id,decision_status,credit_score,expired_flag
             ,calendar_date as start_date
             ,lead(calendar_date,1,dateadd(day,1,(select max(calendar_date) from #date)))
              over (partition by id,row_id order by calendar_date) as end_date
      from #test1
     ) t1
        on t1.id=i.id
        and t1.row_id=r.row_id
        and d.calendar_date>=t1.start_date
        and d.calendar_date<t1.end_date
order by i.id,d.calendar_date,r.row_id

This gives me what I am looking for, all the daily records for each application for each day.


text:
Q: Accessing Nested Java HashMap Key Value pairs Okay, I'm SURE there is a better way to do this.  What I have is a nested HashMap which contains any number of K,V pairs as imported from an XML file.  However for each Key in the parent HashMap, there is only 1 child K,V pair.
I'm wondering if there is a "better" way to code this than what I have.
HashMap<String, HashMap<String,String>> mQueues = Global.mQueues;
for (Map.Entry<String, HashMap<String, String>> eQueues: mQueues.entrySet()) {
    // There is only 1 K,V for each key iterated above
    // This is where I am wondering if there is a better way to do this.  e.g. directly access the Key and Value of the subordinate HashMap
    for (Map.Entry<String, String> sQueue : eQueues.getValue().entrySet()) {
        strGroup = sQueue.getKey();
        strPattern = sQueue.getValue();
    }
    if (eQueues.getKey() == "Default") {
        strDefGroup = strGroup;
    } else {
        if (strParts[0] == strPattern) {
            msg_grp = strGroup;
            boolPatternMatch = true;
        }
    }

A: Well, you could do this:
Map<String, String> m = eQueues.getValue();
if (!m.isEmpty()) {
    Map.Entry<String, String> e = m.entrySet().iterator().next();
}

That's not really any better than what you're doing, though. It seems like instead of a Map<String, Map<String, String>> you should have a Map<String, Map.Entry<String, String>>, or even just create a small object to describe whatever it is that's in your single entry:
public class GroupPattern {
    private String group;
    private String pattern;
    public GroupPattern(String group, String pattern) {
        this.group   = group;
        this.pattern = pattern;
    }
    public String getGroup() {
        return group;
    }
    public String getPattern() {
        return pattern;
    }
    // Optionally setters, if it makes sense.
    public void setGroup(String group) {
        this.group = group;
    }
    public void setPattern(String pattern) {
        this.pattern = pattern;
    }
}

Then you have a Map<String, GroupPattern>.

Also, what Elliott is saying in the comments is right. See e.g. How do I compare strings in Java?

redpajama_set_name: RedPajamaStackExchange


text:
Q: Função com três parâmetros em Javascript. Erro ao retornar "true" ou "false". O que fazer? Preciso de um código que sinalize TRUE quando a idade for >= 21 anos e a altura >= 180 cm. O código que fiz não está funcionando e não sei qual erro apresenta. =/
function maiorAlto(nome , idade , altura) {
    if (idade >=21 && altura >= 181) {
        return true
    } else {
        return false
    }
}

 maiorAlto(['Laura', 21, 187])

A: Você está passando os parâmetros de forma incorreta na chamada da função.
O correto seria:
maiorAlto('Laura', 21, 187);

Nesse código também está faltando ponto-e-vírgula para indicar o final das instruções.
Agora, caso você queira passar um array como parâmetro, então a função é que está escrita de forma errada. Deveria ser:
function maiorAlto(pessoa) {
    if (pessoa[1] >=21 && pessoa[2] >= 181) {
        return true;
    } else {
        return false;
    }
}

Observe que como o retorno esperado é booleano (true ou false) você não precisa utilizar if. Poderia fazer dessa forma:
function maiorAlto(pessoa) {
        return (pessoa[1] >=21 && pessoa[2] >= 181);
}


text:
Q: MPI: what happens if send and receive sizes don't match? Receive count is smaller than the matching send count?
Send count is smaller than the matching receive count?

A: The MPI Standard 2.2 describes this in section 3.2.4. Basically the receive buffer (i.e., the count of the receiver) must be at least as big as the message being received (i.e., the count of the sender). Otherwise an overflow error occurs. If the count of the sender is less than the count of the receiver then the remaining elements of the receive buffer are unmodified.


text:
Q: T-SQL Child/Parent query I have 4 tables, group, membership, person and attribute.
Group
GroupID
GroupName
ParentGroupID

Membership
PersonID
GroupID

Person
PersonID
Name

Attribute
AttributeID
GroupID
Value

Attributes are assigned to groups, groups have people assigned via the membership table.
I would like to display all the attributes relating to a particular person.
I am having no troubles doing this for someone in a group with no parent, but some of the groups have nesting 2 or 3 levels deep. My attempts to use the CTE approach haven't yielded any results thus far.
Example Result
Person.Name Membership.GroupID  Group.GroupID  Group.ParentGroupID  Attribute.Value
Fred        3                   1              NULL                 'Attribute for Top level group'
Fred        3                   2              1                    'Attribute for a sub group'
Fred        3                   3              2                    'Attribute for third sub group'
Fred        5                   4              1                    'Attribute for Top level group - this is a duplicate?'
Fred        5                   5              4                    'Attribute for second sub group'

Hope that is clear enough. Fred is a member of Group 3, whichhas a parent group of 2, which in turn has a parent group of 3 - then display each of attributes that match for each group (inner join on the Group.ID against Attribute.GroupID would achieve this)
edit - Just to add a note, each Person can be a member of multiple groups.

A: DDL + DML
create table groups (groupid int, groupname varchar(10), parentgroupid int)
insert groups select 1, 'A', null;
insert groups select 2, 'B', null;
insert groups select 3, 'C', 1;
insert groups select 4, 'D', null;
insert groups select 5, 'E', null;
create table membership (personid int, groupid int);
insert membership select 1, 3;
insert membership select 1, 4;
create table person (personid int, name varchar(100));
insert person select 1, 'Jim';
create table Attribute(AttributeID int, GroupID int, Value varchar(100));
insert Attribute select 1, 1, 'At1-1';
insert Attribute select 2, 1, 'At1-2';
insert Attribute select 3, 2, 'At2-1';
insert Attribute select 4, 3, 'At3-1';
insert Attribute select 5, 4, 'At4-1';

The QUERY
;with tmp as (
    select groupid membership_groupid, groupid
    from membership
    where personid = 1
    union all
    select membership_groupid, g.parentgroupid
    from groups g
    join tmp on tmp.groupid = g.groupid
)
select p.name, membership_groupid, g.groupid, g.parentgroupid, a.value
from person p
join tmp t on 1=1
join groups g on g.groupid = t.groupid
join attribute a on a.groupid = t.groupid
where p.personid = 1

And if it's possible for a person to be a member of both GROUP A and GROUP A's parent, you will need to break the tie to show the attribute only ONCE.
;with tmp as (
    select groupid membership_groupid, groupid
    from membership
    where personid = 1
    union all
    select membership_groupid, g.parentgroupid
    from groups g
    join tmp on tmp.groupid = g.groupid
)
select p.name, membership_groupid, g.groupid, g.parentgroupid, a.value
from person p
join (select *, rn=row_number() over (partition by groupid
                                      order by case when membership_groupid=groupid then 1
                                                    else 2 end,
                                               membership_groupid)
      from tmp) t on t.rn=1
join groups g on g.groupid = t.groupid
join attribute a on a.groupid = t.groupid
where p.personid = 1


text:
Q: Moving Data from .DLL to an .Exe in C# I'm rewriting a C# DLL to send a file directly to a c# Executable residing on the same machine.
Currently this DLL basically saves the File to a Location then the Executable Application picks that file up using a File.ReadAllText() command.
What would be the best way to achieve functionality? Currently I have been researching AnonymousPipes in C# and have been able to easily transfer text files over the pipe to the executable. What if I want to transfer an image file for example?
So far I have attempting using C# AnonymousPipes.
                using (PipeStream pipeClient =
                    new AnonymousPipeClientStream(PipeDirection.In, args[0]))
                {
                    pipeClient.ReadMode = PipeTransmissionMode.Message;
                    using (StreamReader sr = new StreamReader(pipeClient))
                    {
                        string myData = sr.ReadToEnd();
                    }
                }
            }

Edit: For some extra clarification this DLL opens the executable.

A: Below is what I came up with to communicate between the DLL and the Executable. I'm very new to concept of Pipe Components and do not know if this is the best way to perform this task or even a poor practice for that matter.
Process pipeClient = new Process();

pipeClient.StartInfo.FileName = @"Executable Location";

using (AnonymousPipeServerStream pipeServer =
    new AnonymousPipeServerStream(PipeDirection.Out,
    HandleInheritability.Inheritable))
{
pipeServer.ReadMode = PipeTransmissionMode.Byte;
// Pass the client process a handle to the server.
pipeClient.StartInfo.Arguments =
        pipeServer.GetClientHandleAsString();
    pipeClient.StartInfo.UseShellExecute = false;
    pipeClient.Start();
    pipeServer.DisposeLocalCopyOfClientHandle();
    try
    {
    Byte[] bytes = File.ReadAllBytes(@"Location of Data File");
    string file = Convert.ToBase64String(bytes);

    // Read user input and send that to the client process.
    using (StreamWriter sw = new StreamWriter(pipeServer))
    {
        sw.Flush();
        sw.Write(file);
        pipeServer.WaitForPipeDrain();
    }
}
    // Catch the IOException that is raised if the pipe is broken
    // or disconnected.
    catch (IOException a)
    {
    }
}
pipeClient.WaitForExit();
pipeClient.Close();

Edit: Fixed a typo


text:
Q: MySQL error: ERROR: Error 1822: Failed to add the foreign key constraint. Missing index for constraint I found a couple of threads with the same error but they didn't work for me. I am trying to add foriegn keys to the database but it keeps throwing me this error even after I add the primary key to the reference table
CREATE TABLE `Company_list` (
  `Company_id` int NOT NULL AUTO_INCREMENT,
  `CompanyName` text,
  `Total_Employees` int DEFAULT NULL,
  `Company_Emails` text,
  `Money_owe` float DEFAULT NULL,
  PRIMARY KEY (`Company_id`),
  UNIQUE KEY `Company_id_UNIQUE` (`Company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `Employee_Location_Log` (
  `location_log_id` int NOT NULL AUTO_INCREMENT,
  `EntryDate` datetime DEFAULT NULL,
  `ExitDate` datetime DEFAULT NULL,
  `Facility_list_Facility_ID` int NOT NULL,
  PRIMARY KEY (`location_log_id`,`Facility_list_Facility_ID`),
  KEY `fk_Employee_Location_Log_Facility_list1_idx` (`Facility_list_Facility_ID`),
  CONSTRAINT `fk_Employee_Location_Log_Facility_list1` FOREIGN KEY (`Facility_list_Facility_ID`) REFERENCES `Facility_list` (`Facility_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `Employees` (
  `Employee_id` int NOT NULL AUTO_INCREMENT,
  `FirstName` text,
  `LastName` text,
  `Email_Address` text,
  `Password` text,
  `Company_list_Company_id` int NOT NULL,
  PRIMARY KEY (`Employee_id`,`Company_list_Company_id`),
  UNIQUE KEY `Employee_id_UNIQUE` (`Employee_id`),
  KEY `fk_Employees_Company_list_idx` (`Company_list_Company_id`),
  CONSTRAINT `fk_Employees_Company_list` FOREIGN KEY (`Company_list_Company_id`) REFERENCES `Company_list` (`Company_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `Facility_Bookings` (
  `Booked_Entry_Date` datetime NOT NULL,
  `Booked_Exit_Date` datetime NOT NULL,
  `Facility_list_Facility_ID` int NOT NULL,
  `Facility_list_Facility_ID1` int NOT NULL,
  `Booking_id` int NOT NULL,
  PRIMARY KEY (`Booking_id`,`Booked_Entry_Date`,`Booked_Exit_Date`),
  KEY `fk_Facility_Bookings_Facility_list1_idx` (`Facility_list_Facility_ID`),
  KEY `fk_Facility_Bookings_Facility_list2_idx` (`Facility_list_Facility_ID1`),
  CONSTRAINT `fk_Facility_Bookings_Facility_list1` FOREIGN KEY (`Facility_list_Facility_ID`) REFERENCES `Facility_list` (`Facility_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_Facility_Bookings_Facility_list2` FOREIGN KEY (`Facility_list_Facility_ID1`) REFERENCES `Facility_list` (`Facility_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `Facility_employee_access` (
  `Facility_list_Facility_ID` int NOT NULL,
  `Employees_Employee_id` int NOT NULL,
  `Facility_Bookings_Booked_Entry_Date` datetime NOT NULL,
  `Facility_Bookings_Booked_Exit_Date` datetime NOT NULL,
  KEY `fk_Facility_employee_access_Facility_list1_idx` (`Facility_list_Facility_ID`),
  KEY `fk_Facility_employee_access_Facility_Bookings2_idx` (`Facility_Bookings_Booked_Entry_Date`,`Facility_Bookings_Booked_Exit_Date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `Facility_list` (
  `Facility_ID` int NOT NULL AUTO_INCREMENT,
  `FacilityType` text,
  PRIMARY KEY (`Facility_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

I am altering 2 tables in my database:
 ALTER TABLE `Companies`.`Facility_employee_access`
        ADD CONSTRAINT `fk_Facility_employee_access_Facility_list1`
          FOREIGN KEY (`Facility_list_Facility_ID`)
          REFERENCES `Companies`.`Facility_list` (`Facility_ID`)
          ON DELETE CASCADE
          ON UPDATE CASCADE,
        ADD CONSTRAINT `fk_Facility_employee_access_Employees1`
          FOREIGN KEY (`Employees_Employee_id`)
          REFERENCES `Companies`.`Employees` (`Employee_id`)
          ON DELETE CASCADE
          ON UPDATE CASCADE,
        ADD CONSTRAINT `fk_Facility_employee_access_Facility_Bookings2`
          FOREIGN KEY (`Facility_Bookings_Booked_Entry_Date` , `Facility_Bookings_Booked_Exit_Date`)
          REFERENCES `Companies`.`Facility_Bookings` (`Booked_Entry_Date` , `Booked_Exit_Date`)
          ON DELETE CASCADE
          ON UPDATE CASCADE

AND:
ALTER TABLE `Companies`.`Facility_Bookings`
ADD INDEX `fk_Facility_Bookings_Facility_list1_idx` (`Facility_list_Facility_ID` ASC) VISIBLE,
ADD INDEX `fk_Facility_Bookings_Facility_list2_idx` (`Facility_list_Facility_ID1` ASC) VISIBLE,
DROP INDEX `fk_Facility_Bookings_Facility_list2_idx` ,
DROP INDEX `fk_Facility_Bookings_Facility_list1_idx` ;
;

When I run the query I get this error:
ERROR: Error 1822: Failed to add the foreign key constraint. Missing index for constraint 'fk_Facility_employee_access_Facility_Bookings2' in the referenced table 'Facility_Bookings'
I think the issue is this part of the query:
  ADD CONSTRAINT `fk_Facility_employee_access_Facility_Bookings2`
          FOREIGN KEY (`Facility_Bookings_Booked_Entry_Date` , `Facility_Bookings_Booked_Exit_Date`)
          REFERENCES `Companies`.`Facility_Bookings` (`Booked_Entry_Date` , `Booked_Exit_Date`)
          ON DELETE CASCADE
          ON UPDATE CASCADE

But I already have a primary key inside the "Facility_Bookings table" So i'm confused to why I am still getting this error when I try to add the forgien key.

A: You refer to Facility_list table in the foreign key definitions in Employee_Location_Log and Facility_Bookings tables. But this table not exists yet, its creation code is posessed below.
So you must simply reorder the tables creation and put Facility_list creation code before Employee_Location_Log and Facility_Bookings creation code. In this case all tables are created successfully.
https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=d237c114320ca867e65b33e136cacddc


text:
Q: How add a image (frame) in other image using laravel I am wanting to add a frame to an image using Laravel.
Example, I have two images, one image is the png frame, and the other is the original image.
I need to put the two together to form an image with a frame.
This is my frame.

My goal is that I can put a frame on any image.

A: You can easily compose images together using JavaScript with merge-image package.
With the following images:

*

*/body.png

*

*/eyes.png

*

*/mouth.png

You can do:
import mergeImages from 'merge-images';

mergeImages(['/body.png', '/eyes.png', '/mouth.png'])
  .then(b64 => document.querySelector('img').src = b64);
  // data:image/png;base64,iVBORw0KGgoAA...

And that would update the img element to show this image:

A: Well this is more about the css and html question
 BTW you can do this in border-image property in css here the example
Html
<img src="https://images.unsplash.com/photo-1565013161635-98472edee347?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80" width="50%" id="borderimg1">

CSS
#borderimg1 {
  border: 10px solid transparent;
  padding: 15px;
  -webkit-border-image: url(border.png) 30 round; /* Safari 3.1-5 */
  -o-border-image: url(border.png) 30 round; /* Opera 11-12.1 */
  border-image: url(border.png) 30 round;
}

**Result**

A: There are some excellent client-side approaches already in this thread, but if you want to do this server-side, the popular Intervention Image package is handy and designed to work with Laravel.
You'll have to do some resizing math if your images vary in size, but fundamentally you want the insert method to overlay one over the other.
// create new Intervention Image
$img = Image::make('public/foo.jpg');

// paste another image
$img->insert('public/bar.png');

// create a new Image instance for inserting
$watermark = Image::make('public/watermark.png');
$img->insert($watermark, 'center');

// insert watermark at bottom-right corner with 10px offset
$img->insert('public/watermark.png', 'bottom-right', 10, 10);


text:
Q: Any idea how to get rid of printing cursor, totally stuck When printing the cursor is now being both displayed and printed. And you can't get rid of it even by clicking outside the editor - its still visible when printing!
Its easy to reproduce, just File/Print.
Thank you!
Mark

A: Recently, I was developing a webapp where we were creating labels in HTML, editing them in TinyMCE, and then printing them. I came across the same issue. Until they issue a patch for this, you can try the following work around.
In your TinyMCE init use a BeforeExecCommand callback to place the caret into a hidden div, in my case, I'm putting it in the first div:
tinymce.init({...,
  init_instance_callback: function (editor) {
    editor.on('BeforeExecCommand', function (e) {
      if (e.command === 'mcePrint') {
        editor.selection.setCursorLocation(editor.dom.select('div')[0]);
      }
    });
  }
});

Then create a div at the beginning of the HTML, something like...

When you click 'Print' the callback will fire and place the cursor into this hidden div thus removing it from view and the printed content should look as you would expect.
We could improve the UX here by putting the caret back where it was before printing. I won't go into much detail, but if you wanted to do that you can save the caret position in a variable and then use another callback in the TinyMCE init:
tinymce.init({...,
  init_instance_callback: function (editor) {
    editor.on('BeforeExecCommand', function (e) {
      if (e.command === 'mcePrint') {
        // Before the print executes, do this...
        // Your code to save the current caret position goes here

        // Move caret to hidden div
        editor.selection.setCursorLocation(editor.dom.select('div')[0]);
      }
    });
  }
  init_instance_callback: function (editor) {
    editor.on('ExecCommand', function (e) {
      if (e.command === 'mcePrint') {
        // After the print executes, do this...
        // Your code to move the caret back to its original position goes here
      }
    });
  }
});

A: I just wanted to let everyone know that this is a bug in TinyMCE. A quick fix is to add the following styles to the content css:
@media print {
    .mce-visual-caret {
        display: none;
    }
}

Here is a working example https://fiddle.tiny.cloud/baaaab


text:
Q: Android Studio SDK JUnit tests not working I'm fairly new to android studio and I'm trying to do some JUnit tests on an app that I'm making. But I keep getting this error:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:testDebug'.
> Test filtering is not supported for given version of JUnit. Please upgrade JUnit version to at least 4.6.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11.791 secs
Test filtering is not supported for given version of JUnit. Please upgrade JUnit version to at least 4.6.

How can I fix this?

A: Follow below steps-

*

*Go to Menu RUN-> Run Configuration

*And Add the Test Runner as per below screenshot

*Run with "MyTest" runner


text:
Q: Python regex, matching absolute beginning of string, nothing else before I have the following regex:
(\b)(con)

This matches:
.con
con

But I only want to match the second line 'con' not '.con'.
This then needs expanding to enable me to match alternative words (CON|COM1|LPT1) etc. And in those scenarios, I need to match the dot afterwards and potentially file extensions too. I have regex for these. I am attempting to understand one part of the expression at a time.
How can I tighten what I've got to give me the specific match I require?

A: Edit:
You can use non-delimited capture groups and re.match (which is anchored to the start of the string):
>>> from re import match
>>> strs = ["CON.txt", "LPT1.png", "COM1.html", "CON.jpg"]
>>> # This can be customized to what you want
>>> # Right now, it is matching .jpg and .png files with the proper beginning
>>> [x for x in strs if match("(?:CON|COM1|LPT1)\.(?:jpg|png)$", x)]
['LPT1.png', 'CON.jpg']
>>>

Below is a breakdown of the Regex pattern:
(?:CON|COM1|LPT1)  # CON, COM1, or LPT1
\.                 # A period
(?:jpg|png)        # jpg or png
$                  # The end of the string

You may also want to add (?i) to the start of the pattern in order to have case-insensitive matching.

A: ^ matches start of a string:
^con

would work.


text:
Q: How to remove a column from a numpy array if the column has a specified element? (Python) For example, I have a 2D Array with dimensions 3 x 3.
 [1 2 7

  4 5 6

  7 8 9]

And I want to remove all columns which contain 7 - so first and third, outputting a 3 x 1 matrix of:
 [2

  5

  8]

How do I go about doing this in python? I want to apply it to a large matrix of n x n dimensions.
Thank You!

A: #Creating array
x = np.array([[1, 2, 7],[4,5, 6],[7,8,9]])

x
Out[]:
array([[1, 2, 7],
       [4, 5, 6],
       [7, 8, 9]])

#Deletion
a = np.delete(x,np.where(x ==7),axis=1)

a
Out[]:
array([[2],
       [5],
       [8]])

A: numpy can help you do this!
import numpy as np
a = np.array([1, 2, 7, 4, 5, 6, 7, 8, 9]).reshape((3, 3))
b = np.array([col for col in a.T if 7 not in col]).T
print(b)

A: If you don't actually want to delete parts of the original matrix, you can just use boolean indexing:
a
Out[]:
array([[1, 2, 7],
       [4, 5, 6],
       [7, 8, 9]])

a[:, ~np.any(a == 7, axis = 1)]

Out[]:
array([[2],
       [5],
       [8]])

A: you can use argwhere for column index and then delete.
import numpy
a = numpy.array([[5, 2, 4],[1, 7, 3],[1, 2, 7]])
index = numpy.argwhere(a==7)
y = numpy.delete(a, index, axis=1)
print(y)

A: A = np.array([[1,2,7],[4,5,6],[7,8,9]])
for i in range(0,3):
...  B=A[:,i]
...  if(7 in B):
...   A=np.delete(A,i,1)


text:
Q: Making a variable from if statement global While encoding JSON, I´m unwrapping stuff with an if let statement, but I'd like to make a variable globally available
do {
  if
    let json = try JSONSerialization.jsonObject(with: data) as? [String: String],
    let jsonIsExistant = json["isExistant"]
  {
    // Here I would like to make jsonIsExistant globally available
  }

Is this even possible?  If it isn't, I could make an if statement inside of this one, but I don't think that would be clever or even possible.

A: delclare jsonIsExistant at the place you want it. If you are making an iOS App, than above viewDidLoad() create the variable
var jsonIsExistant: String?

then at this point use it
do {
    if let json = try JSONSerialization.jsonObject(with: data) as? [String: String],
    let tempJsonIsExistant = json["isExistant"] {
        jsonIsExistant = tempJsonIsExistant
    }
}

This could be rewritten like so though
do {
    if let json = try JSONSerialization.jsonObject(with: data) as? [String: String] {
        jsonIsExistant = json["isExistant"]
    }
} catch {
    //handle error
}

If handled the second way, then you have to check if jsonIsExistant is nil before use, or you could unwrap it immediately with a ! if you are sure it will always have a field "isExistant" every time that it succeeds at becoming json.

A: It doesn't make sense to expose a variable to the outside of an if let statement:

if let json = ... {
    //This code will only run if json is non-nil.
    //That means json is guaranteed to be non-nil here.
}
//This code will run whether or not json is nil.
//There is not a guarantee json is non-nil.

You have a few other options, depending on what you want to do:

You can put the rest of the code that needs json inside of the if.  You said you didn't know if nested if statements are  "clever or even possible."  They're possible, and programmers use them quite often.  You also could extract it into another function:
func doStuff(json: String) {
    //do stuff with json
}

//...
if let json = ... {
    doStuff(json: json)
}

If you know that JSON shouldn't ever be nil, you can force-unwrap it with !:
let json = ...!

You can make the variable global using a guard statement.  The code inside of the guard will only run if json is nil.  The body of a guard statement must exit the enclosing scope, for example by throwing an error, by returning from the function, or with a labeled break:
//throw an error
do {
    guard let json = ... else {
        throw SomeError
    }
    //do stuff with json -- it's guaranteed to be non-nil here.
}

//return from the function
guard let json = ... else {
    return
}
//do stuff with json -- it's guaranteed to be non-nil here.

//labeled break
doStuff: do {
    guard let json = ... else {
        break doStuff
    }
    //do stuff with json -- it's guaranteed to be non-nil here.
}


text:
Q: JSF Custom font with CSS I am trying to add a custom font to my _template.html, but it is not rendering the font, only plain text. I tried the solution found here, but did not solve my problem.
My custom font file is in WebContent/Resources/fonts/HelveticaNeueLTStd-LtEx.otf
My CSS file is in WebContent/Resources/css/Font.css
Font.css:
@font-face {
font-family: "Martinelli Logo";

src: url("#{resource['fonts/HelveticaNeueLTStd-LtEx.otf']}");
font-weight: normal;
font-style: normal;

body{
font-family: "Martinelli Logo";
}
}

Obs.: I already tried with only src: url('fonts/HelveticaNeueLTStd-LtEx.otf');, with no luck.
_template.xtml:
<h:body>
<h:outputStylesheet library="css" name="css/Font.css" />
Hello World in custom font!
<h:body />

A: The final solution: apparently my browser (Chrome) was loading old cached CSS, so I wasn't being able to see the updates I was developing on my styles. Just cleaned Chrome's cache and everything was working perfectly. I just need to figure how to change that behavior on the browser, since I don't want to clean it for every change on my CSS.
Biggest facepalm ever.
EDIT:
Found the solution by opening Devtools -> Settings -> Checked Disable cache (while DevTool is open)
Now I can edit my CSS and refresh the page to normally see the results. Thanks.


text:
Q: Why is my javascript not working I've just moved an old site from another web developer. He was using CMS made simple. I did copy the full site and included the database. Everything is working fine, except one thing: the photo slider.
The old (working website)
http://hobosolutions.nl
The new (not fully working website)
http://www.cristofoli-design.com/HOBO3/
I'm not really into CMS Made Simple.. but I found some code:
{cms_jquery}
<script src="scripts/jquery.backstretch.min.js"></script>

<script type="text/javascript">
var url = "/images/bg/";
var images = [
url+"bg1.jpg",
url+"bg2.jpg"
];

$( document ).ready(function() {
$.backstretch(images, {
        fade: 750,
        duration: 4000
    });
});
</script>
{literal}
<script>
  (function(i,s,o,g,r,a,m).   {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

 ga('create', 'UA-33493693-14', 'auto');
 ga('send', 'pageview');

  {/literal}
{global_content name='fonts'}

I used this code in both sites.. But only one site will work.
Somebody have an solution?

A: The problem resides in the fact that you used the same path to image folder in both sites.
In the first site your path to image folder is valid, in fact

website_url/images/bg/bg1.jpg

is a valid path to the image called "bg1.jpg".
But in the other site, the images array contains invalid paths. I.e. the first element of the array has url

/images/bg/bg1

, and the corresponding global url is http://www.cristofoli-design.com/images/bg/bg1.jpg, and as you can see it'a 404 page.
My guess is that in the second site files are in different positions.
Keeping guessing, I think you placed the "images" folder inside the "HOBO3" folder, which is not what you are accessing right now.


text:
Q: Appending Textbox.text stops autocomplete in VB .Net VS 2015 I have a textbox which has an autocomplete selection populated with a database query (names of individuals). I have created a keyboard using buttons as this will be a touch screen application (without using the system on-screen keyboard of Windows).
When I change or append the textbox.text value programatically (in response to my "keyboard" buttons being pressed) the autocomplete doesn't work. However using my physical keyboard it does.
How can I make the textbox start to autocomplete when the .text value is changed?


text:
Q: Filtering sub-objects in PowerShell using Select-Object Many of you are familiar with the calculated properties possible in PowerShell, to raise a property needed from a sub-object level.
I.e. if I'd like to know the owner of a process (i.e. notepad) as a non-admim I could fetch the process with WMI and query for the owner object using
Get-WmiObject -ClassName Win32_Process -Filter "name='notepad.exe'" |
  Select-Object -Property ProcessId,Name,@{label='User'; expression={$_.GetOwner().User}}

ProcessId Name        User
--------- ----        ----
    16028 notepad.exe user01
     1972 notepad.exe user01

I could proceed with more properties as Domain
@{l='Domain'; e={$_.GetOwner().Domain}}

ProcessId Name        Domain
--------- ----        ------
    16028 notepad.exe domain01
     1972 notepad.exe domain01

I could also opt to keep the Owner object as is, if I need
@{l='Owner'; e={$_.GetOwner()}}

ProcessId Name        Owner
--------- ----        -----
    16028 notepad.exe System.Management.ManagementBaseObject
     1972 notepad.exe System.Management.ManagementBaseObject

However, how do I go about to keep the object structure while only getting select subobjects?
ProcessId Name        Owner
--------- ----        -----
    16028 notepad.exe @{User=user01; Domain=domain01}
     1972 notepad.exe @{User=user01; Domain=domain01}

A: The answer (which is often the case with PowerShell) is really simple. Calculated properties uses a code block {my-code} that can contain any valid commands. So just use Select-Object within the expression.
Get-WmiObject -ClassName Win32_Process -Filter "name='notepad.exe'" |
  Select ProcessId,Name,@{l='Owner'; e={$_.GetOwner() | Select User,Domain}}


text:
Q: How to color auto-echoed charactes in curses? curses.echo() prints every hit key. I know how to change color when using addstr, but I don't know how to print some auto-echoed letters in red.

A: That's done by setting the window attributes with a color-pair for red, e.g., using window.attron(attr)


text:
Q: How to setup a bridge as an AWS EC2 instance I am trying to setup a test environment on my Amazon cloud for a proxy component.
The proxy component is an ec2 instance that all of network traffic pass through it.
client
 _____
|_____| ------|
              |
client        |         proxy
 _____        |        _______
|_____| ------| ----> |_______| -----> Internet
              |
client        |
 _____        |
|_____| ------|

I created a VPC but I can't understand how can I "connect" each client to pass its traffic to the proxy.
EDIT
The way our proxy works is by using a bridge interface (br0) that transfer the network data between eth0 to eth1 and back.
EC2-instance  |
 _____        |
|_____| ------|
              |          proxy (bridge)
EC2-instance  |         (Also ec2-user)
 _____        |        __________________        ________________
|_____| ------|       |__________________| ---->|Internet Gateway|---> Internet
              |------>|        br0       |
EC2-instance  |
 _____        |
|_____| ------|

Does this kind of network topology configuration is also configurable in AWS?

A: Here is my understand for your question, if you can provide detail or need some adjusts, let me know.

*

*assign all application clients to private subnets, don't assign
internet gateway to its route table.

*create a NAT instance, you can use exist Amazon NAT AMI image to create
it.

Community AMIs (amzn-ami-vpc-nat-pv-2015.03.0.x86_64-ebs - ami-XXXXXX)

*

*auto-sign public IP address or assign EIP(elastic IP) on this NAT instance

*Disabling Source/Destination Checks on this NAT instance.

*Updating the Main Route Table with this new NAT instance on the private subnets that you assign the IP addresses to your application clients.

*now all clients should be fine to access Internet directly via this NAT instance.
refer Setting up the NAT Instance
Of course, you can create a custom nat instance in AWS VPC
If you need something like squid proxy server, please give detail


text:
Q: Error connect Visual Studio Code - ForceCode (Extension) I have been using VisualStuio without problems, but today it does not allow me to connect to my sandbox. I can't do Retrieve or Save (I used the Developer Console again).
Do you know what can happen?

Thanks

A: ETIMEDOUT is a network error. It is more likely that this has to do with changes in your local network environment, such as firewalls, proxies, or overall connectivity through your ISP, than with Salesforce.


text:
Q: Matlab automatically converts array type from complex to double I have an annoying situation I cannot resolve with my google-fu so turning to our resident matlab experts for help.
Suppose I run the following code
AA = ones(10,2) + j*ones(10,2)
whos

for i=1:10
    AA(i,:) = i + sqrt(i);
end
AA
whos

I get the following output
   AA =

   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i
   1.0000 + 1.0000i   1.0000 + 1.0000i

  Name       Size            Bytes  Class     Attributes

  AA        10x2               320  double    complex

AA =

    2.0000    2.0000
    3.4142    3.4142
    4.7321    4.7321
    6.0000    6.0000
    7.2361    7.2361
    8.4495    8.4495
    9.6458    9.6458
   10.8284   10.8284
   12.0000   12.0000
   13.1623   13.1623

  Name       Size            Bytes  Class     Attributes

  AA        10x2               160  double
  i          1x1                 8  double

Why is matlab automatically converting the array I specifically requested to be complex to a double?
This is a problem because I have a function that returns values that may or may not be complex and I want to be able to store both.
The exact same behavior happens even when I try AA(i,:) = complex(i + sqrt(i));
Edit: I should have specified that if the first call to my function returns a real value then what happens above happens as well. But if the first return of the function is complex (irregardless of what the rest of the loop returns) the array will stay complex..

A: Because you are fill it with non complex values it by reusing the variable, try this:
AA = ones(10,2) + j*ones(10,2)
whos

for i=1:10
    AA(i,2) = i + sqrt(i);
end
AA
whos


text:
Q: GeoServer + ImagePyramid: Request is empty where data exists I have set up an image pyramid based on 5 levels of tiling. The data is served using the ImagePyramid plugin for GeoServer. When I do a layer preview the data is visualized just like I expect them to be. But when I zoom in a couple of levels, I get a white tile in return.
The GeoServer log tells me the following:

2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - Reading mosaic from file:/e:/GeoServer/data_dir/data/pyramid/2/2.shp
  2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - Highest res 0.6400000000000005 0.6400000000000005
  2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - The computed CropBoundingBox ReferencedEnvelope[534687.5 : 535156.25, 6225625.0 : 6226093.75] Doesn't intersect the coverage BoundingBox > ReferencedEnvelope[-1.0 : 0.0, -1.0 : 0.0] resulting in an empty request
  2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - RequestedBBox empty or null
  2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - Request is empty: RasterLayerRequest description:
      RequestedBBox=ReferencedEnvelope[534687.5 : 535156.25, 6225625.0 : 6226093.75]
                                   RequestedRasterArea=java.awt.Rectangle[x=0,y=0,width=768,height=768]
      RequestedGridToWorld=PARAM_MT["Affine",
          PARAMETER["num_row", 3],
          PARAMETER["num_col", 3],
          PARAMETER["elt_0_0", 0.6103515625],
          PARAMETER["elt_0_2", 534687.8051757812],
          PARAMETER["elt_1_1", -0.6103515625],
          PARAMETER["elt_1_2", 6226093.444824219]]
      ReadType=JAI_IMAGEREAD
  2012-05-14 08:07:07,495 DEBUG [gce.imagemosaic] - The response is empty. ==> returning a null GridCoverage

If I zoom in a couple of levels further, I get data again.
The extent of the data is [530000, 6220000, 540000, 6230000] and the projection EPSG:25832, which the GeoServer admin interface agree on.
Then what could be the reason for GeoServer to look inside the BBOX [-1, 0, -1, 0], when my data is inside the requested map?


text:
Q: I accidentally clicked deny on port open prompt I'm developing an app that binds to a local address, on a random port when it runs. I used to get a prompt to allow connections but I accidentally pressed Enter key and I think I denied the terminal app. Where should I look to fix this?

A: System Preferences > Security & Privacy > Firewall > Firewall Options


text:
Q: Creating a new repository for TeXLive that contains custom, different packages In short/tldr:
I want to create a repository containing custom packages that can be accessed and installed by TeXLive. Any complete documentation on TeXLive-compatible repositories?
Edit I'm looking to make something like MetaTeX (Here is the MetaTeX repo)

So I want to make a TeXLive repository because of reasons. That is : I want to add a repo to TeXLive that can be used for installation. As the TeXLive guide says, some pinning and such has to be done, but I'm fine with this.
The problem is that I do not know how to build up the TeXLive part of the directory structure. I do understand the TeX Directory Structure and how you'd use tar.xz-files to create this structure internally.
I've done quite a bit of research, but I still have the following questions.

*

*What is the minimum requirements of the repository hosting setup? (E.g. directory listings)

*The TeXLive Guide 2018 barely mentiones the tlpdb-file. Is this required for the repo, or only at the clients installation? If applicable: Where can I find the syntax for this?

*I notice that all .tar.xs-files containing packages, also contain a tlpkg/tlpobj/packagename.tlpobj, which seem to be the same syntax as the tlpdb-file. It seem to contain multiple key-value pairs (see example below). I'd also like to know what key-values are required and which are optional, and some documentation for this?

Can anyone help with this?

Here is the .tar.xz info for exercisebank.
Directory structure (tar -tf exercisebank.tar.xz):
tex/latex/exercisebank/exercisebank.sty
tlpkg/tlpobj/exercisebank.tlpobj

Here is the exercisebank.tlpobj
name exercisebank
category Package
revision 47483
shortdesc Creating and managing exercises, and reusing them as composed sets
relocated 1
longdesc This package makes it easier to maintain and edit your exercise
longdesc sets. Exercises are saved as separate files containing part
longdesc problems. These files can be used to make sets, and you can
longdesc cherry-pick or exclude certain part problems as you see fit.
runfiles size=5
 RELOC/tex/latex/exercisebank/exercisebank.sty
catalogue-ctan /macros/latex/contrib/exercisebank
catalogue-date 2018-04-28 21:34:27 +0200
catalogue-license lppl1.3c
catalogue-topics exercise exam doc-templ
catalogue-version 0.1.4

Possibly helpful links:

*

*TeXLive Guide - 2018

*CTAN TDS-guidelines

*Tug/TeXLive - Multiple repositories
From comments

*

*A repo at texlive, that seems to be some sort of tlcontrib repo example?

*hmenkes texlive-luatex-dev repo, which also relates to his answer here


text:
Q: Create a weekly line chart (52 labels) I would like to make a chart with label for each week in the year. I will be passing in an array with 52 data points. These data points are processed by the back-end so it is fine, however, typing out 52 labels is impractical.
var data = {
labels: ["Week 1", "Week 2", "week 3", ..., "week 52"],
datasets: [
    {
        data: [52 data points in here],
    }
]
};

How should I go about making these 52 labels?

A: One option which may not be the best or most efficient is you could create a loop to make the Labels, if they will all have the same format:
var labels = [];
for(var i=1; i<=52; i++) {
    labels.push("Week " + i);
}


text:
Q: Registrar and Host are Different - Should I move DNS? Registrar and Host are different companies.  Obviously A, MX, CNAME, TXT, SRV should be changed.  However, should I move Domain Name Servers to the Host or keep them with the Registrar?
Thanks.

A: You could really go with either.  If you like the registrar's DNS management tools, then you can continue to use them.  If you feel the hosting company's offerings are better or that their DNS service is more reliable, you can switch to them.
One thing to consider is that if you ever switch hosting companies, having your DNS managed by your registrar might make things easier.  If you're quite happy with your hosting then this is not as big an issue.
Compare things like online tools, reliability and uptime, APIs for scripting and making automated updates, stuff like that.  If you ever decide to run your own nameserver, you might want to see if either company offers slave DNS service, too.
There's not really a "right" answer, so you just want to compare the options which are important to you.


text:
Q: When is an array automatically initialized to it's default datatype? When does the compiler auto initialize the arrays to it's default datatype?
I know that in this example the arrays will be initialized, except the fact that i was expecting (reading here) \0 value for char instead in my console there were spaces (at least this is what i think because there is nothing).
#define MAX_LENGTH 25

// Array global
int vector[MAX_LENGTH];
char vector_char[MAX_LENGTH];

int main()
{
    //Print int array
    for(int i = 0;i < MAX_LENGTH; i++)
    {
        cout << vector[i] << " ";                        // All outputs 0
    }
    cout << endl;

    //Print char array and output text to see that there is
    //Something printed
    cout << "start";
    for(int i = 0;i < MAX_LENGTH; i++)
    {
        cout << vector_char[i] << " ";                     //All outputs...
    }
    cout <<"end"<< endl;
    return 0;
}

Other two situations that I've encountered is when an array is internal to a function (where the values will be "garbage" or "impredictibile" E.g:
int main()
{
    int internal_vector[MAX_LENGTH];

    for(int i = 0;i < MAX_LENGTH; i++)
    {
        cout << internal_vector[i] << " ";
    }
    cout << endl;
    return 0;
}

and another one when the array is a member of a class (if you try anything you will have the surprise that array will contain garbage values:
class MyClass
{
private:
    int array[100];
...
}

So, when is an array automatically initialized to it's default datatype and when should i make my own function to initialize each element?

A: Global objects have static storage duration, they will be zero-initialized from the beginning,

For every named variable with static or thread-local storage duration that is not subject to constant initialization (since C++14), before any other initialization.
If T is a scalar type, the object's initial value is the integral constant zero explicitly converted to T.
If T is array type, each element is zero-initialized

That means all the elements of vector will be initialized to 0, all the elements of vector_char will be initialized to '\0'.
On the other hand, all the elements of internal_vector will be initialized to indeterminate values in default initialization.

if T is an array type, every element of the array is default-initialized;
otherwise, nothing is done: the objects with automatic storage duration (and their subobjects) are initialized to indeterminate values.
Default initialization of non-class variables with automatic and dynamic storage duration produces objects with indeterminate values (static and thread-local objects get zero initialized)

Note that it's a little complex for array, whose storage duration depends on how the instance is declared.


text:
Q: How to call a method from an HashMap? I have a HashMap how looks like that:
     hmap = new HashMap<String, Object>();

    // All list of exercises
    hmap.put("ArrayVerrification", new ArrayVerification());
    hmap.put("DivideNumber", new DivideNumber());
    hmap.put("Hello", new Hello());
    hmap.put("Rectangle", new Rectangle());
    hmap.put("StringOperations", new StringOperations());
    hmap.put("Substring", new Substring());
    hmap.put("SumOfPrimeNumbers", new SumOfPrimeNumbers());
    hmap.put("Test", new Test());

    for (Map.Entry<String, Object> pair : hmap.entrySet()){
         if(pair.getKey().equals(extractClassNameFromComand)) {
              // this I want to do something like that
              // eg : Hello hello = new Hello;
              //      hello.run();
        }
    }

Every object have a method called "run". I want to call that method but i don't know how to do that. Can you help me, pls? :)

A: If all the classes have a no-arg method called run(), then make all the classes implement Runnable, and then declare Map value to be a Runnable:
Map<String, Runnable> hmap = new HashMap<>();
// code to fill map here

for (Map.Entry<String, Runnable> pair : hmap.entrySet()){
    if (pair.getKey().equals(extractClassNameFromComand)) {
        pair.getValue().run();
    }
}

If you want to defer the construction of the object until inside the loop, use a Supplier:
Map<String, Supplier<Runnable>> hmap = new HashMap<>();
hmap.put("ArrayVerrification", ArrayVerification::new);
hmap.put("DivideNumber", DivideNumber::new);
hmap.put("Hello", Hello::new);
hmap.put("Rectangle", Rectangle::new);
hmap.put("StringOperations", StringOperations::new);
hmap.put("Substring", Substring::new);
hmap.put("SumOfPrimeNumbers", SumOfPrimeNumbers::new);
hmap.put("Test", Test::new);

for (Map.Entry<String, Supplier<Runnable>> pair : hmap.entrySet()){
    if (pair.getKey().equals(extractClassNameFromComand)) {
        Supplier<Runnable> supplier = pair.getValue();
        Runnable obj = supplier.get(); // calls: new Xxx()
        obj.run();
    }
}


text: Q: YAML Liquibase / Log4j configuration files syntax in Intelij I was looking for a way to have YAML files for liquibase or log4j verified in IntelliJ just like how it works for application.yaml for Spring Boot. As I understand I should have a JSON file with schema, and load it through Language&Frameworks/Schemas and DTDs in IDE, but I couldn't find any. Is there another way to have autocompletion/syntax hints in Intellij?


text:
Q: Javascript function call with Thymeleaf I need to call a javascript function on thymeleaf template, something like this:
Case 1:
<select th:onclick="${'function1('a')'}">

But in this case the thymeleaf not work.. some researchs ago (including stackoverflow) I get the followings "solutions":
Case 2:
<select th:onclick="${'function1(''a'')'}">

Case 3:
<select th:onclick="${'function1(\'a\')'}">

Case 4:
<select th:onclick="${'function1(\''+'a'+'\')'}">

But in all cases I get the same error: "...Exception evaluating SpringEL expression..."
My problem is about javascript callings, I need put some parameters ${var} for call in js function. How I can fix that ?
Thanks

A: You need to call the javascript function as mentioned below.
th:onclick="'javascript:function1(\''+ ${a} +'\');'"

I think this could help you.

A: As far as I know, you have two possibilities how to do it:

*

*Using double brackets

...

And then JS function like this
function showToast(toast) {
    M.toast({html: toast});
}

*Using data- attribute

...

And appropriate JS function
function showToast() {
    var toast = document.querySelectorAll('body')[0].getAttribute('data-toast');
    M.toast({html: toast});
}

A: If you don't need any dynamic vars in the JS function call, this is how to do it:
th:onclick="'alert(\'a\');'"

This simply escapes the single quotes and requires no SpringEL (of course you could dispense with the thymeleaf attribute in this case and just use plain onclick).
To insert vars into it:
th:onclick="'alert(\'' + ${myVar} + '\');'"

Used the alert function to allow me to try it out and prove it works.

A: Try this.
th:onclick="${'javascript:functionXXX(' + obj.id + ')'}"

A: Another "new" way with html5, using data attributes:
th:data-url="@{/yourUrl}" th:onclick="window.location.href=this.getAttribute('data-url')"

A: Sending two values in JS:
function openGate(IP,Port) {
   // Some operations with parameters IP and Port
}

<button id="open" type="button" th:onclick="'openGate(\'' +${gate.gateIp} +'\',\''+${gate.gatePort}+'\')'"  class="btn btn-warning">Open the gate</button>

In thymeleaf onclick we are using quotas for parameters.
So the sourse page looks
<button id="open" type="button" onclick="openGate('192.168.10.10','9938')"  class="btn btn-warning">Open gate</button>

A: One way is use the characters [[' y ']].
For example I am going to show the content of the variable 'startDate' which is a Date type and formatting in the format dd/MM/yyyy HH:mm:ss' to show using 'alert' function.
<input type="button" th:onclick="alert([[${#dates.format(processInstance.startDate, 'dd/MM/yyyy HH:mm:ss')}]]);" />

The output is like this:
22/02/2019 15:43:02

A: There are situations in which we could prefer writing expressions directly into our HTML texts. It comes handy while our goal is to write variables directly into a javascript function.
Expressions between [[...]] or [(...)] are considered inlined expressions in Thymeleaf, and inside them we can use any kind of expression that would also be valid in a th:text.
A quick example if you want to call javascript function1 that alert the 'a' variable.

Then in thymeleaf you can call :
<button th:onclick="javascript:function1([[${a}]]);">Send</button>
These informations you can find in Thymeleaf documentation at 12.1 Expression inlining section or there is a good article with a lot of usefull examples at baeldung.com/spring-thymeleaf-css-js.

A: i did this way:

And the deletetag function inside a simple

A: Hi i was having the same issue, the problem that i got is that the function is not defined because my function was in the thymleaf file
i have used <button th:onclick="javascript:function1()">Send</button>
and i used also solutions mentioned above but didn't work for me
so i have coppied almost all of my JavaScript functions in a separate JS file which is located at <project_name>/src/main/resources/public/js/main.js
and then in my thymleaf file i linked it like this

and i called my function like this : <input type="checkbox" onclick="function1()" th:onclick="|function1()|">Show Password
and it worked just fine


text:
Q: Add QR code using external javascript file within Sencha framework We are trying to add functionality to an old system. Our clients use scanners, so it would be ideal if we could add a QR code on screen for them to scan. I found a small open source javascript library that displays QR codes. I wanted to use that, but I am pulling the URL from the database, putting it into a Store, and then populating a link on screen. So, I have the following:
        this.searchForm = {
            frame: true,
            xtype: 'form',
            layout: 'form',
            labelWidth: 150,
            items: [{
                xtype: 'component',
                fieldLabel: 'Wireless App',
                tpl: '

{Url}',
                data: { Url: '' },
                ref: '../../WirelessAppLabel'
            }, {
                xtype: 'label',
                ref:'../../StatusLabel'
            }]
        };

        lookupRF: function(search) {
            this.createRFLookup();
            this.lookupRFWindow.show();

            this.WirelessAppStore = WirelessAppUrl.getInstance().createStore();

            PM.Retriever.retrieve([this.WirelessAppStore], {
                callback: function (response, success) {
                    if (success) {
                        this.WMSAppUrl = this.WirelessAppStore.data.items[0].data.Url;

                        this.lookupRFWindow.WirelessAppLabel.update({ Url: this.WMSAppUrl });
                        new QRCode(document.getElementById("qrcode"), this.WMSAppUrl);
                    }
                },
                scope: this
            });
        }

where PM is a namespace we created internally. (These two functions are not in the same file, but one references the other). But, I keep getting errors saying QRCode is not defined. I tried loading it using Ext.Loader.load() and also just adding a reference to the script in index.html, but neither option worked. Any suggestions?
Here is the link to the QR Code javascript we are attempting to utilize: https://davidshimjs.github.io/qrcodejs/

A: I found a much easier approach. Rather than try to do everything in Javascript, it is already hitting the server to pull from the database, so I added a QR Code generator that created a Bitmap server side, which converts it into a Base64String. So, now my code looks like this:
    this.searchForm = {
        frame: true,
        xtype: 'form',
        layout: 'form',
        labelWidth: 150,
        items: [{
            xtype: 'component',
            fieldLabel: 'Wireless App',
            tpl: '{Url}
',
            data: {
                Url: '',
                Image: ''
            },
            ref: '../../WirelessAppLabel'
        }, {
            xtype: 'label',
            ref:'../../StatusLabel'
        }]
    };

    lookupRF: function(search) {
        this.createRFLookup();
        this.lookupRFWindow.show();

        this.WirelessAppStore = WirelessAppUrl.getInstance().createStore();

        PM.Retriever.retrieve([this.WirelessAppStore], {
            callback: function (response, success) {
                if (success) {
                    this.WMSAppUrl = this.WirelessAppStore.data.items[0].data.Url;
                    this.WMSAppImage = this.WirelessAppStore.data.items[0].data.QRCode;

                    this.lookupRFWindow.WirelessAppLabel.update({
                        Url: this.WMSAppUrl,
                        Image: this.WMSAppImage
                    });
                }
            },
            scope: this
        });

And then to actually create the QRCode, I used this open source package: https://github.com/codebude/QRCoder
Not exactly the solution that was asked for, but it works really well.


text:
Q: How build a listview like this in Flutter? I created this using two columns and split the list into two parts. But it got so ugly.
Any suggestions on how I can create something like this more elegantly?
ListView of cards with differents heights

A: You can use flutter_staggered_grid_view with QuiltedGridTile
class TAA extends StatelessWidget {
  const TAA({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GridView.custom(
        gridDelegate: SliverQuiltedGridDelegate(
          crossAxisCount: 2,
          mainAxisSpacing: 4,
          crossAxisSpacing: 4,
          repeatPattern: QuiltedGridRepeatPattern.inverted,
          pattern: [
            QuiltedGridTile(2, 1),
            QuiltedGridTile(1, 1),
          ],
        ),
        childrenDelegate:
            SliverChildBuilderDelegate((context, index) => Container(
                  color: Colors.red,
                )),
      ),
    );
  }
}

You can decorate the way you want.


text:
Q: How to make nautilus forget SMB session passwords without logging out I'm testing the accessibility of a couple of samba shares through nautilus. When inserting the password for the first time, I've chosen "remember password until you logout" but now I'd like to make nautilus forget about these passwords to continue testing. How can I do that without logging out?
I've already looked at seahorse as suggested here and here to no avail. I think that seahorse gets involved only when storing passwords permanently.
P.s. I've also tried to kill nautilus, of course, as well as:
kill `pgrep gvfs`

Nothing worked.

A: Try
gnome-keyring-daemon -r

it worked for me.
source:
https://security.stackexchange.com/questions/108242/how-does-nautilus-store-passwords-on-ubuntu

A: The only workaround that I am aware of is to select the "Forget password immediately" option while logging into the server. It showld be a radio button right beneath the username/password fill form.
That way when you unmount the device, you will be able to login again as the same ot different user.


text:
Q: Can't install python Polyglot package on Windows I'm trying to install Polyglot package by using the command:
pip install polyglot

and I receive the following:
Collecting polyglot
  Using cached polyglot-15.10.03-py2.py3-none-any.whl
Collecting pycld2>=0.3 (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): futures>=2.1.6 in d:\program files\winpython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): wheel>=0.23.0 in d:\program files\winpython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages (from polyglot)
Collecting PyICU>=1.8 (from polyglot)
  Using cached PyICU-1.9.3.tar.gz
Collecting morfessor>=2.0.2a1 (from polyglot)
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.3 in d:\program files\winpython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages (from polyglot)
Building wheels for collected packages: PyICU
  Running setup.py bdist_wheel for PyICU ... error
  Complete output from command "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\revuze\\AppData\\Local\\Temp\\pip-build-h2bmp43j\\PyICU\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\revuze\AppData\Local\Temp\tmpphoimlejpip-wheel- --python-tag cp34:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.4
  copying icu.py -> build\lib.win-amd64-3.4
  copying PyICU.py -> build\lib.win-amd64-3.4
  copying docs.py -> build\lib.win-amd64-3.4
  running build_ext
  building '_icu' extension
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\revuze\AppData\Local\Temp\pip-build-h2bmp43j\PyICU\setup.py", line 115, in <module>
      py_modules=['icu', 'PyICU', 'docs'])
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\wheel\bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build.py", line 126, in run
      self.run_command(cmd_name)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
      _build_ext.run(self)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\Cython\Distutils\build_ext.py", line 164, in run
      _build_ext.build_ext.run(self)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build_ext.py", line 339, in run
      self.build_extensions()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\Cython\Distutils\build_ext.py", line 172, in build_extensions
      self.build_extension(ext)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
      _build_ext.build_extension(self, ext)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build_ext.py", line 503, in build_extension
      depends=ext.depends)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 460, in compile
      self.initialize()
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 371, in initialize
      vc_env = query_vcvarsall(VERSION, plat_spec)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
      return unpatched['query_vcvarsall'](version, *args, **kwargs)
    File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
      raise ValueError(str(list(result.keys())))
  ValueError: ['path']

  ----------------------------------------
  Failed building wheel for PyICU
  Running setup.py clean for PyICU
Failed to build PyICU
Installing collected packages: pycld2, PyICU, morfessor, polyglot
  Running setup.py install for PyICU ... error
    Complete output from command "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\revuze\\AppData\\Local\\Temp\\pip-build-h2bmp43j\\PyICU\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\revuze\AppData\Local\Temp\pip-lkjedrat-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.4
    copying icu.py -> build\lib.win-amd64-3.4
    copying PyICU.py -> build\lib.win-amd64-3.4
    copying docs.py -> build\lib.win-amd64-3.4
    running build_ext
    building '_icu' extension
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\revuze\AppData\Local\Temp\pip-build-h2bmp43j\PyICU\setup.py", line 115, in <module>
        py_modules=['icu', 'PyICU', 'docs'])
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\install.py", line 539, in run
        self.run_command('build')
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build.py", line 126, in run
        self.run_command(cmd_name)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
        _build_ext.run(self)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\Cython\Distutils\build_ext.py", line 164, in run
        _build_ext.build_ext.run(self)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\Cython\Distutils\build_ext.py", line 172, in build_extensions
        self.build_extension(ext)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
        _build_ext.build_extension(self, ext)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\command\build_ext.py", line 503, in build_extension
        depends=ext.depends)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 460, in compile
        self.initialize()
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 371, in initialize
        vc_env = query_vcvarsall(VERSION, plat_spec)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall
        return unpatched['query_vcvarsall'](version, *args, **kwargs)
      File "D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
        raise ValueError(str(list(result.keys())))
    ValueError: ['path']

    ----------------------------------------
Command ""D:\Program Files\WinPython-64bit-3.4.4.2\python-3.4.4.amd64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\revuze\\AppData\\Local\\Temp\\pip-build-h2bmp43j\\PyICU\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\revuze\AppData\Local\Temp\pip-lkjedrat-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\revuze\AppData\Local\Temp\pip-build-h2bmp43j\PyICU\

At first I had a problem with the C++ Compiler which I resolved and now I get this problem. Iv'e searched for similar issues and most of the comments recommend to install Microsoft Windows SDK (in order to resolve a 64 bits issue with the compiler) which I did without luck.
I'm working on Windows 10 64 machine on Python 3.4.

A: So if you want to install polyglot do follow steps:
Use git to install polyglot if you don't have then conda install git and then use this command
pip install git+https://github.com/aboSamoor/polyglot@master

the file will be automatically downloaded from this site, don't have to install again.

A: Sadly the package is not yet stable when it comes to Windows.  After trying pip and conda install without luck. This is what I did to get it to work on Python 3.6 environment running on Windows 10 64 bit.
I had Visual C++ 2015 Build Tools(includes Windows SDK) via VS 2015 Community version and Numpy already installed.
I downloaded the correct dependence packages(PyICU and pycld2) from Unofficial Windows Binaries for Python Extension Packages and:
pip install PyICU-1.9.8-cp36-cp36m-win_amd64.whl
pip install pycld2-0.31-cp36-cp36m-win_amd64.whl

So cp36 matches my Python env.version, win for Windows, and amd64 for 64bits. Download the correct wheel that matches your systems.
After that I cloned and install the package from GitHub
git clone https://github.com/aboSamoor/polyglot.git
cd polyglot
python setup.py install

A: Best way is to download from https://github.com/aboSamoor/polyglot/tarball/master and then
python pip install aboSamoor-polyglot-15.10.03-69-gaf5059f.tar.gz

A: If you have now Windows vs2010 compiler, you may try this:

*

*launch "D:\Program Files\WinPython-64bit-3.4.4.2\make_cython_use_vc.bat"

*then launch "Winpython Command Prompt" and "pip install polyglot"

If it fails, to revert to previous situation:

*

*launch "D:\Program Files\WinPython-64bit-3.4.4.2\make_cython_use_mingw.bat"

A: As I suspect that you do not have good experience compiling code on Windows it could be a better for your to try the use of Anaconda python distribution which has most of the Python packages already compiled.
Once install you just use conda instead of pip to install new packages. You can still use pip if you have to.


text:
Q: AngularJS: How to set Filter by click How do I set specific search conditions like: search.date > someDate() or search.amount > 0
I've tried:  0">Pos only etc.etc.
I currently have an input with:
<input type="text" class="form-control" placeholder="Search all" ng-model="search" />
That works great and searches all fields. It breaks when I try a specific filter putting [object Object] in the search input.

  {{tenant.rent | currency: "€ "}}
  {{tenant.name}}
  {{tenant.tel}}
  {{tenant.mail}}
  {{tenant.amount }}
  {{tenant.date}}

Fiddle
How do I set these kind of filters (without breaking the global search)?

A: You could use an ng-hide statement for virtual filtering ng-hide="search.minAmount > tenant.account". Since you used search as an object, I initialised it as one in the controller:
$scope.search = {};
$scope.search.text = "";
$scope.search.minAmount = null;

And set the filter as along with an ng-hide:

 0}" ng-hide="search.minAmount != null && search.minAmount > tenant.account">

Demo
PS: You can change what you want positive, account or rent.

A: First of all, if you want to pass a object to filter, this object must contain the same attributes of your list objects, for example, to find out tenants whose name contains "a", you can pass a object {name:"a"} to filter
tenant in tenants | filter:{name:"a"} | orderBy:sort

So you may misunderstand the filter usage...

To achieve what you want, you can customize your own filter with the $filter service. Here is an example:
In controller:
angular.module('ngAppRentManager', []).
controller('RentCtrl', ['$scope', '$filter', function ($scope, $filter) {

    $scope.search = {
        keyword: "",
        pos_only: false
    }

    $scope.getFilteredTenants = function() {
        var filtered_tenants = $scope.tenants;
        filtered_tenants = $filter("filter")(filtered_tenants, $scope.search.keyword);
        if ($scope.search.pos_only) {
            filtered_tenants = $filter("filter")(filtered_tenants, function(tenant) {
                return tenant.amount > 0;
            });
        }
        filtered_tenants = $filter("orderBy")(filtered_tenants, $scope.sort, $scope.reverse);
        return filtered_tenants;
    };

}]);

In html:

Pos only

All

<input type="text" class="form-control" placeholder="Search all" ng-model="search.keyword" />

 0}">
    {{tenant.rent | currency: "€ "}}
    {{tenant.name}}
    {{tenant.tel}}
    {{tenant.mail}}
    {{tenant.amount}}>
    {{tenant.address}}

Fiddle


text:
Q: CSS3 transition (background-color) refusing to work in Firefox This is odd and I may be missing something blatant by my main navigation buttons on build.advocatedaily.com have a CSS background color transition associated with them on hover.
It works in Chrome, but in FX it's just refusing to comply. Interestingly, when I open a submenu and hover off the element, the background color reverts to normal using a transition.
Thoughts?

A: remove
position: relative;

from .mainnav li, worked here
firefox can be funny sometimes.


text:
Q: Shared memory C questions(size,structures So im new to C and I've got some questions about shared memory.
Im using different .c to use the shm.
This is the program where i create the memory
int id = shmget( 1234, CONSTANT*sizeof(structure),IPC_CREAT | 0666 );
exit_on_error (id, "Error");

SO my question is how in another program can I acess this memory and know that "CONSTANT"
I have something like this
int id = shmget(1234, 0,0);
exit_on_error (id, "Error");

*/structure pointer*/ sp = (structure*) shmat(id,0,0);
exit_on_null (structure pointer,"Error");

But now I need that constant in order to iterate on the number of "objects" of the structure and edit the objects

A: There is a function, shmctl() which takes a command, IPC_STAT, and fills in a structure shmid_ds which describes the object.


text:
Q: Why doesn't my Django site return a 404 when checked with this URL parser? Here's a simple python function that checks if a given url is valid:
from httplib import HTTP
from urlparse import urlparse

def checkURL(url):
    p = urlparse(url)
    h = HTTP(p[1])
    h.putrequest('HEAD', p[2])
    h.endheaders()
    if h.getreply()[0] == 200:
        return 1
    else: return 0

This works for most sites, but with my Django-based site I get 200 status code even when I enter a url that is clearly wrong. If I view the same page in a browser, I get a 404. For example, the following page gives a 404 in a browser: http://wefoundland.com/GooseBumper
But gives a 200 when checked with this script. Why?
Edit: While mopoke's answer solved the issue from the Django side of things, there was also a bug in the script above:
instead of parsing the url and then using
 h.putrequest('HEAD', p[2])

I actually needed to use the url in the request, like so:
h.putrequest('HEAD', url)

that solved the issue.

A: Although the content says 404, the site is returning 200 OK in the headers:
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 30 Dec 2009 01:38:24 GMT
Content-Type: text/html; charset=utf-8
Connection: close

Make sure your response is using HttpResponseNotFound. e.g.:
    return HttpResponseNotFound('
Page not found
')

A: Your page isn't actually returning a 404 status code:
alex@alex-laptop:~$ curl -I http://wefoundland.com/GooseBumper
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 30 Dec 2009 01:37:41 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

A: To get a 404 to be returned by your Django view, use HttpResponseNotFound instead of HttpResponse, or pass in 'status=404' to the HttpResponse constructor.


text:
Q: How to fetch a tag value from Test step response file (REST request's response) in SOAP UI I am a newbie to SOAP UI, I need to fetch a tag value from Test step response file (REST request's response) and set it as testsuite property.
My Request file looks like;
<xdata created_by="XXXX" created_at="Wed Mar 16 08:45:39 EDT 2016" app="" profile="" app_version="" env="DEV" tran="" service="1234">
   <rows start_index="0">
      <row basketId="1234566" basketVersionId="11" basketName="ORDERS_1505" basketDescription="ORDERS" createdUserName="XXXX" updatedUserName="XXX" __errorMsg="{"errors":[],"success":true}" totalApprovedOrderCount="0"/>
   </rows>
</xdata>

I need to fetch basketVersionId attribute, please help.
Note: All the examples I read are dealing with Soap Response, property transfer using namespace and xpath. but that is not woking here I guess.

A: SOAPUI converts practically all to Xml, so despite the fact that you've a REST service you can use anyway and XPath in the property transfer testStep.
The only difference is that in property transfer you've to select:

*

*ResponseAsXml as a property for the REST service with a Json response.

*Response as a property for a SOAP service with Xml response.

So you can use: //*:row/@basketVersionId as XPath to get your attribute value.

Hope it helps,


text:
Q: How to cast signed int to 15 bit bit-field? I have some bitfield:
int somefield : 15;

I'm trying to convert an int to 15 bit (can be positive or negative).
What is the best practice to do it efficiently?

A:
I'm trying to convert an int to 15 bit (can be positive or negative). What is the best practice to do it efficiently?

If the int to convert is within the range of a 15-bit signed integer, simple use the following code.  It is important not to use int without signed in defining the bit-field as this is one place in the C spec, it makes a difference.  Without the signed, an int bit field could be implemented as unsigned.  It is implementation defined.
signed int somefield:15;
...
x.somefield = 12345;
int y = x.somefield;

If the int to convert may be outside than the range of a 15-bit signed integer, better to use an unsigned field to have portably consistent defined behavior.  It is unclear what value OP wants to store when the int is out-of-range.  Some additional code may be needed should the sign need to be recovered.  No additional overhead on writing and maybe overhead on reading depending on coding needs.
unsigned somefield:15;
...
x.somefield = 123456;

x.somefield = -1;
int y = x.somefield >= 0x4000 ? x.somefield - 0x8000 : x.somefield;

Alternatively, if the value to assign may be outside the bit-field range, insure the assignment does not happen.  Additional overhead on writing and none on reading.
signed int somefield 15;
...
if (i >= INT15_MIN && i <= INT15_MAX) x.somefield = i;
else TBD();

int y = x.somefield;

A: chux, thanks a lot!
I've found out another option, and it looks pretty simple too:
typedef struct {
    unsigned int firstletter: 5;
    unsigned int secondletter: 5;
    unsigned int thirdletter: 5;
  } data_in_32_format;

typedef struct {
    unsigned int somedata: 15;
  } data;

typedef union {
    data_in_32_format;
    data;
  } common_data;

So, when I'm writing the data itself, I'm writing to the:
common_data entry;
entry.data = getint_in_decimal_format;

Than I'm printing it in 32 format:
print32("%c%c%c\n", entry.data_in_32_format.thirdletter
                  , entry.data_in_32_format.secondletter
                  , entry.data_in_32_format.firstletter);

Of cause I need to convert it to char correctly before previous (0-9 => numbers, >9 - letters, so in ASCII it is needed to be +55 to represent 32 bit format correctly (A for 10 and etc.).


text:
Q: Is there a built-in way to layer textures within the standard PBR shader? I want to have an effect similar to this question, in Aframe, to have layered swappable textures on a single model:
I am wondering if there is a standard process I have missed in Threejs so that I can continue to use the standard shader; or do I have to fork it and add the multi-texture capability myself in a custom shader?
Thanks!

A: You want to layer materials or textures using three.js.
Here is a pattern that currently works:
var geometry = new THREE.BoxGeometry( 10, 10, 10 );
geometry.clearGroups();
geometry.addGroup( 0, Infinity, 0 );
geometry.addGroup( 0, Infinity, 1 );
geometry.addGroup( 0, Infinity, 2 );
geometry.addGroup( 0, Infinity, 3 );

var materials = [ material0, material1, material2, material3 ];

// mesh
mesh = new THREE.Mesh( geometry, materials );
scene.add( mesh );

three.js r.144


text:
Q: Access 2007: Delete Partially Duplicate Rows I have data in an Excel spreadsheet that I import into Access 2007. There is a candidate key (CN). For those rows with the same CN, the data is different for all columns. Example below (real data has 100 columns and MsgNum might vary more often, haven't confirmed this pattern with other instances yet, so although I tried to select on it, the solution should probably ignore that the combination of CN and MsgNum could be unique).
Date       |        CN        |  MsgNum
2012-01-03     111-111-1111       101
2012-01-04     222-222-2222       101
2012-01-05     222-222-2222       202
2012-01-05     333-333-3333       101
2012-01-05     333-333-3333       202
2012-01-04     444-444-4444       101
2012-01-04     444-444-4444       101

I do not have access to SQL Server. All I have is Access 2007. I don't want to use Excel's remove duplicates procedure because the data that gets to me comes from Access before being exported to Excel, so I'm trying to find a solution to remove the duplicates through Access.
Using SQL in Query Design in Access, I have tried using a subquery in the WHERE clause that groups by the CN keeping those with a count of 1, but that removes all instances and does not keep at least one.
I tried selecting just two columns (CN and MIN(MsgNum))--grouping appropriately--and that gives me what I want, but when I run it with all the columns specified (100 columns in all), I get duplicates still.
I tried the Query Wizard Find Duplicates for a single column and to return the rest of the columns, that works in getting the duplicates isolated in a view. Since I cannot setup any primary keys, I am not sure how to join the tables. When running the previous MIN query with all columns, I get the same problem as before.
I was trying to setup something in the WHERE clause that compared the combination of two columns, but I read that that cannot be done. So, I am at a lost on how to solve this issue where there is a candidate key but the information in the records for the duplicates on this candidate key column are different. What I want to have done is what Excel 2007's Remove Duplicates procedure does where duplicates on one column can be removed and retain others.


text:
Q: $2$-isogenous to a curve in the Tate normal form It is well-known that an elliptic curve $E$ that has a point of order $2$ and is represented as $E=[0,a,0,b,0]$ has a $2$-isogenous curve $E^\prime=[0,-2a,0,a^2-4b,0]$, see e.g. p. 507 in

*

*A. Dujella, Number Theory, University of Zagreb, Školska knjiga, Zagreb, 2021, ISBN: 978-953-0-30897-8, 621 pp.

Question: Does a similar simple formula for $E^\prime$ exist for a curve with $2$-torsion expressed in the Tate normal form $E=[1-c,-b,-b,0,0]$? We may assume that all torsion points on $E$ are known.

Rationale: I am working on $\mathbb{Z}/16\mathbb{Z}$ curves over cubic fields. The curves are generated by the formulas on p. 584 in

*

*D. Jeon, C. H. Kim, and Y. Lee, Families of elliptic curves over cubic number fields with prescribed torsion subgroups, Mathematics of Computation, Volume 80, Number 273, January 2011, pp. 579–591, doi:10.1090/S0025-5718-10-02369-0.

For $t=\frac{4}{7}$, Magma struggles to calculate the last generator.
The DescentInformation is very limited over number fields in Magma ($2$-descent only). IsogenousCurves and IsIsogenous are not implemented at all.
Sometimes, feeding a $2$-isogenous curve or a different model of the curve helps.

A: John Cremona has some explicit code for calculating the 2-torsion points of curves in the general Weierstrass [a1,a2,a3,a4,a6] format, and part of that formula is finding rational roots to the cubic equation
(1) $ P(x,[W]) = 4(x^3+e_{a2}x^2+e_{a4}x+e_{a6})+(e_{a1}x+e_{a3})^2)$
where [a1,a2,a3,a4,a6] are from the Weierstrass form W.
If you stick in a curve of the form [0,a,0,b,0] then (1) becomes
(2)  $4x^3 + 4ax^2 + 4bx = 0$ (to find the 2-torsion points)
and it is easy to see that $x=0$ is one torsion point. The other 2 are the quadratic roots of $x^2 + 4ax + b$ which need to be rational, if three 2-torsion points are to be found.
However if we use the Tate form above of $[1-c,-b,-b,0,0]$ and stick it into (1) we derive
(2)  $P(x,b,c) = 4x^3 + (c^2 - 2c + (-4b + 1))x^2 + (2bc - 2b)x + b^2$
and we want rational roots of this cubic for x.
Maxima tells us that the 3 roots of this cubic in [b,c] is
$x_1=\left({{-1}\over{2}}-{{\sqrt{3}\,i}\over{2}}\right)\,\left({{b\,
 \sqrt{-b\,\left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+\left(-20\,b-1
 \right)\,c+16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}}}}+{{-{{3\,b^
 2}\over{4}}-{{\left(4\,b-c^2+2\,c-1\right)\,\left(\left(c-1\right)\,
 b\right)}\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c-1\right)^3}\over{
 1728}}\right)^{{{1}\over{3}}}-{{\left({{\sqrt{3}\,i}\over{2}}+{{-1
 }\over{2}}\right)\,\left({{\left(c-1\right)\,b}\over{6}}-{{\left(4\,
 b-c^2+2\,c-1\right)^2}\over{144}}\right)}\over{\left({{b\,\sqrt{-b\,
 \left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+\left(-20\,b-1\right)\,c+
 16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}}}}+{{-{{3\,b^2}\over{4}}
 -{{\left(4\,b-c^2+2\,c-1\right)\,\left(\left(c-1\right)\,b\right)
 }\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c-1\right)^3}\over{1728}}
 \right)^{{{1}\over{3}}}}}+{{4\,b-c^2+2\,c-1}\over{12}}$
$x_2 = \left({{\sqrt{3}\,i}\over{2}}+{{-1}\over{2}}\right)\,\left({{b\,
 \sqrt{-b\,\left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+\left(-20\,b-1
 \right)\,c+16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}}}}+{{-{{3\,b^
 2}\over{4}}-{{\left(4\,b-c^2+2\,c-1\right)\,\left(\left(c-1\right)\,
 b\right)}\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c-1\right)^3}\over{
 1728}}\right)^{{{1}\over{3}}}-{{\left({{-1}\over{2}}-{{\sqrt{3}\,i
 }\over{2}}\right)\,\left({{\left(c-1\right)\,b}\over{6}}-{{\left(4\,
 b-c^2+2\,c-1\right)^2}\over{144}}\right)}\over{\left({{b\,\sqrt{-b\,
 \left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+\left(-20\,b-1\right)\,c+
 16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}}}}+{{-{{3\,b^2}\over{4}}
 -{{\left(4\,b-c^2+2\,c-1\right)\,\left(\left(c-1\right)\,b\right)
 }\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c-1\right)^3}\over{1728}}
 \right)^{{{1}\over{3}}}}}+{{4\,b-c^2+2\,c-1}\over{12}}$
and
$ x_3 = \left({{b\,\sqrt{-b\,\left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+
 \left(-20\,b-1\right)\,c+16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}
 }}}+{{-{{3\,b^2}\over{4}}-{{\left(4\,b-c^2+2\,c-1\right)\,\left(
 \left(c-1\right)\,b\right)}\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c
 -1\right)^3}\over{1728}}\right)^{{{1}\over{3}}}-{{{{\left(c-1\right)
 \,b}\over{6}}-{{\left(4\,b-c^2+2\,c-1\right)^2}\over{144}}}\over{
 \left({{b\,\sqrt{-b\,\left(c^4-3\,c^3+\left(3-8\,b\right)\,c^2+
 \left(-20\,b-1\right)\,c+16\,b^2+b\right)}}\over{8\,3^{{{3}\over{2}}
 }}}+{{-{{3\,b^2}\over{4}}-{{\left(4\,b-c^2+2\,c-1\right)\,\left(
 \left(c-1\right)\,b\right)}\over{8}}}\over{6}}+{{\left(4\,b-c^2+2\,c
 -1\right)^3}\over{1728}}\right)^{{{1}\over{3}}}}}+{{4\,b-c^2+2\,c-1
 }\over{12}}$
I really don't see a simple form here for rational roots. unless b and c take very specific values so that one of $x_1$, $x_2$ or $x_3$ become rational.
I did also consider the elliptic curve invariants $c_4$ and $c_6$ equivalency, but it means moving from a sextic to a quartic equation for the two variables (b,c --> a,b)
(continuing) after reading up a bit more on 2-isogenies and Magma defining fields, the following Magma code and results is your answer, no, there is no simple elliptic curve:

F<a,b,c>:=FunctionField(Rationals(),3);
E:=EllipticCurve([1-c,-b,-b,0,0]);
E;
Elliptic Curve defined by y^2 + (-c + 1)xy - by = x^3 - bx^2 over Multivariate rational function field of rank 3 over Rational Field
E1, f := IsogenyFromKernel(E, DivisionPolynomial(E, 2));
E1;
Elliptic Curve defined by y^2 + (-c + 1)xy - by = x^3 - bx^2 + (-5b^2 + 5/2bc^2 + 5/2bc - 5b - 5/16c^4 + 5/4c^3 - 15/8c^2 + 5/4c - 5/16)x + (-3b^3 + 9/4b^2c^2 + 7/2b^2c + 10b^2 - 9/16bc^4 + 1/4bc^3 + 21/8bc^2 - 15/4bc + 23/16b + 3/64c^6 - 9/32c^5 + 45/64c^4 - 15/16c^3 + 45/64c^2 - 9/32c + 3/64) over Multivariate rational function field of rank 3 over Rational Field
f;
Elliptic curve isogeny from: CrvEll: E to CrvEll: E1
taking (x : y : 1) to ((x^4 + (-b + 1/4c^2 - 1/2c + 1/4)x^3 + (b^2 - 1/2bc^2 + 1/2b + 1/16c^4 - 1/4c^3 + 3/8c^2 - 1/4c + 1/16)x^2 + (-1/2b^2c - 3/2b^2 + 1/8bc^3 - 3/8bc^2 + 3/8bc - 1/8b)x + (3/4b^3 + 1/16b^2c^2 - 1/8b^2c + 1/16b^2)) / (x^3 + (-b + 1/4c^2 - 1/2c + 1/4)x^2 + (1/2bc - 1/2b)x + 1/4b^2) : (x^6y + (-2b + 1/2c^2 - c + 1/2)x^5y + (b^2c - b^2 - 1/2bc^3 + 3/2bc - b + 1/16c^5 - 5/16c^4 + 5/8c^3 - 5/8c^2 + 5/16c - 1/16)x^5 + (5/2bc - 5/2b)x^4y + (-1/2b^3c + b^3 + 3/8b^2c^3 - 11/8b^2c^2 - 5/2b^2c + 7/2b^2 - 3/32bc^5 + 1/2bc^4 - 17/16bc^3 + 9/8bc^2 - 19/32bc + 1/8b + 1/128c^7 - 7/128c^6 + 21/128c^5 - 35/128c^4 + 35/128c^3 - 21/128c^2 + 7/128c - 1/128)x^4 + 5b^2x^3y + (1/2b^3c^2 + 9/4b^3c - 5b^3 - 1/4b^2c^4 + 11/16b^2c^3 - 9/16b^2c^2 + 1/16b^2c + 1/16b^2 + 1/32bc^6 - 3/16bc^5 + 15/32bc^4 - 5/8bc^3 + 15/32bc^2 - 3/16bc + 1/32b)x^3 - 5b^3x^2y + (-5/4b^4c + 7/2b^4 + 1/8b^3c^3 - 9/16b^3c^2 + 3/4b^3c - 5/16b^3 + 3/64b^2c^5 - 15/64b^2c^4 + 15/32b^2c^3 - 15/32b^2c^2 + 15/64b^2c - 3/64b^2)x^2 + (2b^4 - 1/2b^3c^2 + 1/2b^3c)xy + (-b^5 + 5/8b^4c^2 - 7/8b^4c + 1/4b^4 + 1/32b^3c^4 - 1/8b^3c^3 + 3/16b^3c^2 - 1/8b^3c + 1/32b^3)x - 1/2b^4cy + (11/32b^5c - 1/16b^5 + 1/128b^4c^3 - 3/128b^4c^2 + 3/128b^4c - 1/128b^4)) / (x^6 + (-2b + 1/2c^2 - c + 1/2)x^5 + (b^2 - 1/2bc^2 + 2bc - 3/2b + 1/16c^4 - 1/4c^3 + 3/8c^2 - 1/4c + 1/16)x^4 + (-b^2c + 3/2b^2 + 1/4bc^3 - 3/4bc^2 + 3/4bc - 1/4b)x^3 + (-1/2b^3 + 3/8b^2c^2 - 3/4b^2c + 3/8b^2)x^2 + (1/4b^3c - 1/4*b^3)x + 1/16b^4) : 1)

~
~