text:
Q: How to set alpha channel color for image? I use an old software which can't read some gif formats. I have an image which this software reads perfectly. Here is part of magick identify output for this image:
Image:
  Filename: af4a4cd07bf8bf2e0a32ac795e3f688313992199.gif
  Format: GIF (CompuServe graphics interchange format)
  Mime type: image/gif
  Class: PseudoClass
  Geometry: 600x225+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: PaletteAlpha
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 135000
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 210.766 (0.826532)
      median: 255 (1)
      standard deviation: 79.6865 (0.312496)
      kurtosis: 0.391611
      skewness: -1.42784
      entropy: 0.34599
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 202.466 (0.793984)
      median: 255 (1)
      standard deviation: 88.9531 (0.348836)
      kurtosis: -0.234975
      skewness: -1.25805
      entropy: 0.353168
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 192.395 (0.75449)
      median: 255 (1)
      standard deviation: 99.826 (0.391474)
      kurtosis: -0.681473
      skewness: -1.07706
      entropy: 0.353545
    Alpha:
      min: 0  (0)
      max: 255 (1)
      mean: 76.857 (0.3014)
      median: 0 (0)
      standard deviation: 117.011 (0.458868)
      kurtosis: -1.25074
      skewness: 0.865602
      entropy: 0.882996
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 170.621 (0.669101)
      median: 191.25 (0.75)
      standard deviation: 96.3692 (0.377918)
      kurtosis: -1.44093
      skewness: -0.663742
      entropy: 0.483925
  Alpha: srgba(255,255,255,0)   #FFFFFF00
  Colors: 256
  Histogram:
    3519: (0,0,0,255) #000000FF black
    67: (2,2,2,255) #020202FF srgba(2,2,2,1)
    3: (2,2,6,255) #020206FF srgba(2,2,6,1)
    1: (2,6,6,255) #020606FF srgba(2,6,6,1)
    66: (4,85,5,255) #045505FF srgba(4,85,5,1)
    85: (4,117,5,255) #047505FF srgba(4,117,5,1)
    180: (5,150,5,255) #059605FF srgba(5,150,5,1)
    20: (6,2,6,255) #060206FF srgba(6,2,6,1)
    3: (6,4,12,255) #06040CFF srgba(6,4,12,1)
    13: (6,7,2,255) #060702FF srgba(6,7,2,1)
    32: (7,2,2,255) #070202FF srgba(7,2,2,1)
    81: (7,6,6,255) #070606FF srgba(7,6,6,1)
    39: (8,61,8,255) #083D08FF srgba(8,61,8,1)
    6: (9,11,14,255) #090B0EFF srgba(9,11,14,1)
    21: (9,38,5,255) #092605FF srgba(9,38,5,1)
    2: (12,6,12,255) #0C060CFF srgba(12,6,12,1)
    105: (12,12,11,255) #0C0C0BFF srgba(12,12,11,1)
    68: (13,5,2,255) #0D0502FF srgba(13,5,2,1)
    28: (13,16,18,255) #0D1012FF srgba(13,16,18,1)
    119: (18,12,7,255) #120C07FF srgba(18,12,7,1)
    105: (21,18,15,255) #15120FFF srgba(21,18,15,1)
    58: (22,22,22,255) #161616FF srgba(22,22,22,1)
    201: (26,8,2,255) #1A0802FF srgba(26,8,2,1)
    156: (28,23,19,255) #1C1713FF srgba(28,23,19,1)
    18: (28,86,29,255) #1C561DFF srgba(28,86,29,1)
    265: (29,17,7,255) #1D1107FF srgba(29,17,7,1)
    69: (29,28,28,255) #1D1C1CFF srgba(29,28,28,1)
    63: (32,34,34,255) #202222FF srgba(32,34,34,1)
    207: (36,13,2,255) #240D02FF srgba(36,13,2,1)
    199: (36,19,5,255) #241305FF srgba(36,19,5,1)
    118: (36,22,11,255) #24160BFF srgba(36,22,11,1)
    109: (36,27,16,255) #241B10FF srgba(36,27,16,1)
    125: (36,28,24,255) #241C18FF srgba(36,28,24,1)
    145: (42,22,10,255) #2A160AFF srgba(42,22,10,1)
    38: (42,31,35,255) #2A1F23FF srgba(42,31,35,1)
    123: (42,40,38,255) #2A2826FF srgba(42,40,38,1)
    76: (43,29,20,255) #2B1D14FF srgba(43,29,20,1)
    142: (43,35,27,255) #2B231BFF srgba(43,35,27,1)
    196: (44,20,3,255) #2C1403FF srgba(44,20,3,1)
    100: (45,26,6,255) #2D1A06FF srgba(45,26,6,1)
    108: (45,26,11,255) #2D1A0BFF srgba(45,26,11,1)
    22: (48,14,2,255) #300E02FF srgba(48,14,2,1)
    9: (48,22,13,255) #30160DFF srgba(48,22,13,1)
    69: (48,35,21,255) #302315FF srgba(48,35,21,1)
    82: (48,45,45,255) #302D2DFF srgba(48,45,45,1)
    54: (49,30,15,255) #311E0FFF srgba(49,30,15,1)
    50: (50,26,10,255) #321A0AFF srgba(50,26,10,1)
    61: (50,30,10,255) #321E0AFF srgba(50,30,10,1)
    66: (50,50,50,255) #323232FF srgba(50,50,50,1)
    121: (51,21,2,255) #331502FF srgba(51,21,2,1)
    210: (52,26,5,255) #341A05FF srgba(52,26,5,1)
    125: (53,40,29,255) #35281DFF srgba(53,40,29,1)
    20: (53,40,55,255) #352837FF srgba(53,40,55,1)
    208: (53,44,37,255) #352C25FF srgba(53,44,37,1)
    7: (53,108,53,255) #356C35FF srgba(53,108,53,1)
    3: (54,26,10,255) #361A0AFF srgba(54,26,10,1)
    4862: (54,29,8,255) #361D08FF srgba(54,29,8,1)
    144: (54,30,10,255) #361E0AFF srgba(54,30,10,1)
    15: (56,29,20,255) #381D14FF srgba(56,29,20,1)
    88: (56,37,21,255) #382515FF srgba(56,37,21,1)
    111: (57,56,54,255) #393836FF srgba(57,56,54,1)
    3: (58,22,10,255) #3A160AFF srgba(58,22,10,1)
    4: (58,26,11,255) #3A1A0BFF srgba(58,26,11,1)
    257: (58,30,6,255) #3A1E06FF srgba(58,30,6,1)
    146: (58,30,10,255) #3A1E0AFF srgba(58,30,10,1)
    157: (59,50,44,255) #3B322CFF srgba(59,50,44,1)
    67: (60,24,2,255) #3C1802FF srgba(60,24,2,1)
    145: (60,34,11,255) #3C220BFF srgba(60,34,11,1)
    77: (61,49,31,255) #3D311FFF srgba(61,49,31,1)
    30: (63,30,5,255) #3F1E05FF srgba(63,30,5,1)
    69: (63,58,63,255) #3F3A3FFF srgba(63,58,63,1)
    68: (64,48,39,255) #403027FF srgba(64,48,39,1)
    8: (65,26,13,255) #411A0DFF srgba(65,26,13,1)
    59: (65,40,19,255) #412813FF srgba(65,40,19,1)
    26: (66,33,15,255) #42210FFF srgba(66,33,15,1)
    82: (67,44,26,255) #432C1AFF srgba(67,44,26,1)
    37: (67,48,56,255) #433038FF srgba(67,48,56,1)
    93: (67,67,67,255) #434343FF srgba(67,67,67,1)
    159: (68,37,12,255) #44250CFF srgba(68,37,12,1)
    121: (68,55,45,255) #44372DFF srgba(68,55,45,1)
    53: (69,34,5,255) #452205FF srgba(69,34,5,1)
    91: (69,54,35,255) #453623FF srgba(69,54,35,1)
    73: (70,29,2,255) #461D02FF srgba(70,29,2,1)
    115: (70,60,53,255) #463C35FF srgba(70,60,53,1)
    77: (74,66,61,255) #4A423DFF srgba(74,66,61,1)
    98: (74,72,70,255) #4A4846FF srgba(74,72,70,1)
    71: (75,37,12,255) #4B250CFF srgba(75,37,12,1)
    58: (75,47,25,255) #4B2F19FF srgba(75,47,25,1)
    140: (76,42,14,255) #4C2A0EFF srgba(76,42,14,1)
    99: (76,63,41,255) #4C3F29FF srgba(76,63,41,1)
    115: (78,35,3,255) #4E2303FF srgba(78,35,3,1)
    120: (79,65,53,255) #4F4135FF srgba(79,65,53,1)
    93: (79,77,77,255) #4F4D4DFF srgba(79,77,77,1)
    51: (80,53,32,255) #503520FF srgba(80,53,32,1)
    45: (81,46,18,255) #512E12FF srgba(81,46,18,1)
    52: (81,59,75,255) #513B4BFF srgba(81,59,75,1)
    63: (82,83,82,255) #525352FF srgba(82,83,82,1)
    99: (83,42,12,255) #532A0CFF srgba(83,42,12,1)
    12: (83,55,22,255) #533716FF srgba(83,55,22,1)
    6: (84,37,16,255) #542510FF srgba(84,37,16,1)
    21: (84,50,23,255) #543217FF srgba(84,50,23,1)
    146: (85,46,14,255) #552E0EFF srgba(85,46,14,1)
    36: (85,60,37,255) #553C25FF srgba(85,60,37,1)
    80: (85,70,44,255) #55462CFF srgba(85,70,44,1)
    131: (85,72,60,255) #55483CFF srgba(85,72,60,1)
    114: (86,39,4,255) #562704FF srgba(86,39,4,1)
    511: (86,46,18,255) #562E12FF srgba(86,46,18,1)
    163: (86,50,18,255) #563212FF srgba(86,50,18,1)
    30: (86,55,30,255) #56371EFF srgba(86,55,30,1)
    55: (86,73,68,255) #564944FF srgba(86,73,68,1)
    48: (87,64,85,255) #574055FF srgba(87,64,85,1)
    8: (89,42,18,255) #592A12FF srgba(89,42,18,1)
    53: (89,82,76,255) #59524CFF srgba(89,82,76,1)
    97: (89,88,87,255) #595857FF srgba(89,88,87,1)
    128: (90,46,14,255) #5A2E0EFF srgba(90,46,14,1)
    9: (90,121,90,255) #5A795AFF srgba(90,121,90,1)
    260: (91,50,18,255) #5B3212FF srgba(91,50,18,1)
    11: (91,54,25,255) #5B3619FF srgba(91,54,25,1)
    22: (92,60,28,255) #5C3C1CFF srgba(92,60,28,1)
    70: (92,76,47,255) #5C4C2FFF srgba(92,76,47,1)
    99: (93,79,66,255) #5D4F42FF srgba(93,79,66,1)
    125: (94,50,14,255) #5E320EFF srgba(94,50,14,1)
    32: (94,54,19,255) #5E3613FF srgba(94,54,19,1)
    111: (95,94,93,255) #5F5E5DFF srgba(95,94,93,1)
    121: (96,44,4,255) #602C04FF srgba(96,44,4,1)
    36: (96,64,36,255) #604024FF srgba(96,64,36,1)
    970: (97,82,69,255) #615245FF srgba(97,82,69,1)
    127: (98,82,70,255) #625246FF srgba(98,82,70,1)
    79: (98,83,51,255) #625333FF srgba(98,83,51,1)
    156: (98,86,70,255) #625646FF srgba(98,86,70,1)
    20: (99,62,29,255) #633E1DFF srgba(99,62,29,1)
    59: (99,72,94,255) #63485EFF srgba(99,72,94,1)
    36: (100,84,60,255) #64543CFF srgba(100,84,60,1)
    52: (100,92,84,255) #645C54FF srgba(100,92,84,1)
    124: (101,54,16,255) #653610FF srgba(101,54,16,1)
    7: (101,58,21,255) #653A15FF srgba(101,58,21,1)
    8: (102,82,68,255) #665244FF srgba(102,82,68,1)
    95: (102,86,70,255) #665646FF srgba(102,86,70,1)
    97: (102,86,74,255) #66564AFF srgba(102,86,74,1)
    97: (102,100,99,255) #666463FF srgba(102,100,99,1)
    33: (103,68,38,255) #674426FF srgba(103,68,38,1)
    109: (104,49,7,255) #683107FF srgba(104,49,7,1)
    10: (105,58,23,255) #693A17FF srgba(105,58,23,1)
    24: (105,74,50,255) #694A32FF srgba(105,74,50,1)
    28: (106,54,18,255) #6A3612FF srgba(106,54,18,1)
    33: (106,58,18,255) #6A3A12FF srgba(106,58,18,1)
    89: (106,89,54,255) #6A5936FF srgba(106,89,54,1)
    13: (107,86,75,255) #6B564BFF srgba(107,86,75,1)
    84: (107,91,75,255) #6B5B4BFF srgba(107,91,75,1)
    131: (108,54,11,255) #6C360BFF srgba(108,54,11,1)
    6348: (108,57,16,255) #6C3910FF srgba(108,57,16,1)
    27: (108,67,33,255) #6C4321FF srgba(108,67,33,1)
    56: (108,95,60,255) #6C5F3CFF srgba(108,95,60,1)
    15: (109,62,24,255) #6D3E18FF srgba(109,62,24,1)
    3: (110,57,22,255) #6E3916FF srgba(110,57,22,1)
    563: (110,58,18,255) #6E3A12FF srgba(110,58,18,1)
    40: (110,62,18,255) #6E3E12FF srgba(110,62,18,1)
    82: (110,80,107,255) #6E506BFF srgba(110,80,107,1)
    56: (113,74,39,255) #714A27FF srgba(113,74,39,1)
    87: (113,110,110,255) #716E6EFF srgba(113,110,110,1)
    258: (114,58,14,255) #723A0EFF srgba(114,58,14,1)
    51: (114,58,18,255) #723A12FF srgba(114,58,18,1)
    513: (114,62,18,255) #723E12FF srgba(114,62,18,1)
    13: (115,86,62,255) #73563EFF srgba(115,86,62,1)
    74: (115,105,90,255) #73695AFF srgba(115,105,90,1)
    12: (116,62,23,255) #743E17FF srgba(116,62,23,1)
    110: (117,99,59,255) #75633BFF srgba(117,99,59,1)
    68: (117,101,72,255) #756548FF srgba(117,101,72,1)
    143: (118,62,18,255) #763E12FF srgba(118,62,18,1)
    18: (118,67,25,255) #764319FF srgba(118,67,25,1)
    54: (120,80,44,255) #78502CFF srgba(120,80,44,1)
    83: (124,92,122,255) #7C5C7AFF srgba(124,92,122,1)
    37: (125,66,19,255) #7D4213FF srgba(125,66,19,1)
    148: (125,106,65,255) #7D6A41FF srgba(125,106,65,1)
    108: (125,125,125,255) #7D7D7DFF grey49
    59: (129,54,4,255) #813604FF srgba(129,54,4,1)
    86: (131,89,51,255) #835933FF srgba(131,89,51,1)
    78: (131,117,92,255) #83755CFF srgba(131,117,92,1)
    181: (133,114,69,255) #857245FF srgba(133,114,69,1)
    11: (136,76,29,255) #884C1DFF srgba(136,76,29,1)
    99: (140,102,138,255) #8C668AFF srgba(140,102,138,1)
    172: (142,122,74,255) #8E7A4AFF srgba(142,122,74,1)
    62: (144,63,5,255) #903F05FF srgba(144,63,5,1)
    79: (145,146,148,255) #919294FF srgba(145,146,148,1)
    57: (146,132,104,255) #928468FF srgba(146,132,104,1)
    194: (152,131,79,255) #98834FFF srgba(152,131,79,1)
    64: (161,69,3,255) #A14503FF srgba(161,69,3,1)
    187: (161,139,84,255) #A18B54FF srgba(161,139,84,1)
    54: (163,163,166,255) #A3A3A6FF srgba(163,163,166,1)
    152: (165,121,163,255) #A579A3FF srgba(165,121,163,1)
    188: (171,147,87,255) #AB9357FF srgba(171,147,87,1)
    126: (177,153,94,255) #B1995EFF srgba(177,153,94,1)
    64: (182,183,186,255) #B6B7BAFF srgba(182,183,186,1)
    65: (185,79,2,255) #B94F02FF srgba(185,79,2,1)
    134: (185,159,91,255) #B99F5BFF srgba(185,159,91,1)
    105: (189,164,99,255) #BDA463FF srgba(189,164,99,1)
    4: (190,176,148,255) #BEB094FF srgba(190,176,148,1)
    338: (196,143,189,255) #C48FBDFF srgba(196,143,189,1)
    51: (197,171,93,255) #C5AB5DFF srgba(197,171,93,1)
    109: (198,171,102,255) #C6AB66FF srgba(198,171,102,1)
    63: (203,178,107,255) #CBB26BFF srgba(203,178,107,1)
    80: (203,204,209,255) #CBCCD1FF srgba(203,204,209,1)
    95: (207,177,103,255) #CFB167FF srgba(207,177,103,1)
    144: (209,95,2,255) #D15F02FF srgba(209,95,2,1)
    40: (210,189,114,255) #D2BD72FF srgba(210,189,114,1)
    110: (212,183,106,255) #D4B76AFF srgba(212,183,106,1)
    120: (219,188,110,255) #DBBC6EFF srgba(219,188,110,1)
    59: (220,196,115,255) #DCC473FF srgba(220,196,115,1)
    184: (222,163,214,255) #DEA3D6FF srgba(222,163,214,1)
    68: (226,192,115,255) #E2C073FF srgba(226,192,115,1)
    59: (228,199,111,255) #E4C76FFF srgba(228,199,111,1)
    59: (230,208,123,255) #E6D07BFF srgba(230,208,123,1)
    88: (230,230,234,255) #E6E6EAFF srgba(230,230,234,1)
    130: (232,200,119,255) #E8C877FF srgba(232,200,119,1)
    7: (235,223,135,255) #EBDF87FF srgba(235,223,135,1)
    30: (237,216,127,255) #EDD87FFF srgba(237,216,127,1)
    59: (238,206,117,255) #EECE75FF srgba(238,206,117,1)
    87: (240,205,123,255) #F0CD7BFF srgba(240,205,123,1)
    71: (243,211,125,255) #F3D37DFF srgba(243,211,125,1)
    29: (245,214,130,255) #F5D682FF srgba(245,214,130,1)
    34: (245,219,125,255) #F5DB7DFF srgba(245,219,125,1)
    31: (245,220,131,255) #F5DC83FF srgba(245,220,131,1)
    44: (246,207,122,255) #F6CF7AFF srgba(246,207,122,1)
    2: (246,222,138,255) #F6DE8AFF srgba(246,222,138,1)
    9: (246,228,133,255) #F6E485FF srgba(246,228,133,1)
    1: (246,238,142,255) #F6EE8EFF srgba(246,238,142,1)
    22: (247,213,121,255) #F7D579FF srgba(247,213,121,1)
    33: (248,214,126,255) #F8D67EFF srgba(248,214,126,1)
    13: (249,229,138,255) #F9E58AFF srgba(249,229,138,1)
    42: (250,210,126,255) #FAD27EFF srgba(250,210,126,1)
    50: (250,218,130,255) #FADA82FF srgba(250,218,130,1)
    1: (250,218,134,255) #FADA86FF srgba(250,218,134,1)
    22: (250,222,134,255) #FADE86FF srgba(250,222,134,1)
    21: (250,223,130,255) #FADF82FF srgba(250,223,130,1)
    2: (252,212,118,255) #FCD476FF srgba(252,212,118,1)
    36: (253,219,126,255) #FDDB7EFF srgba(253,219,126,1)
    32: (253,234,134,255) #FDEA86FF srgba(253,234,134,1)
    144: (254,210,126,255) #FED27EFF srgba(254,210,126,1)
    3062: (254,213,127,255) #FED57FFF srgba(254,213,127,1)
    15: (254,214,126,255) #FED67EFF srgba(254,214,126,1)
    90: (254,214,130,255) #FED682FF srgba(254,214,130,1)
    8: (254,217,122,255) #FED97AFF srgba(254,217,122,1)
    504: (254,218,130,255) #FEDA82FF srgba(254,218,130,1)
    5: (254,218,134,255) #FEDA86FF srgba(254,218,134,1)
    1: (254,220,140,255) #FEDC8CFF srgba(254,220,140,1)
    346: (254,222,130,255) #FEDE82FF srgba(254,222,130,1)
    196: (254,222,134,255) #FEDE86FF srgba(254,222,134,1)
    10: (254,226,126,255) #FEE27EFF srgba(254,226,126,1)
    375: (254,227,134,255) #FEE386FF srgba(254,227,134,1)
    218: (254,229,138,255) #FEE58AFF srgba(254,229,138,1)
    149: (254,235,140,255) #FEEB8CFF srgba(254,235,140,1)
    36: (254,242,141,255) #FEF28DFF srgba(254,242,141,1)
    27: (254,242,146,255) #FEF292FF srgba(254,242,146,1)
    20: (254,249,149,255) #FEF995FF srgba(254,249,149,1)
    277: (254,254,255,255) #FEFEFFFF srgba(254,254,255,1)
    94311: (255,255,255,0) #FFFFFF00 srgba(255,255,255,0)
  Colormap entries: 256
  Colormap:
    0: (0,0,0,1) #000000FF black
    1: (254,213,127,1) #FED57FFF srgba(254,213,127,1)
