text:
Q: Generating Suffixes I am doing a large Matrix calculation in which I need to generate symbols first like
$F^{\mu\nu}$ I would like to get $\mu\nu = 00, 11, 22, 33$ and so on.
I need to have the symbols before I can assign anything. Is there way to achieve this?


text:
Q: WiFi unstable after 17.10 update My wifi connexion is very unstable after the 17.10 update (from 17.04). I'm experiencing frequent disconnections (every 10~15min) a simple reconnection to the SSID solve the issue.
The card model is:
sudo lshw -class network
  *-network
       description: Wireless interface
       product: QCA6174 802.11ac Wireless Network Adapter
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:3a:00.0
       logical name: wlp58s0
       version: 32
       serial: ****
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath10k_pci driverversion=4.13.0-16-generic firmware=WLAN.RM.4.4-00022-QCARMSWPZ-2 ip=192.168.1.49 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:286 memory:dc000000-dc1fffff

The computer is a Dell XPS 13' 9360.
The Wifi was working fine on 17.04 (not great signal but no diconnections).
The diagnostic:

########## wireless info START ##########

Report from: 22 Oct 2017 12:10 CEST +0200

Booted last: 22 Oct 2017 00:00 CEST +0200

Script from: 25 Mar 2017 07:04 UTC +0000

##### release ###########################

Distributor ID: Ubuntu
Description:    Ubuntu 17.10
Release:    17.10
Codename:   artful

##### kernel ############################

Linux 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Parameters: ro, quiet, splash, video.use_native_backlight=1, vt.handoff=7

##### desktop ###########################
i3

##### lspci #############################

3a:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
    Subsystem: Bigfoot Networks, Inc. QCA6174 802.11ac Wireless Network Adapter [1a56:1535]
    Kernel driver in use: ath10k_pci

##### lsusb #############################

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0c45:670c Microdia
Bus 001 Device 003: ID 04f3:20d0 Elan Microelectronics Corp.
Bus 001 Device 002: ID 0cf3:e300 Atheros Communications, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

##### PCMCIA card info ##################

##### rfkill ############################

1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

##### lsmod #############################

ath10k_pci             45056  0
dell_laptop            20480  0
ath10k_core           352256  1 ath10k_pci
ath                    28672  1 ath10k_core
mac80211              778240  1 ath10k_core
cfg80211              610304  3 mac80211,ath,ath10k_core
wmi_bmof               16384  0
dell_wmi               16384  0
dell_smbios            16384  2 dell_wmi,dell_laptop
sparse_keymap          16384  3 dell_wmi,intel_hid,intel_vbtn
wmi                    24576  2 dell_wmi,wmi_bmof
video                  40960  3 dell_wmi,dell_laptop,i915

##### interfaces ########################

auto lo
iface lo inet loopback
dns-nameservers 127.0.0.1

