text:
Q: Wi-Fi adapter install error Linux Mint All right?
I have an adapter that has worked on Windows 10. But on Cinnamon, it is not even recognized.
Follows some results, being the first one the attempt to install the driver that came with the adapter in a CD:
$ sudo bash install.sh
##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
rtl8188EUS_linux_v4.1.4_6773.20130222.tar.gz
rtl8188EUS_linux_v4.1.4_6773.20130222/
rtl8188EUS_linux_v4.1.4_6773.20130222/runwpa
rtl8188EUS_linux_v4.1.4_6773.20130222/core/
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_xmit.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ioctl_query.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_bt_mp.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/efuse/
rtl8188EUS_linux_v4.1.4_6773.20130222/core/efuse/rtw_efuse.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_recv.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_br_ext.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_wapi.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_eeprom.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_debug.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_tdls.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_p2p.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ieee80211.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_security.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_mlme.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_mp.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_wapi_sms4.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_sreset.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_sta_mgt.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_rf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_pwrctrl.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_wlan_util.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_mlme_ext.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_io.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ap.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_led.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ioctl_rtl.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_mp_ioctl.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ioctl_set.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_iol.c
rtl8188EUS_linux_v4.1.4_6773.20130222/wlan0dhcp
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/osdep_service.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/ioctl_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/recv_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/os_intfs.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/pci_ops_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/custom_gpio_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/usb_intf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/mlme_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/gspi_intf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/pci_intf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/sdio_intf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/rtw_android.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/xmit_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/gspi_ops_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/usb_ops_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/sdio_ops_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/os_dep/linux/ioctl_cfg80211.c
rtl8188EUS_linux_v4.1.4_6773.20130222/include/
rtl8188EUS_linux_v4.1.4_6773.20130222/include/hal_com.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/wlan_bssdef.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/cmd_osdep.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_recv.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_mlme_ext.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/wifi.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_led.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_recv.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/custom_gpio.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/HalPwrSeqCmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_dm.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_dm.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8192CPhyReg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/gspi_ops_linux.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_pg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8192DPhyCfg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_dm.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_rf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_android.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types_gspi.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_recv.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_recv.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/nic_spec.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/usb_osintf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_dm.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_recv.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_xmit.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_event.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8188EPhyReg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_qos.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_pwrctrl.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_xmit.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_spec.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/gspi_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_ce_service.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_ops.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_sreset.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_rf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/ieee80211.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/recv_osdep.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types_linux.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_efuse.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/gspi_ops.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_ops_ce.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/usb_ops.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_xmit.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ht.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/HalVerDef.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/ioctl_cfg80211.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/ethernet.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8188EPhyCfg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/mp_custom_oid.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ioctl_rtl.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_ops_linux.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8723APhyCfg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_spec.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_mlme.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_sreset.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/ieee80211_ext.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types_ce.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8192CPhyCfg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8723APhyReg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_cmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_rf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_led.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/swab.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/swabb.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/big_endian.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/little_endian.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/byteorder/generic.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_mp_ioctl.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_ops_xp.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/usb_ops_linux.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_xmit.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_osintf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8723PwrSeq.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_sreset.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_p2p.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/pci_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_conf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/usb_vendor_req.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/linux/
rtl8188EUS_linux_v4.1.4_6773.20130222/include/linux/wireless.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_led.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/gspi_osintf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ioctl_query.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_eeprom.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types_xp.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_cmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_byteorder.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_xmit.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_version.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_spec.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_cmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ioctl_set.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/h2clbk.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/pci_osintf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_bt_mp.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_cmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192d_rf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/pci_ops.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_tdls.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_cmd.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_event.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/mlme_osdep.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_debug.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ap.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_intf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_wapi.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/hal_intf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sta_info.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8188e_spec.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_iol.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_mp_phy_regdef.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_rf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8188EPwrSeq.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/usb_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/autoconf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_security.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/sdio_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_io.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/Hal8192DPhyReg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_br_ext.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/circ_buf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/basic_types.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_hal.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/ip.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_led.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/if_ether.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/xmit_osdep.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8192c_sreset.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_bt-coexist.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_mp.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtw_ioctl.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/drv_types_sdio.h
rtl8188EUS_linux_v4.1.4_6773.20130222/include/rtl8723a_led.h
rtl8188EUS_linux_v4.1.4_6773.20130222/ifcfg-wlan0
rtl8188EUS_linux_v4.1.4_6773.20130222/Makefile
rtl8188EUS_linux_v4.1.4_6773.20130222/Kconfig
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_types.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/HalPhyRf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/HalPhyRf.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_RegDefine11N.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_precomp.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/Hal8188EReg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_BB.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/odm_RTL8188E.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/Hal8188ERateAdaptive.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_RF.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_RF.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_FW.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalPhyRf_8188e.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/odm_RegConfig8188E.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/odm_RTL8188E.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_MAC.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/Hal8188EFWImg_CE.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_MAC.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_BB.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/Hal8188EFWImg_CE.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalHWImg8188E_FW.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/odm_RegConfig8188E.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/Hal8188ERateAdaptive.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/rtl8188e/HalPhyRf_8188e.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_HWConfig.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_debug.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_interface.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_interface.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_HWConfig.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_reg.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_RegDefine11AC.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/OUTSRC/odm_debug.h
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/hal_intf.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_sreset.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_rxdesc.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_cmd.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_rf6052.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/Hal8188EPwrSeq.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_mp.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_phycfg.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_dm.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/usb_halinit.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/rtl8188eu_led.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/rtl8188eu_recv.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/rtl8188eu_xmit.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/usb/usb_ops_linux.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_hal_init.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/rtl8188e/rtl8188e_xmit.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/hal_com.c
rtl8188EUS_linux_v4.1.4_6773.20130222/hal/HalPwrSeqCmd.c
rtl8188EUS_linux_v4.1.4_6773.20130222/clean
rtl8188EUS_linux_v4.1.4_6773.20130222
Authentication requested [root] for make clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/rtl8188e/usb ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/OUTSRC/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
Authentication requested [root] for make driver:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-20-generic/build M=/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CC [M] /home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.o
In file included from /home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:23:0:
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h: In function '_init_timer':
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:956:8: error: '_timer {aka struct timer_list}' has no member named 'data'
ptimer->data = (unsigned long)cntx;
^~
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:957:2: error: implicit declaration of function 'init_timer'; did you mean '_init_timer'? [-Werror=implicit-function-declaration]
init_timer(ptimer);
^~~~~~~~~~
_init_timer
In file included from /home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:23:0:
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h: In function 'thread_enter':
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:1423:2: error: implicit declaration of function 'daemonize' [-Werror=implicit-function-declaration]
daemonize("%s", name);
^~~~~~~~~
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:1424:2: error: implicit declaration of function 'allow_signal'; did you mean 'do_signal'? [-Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^~~~~~~~~~~~
do_signal
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h: In function 'flush_signals_thread':
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:1437:6: error: implicit declaration of function 'signal_pending'; did you mean 'timer_pending'? [-Werror=implicit-function-declaration]
if (signal_pending (current))
^~~~~~~~~~~~~~
timer_pending
/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:1439:3: error: implicit declaration of function 'flush_signals'; did you mean 'do_signal'? [-Werror=implicit-function-declaration]
flush_signals(current);
^~~~~~~~~~~~~
do_signal
cc1: some warnings being treated as errors
scripts/Makefile.build:332: recipe for target '/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.o' failed
make[2]: *** [/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.o] Error 1
Makefile:1552: recipe for target '_module_/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222' failed
make[1]: *** [_module_/home/^/Documents/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:678: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

lsusb:
Bus 001 Device 005: ID 0bda:f179 Realtek Semiconductor Corp.
Bus 001 Device 004: ID 0781:5567 SanDisk Corp. Cruzer Blade
Bus 001 Device 002: ID 04e8:61b6 Samsung Electronics Co., Ltd M3 Portable Hard Drive 1TB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 18f8:0f97
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 2a7a:9a18
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lspci -nnk | grep -iA3 net:
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 02)
Subsystem: ASUSTeK Computer Inc. RTL810xE PCI Express Fast Ethernet controller [1043:8347]
Kernel driver in use: r8169
Kernel modules: r8169

rfkill list: no results at all
mokutil --sb-state;
EFI variables are not supported on this system

iwconfig:
lo        no wireless extensions.

enp2s0    no wireless extensions.

ifconfig:
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.32  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::36e9:aa16:1c30:69a7  prefixlen 64  scopeid 0x20<link>
        ether ^^^^^^^^^  txqueuelen 1000  (Ethernet)
        RX packets 165145  bytes 139091905 (139.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 143583  bytes 24463616 (24.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 19406  bytes 1752358 (1.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19406  bytes 1752358 (1.7 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

nmcli d:
DEVICE  TYPE      STATE      CONNECTION
enp2s0  ethernet  connected  Wired connection 1
lo      loopback  unmanaged  --

Thanks in advance! :D

A: So, the guys from the Mint Forum, helped superbly along with the guys from VivaoLinux.com.br:
I prefer to live a response as this may help someone in the future! :D
So, the steps are:
git clone https://github.com/kelebek333/rtl8188fu.git
cd rtl8188fu
make
sudo make install

Then, if there's the following problem:
$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-20-generic/build M=/home/^/rtl8188fu  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-20-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
  CC [M]  /home/^/rtl8188fu/core/rtw_cmd.o
  CC [M]  /home/^/rtl8188fu/core/rtw_security.o
  CC [M]  /home/^/rtl8188fu/core/rtw_debug.o
  CC [M]  /home/^/rtl8188fu/core/rtw_io.o
  CC [M]  /home/^/rtl8188fu/core/rtw_ioctl_query.o
  CC [M]  /home/^/rtl8188fu/core/rtw_ioctl_set.o
  CC [M]  /home/^/rtl8188fu/core/rtw_ieee80211.o
  CC [M]  /home/^/rtl8188fu/core/rtw_mlme.o
  CC [M]  /home/^/rtl8188fu/core/rtw_mlme_ext.o
  CC [M]  /home/^/rtl8188fu/core/rtw_wlan_util.o
  CC [M]  /home/^/rtl8188fu/core/rtw_vht.o
  CC [M]  /home/^/rtl8188fu/core/rtw_pwrctrl.o
  CC [M]  /home/^/rtl8188fu/core/rtw_rf.o
  CC [M]  /home/^/rtl8188fu/core/rtw_recv.o
  CC [M]  /home/^/rtl8188fu/core/rtw_sta_mgt.o
  CC [M]  /home/^/rtl8188fu/core/rtw_ap.o
  CC [M]  /home/^/rtl8188fu/core/rtw_xmit.o
  CC [M]  /home/^/rtl8188fu/core/rtw_p2p.o
  CC [M]  /home/^/rtl8188fu/core/rtw_tdls.o
  CC [M]  /home/^/rtl8188fu/core/rtw_br_ext.o
  CC [M]  /home/^/rtl8188fu/core/rtw_iol.o
  CC [M]  /home/^/rtl8188fu/core/rtw_sreset.o
  CC [M]  /home/^/rtl8188fu/core/rtw_btcoex.o
  CC [M]  /home/^/rtl8188fu/core/rtw_beamforming.o
  CC [M]  /home/^/rtl8188fu/core/rtw_odm.o
  CC [M]  /home/^/rtl8188fu/core/efuse/rtw_efuse.o
  CC [M]  /home/^/rtl8188fu/os_dep/osdep_service.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/os_intfs.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/usb_intf.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/ioctl_linux.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/xmit_linux.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/mlme_linux.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/recv_linux.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/ioctl_cfg80211.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/wifi_regd.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/rtw_proc.o
  CC [M]  /home/^/rtl8188fu/os_dep/linux/ioctl_mp.o
  CC [M]  /home/^/rtl8188fu/hal/hal_intf.o
  CC [M]  /home/^/rtl8188fu/hal/hal_com.o
  CC [M]  /home/^/rtl8188fu/hal/hal_com_phycfg.o
  CC [M]  /home/^/rtl8188fu/hal/hal_phy.o
  CC [M]  /home/^/rtl8188fu/hal/hal_dm.o
  CC [M]  /home/^/rtl8188fu/hal/hal_btcoex.o
  CC [M]  /home/^/rtl8188fu/hal/hal_mp.o
  CC [M]  /home/^/rtl8188fu/hal/hal_hci/hal_usb.o
  CC [M]  /home/^/rtl8188fu/hal/led/hal_usb_led.o
  CC [M]  /home/^/rtl8188fu/hal/HalPwrSeqCmd.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/Hal8188FPwrSeq.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_sreset.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_hal_init.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_phycfg.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_rf6052.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_dm.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_rxdesc.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/rtl8188f_cmd.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/usb/usb_halinit.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/usb/rtl8188fu_led.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/usb/rtl8188fu_xmit.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/usb/rtl8188fu_recv.o
  CC [M]  /home/^/rtl8188fu/hal/rtl8188f/usb/usb_ops.o
  CC [M]  /home/^/rtl8188fu/hal/efuse/rtl8188f/HalEfuseMask8188F_USB.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_debug.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_antdiv.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_antdect.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_interface.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_hwconfig.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/halphyrf_ce.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_edcaturbocheck.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_dig.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_pathdiv.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_rainfo.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_dynamicbbpowersaving.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_powertracking_ce.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_dynamictxpower.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_adaptivity.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_cfotracking.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_noisemonitor.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_acs.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/phydm_beamforming.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/txbf/halcomtxbf.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/txbf/haltxbfinterface.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/halhwimg8188f_bb.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/halhwimg8188f_mac.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/halhwimg8188f_rf.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/halhwimg8188f_fw.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/phydm_regconfig8188f.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/halphyrf_8188f.o
  CC [M]  /home/^/rtl8188fu/hal/phydm/rtl8188f/phydm_rtl8188f.o
  CC [M]  /home/^/rtl8188fu/core/rtw_mp.o
  CC [M]  /home/^/rtl8188fu/core/rtw_mp_ioctl.o
  LD [M]  /home/^/rtl8188fu/rtl8188fu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/^/rtl8188fu/rtl8188fu.mod.o
  LD [M]  /home/^/rtl8188fu/rtl8188fu.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-20-generic'

That will probably generate the following:
$ sudo make install
install -p -m 644 .ko  /lib/modules/4.15.0-20-generic/kernel/drivers/net/wireless/
install: cannot stat '.ko': No such file or directory
Makefile:481: recipe for target 'install' failed
make: *** [install] Error 1

Do:
sudo apt install libelf-dev

Then:
cd rtl8188fu
make clean
cd
sudo dkms add ./rtl8188fu
sudo dkms install rtl8188fu/1.0

Now, reboot. Your Wi-Fi should now be working!
Thanks a lot and all the best!

A: Just in case someone reach here finding solution to install driver simply follow "How to install" steps from following repository.
https://github.com/kelebek333/rtl8188fu


text:
Q: Getting variables from SQL Server for mPDF I'm using the mPDF class to output a pdf of data from a PHP file. I need to loop through a SQL Server query, save as new variables and write into the $html so it can be outputted to the pdf. I can't place it in the WriteHTML function because it does not recognize PHP code. I need the contents of the whole array so I can't just print one variable.
I have two files:
pdf-test.php:
This file gathers session variables from other php files that are included and reassigns them, so I can use them in the $html.
<?php
// Include files
require_once("form.php");
require_once("configuration.php");

session_start();

$html = '

 Form A

               1. Contact Information

                First Name:
                Last Name:

               '.$firstName.'
               '.$lastName.'

        .
        .
        .

  ';
echo $html;

pdf-make.php:
This file holds the code to actually convert the contents of pdf-test.php into a pdf.
<?php
// Direct to the mpdf file.
include('mpdf/mpdf.php');

// Collect all the content.
ob_start();
include "pdf-test.php";
$template = ob_get_contents();
ob_end_clean();

$mpdf=new mPDF();
$mpdf->WriteHTML($template);

// I: send the file inline to the browser.
$mpdf->Output('cust-form-a', 'I');
?>

This is my loop:
$tbl = "form_Customers";
$sql = "SELECT ROW_NUMBER() OVER(ORDER BY custFirt ASC)
                             AS RowNumber,
                                formID,
                                custFirt,
                                custLast,
                                displayRecord
                           FROM $tbl
                          WHERE formID = ? and displayRecord = ?";
$param = array($_SESSION["formid"], 'Y');
$stmt = sqlsrv_query($m_conn, $sql, $param);
$row = sqlsrv_fetch_array($stmt);

while ($row = sqlsrv_fetch_array($stmt)) {
    $rowNum = $row['RowNumber'];
    $firstN = $row['custFirt'];
    $lastN = $row['custLast'];
}

When I try to include $rowNum, $firstN or $lastN in the $html such as
  '.$rowNum.'

, it just shows up blank.
I'm not sure where the loop should go (which file) or how to include the $rowNum, $firstN and $lastN variables in the $html like the others.
I'm new to PHP (and relatively new to coding in general) and I don't have much experience working with it, but I've been able to make mPDF work for me in similar instances without the query included.
Any help would be greatly appreciated. Thank you so much!

A: I'm not sure how your loop interacts with the other two files, but this looks overly complex to me. I'd approach this in one .php file, something sort of like this:
<?php
//Include Files
include('mpdf/mpdf.php');
... //Your additional includes

//Define a row template string
$rowtemplate =<<<EOS

       %%RowNumber%%
       %%custFirt%%
       %%custLast%%

EOS;

//Initialize the HTML for the document.
$html =<<<EOS

 Form A

... //Your code
                Last Name:

EOS;

//Loop Code
$tbl = "form_Customers";
...   //Your code
$row = sqlsrv_fetch_array($stmt);

while ($row = sqlsrv_fetch_array($stmt)) {
    //Copy rowtemplate to a temporary variable
    $out_tmp = $rowtemplate;
    //Loop through your SQL variables and replace them when they appear in the template
    foreach ($row as $key => $val) {
        $out_tmp = str_ireplace('%%'.$key.'%%', $val, $out_tmp);
    }
    //Append the result to $html
    $html .= $out_tmp;
}

// Close the open tags in $html
$html .= "

";

//Write the PDF
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output('cust-form-a', 'I');

I'm using heredoc syntax for the strings, since I think this is the cleanest way to include a large string.
Also, I prefer to omit the closing ?> tag as it introduces a stupid source of errors.

redpajama_set_name: RedPajamaStackExchange


text:
Q: postgresql complex group by in query I have a query that gives:
itemid deadlineneeded delievrydate quantity
200  15/07/15        14/07/15     5
200  15/07/15        14/07/15     10
200  15/07/15        13/07/15     25
201  15/07/15        14/07/15     30
200  14/07/15        10/07/15     3
201  15/07/15        15/07/15     100

It gives the information from multiple tables. Basically it means When items arrive to warehouse (delievrydate) and how many. The deadlineneeded means when i'm going to use it.
My goal is to find out the total quantity of itemid that arrives 1 day before deadlineeded.
for example with the last data I want to get:
itemid deadlineneeded    quantity
200         15/07/15      43 (5+10+25+3)
200         14/07/15      3    //5+10+25 not included because deliverydate
201         15/07/15     30    //100 not included because deliverydate

How do i get it?

A: SELECT itemid, deadlineneeded, sum(quantity) AS total_quantity
FROM <your table>
WHERE (deadlineneeded - delievrydate)::int >= 1
GROUP BY 1, 2
ORDER BY 1, 2;

This uses a "delievrydate" (looks like a typo to me) that is at least 1 day before the "deadlineneeded" date, as your sample data is suggesting.

A: select distinct date_trunc('day',deadlineneeded),sum from
(select *,sum(quantity) over (partition by deadlineneeded-delievrydate) from     tablename) t
where deadlineneeded-delievrydate = '1 day';

A: Use GROUP BY combined with aggregate function SUM.
select itemid, deadlineneeded, SUM(quantity)
from tablename
where deadlineneeded = delievrydate + 1
group by itemid, deadlineneeded

The where deadlineneeded = delievrydate + 1 part is typically product specific, and I don't know postgresql... ANSI SQL has deadlineneeded = delievrydate + interval'1' day.


text:
Q: Disable Adobe Flash update prompt Is there a way to disable the Adobe Flash update prompt?
I have tried saving settings to mms.cfg in the appropriate folder (\Windows\System32\Macromed\Flash) yet this does not yield positive results.
I need to disable the updater since Power Users get prompted for this message and they do not have the rights to install since we control software distribution.

A: Little Google gave me How to disable auto-update notification in Flash Player

A: I've actually found out where the settings are stored.
There is a file called settings.col which is found in X:\Documents and Settings\<user>\Application Data\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\
Copying this file into another user profile is the only way to guarantee these settings since mms.cfg does not seem to work unless you have MSMS.


text:
Q: Is it possible to know by what means the change called on HTML Select? I have the following code where the change on HTML Select can happened via trigger or by changing it manually.
My question is, if is it possible to know if that change is happened via trigger or by manually?
My sample code:
$(document).on('change', 'select#days', function(event)
{
    alert('Change happened');
});
$(function()
{
    $("#days").trigger('change');
});

This is my fiddle.

A: As you are using a jquery event change on  the select element. There is a key named isTrigger you can use it:

$(document).on('change', 'select#days', function(event) {
  var ev = event.isTrigger || event.type;
  $('pre').html('isTrigger ::::'+ ev);
});
$(function() {
  $("#days").trigger('change');
});

<select id="days" name="days">
  <option value="0">- Select day -</option>
  <option value="1">Sunday</option>
  <option value="2">Monday</option>
  <option value="3">Tuesday</option>
  <option value="4">Wednesday</option>
  <option value="5">Thursday</option>
  <option value="6">Friday</option>
  <option value="7">Saturday</option>
</select>

A: event.isTrigger

is what you want to find it out, it is undefined when done manually and true when is fired by trigger method.
$(document).on('change', 'select#days', function(event)
{
    alert(event.isTrigger);
    alert('Change happened');
});
$(function()
{
    $("#days").trigger('change');
});

updated fiddle

A: You can check with event.originalEvent too.
Eg.
HTML

    Span 1

JavaScript
$("#span1").on("click", function(event){

     if (event.originalEvent) {

        alert("A Human Clicked on span1!");

    } else {
        alert("A Human Created Bot Clicked on span1!");
    }

});

botFn = function(){

     $("#span1").trigger("click", function(event){
            if (event.originalEvent) {

        alert("A Human Clicked on span1!");

    } else {
        alert("A Human Created Bot Clicked on span1! after 2 seconds!");
    }
  });

}

setTimeout(botFn, 2000);


text:
Q: SBS 2008 Initial 5 CALs I recently took over IT for a company and I am auditing the number of CALs my company owns.  I have ten 5-packs of CAL sheets.  I know that SBS 2008 comes with 5 CALs.  Was one of those CAL sheets included in the SBS 2008 box?  Or are those initial 5 CALs just assumed and there is no CAL sheet for them?
Asked another way, do I have 50 CALs (10 x 5-packs) or 55 CALs (10 x 5-packs + 5 initial)?

A: Those are assumed.  Like you I'm not sure if there is a sheet that comes in the SBS software box (most of my servers come preloaded from Dell or HP with no box), but by virtue of having an activated license key for the SBS product you get 5 CALs.  If you were to get audited they should not need to see an additional license sheet for the 5 SBS CALs that were included.  Total CALs = 55.


text:
Q: How to create map[String,Class] and create its object dynamically in scala Scenario :
       I have a senario where I need to call Processor class one by one , which are required by the input provider by user , if not provided it should call all Processor class and process() method inside it.
Code :
class OneProcessor{}
class TwoProcessor{}

For this I am thinking of creating a Map[String, instanceOfClass] i.e:
val instanceMap:Map[String,Class] =Map(
    "string1" -> new OneProcessor(),
    "string2" -> new TwoProcessor(),
)

Question :
            if given string1 by user I need to create instance of OneProcessor() and execute it processor() method.
If user is not provided any input I need to call all keys of Map , and create instances of all classes and call processor() of all...
How to do this in scala ?

A: Here is my solution:
Assuming all "processors" are doing similar things, I suggest extending them all from a trait instead of a using general class level constructs. Let's assume the following structure:
trait Processor {
  def process=println("default process")
}
case class ProcessorOne() extends Processor
case class ProcessorTwo() extends Processor {
  override def process=println("process 2")
}
case class ProcessorThree() extends Processor {
  override def process=println("process 3")
}

We create a map and put all process functions inside it:
val myFuncs =
  Map("string1" -> (() => ProcessorOne().process),
    "string2" -> (() => ProcessorTwo().process),
  "string3" -> (() => ProcessorThree().process))

Note that this is a Map[String, Unit]. Since your goal is to invoke functions, you don't really need to put instances in the map.
Now you can easily invoke any or all of these functions:
val userInput =""

if(myFuncs isDefinedAt userInput)
  myFuncs(userInput)()
else
  myFuncs.values.foreach(v => v())

The above will output:
default process
process 2
process 3

So if the key is not present in the map, all functions will be invoked (in no particular order), but if the key is in the map, only the function associated with that key will be invoked.
If you also need the functions to run in a particular order, you can use LinkedHasMap or ListMap to create a map which preserves the insertion order.

A: You can call newInstance method to create instances out of class.
classOf[OneProcessor].newInstance


text:
Q: Make WPF TextBox stretch to available space and not grow with Text How do I make the TextBox stretch until the button with the three dots, but not cover it when somebody enters a lot of text?
My MainWindow.xaml:
<Window x:Class="Foo.Bar.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:p="clr-namespace:Foo.Bar.Properties"
        Title="MainWindow" Height="350" Width="525">
  <Grid>
    <StackPanel>
      <DockPanel>

        <TextBox Name="txbFileName"></TextBox>
        <Button Name="btnOpenFileDialog" Content="..." HorizontalAlignment="Right"></Button>
      </DockPanel>
      <UniformGrid>
        <Button Name="btnFoo" Content="Foo"></Button>
        <Button Name="btnBar" Content="Bar"></Button>
      </UniformGrid>
    </StackPanel>
  </Grid>
</Window>

What it looks like:

A: To stretch your TextBox set LastChildFill="true" on DockPanel and add TextBox in the end.
Btw. If you're using DockPanel you can use DockPanel.Dock="Right" instead of HorizontalAlignment="Right".
<Grid>
    <StackPanel>
        <DockPanel LastChildFill="True">

            <Button Name="btnOpenFileDialog" Content="..." DockPanel.Dock="Right"></Button>
            <TextBox Name="txbFileName"></TextBox>
        </DockPanel>
        <UniformGrid>
            <Button Name="btnFoo" Content="Foo"></Button>
            <Button Name="btnBar" Content="Bar"></Button>
        </UniformGrid>
    </StackPanel>
</Grid>

A: You could set the MaxWidth of the TextBox to the width of the space you want to stay inside. This will take a bit of addition and subtraction, and maybe a bit of estimation, but it will work. Having it actually stretch seems a bit odd, but if you really want that in particular, then an example setting might be:
<TextBox Name="txbFileName" MaxWidth=300*></TextBox>


text:
Q: React: How to loop through Array of Objects in MongoDb i want to go through an Array of Objects in MongoDB
(for Schema look at the picture.)
I want to check if the User is participant of an Event and if, the event should be displayed on a page .
My idea was
{events.filter(events => ( events.participants.email === currentProfile.email)).
               map((events)=>(
                 <Grid key={events._id} item xs={12} sm={6} md={4}>
                 <Event event={events} setCurrentId2={setCurrentId2} />

but does not work. I dont have any idea how to solve it.

A: events.participants is an array and you are doing events.participants.email wich is undefined, to do what you want:
{events
        .filter((e) => e.participants.some((p) => p.email === currentProfile.email))
        .map((event) => (
          <>
            <Grid key={event._id} item xs={12} sm={6} md={4}>
            <Event event={event} setCurrentId2={setCurrentId2} />
          <>
        ))}

With this, each event is iterating the partcipants field looking for the current user's email


text:
Q: Statsmodels GLM and OLS with formulas missing paramters I am trying to run a general linear model using formulas on a data set that contains categorical variables.  The results summary table appears to be leaving out one of the variables when I list the parameters?
I haven't been able to find doc's specific to the glm showing the output with categorical variables but I have for the OLS and it looks like it should list each categorical variable seperately.  When it do it (with GLM or OLS) it leaves out one of the values for each category.  For example:
import statsmodels.formula.api as smf
import pandas as pd
Data = pd.read_csv(root+'/Illisarvik/TestData.csv')
formula = 'Response~Day+Class+Var'
gm = sm.GLM.from_formula(formula=formula, data=Data,
                           family=sm.families.Gaussian()).fit()
ls = smf.ols(formula=formula,data=Data).fit()

print (Data)
print(gm.params)
print(ls.params)

   Day Class       Var  Response
0   D     A  0.533088  0.582931
1   D     B  0.839837  0.075011
2   D     C  1.454716  0.505442
3   D     A  1.455503  0.188945
4   D     B  1.163155  0.144176
5   N     A  1.072238  0.918962
6   N     B  0.815384  0.249160
7   N     C  1.182626  0.520460
8   N     A  1.448843  0.870644
9   N     B  0.653531  0.460177

Intercept     0.625111
Day[T.N]      0.298084
Class[T.B]   -0.439025
Class[T.C]   -0.104725
Var          -0.118662
dtype: float64

Intercept     0.625111
Day[T.N]      0.298084
Class[T.B]   -0.439025
Class[T.C]   -0.104725
Var          -0.118662
dtype: float64
C:/Users/wesle/Dropbox/PhD_Work/Figures/SkeeterEtAlAnalysis.py:55: FutureWarning: sort is deprecated, use sort_values(inplace=True) for INPLACE sorting
  P.sort()

Is there something wrong with my model?  The same issue presents its self when I print the full summary table:
print(gm.summary())

print(ls.summary())

                 Generalized Linear Model Regression Results
==============================================================================
Dep. Variable:               Response   No. Observations:                   10
Model:                            GLM   Df Residuals:                        5
Model Family:                Gaussian   Df Model:                            4
Link Function:               identity   Scale:                 0.0360609978309
Method:                          IRLS   Log-Likelihood:                 5.8891
Date:                Sun, 05 Mar 2017   Deviance:                      0.18030
Time:                        23:26:48   Pearson chi2:                    0.180
No. Iterations:                     2
==============================================================================
                 coef    std err          z      P>|z|      [0.025      0.975]
------------------------------------------------------------------------------
Intercept      0.6251      0.280      2.236      0.025       0.077       1.173
Day[T.N]       0.2981      0.121      2.469      0.014       0.061       0.535
Class[T.B]    -0.4390      0.146     -3.005      0.003      -0.725      -0.153
Class[T.C]    -0.1047      0.170     -0.617      0.537      -0.438       0.228
Var           -0.1187      0.222     -0.535      0.593      -0.553       0.316
==============================================================================

                            OLS Regression Results
==============================================================================
Dep. Variable:               Response   R-squared:                       0.764
Model:                            OLS   Adj. R-squared:                  0.576
Method:                 Least Squares   F-statistic:                     4.055
Date:                Sun, 05 Mar 2017   Prob (F-statistic):             0.0784
Time:                        23:26:48   Log-Likelihood:                 5.8891
No. Observations:                  10   AIC:                            -1.778
Df Residuals:                       5   BIC:                           -0.2652
Df Model:                           4
Covariance Type:            nonrobust
==============================================================================
                 coef    std err          t      P>|t|      [0.025      0.975]
------------------------------------------------------------------------------
Intercept      0.6251      0.280      2.236      0.076      -0.094       1.344
Day[T.N]       0.2981      0.121      2.469      0.057      -0.012       0.608
Class[T.B]    -0.4390      0.146     -3.005      0.030      -0.815      -0.064
Class[T.C]    -0.1047      0.170     -0.617      0.564      -0.541       0.332
Var           -0.1187      0.222     -0.535      0.615      -0.689       0.451
==============================================================================
Omnibus:                        1.493   Durbin-Watson:                   2.699
Prob(Omnibus):                  0.474   Jarque-Bera (JB):                1.068
Skew:                          -0.674   Prob(JB):                        0.586
Kurtosis:                       2.136   Cond. No.                         9.75
==============================================================================

A: This is a consequence of the way the linear model works.
For instance, where you have the categorical variable Day as far as the linear model is concerned this can be represented as just a single 'dummy' variable which is set to 0 (zero) for the value you mention first, namely D and one for the second value, namely N. Statistically speaking, you can recover only the difference between the effects of the two levels of this categorical variable.
If you now consider Class, which has two levels, you have two dummy variables which represent two differences between the levels of the available three levels of this categorical variable.
As a matter of fact, it's perfectly possible to expand on this idea using orthogonal polynomials on the treatment means but that's something for another day.
The short answer is that there's nothing wrong, at least on this account, with your model.


text:
Q: Speech synthesis in chrome for android not loading voices I have an script correctly running on chrome for windows, but when I try it on my android chrome, it doesn't works.
It seems to be a problem of the voices, since the :
if ('speechSynthesis' in window)

returns true.
I've tried some online examples (for example http://codepen.io/matt-west/pen/wGzuJ) and the "voices" selection list is empty.
Do I need to install something to make this work?
This code works in chrome for windows but not in chrome for android:
function playSentence(text) {
     var msg = new SpeechSynthesisUtterance();
     msg.text = text;
     window.speechSynthesis.speak(msg);
 }

 $(function () {
     playSentence("Hello world");
 });

Versions: Android 5.0.0 - Chrome 46.0.2490.76

A: There are two issues
1) on mobile you need a user gesture to start play the text.  Add it into an onclick handler see the following demo:
<body>
  <button id="btnPlay">Play</button>
  <script>
    function playSentence(text) {
      var msg = new SpeechSynthesisUtterance();
      msg.text = text;
      window.speechSynthesis.speak(msg);
    }

    $("#btnPlay").click(function() {
      playSentence("Hello world");
    });
</script>

</body>

2) The demo is also broken :\ But there are two key parts which you need to take care of.
i.  getVoices is asynchronus (mentioned in the Spec Errata) and you need to listen to the voiceschanged event, the reasoning is a little frustrating but makes sense, the Voice system is lazily loaded and the first call to getVoices would block the main thread so the first call on android returns 0 results and then fires an onvoiceschanged when the voices become available.
ii.  The linked demo incorrectly sets the voice attribute on the utterance.  This doesn't exist, instead you need to change the lang and optionally the voiceURI to change the default used voice as can be seen below and in the new demo.
if (voiceSelect.value) {
  var selectedVoice = speechSynthesis.getVoices().filter(function(voice) { return voice.voiceURI == voiceSelect.value; })[0];

  msg.voiceURI = selectedVoice.voiceURI;
  msg.lang = selectedVoice.lang;

}


text:
Q: flv player control time I am using the flex flv player component and i want to be able to skip 5 seconds forward and backwards , at the moment from what i understand from the documents it is not acurate because the movie can only skip to keyframes sometimes making the skip 6 or 7 seconds. the same goes to cue points which the flv might miss the actual point if there is no keyframe there/
my question is there any other way to use the player in a more accurate manner ? since i see on the web players that can do these skipps
Thanks

A: No
The ability to seek into an FLV file is entirely dependent upon the key frame spacing.  That is because a key frame can create an entire video image all by itself.  (As opposed to intra-frames, which are dependent upon a) the previous key frame, and b) all inter-frames between it and the previous key frame.)  That's just they way it works.
But maybe you have some influence over how the videos are encoded?  Could you specify a minimum key frame spacing?  E.g.: A key frame spacing of 50 for a 25fps video would be every 2s.  Or even smaller?

A: I have developed such a player, you can use flv-player.net, and copy js player. there is no control bar, so you can then control all the feature from javascript,
download flv-player.js.swf along with demo code, write your own control bar, mean play , seek , pause , volume , and fullscreen.
So you will need extra effort to write these feature becuase the player that i mention have not any control bar.


text:
Q: Functions in header file undefined Im trying to make a Tilemap system in C using Raylib. My problem is that I walways get this error when trying to use a function from my Tilemap header file: undefined reference to 'Tilemap_Init' For some reason the structs work fine, but the funktions are just not working.
I already searched online, but I couldn't find anything that helped me. Heres my code:
Tilemap.c
#include <stdlib.h>
#include "H/Tilemap.h"
#include "raylib.h"

Tilemap* Tilemap_Init(void){
    Tilemap* tilemap;
    tilemap->tiles = malloc(1 * sizeof(Tile));
    tilemap->arrUsed = 0;
    tilemap->arrSize = 1;
    return tilemap;
}

void Tilemap_Destroy(Tilemap* tilemap){
    free(tilemap->tiles);
    tilemap->tiles = NULL;
    tilemap->arrUsed = tilemap->arrSize = 0;
}

void Tilemap_AddTile(Tilemap* tilemap, Tile tile){
    if(tilemap->arrUsed == tilemap->arrSize){
        tilemap->arrSize += 2;
        tilemap->tiles = realloc(tilemap->tiles, tilemap->arrSize * sizeof(Tile));
    }
    tilemap->tiles[tilemap->arrUsed++] = tile;
}

void Tilemap_SetTile(Tilemap* tilemap, Tile tile){
    for (int i = 0; i < tilemap->arrUsed; i++)
    {
        if(tilemap->tiles[i].position.x == tile.position.x){
            if(tilemap->tiles[i].position.y == tile.position.y){
                tilemap->tiles[i] = tile;
            }
        }
    }
    Tilemap_AddTile(tilemap, tile);
}

void Tilemap_Render(Tilemap* tilemap){
    for (int i = 0; i < tilemap->arrUsed; i++)
    {
        Tile tile = tilemap->tiles[i];

        Rectangle sourceRec = {0.0f, 0.0f, tile.texture.width, tile.texture.height};
        Rectangle destRec = {tile.position.x, tile.position.y, tile.texture.width, tile.texture.height};
        Vector2 origin = {tile.texture.width, tile.texture.height};
        DrawTexturePro(tile.texture, sourceRec, destRec, origin, 0.0f, WHITE);
    }
}

Tilemap.h
#ifndef TILEMAP_H
#define TILEMAP_H

#ifdef __cplusplus
extern "C" {            // Prevents name mangling of functions
#endif

#include "raylib.h"

typedef struct
{
    Vector2 position;
    Texture2D texture;
} Tile;

typedef struct
{
    Tile* tiles;
    int arrUsed;
    int arrSize;
} Tilemap;

Tilemap* Tilemap_Init(void);
extern void Tilemap_Destroy(Tilemap* tilemap);
void Tilemap_AddTile(Tilemap* tilemap, Tile tile);
void Tilemap_SetTile(Tilemap* tilemap, Tile tile);
void Tilemap_Render(Tilemap* tilemap);

#ifdef __cplusplus
}
#endif

#endif

main.c
#include "raylib.h"

#include "Scripts/H/Tilemap.h"

int main()
{
    // Initialization
    //--------------------------------------------------------------------------------------
    const int screenWidth = 800;
    const int screenHeight = 450;

    InitWindow(screenWidth, screenHeight, "raylib");

    Tilemap* tilemap = Tilemap_Init();

    SetTargetFPS(60);               // Set our game to run at 60 frames-per-second
    //--------------------------------------------------------------------------------------
    // Main game loop
    while (!WindowShouldClose())    // Detect window close button or ESC key
    {
        // Update
        //----------------------------------------------------------------------------------
        //----------------------------------------------------------------------------------
        // Draw
        //----------------------------------------------------------------------------------
        BeginDrawing();

            ClearBackground(RAYWHITE);
            DrawFPS(10, 10);

        EndDrawing();
        //----------------------------------------------------------------------------------
    }
    // De-Initialization
    //--------------------------------------------------------------------------------------
    CloseWindow();        // Close window and OpenGL context
    //--------------------------------------------------------------------------------------
    return 0;
}

and the Makefile:
.PHONY: all clean

# Define required raylib variables
PROJECT_NAME       ?= ProjectStarlight
RAYLIB_VERSION     ?= 3.0.0
RAYLIB_API_VERSION ?= 300
RAYLIB_PATH        ?= ..\..

# Define compiler path on Windows
COMPILER_PATH      ?= C:/raylib/mingw/bin

# Define default options
# One of PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
PLATFORM           ?= PLATFORM_DESKTOP

# Locations of your newly installed library and associated headers. See ../src/Makefile
# On Linux, if you have installed raylib but cannot compile the examples, check that
# the *_INSTALL_PATH values here are the same as those in src/Makefile or point to known locations.
# To enable system-wide compile-time and runtime linking to libraylib.so, run ../src/$ sudo make install RAYLIB_LIBTYPE_SHARED.
# To enable compile-time linking to a special version of libraylib.so, change these variables here.
# To enable runtime linking to a special version of libraylib.so, see EXAMPLE_RUNTIME_PATH below.
# If there is a libraylib in both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH, at runtime,
# the library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over the one at RAYLIB_INSTALL_PATH.
# RAYLIB_INSTALL_PATH should be the desired full path to libraylib. No relative paths.
DESTDIR ?= /usr/local
RAYLIB_INSTALL_PATH ?= $(DESTDIR)/lib
# RAYLIB_H_INSTALL_PATH locates the installed raylib header and associated source files.
RAYLIB_H_INSTALL_PATH ?= $(DESTDIR)/include

# Library type used for raylib: STATIC (.a) or SHARED (.so/.dll)
RAYLIB_LIBTYPE        ?= STATIC

# Build mode for project: DEBUG or RELEASE
BUILD_MODE            ?= RELEASE

# Use external GLFW library instead of rglfw module
# TODO: Review usage on Linux. Target version of choice. Switch on -lglfw or -lglfw3
USE_EXTERNAL_GLFW     ?= FALSE

# Use Wayland display server protocol on Linux desktop
# by default it uses X11 windowing system
USE_WAYLAND_DISPLAY   ?= FALSE

# Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    # No uname.exe on MinGW!, but OS=Windows_NT on Windows!
    # ifeq ($(UNAME),Msys) -> Windows
    ifeq ($(OS),Windows_NT)
        PLATFORM_OS=WINDOWS
        export PATH := $(COMPILER_PATH):$(PATH)
    else
        UNAMEOS=$(shell uname)
        ifeq ($(UNAMEOS),Linux)
            PLATFORM_OS=LINUX
        endif
        ifeq ($(UNAMEOS),FreeBSD)
            PLATFORM_OS=BSD
        endif
        ifeq ($(UNAMEOS),OpenBSD)
            PLATFORM_OS=BSD
        endif
        ifeq ($(UNAMEOS),NetBSD)
            PLATFORM_OS=BSD
        endif
        ifeq ($(UNAMEOS),DragonFly)
            PLATFORM_OS=BSD
        endif
        ifeq ($(UNAMEOS),Darwin)
            PLATFORM_OS=OSX
        endif
    endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
    UNAMEOS=$(shell uname)
    ifeq ($(UNAMEOS),Linux)
        PLATFORM_OS=LINUX
    endif
endif

# RAYLIB_PATH adjustment for different platforms.
# If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
# Required for ldconfig or other tools that do not perform path expansion.
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),LINUX)
        RAYLIB_PREFIX ?= ..
        RAYLIB_PATH    = $(realpath $(RAYLIB_PREFIX))
    endif
endif
# Default path for raylib on Raspberry Pi, if installed in different path, update it!
# This is not currently used by src/Makefile. Not sure of its origin or usage. Refer to wiki.
# TODO: update install: target in src/Makefile for RPI, consider relation to LINUX.
ifeq ($(PLATFORM),PLATFORM_RPI)
    RAYLIB_PATH       ?= /home/pi/raylib
endif

ifeq ($(PLATFORM),PLATFORM_WEB)
    # Emscripten required variables
    EMSDK_PATH          ?= C:/emsdk
    EMSCRIPTEN_VERSION  ?= 1.38.31
    CLANG_VERSION       = e$(EMSCRIPTEN_VERSION)_64bit
    PYTHON_VERSION      = 2.7.13.1_64bit\python-2.7.13.amd64
    NODE_VERSION        = 8.9.1_64bit
    export PATH         = $(EMSDK_PATH);$(EMSDK_PATH)\clang\$(CLANG_VERSION);$(EMSDK_PATH)\node\$(NODE_VERSION)\bin;$(EMSDK_PATH)\python\$(PYTHON_VERSION);$(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION);C:\raylib\MinGW\bin:$$(PATH)
    EMSCRIPTEN          = $(EMSDK_PATH)\emscripten\$(EMSCRIPTEN_VERSION)
endif

# Define raylib release directory for compiled library.
# RAYLIB_RELEASE_PATH points to provided binaries or your freshly built version
RAYLIB_RELEASE_PATH     ?= $(RAYLIB_PATH)/src

# EXAMPLE_RUNTIME_PATH embeds a custom runtime location of libraylib.so or other desired libraries
# into each example binary compiled with RAYLIB_LIBTYPE=SHARED. It defaults to RAYLIB_RELEASE_PATH
# so that these examples link at runtime with your version of libraylib.so in ../release/libs/linux
# without formal installation from ../src/Makefile. It aids portability and is useful if you have
# multiple versions of raylib, have raylib installed to a non-standard location, or want to
# bundle libraylib.so with your game. Change it to your liking.
# NOTE: If, at runtime, there is a libraylib.so at both EXAMPLE_RUNTIME_PATH and RAYLIB_INSTALL_PATH,
# The library at EXAMPLE_RUNTIME_PATH, if present, will take precedence over RAYLIB_INSTALL_PATH,
# Implemented for LINUX below with CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
# To see the result, run readelf -d core/core_basic_window; looking at the RPATH or RUNPATH attribute.
# To see which libraries a built example is linking to, ldd core/core_basic_window;
# Look for libraylib.so.1 => $(RAYLIB_INSTALL_PATH)/libraylib.so.1 or similar listing.
EXAMPLE_RUNTIME_PATH   ?= $(RAYLIB_RELEASE_PATH)

# Define default C compiler: gcc
# NOTE: define g++ compiler if using C++
CC = gcc

ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),OSX)
        # OSX default compiler
        CC = clang
    endif
    ifeq ($(PLATFORM_OS),BSD)
        # FreeBSD, OpenBSD, NetBSD, DragonFly default compiler
        CC = clang
    endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
    ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
        # Define RPI cross-compiler
        #CC = armv6j-hardfloat-linux-gnueabi-gcc
        CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
    endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
    # HTML5 emscripten compiler
    # WARNING: To compile to HTML5, code must be redesigned
    # to use emscripten.h and emscripten_set_main_loop()
    CC = emcc
