You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'
.
Consider something like:
import javafx.application.Application; | |
import javafx.collections.*; | |
import javafx.geometry.*; | |
import javafx.scene.Scene; | |
import javafx.scene.control.*; | |
import javafx.scene.image.*; | |
import javafx.scene.input.*; | |
import javafx.scene.layout.VBox; | |
import javafx.stage.Stage; |
#!/usr/bin/env python | |
# encoding: utf-8 | |
import lxml.etree | |
import lxml.html | |
import requests | |
xml_sample = """<?xml version="1.0" encoding="UTF-8"?> | |
<foo:Results xmlns:foo="http://www.foo.com" xmlns="http://www.bah.com"> | |
<foo:Recordset setCount="2"> |
# 3 ways to loop through each character in a string | |
$text = "hello world"; | |
for $i (0..length($text)-1){ | |
$char = substr($text, $i, 1); | |
print "Index: $i, Text: $char \n"; | |
} | |
foreach $char (split //, $text) { |
server { | |
listen 443 ssl deferred; | |
server_name example.com; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 24h; | |
ssl_buffer_size 4k; | |
ssl_session_tickets off; | |
ssl_protocols TLSv1.2; |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
While working on a Hacker Rank Problem I wrote few one lines using java stream to find mean, median, mode, Q1, Q3, variance and standard deviation. Thought to share since it's quite interesting.
// mean
double mean = list.stream().mapToInt(Integer::intValue).average().getAsDouble();
System.out.println(mean);
// mode - create count map using group by and sorted with custom comparator to give minimum from competing probable mode values
Integer mode = list.stream()
.collect(Collectors.groupingBy(i -> i, () -> new TreeMap<Integer, Long>(), Collectors.counting()))
<?xml version="1.0" encoding="UTF-8"?> | |
<migrationMap> | |
<name value="1.13.2 to 1.14" /> | |
<description value="1.13.2 to 1.14 MCP changes" /> | |
<entry oldName="net.minecraft.GameVersion" newName="net.minecraft.util.MinecraftVersion" type="class" /> | |
<entry oldName="net.minecraft.advancements.AdvancementList.Listener" newName="net.minecraft.advancements.AdvancementList.IListener" type="class" /> | |
<entry oldName="net.minecraft.advancements.RequirementsStrategy" newName="net.minecraft.advancements.IRequirementsStrategy" type="class" /> | |
<entry oldName="net.minecraft.advancements.criterion.AbstractCriterionInstance" newName="net.minecraft.advancements.criterion.CriterionInstance" type="class" /> | |
<entry oldName="net.minecraft.block.Block.EnumOffsetType" newName="net.minecraft.block.Block.OffsetType" type="class" /> | |
<entry oldName="net.minecraft.block.BlockAbstractBanner" newName="net.minecraft.block.AbstractBannerBlock" type="class" /> |