##### ifconfig ##########################

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3693  bytes 416071 (416.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3693  bytes 416071 (416.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp58s0: flags=4163  mtu 1500
        inet 192.168.1.49  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 ****  prefixlen 64  scopeid 0x0
        inet6 ****  prefixlen 64  scopeid 0x20
        inet6 ****  prefixlen 64  scopeid 0x0
        ether   txqueuelen 1000  (Ethernet)
        RX packets 1314397  bytes 1910643192 (1.9 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 398128  bytes 49026367 (49.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

##### iwconfig ##########################

lo        no wireless extensions.

wlp58s0   IEEE 802.11  ESSID:"****"
          Mode:Managed  Frequency:2.447 GHz  Access Point:
          Bit Rate=1 Mb/s   Tx-Power=20 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-40 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:70   Missed beacon:0

##### route #############################

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    600    0        0 wlp58s0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp58s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp58s0

##### resolv.conf #######################

nameserver 127.0.0.1

##### network managers ##################

Installed:

    NetworkManager

Running:

root       834     1  0 10:14 ?        00:00:07 /usr/sbin/NetworkManager --no-daemon

##### NetworkManager info ###############

GENERAL.DEVICE:                         wlp58s0
GENERAL.TYPE:                           wifi
GENERAL.NM-TYPE:                        NMDeviceWifi
GENERAL.VENDOR:                         Qualcomm Atheros
GENERAL.PRODUCT:                        QCA6174 802.11ac Wireless Network Adapter
GENERAL.DRIVER:                         ath10k_pci
GENERAL.DRIVER-VERSION:                 4.13.0-16-generic
GENERAL.FIRMWARE-VERSION:               WLAN.RM.4.4-00022-QCARMSWPZ-2
GENERAL.HWADDR:
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.REASON:                         0 (No reason given)
GENERAL.UDI:                            /sys/devices/pci0000:00/0000:00:1c.4/0000:3a:00.0/net/wlp58s0
GENERAL.IP-IFACE:                       wlp58s0
GENERAL.IS-SOFTWARE:                    no
GENERAL.NM-MANAGED:                     yes
GENERAL.AUTOCONNECT:                    yes
GENERAL.FIRMWARE-MISSING:               no
GENERAL.NM-PLUGIN-MISSING:              no
GENERAL.PHYS-PORT-ID:                   --
GENERAL.CONNECTION:                     ****
GENERAL.CON-UUID:                       ****
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/7
GENERAL.METERED:                        no (guessed)
CAPABILITIES.CARRIER-DETECT:            no
CAPABILITIES.SPEED:                     1 Mb/s
CAPABILITIES.IS-SOFTWARE:               no
CAPABILITIES.SRIOV:                     no
WIFI-PROPERTIES.WEP:                    yes
WIFI-PROPERTIES.WPA:                    yes
WIFI-PROPERTIES.WPA2:                   yes
WIFI-PROPERTIES.TKIP:                   yes
WIFI-PROPERTIES.CCMP:                   yes
WIFI-PROPERTIES.AP:                     yes
WIFI-PROPERTIES.ADHOC:                  yes
WIFI-PROPERTIES.2GHZ:                   yes
WIFI-PROPERTIES.5GHZ:                   yes
IP4.ADDRESS[1]:                         192.168.1.49/24
IP4.GATEWAY:                            192.168.1.254
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.254
DHCP4.OPTION[1]:                        requested_routers = 1
DHCP4.OPTION[2]:                        requested_domain_search = 1
DHCP4.OPTION[3]:                        requested_time_offset = 1
DHCP4.OPTION[4]:                        requested_domain_name = 1
DHCP4.OPTION[5]:                        requested_rfc3442_classless_static_routes = 1
DHCP4.OPTION[6]:                        requested_broadcast_address = 1
DHCP4.OPTION[7]:                        requested_netbios_scope = 1
DHCP4.OPTION[8]:                        requested_wpad = 1
DHCP4.OPTION[9]:                        next_server = 0.0.0.0
DHCP4.OPTION[10]:                       expiry = 1508710174
DHCP4.OPTION[11]:                       requested_interface_mtu = 1
DHCP4.OPTION[12]:                       requested_subnet_mask = 1
DHCP4.OPTION[13]:                       routers = 192.168.1.254
DHCP4.OPTION[14]:                       dhcp_message_type = 5
DHCP4.OPTION[15]:                       ip_address = 192.168.1.49
DHCP4.OPTION[16]:                       broadcast_address = 192.168.1.255
DHCP4.OPTION[17]:                       requested_static_routes = 1
DHCP4.OPTION[18]:                       requested_domain_name_servers = 1
DHCP4.OPTION[19]:                       requested_ntp_servers = 1
DHCP4.OPTION[20]:                       requested_netbios_name_servers = 1
DHCP4.OPTION[21]:                       dhcp_lease_time = 43200
DHCP4.OPTION[22]:                       domain_name_servers = 192.168.1.254
DHCP4.OPTION[23]:                       requested_ms_classless_static_routes = 1
DHCP4.OPTION[24]:                       subnet_mask = 255.255.255.0
DHCP4.OPTION[25]:                       network_number = 192.168.1.0
DHCP4.OPTION[26]:                       requested_host_name = 1
DHCP4.OPTION[27]:                       dhcp_server_identifier = 192.168.1.254
IP6.ADDRESS[1]:                         ****/64
IP6.ADDRESS[2]:                         ****/64
IP6.ADDRESS[3]:                         ****/64
IP6.GATEWAY:                            ****
IP6.ROUTE[1]:                           dst = ****::/64, nh = ::, mt = 600
IP6.DNS[1]:                             ****
IP6.DNS[2]:                             ****

SSID                      BSSID              MODE    CHAN  FREQ      RATE       SIGNAL  BARS  SECURITY     ACTIVE  *
**HIDDEN FOR PRIVACY**

##### NetworkManager.state ##############

[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true

##### NetworkManager.conf ###############

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

##### NetworkManager profiles ###########
** HIDDEN FOR PRIVACY **

##### iw reg get ########################

global
country 00: DFS-UNSET
    (2402 - 2472 @ 40), (N/A, 20), (N/A)
    (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
    (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
    (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
    (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
    (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
    (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
    (57240 - 63720 @ 2160), (N/A, 0), (N/A)

##### iwlist channels ###################

lo        no frequency information.

wlp58s0   32 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 100 : 5.5 GHz
          Channel 104 : 5.52 GHz
          Channel 108 : 5.54 GHz
          Channel 112 : 5.56 GHz
          Channel 116 : 5.58 GHz
          Channel 120 : 5.6 GHz
          Channel 124 : 5.62 GHz
          Channel 128 : 5.64 GHz
          Channel 132 : 5.66 GHz
          Channel 136 : 5.68 GHz
          Channel 140 : 5.7 GHz
          Current Frequency:2.447 GHz (Channel 8)

##### iwlist scan #######################

lo        Interface doesn't support scanning.

wlp58s0   Interface doesn't support scanning : Device or resource busy

##### module infos ######################

[ath10k_pci]
filename:       /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
firmware:       ath10k/QCA9377/hw1.0/board.bin
firmware:       ath10k/QCA9377/hw1.0/firmware-5.bin
firmware:       ath10k/QCA6174/hw3.0/board-2.bin
firmware:       ath10k/QCA6174/hw3.0/board.bin
firmware:       ath10k/QCA6174/hw3.0/firmware-6.bin
firmware:       ath10k/QCA6174/hw3.0/firmware-5.bin
firmware:       ath10k/QCA6174/hw3.0/firmware-4.bin
firmware:       ath10k/QCA6174/hw2.1/board-2.bin
firmware:       ath10k/QCA6174/hw2.1/board.bin
firmware:       ath10k/QCA6174/hw2.1/firmware-5.bin
firmware:       ath10k/QCA6174/hw2.1/firmware-4.bin
firmware:       ath10k/QCA9887/hw1.0/board-2.bin
firmware:       ath10k/QCA9887/hw1.0/board.bin
firmware:       ath10k/QCA9887/hw1.0/firmware-5.bin
firmware:       ath10k/QCA988X/hw2.0/board-2.bin
firmware:       ath10k/QCA988X/hw2.0/board.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-5.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-4.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-3.bin
firmware:       ath10k/QCA988X/hw2.0/firmware-2.bin
license:        Dual BSD/GPL
description:    Driver support for Qualcomm Atheros 802.11ac WLAN PCIe/AHB devices
author:         Qualcomm Atheros
srcversion:     8D7A52EE462CD73D0445DB2
depends:        ath10k_core
intree:         Y
name:           ath10k_pci
vermagic:       4.13.0-16-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4
parm:           irq_mode:0: auto, 1: legacy, 2: msi (default: 0) (uint)
parm:           reset_mode:0: auto, 1: warm only (default: 0) (uint)

[ath10k_core]
filename:       /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/ath/ath10k/ath10k_core.ko
license:        Dual BSD/GPL
description:    Core module for Qualcomm Atheros 802.11ac wireless LAN cards.
author:         Qualcomm Atheros
srcversion:     7F06478F5745B064BF3BC89
depends:        mac80211,cfg80211,ath
intree:         Y
name:           ath10k_core
vermagic:       4.13.0-16-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4
parm:           debug_mask:Debugging mask (uint)
parm:           uart_print:Uart target debugging (bool)
parm:           skip_otp:Skip otp failure for calibration in testmode (bool)
parm:           cryptmode:Crypto mode: 0-hardware, 1-software (uint)
parm:           rawmode:Use raw 802.11 frame datapath (bool)

[ath]
filename:       /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/ath/ath.ko
license:        Dual BSD/GPL
description:    Shared library for Atheros wireless LAN cards.
author:         Atheros Communications
srcversion:     555BBBB9D4FCA58A05E7C0D
depends:        cfg80211
intree:         Y
name:           ath
vermagic:       4.13.0-16-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4

[mac80211]
filename:       /lib/modules/4.13.0-16-generic/kernel/net/mac80211/mac80211.ko
license:        GPL
description:    IEEE 802.11 subsystem
srcversion:     66E288B8743878C5423A01E
depends:        cfg80211
intree:         Y
name:           mac80211
vermagic:       4.13.0-16-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4
parm:           minstrel_vht_only:Use only VHT rates when VHT is supported by sta. (bool)
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

[cfg80211]
filename:       /lib/modules/4.13.0-16-generic/kernel/net/wireless/cfg80211.ko
description:    wireless configuration support
license:        GPL
author:         Johannes Berg
srcversion:     A854863B536C70273DE73A5
depends:
intree:         Y
name:           cfg80211
vermagic:       4.13.0-16-generic SMP mod_unload
signat:         PKCS#7
signer:
sig_key:
sig_hashalgo:   md4
parm:           bss_entries_limit:limit to number of scan BSS entries (per wiphy, default 1000) (int)
parm:           ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm:           cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)

##### module parameters #################

[ath10k_pci]
irq_mode: 0
reset_mode: 0

[ath10k_core]
cryptmode: 0
debug_mask: 0
rawmode: N
skip_otp: N
uart_print: N

[mac80211]
beacon_loss_count: 7
ieee80211_default_rc_algo: minstrel_ht
max_nullfunc_tries: 2
max_probe_tries: 5
minstrel_vht_only: Y
probe_wait_ms: 500

[cfg80211]
bss_entries_limit: 1000
cfg80211_disable_40mhz_24ghz: N
ieee80211_regdom: 00

##### /etc/modules ######################

##### modprobe options ##################

[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci

[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac

[/etc/modprobe.d/blacklist-rare-network.conf]
alias net-pf-3 off
alias net-pf-6 off
alias net-pf-9 off
alias net-pf-11 off
alias net-pf-12 off
alias net-pf-19 off
alias net-pf-21 off
alias net-pf-36 off

[/etc/modprobe.d/intel-microcode-blacklist.conf]
blacklist microcode

[/etc/modprobe.d/iwlwifi.conf]
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211

[/etc/modprobe.d/mlx4.conf]
softdep mlx4_core post: mlx4_en

##### rc.local ##########################

grep: /etc/rc.local: No such file or directory

##### pm-utils ##########################

##### udev rules ########################

##### dmesg #############################

[ 2518.493849] wlp58s0: send auth to  (try 1/3)
[ 2518.498139] wlp58s0: authenticated
[ 2518.510661] wlp58s0: associate with  (try 1/3)
[ 2518.514808] wlp58s0: RX AssocResp from  (capab=0x411 status=0 aid=1)
[ 2518.517910] wlp58s0: associated
[ 2518.518031] IPv6: ADDRCONF(NETDEV_CHANGE): wlp58s0: link becomes ready
[ 3790.657597] wlp58s0: deauthenticating from  by local choice (Reason: 3=DEAUTH_LEAVING)
[ 3790.691224] wlp58s0: authenticate with
[ 3790.744676] wlp58s0: send auth to  (try 1/3)
[ 3791.745320] wlp58s0: send auth to  (try 2/3)
[ 3792.702724] wlp58s0: authenticated
[ 3792.705567] wlp58s0: associate with  (try 1/3)
[ 3792.708886] wlp58s0: RX AssocResp from  (capab=0x411 status=0 aid=1)
[ 3792.712592] wlp58s0: associated
[ 4892.860736] wlp58s0: deauthenticating from  by local choice (Reason: 3=DEAUTH_LEAVING)
[ 4896.836038] wlp58s0: authenticate with
[ 4896.888893] wlp58s0: send auth to  (try 1/3)
[ 4896.890516] wlp58s0: authenticated
[ 4896.892901] wlp58s0: associate with  (try 1/3)
[ 4896.897903] wlp58s0: RX AssocResp from  (capab=0x411 status=0 aid=1)
[ 4896.900310] wlp58s0: associated

########## wireless info END ############

Edit:
The solution provided by Zsolt Rizsányi works, alternatively I choose to change my WiFi card by an Intel 8265 which have a better range and a better support of the 5G frequency.

A: This bug has been reported on launchpad: https://bugs.launchpad.net/bugs/1743279
If you're affected, please tell them in the bug report so they can fix the bug ASAP.
The firmware-6.bin file needs to be updated. Ubuntu currently ships version WLAN.RM.4.4-00022-QCARMSWPZ-2 and the fix for this issue was released in version WLAN.RM.4.4.1-00051-QCARMSWP-1, which means you need some version later than the latter for the card to work properly on >4.12 kernels.
As of today, this bug can be fixed by simply replacing the board-2.bin (not actually required but recommended) and firmware-6.bin files with what's currently in the upstream repository for linux-firmware, or by grabbing the firmware-6.bin from kvalo's repository for the proper version.
You can grab the correct version from kvalo's repository, which is guaranteed to always work (if you don't require the new board-2.bin as well).
These commands below will automate the replacement of the files:
$ sudo wget https://github.com/kvalo/ath10k-firmware/raw/master/QCA6174/hw3.0/4.4.1/firmware-6.bin_WLAN.RM.4.4.1-00051-QCARMSWP-1 -O /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin

Alternatively, you can grab the files from the current state of linux-firmware
These commands below will automate the replacement of the files from what's upstream (notice these commands might work now but there's no guarantee they will work in the future because the repository's contents can change, although they will hardly ever break things like this).
$ sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA6174/hw3.0/board-2.bin -O /lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin
$ sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA6174/hw3.0/firmware-6.bin -O /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin

Then reboot.

A: I had the same issue and found a Debian bug report that also has a solution. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879184
The solution is simple: install updated firmware from firmware repository provided by Qualcomm.
Detailed steps:

*

*Download https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/board-2.bin and overwrite /lib/firmware/ath10k/QCA6174/hw3.0/board-2.bin with the downloaded file.

*Download https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/4.4.1/firmware-6.bin_WLAN.RM.4.4.1-00065-QCARMSWP-1 and overwrite /lib/firmware/ath10k/QCA6174/hw3.0/firmware-6.bin.

*Restart

A: EDIT:  The correct fix for this is to install the drivers manually and not change your wifi config on your network. At least until newer drivers are included in ubuntu.
A change to my wifi routers fixed this, I'm not sure if the APs or linux kernel/drivers are to blame here.
On OpenWrt/LEDA,
option wpa_group_rekey '0'
Needs to be added to the wireless "wifi-iface" configs. There is no option within the web config interface.
UPDATE: I set this to 3600 and the same issue happened again, I'm assuming there is a negotiation not taking place between the client and WAP. Still probably a Linux/driver bug. I set this to 3600 instead of 0 since it's theoretically more secure but no go, i'm assuming zero means it doesn't regenerate a key.

A: A fix has been released in the linux-firmware package (version 1.169.3 in 17.10 and version 1.157.16 in 16.04). Open a terminal (press Ctrl+Alt+T), and run the following:
sudo apt update
sudo apt upgrade

A: I was with the same problem.
Here how i resolve the problem:
https://ubuntuforums.org/showthread.php?t=2261225
Go to your modem wifi security settings.

If WPA/WPA2 Group Key Update Period is zero or disabled, you must
  change it.
Set WPA/WPA2 Group Key Update Period to 86400 as shown in the screenshot.
Save your settings and reboot your modem/router.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Find the irreducible factors of the polynomial $x^3 + 5x^2 + 2x + 6 \in \mathbb{Z}_7 [ x ]$ .
Find the irreducible factors of the polynomial $$x^3 + 5x^2 + 2x + 6 \in \mathbb{Z}_7 [ x ]$$

I am having trouble understanding irreducible factors for my algebra module and have an exam next week. If any one could help me understand this sample question, I would be so grateful

A: As suggested in the comments, there are only seven values to test in $\mathbb{Z}_7$. Testing the value 1, we get:
$$(1^3 + 5 \cdot 1^2 + 2 \cdot 1 + 6)\,mod\,7 = 14\,mod\,7 = 0$$
If we do the same for the values 3 and 5, we get 0 as well. Indeed, in $\mathbb{Z}_7$:
$$(x-1)(x-3)(x-5) = x^3 - 9 x^2 + 23 x - 15 = x^3 + 5 x^2 + 2 x + 6$$

A: Hint: Over a field, a cubic polynomial either is irreducible or has a factor of degree one, that is, a root.
Or:
$$
x^3 + 5x^2 + 2x + 6
= x^3 - 2x^2 + 2x -1
= x^3 - 2x^2 + x + x-1
= x(x^2 - 2x + 1) + x-1
= x(x-1)^2 + x-1
=(x-1)(x(x-1)+1)
=(x-1)(x^2-x+1)
=(x-1)(x^2+6x+8)
=(x-1)(x+2)(x+4)
=(x-1)(x-3)(x-5)
$$


text:
Q: How to re-design base class to generic Here is base code from TeamA
public class BaseClass
{
    public Method1();
    public Method2();
    Other methods...
}
public class A : BaseClass
{
    public override Method1();
    public override Method2();
}
public class B : BaseClass
{
    public override Method1();
    public override Method2();
}
public class C : BaseClass
{
    public override Method1();
    public override Method2();
}

TeamB have to custom above code, and the code have to be the followings:
public class BaseClass1 : BaseClass
{
    public override Method1();
}
public class A1 : A
//There is a big problem here,
//if A1 inherit A, then cannot get changes from BaseClass1
//if A1 inherit BaseClass1, then cannot get changes from A
//Same issue to class B1, C1, D1...
{
    public override Method1();
}
public class B1 : B
{
    public override Method1();
}
public class C1 : C
{
    public override Method1();
}

All other teams will use code from TeamB only, they can easily do these:
public class BaseClass2 : BaseClass1
{
    public override Method1();
}
public class A2 : A1
//Same problem here with TeamB
{
    public override Method1();
}
public class B2 : B1
{
    public override Method1();
}
public class C2 : C1
{
    public override Method1();
}

The problem is very clear: No matter whatever teams except TeamA, once if we need to custom BaseClass, we have to custom all of classes, which is too heavy!
My question is: Is there a method to re-design code structure from TeamA, make code generic, then we don't have to do heavy customizations?

A: It's not 100% clear from your question, but I'm guessing this is a situation where you have a core product engineering team (TeamA) that produces the platform code, and a consultant or "professional services" team that then takes the product and implements it for a customer. The professional services team would like to be able to modify things, but also be able to take patches or version upgrades from product engineering without having to do code merges. (Otherwise, the simple solution would be to modify in place rather than extending and overriding.)
If that is the situation, the simple solution is for TeamA to provide a pass-through base class for TeamB to use as an extension point.
//This is what TeamA provides in a release

public class BaseClass
{
    public Method1();
    public Method2();
}

public class CustomBaseClass : BaseCLass
{
    //No code. This is just a pass-through class
}

public class A : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class B : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class C : CustomBaseClass
{
     public override Method1();
     public override Method2();
}

Then when TeamB needs to customize something about the base class, they only need to do it in one place, and nothing else needs to be changed:
//This is how it looks when TeamB is done with it
public class BaseClass
{
    public Method1();
    public Method2();
}

public class CustomBaseClass : BaseCLass
{
    public override Method1(); //customized now, and will affect all existing classes automatically
}

public class A : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class B : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class C : CustomBaseClass
{
     public override Method1();
     public override Method2();
}

When TeamB needs to take a product release from TeamA, they get to keep CustomBaseClass (there has to be an agreement it is for customizations only) and update everything else. This way the customizations are forward-compatible and no merges are necessary, just a bit of testing.
//This is how it looks when TeamA provides a new release with a new method
public class BaseClass
{
    public Method1();
    public Method2();
    public NewMethod();
}

public class CustomBaseClass : BaseCLass
{
    public override Method1(); //customized now, and will affect all existing classes automatically
}

public class A : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class B : CustomBaseClass
{
    public override Method1();
    public override Method2();
}

public class C : CustomBaseClass
{
     public override Method1();
     public override Method2();
}

In this example, TeamA changed the base class, and TeamB didn't have to lift a finger to keep their customizations.


text:
Q: I used fs.readFile() twice on the same file but it says its diffrent? I used fs.readFile() to see if a file has been changed, but it always says it has even if I have done nothing to the file.
const config = {
    "interval": 100,
    "file": "./test.txt"
}
const fs = require("fs")
let data
fs.readFile(config.file, (err, d) => {
    if (err) throw err
    data = d
})
setInterval(check, config.interval)
function check() {
    let newdata
    fs.readFile(config.file, (err, d) => {
        if (err) throw err
        newdata = d
    })
    if (data != newdata) {
        fs.readFile(config.file, (err, d) => {
            if (err) throw err
            data = d
        })
        console.log("Changed")
    }
}

A: Your if (data != newdata) comparison is occurring BEFORE you've assigned anything to newdata because fs.readFile() is asynchronous and non-blocking so it's callback gets called sometime later.  If you did a simple console.log() on the two values, you would see that newdata is still undefined.
You can fix it by moving the comparison INSIDE the fs.readFile() callback.
function check() {
    fs.readFile(config.file, (err, newdata) => {
        if (!err && data !== newdata) {
            console.log("Changed")
            // do whatever you wanted to do here
        }
    });
}


text:
Q: OpenServo and I2C Syncronization I need to send a command to multiple I2C devices on the same wire. The devices are OpenServos. Each device get's it command and begins processing the information in the command.
How do I ensure that they all start processing the command at the same time?
EDIT: Just to clarify, this question is mainly about I2C's ability to support syncing.

A: A few possibilities come to mind:

*

*Have an I2C Master device dedicated for each servo (a
microcontroller for example) and a single microcontroller dedicated
for generating a synchronization signal which will go to each of the I2C Masters.

*If possible, configure all the servos to have the same I2C address.
They will all receive the command at the same time thinking that it
is for them.  Absolutely will not work if each motor needs its own
parameters - only if they are to receive the exact same identical
commands.  Possible issues: multiple devices trying to drive the
line during ACK or during a reply may cause unpredictable bus
contention.  Might be worth a try though if they're all going to receive identical    commands.
A quick look at the OpenServo page tells me that these devices are re-programmable and you can write your own firmware.  It sounds like to me that plain I2C may not be the best choice here considering your synchronization problem and there may be an opportunity to do something clever by modifying the motor controller firmware to accept an additional 'sync' signal.
EDIT: Fake Name mentions a broadcast address in I2C and this may be hacked to your advantage. The official I2C Specification supports a "general call" address which is optional for the device.  Laid out in the spec for general call are: address change with reset, address change without reset, and software reset.  I suppose it is possible to modify the firmware to support a custom command and use(/abuse) the general call for your own purposes.

A: Terms like OpenServo should be explained in questions and links should be provided to relevant websites.
Some details and links to  OpenServo resources are provided below.
There are two obvious ways of achieving simultaneous starting of multiple servos. There will be other ways.

*

*As OpenServo is open source and processor based it would be "easy" to add non standard features. One such method which should be achievable with a minimum of modification of the system would be to allow all servos to listen for a common I^2C address and implement "All stop" and "All start" signals which can be decoded by all connected servos.  Commands for an individual servo received during "all stop" are quesd and implemented immediately after an "all start: is received. So  -

*Send All Stop signal.

*Send codes to each connected servos.

*Send Y'All start now
- Hardware control.
The SparkFun Openservo circuit diagram eferenced below uses the H bridge driver shon below. If the +12V feed at top centre is interupted the servo will not drive. If this feed point is common to a group of servos, all may be turned on and off with ease with a single "switch" (probably a high side P Channel MOSFET.

OpenServo is an open community-based project with the goal of creating a high quality digital servo for robotics.  They say

*

*Some of the many features of the OpenServo include:
-High performance AVR 8-bit microcontroller
-Compact H-Bridge with high performance MOSFETs
-Precision control over servo position and speed
-I2C/TWI based interface for control and feedback
-Feedback of position, speed, voltage and power
-Advanced curve based motion profile support
-EEPROM storage of servo configuration information
-Software written in C using free development tools
-I2C/TWI bootloader and GUI programmer
Documentation page
SparkFun index page
Circuit of sparkFun implementation.


text:
Q: C print 2D Array I am trying to print a character string from a 2D array using a randomNum. Here is what I have:
int randomNum = 0;
char names[2][] = { {"Joe\0"},{"John\0"} };
printf("%s ",names[randomNum][]);

This does not work however.

A: Here is an example code of what I believe should be implemented:
#include <stdio.h>
#include <stdlib.h>

#define NUMBER_OF_STRINGS  2

int main (int argc, char *argv[])
{
    int randomNum = 0;

    /* The capacity of the array is to hold up to 2 strings*/
    char *names[NUMBER_OF_STRINGS] = { "Joe",
                                        "John"};
                /*
                *
                *  names[0][0] = 'J' -> first element of names[0]  -  J
                *  names[0][1] = 'o' -> second element of names[0] -  o
                *  names[0][2] = 'e' -> third element of names[0]  -  e
                *
                *  names[1][0] = 'J' -> first element of names[0]  -  J
                *  names[1][1] = 'o' -> second element of names[0] -  o
                *  names[1][2] = 'h' -> third element of names[0]  -  h
                *  names[1][3] = 'n' -> third element of names[0]  -  n
                *
                */

    /*Here we pass the pointer of the array of strings and we index the first string*/
    printf("%s \n", names[randomNum]);

    /*Here is how to access each of the elements separetly*/
    printf("Here we print the name Joe character by character\n");
    printf("%c\n", names[0][0]);
    printf("%c\n", names[0][1]);
    printf("%c\n", names[0][2]);

    printf("Here we print the name John character by character\n");
    printf("%c\n", names[1][0]);
    printf("%c\n", names[1][1]);
    printf("%c\n", names[1][2]);
    printf("%c\n", names[1][3]);

    return (0);
}

To store a single string you need a char* name (character pointer). To store multiple strings it is required to use a char** names. Which is equivalent to char* names [NUMBER_OF_STRINGS]. The double pointer means that we create a pointer to a space in the memory which has a pointer of the same type. In other words in this case it is the pointer to the array of strings.


text:
Q: Can red-black tree be used for best-fit algorithm? I know that the best-fit algorithm has to search through the whole list in order to find the best memory block which takes O(n), so I'm thinking about using a red-black tree to improve the runtime to O(logN). Will there be any cases that the red-black tree won't work for best-fit? If so, could someone provide me an example ? Thank you.

A: A red-black tree works fine, but it's not a really good choice.
Since it takes O(size) time to make good use of O(size) bytes, it's better to use a finger search tree of some kind that makes finding small blocks faster at the expense of taking more time to find large blocks: https://en.wikipedia.org/wiki/Finger_search_tree
Also, you probably just want to have separate free lists for some of the smallest possible sizes.  You can expect to hit several cache lines when you search in and update a search tree.  Each cache line is 64 bytes on x86, so just one cache line is enough to store the head pointers for 8 free lists.  If you put the head pointers for free lists for the 8 smallest sizes in one cache line, then allocating blocks of those sizes will be much faster.
This also lets you allocate blocks that are smaller than a red-black tree node.

A: If you are to build a red-black tree to do what you are describing, there are better options.
Given n elements, the red-black tree construction time takes O(n log n). It's the same time from just sorting the array and using binary search, which is way simpler and very performant.
Obviously the tree would be better if elements were constantly added to the array.


text:
Q: Batch - Is it possible to create a batch file thats check if a website / url redirect to another site Is it possible to create a batch file thats check if a website / url redirect to another site?
for example check if http://www.google.com/ redirect to http://www.google.com/randomsite.php/ and i would be great if it could do a status like:
www.google.dk/ Redirects to www.google.dk/randomsite.php/

for example with echo and some varible like:
echo %Google1% Redirects to %Google2%

And that would look like this
www.google.dk/ Redirects to www.google.dk/randomsite.php/

A: There are no built-in tools in Windows, but if you download a Windows compatible version of curl, you can use that to print the headers. This blog article seems a good place to start.
For example:
curl -sL http://www.stackoverflow.com --head | find "301" OR
curl -sL http://www.stackoverflow.com --head | find "302"

If found, the %ERRORLEVEL% variable will be greater than 0, so you can check that.

A: Under Linux, curl -I http://yoururl.com. You just need the first line, so start maybe with curl -I http://yoururl.com | head -n 1


text:
Q: Connect to ClickHouse Managed ClickHouse in Yandex.Cloud with JetBrains DataGrip, PyCharm How could I connect to ClickHouse in Managed instance on Yandex.Cloud with JetBrains DataGrip or PyCharm using HTTP API and clickhouse-driver JDBC?
There are no direct instructions on ClickHouse site or JetBrains site.

A: *

*Open database tool window (Alt/Cmd+1)

*Press +

*Choose ClickHouse

*Enter host, credentials and all the other needed details.

A: *

*hit the + and select clickhouse

image1

*SSH setup - its most likely at your click house server set up on a remote linux server. So you need to setup this up in order to connect to clickHouse

image2

*Add you clickhouse address, port number and password

image3


text:
Q: Value from Binding ElementName producing empty string I have a Datagrid which has a DataGridTemplateColumn containing a ListView whose Itemsource is bound to an array of string.
Within that ListView I have defined an ItemTemplate as I want the Foreground of each item in the list to be dependant on condition - so that's applied to a TextBlock.
I want a tooltip to display when each item in the ListView is hovered over, so I have a Tooltip defined in that TextBlock
What I'm trying to do is have that Tooltip display the title/detail about a specific item by using a converter (to get the index of the item in a different list).
For this I need the Tooltip to know the ListView item but I can't seem to get that to work. The TextBlock itself retrieves it using Path=., I have tried naming the TextBlock ListItem and retrieving it as ElementName to no avail - the result is just empty string.
Here's the relevant xaml (with formatting properties removed).
<ListView.ItemTemplate>
    <DataTemplate>
        <TextBlock x:Name="ListItem" Text="{Binding Path=.}" Foreground="{Binding RelativeSource={RelativeSource Self}, Path=Text, Converter={StaticResource ConvertItemToColour}}">
            <TextBlock.ToolTip>
                <ToolTip>
                    <StackPanel Orientation="Vertical">
                        <Label>
                            <TextBlock Text="{Binding ElementName=ListItem, Path=Text, Converter={StaticResource ConvertItemToTitle}}"/> <!-- Item Title -->
                        </Label>
                        <Label>
                            <TextBlock/> <!-- Item Description -->
                        </Label>
                    </StackPanel>
                </ToolTip>
            </TextBlock.ToolTip>
        </TextBlock>
    </DataTemplate>
</ListView.ItemTemplate>

A: ToolTip, like Popup, is not part of the main visual tree so neither ElementName nor RelativeSource binding will work beyond ToolTip but DataContext inside ToolTip should still be the same as for ListViewItem
<ToolTip>
   <StackPanel Orientation="Vertical">
      <Label>
         <TextBlock Text="{Binding Path=., Converter={StaticResource ConvertItemToTitle}}"/>
      </Label>
   </StackPanel>
</ToolTip>

Text="{Binding Path=.}" should give you same result inside ToolTip as in DataTemplate


text:
Q: Filter on laravel pivot table I have two tables in Laravel connected with a pivot table. The two tables are users and roles, and the pivot table is called role_user. The pivot table also contains two extra fields: start and stop. This way I can track which roles a user has had in the past.
Now I want to create a query that gets all users who currently have role_id = 3.
First I had used WherePivot, but apparently that is bugged.
I have now made the following query using Eloquent:
Role::with('User')
    ->where('id', '=', '3')
    ->where('role_user.start', '<', date('Y-m-d'))
    ->where('role_user.stop', '>', date('Y-m-d'))
    ->whereHas('users', function($q){
        $q->where('firstname', 'NOT LIKE', '%test%');
    })
    ->get();

But somehow I am getting an error that the column start of the pivot table cannot be found. But I can confirm in PHPMyAdmin that the column is there.
This is the entire error:
Illuminate \ Database \ QueryException
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'klj_role_user.start' in 'where clause' (SQL: select * from `klj_roles` where `id` = 3 and `klj_role_user`.`start` < 2014-06-02 and `klj_role_user`.`stop` > 2014-06-02 and (select count(*) from `klj_users` inner join `klj_role_user` on `klj_users`.`id` = `klj_role_user`.`user_id` where `klj_role_user`.`role_id` = `klj_roles`.`id` and `firstname` NOT LIKE %test%) >= 1)

Can someone tell me if I am doing something wrong or give me a hint where I should be looking now?

A: The error is telling you that you are missing the start column in your pivot table klj_role_user.  What you should do is create the column.  If the column is already there, ensure you are using the correct database.
I've also simplified your query a little bit.  You don't really need a whereHas because you aren't trying to limit your roles by the users associated, but by the id, which in this case, you are using 3.  A with() would work perfectly fine and wherePivot() seems to be working fine for me when used in conjunction with with().
$role = Role::with(array('users' => function($q)
{
    $q->wherePivot('start', '>', date('Y-m-d H:i:s'));
    $q->wherePivot('stop', '<', date('Y-m-d H:i:s'));
    $q->where('firstname', 'NOT LIKE', '%test%');
}))->find(3);

foreach($role->users as $user) {
    echo $user->firstname;
}


text:
Q: Como simular uma tela de maior resolução para verificar o comportamento de um website? Existe alguma forma de simular uma tela com maior resolução para verificar como um site se comporta? Atualmente utilizo 1440x900 e preciso testar a interface em resoluções maiores.

A: Isto tem algumas soluções dependendo da maquina que você está utilizando.

*

*Por exemplo, drivers de vídeo da nVídia permitem que você adicione resoluções personalizadas maiores do que a do seu monitor, gerando um scroll horizontal e vertical em todo o desktop.

*Outra possibilidade é conectar um monitor adicional na placa de vídeo (isso funciona para vários tipos de placa e fabricante) e estender a área de trabalho nos dois, na horizontal, ampliando a tela do browser.
A vantagem de usar estes dois primeiros recursos é que simular somente dentro do browser às vezes não corresponde à realidade de uma área de trabalho realmente grande.

*

*Uma outra possibilidade é usar o zoom dos browsers. Por exemplo, a tecla - no Opera, ou ctrl - no Chrome, Iron e similares diminuem o zoom da tela, servindo para alguns tipos de avaliação também.

*Fora isso há sites como o View Like Us, que permitem uma simulação de resoluções diferentes da sua.
Provavelmente uma boa avaliação pode misturar mais de uma destas técnicas.

A: Nos browser Chrome e Firefox existem opções nas ferramentas de desenvolvimento que já vem nativas com os browsers para trabalhar com resoluções especificas. Abaixo os tutoriais de como ativar tais ferramentas.

Chrome
No Google Chrome existe no DevTools dele uma opção de Emulador, onde você pode simular diversas características no seu browser.
Para ativar, abra seu DevTools, (pressione F12, ou clique com botão direito e em inspecionar elemento).
No canto direito superior, tem um simbolo de engrenagem , clique nela e no menu General, tópico Appearance ative a primeira opção "Show 'Emulation' view in console".

Feche as opções, em cima no botão a esquerda da engrenagem, que parece com uma lista, clique nele.
No menu inferior que apareceu selecione "Emulation"  no tópico "Screen" você poderá configurar os dados da sua resolução desejada e o pixel ratio para que caso sua resolução seja menor fique confortável a visualização mesmo tendo mais pixels que seu monitor.

Demonstração da resolução desejada em um browser rodando em resolução nativa Full HD, porém emulando 1440x900, porém mudando a densidade de pixels você consegue emular resoluções maiores do que a que está usando:

Este recurso foi criado para trabalhar com dispositivos móveis, na página oficial você poderá obter mais detalhes.

Firefox
Também é possível emular no firefox, abra o inspetor de código e ative o icone de "Design Responsivo"  no lado superior direito.
Ou através da sequência de teclas Ctrl+Shift+M (Windows)
Adicione a resolução desejada no menu superior esquerdo que vai aparecer. O resultado pode ser visto na imagem abaixo:

A: Você pode usar o recurso Modo de design adaptável (Ctrl + shift + M) do Firefox no menu Desenvolvedor web, depois é só ir configurando as dimensões de cada elemento usando media queries no CSS.

A: Experimente utilizar o Screen Fly, este site permite que você teste um site hospedado em diversas resoluções, o bacana é que ele tem as resoluções dos aparelhos. Isso acaba facilitando, assim você sabe em quais aparelhos o seu site está rodando perfeito.

A: Como algumas respostas estão meio datadas, pois os browser são atualizados com frequência, vou contribuir com uma resposta atualizada sobre as versões mais recentes do Chrome. É possível simular resoluções superiores a 4K com facilidade
Primeiro acesse as ferramentes do desenvolvedor do Chrome, apertando F12 ou Ctrl+Shift+i. Depois disso localize o botão conforme abaixo, ou aperte Ctrl+Shift+m

Feito isso na parte superior, basta observar os quadrados vermelhos, vc pode colocar a resolução que quiser, tanto simulando telas menores, quanto maiores.
Aqui está um teste no site da globo com a resolução 50% maior que a minha tela.
(vc pode ir clicando nas barras AZUL, VERDE ou LARANJA, para ir simulando os breakpoints em min-width e max-width)

Agora a visualização em 4K

OBS1: Nessa mesma barra onde vc escolhe a resuloção vc também pode testar a tela com valores diferentes de Pixel Density (DPR: 1x, 2x e 3x). Além de poder "girar" a tela entre portrait e landscape no último botão da barra.
OBS2: Quando vc aumenta o zoom, vc está na verdade diminuindo a tela e a largura da tela, então se sua tela tem 1000px de largura e vc aumenta o zoom para 150% na verdade sua tela vai estar em 500px de largura.

A: Você pode criar uma página com um iframe chamando a página que deseja testar.
Coloque nesse iframe a width e height que você precisa.
Talvez tenha maneiras melhores, mas assim você consegue testar. Talvez trabalhando no zoom do browser você consiga um bom teste utilizado o iframe.


text:
Q: Do I need to install SQL Express if SQL Server is already installed? I have a server that has SQL Server 2008 R2 installed but my application uses SQL Express 2008 R2 - do I need to install SQL Express as well? The error Im currently getting is:

A network-related or instance-specific error occurred while
  establishing a connection to SQL Server. The server was not found or
  was not accessible. Verify that the instance name is correct and that
  SQL Server is configured to allow remote connections. (provider: SQL
  Network Interfaces, error: 26 - Error Locating Server/Instance
  Specified)

A: You can create your database the SQL Server and connect with the correct connection string. You can not attach your Database files like in SQL Server express though.
There is no need to install SQL Server Express.
A common connection string to connect to SQL Server is:
Data Source=yourServer;Initial Catalog=yourDatabase;Integrated Security=SSPI;

Replace yourServer with the servername (in the form of Server\instance) and yourDatabase with the name of the database you wish to connect to.
The following connection string for SQL Server Express does not work on a standard SQL Server:
Server=yourServer;AttachDbFilename=c:\data\yourDatabase.mdf;Database=yourDatabase; Trusted_Connection=Yes;


text:
Q: Maven Nexus private repository access I have just set up a nexus repository in my local network. This repository exposes access to the Maven central repository, plus three different private hosted repositories: snapshot, release and ext3rdparty. All these repositories are part of the public group in nexus, which I use as a central access point for all repositories:
http://nexus.server/nexus/content/groups/public/
My problem is: Using NetBeans as development envirnment, I can access to all repositories except the ext3rdparty. i.e. i got a compilation error when I try to build projects which are based on libraries stored in the ext3rdparty repo, and NetBeans can't find / navigate any of the artifacts available in this repository.
I suspect this is a settings.xml / pom.xml problem and not a NetBeans one because as I said, I can access to artifacts that I've released in other repositories, but I can't figure-out what's the problem.
Here is the FULL content of my settings.xml to redirect maven to my own repository:
<mirrors>
    <mirror>
        <id>nexus</id>
        <mirrorOf>*</mirrorOf>
        <url>http://nexus.server/nexus/content/groups/public</url>
    </mirror>
</mirrors>

<profiles>
    <profile>
        <id>nexus</id>
        <repositories>
            <repository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <url>http://central</url>
                <releases>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                    <updatePolicy>always</updatePolicy>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>nexus</activeProfile>
</activeProfiles>

<servers>
    <server>
        <id>nexus</id>
        <username>user</username>
        <password>***</password>
    </server>
    <server>
        <id>releases</id>
        <username>user</username>
        <password>***</password>
    </server>
    <server>
        <id>snapshots</id>
        <username>user</username>
        <password>***</password>
    </server>
</servers>

And here is the repositories-related part of my parent pom to allow deployment:
        <distributionManagement>
            <repository>
                <id>releases</id>
                <name>Releases</name>
                <url>http://nexus.server/nexus/content/repositories/releases/</url>
            </repository>

            <snapshotRepository>
                <id>snapshots</id>
                <name>Snapshots</name>
                <url>http://nexus.server/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
        </distributionManagement>

Any idea of what's wrong ?
Thanks in advance!
EDIT:
Half of a day lost: I finally ended up with removing all dependencies from the ext3rdparty repository, uploading them again to the repository, and updating all indexes and now everything works fine...
Don't really know what was the problem here, but at least the pom and the settings were OK. Thanks for your help.

A: If you have that sort of problem you can right click on the affected repository in the Repositories list and activate a Repair Index or Update Index and then check the status in the System Feeds for System updates.

A: Did you add your ext3rdparty repo to your public group?


text:
Q: node wants to use the "Local Items" keychain Every so often when I open my computer, that message appears. Can anyone tell me what node is?

A: I got this too, and I ran "ps aux | grep node" from the terminal. I've seen a couple of different programs show up. One was Videostream. Another was actually Adobe Creative Cloud:
kenlu              693   0.0  0.2  5996836  27612   ??  S    11Dec18  23:09.26 /Applications/Utilities/Adobe Creative Cloud Experience/CCXProcess/CCXProcess.app/Contents/MacOS/../libs/node /Applications/Utilities/Adobe Creative Cloud Experience/CCXProcess/CCXProcess.app/Contents/MacOS/../js/main.js
So it looks like this is just part of Adobe Creative Cloud, which is probably fine.

A: Most probably it caused by Adobe Creative Cloud, and make sure it this option,
1- check in system preferences>security and privacy>in the privacy tap make sure iCloud check marked.
2-system preferences >security and privacy >in general tap click open anyway the adobe creative cloud if showing here.
3-open finder> then click on "Go" type this command ~/library then press go>find keychain folder open it and delete all files, empty trash and restart your Mac
4-remove adobe creative cloud from start up, open system preferences>user and groups>clicl on login tap> select adobe if showing then remove it by clicking - button.


text:
Q: How do you create a stretched beta distribution with Scipy using only quantiles? I am trying to recreate a stretched beta distribution that is output by one of my companies' internal tools. This tool is quite dated and I am trying to come up with a replacement for it.
The initial tool asks the user for P90/P50/P10 quantile values. It does not ask the user for the alpha or beta values. Therefore, I need to figure out how to make a stretched beta distribution based only on quantile data.
For example, I want to find a stretched beta distribution for an area of a polygon. The p90 value is 100 acres, the P50 value is 250 acres, and the P10 value is 500 acres
I cannot figure out how to do this in Scipy (or any other library for that matter).
I can't figure out how to estimate the alpha and beta factors. I feel like if I can derive the alpha and beta factors, I could use the loc and scale values to potentially constrain the distribution.
I have tried to read the Scipy documentation and to be honest, i can't understand it. I am not a statistician, and the documentation seems to assume a good amount of familiarity with statistics.
Can someone point me in the right direction as to how to tackle this problem? If I can derive the alpha and beta values, am I right in thinking I should be able to use the loc and scale values to constrain and replicate the distribution?
Please let me know if I can provide any clarification.

A: Unfortunately I can't take the time right now to post all of the details, but I can confirm that the general strategy of solving 3 equations for 3 parameters (a, b, and scale parameter) does work; I was able to recover the solution shown by OP.
(1) System of 3 equations: evaluate cdf(x_k) = quantile_k for x_1 = 100, x_2 = 250, x_3 = 500, and quantile_1 = 1/10, quantile_2 = 1/2, quantile_3 = 9/10.
cdf for a general beta distribution is
beta_incomplete_regularized(a, b, (x - x0)/L)

where x0 is the offset (33.3 above) and L is the scale. (Scipy notation may differ.)
(2) Jacobian matrix. Differentiate cdf(x_k) with respect to a, b, and L, giving 3 gradients. Construct a matrix, with those gradients as the rows. Maxima says the derivative is
[beta_incomplete_regularized(a,b,(x-x0)/L)
  *(log((x-x0)/L)+psi[0](b+a)-psi[0](a))
  -(gamma(a)*hypergeometric_regularized([a,a,1-b],[a+1,a+1],(x-x0)/L)
            *gamma(b+a)*(x-x0)^a)
   /(L^a*gamma(b)),
 (gamma(b)*gamma(b+a)
          *hypergeometric_regularized([b,b,1-a],[b+1,b+1],1-(x-x0)/L)
          *(1-(x-x0)/L)^b)
  /gamma(a)
  +beta_incomplete_regularized(b,a,1-(x-x0)/L)
   *((-log(1-(x-x0)/L))-psi[0](b+a)+psi[0](b)),
 -(L^((-a)-1)*(1-(x-x0)/L)^(b-1)*(x-x0)^a)/beta(a,b)]

The regularized hypergeometric function is the 3F2 function divided by the product of gamma(n[k]) where n is the second list of parameters.
A quick web search seems to suggest Scipy doesn't implement 3F2, so that might be a roadblock. But I didn't look very hard.
(3) Supply equations and Jacobian to multidimensional Newton algorithm.
Sorry that I can't give a full solution, or in Python, right now. Hope this helps all the same.
EDIT: Here's a complete solution for Maxima.
display2d: false;
linel: 65;

/* construct cdf for stretched beta */
assume (x > 0, L > 0, x0 > 0);
assume (x > x0, x < x0 + L);
assume (a > 0, b > 0);
load (distrib);
cdf: cdf_beta ((x - x0)/L, a, b);

/* construct gradient wrt free parameters a, b, L */
grad_e: [diff (cdf, a), diff (cdf, b), diff (cdf, L)];
expand_hypergeometric_regularized: lambda ([aa, bb, xx], hypergeometric (aa, bb, xx) / product (gamma (bb[k]), k, 1, length (bb)));
grad_e1: subst (hypergeometric_regularized = expand_hypergeometric_regularized, grad_e);

/* construct equations given user-specified data */
x0_assumed: 333/10;
F90: 100;
Median: 250;
F10: 500;
eqs_with_x0: [subst (x = F90, cdf) = 1/10, subst (x = Median, cdf) = 1/2, subst (x = F10, cdf) = 9/10];
eqs: subst (x0 = x0_assumed, eqs_with_x0);

/* construct Jacobian matrix by evaluating gradient at data values */
DF_with_x0: apply ('matrix, makelist (subst (x = xx, grad_e1), xx, [F90, Median, F10]));
DF: subst (x0 = x0_assumed, DF_with_x0);

/* solve equations via multidimensional Newton algorithm */
load (mnewton);
newtondebug: true;
/* need initial guess; assume cdf is skewed to the right, so a < b
 * and guess L is somewhat bigger than interquantile range
 */
solution: mnewton (eqs, [a, b, L], [2, 3, 600], DF);

/* test solution in equations */
float (subst (solution[1], eqs));

/* display pdf of beta distribution */
pdf: subst (x0 = x0_assumed, subst (solution[1], pdf_beta ((x - x0)/L, a, b)));
plot2d (pdf, [x, x0_assumed, x0_assumed + assoc (L, solution[1])]);

/* mean and sd */
printf (true, "Mean ~,1f", subst (solution[1], mean_beta (a, b) * L + x0_assumed));
printf (true, "Std ~,1f", subst (solution[1], std_beta (a, b) * L));

/* table of quantiles */
quantile: subst (solution[1], lambda ([q], quantile_beta (q, a, b) * L + x0_assumed));
for p in [100, 95, 90, 75, 50, 25, 10, 5, 0]
    do printf (true, "F~d ~,1f~%", p, quantile(1 - p/100));

Here's the solution I get:
[a = 1.782967949218066,b = 7.660029561011594,
         L = 1301.704394701864]

and the output:
Mean 279.1
Std 157.6
F100 33.3
F95 76.6
F90 100.0
F75 157.2
F50 250.0
F25 371.8
F10 500.0
F5 581.7
F0 1335.0


text:
Q: How do I write a simple program to show a notification when CAPS LOCK is pressed? Forgive me if this is a silly question but I am a novice programmer, and I'm hoping there is a novice solution to this.
Is there any programming language that will quickly allow me to write a simple program to show a notification on Windows 7 when CAPS LOCK is pressed?
My laptop doesn't have an indicator light and I have no program on my computer to do so, although I'd be open to suggestions. The only partial solution I've found is through accessibility settings in Windows which plays a god-awful beep every time the key is pressed.
Thanks!

A: Try Auto Hotkey. It is a great program just for that. It runs scripts in the background that can directly manipulate your keyboards input.
I changed capslock to require ctrl+capslock to work otherwise pressing capslock by itself does nothing :)
You can also do a bunch of other things. You are able to set a custom tone for when you push capslock (however a simple popup or key remapping would probably be best).
Here's an example from the site:
"Capslock::Ctrl   Makes Capslock become a Control key. To retain the ability to turn Capslock on and off, also add the remapping +Capslock::Capslock (this toggles Capslock on and off when you hold down the shift key and press Capslock)."


text:
Q: Why 'Package' type does not inherit 'AccessibleObject' type? Below are the relevant types(in java) for annotation processing,

In addition to Field & Method types, Package type is also used in context of annotations with reflection, because these types implement AnnotatedElement interface.
This contract allows to access(in runtime) the instances of those types to get their meta data.
Why Package does not inherit AccessibleObject?

A: Because packages aren't accessible.  What the word "Accessible" in the name AccessibleObject means is effectively has an access specification and associated scope.  For example, an object might have public access (at which point its scope is irrelevant), or private access from within class Foobar, or package-local (default) access in package com.example.foo.  AccessibleObject also provides access to annotations that are declared on a Java source element, but this isn't its primary purpose.
Packages don't have this.  All packages in Java are public, and are globally accessible.  (I believe Java 9 introduces a system that is going to change this in some ways, but I believe it just introduces a new orthogonal system of classification that isn't going to affect AccessibleObject and packages).
Packages can have annotations, but access to these is provide through alternative means, so have no need to extend AccessibleObject to provide the relevant API for this.
This means that the methods in AccessibleObject (mostly isAccessible() and setAccessible(boolean)) are irrelevant for packages, because packages are always accessible and this is not something that can be set.  Therefore, extending this type would not be appropriate for them.

A: You could just as well ask "why don't List collections inherit from AccessibleObject," or any other class in Java, for that matter?  The short answer is "because they don't have to."
The java.lang.reflect namespace is meant to provide Reflection capabilities over any object in the Java ecosystem, without requiring that said object inherits from a Reflection base class, or any other class. That's kind of the whole point of reflection: to do things in Java that would normally require inheritance or composition to achieve.
You said it yourself: "Package type is used in context of annotations with reflection."  It is those annotations that Reflection is interested in, not your class inheritance hierarchy.


text:
Q: How do I clean RAM my app used, in iOS? I working on a game that has some hitches (freezes for a bit) under certain loading situations.
If I start the phone or remove/reinstall the game, the hitches are there. If I kill the app and re-open, the hitches are gone which makes me believe they happen when the game assets are being loaded into the RAM. When I kill the app, memory becomes inactive but it's still there to be loaded quickly if I re-open the game.
I need a way to clean the RAM so I can reproduce hitches quickly, that is, quicker than restarting the phone or reinstalling the app.
I tried to do a trick involving holding the wake button then home button but that obviously only kill all apps and do not erase the memory.
I also tried to use this project that uses malloc and memset to clean the memory until it crashes (allocate and erase more memory until it crashes), but it doesn't clean the memory my closed game used. I have the impression that iOS deallocates inactive memory from apps that were used before my game, so the memory allocation app never gets the chance to use my game's inactive memory, because it's killed first.
Therefore, I'd like to understand how iOS chooses which inactive memory to use and how can I make my app inactive memory to be cleaned from RAM.
Please notice I'm not trying to find a way to free memory while playing, not trying to make the game use less memory, I'm trying to clear the memory the game used after the game is closed so the hitches happen 100% of the times I open the game.
I'm using an iPhone 6, iOS 10.3.2.

A: It's impossible to describe this in a couple of words. First of all I'd recommend you to review this article.
If you want to release unnecessary objects manually, take a look at description of didReceiveMemoryWarning() method of UIViewController


text:
Q: remove subquery I have table with one column, and I need to get all duplicated lines. This is table:
|  name  |
|  ----- |
|    a   |
|    a   |
|    b   |
|    c   |
|    c   |
|    d   |

And this is expected result set:
|  name  |
|  ----- |
|    a   |
|    a   |
|    c   |
|    c   |

I already do this that way:
 SELECT t.name FROM my_table t inner join (
        SELECT name, count(1) AS count FROM my_table t2 GROUP BY t2.name HAVING count > 1
      ) AS t1 on t1.name = t.name

Is it possible to do it without subquery?

A: If you have only one column, wouldn't this output do?
select name, count(*) as num_duplicates
from t
group by name
having count(*) > 1;

This produces one row per name with the number of duplicates. If you have only one column, that seems like a better output (to me) than the list of names repeated.

A: you need to first bring name of having count >1
select * from my_table where name in
(select name from my_table having count(name) > 1 group by name )


text:
Q: NoClassDefFoundError FileFilter missing when running JxBrowser from OSGi Getting an error when trying to create a BrowserView, appears to have issues finding javax.swing.filechooser.FileFilter. I'm using Guice to instantiate my screens, but this should have no affect. When launching my application with the embedded browser I get the following:
ERROR [Init thread] 19:37:24 19/09/17: ExtensionLoading error cuased by
java.lang.NoClassDefFoundError: javax/swing/filechooser/FileFilter
    at com.teamdev.jxbrowser.chromium.swing.BrowserView.<init>(SourceFile:73)

This is running with OpenJDK 1.8. I've double checked the JxBrowser bundle and it appears to be importing javax.swing correctly. Any suggestions on what to look for?
The full stack trace is as follows:
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at com.ur.injection.GuiceBuilder.get(GuiceBuilder.java:27)
at gui.main.MainPanel.initFlippablePanel(MainPanel.java:45)
at gui.main.MainPanel.<init>(MainPanel.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at com.ur.injection.GuiceBuilder.get(GuiceBuilder.java:27)
at gui.main.URGUI.<init>(URGUI.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at com.ur.injection.GuiceBuilder.get(GuiceBuilder.java:27)
at gui.main.URGUI$5.run(URGUI.java:222)
Caused by: java.lang.NoClassDefFoundError: javax/swing/filechooser/FileFilter
at com.teamdev.jxbrowser.chromium.swing.BrowserView.<init>(SourceFile:73)
at com.ur.g5.runscreen.G5RunPanel.initComponents(G5RunPanel.java:227)
at com.ur.g5.runscreen.G5RunPanel.<init>(G5RunPanel.java:85)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
... 49 more
Caused by: java.lang.ClassNotFoundException: javax.swing.filechooser.FileFilter not found by com.teamdev.jxbrowser.chromium [32]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 77 more
ERROR [Init thread] 19:37:24 19/09/17: ExtensionLoading error cuased by
java.lang.NoClassDefFoundError: javax/swing/filechooser/FileFilter
at com.teamdev.jxbrowser.chromium.swing.BrowserView.<init>(SourceFile:73)
at com.ur.g5.runscreen.G5RunPanel.initComponents(G5RunPanel.java:227)
at com.ur.g5.runscreen.G5RunPanel.<init>(G5RunPanel.java:85)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.google.inject.internal.DefaultConstructionPrCaused by: java.lang.NoClassDefFoundError: javax/swing/filechooser/FileFilter at com.teamdev.jxbrowser.chromium.swing.BrowserView.(SourceFile:73) at com.ur.g5.runscreen.G5RunPanel.initComponents(G5RunPanel.java:227) at com.ur.g5.runscreen.G5RunPanel.(G5RunPanel.java:85) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54) at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38) at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ... 49 more Caused by: java.lang.ClassNotFoundException: javax.swing.filechooser.FileFilter not found by com.teamdev.jxbrowser.chromium [32] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1558) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1998) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 77 more ERROR [Init thread] 19:37:24 19/09/17: ExtensionLoading error cuased by java.lang.NoClassDefFoundError: javax/swing/filechooser/FileFilter at com.teamdev.jxbrowser.chromium.swing.BrowserView.(SourceFile:73) at com.ur.g5.runscreen.G5RunPanel.initComponents(G5RunPanel.java:227) at com.ur.g5.runscreen.G5RunPanel.(G5RunPanel.java:85) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:65) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)oxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:65)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)

A: According to system requirements JxBrowser doesn't support OpenJDK. It supports only Oracle, Apple, and IBM JDK/JRE.


text:
Q: Set Postgres DMY i'm reading a file with many lines and mounting insert queries with a generic config in runtime, because the inserts is for more than one enity, the idea is that the database automatically deal with the types in the query. Here's the problem, the date format: 12022016 (DMY) i do like to now if its possible to make Postgres to accept that format in the insert's queries.
EX:
INSERT INTO TEST(1,'12022016');

(Sorry if i talk something wrong, not english speaker here :)

A: Setting custom format for date is not too obvious. Just set datestyle to DMY; wont solve your problem - look here fro details, I'd try transformation on load, like here:
t=# select to_date('12022016','DDMMYYYY')::date;
  to_date
------------
 2016-02-12
(1 row)

so for you it would be:
INSERT INTO TEST select 1,to_date('12022016','DDMMYYYY');


text:
Q: Converting a GroupBy / Having SQL query to Linq or EF query I have the following Query:
SELECT planet_id
FROM tags
WHERE name IN ('tag1', 'tag2')
GROUP BY hardware_id
HAVING COUNT(name) = 1;

where is 'tag1' and 'tag2' is the items of a List<string> that I pass to my function.  I want to know how to convert it to Entity Framework or Linq query.

A: You can use Contains extension method:
var tags=new List<string>{"tag1", "tag2"};
var query= from t in context.Tags
           where tags.Contains(t.Name)
           group t by t.hardware_id into g
           where g.Count()==1


text:
Q: how to use another nav host inside the navigation without using using another activity I have a fragment which is also a part of navigation name basic details fragment
and I want to use another navhost container inside this fragment, How can I do that how I can access this navhost inside the BasicFragment or it is possible? if any one know please share the info
thank you :)
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/background_gradient"
    tools:context=".ui.authentication.register.fragment.BasicDetailsFragment">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/_8sdp"
        android:text="@string/registration"
        android:textColor="@color/white"
        android:textSize="@dimen/_16sdp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/linearLayout"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginTop="@dimen/_40sdp"
        android:background="@drawable/top_rounded_corner_shape"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <!--<fragment
            android:id="@+id/registrationNavHost"
            android:name="androidx.navigation.fragment.NavHostFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:defaultNavHost="true"
            app:navGraph="@navigation/registration_graph" />-->

        <com.aceinteract.android.stepper.StepperNavigationView
            android:id="@+id/stepper"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/_20sdp"
            app:stepperIconSize="@dimen/_20sdp"
            app:stepperItems="@menu/onboarding_steps_menu"
            app:stepperType="tab_numbered" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>


text:
Q: Сигнал QProcess для выполнения с использованием сигналов слотов Как можно запустить QProcess по сигналу не используя таймер? В приведённом коде как пока вызванная команда внутри QProcess не выполнится, очередь событий не будет обрабатываться, соответсвенно не отрисовывается окно программы. С таймером понятно как это сделать а как это сделать используя стандартные сигналы класса.
qDebug()<<"Set command";
QString path = QDir::homePath()+"/settings.ini";
if (QFile(path).exists())
{
    QSettings settings(path, QSettings::IniFormat);
    settings.beginGroup("command");
    QProcess cmdProcess;
    cmdProcess.start(settings.value("com").toString(),settings.value("arg").toStringList());
    cmdProcess.waitForFinished();
    settings.endGroup();
}


text:
Q: opengl: glFlush() vs. glFinish() I'm having trouble distinguishing the practical difference between calling glFlush() and glFinish().
The docs say that glFlush() and glFinish() will push all buffered operations to OpenGL so that one can be assured they will all be executed, the difference being that glFlush() returns immediately where as glFinish() blocks until all the operations are complete.
Having read the definitions, I figured that if I were to use glFlush() that I would probably run into the problem of submitting more operations to OpenGL than it could execute. So, just to try, I swapped out my glFinish() for a glFlush() and lo and behold, my program ran (as far as I could tell), the exact same; frame rates, resource usage, everything was the same.
So I'm wondering if there's much difference between the two calls, or if my code makes them run no different. Or where one should be used vs. the other.
I also figured that OpenGL would have some call like glIsDone() to check whether or not all the buffered commands for a glFlush() are complete or not (so one doesn't send operations to OpenGL faster than they can be executed), but I could find no such function.
My code is the typical game loop:
while (running) {
    process_stuff();
    render_stuff();
}

A: If you did not see any performance difference, it means you're doing something wrong. As some others mentioned, you don't need to call either, but if you do call glFinish, then you're automatically losing the parallelism that the GPU and CPU can achieve. Let me dive deeper:
In practice, all the work you submit to the driver is batched, and sent to the hardware potentially way later (e.g. at SwapBuffer time).
So, if you're calling glFinish, you're essentially forcing the driver to push the commands to the GPU (that it batched till then, and never asked the GPU to work on), and stall the CPU until the commands pushed are completely executed. So during the whole time the GPU works, the CPU does not (at least on this thread). And all the time the CPU does its work (mostly batching commands), the GPU does not do anything. So yeah, glFinish should hurt your performance. (This is an approximation, as drivers may start having the GPU work on some commands if a lot of them were already batched. It's not typical though, as the command buffers tend to be big enough to hold quite a lot of commands).
Now, why would you call glFinish at all then ? The only times I've used it were when I had driver bugs. Indeed, if one of the commands you send down to the hardware crashes the GPU, then your simplest option to identify which command is the culprit is to call glFinish after each Draw. That way, you can narrow down what exactly triggers the crash
As a side note, APIs like Direct3D don't support a Finish concept at all.

A: Have a look here. In short, it says:

glFinish() has the same effect as glFlush(), with the addition that glFinish() will block until all commands submitted have been executed.

Another article  describes other differences:

*

*Swap functions (used in double-buffered applications) automatically flush the commands, so no need to call glFlush

*glFinish forces OpenGL to perform outstanding commands, which is a bad idea (e.g. with VSync)

To sum up, this means that you don't even need these functions when using double buffering, except if your swap-buffers implementation doesn't automatically flush the commands.

A: glFlush really dates back to a client server model. You send all gl commands through a pipe to a gl server. That pipe might buffer. Just like any file or network i/o might buffer. glFlush only says "send the buffer now, even if it is not full yet!". On a local system this is almost never needed because a local OpenGL API is unlikely to buffer itself and just issues commands directly. Also all commands that cause actual rendering will do an implicit flush.
glFinish on the other hand was made for performance measurement. Kind of a PING to the GL server. It roundtrips a command and waits until the server responds "I am idle".
Nowadays modern, local drivers have quite creative ideas what it means to be idle though. Is it "all pixels are drawn" or "my command queue has space"? Also because many old programs sprinkled glFlush and glFinish throughout their code without reason as voodoo coding many modern drivers just ignore them as an "optimization". Can't blame them for that, really.
So in summary: Treat both glFinish and glFlush as no ops in practice unless you are coding for an ancient remote SGI OpenGL server.

A: There doesn't seem to be a way of querying the status of the buffer. There is this Apple extension which could serve the same purpose, but it doesn't seem cross-platform (haven't tried it.) At it quick glance, it seems prior to flush you'd push the fence command in; you can then query the status of that fence as it moves through the buffer.
I wonder if you could use flush prior to buffering up commands, but prior to beginning to render the next frame you call finish. This would allow you to begin processing the next frame as the GPU works, but if it's not done by the time you get back, finish will block to make sure everything's in a fresh state.
I haven't tried this, but I will shortly.
I have tried it on an old application that has pretty even CPU & GPU use. (It originally used finish.)
When I changed it to flush at end and finish at begin, there were no immediate problems. (Everything looked fine!) The responsiveness of the program increased, probably because the CPU wasn't stalled waiting on the GPU. Definitely a better method.
For comparison, I removed finished from the start of the frame, leaving flush, and it performed the same.
So I would say use flush and finish, because when the buffer is empty at the call to finish, there is no performance hit. And I'm guessing if the buffer were full you should want to finish anyway.

A: As the other answers have hinted, there really is no good answer as per the spec.  The general intent of glFlush() is that after calling it, the host CPU will have no OpenGL-related work to do -- the commands will have been pushed to the graphics hardware.  The general intent of glFinish() is that after it returns, no remaining work is left, and the results should be available too all appropriate non-OpenGL APIs (e.g. reads from the framebuffer, screenshots, etc...).   Whether that is really what happens is driver-dependent.  The specification allows a ton of latitude as to what is legal.

A: I was always confused about those two commands too, but this image made it all clear to me:

Apparently some GPU drivers don't send the issued commands to the hardware unless a certain number of commands has been accumulated. In this example that number is 5.
The image shows various OpenGL commands (A, B, C, D, E...) that have been issued. As we can see at the top, the commands don't get issued yet, because the queue isn't full yet.
In the middle we see how glFlush() affects the queued up commands. It tells the driver to send all queued up commands to the hardware (even if the queue isn't full yet). This doesn't block the calling thread. It merely signals the driver that we might not be sending any additional commands. Therefore waiting for the queue to fill up would be a waste of time.
At the bottom we see an example using glFinish(). It almost does the same thing as glFlush(), except that it makes the calling thread wait till all commands have been processed by the hardware.
Image taken from the book "Advanced Graphics Programming Using OpenGL".

A: Mind that these commands exist since the early days of OpenGL. glFlush ensures that previous OpenGL commands must complete in finite time (OpenGL 2.1 specs, page 245). If you draw directly to the front buffer, this shall ensure that the OpenGL drivers starts drawing without too much delay. You could think of a complex scene that appears object after object on the screen, when you call glFlush after each object. However, when using double buffering, glFlush has practically no effect at all, since the changes won't be visible until you swap the buffers.
glFinish does not return until all effects from previously issued commands [...] are fully realized. This means that the execution of your program waits here until every last pixel is drawn and OpenGL has nothing more to do. If you render directly to the front buffer, glFinish is the call to make before using the operating system calls to take screenshots. It is far less useful for double buffering, because you don't see the changes you forced to complete.
So if you use double buffering, you probably won't need neither glFlush nor glFinish. SwapBuffers implicitly directs the OpenGL calls to the correct buffer, there's no need to call glFlush first. And don't mind stressing the OpenGL driver: glFlush will not choke on too many commands. It is not guaranteed that this call returns immediately (whatever that means), so it can take any time it needs to process your commands.

A: The question is: do you want your code to continue running while the OpenGL commands are being executed, or only to run after your OpenGL commands has been executed.
This can matter in cases, like over network delays, to have certain console output only after the images have been drawn or the such.


text:
Q: Resistor getting hot - up to 50°C. Is it an issue of the resistor wattage or nature of the resistor? I am using an FOD817DSD optoisolator.
According to the datasheet:

*

*CTR: 300% - 600% @ 5 mA

*VF = 1.2 V (typical) @ If = 20 mA.

We have 10 optoisolators on the PCB which is connected to some other board IO pins. There is no proper information on required IC for the third party board. I assumed max 15 mA is sufficient for any digital IOs.
I have used 12 V supply through 1k SMD resistor (tried with 125 mW, 250 mW, 400 mW) to the optocoupler input. Voltage on input pin is 1.15 V (I can get 1.2 V If the resistor is 540 ohm, but heating > 50°C) and collector voltage is 5 V, everything works fine. But all 1k input resistors are getting heated up to 50°C. Even though I tried with 400 mW resistor.
I found this formula in the datasheet, CTR =(IC / IF) * 100%.

*

*IF=(12 V - 1.2 V) / 1k = 10.8 mA But am getting 1.15 V instead of 1.2 V. So power dissipation in the resistor is P = 10.8 * 2 mA X 1k = 117 mW. I have used more than 125 mW rated resistors. Why is it getting hot?

*As per the formula "IF" should not exceed 17 mA because given IC max is 50 mA. What then is the meaning of "VF is 1.2 V @ IF is 20mA" as mentioned in the datasheet?

*The heating is the same for both 125 mW and 400 mW rated resistors. What is the role of resistor wattage here?

*If we use higher wattage resistors will they also heat up to the same temperature or will the heating be reduced?

*Is there something wrong with the circuit? Will heating break the resistor or reduce its performance? How I can reduce the heat?

A: Any 1k resistor will have to dissipate the 118 milliwatts. The resistor rated wattage just tells if the resistor can handle it or not. If all else remains the same, they all will end up at the same temperature. As resistors that can handle more power are larger and contain more mass, they just take longer to reach that temperature. To reduce the temperature, the heat needs to be conducted away from the resistor via PCB or airflow.

A: Point 1:
The Watt rating of a resistor refers to its maximum power dissipation.
The heating you are referring to is joule heating given by P = I^2 R
As you can see the heating is not related to the rating of the resistor. The watt rating is an absolute maximum
To determine the amount of heat the resistor will generate / can take you will need to look at the datasheet
https://en.wikipedia.org/wiki/Joule_heating
Point 2:
Ic max is 50mA but this has no bearing on the led current. If the led is saturating the transistor then 50mA is the max collector current, the collector current is dependant on what load you connect to the transistor
Point 3:
...See point 1
Point 4:
...See point 1
Point 5:
That depends on the resistors ratings for max temp, to reduce the heat:
...See point 1