endif

# Define default make program: Mingw32-make
MAKE = mingw32-make

ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),LINUX)
        MAKE = make
    endif
    ifeq ($(PLATFORM_OS),OSX)
        MAKE = make
    endif
endif

# Define compiler flags:
#  -O0                  defines optimization level (no optimization, better for debugging)
#  -O1                  defines optimization level
#  -g                   include debug information on compilation
#  -s                   strip unnecessary data from build -> do not use in debug builds
#  -Wall                turns on most, but not all, compiler warnings
#  -std=c99             defines C language mode (standard C from 1999 revision)
#  -std=gnu99           defines C language mode (GNU C from 1999 revision)
#  -Wno-missing-braces  ignore invalid warning (GCC bug 53119)
#  -D_DEFAULT_SOURCE    use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces

ifeq ($(BUILD_MODE),DEBUG)
    CFLAGS += -g -O0
else
    CFLAGS += -s -O1
endif

# Additional flags for compiler (if desired)
#CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),WINDOWS)
        # resource file contains windows executable icon and properties
        # -Wl,--subsystem,windows hides the console window
        CFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data -Wl,--subsystem,windows
    endif
    ifeq ($(PLATFORM_OS),LINUX)
        ifeq ($(RAYLIB_LIBTYPE),STATIC)
            CFLAGS += -D_DEFAULT_SOURCE
        endif
        ifeq ($(RAYLIB_LIBTYPE),SHARED)
            # Explicitly enable runtime link to libraylib.so
            CFLAGS += -Wl,-rpath,$(EXAMPLE_RUNTIME_PATH)
        endif
    endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
    CFLAGS += -std=gnu99
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
    # -Os                        # size optimization
    # -O2                        # optimization level 2, if used, also set --memory-init-file 0
    # -s USE_GLFW=3              # Use glfw3 library (context/input management)
    # -s ALLOW_MEMORY_GROWTH=1   # to allow memory resizing -> WARNING: Audio buffers could FAIL!
    # -s TOTAL_MEMORY=16777216   # to specify heap memory size (default = 16MB)
    # -s USE_PTHREADS=1          # multithreading support
    # -s WASM=0                  # disable Web Assembly, emitted by default
    # -s EMTERPRETIFY=1          # enable emscripten code interpreter (very slow)
    # -s EMTERPRETIFY_ASYNC=1    # support synchronous loops by emterpreter
    # -s FORCE_FILESYSTEM=1      # force filesystem to load/save files data
    # -s ASSERTIONS=1            # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
    # --profiling                # include information for code profiling
    # --memory-init-file 0       # to avoid an external memory initialization code file (.mem)
    # --preload-file resources   # specify a resources folder for data compilation
    CFLAGS += -Os -s USE_GLFW=3 -s TOTAL_MEMORY=16777216 --preload-file resources
    ifeq ($(BUILD_MODE), DEBUG)
        CFLAGS += -s ASSERTIONS=1 --profiling
    endif

    # Define a custom shell .html and output extension
    CFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
    EXT = .html