...

And there is a GIF that this software can't read:
Image:
  Filename: test.gif
  Format: GIF (CompuServe graphics interchange format)
  Mime type: image/gif
  Class: PseudoClass
  Geometry: 942x807+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: PaletteAlpha
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 760194
    Red:
      min: 0  (0)
      max: 191 (0.74902)
      mean: 114.081 (0.447376)
      median: 0 (0)
      standard deviation: 70.4866 (0.276418)
      kurtosis: -0.990858
      skewness: -0.768517
      entropy: 0.483082
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 125.103 (0.4906)
      median: 0 (0)
      standard deviation: 85.1152 (0.333785)
      kurtosis: -0.88958
      skewness: -0.173986
      entropy: 0.475376
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 125.103 (0.4906)
      median: 0 (0)
      standard deviation: 85.1152 (0.333785)
      kurtosis: -0.88958
      skewness: -0.173986
      entropy: 0.475376
    Alpha:
      min: 0  (0)
      max: 255 (1)
      mean: 191.036 (0.749163)
      median: 0 (0)
      standard deviation: 110.541 (0.433495)
      kurtosis: -0.678534
      skewness: -1.14955
      entropy: 0.812602
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 138.831 (0.544435)
      median: 0 (0)
      standard deviation: 87.8146 (0.344371)
      kurtosis: -1.16615
      skewness: -0.29028
      entropy: 0.561609
  Alpha: none   #00000000
  Colors: 60
  Histogram:
    190685: (0,0,0,0) #00000000 none
    730: (53,53,53,255) #353535FF srgba(53,53,53,1)
    984: (59,59,59,255) #3B3B3BFF grey23
    580: (67,67,67,255) #434343FF srgba(67,67,67,1)
    388: (75,75,75,255) #4B4B4BFF srgba(75,75,75,1)
    627: (83,83,83,255) #535353FF srgba(83,83,83,1)
    18672: (93,93,93,255) #5D5D5DFF srgba(93,93,93,1)
    32777: (99,99,99,255) #636363FF grey39
    14: (103,105,105,255) #676969FF srgba(103,105,105,1)
    18209: (108,108,108,255) #6C6C6CFF srgba(108,108,108,1)
    393: (109,114,114,255) #6D7272FF srgba(109,114,114,1)
    15818: (115,115,115,255) #737373FF grey45
    19: (116,124,124,255) #747C7CFF srgba(116,124,124,1)
    13: (118,131,131,255) #768383FF srgba(118,131,131,1)
    15726: (123,123,123,255) #7B7B7BFF srgba(123,123,123,1)
    15: (123,138,138,255) #7B8A8AFF srgba(123,138,138,1)
    15: (124,131,131,255) #7C8383FF srgba(124,131,131,1)
    2: (127,145,145,255) #7F9191FF srgba(127,145,145,1)
    12469: (131,131,131,255) #838383FF srgba(131,131,131,1)
    33: (132,140,140,255) #848C8CFF srgba(132,140,140,1)
    11: (133,147,147,255) #859393FF srgba(133,147,147,1)
    13: (133,154,154,255) #859A9AFF srgba(133,154,154,1)
    13128: (140,140,140,255) #8C8C8CFF grey55
    93: (140,146,146,255) #8C9292FF srgba(140,146,146,1)
    7: (140,155,155,255) #8C9B9BFF srgba(140,155,155,1)
    4: (140,163,163,255) #8CA3A3FF srgba(140,163,163,1)
    6: (143,171,171,255) #8FABABFF srgba(143,171,171,1)
    15740: (147,147,147,255) #939393FF srgba(147,147,147,1)
    29: (148,155,155,255) #949B9BFF srgba(148,155,155,1)
    5: (148,178,178,255) #94B2B2FF srgba(148,178,178,1)
    44: (149,170,170,255) #95AAAAFF srgba(149,170,170,1)
    19: (150,162,162,255) #96A2A2FF srgba(150,162,162,1)
    3: (151,187,187,255) #97BBBBFF srgba(151,187,187,1)
    274521: (153,153,153,255) #999999FF grey60
    10: (155,187,187,255) #9BBBBBFF srgba(155,187,187,1)
    75: (156,164,164,255) #9CA4A4FF srgba(156,164,164,1)
    30: (156,170,170,255) #9CAAAAFF srgba(156,170,170,1)
    15: (156,179,179,255) #9CB3B3FF srgba(156,179,179,1)
    7: (156,193,193,255) #9CC1C1FF srgba(156,193,193,1)
    15: (161,173,173,255) #A1ADADFF srgba(161,173,173,1)
    101: (163,181,181,255) #A3B5B5FF srgba(163,181,181,1)
    6363: (164,164,164,255) #A4A4A4FF srgba(164,164,164,1)
    34: (164,203,203,255) #A4CBCBFF srgba(164,203,203,1)
    48: (165,189,189,255) #A5BDBDFF srgba(165,189,189,1)
    28: (165,195,195,255) #A5C3C3FF srgba(165,195,195,1)
    10: (166,212,212,255) #A6D4D4FF srgba(166,212,212,1)
    12: (169,196,196,255) #A9C4C4FF srgba(169,196,196,1)
    10850: (170,170,170,255) #AAAAAAFF srgba(170,170,170,1)
    23: (172,204,204,255) #ACCCCCFF srgba(172,204,204,1)
    28: (172,212,212,255) #ACD4D4FF srgba(172,212,212,1)
    39: (172,218,218,255) #ACDADAFF srgba(172,218,218,1)
    12: (174,225,225,255) #AEE1E1FF srgba(174,225,225,1)
    30: (176,214,214,255) #B0D6D6FF srgba(176,214,214,1)
    36: (178,220,220,255) #B2DCDCFF srgba(178,220,220,1)
    76: (180,228,228,255) #B4E4E4FF srgba(180,228,228,1)
    28: (181,234,234,255) #B5EAEAFF srgba(181,234,234,1)
    41: (183,241,241,255) #B7F1F1FF srgba(183,241,241,1)
    37: (184,237,237,255) #B8EDEDFF srgba(184,237,237,1)
    62: (187,244,244,255) #BBF4F4FF srgba(187,244,244,1)
    130392: (191,255,255,255) #BFFFFFFF srgba(191,255,255,1)
  Colormap entries: 64
  Colormap:
    0: (0,0,0,0) #00000000 none
