length
(Если бы это был массив int[], можно использовать length), для определения размера у List нужно использовать метод size()
. Scanner input = new Scanner(System.in);
ArrayList<Integer> array = new ArrayList<>();
int max = 0;
System.out.println("Введите числа");
for(int number = input.nextInt() ; number != 0; number = input.nextInt()) {
array.add(number);
}
for (int i = 0; i < array.size(); i++) {
if (array.get(i) > max) {
max = array.get(i);
}
}
System.out.println("Это число: "+max);
var prices = new String[] {
"100 ₽",
"$4,99",
"9,99 €",
"100 CA$",
"9,49 USD"
};
//Паттерн
final var pattern = "[\\d\\s.,]+";
var resultSet = Arrays.stream(prices)
.map(price -> price.replaceFirst(pattern, ""))//Вырезаем все совпадения
.collect(Collectors.toSet());//собираем в Set
resultSet.forEach(System.out::println);
sudo apt-get update
sudo cd /opt/scripts/tools/
sudo git pull
sudo ./update_kernel.sh
sudo reboot
JNIEXPORT jint JNICALL Java_BlackLib_BlackSPI__1transfer(JNIEnv *env, jclass obj, jint writeBuffer, jint readBuffer, jint bufferSize, jint wait_us)
{
return spi->transfer((uint8_t*) & writeBuffer, (uint8_t*) & readBuffer, sizeof (readBuffer), 0);
}
\DB::table('tName')->update(['val' => 0]);
\DB::update("UPDATE `{$table}` SET `val` = ? WHERE 1", $params);
if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_assoc($result)) {
$sqlsteamid=$row["steam_id"];
echo $sqlsteamid;
}
}
select `email` from `tName` where 1;
<a href="/public/doc/emails.txt" download>качаем</a>
@include('view.name', ['some' => 'data'])
@foreach($users as $user)
@include("view.user_card", ['user' => $user])
@endforeach
.card {...}
div.card{...}
ul.pagination li a {
color: black;
float: left;
padding: 8px 16px;
text-decoration: none;
}
public class DrawerItemClickListener implements ListView.OnItemClickListener {
FragmentTransaction transaction;
FragmentManager manager;
AbstractionFragment createMenuFragment;
AbstractionFragment watchProgressFragment;
AbstractionFragment settingMenuFragment;
public DrawerItemClickListener(FragmentManager m) {
manager = m;
transaction = manager.beginTransaction();
createMenuFragment = new CreateMenuFragment();
watchProgressFragment = new WatchProgressFragment();
settingMenuFragment = new SettingMenuFragment();
}
...
}
drawerList.setOnItemClickListener(new DrawerItemClickListener(getSupportFragmentManager()));