endif

# Define include paths for required headers
# NOTE: Several external required libraries (stb and others)
INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external

# Define additional directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI)
    # RPI required libraries
    INCLUDE_PATHS += -I/opt/vc/include
    INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux
    INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads
endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),BSD)
        # Consider -L$(RAYLIB_H_INSTALL_PATH)
        INCLUDE_PATHS += -I/usr/local/include
    endif
    ifeq ($(PLATFORM_OS),LINUX)
        # Reset everything.
        # Precedence: immediately local, installed version, raysan5 provided libs -I$(RAYLIB_H_INSTALL_PATH) -I$(RAYLIB_PATH)/release/include
        INCLUDE_PATHS = -I$(RAYLIB_H_INSTALL_PATH) -isystem. -isystem$(RAYLIB_PATH)/src -isystem$(RAYLIB_PATH)/release/include -isystem$(RAYLIB_PATH)/src/external
    endif
endif

# Define library paths containing required libs.
LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src

ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),BSD)
        # Consider -L$(RAYLIB_INSTALL_PATH)
        LDFLAGS += -L. -Lsrc -L/usr/local/lib
    endif
    ifeq ($(PLATFORM_OS),LINUX)
        # Reset everything.
        # Precedence: immediately local, installed version, raysan5 provided libs
        LDFLAGS = -L. -L$(RAYLIB_INSTALL_PATH) -L$(RAYLIB_RELEASE_PATH)
    endif