...
    19: (132,140,140,1) #848C8CFF srgba(132,140,140,1)
    20: (140,140,140,1) #8C8C8CFF grey55
    21: (133,147,147,1) #859393FF srgba(133,147,147,1)
    22: (140,146,146,1) #8C9292FF srgba(140,146,146,1)
    23: (133,154,154,1) #859A9AFF srgba(133,154,154,1)
    24: (140,155,155,1) #8C9B9BFF srgba(140,155,155,1)
    25: (147,147,147,1) #939393FF srgba(147,147,147,1)
    26: (148,155,155,1) #949B9BFF srgba(148,155,155,1)
    27: (153,153,153,1) #999999FF grey60
    28: (140,163,163,1) #8CA3A3FF srgba(140,163,163,1)
 ...

I think second image can't be readed because:

*

*It has Alpha: none   #00000000 (first image has  Alpha: srgba(255,255,255,0)   #FFFFFF00);

*It has greyX entries in colormap;

So, how can i set Alpha as srgba instead of none and how can I replace grayX entries in colormap with srgba?

A: You should be able to set the alpha by setting the background colour then setting the alpha to the background... though it would help if we had your image via Dropbox or Google Drive.
magick unhappy.gif -background 'srgba(255,255,255,0)' -alpha background happy.gif


text:
Q: How to insert multiple values with popup LOV in Oracle APEX? I want to find a way to insert multiple values in a link table, for that I use popup LOV item, using this item users can choose multiple values. And I want to insert that values to link table.
I tried with
INSERT INTO LINK_TABLE (FK_1, FK_2)
VALUES (:P2_POPUP, :P2_RECORD2);

When I try to insert more than one value, I got ORA-01722: invalid number

A: I presume that

*

*P2_POPUP contains a single value, while

*P2_RECORD2 contains one or more values selected by user

*

*it means that Apex stores them as colon-separated values, which - furthermore ...

*... means that you have to split it into rows

For example: TEMP CTE "simulates" values that P2_POPUP (1) and P2_RECORD2 (10:30:40) contain. Query from line #3 to line #6 creates several rows out of it:
SQL> with temp (p2_popup, p2_record2) as
  2    (select 1, '10:30:40' from dual)
  3  select p2_popup,
  4    regexp_substr(p2_record2, '[^:]+', 1, level) p2_rec
  5  from temp
  6  connect by level <= regexp_count(p2_record2, ':') + 1;

  P2_POPUP P2_REC
---------- --------------------------------
         1 10
         1 30
         1 40

SQL>

It means that your code would look like this:
insert into link_table (fk_1, fk_2)
select :P2_POPUP,
       regexp_substr(:P2_RECORD2, '[^:]+', 1, level) p2_rec
from dual
connect by level <= regexp_count(:P2_RECORD2, ':') + 1;

redpajama_set_name: RedPajamaStackExchange


text:
Q: TTS- convert to WAV file i have successfully written and executed code for text to speech.
the code is able to speak out the text written in edittext.
but now i dont know how to convert it into .wav file and save it into directory.
as i am writing this code for api 15+, plz suggest me something.
my code:
@Override
    public void onInit(int status) {
        if (status == TextToSpeech.SUCCESS) {

            int result = tts.setLanguage(Locale.US);

            if (result == TextToSpeech.LANG_MISSING_DATA
                    || result == TextToSpeech.LANG_NOT_SUPPORTED) {
                Log.e("TTS", "This Language is not supported");
            } else {
              //  btnSpeak.setEnabled(true);
                speakOut();
            }

        } else {
            Log.e("TTS", "Initilization Failed!");
        }
    }

    private void speakOut() {

        String text = txtText.getText().toString();

        tts.speak(text, TextToSpeech.QUEUE_FLUSH, null);
    }

please some one help me...

A: You can use the method synthetizeToFile().
You have to create a File with FileProvider to avoid restricted files above api 24. You have also to pass a request id.
String utteranceId = "MyUtteranceId"
File file = /* file obtained with FileProvider */
int result = tts.synthesizeToFile(text, null, file, utteranceId);
if (result == TextToSpeech.SUCCESS) {
    // It was successfull.
} else {
    // Error occurred
}

This method returns an int representing the result (error or success).
I recommend you to move the synthetize on a background thread and dispatch the result on the UI thread after.
Take a look also to the File rendering and playback section of:
https://android-developers.googleblog.com/2009/09/introduction-to-text-to-speech-in.html


text:
Q: The order of $R^k \in D_n$, the $n$th dihedral group I am using Thomas Judson's open-sourced Abstract Algebra textbook, available at http://abstract.ups.edu/aata, and I'm having trouble with this problem:
Let $R$ represent a rotation element in $D_n$, the $n$th dihedral group. Prove that the order of $R^k \in D_n$ is $n/\gcd(n,k)$.
Here's what I've done/know so far:

*

*Let $n,k \in \mathbb{N}$. Treat $k$ as if it were under (mod $n$);
i.e. if $R^\kappa \in D_n$ such that $\kappa > n$, then rewrite
$\kappa$ as $\kappa \equiv k (\text{mod} \; n)$. Otherwise, we
already have that $R^k \in D_n$ such that $1 \leq k \leq n$.

*Because $R \in D_n$, $R^n=1$ means $R$ is a counter-clockwise
rotation of $2\pi/n$ radians, so $R^k$ would be a counter-clockwise
rotation of $2\pi k/n$ radians.

*For any arbitrary element $a$ in a group $G$, the order of $a$ is the
smallest positive integer $n$ such that $a^n=1$. ($e$ is typically
the identity element for this author; but, he tends to use $e=1$ for
permutation groups).

*By definition of greatest common divisor, there exist $a,b \in
   \mathbb{Z}$ such that $ak+bn = d = \gcd(n,k)$.

I don't know how to connect these things to the order of $R^k$.
Note: I don't know if any of these concepts are relevant, but references to these aspects of group theory are not (yet) developed for this author's course structure: cosets, Lagrange's theorem, Fermat's and Euler's theorems, isomorphisms, direct products, factor groups, normal subgroups, alternating groups, homomorphisms, automorphisms, Burnside's counting theorem, the class equation, and Sylow theorems. I'll get to those ideas in later chapters.

A: Since $R$ generates a cyclic subgroup $C_n$ of $D_n$, the element $R^k$ has order $n/gcd(n,k)$, because this holds in general for cyclic groups of order $n$, see here for a proof.


text:
Q: Picking objects of a given type from a List I have a Type object. I want to find every object in a List that is of this type. Is there something like list.OfType<> using a Type object? Or do I have to use it this way:
list.Where(obj => obj.GetType() == type) // corrected thanks to jmcilhinney

This will be heavily used in my application, so I need to find a solution that is as fast as possible.

A: You need to call Where:
var items = myList.Where(item => item.GetType() == myType);

A: You can't use OfType<T> in the case where you have the type stored in a variable.  Remember that, with generics, the type parameter is a compile-time constant.  Therefore you can't use a generic function by specifying T in a variable, which is not known until runtime.
To look at this another way, there are two possible variants of your function:
public IEnumerable<T> GetOfType<T>(IEnumerable<object> list)
{
    return list.OfType<T>();
}

public IEnumerable<object> GetOfType(IEnumerable<object> list, Type type)
{
    return list.All(obj => obj != null && obj.GetType() == type);
}

To use the generic version, ultimately some consumer of the function is going to need to supply the type as a compile-time constant.


text:
Q: How to catch invalid image from third party website when using PHP imagecreatefromstring I understand that we could use the below way to catch invalid image but for my case it is not able to catch the download timeout.
I am trying to get a image from a third party website and my script is keep loading
and no response at all.Maybe the way that I use to catch error is not good enough?
Could anyone advise a better way to catch invalid file and download timeout? Thanks!
$url = "https://www.example.com/image.jpeg";
if (checkRemoteFile($url))
{
    $imagefile = $url;
    $resource = imagecreatefromstring(file_get_contents($imagefile));

    if ($resource == true)
    {
      echo "Image Good";
    }
    else
    {
      echo "Image Bad";
    }
}
else
{
    echo "Invalid file";
}

function checkRemoteFile($url)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    // don't download content
    curl_setopt($ch, CURLOPT_NOBODY, 1);
    curl_setopt($ch, CURLOPT_FAILONERROR, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    if(curl_exec($ch)!==FALSE)
    {
        return true;
    }
    else
    {
        return false;
    }
}

A: The provided script works fine for me, to debug it check the curl error:
function checkRemoteFile($url)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    // don't download content
    curl_setopt($ch, CURLOPT_NOBODY, 1);
    curl_setopt($ch, CURLOPT_FAILONERROR, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec($ch);
    if ($result === false) {
        error_log(curl_error($ch));
    }

    curl_close($ch);

    return $result !== false;
}

This will log an error any time you get a bad response or timeout. If you're getting timeouts it could be that the host is down, I tested it with https://www.w3schools.com/css/trolltunga.jpg and it worked fine.


text:
Q: Oracle dynamic parameters I'm struggling to create a dynamic sql parametrized query. It involves using 'IS NULL' or 'IS NOT NULL'
Here's a simple pl/sql query:
CREATE OR REPLACE PROCEDURE GET_ALL_INFORMATION
(
  "PARAM_START_DATE" IN DATE,
  "PARAM_END_DATE" IN DATE,
  "PARAM_IS_SUBMITTED" IN NUMBER,
  "EXTRACT_SUBMITTED_CONTACTS" OUT sys_refcursor
) IS

