我在Ubuntu上从源代码编译了mplayer.我不想使用GUI但是我想制作一个可执行的bash文件,它从一个被删除到bash文件的文件中获取路径.我该如何做到这一点?
我想让它看起来像这样:
mplayer <get full path to file.file-ending>
我希望可执行文件bash文件位于我的桌面上;)
如果可能的话,我只是喜欢一个rightclick -> start with mplayer功能,但我不知道如何制作一个功能.
我目前在页面底部显示2个三角形,一个在左边,一个在右边.直角三角形是透明的.两个三角形都有一种颜色.
我希望triangle-bottom-right有一个额外的渐变级别(额外的颜色停止).
它应该从左到右,从开始到rgba(70, 70, 70, 0.15)结束rgba(70, 70, 70, 0).目标浏览器是Chrome(通过Electron运行).
生成的三角形应该能够调整大小到浏览器宽度,高度是恒定的.
我的CSS:
.triangle-footer {
position: relative;
bottom: 0px;
height: 176px;
width: 100%;
}
.triangle-bottom-left {
position: absolute;
width: 40%;
height: 100%;
left: 0px;
bottom: 0px;
background: linear-gradient(to right top, rgba(94, 194, 82, 100) 50%, rgba(255, 255, 255, 0) 50%);
}
.triangle-bottom-right {
position: absolute;;
width: 125%;
height: 140%;
right: 0px;
bottom: 0px;
background: linear-gradient(to left top, rgba(70, 70, 70, 0.15) 50%, rgba(255, 255, 255, 0) …Run Code Online (Sandbox Code Playgroud) 我目前只能在我编译的exe旁边放置我的wave文件来播放我的背景声音.但我实际上想要一个带有wave文件的静态可执行文件.这在Delphi XE2中是否可行?
这是我的代码:
SndPlaySound('.\Raw.wav', SND_ASYNC or SND_LOOP);
#This will play the Raw.wav that is next to my program.
Run Code Online (Sandbox Code Playgroud) 我创建了一个UserControl:一个TextBox,在左侧显示一个图标.我的代码似乎工作,但以下错误不断显示,并使XAML编辑器将其标记为错误.
该成员未被识别或无法访问.
我也根本没有在我的属性中获得自动完成,我认为这是因为错误?我对WPF UserControls并不熟悉.
我已经多次清理并重建/重新启动了我的项目.这没有帮助,XAML编辑器只是在每个自定义属性上显示此错误.
我正在使用.NET 4.6.1.
LoginWindow.xaml:
<Window x:Class="SMSBrowser.LoginWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:control="clr-namespace:SMSBrowser.Controls"
Title="SMS Browser - Login" SizeToContent="WidthAndHeight" ResizeMode="NoResize" Background="DimGray">
<Grid>
<StackPanel Margin="30" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Test" TextAlignment="Center" FontSize="32" FontWeight="Bold" Foreground="White" Margin="0,0,0,25" />
<control:IconTextBox CustomBackground="Yellow" CustomIconSource="..\Resources\Icons\User.ico" Height="25" Margin="0,0,0,4" />
<control:IconTextBox CustomBackground="Red" CustomIconSource="..\Resources\Icons\Key.ico" Height="25" Margin="0,4,0,4" />
<Button Content="Login" Height="25" Width="400" Margin="0,4,0,0" />
</StackPanel>
</Grid>
Run Code Online (Sandbox Code Playgroud)
IconTextBox.xaml
<UserControl x:Class="SMSBrowser.Controls.IconTextBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="25" d:DesignWidth="300"
x:Name="LayoutRoot">
<Border BorderBrush="{Binding Path=CustomBorderBrush, ElementName=LayoutRoot}" BorderThickness="{Binding Path=CustomBorderThickness, ElementName=LayoutRoot}">
<DockPanel Background="{Binding Path=CustomBackground, ElementName=LayoutRoot}">
<Image Source="{Binding Path=CustomIconSource, ElementName=LayoutRoot}" Margin="{Binding …Run Code Online (Sandbox Code Playgroud) 我在 Angular 7 中设置了更改路线时的幻灯片动画。我现在遇到的问题是动画卡顿,因为我导航到的组件正在生命周期的动画期间执行代码OnInit。
动画完成后如何初始化组件的代码以防止丢帧?
编辑:
我正在使用路由器动画,这是我的设置:
app.component.html:
<div [@routeAnimations]="prepareRoute(outlet)">
<router-outlet #outlet="outlet"></router-outlet>
</div>
Run Code Online (Sandbox Code Playgroud)
app.component.ts:
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
animations: [routeAnimations]
})
export class AppComponent {
prepareRoute(outlet: RouterOutlet) {
return outlet && outlet.activatedRouteData && outlet.activatedRouteData.animation;
}
}
Run Code Online (Sandbox Code Playgroud)
app-routing.module.ts:
const routes: Routes = [
{
path: 'sign-in',
loadChildren: './modules/sign-in/sign-in.module#SignInModule',
data: {animation: 'slideLeft'}
},
{
path: 'dashboard',
component: DashboardComponent,
data: {animation: 'slideRight'}
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Run Code Online (Sandbox Code Playgroud)
animations.ts: …