endif

ifeq ($(PLATFORM),PLATFORM_RPI)
    LDFLAGS += -L/opt/vc/lib
endif

# Define any libraries required on linking
# if you want to link libraries (libname.so or libname.a), use the -lname
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),WINDOWS)
        # Libraries for Windows desktop compilation
        # NOTE: WinMM library required to set high-res timer resolution
        LDLIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
        # Required for physac examples
        #LDLIBS += -static -lpthread
    endif
    ifeq ($(PLATFORM_OS),LINUX)
        # Libraries for Debian GNU/Linux desktop compiling
        # NOTE: Required packages: libegl1-mesa-dev
        LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt

        # On X11 requires also below libraries
        LDLIBS += -lX11
        # NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
        #LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor

        # On Wayland windowing system, additional libraries requires
        ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
            LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
        endif
        # Explicit link to libc
        ifeq ($(RAYLIB_LIBTYPE),SHARED)
            LDLIBS += -lc
        endif
    endif
    ifeq ($(PLATFORM_OS),OSX)
        # Libraries for OSX 10.9 desktop compiling
        # NOTE: Required packages: libopenal-dev libegl1-mesa-dev
        LDLIBS = -lraylib -framework OpenGL -framework OpenAL -framework Cocoa
    endif
    ifeq ($(PLATFORM_OS),BSD)
        # Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
        # NOTE: Required packages: mesa-libs
        LDLIBS = -lraylib -lGL -lpthread -lm

        # On XWindow requires also below libraries
        LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
    endif
    ifeq ($(USE_EXTERNAL_GLFW),TRUE)
        # NOTE: It could require additional packages installed: libglfw3-dev
        LDLIBS += -lglfw
    endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
    # Libraries for Raspberry Pi compiling
    # NOTE: Required packages: libasound2-dev (ALSA)
    LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
    # Libraries for web (HTML5) compiling
    LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc
