作为开始使用pyAudioAnalysis的一部分,我正在Mac(High Sierra)执行bellow命令.
pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub
Run Code Online (Sandbox Code Playgroud)
我在安装过程中遇到以下错误.感谢您的意见.
matplotlib 1.3.1的要求是numpy> = 1.5,但是你将拥有不兼容的numpy 1.8.0rc1.
请在下面找到更多信息,
Channas-MacBook-Pro:~ channa$ python
Python 2.7.10 (default, Oct 6 2017, 22:29:07)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
[3]+ Stopped python
Channas-MacBook-Pro:~ channa$ pip -V
pip 10.0.0b2 from /Library/Python/2.7/site-packages/pip-10.0.0b2-py2.7.egg/pip (python 2.7)
Channas-MacBook-Pro:~ channa$ sudo pip install numpy matplotlib scipy sklearn hmmlearn simplejson eyed3 pydub
The directory '/Users/channa/Library/Caches/pip/http' or …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Android 中实现通知播放器。我按照本指南来实现这一目标。但是,根据我的要求,我需要在后台通知播放器中实现“跳到下一个”和“跳到上一个”。
到目前为止,MediaSessionCompact.Callback 的 onPlay() 和 onPause() 被触发。但是,在调试时,我注意到在通知播放器中按下下一个和上一个按钮时不会触发 onSkipToNext() 和 onSkipToPrevious() 回调方法。
感谢您的投入。我在下面添加了相关代码。
背景音频服务
private void showPlayingNotification() {
NotificationCompat.Builder builder = MediaStyleHelper.from(BackgroundAudioService.this, mMediaSessionCompat);
if (builder == null) {
return;
}
builder.addAction(new NotificationCompat.Action(android.R.drawable.ic_media_previous, "Previous", MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS)));
builder.addAction(new NotificationCompat.Action(android.R.drawable.ic_media_pause, "Pause", MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_PLAY_PAUSE)));
builder.addAction(new NotificationCompat.Action(android.R.drawable.ic_media_next, "Next", MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_SKIP_TO_NEXT)));
builder.setStyle(new NotificationCompat.MediaStyle().setShowActionsInCompactView(0).setMediaSession(mMediaSessionCompat.getSessionToken()));
builder.setSmallIcon(R.mipmap.ic_launcher);
NotificationManagerCompat.from(BackgroundAudioService.this).notify(1, builder.build());
}
private void showPausedNotification() {
NotificationCompat.Builder builder = MediaStyleHelper.from(this, mMediaSessionCompat);
if (builder == null) {
return;
}
builder.addAction(new NotificationCompat.Action(android.R.drawable.ic_media_previous, "Previous", MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS)));
builder.addAction(new NotificationCompat.Action(android.R.drawable.ic_media_play, "Play", MediaButtonReceiver.buildMediaButtonPendingIntent(this, PlaybackStateCompat.ACTION_PLAY_PAUSE))); …Run Code Online (Sandbox Code Playgroud) java android mediacontroller android-mediaplayer android-mediasession
我想了解in和out在 Kotlin 中。正如我发现的理论一样,消费者in需要和生产者out回报。
但是,下面的两种方法如何区分何时in和out被视为我们可以list毫无问题地访问的方法参数?
private fun exampleMethod1(list: ArrayList<out String>) {}
private fun exampleMethod2(list: ArrayList<in String>) {}
Run Code Online (Sandbox Code Playgroud) 我有一个基于React的Web应用程序,可从Jenkins API检索数据。在componentDidMount()函数期间,我正在调用第一个API,这将启动API调用流程。然后,我将使用API中的数据来呈现组件。
Jenkins服务器每天早上7点开始构建每个项目。因此,我想每天晚上8点左右从React调用这些API。
我们是否可以安排React来调用这些API并获取它在一天中特定时间的更新数据?还是刷新浏览器等会产生新的API数据?我是React的新手,非常感谢您的建议。
val scoreFragmentArgs1 by navArgs<ScoreFragmentArgs>()
val scoreFragmentArgs2 = ScoreFragmentArgs.fromBundle(arguments!!)
Run Code Online (Sandbox Code Playgroud)
我可以使用上述任何语句访问从前一个片段传递的参数。有人可以解释它们的区别以及何时使用它们。提前致谢
android ×2
kotlin ×2
api ×1
generics ×1
java ×1
javascript ×1
jenkins ×1
macos ×1
matplotlib ×1
numpy ×1
python ×1
reactjs ×1
typescript ×1