alpha

iOS-调用网页聊天、拨打电话

这一生的挚爱 提交于 2020-01-28 03:26:57
@property (nonatomic,strong) UIButton *but; @property (nonatomic,strong) UIButton *but1; @property (strong, nonatomic) UIView *subView; //客服QQ -(void)qqAction { self.but = [UIButton buttonWithType:UIButtonTypeCustom]; self.but.frame = self.view.bounds; self.but.backgroundColor = [UIColor colorWithWhite:0.019 alpha:0.400]; [self.but addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:self.but]; self.but1 = [UIButton buttonWithType:UIButtonTypeCustom]; self.but1.frame = self.view.bounds; self.but1.backgroundColor = [UIColor

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

本小妞迷上赌 提交于 2020-01-23 16:48:08
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

China☆狼群 提交于 2020-01-23 16:46:20
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

iPhone - OpenGL ES 1.1 - Alpha Blend make texture wrong color

痴心易碎 提交于 2020-01-23 16:46:06
问题 I'm newbie in OpenGL ES 1.1 for iPhone. Today, I tried to draw png texture on black background (the texture includes the alpha chanel) but the result is diference from source png file. The Result on iPhone & Simulator: Turn the light off: It's should be (Brighter & more blur): Source Texture file: This is the source code I use: //Setup: glEnable(GL_ALPHA_TEST); glEnable(GL_BLEND); glAlphaFunc(GL_GREATER,0.01); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LIGHTING); glEnable

alpha-belta 剪枝实现棋类AI ——Tic-Tac-Toe

纵然是瞬间 提交于 2020-01-23 01:25:49
文章目录 定义抽象类 棋子 Piece、棋盘 Board 继承抽象类 AI 算法 minimax alpha-beta 剪枝 基于 ab剪枝 寻找最优策略 来一局! python 版本 3.7 喔! 定义抽象类 棋子 Piece、棋盘 Board from __future__ import annotations from typing import NewType , List from abc import ABC , abstractmethod Move = NewType ( 'Move' , int ) class Piece : @ property def opposite ( self ) - > Piece : raise NotImplementedError ( "Should be implemented by subclasses." ) class Board ( ABC ) : @ property @abstractmethod def turn ( self ) - > Piece : . . . @abstractmethod def move ( self , location : Move ) - > Board : . . . @ property @abstractmethod def legal_moves ( self ) - >

Review M1 virotherapy

邮差的信 提交于 2020-01-22 20:24:51
$\mathbf{1.\,\text{公式}}$ 假设$\,F(t)=\int_{a}^{b}f(t-\theta)d\theta,$ 那么可求得 \begin{equation} F'(t)=f(t-a)-f(t-b).\label{eq:1} \end{equation} 事实上, 做变量代换$\,\eta=t-\theta$, 则$\,d\eta=-d\theta$, 从而 \[ F'(t)=-\int_{t-a}^{t-b}f'(\eta)d\eta=f(t-a)-f(t-b). \] 根据上面的公式$\,($\ref{eq:1}$)$ 可知论文中 \[ \frac{d}{dt}\int_{0}^{\tau_{1}}H(x,t-\theta)N(x,t-\theta)d\theta=H(x,t)N(x,t)-H(x,t-\tau_{1})N(x,t-\tau_{1}), \] 其中固定每个点$\,x$ 去算, 因为这个积分和求导都与$\,x$ 无关. $\mathbf{2.\,(15)\Longrightarrow(16)}$ 首先去掉拉普拉斯项, 其次去掉$\,\ln$ 项, 然后看带$\,H(x,t-\tau_{2})Y(x,t-\tau_{2})$ 的项通过计算知道是平衡的, 再看带$\,Z$ 的项计算后发现也是平衡的, 接着$\,d_{1}N$ 项也是平衡的所以划掉

Set opacity of grey values of overlapping areas relative to n

别来无恙 提交于 2020-01-22 19:39:06
问题 I struggle to understand (and control) the blending of alphas - unfortunately, alpha values don't simply "add up" (0.5 + 0.5 is not 1). But how could I achieve that? The aim is to define the (absolute) grey value of overlapping areas relative to the total number of observations. See example below. I tried to set scale_alpha(range = c(0,1)) to no avail, maybe I did not use it correctly. library(ggplot2) library(ggforce) grid_df = data.frame(x = c(1:2, 2.5), y = rep(1,3), r = 1) ggplot()+ geom

Set opacity of grey values of overlapping areas relative to n

倖福魔咒の 提交于 2020-01-22 19:39:02
问题 I struggle to understand (and control) the blending of alphas - unfortunately, alpha values don't simply "add up" (0.5 + 0.5 is not 1). But how could I achieve that? The aim is to define the (absolute) grey value of overlapping areas relative to the total number of observations. See example below. I tried to set scale_alpha(range = c(0,1)) to no avail, maybe I did not use it correctly. library(ggplot2) library(ggforce) grid_df = data.frame(x = c(1:2, 2.5), y = rep(1,3), r = 1) ggplot()+ geom

ggplot2: geom_ribbon with alpha dependent on data density along y-axis for each x

人走茶凉 提交于 2020-01-21 11:18:30
问题 Is there a way in ggplot2 to produce a geom_ribbon (or other area based geom) with a varying alpha based on the density of points? The following code produces 50 noisy sine waves, with random x-values for each sample. I don't want to draw every single point as I might want a thousand or more resamples, so I'd like to summarise all these points. A simple method would be to draw a geom_ribbon covering 95% quantiles. However, firstly this isn't that easy to calculate given the x-values aren't

1.5 群的同构

假装没事ソ 提交于 2020-01-20 20:28:26
§5 群的同构 定义1.5.1 (同构) 设 G G G 和 G ′ G' G ′ 是两个群。若有一个从 G G G 到 G ′ G' G ′ 的双射 σ \sigma σ ,它对于所有的 x , y ∈ G x,y \in G x , y ∈ G 有 σ ( x y ) = σ ( x ) σ ( y ) \sigma(xy) = \sigma(x) \sigma(y) σ ( x y ) = σ ( x ) σ ( y ) 则称 G G G 同构于 G ′ G' G ′ 。具有以上性质的双射称为 G G G 到 G ′ G' G ′ 的一个 同构映射 ,或简称 同构 。 注: 由定义显见:同构映射将单位元素映到单位元素,将逆元素映到逆元素。 群的同构作为群之间的一种关系,满足自反性、对称性和传递性。 在同构映射下,对应的元素在各自的运算下具有相同的代数性质。 在抽象地研究一个群时,无需对同构的群加以区别。 在历史上,群论最早研究的就是变换群,抽象群的概念也是从变换群的概念中抽象而来的。 定理1.5.1 (Cayley定理) 任何一个群都同构于某一集合上的变换群。 证明 设 G G G 是一个群。对于每个 a ∈ G a \in G a ∈ G ,定义同一个集合 G G G 的变换 σ a \sigma_{a} σ a ​ 如下: σ a ( x ) = a x , x ∈ G