endif

# Define a recursive wildcard function
#rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))

# Define all source files required
#SRC_DIR = src
#OBJ_DIR = obj

# Define all object files from source files
#SRC = $(call rwildcard, *.c, *.h)

PROJECT_SOURCE_FILES ?= \
    main.c \
    Scipts/C/Tilemap.c

OBJS = $(patsubst %.c, %.o, $(PROJECT_SOURCE_FILES))
#OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
#OBJS ?= main.c

# For Android platform we call a custom Makefile.Android
ifeq ($(PLATFORM),PLATFORM_ANDROID)
    MAKEFILE_PARAMS = -f Makefile.Android
    export PROJECT_NAME
    export SRC_DIR
else
    MAKEFILE_PARAMS = $(PROJECT_NAME)
endif

# Default target entry
# NOTE: We call this Makefile target or Makefile.Android target
all:
    $(MAKE) $(MAKEFILE_PARAMS)

# Project target defined by PROJECT_NAME
$(PROJECT_NAME): $(OBJS)
    $(CC) -o $(PROJECT_NAME)$(EXT) $(OBJS) $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)

# Compile source files
# NOTE: This pattern will compile every module defined on $(OBJS)
#%.o: %.c
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
    $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)

# Clean everything
clean:
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
    ifeq ($(PLATFORM_OS),WINDOWS)
        del *.o *.exe /s
    endif
    ifeq ($(PLATFORM_OS),LINUX)
    find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -fv
    endif
    ifeq ($(PLATFORM_OS),OSX)
        find . -type f -perm +ugo+x -delete
        rm -f *.o
    endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
    find . -type f -executable -delete
    rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
    del *.o *.html *.js