sql_stmt    VARCHAR2(3000);
PARAM_CONDITION VARCHAR2(20);

BEGIN

IF PARAM_IS_SUBMITTED = 1 THEN
     PARAM_CONDITION := 'NOT NULL';
    ELSE
     PARAM_CONDITION :=  'NULL';
  END IF;

  sql_stmt := ' SELECT
  REGISTRATION_NUMBER,
  NAME PROVIDER_TYPE,
  ORGANIZATION
  FROM TABLE_A
  WHERE
  P.DATE_FINALIZED IS :A;

  OPEN EXTRACT_SUBMITTED_CONTACTS FOR sql_stmt USING PARAM_CONDITION;

Whereas the parameter (:A) in (USING PARAM_CONDITION) should have 'NULL' or 'NOT NULL'. It does not seem to work the way I envisioned.
Am I missing something?

A: As explained by GriffeyDog in a comment above, bind parameters could only be used as place holder for values. Not to replace keywords or identifiers.
However, this is not really an issue here, as you are using dynamic SQL. The key idea ifs that you build your query as a string -- and it will be parsed at run-time by the PL/SQL engine when you invoke EXECUTE or OPEN .. FOR.
Simply said, you need a concatenation -- not a bound parameter:
  ...
  sql_stmt := ' SELECT
  REGISTRATION_NUMBER,
  NAME PROVIDER_TYPE,
  ORGANIZATION
  FROM TABLE_A
  WHERE
  P.DATE_FINALIZED IS ' || PARAM_CONDITION;
  --                    ^^

  OPEN EXTRACT_SUBMITTED_CONTACTS FOR sql_stmt;


text:
Q: Does View.removeAllViews() release memory? I experienced OutOfMemory exception in my code, so I am reviewing the code.
I have a question, does View.removeAllViews() release the memory that were used by the child views that were previously added into this the parent view?
Thanks.

A: View.removeAllViews() might release the Views, and will schedule them for garbage collection (which could occur later) however you might still have a problem because @drawables in the XML or in your code with 'getDrawable()' could still consume memory.
I have struggled with OutOfMemory errors a lot myself and found that the biggest issue was not the Layout XML or the View objects, but the Drawables and Resources that they loaded (or I loaded to attach to them.)
A great talk on this can be found on YouTube from Google IO 2011:
http://www.youtube.com/watch?v=_CruQY55HOk
This talk introduces using the Eclipse MAT (Memory Analysis Tool) to troubleshoot OutOfMemory exceptions.  I suggest it because you mention you're reviewing code and the best place to start looking for an OutOfMemory error is ... "what is taking up my memory?"

A: Except if your code has references on the ViewGroup's child views, all ViewGroup's child views should be "garbage collectable".


text:
Q: [Twitter Streaming API]Is it possible to track keyword from the user's timeline? I have a code that could receive the PUBLIC API and filter by keywords, but now I want this filtering function only provide tweets from my home timeline.
I read the official materials about streaming api, it seems that these two things can be done separately, just not together because the parameters that "filter.json", "user.json" and others support are different, like "track" wouldn't work with "https://api.twitter.com/1.1/statuses/home_timeline.json" or "https://userstream.twitter.com/1.1/user.json", and there is no "with=follows" parameter in "filter.json".
Is there anyway I could make it track keywords from user's timeline? An example code would be awesome, or just tips that could put me in the right direction are much appreciated too.


text:
Q: Plyr/data.table subsetting I've got data that is arrayed in a way that has day/month/year in separate columns (which is useful for how I need to subset the data).  Each column besides the D/M/Y are columns of values.  In my real data, these are counties in the U.S.
I need to sum different ranges of dates that vary by different day, month and year combinations.  Given that each column is a county, the ddply/data.table/apply functions seem to be the most appropriate to solve the problem.  However, I cannot figure out how to subset my data.
Here is a trivial example:
set.seed(1234)

data <- data.frame(day=rep(seq(1,5),9), month= rep(c(rep(1,5),rep(2,5),rep(11,5)),3),
                   year=c(rep(1999,15),rep(2000,15),rep(2001,15)), Abel = round(runif(n=45, 0, 5),2) ,
                   Bertha=round(runif(n=45, 0, 5),2),  Charlie= round(runif(n=45,0, 5),2))

dt <- data.table(data)
keycols <- c("day", "month", "year")
setkeyv(dt, keycols) #not sure if this is necessary

Originally, I was thinking of using the ddply() command with the summarize option but have seen other instances where people have recommended using the data.table framework.  However, I cannot figure out a way to subset the data in such a way that would get it to match results as follows:
sum(data$Abel[which(data$year==1999 & data$month==2 & data$day >=1 & data$day <4)]) #4.41
sum(data$Bertha[which(data$year==1999 & data$month==2 & data$day >=1 & data$day <4)]) #5.51
sum(data$Charlie[which(data$year==1999 & data$month==2 & data$day >=1 & data$day <4)]) #4.19

While this example might seem easy, I have to calculate 10-day averages of climate data for hundreds of counties over decades, so getting the ddply/data.table framework to work would really help!
I have tried both data.table and ddply, but both with errors:
dt[i=list(year==1999, month==2, day >=1, day<3), sum]
#Error in `[.data.table`(dt, i = list(year == 1999, month == 2, day >=  :
#  typeof x.day (integer) != typeof i.day (logical)

I realize that this means that I'm doing something wrong with setting up the data.table, but I haven't used it before and have looked through several help files and can't figure out the subset issues.
For ddply, I get a different error when I just try to use one singular column to try and get it to work:
ddply(data, .(year, month, day, Abel), summarize, sum.val = sum )
#Error in vector(type, length) :
#  vector: cannot make a vector of mode 'builtin'.

Any guidance on solving this type of problem would be greatly appreciated!

A: I think you are close with data.table, you just need to modify how you are using the i statement.
dt[year==1999 & month==2 & between(day,0,2), lapply(.SD,sum), .SDcols=4:6]

   Abel Bertha Charlie
1: 3.25   1.92    4.06

You might also be interested in using the ISOdate function to make it a bit easier to work with your data.
dt[ , Date := ISOdate(year, month, day)]

From reading some of the comments in the other answer, it seems like this might be more of a rolling calc question. This https://github.com/mgahan/boRingTrees R package might of some help of you need running sums or averages or whatever.

A: Try this to start
library(reshape2)
datam <- melt(data, id.vars = c('day', 'month', 'year'),
              variable.name = "name")
library(dplyr)
datam %>%
  filter(year==1999, month==2, day %in% 1:3) %>%
  group_by(year, month, name) %>%
  summarise(summed = sum(value))

Source: local data frame [3 x 4]
Groups: year, month

  year month    name summed
1 1999     2    Abel   4.41
2 1999     2  Bertha   5.51
3 1999     2 Charlie   4.19


text:
Q: How to call JavaScript from native code
Possible Duplicate:
iOS JavaScript bridge

i am having one webview and one UIButton .
i want to make javascript call from native code .
How can i be able to do that .

A: Follow these links.
Using an html button to call a javascript function
http://devlicio.us/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx
http://www.webmasterworld.com/javascript/3749371.htm?highlight=msg3753441
These may help

A: NSString *param =@"Mango";
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"JSMethod('%@')", param]];

A: This may help you to solve your query:
[webView stringByEvaluatingJavaScriptFromString:@"myJSFunction()"];


text:
Q: Topology of classical compact groups? Let $O(n)$, $U(n)$, $SO(n)$ and $SU(n)$ be the orthogonal, unitary, special orthogonal and special unitary group respectively. What are the topology of these groups? (I'm just a beginner to algebraic topology, don't know much of differential topology). I am unable to find the answer to this question on the net, can someone tell me what the open sets of these topological spaces are?
My book just defines the sets and then goes on to prove that $SO(3)$ is homeomorphic to $RP^3$ without defining the topology of these groups.

A: All these groups are subgroups of the monoid $M  = M(n,\mathbb R)$ of real $(n \times n)$-matrices (note that the monoidal structure on $M$ is given by matrix multiplication). But $M(n,\mathbb R)$ is a real vector space of dimension  $n^2$ which can be identified via a linear isomorphism $\phi$ with $\mathbb R^{n^2}$. This gives us a topology on $M$ making $\phi$ a homeomorphism. It is easy to see that this topology does not depend on the choice of $\phi$. Your groups receive the subspace topology. Moreover, matrix multiplication in $M$ is easily seen to be continuous with respect to this topology. Finally, on the subgroup $GL(n,\mathbb R)$ of $M$ matrix inversion is easily seen to be continuous. Both properties transfer to your groups.


text:
Q: How do I position a central subtitle in my two-sided gplot-pyramid? I created an age-sex-pyramid using gplots. I would like to center a subtitle between the two sides of the pyramid.
However, I can only get the subtitle aligned with one of the two sides of the pyramid:
library(gplots)
agetable <- as.data.frame(cbind (c(2, 4, 7, 8, 10, 8, 6, 4, 2, 1),
                                 c(1, 3, 5, 9, 11, 6, 4, 1, 0, 1)))
names(agetable) <- c("Male", "Female")
maxdir <- max(agetable)
subtitle <- "34% of data are mising age or sex"

agegraph.general.bysex <- function(agetable, maxdir, varname, miss){
agegroups <-
if (varname=='Male') {
  datavec <- agetable[,'Male']
  lim = c(maxdir,0)
  agelabels = c('0-9','10-19','20-29','30-39','40-49','50-59',
                '60-69','70-79','80-89','90+')
} else {
  datavec <- agetable[,'Female']
  lim = c(0, maxdir)
     agelabels = ''
}
barplot2(
       datavec, horiz=TRUE, space=0, xlab = varname, xlim=lim, col='grey85',
       axisnames=TRUE, cex.axis = 1, cex.names = 1, names.arg=agelabels,
       plot.grid=TRUE, cex.sub = 0.8, sub = miss)
}

layout(matrix(1:2, ncol=2, nrow=1))
par(las=1, adj=0.5, omi=c(0.1, 0.1, 0.1 ,0.1), cex=0.8 , cex.lab=0.8)
par(mar=c(7,5,0,0))
agegraph.general.bysex(agetable, maxdir, 'Male', subtitle)
par(mar=c(7,0,0,5))
agegraph.general.bysex(agetable, maxdir, 'Female', '')

I would be grateful for any suggestions!

A: what about
mtext(subtitle,outer=T,side=1,line=-1)


text:
Q: .htaccess rewrite rule fix query string I am new to .htaccess and need something very simple, but i cannot seem to get it to work.
I have have an .htacces file already and mod_rewrite enabled.
I have tried several examples:
#RewriteEngine On
#RewriteCond %{QUERY_STRING} detail/(\d+) [NC]
#RewriteRule ^/detail/$ bestride.com/detail.php?id=%1 [L,R=301]

i have a url like this example.com/detail/23342343243432
i need to rewrite to example.com/detail.php?id=23342343243432
Just for the moment
How Do i do this.
Thanks

A: Try this:
RewriteEngine On
RewriteBase /
RewriteRule ^(detail)/(.*)$  detail.php?id=$2


text:
Q: Is the conjugacy problem solvable in $Out(F_n)$? There is a paper of Martin Lustig on his webpage giving a positive answer to the conjugacy problem for the outer automorphism group of the free group $F_n$. On the other hand, there seems not to be a publication in a journal about this, but several related publications. Is it possible to say which are the "best" results in this direction, with a complete proof ? (For example, a result by Sela if the outer automorphism group is finite, etc.).

A: One result in this direction is given by Dahmani .  His algorithm will determine conjugacy for pairs of atoroidal outer automorphisms, ie automorphisms that do not fix a non-trivial conjugacy class.  Note that he uses some very heavy machinery---his solution goes via the isomorphism problem for hyperbolic groups (solved by him and Guirardel along the lines pioneered by Sela).

A: The paper
D.G. Kharamtsov: Solvability of the conjugacy problem for finite subgroups
in automorphism groups of free groups, Algebra and Logic 34(5), 1995, 311-337
solves the conjugacy problem for finite subgroups of ${\rm Aut}(G)$ and
${\rm Out}(G)$, but states that the conjugacy problem for elements of
infinite order in these groups is still open, and that the "solution
appears to be a goal not easy to be reached". -- I don't know whether
this information is still up-to-date.
There does not seem to be an arXiv- or even published version of Martin Lustig's
preprint Structure and conjugacy for automorphisms of free groups.

