public class ListActivity extends AppCompatActivity {
ListView listViewMalfunctions;
Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list);
listViewMalfunctions = (ListView) findViewById(R.id.listViewMalfunctions);
final String[] array = getResources().getStringArray(R.array.malfunctions);
final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getApplicationContext(),
R.layout.simple_list,
array);
listViewMalfunctions.setAdapter(arrayAdapter);
listViewMalfunctions.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
switch (i){
case 0:
intent = new Intent(getApplicationContext(), WebListActivity.class);
intent.putExtra(StaticData.keyText, StaticData.engine3_1);
intent.putExtra(StaticData.keyTitle, StaticData.title3_1);
startActivity(intent);
break;
case 1:
break;
}
}
});
}
}
Log.d(tag, "Создание Activity");
выводится, из класса DataBase нет if (isNotBlank(path)){
//получение текста из файла
String text = fileParser.getTextFromFile(path);
DataBase dataBase = new DataBase();
dataBase.delTextTemp();
//передача текста в базу данных
dataBase.setTextToTempText(text);
//передача текста в TextArea
loadTextArea.setText(text);
}
Haskell стал изучать недавно
Ambiguous occurrence ‘length’
It could refer to either ‘Prelude.length’,
imported from ‘Prelude’ at src/Main.hs:1:1
(and originally defined in ‘Data.Foldable’)
or ‘Data.Text.length’,
imported from ‘Data.Text’ at src/Main.hs:1:1-16
|
5 | f str a b = let n = length a in if take n str == a then b ++ f (drop n str) a b else if str == "" then "" else head str : f (tail str) a b
| ^^^^^^
src/Main.hs:5:36: error:
Ambiguous occurrence ‘take’
It could refer to either ‘Prelude.take’,
imported from ‘Prelude’ at src/Main.hs:1:1
(and originally defined in ‘GHC.List’)
or ‘Data.Text.take’,
imported from ‘Data.Text’ at src/Main.hs:1:1-16
|
5 | f str a b = let n = length a in if take n str == a then b ++ f (drop n str) a b else if str == "" then "" else head str : f (tail str) a b
| ^^^^
src/Main.hs:5:65: error:
Ambiguous occurrence ‘drop’
It could refer to either ‘Prelude.drop’,
imported from ‘Prelude’ at src/Main.hs:1:1
(and originally defined in ‘GHC.List’)
or ‘Data.Text.drop’,
imported from ‘Data.Text’ at src/Main.hs:1:1-16
|
5 | f str a b = let n = length a in if take n str == a then b ++ f (drop n str) a b else if str == "" then "" else head str : f (tail str) a b
| ^^^^
src/Main.hs:5:112: error:
Ambiguous occurrence ‘head’
It could refer to either ‘Prelude.head’,
imported from ‘Prelude’ at src/Main.hs:1:1
(and originally defined in ‘GHC.List’)
or ‘Data.Text.head’,
imported from ‘Data.Text’ at src/Main.hs:1:1-16
|
5 | f str a b = let n = length a in if take n str == a then b ++ f (drop n str) a b else if str == "" then "" else head str : f (tail str) a b
| ^^^^
src/Main.hs:5:126: error:
Ambiguous occurrence ‘tail’
It could refer to either ‘Prelude.tail’,
imported from ‘Prelude’ at src/Main.hs:1:1
(and originally defined in ‘GHC.List’)
or ‘Data.Text.tail’,
imported from ‘Data.Text’ at src/Main.hs:1:1-16
|
5 | f str a b = let n = length a in if take n str == a then b ++ f (drop n str) a b else if str == "" then "" else head str : f (tail str) a b