endif
    @echo Cleaning done

A: OBJS = $(patsubst %.c, %.o, $(PROJECT_SOURCE_FILES))
#OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
#OBJS ?= main.c

This looks like an attempt to fix something gone wrong. Let's see:
(PROJECT_NAME): $(OBJS)
    $(CC) -o $(PROJECT_NAME)$(EXT) $(OBJS) ...

So you have main.c and Scipts/C/Tilemap.c. The corresponding OBJS would be main.o and Scipts/C/Tilemap.o, because patsubst just substitutes .c with .o.  However...
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
    $(CC) -c $< -o $@ $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)

This compiles .c file present in $(SRC_DIR) and puts the compilation result in $(OBJ_DIR). Both these variables are commented out in your Makefile. This rule can neither compile both main.c and Scipts/C/Tilemap.c nor produce both main.o and Scipts/C/Tilemap.o as they reside in different directories.
In short, Makefile is broken.


text:
Q: Populate text boxes from List Values I have a list that is created from a LINQ to XML query. The list can contain 1, 2, 3 or 4 values. I have four text boxes on the form that should be populated based on the values in the List, but I can't figure out how to do this because the number of elements in the list will vary. Would it be better to dynamically create the textboxes based on the number of values in the list? How could I go about this?
It seems like this would be a fairly common task, but I have not been able to find a solution. Any help would be greatly appreciated.