A: The solution for "general Dehn twist" automorphisms of $Out(F_n)$, namely those which are products of powers of a commuting set of individual Dehn twists, is given in
MR1691946 (2000c:20058)
Cohen, Marshall M.; Lustig, Martin.
The conjugacy problem for Dehn twist automorphisms of free groups.
Comment. Math. Helv. 74 (1999), no. 2, 179–200.
For fully irreducible outer automorphisms, namely those for which no proper nontrivial free factor conjugacy class is periodic, although there is no publication that contains a complete description of the conjugacy problem, nonetheless it is a "folk theorem" [CORRECTION: see the post of User40911 for an attribution of this to J. Los, as I ought to have remembered since I wrote the MathSciNet review :-/ ]  that this case is completely covered by the train track technology given in
MR1147956 (92m:20017
Bestvina, Mladen; Handel, Michael.
Train tracks and automorphisms of free groups.
Ann. of Math. (2) 135 (1992), no. 1, 1–51.
That paper is not written with algorithmic issues in mind, so there are plenty of algorithmic details to fill in. But in outline, given a fully irreducible $\phi \in Out(F_n)$: it is understood that a train track representative of $\phi$ may be computed by following the procedure described in this paper (and there exist several computer implementations); and it is also understood that all of the finitely many train track representatives of $\phi$ (up to topological conjugacy) can similarly be computed; and, finally, this finite set of data is a complete conjugacy invariant for $\phi$.

A: Theorem 1 in http://www.zbmath.org/?q=an:00912201 (J. Loss On the conjugacy problem for automorphisms of free groups. Topology 35, n.3 p779-806, 1996)
states
"The conjugacy problem for the irreducible outer automorphisms of a free group admits a solution."


text:
Q: Plot nodes in d3.js Heatmap - Need Guidance I'm new to d3.js implementation. Need some help d3.js heatmap
I have a Requirement :
A heat map which shows the difference between each record. based on records Severity and Probability types:
Desired Image :

Data:
In the  Above output picture , You can see the circles :
Assume those as records being displayed on a graph .
Code for that starts after Comment " //Add dots or circles " .
Record data example :
{
"group":"Likely",
"variable":"Significant",
"value":79,
"record":"Retention of environmental safety records",
"color":"red"
}

Data for those records are in variable "dots" You can find in the code below. In that I have 3 records . But 2 circles are overlapping .
I have worked on a Heatmap Design .
Combining :
Heatmap : https://www.d3-graph-gallery.com/graph/heatmap_style.html
Connected scatter plot : https://www.d3-graph-gallery.com/graph/connectedscatter_tooltip.html
For now , I have just updated the data :
I have 2 Issues :

*

*Overlapping  dots issue

*Tooltip not showing after Updating to svg

Detail:
1. Overlapping  dots issue
Data for those records are in variable "dots" You can find in the code below. In that I have 3 records . But 2 circles are overlapping .
The desired Output is something like this : Circles should not be Overlapped .
If two records with same data , It should display 2 records. I need help in implenting that . Any suggestion is appreciated .
** 2. ToolTip Issue :**
I had an Issue with Tooltip (It was working with div tag ) previously it was as shown below :

Due to Some requirement i had to go with svg tag in the Html rather than Div tag . since This has to be implemented in Lwc in Salesforce.
Html Updated from div to Svg as shown below :

After Updating ,
Entire Heatmap is working except the Tooltip part .
Updated the Tooltip part to Svg as shown below :
Now the Tooltip is not working .
code :

    <!DOCTYPE html>
    <meta charset="utf-8">

 <svg
                class="d3"
                width={svgWidth}
                height={svgHeight}
                lwc:dom="manual"
            ></svg>

Output (Updated) :

Can someone help me in resolving these issues.
I need to display the multiple dots inside the same squares, each dot as a seperate element . when you hover over it It should display the record it represents.
Any suggestion is appreciated . Thankyou

A: Give your tooltip a position of fixed:
.style("position","fixed")

This will allow the top and left attributes to impact its positioning.
To make the dots appear within the boxes, change your cx attribute to:
.attr("cx", function(d) { return x(d.group) + x.bandwidth()/2 } )

That should center the dots within each box.
To give the dots their own positioning, the dots need to have their own y and x scales. Just make sure it has the same width and height.
Do you have another dataset for this? If not, I wonder if a different scale would give you the outcome you are looking for.


text:
Q: Generating a table with dates from a table without dates in Postgresql I would like to create a table that has a list of dates from a table that doesn't have dates.
So table A would be (without any dates):
product_name
1
2
3
4
5
6
7
8
9
10

table B would be:
dates
01/01/2022
02/01/2022
03/01/2022
04/01/2022
05/01/2022
...
etc to 31/12/2022

My final outcome table would be:
product_name dates
1             01/01/2022
1             02/01/2022
1             03/01/2022
1             04/01/2022
1             05/01/2022
1             05/01/2022
etc all the way to 31/12/2022

but also further down
product_name  dates
2             01/01/2022
2             02/01/2022
etc..

Is there a way to do this simply? I have tried
select date_trunc('day', dd) date
from pg_catalog.generate_series
                ( '2022-01-01' :: timestamp
                 ,'2022-12-31' :: timestamp
                 , '1 day' :: interval) dd
                ;

But I couldn't join as there are no dates in table A.


text:
Q: Function not returning empty string I'm writing a function for a nodejs application that is intended to display a license badge based on which one is chosen from a list and to return an empty string when the 'none' option is selected. The badges are displayed as expected for every option, but when 'none' selected, the badge is still displayed as 'none'.
function renderLicenseBadge(license) {
  if (license.licence !== 'none') {
    return (`[![License: ${license.license}](https://img.shields.io/badge/license-${license.license}-blue.svg)](#license)`);
  } else {
    return '';
  }
};


text:
Q: SwiftUI - NSFontPanel and Color Picker I am trying to get NSFontPanel/NSFontManager to work in a SwiftUI Document Template app. I have the following which is a customize version of one I found on GitHub. This lets me pick the size, face, style, etc.
Interestingly, a color picker is included in the FontPanel. The documentation doesn't seem to say this. Is this something new?
Anyway, I would like to either be able to use the color picker to let the user select a color, or if not I would like to hide the color picker - at is not "critical" to this application. I am using this to allow customization of text in a sidebar, so color is nice, but not necessary. Currently the Font settings are working, but the color selection displays, and let you pick on, but it always returns System Color.
Any help would be appreciated.
NOTE: I didn't include the FontPickerDelegate, it just calls this:
public struct FontPicker: View{

    let labelString: String
    @Binding var font: NSFont
    @State var fontPickerDelegate: FontPickerDelegate?

    public init(_ label: String, selection: Binding<NSFont>) {

        self.labelString = label
        self._font = selection
    }

    let fontManager = NSFontManager.shared
    let fontPanel = NSFontPanel.shared

    @AppStorage("setSidebarFont") var setSidebarFont = "System"
    @AppStorage("setSidebarFontSize") var setSidebarFontSize = 24
    @AppStorage("setSidebarFontColor") var setSidebarFontColor = "gray"

    public var body: some View {

        HStack {

            Text(labelString)

            Button {

                if fontPanel.isVisible {
                    fontPanel.orderOut(nil)
                    return
                }

                self.fontPickerDelegate = FontPickerDelegate(self)
                fontManager.target = self.fontPickerDelegate
                fontManager.action = #selector(fontPickerDelegate?.changeAttributes)

                fontPanel.setPanelFont(self.font, isMultiple: false)
                fontPanel.orderBack(nil)

            }  label:  {

                Text("Font Selection: \(setSidebarFont)")
                    .font(.custom(setSidebarFont, size: CGFloat(setSidebarFontSize)))
            }
        }
    }

    func fontSelected() {

        self.font = fontPanel.convert(self.font)
        setSidebarFont = self.font.displayName ?? "System"
        setSidebarFontSize = Int(self.font.pointSize)

        var newAttributes = fontManager.convertAttributes([String : AnyObject]())

        newAttributes["NSForegroundColorAttributeName"] = newAttributes["NSColor"]
        newAttributes["NSUnderlineStyleAttributeName"] = newAttributes["NSUnderline"]
        newAttributes["NSStrikethroughStyleAttributeName"] = newAttributes["NSStrikethrough"]
        newAttributes["NSUnderlineColorAttributeName"] = newAttributes["NSUnderlineColor"]
        newAttributes["NSStrikethroughColorAttributeName"] = newAttributes["NSStrikethroughColor"]

        print("\(newAttributes["NSForegroundColorAttributeName"]!)")
    }
}


text:
Q: How to update the SKU's of ordered products in magento I have to update the product sku to new sku so that was done easily, but after that only realized i should update the ordered product sku's too.
How can i update the ordered product sku in magento. Please help me.
I tried this one
$orders = Mage::getModel('sales/order')->loadBySku("sku");

But this returns fatal error

Fatal error: Uncaught exception
  'Varien_Exception' with message
  'Invalid method
  Mage_Sales_Model_Order::loadBySku(Array
  ( [0] => koboonyx ) )' in
  /home/makegood/public_html/mage34/lib/Varien/Object.php:567 Stack trace: #0
  /home/makegood/public_html/mage34/sku.php(7):
  Varien_Object->__call('loadBySku',
  Array) #1
  /home/makegood/public_html/mage34/sku.php(7):
  Mage_Sales_Model_Order->loadBySku('koboonyx')
  2 {main} thrown in /home/makegood/public_html/mage34/lib/Varien/Object.php
  on line 567

Or do i have to load orders by order id and then should update the sku to new sku
Like this
$order = Mage::getModel('sales/order')->load($order_id);
foreach ($items as $itemId => $item)
{

}

Please help me

A: Perhaps you mean to do this:
$orderItems = Mage::getModel('sales/order_item')->getCollection()
    ->addAttributeToFilter('sku', $oldSKU);
foreach ($orderItems as $item) {
    $item->setSku($newSKU)
        ->save();
}


text:
Q: React: Uncaught TypeError: tokenIds.map is not a function I am using React to generate components from an array held in state via hooks. Initialized array is working without any problems, but it stops working after update of its state:
export function AiShip(props) {
    const shipType = props.shipType;
    const maxShields = Ships[shipType][Stats.shields];
    const maxHull = Ships[shipType][Stats.hull];
    const squadId = props.squadId;

    const [targetPosition, setTargetPosition] = useState([PSN.FARFRONT]);
    const [tokenIds, setTokenIds] = useState([3, 4]); //todo remove initial values

    function handleTokenIdChange(value, index) {
        const tTokenIds = tokenIds;
        tTokenIds.splice(index, 1, value);
        setTokenIds(...tTokenIds);
        };

    return (

{Ships[props.shipType][Stats.name]}

                    <ShipStats shipType={shipType}/>

ID:

Shields:

Hull:

                    {
                        tokenIds.map( (tokenId) =>
                             <ShipVariables key={tokenIds.indexOf(tokenId)} maxShields={maxShields} maxHull={maxHull}
                                           tokenIdIndex={tokenIds.indexOf(tokenId)}
                                           handleTokenIdChange={handleTokenIdChange}/>)
                    }

State is updated via the handleTokenIdChange function. The resulting array is still an array (I checked that through the Array.isArray function). The code for triggering the state update is here:

                    <Select options={idOptions} onChange={e => props.handleTokenIdChange(e.value, props.tokenIdIndex)}/>

I know that typically the problem is that the variable is not an array but e.g. an object - but that doesn't seem to be the case here. The result is still an array storing a number. The select allows user to choose one of these values:
const idOptions = [
        {value: 0, label: 0},
        {value: 1, label: 1},
        {value: 2, label: 2},
        {value: 3, label: 3},
        {value: 4, label: 4},
        {value: 5, label: 5},
        {value: 6, label: 6},
        {value: 7, label: 7},
        {value: 8, label: 8},
        {value: 9, label: 9},
    ];

This is the error stack:
AiShip.js:49 Uncaught TypeError: tokenIds.map is not a function
    at AiShip (AiShip.js:49)
    at renderWithHooks (react-dom.development.js:16260)
    at updateFunctionComponent (react-dom.development.js:18347)
    at beginWork$1 (react-dom.development.js:20176)
    at HTMLUnknownElement.callCallback (react-dom.development.js:336)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:385)
    at invokeGuardedCallback (react-dom.development.js:440)
    at beginWork$$1 (react-dom.development.js:25780)
    at performUnitOfWork (react-dom.development.js:24698)
    at workLoopSync (react-dom.development.js:24671)
    at performSyncWorkOnRoot (react-dom.development.js:24270)
    at react-dom.development.js:12199
    at unstable_runWithPriority (scheduler.development.js:697)
    at runWithPriority$2 (react-dom.development.js:12149)
    at flushSyncCallbackQueueImpl (react-dom.development.js:12194)
    at flushSyncCallbackQueue (react-dom.development.js:12182)
    at discreteUpdates$1 (react-dom.development.js:24423)
    at discreteUpdates (react-dom.development.js:1438)
    at dispatchDiscreteEvent (react-dom.development.js:5881)
    ```

A: The problem is here, in the handleTokenIdChange function:
setTokenIds(...tTokenIds);

tTokenIds is an array, but ...tTokenIds isn't:
let myArray = [1,2,3]
console.log(...myArray) // 1 2 3

So you can't use .map on it.
Solution
Given the context, I assume you were trying to use destructuring to create a copy of your array. Instead of doing ...tTokenIds, you have to use [...tTokenIds]:
let myArray = [1,2,3]
console.log([...myArray]) // [1, 2, 3]

You can also use Array.prototype.slice() to create a copy of an array:
console.log(myArray.slice()) // [1, 2, 3]

Important to know
Note that creating a copy of your state object before doing any modifications to it is a better practice:
function handleTokenIdChange(value, index) {
    const tTokenIds = [...tokenIds];
    tTokenIds.splice(index, 1, value);
    setTokenIds(tTokenIds);
}

A: When you spread the array via
setTokens(...tTokenIds)

Your state no longer becomes an array, each item is extracted as individual value during a spread. Therefore, it would most likely just result in the first item of the array becoming the state and the rest ignored, hence why map is no longer possible.
You need to spread the array into a new array i.e. [...tTokenIds], or you could just use tTokenIds.slice() to clone the array.
Please note that this will not clone the items already in the array, they will still be the same instances from the previous array


text:
Q: Remove query string - rewrite rule How do i remove a query string from the end of a url?
To be more specific, this is my rewrite rule:
RewriteRule example-(.*).html$ examples/view-example.php?param1=parameter&param2=$1&split=-

and I want this to return a 404 or a redirect to www.mydomain.com/example-one.html :
www.mydomain.com/example-one.html?param1=parameter&param2=one&split=-

This is what i tried, it doesn't work:
RewriteCond %{REQUEST_URI}  /examples/view-example\.php
RewriteCond %{QUERY_STRING} param1=parameter&param2=(.*)&split=-
RewriteRule ^(.*)$ http://mydomain.com/example-%1.html$

I think that RewriteRule ^(.*)$ http://mydomain.com/example-%1.html$ isn't correct..

A: This should do the trick:
RewriteCond %{QUERY_STRING} ^param1=parameter&param2=(.*)&split=-
RewriteRule ^/examples/view-example\.php$ http://mydomain.com/example-%1.html [R=301]

Though, I didn't understand what you wanted to do with www.mydomain.com/example-one.html?param1=parameter&param2=one&split=-


text:
Q: Concatenation possible in ng-model? Just a simple question is it possible to concatenate a string called "id" inside the ng-model to variable product.id in angularjs? Is there a way a approach like this could actually work?
This works:
ng-model="currentQuantity['id1']"

This doesn't work:
ng-model='currentQuantity[id + "" + product.id]'

A: You need to quote the string id or it will be evaluated as a scope variable
Change:
ng-model='currentQuantity[id + "" + product.id]'

to
ng-model='currentQuantity["id" + product.id]'

A: One possible workaround would be to use a two dimensional variable to represent your ng-model, i.e.
ng-model='currentQuantity[id][product.id]'


text:
Q: Change date based on time using XSLT I have an xml file with attendance report, each user has an "interval" element.
The problem here is that when the staff sign out the next day the date is always set as the In date even for the Out element (example the second  element):
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<transferStaffAttendance version='0.2'>
    <user>100994</user>
       <intervalStart>2020-03-02</intervalStart>
       <intervalEnd>2020-03-02</intervalEnd>
    <entries>
    <entry>
    <entryStart>
         <date>2020-03-02</date>
         <time>06:37</time>
    </entryStart>
    <entryEnd>
         <date>2020-03-02</date>
         <time>15:34</time>
    </entryEnd>
    </entry>
    </entries>
</interval>
<interval>
    <user>101400</user>
       <intervalStart>2020-03-02</intervalStart>
       <intervalEnd>2020-03-02</intervalEnd>
    <entries>
    <entry>
    <entryStart>
         <date>2020-03-02</date>
         <time>00:00</time>
    </entryStart>
    <entryEnd>
         <date>2020-03-02</date>
         <time>00:00</time>
    </entryEnd>
    </entry>
    </entries>
</interval>
<interval>
    <user>102806</user>
       <intervalStart>2020-03-02</intervalStart>
       <intervalEnd>2020-03-02</intervalEnd>
    <entries>
    <entry>
    <entryStart>
         <date>2020-03-02</date>
         <time>18:47</time>
    </entryStart>
    <entryEnd>
         <date>2020-03-02</date>
         <time>03:10</time>
    </entryEnd>
    </entry>
    </entries>
</interval>
</transferStaffAttendance>

I want to change the date to the next date if the user sign out after midnight by calculating the difference between In and Out  value like following:
<interval>
    <user>102806</user>
       <intervalStart>2020-03-02</intervalStart>
       <intervalEnd>2020-03-03</intervalEnd>
    <entries>
    <entry>
    <entryStart>
         <date>2020-03-02</date>
         <time>18:47</time>
    </entryStart>
    <entryEnd>
         <date>2020-03-03</date>
         <time>03:10</time>
    </entryEnd>
    </entry>
    </entries>
</interval>

How can I do this using XSLT?

A: In XSLT 2 and 3 you can do date arithmetics using the operator + and an xs:date and a duration as the operands:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    version="3.0">

  <xsl:mode on-no-match="shallow-copy"/>

  <xsl:template match="interval[entries/entry/entryEnd/time < entries/entry/entryStart/time]/intervalEnd
                       |
                       interval/entries[entry/entryEnd/time < entry/entryStart/time]/entry/entryEnd/date">
      <xsl:copy>
          <xsl:value-of select="xs:date(.) + xs:dayTimeDuration('P1D')"/>
      </xsl:copy>
  </xsl:template>

</xsl:stylesheet>


text:
Q: i run dotnet "hello world" from command line, how do i continue to run app from github new to dotnet
my primary goal is running this repo from github that allows you to automate downloads from soulseek (music sharing service).
my end goal is to automate a pipeline in which i extract song lists from my spotify (using python and spotipy) and download them at high quality from soulseek. (i'm aware of the option to download directly with python from youtube, don't like the quality of output)
what i did so far:

*

*installed dotnet-sdk-6.0

*run "hello world"

*created new "webapp" project (here's already a question, is that the correct project type to choose?)
4.installed soulseek package available at nuget (link in the repo) with add package command

*dotnet run

*all that resulted in a clean web page with no sign of soulseek. not sure how to continue.
bottom line, i would appreciate an overview of the steps i should take. it's not very clear. especially, where is the first steps in the repo (after installing nuget which i think i passed successfully) take place?
specifically, where to i type these lines?? (and other lines following)
var client = new SoulseekClient();
await client.ConnectAsync("Username", "Password");


text:
Q: web scraping (script nonce) using beautifulsoup this is the image which shows the extra amount of datahow can i extract the code from script tag from a specific nonce,I tried many ways but can fetch extragavant data,I cannot extract only the exact limit of data.

    import requests, bs4
    import json
    # getting HTML from the Google Play web page
    url = "https://play.google.com/store/apps/details?id=com.facebook.orca&hl=en"
    req = requests.get(url)
    soup = bs4.BeautifulSoup(req.text, 'html.parser')
    # print(soup.prettify())
    reviews = soup.find_all('script')

A: You just need to use soup.find() instead of soup.find_all().
If the specific nonce you are interested in is s6eT15ofB4Da+TMeu645CA, then just add this to the bottom of the code you already have:
soup.find(nonce="s6eT15ofB4Da+TMeu645CA")


text:
Q: View complete AXL request I'm using this library in node.js to make SOAP API calls:
https://github.com/vpulim/node-soap
These calls are being made to Cisco CUCM (VOIP application server).  This is the code I'm using.  To give context, all it's trying to do is get the details for a specific phone with getPhone method, with device name SEPAAAABBBBCCCC in this example.
var soap = require("soap");

var url = "AXLAPI.wsdl";
var auth = "Basic " + new Buffer("axl" + ":" + "cisco").toString("base64");
var args = {
name: "SEPAAAABBBBCCCC"
};

soap.createClient(url, function(err, client) {
    client.setEndpoint("https://192.168.138.15:8443/axl");
    client.addHttpHeader("Authorization", auth);
    client.setSecurity(new soap.ClientSSLSecurity(undefined,undefined, undefined, {rejectUnauthorized: false,},));

    client.getPhone(args, function(err,result) {
        if (err) {
            console.log("soap api error is: " + err);
            console.log("last request: " + client.lastRequest);
            process.exit(1);
        }

    console.log("result is: " + result);
    });

    if (err) {
        console.log("soap client error is: " + err);
    }
});

It's not working.  When I print the error it only says "Error: Cannot parse response." which is not very helpful.  I thought about taking a packet capture but the application only allows for HTTPS so all traffic is encrypted.
What I want to do is log the complete packet details ie HTTP headers and XML request, and also complete HTTP response.  I know client.lastRequest will show the XML but I need to see the HTTP headers as well, since Cisco requires some custom ones.  Any ideas?


text:
Q: Run a script.php on cron job on linux/apache server but restrict public access to the php file I have this script.php file which i want to run as a cron job on my linux/apache server.
However, i do not want public to access www.mycompanyname.com/script.php and also run the script concurrently.
How can we prevent that? How can we restrict the script to the server's access only?
Is it using chmod or setting something inside .htaccess file, something along the line?
Any advice ?

A: You can do this as the first line of PHP in script.php...
if (PHP_SAPI !== 'cli') {
    exit;
}

If someone hits your script via HTTP, the PHP_SAPI will be cgi I believe, and not cli, causing your script to exit straight away.
Of course, this relies on your cron calling php script.php.
You could also send...
header('HTTP/1.0 404 Not Found');

... or of course, leave it outside your web root.

A: If you put the script outside of the webroot folder it will not be accessible through your webserver.
e.g.
your webroot is at /var/www/public_html/
you put the script.php outside of that folder, for example: /var/www/

A: You probably have something like a public_html directory, in which you have all the phps. Just put it outside of that directory.

A: Method 1.
If you are executing PHP directly from the Cron Job e.g. php /path/to/your_script.php then add the following line at the top of your PHP script:
if (php_sapi_name() !='cli') exit;

Method 2.
If the Cron Job uses wget, curl or lynx to run your script via its URL, then insert this code at the top of your PHP script (change the User Agent string to one known only by you) :
if ($_SERVER['HTTP_USER_AGENT'] != 'yourSecretAgent') exit;

You will also have to set the User Agent in the Cron Job; as in this wget example:
wget -O - --user-agent="yourSecretAgent" http://example.com/your_script.php


text:
Q: is it possible to send a respose from udp server to client ? I posted my code here: communication between windows client and linux server?
I am performing communication between client and server.I know that udp is a connectionless program nothing but it wont send any response back to the client. If i want to send a response back to the client then what should i do ??
I solved all my errors in the above link but I got a doubt w.r.t sending a response back to the client. so i am re posting here.

A: This is the code I wrote when I start learning socket programming, hope it helps:
server
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>

int main(int argc, char *argv[])
{
    struct sockaddr_in server;
    struct sockaddr_in client;
    int socket_fd;
    int ret;
    char buf[255];
    int len = sizeof(struct sockaddr_in);

    socket_fd = socket(AF_INET, SOCK_DGRAM, 0);
    if(socket_fd < 0)
    {
        printf("socket error\n");
        return -1;
    }

    server.sin_family = AF_INET;
    server.sin_port = htons(5900);
    server.sin_addr.s_addr = htonl(INADDR_ANY);

    ret = bind(socket_fd, (struct sockaddr *)&server, sizeof(struct sockaddr));
    if(ret)
    {
        printf("error while binding\n");
        return -1;
    }

    ret = recvfrom(socket_fd, buf, sizeof(buf), 0, (struct sockaddr *)&client, &len);

    if(ret < 0)
    {
        printf("reciving error\n");
    }

    printf("recving data from %s: %s\n", inet_ntoa(client.sin_addr), buf);

    snprintf(buf, sizeof(buf), "server:");
    ret = sendto(socket_fd, buf, sizeof(buf), 0, (struct sockaddr *)&client, sizeof(client));

    if(ret < 0)
    {
        printf("send error\n");
        return -1;
    }

    close(socket_fd);

    return 0;
}

client
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>

int main(int argc, char *argv[])
{
    int socket_fd;
    struct sockaddr_in server;
    int ret;
    char buf[255] = "send to server";
    int len = sizeof(struct sockaddr_in);

    socket_fd = socket(AF_INET, SOCK_DGRAM, 0);
    if(socket_fd < 0)
    {
        printf("socket error\n");
    }

    server.sin_family = AF_INET;
    server.sin_port = htons(5900);
    server.sin_addr.s_addr = inet_addr("127.0.0.1");

    ret = sendto(socket_fd, buf, sizeof(buf), 0, (struct sockaddr *)&server, sizeof(server));

    if(ret < 0)
    {
        printf("sendto error\n");
        return -1;
    }

    ret = recvfrom(socket_fd, buf, sizeof(buf), 0, (struct sockaddr *)&server, &len);
    if(ret < 0)
    {
        printf("error recv from\n");
        return -1;
    }
    printf("recving from server:%s: %s\n", inet_ntoa(server.sin_addr), buf);

    close(socket_fd);
}

Read the code above and you will find the answer to your question


text:
Q: What is the term for the open space on desks that chairs fit into? What is the term for the open space on desks that chairs fit into? Is it just called a chair slot? A compartment for chairs?

A: Kneehole:

*

*an open space for the knees and legs, as under a desk.

Dictionary.com
Ngram : kneehole
From Whispers Along the Rails:

*

*folded herself into the deep kneehole of Mr. Mahafferty's oak desk.............. After waiting several minutes, Olivia peeked around the edge of the kneehole before  ...

From American Furniture:

*

*the more open dressing table, the kneehole form does not provide much room for a sitter's knees.  Contemporary paintings show owners sitting sideways to both forms,

A: A well on a piece of furniture would normaly be a sunken recess on the surface.An example would be the well on a joiners workbench running down the center of the bench or the ink well hole in an old school desk. What you are referencing would, to me, be more akin to a kneehole.

A: I know that I have read the term "well" used for exactly this meaning as in "the well of the desk" or "he hid in the well of the desk, out of sight from the door".  However, I have not been able to find any online confirmation of this.


text:
Q: Setting multiple Apache2 VirtualHosts to use same DocumentRoot? First, this seems to be working fine on my server, but I am wondering about any "unknown" implications, especially any public-facing problems that could occur, such as "Google now hates your server..."
I have about 10 domains which are just serving a simple "We're offline" message.
I want all of these "offline" <VirtualHosts> to use the same <DocumentRoot>, like so:
<VirtualHost *:80>
      ServerName example1.com
      ServerAlias www.example1.com
      DocumentRoot /www/_offline.com
   <Directory /www/_offline.com>
      ...[snip]...
   </Directory>
</VirtualHost>

<VirtualHost *:80>
      ServerName example2.com
      ServerAlias www.example2.com
      DocumentRoot /www/_offline.com
   <Directory /www/_offline.com>
      ...[snip]...
   </Directory>
</VirtualHost>

Am I going to have any problems with this setup, or is this actually okay?

A: This should be fine.  You can optimise this somewhat by just using ServerAlias directives for all of your FQDNs in the one vhost, but it's not required.


text:
Q: Trouble turning the screen horizontally in ffmpeg first of all I will try to explain this problem by using google translate because I do not know English well.
I'm trying to post my screen recording on my webcam with ffmpeg. My screen is reversed horizontally in a way that I don't understand when I do this. I will need help for this.
ffmpeg -f x11grab -r 60 -s 1366x768 -i :0+0,0 -vf hflip -vf scale=1920x1080 -pix_fmt yuv420p -f v4l2 /dev/video50

I did a few researches on the internet to fix this. A few parameters like -vf vflip are used, but I have tried almost all of them.
But I couldn't get any results.
Screenshot:

I hope a solution will be found.

A: All filters should be in one filtergraph.
-vf hflip -vf scale=1920x1080  ==>  -vf "hflip,scale=1920x1080"


text:
Q: after upgrading to rails 5.1.7 have an error ArgumentError: invalid argument: nil after upgrading to rails 5.1.7 have an error ArgumentError: invalid argument: nil.
tests:
describe 'default_for scope' do
    it 'joins intel_tags' do
      scope = IntelTagging.default_for('something')
      expect(scope.joins_values).to include(:intel_tag)
    end

    it 'uses IntelTag.default_for' do
      expect(IntelTag).to receive(:default_for).with('something')
      IntelTagging.default_for('something')
    end
  end

models:
class IntelTagging < ApplicationRecord
...
belongs_to :intel_tag, inverse_of: :intel_taggings, optional: true
accepts_nested_attributes_for :intel_tag

validates_presence_of :intel_tag

scope :default_for, ->(type) {
    joins(:intel_tag).merge(IntelTag.default_for(type))
  }

  scope :key, ->(key) { joins(:intel_tag).merge(IntelTag.key(key)) }
...
end

class IntelTag < ApplicationRecord
...
has_many :intel_taggings, inverse_of: :intel_tag, dependent: :destroy

scope :default_for, ->(string) { where(arel_table[:default_for].matches("%#{string}%")) }
...
end

I found that in rails 5 it a bit changed -> Raise ArgumentError when passing nil or false to Relation#merge.
These are not valid values to merge in a relation so it should warn the users early.
I did the following which quite ugly:
scope :default_for, ->(type) {
    joins_intel_tag = joins(:intel_tag)
    joins_intel_tag.merge(IntelTag.default_for(type)) if joins_intel_tag.present?
  }

but still have an error
 (IntelTag(id: integer, managed: boolean, default_for: text, unmanaged_name: string, name_en: string, name_fr: string, name_it: string, name_de: string, deleted_at: datetime, created_at: datetime, updated_at: datetime, key: string) (class)).default_for("something")
           expected: 1 time with arguments: ("something")
           received: 0 times

A: Currently did the following to make test pass but still investigating & searching for the better solution:
scope :default_for, ->(type) {
    joins(:intel_tag).merge(IntelTag.default_for(type)) unless IntelTag.default_for(type).nil?
  }

  scope :key, ->(key) {
    IntelTag.key(key).nil? ? joins(:intel_tag) : joins(:intel_tag).merge(IntelTag.key(key))
  }


text:
Q: Getting undefined value when trying to reference another object? My code is something like this (simplified for the sake of example):
var geography = {
    vocab: {
        domains: {
            isoType: {
                "1" : "Isobars Feet",
                "2" : "Isobars Fathoms",
                "3" : "Isobars Meters",
                "4" : "Contours Feet",
                "5" : "Contours Meters",
                "6" : "Multiple Isobar Types",
                "7" : "No Isobar Indicated"
            } // end isoType
        }, // end domains
        attributes: {
            "ISO_TYPE" : ["Isobar Type", geography.vocab.domains.isoType],
        } // end attributes
    } // end vocab
}  // end geography

When the page loads, I get "Uncaught TypeError: Cannot read property 'vocab' of undefined(…)" on this line:
"ISO_TYPE" : ["Isobar Type", geography.vocab.domains.isoType],

I can't figure out why this would happen. Does it have something to do with the relative placement of the objects?
Live example, if it helps:
http://webgis.uwm.edu/agsl/geodex-web-map/index-new.html
http://webgis.uwm.edu/agsl/geodex-web-map/geodex-web-map-new.js


text:
Q: Accidentally mutating a copy of a struct instead of the struct itself Having programmed with identity types for years, I find mutating value types very stressful to use due to the constant risk of accidentally assigning (and thus copying) to a new variable and then mutating that copy and expecting to see those changes reflected in the original struct (example given at the end).
My actual question: What approaches/coding styles/practices are there to prevent this sort of thing from happening?

What I'm thinking:  I can't imagine the answer to this question simply being "just remember that you're dealing with a struct and not a class", because that's extremely error prone especially since class-ness/struct-ness is entirely opaque to code using any particular data structure.
I also see a lot of talk around using "purely functional style", which I'm all for except:

*

*seems very awkward to do in cases where the mutating method also needs to return a value (as in my example below). Of course I could return a tuple like (newStructInstance, returnValue) but that can't be The Way.

*I imagine that instantiating new copies of structs whenever you want mutations can't be in any way efficient (unlike reassignment of structs which, as I understand it, creates a new instance without incurring any of the costs).

Some possible answers to my question could be:

*

*your example is contrived and this sort of thing rarely, if ever, happens in practice

*you're using the iterator (anti)pattern (see code below), so that's your original sin right there

*ease up off of mutating and just use use structs for immutable types and classes for mutable ones

Is any of this in the right direction?

Example: Say we have a struct that simply wraps an integer which it increments by 1 with a mutating method next().
struct Counter {
    var i: Int = 0

    mutating func next() -> {
        self.i += 1
        return self.i
    }
}

In some initializer somewhere we instantiate like this
self.propertyWithLongAndAnnoyingName = Counter()

and later in the same scope, having forgotten that this property holds a  struct, we assign it to the succinctly named local variable p and increment that.
var p = self.propertyWithLongAndAnnoyingName
d.next() // actually increments a copy

A: Your question, if it isn't just an elaborate troll, seems more psychological than practical, and as such is probably not a good fit for Stack Overflow: it's a matter of opinion. However, taking you seriously and assuming that the question is sincere, I can tell you as a matter of experience that, as someone who programmed for years in Objective-C and then learned Swift when it was first released to the public, the existence of value type objects such as a structs comes as a huge relief, not as a problem as you seem to posit.
In Swift, a struct is the object type par excellence. When you simply need an object, you use a struct. Using classes is quite exceptional, confined to cases such as the following:

*

*You're using Cocoa (it's written in Objective-C and you just have to accept that its objects are classes)

*You need a superclass / subclass relationship (very rare in pure Swift programming; usually this happens only because you are using Cocoa)

*The object is to represent external reality where individual identity is crucial (for example, a UIView would need to be a reference type, not a value type, because there really are individual views sitting in the interface and we need to be able to distinguish them)

*True mutability in place is a desideratum
In general, therefore, most programmers come to feel just the opposite of the state of mind you hypothesize: they are surprised when an object unexpectedly turns out to be a reference type (a class) and mutation affects a remote reference. In the code example that you give:
var p = self.propertyWithLongAndAnnoyingName
p.next()

...it would be a complete shock if self.propertyWithLongAndAnnoyingName were also mutated. Value types represent a form of safety. The assignment to p and mutation of p would be precisely to insulate self.propertyWithLongAndAnnoyingName from being changed.
In fact, Cocoa itself goes to great lengths to guard against this sort of thing. That is why, for example, the pattern is that propertyWithLongAndAnnoyingName would never be (as seen from the outside) an NSMutableString — it would be an NSString, which puts up a fence of immutability around the object even though it is a reference type. Thus the use of structs in Swifts solves a problem which Cocoa has to solve through much more elaborate and (to many beginners) arcane measures.
However, cases like this are relatively rare in actual fact, because another aspect of your hypothesis is also false:

I can't imagine the answer to this question simply being "just remember that you're dealing with a struct and not a class", because that's extremely error prone especially since class-ness/struct-ness is entirely opaque to code using any particular data structure

My own experience is that in any situation where it matters, I always know whether I'm dealing with a struct or a class. Simply, if it's a Swift library object (String, Array, Int, etc.), it's a struct. (The library defines basically no classes at all.) If it's a Cocoa object (UIView, UIViewController), it's a class.
Indeed, the naming convention usually helps you. The Foundation overlay is a case in point. NSData is a class; Data is a struct.
Note too that you cannot mutate a let reference to a struct, but you can mutate a let reference to class. Thus in practice you very quickly experience which is which, because you always use let if you can.
Finally, if it is really important to you hand an object off to some third party for mutation-in-place, that is what inout is for. And in that case, you know it, because you have to pass a reference (address) explicitly. If the parameter you are passing to is not inout, you will assume that your original object is safe from mutation, and you'll be glad of it.


text:
Q: Parsing Google Custom Search API for Elasticsearch Documents After retrieving results from the Google Custom Search API and writing it to JSON, I want to parse that JSON to make valid Elasticsearch documents. You can configure a parent - child relationship for nested results. However, this relationship seems to not be inferred by the data structure itself. I've tried automatically loading, but not results.
Below is some example input that doesn't include things like id or index. I'm trying to focus on creating the correct data structure. I've tried modifying graph algorithms like depth-first-search but am running into problems with the different data structures.
Here's some example input:
# mock data structure
google = {"content": "foo",
          "results": {"result_one": {"persona": "phone",
                                     "personb":  "phone",
                                     "personc":  "phone"
                                    },
                      "result_two": ["thing1",
                                     "thing2",
                                     "thing3"
                                    ],
                      "result_three": "none"
                     },
          "query": ["Taylor Swift", "Bob Dole", "Rocketman"]
}

# correctly formatted documents for _source of elasticsearch entry
correct_documents = [
    {"content":"foo"},
    {"results": ["result_one", "result_two", "result_three"]},
    {"result_one": ["persona", "personb", "personc"]},
    {"persona": "phone"},
    {"personb": "phone"},
    {"personc": "phone"},
    {"result_two":["thing1","thing2","thing3"]},
    {"result_three": "none"},
    {"query": ["Taylor Swift", "Bob Dole", "Rocketman"]}
]

Here is my current approach this is still a work in progress:
def recursive_dfs(graph, start, path=[]):
  '''recursive depth first search from start'''
  path=path+[start]
  for node in graph[start]:
    if not node in path:
      path=recursive_dfs(graph, node, path)
  return path

def branching(google):
    """ Get branches as a starting point for dfs"""
    branch = 0
    while branch < len(google):

        if google[google.keys()[branch]] is dict:

            #recursive_dfs(google, google[google.keys()[branch]])
            pass

        else:
            print("branch {}: result {}\n".format(branch,     google[google.keys()[branch]]))

        branch += 1

branching(google)

You can see that recursive_dfs() still needs to be modified to handle string, and list data structures.
I'll keep going at this but if you have thoughts, suggestions, or solutions then I would very much appreciate it. Thanks for your time.

A: here is a possible answer to your problem.
def myfunk( inHole, outHole):
    for keys in inHole.keys():
        is_list = isinstance(inHole[keys],list);
        is_dict = isinstance(inHole[keys],dict);
        if is_list:
            element = inHole[keys];
            new_element = {keys:element};
            outHole.append(new_element);
        if is_dict:
            element = inHole[keys].keys();
            new_element = {keys:element};
            outHole.append(new_element);
            myfunk(inHole[keys], outHole);
        if not(is_list or is_dict):
            new_element = {keys:inHole[keys]};
            outHole.append(new_element);
    return outHole.sort();


text:
Q: Step by Step explanation of this code def mystery(n):
   a, b = 0, 1
   while a < n:
      print (a)
      a, b = b, a + b

If someone could give me a line by line explanation of this code, as also inform of why it will not run, and what extra code needs to be added.

A: def mystery(n):  # define a function named "mystery", that takes one argument called "n"
    a, b = 0, 1  # make a variable named "a" and set it to 0; make a variable named "b" and set it to 1
    while a < n:  # as long as "a" is smaller than "n"
       print (a)  # display the value contained in "a" on the screen
       a, b = b, a + b  # set "b" to the sum of "a" and "b"; set "a" to the old value of "b" (before it was set to the sum of "a" and "b")


text:
Q: Is there a left hereditary ring which is not right semihereditary? I know that if such an example exists, then it cannot be left or right noetherian.
Reminders:

*

*A left hereditary ring is one in which all left ideals are projective as modules.

*A right semihereditary ring is one in which all finitely generated right ideals are projective as modules.

A: The opening paragraph of

Small, Lance W. "Semihereditary rings." Bulletin of the American Mathematical Society 73.5 (1967): 656-658.

says

In [7] the author constructed an example of a ring which was even right hereditary (all right ideals are projective) yet not left semihereditary.

Citation 7 is

Small, Lance W. "Hereditary rings." Proceedings of the National Academy of Sciences 55.1 (1966): 25-27. link


text:
Q: Как на страницу с товаром в k2store вместо фотографии товара Item image preview вывести Media preview Добрый день имеется сайт интернет магазин в котором код

        <a class="modal" rel="{handler: 'image'}" href="<?php echo $this-
>item->imageXLarge; ?>"
title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<img src="<?php echo $this->item->image; ?>
" alt="<?php if(!empty($this->item->image_caption)) echo
K2HelperUtilities::cleanHtml($this->item-
>image_caption);
else echo K2HelperUtilities::cleanHtml($this->item->title); ?>"
style="width:<?php echo $this->item->imageWidth; ?>
px;height:auto;" />

выводит Item image preview
как вывести вместо Item image preview
Media preview

A: <?php if($this->item->videoType=='embedded'): ?>

        <?php echo $this->item->video; ?>

    <?php else: ?>
    <?php echo $this->item->video; ?>
    <?php endif; ?>

Все ок


text:
Q: Mongoose Regex on Virtual Field I'd like to run a regex to achieve a "LIKE" type functionality on a virtual field in my User schema.
The following statement works for all of the fields except *fullName*
var searchString = stringUtils.removeMultipleSpaces(stringUtils.stripSpecialCharacters(req.param('searchString')));
        var regex = new RegExp(searchString);
        var query = User.find().or([{ 'firstName' : { $regex: regex}}, { 'lastName': { $regex: regex }},
            { 'userName': { $regex: regex }}, { 'fullName' : {$regex: regex }}]).sort('lastName');
        query.select('firstName lastName userName fullName');
        query.exec(function(err, users) {
            res.send(users);
        });

The virtual field declaration in the mongoose schema for User
//full name
UserSchema.virtual('fullName')
    .get(function() {
    return this.firstName + ' ' + this.lastName;
});

What is the right approach to get the fullName field regex to work properly?

A: As you already stated (and showed us), fullName is a virtual, it's on the application layer. You cannot query it.
See also: Sorting by virtual field in mongoDB (mongoose)


text:
Q: onDestroy with an update from the store or a reload from the studio In my application I need to detect when the user ends the app. When I do a reload from Android Studio what I see is that the app does not go through onDestroy.
I presume this is because the studio uses instant run? It's not an issue as long as it is limited to the dev environment.
But what happens when the user updates the app from the store? Am I sure that the app goes to onDestroy before being re-opened?
I'm not sure how exactly to test it so I thought I could ask the question from the forum.

A: Create an APK using your declared targets like debug or release. Install the APK in your device. Now launch your application.
While application was being in the foreground. Install APK again using the following command.
adb install -r PATH_TO_TOUR_APK

This similar to app upgrade from Play Store. Just make sure both APK have same signing certificate and an increased versionCode.
Upadte Answer: If You want to notify user when App gets killed Please try following:
public class EmptyService extends Service {

@Override
public IBinder onBind(Intent intent) {
    return null;
}

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    Log.d("EmptyService", "Service Started");
    return START_NOT_STICKY;
}

@Override
public void onDestroy() {
    super.onDestroy();
    Log.d("EmptyService", "Service Destroyed");
}

@Override
public void onTaskRemoved(Intent rootIntent) {
    Log.e("EmptyService", "END");
    //Code here
    stopSelf();
}

}

In the AndroidManifest
<service android:name="com.example.EmptyService" android:stopWithTask="false" />

Now start this service from start of your applicatoin.
Let me know if it works in case of upgrade.


text:
Q: How to parse date from Datepicker in UTC format? I want from user to pick a date and I want to set this date in ParseObject (I'm using Parse.com). Column in ParseObject is type Date and it is in same format as SimpleDateFormat below. But from DatePicker I will get just year, month and day. Those attributes are also in wrong format. I also need exact time.
Is there any way how to return Date from Datepicker in exact same format?
alertDialogDateBtn?.setOnClickListener {
            val c = Calendar.getInstance()

            val dpd = DatePickerDialog(this,
                DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
                    val simpleDateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SS'Z'")
                    chosenDate = simpleDateFormat.parse(year.toString() + "-" + (monthOfYear + 1).toString() + "-" + dayOfMonth.toString())
                }, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DATE))
                    dpd.show()
        }

A: I had a similar issue, but this worked for me :)
    final DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {
            @Override
            public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {

                myCalendar.set(Calendar.YEAR, year);
                myCalendar.set(Calendar.MONTH, monthOfYear);
                myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
                updateLabel();
            }
        };
        fromDay.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                new DatePickerDialog(ViewActivity.this, date, myCalendar
                        .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
                        myCalendar.get(Calendar.DAY_OF_MONTH)).show();
            }
});

A: Just pass your date coming from DatePicker to this function
and your pattern from date picker selected date should be like this

yyyy-mm-dd

public static String changeDateTimeFormat(String inputString) {
    Log.i(">>inputDate", "changeDateFormat: " + inputString);
    String[] date1 = new String[1];
    String inputPattern = "yyyy-MM-dd";
    String outputPattern = "dd-MMM-yyyy h:mm a";
    SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);
    SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);

    Date date = null;
    String str = null;
    try {
        date = inputFormat.parse(inputString);
        str = outputFormat.format(date);
    } catch (ParseException e) {
        e.printStackTrace();
    }
    return str;

}

and this will return you the exact UTC date format you need


text:
Q: Jenkins docker build Failed to exec start:java.net.SocketException: Broken pipe (Write failed) My system:
OS Ubuntu 20.04
Jenkins 2.289.1
Docker - 19.03.15
NodeJs - 14 (try to Build project)
Kubernetes - Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:40:09Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}
I deployed Jenkins on K8S  and try to build Docker Image and push on local Docker registry.
In Jenkins I created - Freestyle Project. Where Jenkins is cloned on Git and Build a NodeJS project. But I see evreytime a Error.

P.S I have a goal - Clone project NodeJS on Git and deploy on K8S. Maybe I have a some misstake ?

A: Problem with docker socket.  The socket was absent. So I deployed Jenkins with the needed docker socket.
volumeMounts:
   - mountPath: /var/run/docker.sock
          name: docker-sock-volume
          readOnly: true

- name: docker-sock-volume
      hostPath:
        path: /var/run/docker.sock
        type: Socket


text:
Q: Couldn't find a 'component' or 'children' prop for the screen 'Home' I'm trying to use react-navigate v5 to setup a stacknavigator for some screens. Currently I'm getting this error while trying to run the app:enter image description here
My App.js:
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import SignIn from './App/Screens';

const AuthStack = createStackNavigator();

export default () => (
  <NavigationContainer>
    <AuthStack.Navigator>
      <AuthStack.Screen name='SignIn' component = {SignIn} />
    </AuthStack.Navigator>
  </NavigationContainer>
);

my Screens.js:
import React from 'react';
import {View, Text, StyleSheet, Button, TouchableOpacity } from 'react-native';

const styles = StyleSheet.create({
    container: {
        padding: 20,
        justifyContent: 'center',
    },
    input: {
        height: 40,
        backgroundColor: "rgba(255, 255, 255, 0.2)",
        marginBottom: 10,
        color: '#FFF',
        paddingHorizontal: 10
    },
    buttonContainer: {
        backgroundColor: '#2980b9',
        paddingVertical: 10,
        marginBottom: 10

    },
    buttonText: {
        textAlign: 'center',
        color: '#FFF',
        fontWeight: '700'
    }
});

const ScreenContainer = ({ children }) => (
    <View style={styles.container}>{children}</View>
  );
export const SignIn = ({ navigation }) => {
    return (
      <ScreenContainer>
        <Text>Sign In Screen</Text>
        <Button title="Sign In" onPress={() => alert("todo") } />
        <Button
          title="Create Account"
          onPress={() => alert("todo")}
        />
      </ScreenContainer>
    );
  };

Not sure what's going on, would appreciate some help. Thanks!

A: You should change your import from, as you are using a named export
import SignIn from './App/Screens';

to
import {SignIn} from './App/Screens';


text:
Q: Semicolon usage: I've got the truck; now I need some muscle In the sentence:

I've got the truck; now I need some muscle.

Is the semicolon the correct punctuation to put just after truck, just before now?

A: The semi-colon is a fun punctuation mark. It adds variety to sentence structure, whether in writing or speaking. Your use of it in your exemplar is not only correct, but I like the sound of it. Or, put differently,

Your use of the semi-colon in your exemplar is not only correct; I also like the sound it creates.

Joining two independent clauses with a conjunction (e.g., and, but, as, and because) can become a habit which needs to be broken occasionally. The abruptness, as it were, created by the semi-colon may at times make our utterance or writing more memorable.
In other words, two independent clauses balanced by the inclusion of a conjunction are fine when used in moderation. At other times, however, two independent clauses, less the conjunction, provide balance on their own.