This file contains hidden or 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
from django.db import connection | |
from django.conf import settings | |
cursor = connection.cursor() | |
cursor.execute('SHOW TABLES') | |
results=[] | |
for row in cursor.fetchall(): | |
results.append(row) | |
for row in results: | |
cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' % (row[0])) |
This file contains hidden or 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
import java.util.Properties; | |
import org.apache.log4j.PropertyConfigurator; | |
class MyDummyApp { | |
public static void main(String []args) { | |
Properties properties=new Properties(); | |
properties.setProperty("log4j.rootLogger","DEBUG,stdout"); | |
properties.setProperty("log4j.rootCategory","DEBUG"); | |
properties.setProperty("log4j.appender.stdout", "org.apache.log4j.ConsoleAppender"); |
This file contains hidden or 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
import org.apache.log4j.ConsoleAppender; | |
import org.apache.log4j.FileAppender; | |
import org.apache.log4j.Level; | |
import org.apache.log4j.Logger; | |
import org.apache.log4j.PatternLayout; | |
public class ProgramaticLog4j { | |
public static void main(String[] arg){ | |
PatternLayout layout = new PatternLayout(); |
This file contains hidden or 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 qa.com.espressospoonstructure.screenObjects; | |
import android.support.test.espresso.ViewInteraction; | |
import org.hamcrest.Matcher; | |
import static android.support.test.espresso.Espresso.onView; | |
import static android.support.test.espresso.action.ViewActions.clearText; | |
import static android.support.test.espresso.action.ViewActions.click; | |
import static android.support.test.espresso.action.ViewActions.scrollTo; |
This file contains hidden or 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 qa.com.espressospoonstructure.tests; | |
import android.app.Activity; | |
import android.support.test.InstrumentationRegistry; | |
import android.support.test.runner.AndroidJUnit4; | |
import android.test.ActivityInstrumentationTestCase2; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.runner.RunWith; |