A: Sounds like you want to create a foreach loop and iterate round the linq query creating a new text box on each one and adding it to your form. It'd help to see what you've got so far. I've put an example below using a list instead of a linq query but what comes after it is the same
private void Form1_Load(object sender, EventArgs e)
    {
        var newList= new List<string> {"box1", "box2", "box3"};

        foreach (var boxName in newList)
        {
            TextBox newTextBox = new TextBox();
            newTextBox.Text = boxName;
            this.Controls.Add(newTextBox);
        }
    }

A: lets say you have a List
       List<int> testList = new List<int>(){1,2,3};
       foreach(int i in testList)
        {
          TextBox test = new TextBox();
          test1.Name = "textBox"+i;
           youcOntrl.Controls.Add(test1);
         }

You can also give them their location and size etc.

A: Creating dynamically, or just populating an existing 4, it doesn't matter. Choose which one is best for your UI requirements. (maybe even a DGV as has been suggested already)
First you need something to contain the controls, lets say you have a panel called MyPanel which will hold only these textboxes and nothing else...
Here's the load dynamically approach:
MyPanel.Controls.Clear();
int count = 1;
foreach(var item in listOfValues)
{
    TextBox tb = new TextBox();
    tb.Name = "MyTextbox" + i;
    tb.Text = item.ToString();//or whatever property you have for the value
    tb.Location = new Point(0, 0 + (25 * (i - 1)));
    MyPanel.Controls.Add(tb);
}

Here is the fill existing approach, assuming you have 4 TextBoxes called "TextBox1" for example:
int count = 1;
foreach(var item in listOfValues)
{
    TextBox tb = MyPanel.Controls.Find("TextBox" + i) as TextBox;
    tb.Text = item.ToString();//or whatever property you have for the value
}

NOTE: You need to be sure that listOfItems does not contain more items than you have textboxes for, otherwise you will get an exception

A: You can create 4 text boxes in the forms designer and set their Visible property to be false as default (from the properties pane).
Then, you can switch on the count property of your list as follows:
switch (els.Count)
{
    case 1:
        textBox1.Text = els[1].Value;
        textBox1.Visible = true;
        break;
    case 2:
        textBox1.Text = els[1].Value;
        textBox1.Visible = true;
        textBox2.Text = els[2].Value;
        textBox2.Visible = true;
        break;
    case 3:
        textBox1.Text = els[1].Value;
        textBox1.Visible = true;
        textBox2.Text = els[2].Value;
        textBox2.Visible = true;
        textBox3.Text = els[3].Value;
        textBox3.Visible = true;
        break;
    case 4:
        textBox1.Text = els[1].Value;
        textBox1.Visible = true;
        textBox2.Text = els[2].Value;
        textBox2.Visible = true;
        textBox3.Text = els[3].Value;
        textBox3.Visible = true;
        textBox4.Text = els[4].Value;
        textBox4.Visible = true;
        break;
    default:
        break;
}

If your list is IEnumerable, then you must first call the ToList() method on it to get a List<XElement> as IEnumerable type does not have a Count property.

A: If it is four or less then you don't have to create dynamically the textboxes. You could probably disable the textbox(es) that could not be populated. And specially if you name your textbox sequentially like TextBox1, TextBox2 etc then you could probably code like:
    for (int i = 1; i <= 4; i++)
    {
         if (i <= list.Count)
            {
              this.Controls["TextBox"+i.ToString()].Text = list[i-1];
              this.Controls["TextBox"+i.ToString()].Enabled = True;
             }
         else
             {
               this.Controls["TextBox"+i.ToString()].Enabled = False;
             }
    }

So, if you have 2 Items in your List for example then List.Count is 2 and therefore Textbox1 and 2 would be populated and TextBox3 and 4 will be disabled.


text:
Q: Pandoc Markdown to PDF doesn't show images I used knitR to convert R Markdown files to Markdown, and I'm trying to use Pandoc to convert them into HTML/PDF.
Markdown to HTML includes all my images in the output, using
pandoc test.md -o test.html

However, Markdown to PDF doesn't include any of my images in the output, using
pandoc test.md -o test.pdf

(there are other options because I am doing syntax highlighting that will show up in printed output, but no combination of them seem to include images in the PDF output).
In the actual Markdown file, images are referenced as:
<img src="images/image_to_include.png" title="Default title" alt="alt text" style="display: block; margin: auto;" />

where image_to_include.png is in the images subdirectory. The alternate text is not displaying either.
I would like to know how to get images to appear in the PDF output of Pandoc, but I am also curious to know why HTML seems to allow it and PDF doesn't.
My OS is Yosemite and I have installed MacTeX.

A: Pandoc includes raw HTML only if the output format is HTML-like. From the web-site:

The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, DZSlides, EPUB, Markdown, and Textile output, and suppressed in other formats.

In order to get images to work for both, HTML and PDF writer, you have to use pandoc's own format:
 ![la lune](lalune.jpg "Voyage to the moon")


text:
Q: C# Debug Extension of Dictionary which contains keys and Dictionaries I am trying to add an extension for a Dictionary who takes key-value a key and a Dictionary, as follows, but I receive error 'Cannot implicitly convert type bool to string':
public static string GetParameterValue(
    this Dictionary<string, Dictionary<string, string>> src, string section, string key, out string value)
{
    value = null;
    if (src.TryGetValue(section, out Dictionary<string, string> sectionValue))
    {
        bool hasValue =  sectionValue.TryGetValue(key, out value);
        return hasValue; //error... how to return value here when hasValue is true?
    }
    return string.Empty;
}

I have multiple sections (imagine categories) and each section has a huge list of parameters and their values; section One has a list of key/value pairs, section Two the same etc.
I am trying to have a Dictionary which is of the form
Dictionary<string, Dictionary<string, string>> Sections = new Dictionary<string, Dictionary<string, string>>();

which I populate like
Sections["Italian"].Add("Good morning", "Buon giorno");

and I want to have an extension so that I can do
string myWord = Sections.GetParameterValue("Italian", "Good morning")

so that myWord is "Buon giorno".
Maybe could you help?

A: try this
Dictionary<string, Dictionary<string, string>> Sections = new Dictionary<string,  Dictionary<string, string> >();

Sections.AddParameterValue("Italian","Good afternoon", "Buon afternoon");
Sections.AddParameterValue("Italian","Good morning", "Buon giorno");

string myWord = Sections.GetParameterValue("Italian", "Good morning");

public static class Extensions
{
    public static string GetParameterValue(
    this Dictionary<string, Dictionary<string, string>> src, string key1,  string key2)
    {
        if (src.TryGetValue(key1, out var sectionValue))
                if (sectionValue.TryGetValue(key2, out var result)) return result;

        return string.Empty;
    }

    public static void AddParameterValue(
    this Dictionary<string, Dictionary<string, string>> src, string section, string key, string value)
    {
        if (!src.TryGetValue(section, out _)) src[section] = new Dictionary<string, string>();
        if (src[section].TryGetValue(key, out _)) src[section][key] = value;
        else src[section].Add(key, value);
    }
}


text:
Q: Firestore database only works every other time I have a button on my page that looks like this
<Button
disabled={loading}
type="submit"
className="w-100 text-center mt-3"
onClick={() => {
    firebase
    .firestore()
    .collection("users")
    .doc("123")
    .set({ test: 123})
    .then(() => {
        setSuccessAlert("Updated user");
    })
    .catch(() => {
        setErrorAlert("Could not update user");
    });
}}
>
    Add user
</Button>

It uses bootstrap and typescript if that might give you a hint to what is wrong
If i put a console log in the onclick function it will always log it, but with the example above i need to press it twice for it to work. I've tested that its not just me being impatient, i've waited more than five minutes before pressing it again, but the instant i press it the second time it works.
Anyways if you know what i might be doing wrong please help me. Im lost

A: It works when i declare a variable for firebase.firestore().collection("users") instead of calling it directly
so now the code looks like this:
const db = firebase.firestore().collection("users");

db.doc("123")
    .set({ test: 123})
    .then(() => {
        setSuccessAlert("Updated user");
    })
    .catch(() => {
        setErrorAlert("Could not update user");
    });


text:
Q: Benefit from using selector property of the attributes in a WordPress Gutenberg block I have a custom Gutenberg block with attributes like so:
attributes: {
  title: {
    type: 'string',
    selector: 'js-title'
  },
},

Then in my edit function, I have a corresponding RichText component:
<RichText
  className="js-title"
  value={attributes.title}
  onChange={value => setAttributes({ title: value })}
  tagName="h3"
  placeholder="Title"
/>

I can leave the className portion out of the RichText component and the title still saves due to what's specified in value and onChange.
WordPress says:

Each source accepts an optional selector as the first argument. If a selector is specified, the source behavior will be run against the corresponding element(s) contained within the block. Otherwise it will be run against the block's root node.

