So I need some coordinates. I you open this page: https://www.inatur.no/jakt/5891ac4ee4b0f06b0de95636/blafjellet-jaktfelt-smaviltjakt-i-lierne there is a map option that shows a polygon over an area.
I want to get those paths as normal lat/long coordinates, but I can't find any solution to this.
In the HTML I find this code:
<path fill="url(#dojoxUnique1)" stroke="rgb(206, 80, 53)" stroke-opacity="1" stroke-width="2.6666666666666665" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" path="M 789,616 789,616 636,580 567,563 510,549 499,547 514,412 522,354 528,309 533,280 541,223 547,180 568,199 584,210 598,213 612,211 620,212 644,218 673,232 707,245 751,232 911,289 957,307 984,340 982,341 985,348 983,353 979,359 973,361 964,369 963,366 960,366 955,363 953,366 957,370 959,381 957,386 961,387 962,389 959,394 961,405 957,405 951,408 949,405 945,404 943,409 945,414 948,417 949,423 948,428 944,431 942,434 946,437 945,450 930,458 928,465 919,472 919,474 913,481 911,482 898,503 891,505 888,508 884,503 876,504 858,514 851,540 847,547 800,571 789,616 Z" d="M 789 616 789 616 636 580 567 563 510 549 499 547 514 412 522 354 528 309 533 280 541 223 547 180 568 199 584 210 598 213 612 211 620 212 644 218 673 232 707 245 751 232 911 289 957 307 984 340 982 341 985 348 983 353 979 359 973 361 964 369 963 366 960 366 955 363 953 366 957 370 959 381 957 386 961 387 962 389 959 394 961 405 957 405 951 408 949 405 945 404 943 409 945 414 948 417 949 423 948 428 944 431 942 434 946 437 945 450 930 458 928 465 919 472 919 474 913 481 911 482 898 503 891 505 888 508 884 503 876 504 858 514 851 540 847 547 800 571 789 616Z" stroke-dasharray="none" dojoGfxStrokeStyle="solid" fill-rule="evenodd"></path>
Does someone know how I can convert these to lat/long coordinates?
Related
I find this interesting documentation, that shows how to make an svg file animated.
https://css-tricks.com/svg-line-animation-works/
However, I am having issue with making my project look like it is being completed when open.
I want my project to animate similar to section 8 of the above doc.. Help please
[newbie]
https://jsfiddle.net/yoavf1bu/17/
.path {
stroke-dasharray: 50;
stroke-dashoffset: 500;
animation: dash 5s linear forwards;
}
#keyframes dash {
to {
stroke-dashoffset: 0;
}
}
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="500pt" height="500pt " viewBox="0 0 200.000000 1000.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,900.000000) scale(0.100000,-0.100000)"
>
<path class="path" stroke="#000000" stroke-width="25"
d="M3150 8544 c-208 -38 -355 -106 -479 -221 -40 -36 -75 -62 -80 -57
-4 5 -20 26 -35 48 -30 40 -93 75 -136 76 -41 0 -122 -44 -161 -86 -207 -230
-226 -724 -37 -939 53 -60 108 -88 175 -88 54 0 83 13 137 62 l29 26 -6 -75
c-20 -233 -161 -474 -261 -444 -37 11 -84 52 -132 117 -149 196 -182 227 -244
227 -61 0 -124 -53 -197 -167 -46 -73 -225 -423 -298 -583 -62 -135 -62 -136
-70 -128 -11 11 -57 268 -70 398 -34 315 -13 540 76 838 12 37 11 44 -1 52
-27 17 -54 -14 -110 -126 -65 -127 -111 -263 -144 -424 -70 -333 -90 -823 -41
-986 22 -76 48 -104 95 -104 48 0 86 30 142 114 23 33 42 62 43 64 1 1 18 -13
38 -33 39 -39 83 -47 110 -17 8 9 39 53 67 96 125 192 279 371 296 345 17 -29
17 -284 -1 -391 -34 -207 -88 -336 -244 -588 -174 -280 -289 -541 -337 -761
-14 -64 -19 -127 -19 -269 0 -171 2 -193 28 -293 54 -206 144 -388 284 -574
60 -81 77 -113 99 -183 57 -189 137 -405 254 -690 210 -508 252 -673 330
-1285 47 -366 77 -486 173 -685 91 -188 157 -268 198 -242 14 9 25 9 39 2 31
-17 50 -12 67 19 15 25 20 27 40 18 18 -8 27 -6 43 8 34 31 33 51 -9 148 -83
194 -90 278 -36 432 37 107 44 169 21 213 -19 37 -39 53 -121 97 -141 76 -140
74 -139 350 1 121 9 303 18 405 9 102 20 222 23 268 l6 82 -27 0 c-15 0 -29
-6 -31 -13 -11 -29 -46 -509 -52 -697 -9 -307 11 -367 145 -434 104 -52 132
-80 132 -127 0 -22 -12 -67 -26 -102 -36 -86 -52 -187 -42 -261 9 -68 41 -171
71 -231 19 -39 19 -40 0 -23 -40 36 -64 19 -56 -38 7 -46 -12 -50 -43 -9 -29
39 -48 44 -63 18 -10 -17 -12 -17 -27 2 -26 34 -132 257 -153 325 -33 99 -59
243 -92 500 -70 554 -120 761 -266 1120 -156 383 -186 459 -244 623 -32 92
-59 170 -59 174 0 3 35 -28 78 -68 265 -253 563 -473 1040 -769 l183 -113 63
-91 c472 -677 602 -958 831 -1791 36 -129 49 -155 79 -155 13 0 29 6 35 14 8
9 24 12 49 9 28 -4 44 0 65 17 15 12 27 28 27 36 0 9 11 14 30 14 17 0 39 9
51 21 27 27 23 73 -20 218 -41 139 -42 214 -1 319 45 118 54 169 40 222 -19
69 -64 105 -157 125 -43 9 -86 19 -96 23 -13 5 -36 51 -68 137 -110 289 -267
511 -462 658 -58 44 -245 163 -399 256 -15 9 -85 97 -155 196 -71 99 -190 266
-264 370 -273 382 -323 468 -322 560 1 64 18 116 141 415 86 210 113 320 113
470 0 152 -36 274 -120 403 -58 88 -118 143 -204 185 l-66 32 -25 82 c-44 144
-49 175 -43 271 14 262 212 597 411 699 60 31 143 35 192 10 103 -53 261 -257
461 -597 66 -111 75 -135 128 -320 68 -238 116 -377 157 -459 158 -315 449
-556 750 -621 75 -16 94 -13 101 17 7 24 -3 35 -151 151 -257 203 -474 482
-774 997 -82 141 -86 150 -141 350 -83 303 -133 452 -191 575 -63 133 -124
210 -197 250 -46 26 -64 30 -124 29 -90 -1 -161 -28 -275 -106 -424 -286 -879
-1098 -977 -1745 -22 -149 -22 -506 0 -663 19 -129 52 -304 63 -335 15 -43
-26 11 -90 118 -164 274 -225 555 -182 846 33 224 147 505 316 781 180 294
209 357 258 550 24 96 27 122 27 300 0 162 -3 201 -17 233 -13 29 -23 37 -43
37 -72 0 -150 -83 -340 -358 -73 -107 -78 -112 -95 -97 -10 9 -23 29 -30 45
-12 30 -7 43 161 395 62 131 189 366 229 426 45 65 103 119 129 119 30 0 67
-36 145 -139 130 -171 200 -222 283 -206 84 15 203 185 246 350 35 134 44 343
16 361 -17 10 -47 -7 -53 -30 -3 -12 -31 -46 -61 -76 -56 -52 -57 -52 -110
-48 -116 10 -196 133 -227 348 -35 249 68 546 214 621 64 33 113 10 166 -79
l19 -33 -38 -77 c-70 -141 -84 -292 -35 -364 18 -28 28 -33 68 -36 40 -3 48 0
71 28 15 17 31 47 37 68 17 61 12 199 -11 292 l-20 85 79 76 c61 59 100 87
173 123 173 85 368 115 529 81 121 -26 135 -25 135 5 0 38 -87 61 -245 65 -69
2 -136 1 -150 -1z m-543 -579 c6 -107 -9 -169 -42 -182 -64 -24 -62 177 2 302
l16 30 9 -25 c6 -14 12 -70 15 -125z m-1392 -987 c0 -195 4 -280 18 -368 21
-135 50 -277 70 -340 14 -44 13 -47 -16 -103 -34 -66 -102 -147 -123 -147 -7
0 -20 12 -28 28 -58 112 -45 624 24 963 17 85 51 219 54 219 1 0 1 -114 1
-252z m1622 -459 c126 -32 232 -221 353 -633 41 -139 46 -176 14 -114 -49 96
-206 311 -289 394 -107 107 -149 129 -248 122 -86 -5 -158 -42 -252 -130 -131
-122 -245 -322 -296 -517 -29 -114 -23 -268 15 -386 32 -101 32 -105 -2 -105
-45 0 -129 -29 -183 -61 -64 -40 -140 -126 -183 -208 -159 -305 -106 -641 119
-752 58 -28 71 -31 137 -27 93 5 169 39 243 109 164 155 176 350 44 728 -22
63 -37 116 -35 119 10 9 78 -42 127 -96 57 -64 120 -186 143 -278 9 -34 16
-103 16 -153 0 -158 -33 -275 -156 -562 -75 -177 -109 -301 -99 -367 13 -89
118 -256 464 -735 94 -131 171 -240 171 -242 0 -14 -465 291 -626 410 -197
145 -321 251 -475 405 l-146 145 -32 135 c-114 491 -115 903 -5 1295 36 129
145 396 225 558 252 502 591 882 844 943 65 16 59 16 112 3z m673 -1379 c204
-338 409 -592 625 -775 44 -38 82 -70 85 -72 3 -3 -9 -1 -25 3 -39 9 -232 107
-269 136 -128 101 -211 189 -281 298 -90 138 -129 233 -211 515 -10 32 8 8 76
-105z m-1290 -132 c92 -242 134 -450 112 -554 -24 -118 -86 -201 -192 -259
-48 -26 -65 -30 -130 -30 -65 1 -81 4 -122 30 -94 59 -151 186 -151 336 1 194
99 404 234 500 42 30 127 58 176 59 l41 0 32 -82z m1067 -2670 c146 -93 230
-157 306 -235 132 -134 244 -317 321 -525 61 -165 61 -165 189 -188 45 -8 79
-21 98 -37 25 -22 29 -31 29 -79 0 -36 -10 -80 -30 -132 -60 -158 -61 -195 -4
-396 19 -66 34 -126 34 -133 0 -19 -14 -16 -35 7 -11 12 -28 20 -39 18 -18 -3
-21 -11 -22 -51 0 -26 -4 -50 -8 -55 -10 -9 -36 27 -36 50 0 10 -7 21 -15 24
-22 9 -45 -14 -45 -44 0 -53 -19 -3 -70 183 -103 379 -211 676 -340 935 -93
188 -159 295 -423 692 -11 16 -16 28 -13 28 3 0 50 -28 103 -62z"/>
</g>
</svg>
There are two reasons in your application that interfere with work:
To animate drawing a line from zero to maximum, the condition must be met:
stroke-dasharray= stroke="dashofffset"
Your values are different
The SVG shape should be drawn with a single contour
You have a double contour:
I drew your shape in a vector editor with a single contour:
We will animate this contour in the same way as indicated in your link.
.path {
fill:none;
stroke:black;
stroke-width:4;
stroke-linecap:round;
stroke-dasharray: 3500;
stroke-dashoffset: 3500;
animation: dash 10s linear forwards infinite;
}
#keyframes dash {
to {
stroke-dashoffset: 0;
}
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="309" height="584 " viewBox="0 0 309 584">
<path class="path" d="M215 31s-13-3-20-3c-7 1-14 2-20 5-5 2-11 6-15 11-4 4-8 9-10 15-2 5-4 11-3 16 0 3 7 7 8 2 2-4 2-10 2-14-1-7-2-13-6-18-2-3-5-6-8-6-6 0-11 6-14 11-3 4-4 10-5 16v22c1 5 3 10 6 14 3 3 7 6 11 6s7-3 9-5 3-8 4-6c2 5 0 11-1 16l-4 14c-2 4-4 8-7 10s-5 4-8 3c-5 0-7-5-10-8l-7-10c-2-2-4-5-7-5-5 1-9 7-11 10l-7 13-11 22-10 21-7 10c-2 1-4 2-6 1s-3-6-3-9l-1-13v-19l3-21 3-17 6-16 5-9-3 16-3 19 1 20a368 368 0 0 0 4 26c1 4 2 9 5 12 1 2 2 5 4 5 3-1 4-5 6-8l5-8 6-7 4-5c2-2 3-4 5-3 3 0 3 5 4 7l-2 13-1 16-4 10-7 14-6 9-4 9-7 12-5 15-3 10-2 15 1 20 5 15 8 16 12 16 15 15 18 14 24 19 28 17 18 10 20 15 14 17 11 21 2 7 5 5h8c3 1 5 3 6 5v8c-2 5-5 9-5 14l2 12 3 11 1 5-3 2c-2 0-3-4-5-3v4l-1 4-4-1c-1-2 1-5-1-5s1 8-2 7c-4-2-6-20-6-20l-6-18-7-18-8-18-7-15-12-16-6-11-5-9-12-18-19-26-14-20-7-12-2-4c-1-8 2-13 4-20l5-10c2-6 6-13 7-19v-18c-1-6-2-12-5-18l-8-10c-5-3-11-6-17-5-6 0-11 3-16 7-5 6-8 14-10 22-1 6-2 13 0 19 1 5 3 10 8 13 6 4 11 4 16 2 6-2 11-6 15-11 2-3 3-8 3-13 0-8-2-15-4-23l-4-12-5-12-2-7a56 56 0 0 1 4-30 68 68 0 0 1 18-24c4-3 7-6 12-7 5 0 9 3 13 6 5 3 9 9 13 15 5 6 8 14 12 20l16 26 15 24a250 250 0 0 0 31 34l8 6 3 2c-4 1-10-1-15-3-6-2-10-6-16-10s-11-9-15-15c-5-5-7-12-10-19-4-8-6-16-8-25l-7-25c-3-12-6-24-11-35-3-6-7-13-11-16-3-2-7-3-10-3-5 0-10 2-15 4l-16 14-13 17-10 18-11 19s-8 17-10 26l-5 25-1 25a253 253 0 0 0 5 35c2 11 5 21 9 32 3 10 12 29 12 29l9 23a361 361 0 0 0 13 62l2 17 3 13 4 12 5 8c2 4 2 13 7 12 2 0-2-5 0-6 2 0 2 5 4 6l2-1c2-2-1-7 2-8 2-1 2 6 5 5 2 0 0-5-1-7l-4-9-1-11 3-12 2-6-2-6-10-5-6-8-1-13 1-16 1-15 2-20" />
</svg>
Do you want something like this:
.path {
stroke-dasharray: 60000;
stroke-dashoffset: 60000;
animation: dash 10s linear forwards infinite;
}
#keyframes dash {
to {
stroke-dashoffset: 0;
}
}
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="500pt" height="500pt " viewBox="0 0 200.000000 1000.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,900.000000) scale(0.100000,-0.100000)"
>
<path class="path" fill="white" stroke="black" stroke-width="25"
d="M3150 8544 c-208 -38 -355 -106 -479 -221 -40 -36 -75 -62 -80 -57
-4 5 -20 26 -35 48 -30 40 -93 75 -136 76 -41 0 -122 -44 -161 -86 -207 -230
-226 -724 -37 -939 53 -60 108 -88 175 -88 54 0 83 13 137 62 l29 26 -6 -75
c-20 -233 -161 -474 -261 -444 -37 11 -84 52 -132 117 -149 196 -182 227 -244
227 -61 0 -124 -53 -197 -167 -46 -73 -225 -423 -298 -583 -62 -135 -62 -136
-70 -128 -11 11 -57 268 -70 398 -34 315 -13 540 76 838 12 37 11 44 -1 52
-27 17 -54 -14 -110 -126 -65 -127 -111 -263 -144 -424 -70 -333 -90 -823 -41
-986 22 -76 48 -104 95 -104 48 0 86 30 142 114 23 33 42 62 43 64 1 1 18 -13
38 -33 39 -39 83 -47 110 -17 8 9 39 53 67 96 125 192 279 371 296 345 17 -29
17 -284 -1 -391 -34 -207 -88 -336 -244 -588 -174 -280 -289 -541 -337 -761
-14 -64 -19 -127 -19 -269 0 -171 2 -193 28 -293 54 -206 144 -388 284 -574
60 -81 77 -113 99 -183 57 -189 137 -405 254 -690 210 -508 252 -673 330
-1285 47 -366 77 -486 173 -685 91 -188 157 -268 198 -242 14 9 25 9 39 2 31
-17 50 -12 67 19 15 25 20 27 40 18 18 -8 27 -6 43 8 34 31 33 51 -9 148 -83
194 -90 278 -36 432 37 107 44 169 21 213 -19 37 -39 53 -121 97 -141 76 -140
74 -139 350 1 121 9 303 18 405 9 102 20 222 23 268 l6 82 -27 0 c-15 0 -29
-6 -31 -13 -11 -29 -46 -509 -52 -697 -9 -307 11 -367 145 -434 104 -52 132
-80 132 -127 0 -22 -12 -67 -26 -102 -36 -86 -52 -187 -42 -261 9 -68 41 -171
71 -231 19 -39 19 -40 0 -23 -40 36 -64 19 -56 -38 7 -46 -12 -50 -43 -9 -29
39 -48 44 -63 18 -10 -17 -12 -17 -27 2 -26 34 -132 257 -153 325 -33 99 -59
243 -92 500 -70 554 -120 761 -266 1120 -156 383 -186 459 -244 623 -32 92
-59 170 -59 174 0 3 35 -28 78 -68 265 -253 563 -473 1040 -769 l183 -113 63
-91 c472 -677 602 -958 831 -1791 36 -129 49 -155 79 -155 13 0 29 6 35 14 8
9 24 12 49 9 28 -4 44 0 65 17 15 12 27 28 27 36 0 9 11 14 30 14 17 0 39 9
51 21 27 27 23 73 -20 218 -41 139 -42 214 -1 319 45 118 54 169 40 222 -19
69 -64 105 -157 125 -43 9 -86 19 -96 23 -13 5 -36 51 -68 137 -110 289 -267
511 -462 658 -58 44 -245 163 -399 256 -15 9 -85 97 -155 196 -71 99 -190 266
-264 370 -273 382 -323 468 -322 560 1 64 18 116 141 415 86 210 113 320 113
470 0 152 -36 274 -120 403 -58 88 -118 143 -204 185 l-66 32 -25 82 c-44 144
-49 175 -43 271 14 262 212 597 411 699 60 31 143 35 192 10 103 -53 261 -257
461 -597 66 -111 75 -135 128 -320 68 -238 116 -377 157 -459 158 -315 449
-556 750 -621 75 -16 94 -13 101 17 7 24 -3 35 -151 151 -257 203 -474 482
-774 997 -82 141 -86 150 -141 350 -83 303 -133 452 -191 575 -63 133 -124
210 -197 250 -46 26 -64 30 -124 29 -90 -1 -161 -28 -275 -106 -424 -286 -879
-1098 -977 -1745 -22 -149 -22 -506 0 -663 19 -129 52 -304 63 -335 15 -43
-26 11 -90 118 -164 274 -225 555 -182 846 33 224 147 505 316 781 180 294
209 357 258 550 24 96 27 122 27 300 0 162 -3 201 -17 233 -13 29 -23 37 -43
37 -72 0 -150 -83 -340 -358 -73 -107 -78 -112 -95 -97 -10 9 -23 29 -30 45
-12 30 -7 43 161 395 62 131 189 366 229 426 45 65 103 119 129 119 30 0 67
-36 145 -139 130 -171 200 -222 283 -206 84 15 203 185 246 350 35 134 44 343
16 361 -17 10 -47 -7 -53 -30 -3 -12 -31 -46 -61 -76 -56 -52 -57 -52 -110
-48 -116 10 -196 133 -227 348 -35 249 68 546 214 621 64 33 113 10 166 -79
l19 -33 -38 -77 c-70 -141 -84 -292 -35 -364 18 -28 28 -33 68 -36 40 -3 48 0
71 28 15 17 31 47 37 68 17 61 12 199 -11 292 l-20 85 79 76 c61 59 100 87
173 123 173 85 368 115 529 81 121 -26 135 -25 135 5 0 38 -87 61 -245 65 -69
2 -136 1 -150 -1z m-543 -579 c6 -107 -9 -169 -42 -182 -64 -24 -62 177 2 302
l16 30 9 -25 c6 -14 12 -70 15 -125z m-1392 -987 c0 -195 4 -280 18 -368 21
-135 50 -277 70 -340 14 -44 13 -47 -16 -103 -34 -66 -102 -147 -123 -147 -7
0 -20 12 -28 28 -58 112 -45 624 24 963 17 85 51 219 54 219 1 0 1 -114 1
-252z m1622 -459 c126 -32 232 -221 353 -633 41 -139 46 -176 14 -114 -49 96
-206 311 -289 394 -107 107 -149 129 -248 122 -86 -5 -158 -42 -252 -130 -131
-122 -245 -322 -296 -517 -29 -114 -23 -268 15 -386 32 -101 32 -105 -2 -105
-45 0 -129 -29 -183 -61 -64 -40 -140 -126 -183 -208 -159 -305 -106 -641 119
-752 58 -28 71 -31 137 -27 93 5 169 39 243 109 164 155 176 350 44 728 -22
63 -37 116 -35 119 10 9 78 -42 127 -96 57 -64 120 -186 143 -278 9 -34 16
-103 16 -153 0 -158 -33 -275 -156 -562 -75 -177 -109 -301 -99 -367 13 -89
118 -256 464 -735 94 -131 171 -240 171 -242 0 -14 -465 291 -626 410 -197
145 -321 251 -475 405 l-146 145 -32 135 c-114 491 -115 903 -5 1295 36 129
145 396 225 558 252 502 591 882 844 943 65 16 59 16 112 3z m673 -1379 c204
-338 409 -592 625 -775 44 -38 82 -70 85 -72 3 -3 -9 -1 -25 3 -39 9 -232 107
-269 136 -128 101 -211 189 -281 298 -90 138 -129 233 -211 515 -10 32 8 8 76
-105z m-1290 -132 c92 -242 134 -450 112 -554 -24 -118 -86 -201 -192 -259
-48 -26 -65 -30 -130 -30 -65 1 -81 4 -122 30 -94 59 -151 186 -151 336 1 194
99 404 234 500 42 30 127 58 176 59 l41 0 32 -82z m1067 -2670 c146 -93 230
-157 306 -235 132 -134 244 -317 321 -525 61 -165 61 -165 189 -188 45 -8 79
-21 98 -37 25 -22 29 -31 29 -79 0 -36 -10 -80 -30 -132 -60 -158 -61 -195 -4
-396 19 -66 34 -126 34 -133 0 -19 -14 -16 -35 7 -11 12 -28 20 -39 18 -18 -3
-21 -11 -22 -51 0 -26 -4 -50 -8 -55 -10 -9 -36 27 -36 50 0 10 -7 21 -15 24
-22 9 -45 -14 -45 -44 0 -53 -19 -3 -70 183 -103 379 -211 676 -340 935 -93
188 -159 295 -423 692 -11 16 -16 28 -13 28 3 0 50 -28 103 -62z"/>
</g>
</svg>
Add fill="white" to the svg for creating blank space, and just set time to 10s so you can change it based on your project
So I am using the following HTML code to display an SVG:-
<a href="<?php the_field('instagram_url', 'options'); ?>" target="_blank">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M1233 5105 c-607 -111 -1081 -572 -1210 -1175 -17 -80 -18 -167 -18
-1370 0 -1195 1 -1291 18 -1368 127 -591 574 -1039 1167 -1168 80 -18 154 -19
1370 -19 1199 0 1291 1 1368 18 590 127 1042 579 1169 1169 17 77 18 169 18
1368 0 1204 -1 1290 -18 1370 -62 289 -201 544 -412 755 -217 217 -463 350
-760 410 l-123 25 -1248 -1 c-986 -1 -1264 -4 -1321 -14z m2670 -417 c316 -87
563 -289 706 -576 49 -96 86 -221 101 -334 8 -57 10 -457 8 -1273 l-3 -1190
-27 -98 c-31 -112 -97 -257 -158 -346 -55 -83 -158 -190 -239 -252 -91 -69
-266 -153 -386 -186 l-100 -28 -1245 0 -1245 0 -98 27 c-316 87 -563 289 -706
576 -47 93 -85 218 -100 326 -15 107 -15 2345 0 2452 67 486 452 864 944 927
17 3 575 4 1240 3 l1210 -1 98 -27z"/>
<path d="M4078 4331 c-67 -22 -120 -79 -139 -153 -38 -140 107 -277 249 -237
95 26 163 132 147 228 -8 50 -51 111 -98 140 -40 24 -118 35 -159 22z"/>
<path d="M2325 3924 c-501 -87 -919 -451 -1080 -937 -46 -140 -65 -265 -65
-427 0 -162 19 -287 65 -427 162 -488 583 -851 1089 -938 115 -19 337 -19 452
0 580 100 1039 559 1139 1139 20 116 19 336 -1 457 -70 419 -351 802 -732 997
-122 63 -275 115 -401 136 -117 20 -355 20 -466 0z m390 -399 c363 -59 654
-304 772 -650 122 -359 22 -765 -253 -1026 -335 -316 -843 -356 -1229 -96
-302 204 -465 576 -414 943 75 543 583 917 1124 829z"/>
</g>
</svg>
</a>
This is so I can use fill: #<hex>; to set the colour on hover states... Instead of image replacement.
This works fine in Mac Safari, Windows Safari, it just doesn't even display in Mac Safari, using fill: #FFF; I'm assuming is not working to change the SVG colour from black to white.
I created a JSFIDDLE which works as it's supposed to, but on the live site it doesn't display anything, it used to work fine so I'm not sure what's happened here...
When I inspect where the SVG should show, it just doesn't show any HTML code for the SVG icon above.
It's only in Mac Chrome, latest version...
Any ideas?
If you need any more information, just let me know.
Thanks,
I have a tls file such as:
1224 926 1380 688 845 109 118 88 1275 1306 91 796 102 1361 27 995
1928 2097 138 1824 198 117 1532 2000 1478 539 1982 125 1856 139 475 1338
848 202 1116 791 1114 236 183 186 150 1016 1258 84 952 1202 988 866
946 155 210 980 896 875 925 613 209 746 147 170 577 942 475 850
1500 322 43 95 74 210 1817 1631 1762 128 181 716 171 1740 145 1123
3074 827 117 2509 161 206 2739 253 2884 248 3307 2760 2239 1676 1137 3055
183 85 143 197 243 72 291 279 99 189 30 101 211 209 77 198
175 149 259 372 140 250 168 142 146 284 273 74 162 112 78 29
169 578 97 589 473 317 123 102 445 217 144 398 510 464 247 109
3291 216 185 1214 167 495 1859 194 1030 3456 2021 1622 3511 222 3534 1580
2066 2418 2324 93 1073 82 102 538 1552 962 91 836 1628 2154 2144 1378
149 963 1242 849 726 1158 164 1134 658 161 1148 336 826 1303 811 178
3421 1404 2360 2643 3186 3352 1112 171 168 177 146 1945 319 185 2927 2289
543 462 111 459 107 353 2006 116 2528 56 2436 1539 1770 125 2697 2432
1356 208 5013 4231 193 169 3152 2543 4430 4070 4031 145 4433 4187 4394 1754
5278 113 4427 569 5167 175 192 3903 155 1051 4121 5140 2328 203 5653 3233
how can I read it in a list of list of int in haskell?
I have tried few options but I could not manage to do it. I am very new to haskell so please be patience.
First break your input into lines using lines:
let test = "1 2 3 4\n 5 6 7 \n 4 2 5"
let rows = lines test --literally "lines test"! Beautiful, eh?
Result:
["1 2 3 4"," 5 6 7 "," 4 2 5"] :: [[Char]]
Then, extract individual numbers as strings using words:
let nums_as_strings = map words rows
Result:
[["1","2","3","4"],["5","6","7"],["4","2","5"]] :: :: [[[Char]]]
The last thing to do is convert these strings to integers with read:
let numbers = map (map read) nums_as_strings :: [[Int]]
Result:
[[1,2,3,4],[5,6,7],[4,2,5]] :: [[Int]]
Or, squashed into one line:
let numbers = map (map read) (map words $ lines test) :: [[Int]]
Example with your data:
Prelude> let test = "1224 926 1380 688 845 109 118 88 1275 1306 91 796 102 1361 27 995\n1928 2097 138 1824 198 117 1532 2000 1478 539 1982 125 1856 139 475 1338"
Prelude> map (map read) (map words $ lines test) :: [[Int]]
[[1224,926,1380,688,845,109,118,88,1275,1306,91,796,102,1361,27,995],[1928,2097,138,1824,198,117,1532,2000,1478,539,1982,125,1856,139,475,1338]]
You may need to take care of empty lines, but that's really simple.
import System.IO
readListOfLists :: Handle -> IO [[Int]]
readListOfLists handle = do
contents <- hGetContents handle
let ls :: [String]
ls = lines contents
ws :: [[String]]
ws= map words ls
res :: [[Int]]
res = map (map read) ws
return res;
or you can write the same code in one line:
readListOfLists :: Handle -> IO [[Int]]
readListOfLists = fmap (map (map read . words) . lines) . hGetContents
To use it:
do
handle <- openFile fileName ReadMode
table <- readListOfLists handle
hClose handle
print table
I'm trying to run the below script to get a list of Orgs and the amount of users each Org has:
#!/bin/bash
array=(293 182 177 12 85 51 325 225 40 169 357 329 243 349 291 295 22 279 16 69 219 299 301 331 91 281 285 59 283 341 45 289 95 61 77 13 14 201 43 343 223 28 171 26 233 47 303 367 369 339 257 305 353 245 213 87 345 2 71 199 24 179 259 37 35 237)
for i in "${array[#]}"; do
query=$(export MYSQL_PWD=MYPASS; mysql -e "SELECT COUNT(*) FROM Org.Users WHERE HomeOrgID=$i;")
echo "Org_$i:$query"
done
I expect the result to be a simple "Org:Number" list:
Org_1:150
Org_25:250
Org_17:64
Org_64:12
But the output is not displayed correctly. It does show part of the MySQL statement:
Org_293:COUNT(*)
1
Org_182:COUNT(*)
0
Org_177:COUNT(*)
8
Org_12:COUNT(*)
0
Org_85:COUNT(*)
1
How can I get the output to NOT display that "COUNT(*)" and display just a simple list?
Thanks in advance!
One quick hack : use bash arrays to store your output.
#!/bin/bash
array=(293 182 177 12 85 51 325 225 40 169 357 329 243 349 291 295 22 279 16 69 219 299 301 331 91 281 285 59 283 341 45 289 95 61 77 13 14 201 43 343 223 28 171 26 233 47 303 367 369 339 257 305 353 245 213 87 345 2 71 199 24 179 259 37 35 237)
for i in "${array[#]}"; do
# we store the result of the request as an array
query=($(export MYSQL_PWD=MYPASS; mysql -e "SELECT COUNT(*) FROM Org.Users WHERE HomeOrgID=$i;"))
# we echo the 2nd member of the array. ${query[0]} should contain 'count(*)'
echo "Org_$i:${query[1]}"
done
I'm a complete novice when it comes to SQL, just getting started.
I need help writing a query to update values in my SQL table:
Two tables: Members, Chapters
Concerned with three columns in Chapters table: CHAP_NO, FA, FA2
i.e.
CHAP_NO FA FA2
111 1234567 2345689
222 2234567 4567899
333 3225545
444
555 2358878 4566665
666 4568799
777 4566878 1233666
888 1119998
999 3555879 6544799
etc. . .
Each value is a unique identifier
Concerned with two columns in Members table: MEMB_NO, CURR_CHAP
i.e.
MEMB_NO CURR_CHAP
1234567 665
5468787 664
4577789 122
4578767 233
7775666 588
4114748 787
etc. . .
Is it possible to automate an update based on if FA or FA2 is in Chapters table, update their CURR_CHAP value in the Members table from the CHAP_NO value?
From the above example data, I need MEMB_NO '1234567' to have his CURR_CHAP updated to '111' because he is listed as FA for CHAP_NO '111'
I really need to do this for similar MS SQL and MySQL databases if possible. If this can't be automated, I need help writing a query to manually update the Members table as exampled above with a 2 column manual update row of data:
MEMB_NO CURR_CHAP
5470011 547
5030038 545
3880188 544
1140753 543
4130019 543
5420011 542
5410010 541
2590511 540
4190109 540
4180296 539
5380020 538
5370012 537
1050859 536
4390125 535
4860144 535
5330009 533
5330061 533
1080746 532
2060321 531
1750750 529
4250135 528
8070013 528
1080645 527
5270053 527
2580695 526
2440073 525
2440163 525
5240010 524
4980035 523
2120380 522
4000418 521
3270185 520
4350210 519
4610218 518
5160004 516
1610450 515
5150065 515
5130046 513
5130050 513
5120047 512
1940306 510
2500170 510
5090087 509
5080014 508
1270803 505
1381026 505
2260505 504
3900106 504
5030006 503
1770526 501
1780355 501
5000017 500
4980037 498
2380411 497
4970019 497
4960044 496
4960127 496
4950012 495
4950095 495
1720409 494
2260867 494
2300466 493
3990055 492
4920204 492
1311252 491
2100252 491
1750592 490
1760563 490
2520403 489
4890051 489
4870076 487
4870143 487
4860153 486
1670856 485
4840054 484
4840143 484
2920024 483
4830136 483
1751087 482
1790828 481
1970128 481
2050815 480
4800027 480
1870246 478
3210174 478
4770100 477
4760124 476
4760126 476
1350640 475
2280722 475
2200077 474
3410230 474
4730100 473
4250159 470
4250156 470
3790179 464
4630164 463
4630139 463
2210062 461
4610188 461
4210110 460
4870065 459
4500246 450
1110937 449
1110934 449
2280501 447
4450323 445
4440114 444
4410135 441
4410216 441
1600799 435
2280449 435
4080089 431
4310132 431
1780525 427
4270190 427
4260502 426
4260550 426
4250467 425
4250485 425
4210328 421
4190230 419
4180005 418
4180341 418
4250232 417
4130004 413
4110444 411
4090133 409
4080308 408
4430119 408
4070279 407
4070443 407
1650354 405
1670725 404
2240204 402
2870319 400
3990114 399
3980014 398
4050073 398
3170399 397
3970348 397
1760487 395
4180191 395
1800443 394
2580288 394
1280499 393
3930227 393
3780058 391
3900377 390
2590362 389
1720492 385
1720398 384
2840325 383
3710142 381
3800235 380
3780407 378
1760459 375
1730026 373
3710306 371
3710228 371
1051294 370
3700332 370
3670174 367
1780583 359
4640038 359
1280614 358
2580373 358
3570449 357
3530560 353
3500046 350
3490275 349
3490244 349
3320203 348
3480310 348
4210188 346
3440364 344
4490223 344
1750642 342
3990257 342
1790541 341
3370562 337
3370738 337
1870336 334
3340382 334
1950674 333
1460619 328
3280586 328
4250013 326
1340705 324
2590495 324
2870029 322
3030290 322
1880232 321
2280415 321
3200547 320
3200568 320
3180132 318
3180178 318
3930433 317
4850072 317
2870449 315
3150168 315
1390763 313
3120170 312
3110048 311
3110110 311
3070267 307
3500231 306
3980122 306
1160708 305
3050510 305
2280197 304
3040348 304
1060785 303
1340760 303
3020534 302
3980151 301
2990239 299
1770425 297
2950573 295
2280513 294
2320434 287
2870594 287
4110133 284
4260131 278
2770221 277
2770366 277
2760484 276
2750397 275
2580694 272
1751006 267
4010252 267
2660235 266
2780335 265
2640326 264
3840125 263
1270872 259
2590690 259
2580728 258
2030556 257
4600151 257
2550390 255
4440010 255
2520461 252
4130095 252
3910117 250
2490314 249
1361032 247
1900370 247
2440211 244
2440101 244
1730150 243
1440258 242
2420062 242
1350511 238
2380559 238
1800598 237
2350417 235
2340372 234
2320453 232
2590582 232
2120104 230
2280696 228
3480122 227
1111011 226
2260626 226
3230234 222
2270200 221
4470101 221
3010326 219
2180334 218
2170591 217
1620648 213
2120524 212
3010424 212
3130060 210
2070261 207
2070313 207
1640858 206
1620684 205
2030573 203
2030810 203
1270589 201
1111015 200
1990448 199
1950384 195
1920328 192
1920684 192
1750798 188
1880607 188
1870445 187
1850587 185
2960295 185
1800721 180
1791166 179
3990116 178
3130119 177
4170034 177
1051172 176
1380942 176
1751011 175
4500021 175
2840346 174
3460307 174
1730027 173
4070275 173
1110986 171
1670586 167
1111222 166
2060385 164
1560459 163
1740135 162
3130093 161
1600695 160
1600682 160
1350600 159
1590341 159
1580464 158
1570742 157
1570761 157
4440077 156
1520404 152
4700010 152
3390033 147
4170240 145
4730144 143
4250191 142
1400502 140
2170212 140
1360713 139
3040299 139
1800519 136
1270930 135
1720638 134
1800462 133
3930387 133
1111000 131
1311274 131
1360547 128
2260776 128
4830091 127
1800431 123
1280523 122
1750851 122
1291052 121
3850165 121
1180219 118
1180477 118
2240110 116
2870263 116
3900143 114
1111488 111
1490386 111
1060765 110
1780463 110
3200394 108
5050015 108
3870219 105
I think this should work on both...
UPDATE
IGNORE Chapters,
Members
SET Members.CURR_CHAP = Chapters.CHAP_NO
WHERE Chapters.FA = Members.MEMB_NO
AND Chapters.FA != ''
AND Chapters.FA2 != ''
UPDATE members m
INNER JOIN chapters c on (m.memb_no = c.fa or m.memb_no=c.fa2)
SET m.curr_chap=c.chap_no
This query worked for me in MySql
update Members m
INNER JOIN chapters c
ON (m.memb_no=c.FA or m.memb_no=c.FA2)
set CURR_CHAP = c.CHAP_NO