- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试为多个地点的观测数据和建模数据创建一个显示每月土壤水分垂直剖面的图。
到目前为止,我只能绘制一组值,观察值或建模值,如下例所示:
library(ggplot2)
library(RColorBrewer)
# Create customized color palette
mypal <- colorRampPalette(brewer.pal(6,"PuBu"))
ggplot(df1, aes(x=value, y=depth, colour=as.factor(month))) +
geom_path() +
facet_wrap(~ site) +
scale_y_reverse() +
scale_colour_manual(values=mypal(12)) +
theme_bw(base_size=18) +
ylab("Depth") + xlab(bquote('Soil moisture (' ~m^3~m^-3*')')) +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
df1 <- structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L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, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L,
9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L,
12L, 12L), .Label = c("IL_Shabbona_5_NNE", "ME_Limestone_4_NNW",
"ME_Old_Town_2_W", "MI_Chatham_1_SE", "MI_Gaylord_9_SSW", "MN_Goodridge_12_NNW",
"MN_Sandstone_6_W", "NH_Durham_2_N", "NH_Durham_2_SSW", "NY_Ithaca_13_E",
"NY_Millbrook_3_W", "WI_Necedah_5_WNW"), class = "factor"), month = c(1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L,
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L,
8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L,
11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L,
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L,
4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L,
7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1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L, 10L, 11L,
12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L,
6L, 7L, 8L, 9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L,
9L, 10L, 11L, 12L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L,
12L), depth = c(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 50, 50,
50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50,
50, 50, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, 50,
50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100,
100, 100, 100, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 100, 100,
100, 100, 100, 100, 100, 100, 100, 100, 100, 100), clm = c(0.324,
0.321, 0.334, 0.33, 0.285, 0.277, 0.264, 0.261, 0.261, 0.273,
0.303, 0.339, 0.348, 0.349, 0.356, 0.333, 0.289, 0.281, 0.269,
0.267, 0.266, 0.277, 0.303, 0.352, 0.345, 0.349, 0.355, 0.337,
0.295, 0.288, 0.277, 0.275, 0.274, 0.284, 0.299, 0.344, 0.299,
0.306, 0.314, 0.331, 0.312, 0.305, 0.295, 0.293, 0.292, 0.3,
0.299, 0.295, 0.274, 0.278, 0.284, 0.308, 0.302, 0.298, 0.289,
0.287, 0.286, 0.292, 0.291, 0.281, 0.477, 0.475, 0.475, 0.518,
0.379, 0.353, 0.352, 0.341, 0.347, 0.373, 0.46, 0.499, 0.399,
0.401, 0.399, 0.435, 0.346, 0.326, 0.325, 0.316, 0.32, 0.339,
0.37, 0.409, 0.339, 0.34, 0.337, 0.362, 0.313, 0.294, 0.293,
0.286, 0.289, 0.306, 0.317, 0.345, 0.256, 0.259, 0.26, 0.274,
0.281, 0.262, 0.26, 0.254, 0.255, 0.271, 0.263, 0.256, 0.243,
0.242, 0.242, 0.252, 0.281, 0.267, 0.266, 0.261, 0.26, 0.274,
0.27, 0.25, 0.497, 0.467, 0.461, 0.434, 0.377, 0.361, 0.341,
0.314, 0.334, 0.372, 0.394, 0.514, 0.363, 0.35, 0.344, 0.366,
0.34, 0.327, 0.311, 0.289, 0.304, 0.336, 0.344, 0.367, 0.308,
0.294, 0.286, 0.318, 0.304, 0.293, 0.279, 0.26, 0.272, 0.3, 0.309,
0.308, 0.232, 0.228, 0.237, 0.281, 0.271, 0.263, 0.25, 0.235,
0.239, 0.265, 0.277, 0.25, 0.235, 0.233, 0.24, 0.28, 0.273, 0.265,
0.254, 0.242, 0.241, 0.264, 0.277, 0.258, 0.448, 0.446, 0.454,
0.49, 0.341, 0.31, 0.297, 0.298, 0.325, 0.359, 0.427, 0.478,
0.351, 0.352, 0.359, 0.403, 0.312, 0.287, 0.276, 0.276, 0.298,
0.325, 0.333, 0.355, 0.305, 0.309, 0.312, 0.338, 0.281, 0.26,
0.25, 0.249, 0.266, 0.29, 0.288, 0.3, 0.233, 0.233, 0.237, 0.265,
0.256, 0.238, 0.229, 0.227, 0.236, 0.256, 0.252, 0.239, 0.231,
0.229, 0.228, 0.253, 0.262, 0.247, 0.237, 0.235, 0.24, 0.255,
0.257, 0.24, 0.326, 0.323, 0.341, 0.343, 0.268, 0.236, 0.209,
0.213, 0.228, 0.27, 0.301, 0.34, 0.311, 0.31, 0.321, 0.322, 0.254,
0.228, 0.206, 0.208, 0.22, 0.254, 0.278, 0.317, 0.285, 0.285,
0.295, 0.302, 0.243, 0.22, 0.2, 0.2, 0.211, 0.241, 0.253, 0.283,
0.218, 0.22, 0.222, 0.259, 0.236, 0.215, 0.197, 0.193, 0.198,
0.225, 0.232, 0.22, 0.19, 0.188, 0.187, 0.214, 0.225, 0.205,
0.189, 0.182, 0.183, 0.201, 0.213, 0.2, 0.437, 0.435, 0.437,
0.456, 0.391, 0.367, 0.358, 0.339, 0.347, 0.374, 0.468, 0.468,
0.402, 0.401, 0.406, 0.442, 0.39, 0.369, 0.362, 0.345, 0.351,
0.364, 0.41, 0.425, 0.386, 0.386, 0.389, 0.415, 0.375, 0.355,
0.349, 0.336, 0.34, 0.349, 0.377, 0.401, 0.318, 0.319, 0.32,
0.343, 0.341, 0.32, 0.316, 0.307, 0.307, 0.313, 0.31, 0.321,
0.302, 0.308, 0.312, 0.323, 0.335, 0.313, 0.309, 0.304, 0.303,
0.307, 0.303, 0.299, 0.39, 0.387, 0.391, 0.405, 0.347, 0.335,
0.328, 0.317, 0.327, 0.339, 0.387, 0.411, 0.387, 0.386, 0.39,
0.392, 0.336, 0.325, 0.319, 0.31, 0.318, 0.326, 0.367, 0.399,
0.367, 0.368, 0.373, 0.38, 0.332, 0.322, 0.317, 0.308, 0.315,
0.321, 0.342, 0.374, 0.299, 0.302, 0.305, 0.337, 0.318, 0.307,
0.304, 0.297, 0.3, 0.306, 0.298, 0.3, 0.265, 0.27, 0.274, 0.293,
0.293, 0.281, 0.28, 0.275, 0.276, 0.281, 0.275, 0.265, 0.588,
0.591, 0.555, 0.362, 0.367, 0.355, 0.317, 0.228, 0.161, 0.28,
0.381, 0.412, 0.38, 0.389, 0.399, 0.301, 0.304, 0.294, 0.265,
0.199, 0.149, 0.234, 0.315, 0.303, 0.302, 0.296, 0.323, 0.277,
0.279, 0.27, 0.245, 0.19, 0.148, 0.211, 0.288, 0.262, 0.173,
0.168, 0.188, 0.202, 0.196, 0.184, 0.171, 0.134, 0.113, 0.116,
0.192, 0.184, 0.151, 0.136, 0.142, 0.18, 0.176, 0.164, 0.155,
0.131, 0.119, 0.115, 0.165, 0.166, 0.588, 0.591, 0.555, 0.362,
0.367, 0.355, 0.317, 0.228, 0.161, 0.28, 0.381, 0.412, 0.38,
0.389, 0.399, 0.301, 0.304, 0.294, 0.265, 0.199, 0.149, 0.234,
0.315, 0.303, 0.302, 0.296, 0.323, 0.277, 0.279, 0.27, 0.245,
0.19, 0.148, 0.211, 0.288, 0.262, 0.173, 0.168, 0.188, 0.202,
0.196, 0.184, 0.171, 0.134, 0.113, 0.116, 0.192, 0.184, 0.151,
0.136, 0.142, 0.18, 0.176, 0.164, 0.155, 0.131, 0.119, 0.115,
0.165, 0.166, 0.472, 0.46, 0.457, 0.442, 0.387, 0.382, 0.371,
0.37, 0.377, 0.394, 0.432, 0.497, 0.452, 0.45, 0.45, 0.416, 0.367,
0.362, 0.353, 0.352, 0.358, 0.372, 0.39, 0.453, 0.414, 0.418,
0.42, 0.4, 0.354, 0.35, 0.342, 0.34, 0.346, 0.359, 0.363, 0.408,
0.331, 0.341, 0.345, 0.362, 0.336, 0.332, 0.325, 0.322, 0.327,
0.341, 0.337, 0.327, 0.296, 0.301, 0.306, 0.329, 0.326, 0.321,
0.314, 0.311, 0.314, 0.328, 0.327, 0.309, 0.451, 0.44, 0.458,
0.441, 0.344, 0.315, 0.303, 0.314, 0.324, 0.349, 0.396, 0.47,
0.334, 0.327, 0.349, 0.372, 0.302, 0.279, 0.269, 0.278, 0.285,
0.305, 0.31, 0.34, 0.287, 0.284, 0.293, 0.33, 0.279, 0.259, 0.248,
0.256, 0.263, 0.281, 0.281, 0.288, 0.181, 0.182, 0.181, 0.226,
0.212, 0.194, 0.184, 0.185, 0.192, 0.208, 0.209, 0.188, 0.174,
0.175, 0.177, 0.208, 0.209, 0.193, 0.185, 0.184, 0.189, 0.201,
0.203, 0.186, 0.365, 0.364, 0.367, 0.372, 0.309, 0.303, 0.288,
0.292, 0.299, 0.308, 0.351, 0.382, 0.371, 0.372, 0.379, 0.376,
0.311, 0.305, 0.291, 0.295, 0.301, 0.309, 0.343, 0.383, 0.365,
0.366, 0.372, 0.376, 0.318, 0.313, 0.3, 0.303, 0.309, 0.316,
0.33, 0.371, 0.33, 0.338, 0.342, 0.359, 0.33, 0.325, 0.313, 0.315,
0.32, 0.327, 0.317, 0.324, 0.291, 0.296, 0.3, 0.319, 0.317, 0.312,
0.303, 0.304, 0.307, 0.314, 0.304, 0.293)), row.names = c(NA,
-720L), class = "data.frame", .Names = c("site", "month", "depth",
"value"))
# Create some random data based on the first dataset
df1 <- cbind(df1, type='observed')
df2 <- df1[1:4]
df2$value <- df2$value * 1.5
df2 <- cbind(df2, type='modeled')
df3 <- rbind(df1,df2)
# Try to plot it
ggplot(df3, aes(x=value, y=depth, group=type, colour=as.factor(month))) +
geom_path() +
facet_wrap(~ site) +
scale_y_reverse() +
theme_bw(base_size=18) +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
最佳答案
您可以使用 interaction
合并 type
和 month
:color = interaction(as.factor(month), type))
.
而不是:group=type, colour=as.factor(month)
.
并创建红色和蓝色托盘使用两个 mypal
职能:
mypal <- colorRampPalette(brewer.pal(6, "PuBu"))
mypal2 <- colorRampPalette(brewer.pal(6, "YlOrRd"))
library(ggplot2)
library(RColorBrewer)
mypal <- colorRampPalette(brewer.pal(6, "PuBu"))
mypal2 <- colorRampPalette(brewer.pal(6, "YlOrRd"))
ggplot(df3,
aes(value, depth, color = interaction(as.factor(month), type))) +
geom_path() +
facet_wrap(~ site) +
labs(title = "Soil moisture by depth and site",
subtitle = "Observed and expected data",
x = bquote('Soil moisture (' ~m^3~m^-3*')'),
y = "Depth") +
scale_y_reverse() +
scale_colour_manual(values = c(mypal(12), mypal2(12))) +
theme_classic() +
theme(legend.position = "none")
关于r - ggplot2 中两个不同组的不同调色板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47901720/
我需要将文本放在 中在一个 Div 中,在另一个 Div 中,在另一个 Div 中。所以这是它的样子: #document Change PIN
奇怪的事情发生了。 我有一个基本的 html 代码。 html,头部, body 。(因为我收到了一些反对票,这里是完整的代码) 这是我的CSS: html { backgroun
我正在尝试将 Assets 中的一组图像加载到 UICollectionview 中存在的 ImageView 中,但每当我运行应用程序时它都会显示错误。而且也没有显示图像。 我在ViewDidLoa
我需要根据带参数的 perl 脚本的输出更改一些环境变量。在 tcsh 中,我可以使用别名命令来评估 perl 脚本的输出。 tcsh: alias setsdk 'eval `/localhome/
我使用 Windows 身份验证创建了一个新的 Blazor(服务器端)应用程序,并使用 IIS Express 运行它。它将显示一条消息“Hello Domain\User!”来自右上方的以下 Ra
这是我的方法 void login(Event event);我想知道 Kotlin 中应该如何 最佳答案 在 Kotlin 中通配符运算符是 * 。它指示编译器它是未知的,但一旦知道,就不会有其他类
看下面的代码 for story in book if story.title.length < 140 - var story
我正在尝试用 C 语言学习字符串处理。我写了一个程序,它存储了一些音乐轨道,并帮助用户检查他/她想到的歌曲是否存在于存储的轨道中。这是通过要求用户输入一串字符来完成的。然后程序使用 strstr()
我正在学习 sscanf 并遇到如下格式字符串: sscanf("%[^:]:%[^*=]%*[*=]%n",a,b,&c); 我理解 %[^:] 部分意味着扫描直到遇到 ':' 并将其分配给 a。:
def char_check(x,y): if (str(x) in y or x.find(y) > -1) or (str(y) in x or y.find(x) > -1):
我有一种情况,我想将文本文件中的现有行包含到一个新 block 中。 line 1 line 2 line in block line 3 line 4 应该变成 line 1 line 2 line
我有一个新项目,我正在尝试设置 Django 调试工具栏。首先,我尝试了快速设置,它只涉及将 'debug_toolbar' 添加到我的已安装应用程序列表中。有了这个,当我转到我的根 URL 时,调试
在 Matlab 中,如果我有一个函数 f,例如签名是 f(a,b,c),我可以创建一个只有一个变量 b 的函数,它将使用固定的 a=a1 和 c=c1 调用 f: g = @(b) f(a1, b,
我不明白为什么 ForEach 中的元素之间有多余的垂直间距在 VStack 里面在 ScrollView 里面使用 GeometryReader 时渲染自定义水平分隔线。 Scrol
我想知道,是否有关于何时使用 session 和 cookie 的指南或最佳实践? 什么应该和什么不应该存储在其中?谢谢! 最佳答案 这些文档很好地了解了 session cookie 的安全问题以及
我在 scipy/numpy 中有一个 Nx3 矩阵,我想用它制作一个 3 维条形图,其中 X 轴和 Y 轴由矩阵的第一列和第二列的值、高度确定每个条形的 是矩阵中的第三列,条形的数量由 N 确定。
假设我用两种不同的方式初始化信号量 sem_init(&randomsem,0,1) sem_init(&randomsem,0,0) 现在, sem_wait(&randomsem) 在这两种情况下
我怀疑该值如何存储在“WORD”中,因为 PStr 包含实际输出。? 既然Pstr中存储的是小写到大写的字母,那么在printf中如何将其给出为“WORD”。有人可以吗?解释一下? #include
我有一个 3x3 数组: var my_array = [[0,1,2], [3,4,5], [6,7,8]]; 并想获得它的第一个 2
我意识到您可以使用如下方式轻松检查焦点: var hasFocus = true; $(window).blur(function(){ hasFocus = false; }); $(win
我是一名优秀的程序员,十分优秀!