This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" | |
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> | |
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property> | |
<property name="hibernate.connection.username">root</property> | |
<property name="hibernate.connection.password"></property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package co.mobiwise.hibernate.util; | |
/** | |
* Created by yusufcakmak on 8/3/15. | |
*/ | |
import java.util.Properties; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
import org.hibernate.cfg.Configuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void deleteBook(Book book) { | |
Session session = HibernateUtil.getSessionFactory().openSession(); | |
session.beginTransaction(); | |
session.delete(book); | |
session.getTransaction().commit(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile 'com.google.android.exoplayer:exoplayer:r2.X.X' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'com.google.android.exoplayer:exoplayer-core:2.X.X' | |
implementation 'com.google.android.exoplayer:exoplayer-dash:2.X.X' | |
implementation 'com.google.android.exoplayer:exoplayer-ui:2.X.X' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" | |
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="connection.url">jdbc:mysql://localhost:3306/book</property> | |
<property name="connection.username">root</property> | |
<property name="connection.password"></property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.yusufcakmak.exoplayersample.customview.CustomExoPlayerView | |
android:id="@+id/custom_player_view" | |
android:focusable="true" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void updatePlayPauseButton() { | |
if (!isVisible() || !isAttachedToWindow) { | |
return; | |
} | |
boolean playing = player != null && player.getPlayWhenReady(); | |
String contentDescription = getResources().getString( | |
playing ? com.google.android.exoplayer2.R.string.exo_controls_pause_description : com.google.android.exoplayer2.R.string.exo_controls_play_description); | |
playButton.setContentDescription(contentDescription); | |
playButton.setImageResource( | |
playing ? R.drawable.pausecontrol : R.drawable.playcontrol); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" | |
git push origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extractorsFactory = new DefaultExtractorsFactory(); | |
MediaSource mediaSource = new ExtractorMediaSource(Uri.parse("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"), | |
mediaDataSourceFactory, extractorsFactory, null, null); |
NewerOlder