2019年11月20日 星期三

Exception/Crash discovery applicaiton

Sentry : https://sentry.io/welcome/
Crashlytics : https://firebase.google.com/products/crashlytics

VMWARE WORKSTATION AUTOFIT GUEST SETTING

I like to work with VMware Workstation , also in windowed mode and not always in full screen mode. However, since I used three different monitor resolutions for my work, I repeatedly stumble across the Autofit Guest view.
Unfortunately after a new installation of the VMware Workstation on my new laptop the Dell Latitude 7390 2-in-1 again had the problem that the setting Autofit Guest or Fit Guest Now does not work.
Each time I moved the VM Workstation window to the other monitor (which has a different resolution) or I switched from full-screen mode to windowed mode, the guest operating system was not adjusted to the new window size. It was very bad if I separated the notebook from the monitors and I only wanted to work in tablet mode. Since there was the wildest window representations in the VM guest operating system.
My solution which I found out after a few trials and not helpful internet researches:
  1. Disable the 3D Acceleration in the VM settings.
  2. Insert the line svga.autodetect = "TRUE" in the corresponding * .vmx file
  3. Change Monitors to [Use host setting for monitors]
After these two changes, the Autofit Guest mode finally works for me again.
I hope the tip can help someone.

2019年11月18日 星期一

Docker for Windows 使用 VMware WorkStation(共存)

一.前言

Docker for Windows 不同于 Docker Toolbox。Docker for Windows 对系统的要求至少为Windows 10专业版,因为它需要Hyper-V的支持,而Dockbox Toolbox使用Oracle Virtual Box而不是Hyper-V 。使用过VMware WorkStation的朋友应该知道,vm无法与hyper-v共存。那么如果我的电脑已经安装和使用VM,如何才能使用Docker for Windows呢,请看下面的讲解。

二.安装Docker for Windows

1.下载Docker for Windows

安装过程很简单,在此我就不赘述了。

2.安装以后的准备

安装完成以后,Docker for Windows 会自动运行,此时会出现提示没有启用Hyper-V,这里点击canel即可。
1526822445162

三.准备工作

1.下载boot2docker.iso

然后将 boot2docker.iso 放在 C:\Users\<用户名>\.docker\machine\machines\dev\,文件夹不存在就自己建立。

2.下载 VMware Workstation 驱动

从这里下载 https://github.com/pecigonzalo/docker-machine-vmwareworkstation/releases/ 最新版的vm驱动。此驱动非官方开发,但是也在官方的文档中有链接。
然后将 docker-machine-driver-vmwareworkstation.exe复制到 C:\Program Files\Docker\Docker\resources\bin 下:
1526822848393

四.安装Docker Machine

1.打开VMware Workstation

这一步是必须的!VM版本必须大于10。

2.安装dev示例

打开cmd,执行命令
docker-machine create --driver=vmwareworkstation dev
执行过程如下:
1526822936708

3.验证安装

执行命令:
docker-machine ls
会出现一个dev的实例
1526823011588

4.激活实例

执行命令:
docker-machine env dev
会出现如下图:
1526823114672

5.设置环境变量

打开环境变量设置,对于第3步中的提示设置系统环境变量:
1526823237336
设置这五个即可,最后记得要点确定哦。

五.验证是否安装成功

1.登录dev实例

使用命令登录:
docker-machine ssh dev
出现如下表示成功:
1526823434885

2.运行hello-world

关闭我们刚刚的cmd窗口,打开一个新的cmd窗口。执行命令:
docker run hello-world
1526823527811
到这一步我们的安装就表示成功了。

六.配置加速器

通过命令登录docker-machine
新建文件 vi /etc/docker/daemon.json
输入以下内容
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
保存,重启即可

七.收尾工作

因为我们使用的VM,所以我们在使用docker的时候,必须保证vm的dev示例是在运行的:
1526823632970
此方法目前有个缺点,就是无法使用Docker for Windows的UI管理功能,但是这并不影响,通过命令我们可以完成所有的事情,所以我们在服务中,停止Docker for Windows Service,并且将其设为手动启动,避免每次开机就收到一个提示框。
1526823747535
最后十分感谢这个园友的文章能给我参考:https://www.cnblogs.com/VAllen/p/Docker-for-windows-on-VMware.html

from : https://www.cnblogs.com/stulzq/p/9064828.html

Window.Open only if the JavaScript window does not exist

I would do so - basically storing all referenced opened windows in the function itself. When the function fires, check if the window does not exist or has been close - from that, start the pop-up window. Otherwise, focus on the existing popup for that request.

function launchApplication(l_url, l_windowName)
{
  if ( typeof launchApplication.winRefs == 'undefined' )
  {
    launchApplication.winRefs = {};
  }
  if ( typeof launchApplication.winRefs[l_windowName] == 'undefined' || launchApplication.winRefs[l_windowName].closed )
  {
    var l_width = screen.availWidth;
    var l_height = screen.availHeight;

    var l_params = 'status=1' +
                   ',resizable=1' +
                   ',scrollbars=1' +
                   ',width=' + l_width +
                   ',height=' + l_height +
                   ',left=0' +
                   ',top=0';

    launchApplication.winRefs[l_windowName] = window.open(l_url, l_windowName, l_params);
    launchApplication.winRefs[l_windowName].moveTo(0,0);
    launchApplication.winRefs[l_windowName].resizeTo(l_width, l_height);
  } else {
    launchApplication.winRefs[l_windowName].focus()
  }
}

from : https://www.generacodice.it/es/articolo/191665/JavaScript+window.open+only+if+the+window+does+not+already+exist

2019年11月10日 星期日

Matomo

Code | Design | Innovate

Welcome to the Matomo Developer Zone (formerly Piwik), the center of innovation in analytics.

from : https://developer.matomo.org/

2019年11月6日 星期三

Find SQL fast in SQL Server Management Studio and Visual Studio

Find SQL fast in SQL Server Management Studio and Visual Studio

  • Find fragments of SQL in tables, views, stored procedures, functions, jobs, and more
  • Quickly navigate to objects wherever they happen to be on a server
  • Search across multiple object types and multiple databases
  • Find all references to an object
  • Search with booleans and wildcards

from : https://www.red-gate.com/products/sql-development/sql-search/

wibiya widget