But I don't really get what that's saying. Is there any benefit from tying the RichText component to the title attribute with a classname?


text:
Q: get single occurrence of 'parent id' in self join I have table with following set of data :
CategoryId  CategoryName    ParentCategoryId
1             abc                       null
2             abc1                      1
3             abc2                      1
4             def                       null
5             def1                      4
6             def2                      4
7             ghi                       null
8             ghi1                      7
9             ghi2                      7

I used self join on this table with the following query :
select p.CategoryId as ParentCategoryId, p.CategoryName as ParentCategoryName,
       c.CategoryId as CategoryId, c.CategoryName as CategoryName
from Categories c, Categories p
where c.ParentCategoryId = p.CategoryId

This query produces duplicate rows of parent category id and name for every categoryid.
I want that PraentCategoryId to appear one time for all its respective subcategories.
What I need to do further or is there a way to modify this query.
the result of above query is like
ParentCategoryId    ParentCategoryName  CategoryId  CategoryName
    1             abc                       2        abc1
    1             abc                       3        abc2
    4             def                       5        def1
    4             def                       6        def2
    7             ghi                       8        ghi1
    7             ghi                       9        ghi2

A: I've put two versions of the query using JOINs. The first will show each parent with each child on their own rows. The second uses GROUP_CONCAT to put the child categories in comma separated lists with one row per parent category.
select
    p.CategoryId as ParentCategoryId,
    p.CategoryName as ParentCategoryName,
    c.CategoryId as CategoryId,
    c.CategoryName as CategoryName
from Categories c
JOIN Categories p
ON c.ParentCategoryId = p.CategoryId

select
    p.CategoryId as ParentCategoryId,
    p.CategoryName as ParentCategoryName,
    GROUP_CONCAT(c.CategoryId) as CategoryIds,
    GROUP_CONCAT(c.CategoryName) as CategoryNames
from Categories c
JOIN Categories p
ON c.ParentCategoryId = p.CategoryId
GROUP BY p.`CategoryId`
ORDER BY p.`CategoryId`

The output from the second query:
ParentCategoryId    |   ParentCategoryName  |   CategoryIds |   CategoryNames
1   |   abc |   2,3 |   abc1,abc2
4   |   def |   5,6 |   def1,def2
7   |   ghi |   9,8 |   ghi2,ghi1

A: Hope this solve your problem,
;WITH cte
     AS (SELECT p.categoryid   AS ParentCategoryId,
                p.categoryname AS ParentCategoryName,
                c.categoryid   AS CategoryId,
                c.categoryname AS CategoryName
         FROM   Categories  c
                JOIN Categories  p
                  ON c.parentcategoryid = p.categoryid)
SELECT DISTINCT ParentCategoryId,
                ParentCategoryName,
                Stuff((SELECT ',' + Cast(t1.categoryid AS VARCHAR(10))
                       FROM   cte t1
                       WHERE  t.parentcategoryid = t1.parentcategoryid
                       FOR xml path('')), 1, 1, '') AS CategoryId,
                Stuff((SELECT ',' + t2.categoryname
                       FROM   cte t2
                       WHERE  t.parentcategoryid = t2.parentcategoryid
                       FOR xml path('')), 1, 1, '') AS CategoryName
FROM   cte t


text:
Q: Customize a SharePoint 2010 survey required field user message I've created a survey with rating questions and branch logic and most are required fields.  Any suggestions/ideas on how to use Javascript/JQuery to change the OOTB required field user message "You must specify a value for this required field"  ?
Thanks in advance

A: this will be attached specifically to surveys and you can tweak both types of messages
<script type="text/javascript">
$(document).ready(function () {

        //override: "You must specify a value for this required field."

        //per-field validator
        $('.ms-formbodysurvey .ms-formvalidation > span[role="alert"]').text("Please specify a value for this field.");

        //summary validator
        $('.ms-formbodysurvey span.ms-formvalidation[role="alert"]').text("Please make sure all required fields are properly filled.");

});
</script>

A: You can use this code. You should add this to both NewForm.aspx and EditForm.aspx.
<script type="text/javascript">
$(document).ready(function(){

var alertSpan= $('span[role="alert"]');
alertSpan.text('My Custom Alert!');

});
</script>


text:
Q: Boitum - Need to continue with test scripts when assertion fails for one request and response I have 20 utterance to Alexa .Out of which 1 has assertion error in the middle now I still wish to continue with other utterances in my .Convo file
In practice when we run botium once an assertion fails then the execution stops .
A sample of error after which my script stopped
Error: News_01/Line 3: error sending to bot Error: Skill simulation for
simulation id XXXXXXXXXXXXXXXX failed with message: xxxxx

I have a list of utterances and response
1.me:open skillyoga
Alexa:hi joe ,how are you doing today
2.me:get me exercises on breathing
Alexa: i have 10 types of category .
3.Me:Not now
4.Me:Give me list of exercises for increasing concentration
Alexa : we have A exercise and B exercise
Suppose lets say it fails assertion in the 3rd point then the expected result is botium must continue with other test scripts that follows .
This is not the current behaviour in botium

A: Botium is about test automation: as soon as a single step of the test case is failed, the whole test case is failed (and the whole test suite).
It seems as if your are trying to pack multiple test cases into one BotiumScript, while there should be several of them:
test case 1:
#me
open skillyoga

#bot
hi joe, how are you doing today

test case 2:
#me
get me exercises on breathing

#bot
i have 10 types of category

#me
not now

#bot
...

test case 3:
#me
Give me list of exercises for increasing concentration

#bot
we have A exercise and B exercise


text:
Q: Exporting in JSON Format I can export my data as CSV using:
df.reset_index().to_csv('MYDATASET.csv')

How can I export my result in JSON Array Format?

A: You can use orient='records'
print df.reset_index().to_json(orient='records')


text:
Q: java.lang.NoClassDefFoundError: java.lang.reflect.Parameter is a restricted class When changed to JRE to JDK 1.8.0, Not able to get the server started. It compiled fine.  Note, this application runs fine with JRE 1.7
I'm using SDK App Engine - 1.9.71

Caused by: org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name
  'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0':
  BeanPostProcessor before instantiation of bean failed; nested
  exception is java.lang.NoClassDefFoundError:
  java.lang.reflect.Parameter is a restricted class. Please see the
  Google  App Engine developer's guide for more details.    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at
  org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    ... 61 more Caused by: java.lang.NoClassDefFoundError:
  java.lang.reflect.Parameter is a restricted class. Please see the
  Google  App Engine developer's guide for more details.    at
  com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
    at
  org.springframework.core.StandardReflectionParameterNameDiscoverer.getParameterNames(StandardReflectionParameterNameDiscoverer.java:56)
    at
  org.springframework.core.PrioritizedParameterNameDiscoverer.getParameterNames(PrioritizedParameterNameDiscoverer.java:65)
    at
  org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:182)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
    at
  org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    at
  org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at
  org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
    at
  org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:140)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
    at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
    at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201)
    at
  org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92)
    at
  org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:101)
    at
  org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:85)
    at
  org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)
    at
  org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:243)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:988)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:959)
    at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:472)
    ... 66 more

A: You say in your question:
"I'm using SDK App Engine - 1.9.34"
App Engine SDK 1.9.34 is an old version base on Java 7 that doesn't support Java 8.
Try with a newer App Engine SDK version.


text:
Q: PHP URL QUERY to array I have a problem with this:
<?php $url = 'aa=bb&cc=dd&ee=ff';

For something like this:
<?php $url = array('aa' => 'bb', 'cc' => 'dd', 'ee' => 'ff');

My code:
<?php

$url = 'aa=bb&cc=dd&ee=ff';
preg_match_all('[(\w+)=(\w+)]', $url, $matches);
var_export($matches);

Result:
array ( 0 => array ( 0 => 'aa=bb', 1 => 'cc=dd', 2 => 'ee=ff', ), 1 => array ( 0 => 'aa', 1 => 'cc', 2 => 'ee', ), 2 => array ( 0 => 'bb', 1 => 'dd', 2 => 'ff', ), )

It's almost okay, I just want to get rid of this first key. Thank you for your help.

A: The parse_str() function parses a query string into variables.
$url = 'aa=bb&cc=dd&ee=ff';

parse_str($url, $matches);

print_r($matches);

A: Actually you can get associative array by many different ways e.g with regex, using explode by & and so on.
But If I were you, I'll use parse_str()
<?php
$url = 'aa=bb&cc=dd&ee=ff';
parse_str($url, $query);
print_r($query);
?>

Output:
Array (
 [aa] => bb
 [cc] => dd
 [ee] => ff
)

DEMO: https://3v4l.org/fjadK


text:
Q: Why returned from flattenMap empty does not trigger subscribeCompleted I transform any new value from signal with flattenMap, and I want to stop process based on some condition, not with error, but with completed state. Mentioned below code does not allow to do this. It just filters some value. How can I complete from flattenMap?
RACSignal* anySignal = //
[ [ anySignal
 flattenMap: ^(id _)
 {
    return [ RACSignal empty ];
 } ]
subscribeCompleted:
^{
   NSLog(@"Not Called");
}];

A: -flattenMap: doesn't complete until all relevant signals complete, meaning the signal that -flattenMap: is called on, as well as the signals being returned from the map block. To complete the signal, check out -takeUntilBlock: and -takeWhileBlock:.