tag:blogger.com,1999:blog-34104415038820945122024-03-29T03:29:33.951+00:00Hungry developer - .NET, C#, ASP.NET MVCBlog about Asp.Met MVC, Unity 3d, Visual studio, Unreal Development Kit, Blender, Android. C#, Razor, 3d models.Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.comBlogger127125tag:blogger.com,1999:blog-3410441503882094512.post-83947444676630567612023-07-24T16:22:00.006+01:002023-11-06T14:27:59.238+00:00Using python and yahoo finance to calculate price changes in Nasdaq in the last 33 years<p>As every trader on the planet knows that markets are moving up more often than down, I wanted to get more precise info. I wrote simple python script that consumes closing price of each month since 1990 July till 2023 July. </p><p>Simple summary for Nasdaq index (Us100) </p><p>In total 392 months we had 83 months that generated negative return if position was held for a 12 months and 297 positive return for the same hold position time.</p><p>% ratio of long positions 78.15789473684211</p><p>% ratio of short positions 21.842105263157897</p><p><br /></p><p>Here is a python code if you want to play around and change some parameters etc.</p><p><br /></p><p>For full python code visit - https://www.mycompiler.io/view/6DTBdux1AIx</p><p><br /></p><p>Results</p><p><br /></p><pre class="terminal" id="output-terminal" style="-webkit-font-smoothing: auto; background-color: whitesmoke; border-radius: 4px; box-sizing: inherit; color: #242424; flex: 1 1 0%; font-family: "Fira Mono", monospace; font-size: 14px; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow-x: auto; padding: 0.8rem; word-break: break-word;"><pre class="terminal" id="output-terminal" style="-webkit-font-smoothing: auto; border-radius: 4px; box-sizing: inherit; flex: 1 1 0%; font-family: "Fira Mono", monospace; margin-bottom: 0px; margin-top: 0px; overflow-wrap: normal; overflow-x: auto; padding: 0.8rem; word-break: break-word;">Total months 392
586.340027 position entry 12
+ % change 36.24859794878033
620.210022 position entry 13
+ % change 33.21616915116537
633.469971 position entry 14
+ % change 28.47332521781052
603.77002 position entry 15
+ % change 20.118592837716594
578.679993 position entry 16
+ % change 16.23695187955115
585.309998 position entry 17
+ % change 13.531293377975063
563.599976 position entry 18
+ % change 15.55712681577545
580.830017 position entry 19
+ % change 13.56507165503466
563.119995 position entry 20
+ % change 6.6486721005174125
583.27002 position entry 21
+ % change 9.667909041510491
605.169983 position entry 22
+ % change 10.276452029511855
652.72998 position entry 23
+ % change 19.73709802635386
676.950012 position entry 24
+ % change 13.385033369347227
696.340027 position entry 25
+ % change 10.932877911382795
670.77002 position entry 26
+ % change 5.560780578714603
690.130005 position entry 27
+ % change 12.513582132977966
661.419983 position entry 28
+ % change 12.509448176137134
700.530029 position entry 29
+ % change 16.447550601717325
703.950012 position entry 30
+ % change 19.937500334895944
704.700012 position entry 31
+ % change 17.577691626319996
742.840027 position entry 32
+ % change 24.193638666161963
762.780029 position entry 33
+ % change 23.533653501040988
779.26001 position entry 34
+ % change 22.340428710052755
754.390015 position entry 35
+ % change 13.475792756880537
776.799988 position entry 36
+ % change 12.85401358682822
800.469971 position entry 37
+ % change 13.008600918522154
792.5 position entry 38
+ % change 15.360249842271287
743.460022 position entry 39
+ % change 7.17321919429314
733.840027 position entry 40
+ % change 9.86864184774156
735.190002 position entry 41
+ % change 4.71442387759784
705.960022 position entry 42
+ % change 0.2847200885831416
722.159973 position entry 43
+ % change 2.4177414496496916
765.619995 position entry 44
+ % change 2.975362209551496
764.289978 position entry 45
+ % change 0.1975623184215044
777.48999 position entry 46
- % change -0.2276582364745212
750.320007 position entry 47
- % change -0.5424362887873675
751.960022 position entry 48
- % change -3.3033625822198305
755.200012 position entry 49
- % change -5.9944330350460815
793.72998 position entry 50
+ % change 0.15496201869557139
817.210022 position entry 51
+ % change 9.024607874914192
843.97998 position entry 52
+ % change 13.05006701699251
864.580017 position entry 53
+ % change 14.96564950101084
933.450012 position entry 54
+ % change 24.37088082655679
1001.210022 position entry 55
+ % change 27.871280037985873
1020.109985 position entry 56
+ % change 24.94730899041244
1043.540039 position entry 57
+ % change 26.75987988612289
1036.060059 position entry 58
+ % change 24.95705405819528
1059.199951 position entry 59
+ % change 29.16162748198617
1052.130005 position entry 60
+ % change 28.52974267186687
1059.790039 position entry 61
+ % change 28.740601042769377
1100.050049 position entry 62
+ % change 27.84601203176711
1101.400024 position entry 63
+ % change 25.80261447315894
1190.52002 position entry 64
+ % change 29.10829168584666
1243.430054 position entry 65
+ % change 30.46814219917512
1185.02002 position entry 66
+ % change 21.22917788342512
1080.589966 position entry 67
+ % change 7.345981963337982
1141.5 position entry 68
+ % change 10.634254489706523
1226.920044 position entry 69
+ % change 14.946369642975691
1221.51001 position entry 70
+ % change 15.182024664701688
1292.609985 position entry 71
+ % change 18.057266825151437
1291.030029 position entry 72
+ % change 18.504606293708452
1379.849976 position entry 73
+ % change 23.195270686441642
1309 position entry 74
+ % change 15.962563101604282
1221.699951 position entry 75
+ % change 9.846929018989542
1260.76001 position entry 76
+ % change 5.571241905110873
1400.319946 position entry 77
+ % change 11.203860406913044
1442.069946 position entry 78
+ % change 17.825066440986635
1593.810059 position entry 79
+ % change 32.20083159231711
1587.319946 position entry 80
+ % change 28.086331752048686
1685.689941 position entry 81
+ % change 27.21555642242514
1593.609985 position entry 82
+ % change 23.34950072492173
1600.550049 position entry 83
+ % change 19.239639784610066
1570.349976 position entry 84
+ % change 17.787114418372173
1619.359985 position entry 85
+ % change 14.790411719355909
1770.51001 position entry 86
+ % change 26.06650103040084
1835.680054 position entry 87
+ % change 33.44701064121275
1868.410034 position entry 88
+ % change 32.52230575421969
1778.869995 position entry 89
+ % change 21.280366191122354
1894.73999 position entry 90
+ % change 23.89087929684748
1872.390015 position entry 91
+ % change 14.878308139236687
1499.25 position entry 92
- % change -5.874266866766722
1693.839966 position entry 93
+ % change 0.4811567304818166
1771.390015 position entry 94
+ % change 10.036187880397412
1949.540039 position entry 95
+ % change 17.9011450402943
2192.689941 position entry 96
+ % change 28.38248825623632
2505.889893 position entry 97
+ % change 35.377847625166986
2288.030029 position entry 98
+ % change 22.618585090257138
2461.399902 position entry 99
+ % change 25.42129978519842
2542.860107 position entry 100
+ % change 26.523286560018377
2470.52002 position entry 101
+ % change 27.99613115460606
2686.120117 position entry 102
+ % change 29.4618294242126
2638.48999 position entry 103
+ % change 29.035546009405177
2739.350098 position entry 104
+ % change 45.26986524670203
2746.159912 position entry 105
+ % change 38.31968930147284
2966.429932 position entry 106
+ % change 40.28545910047135
3336.159912 position entry 107
+ % change 41.56335156514524
4069.310059 position entry 108
+ % change 46.11642000219477
3940.350098 position entry 109
+ % change 36.40438461871923
4696.689941 position entry 110
+ % change 51.28420104920015
4572.830078 position entry 111
+ % change 46.17337928557948
3860.659912 position entry 112
+ % change 34.13405570648462
3400.909912 position entry 113
+ % change 27.357087252360014
3966.110107 position entry 114
+ % change 32.27318343333124
3766.98999 position entry 115
+ % change 29.957605488619844
4206.350098 position entry 116
+ % change 34.875841663714986
3672.820068 position entry 117
+ % change 25.23020836423942
3369.629883 position entry 118
+ % change 11.965704394840804
2597.929932 position entry 119
- % change -28.41608508785602
2470.52002 position entry 120
- % change -64.71471698496902
2772.72998 position entry 121
- % change -42.11084838488311
2151.830078 position entry 122
- % change -118.26490804354302
1840.26001 position entry 123
- % change -148.48825998234892
2116.23999 position entry 124
- % change -82.4301558539209
2110.48999 position entry 125
- % change -61.14314344603928
2160.540039 position entry 126
- % change -83.57031276475225
2027.130005 position entry 127
- % change -85.82873228202253
1805.430054 position entry 128
- % change -132.98327668140172
1498.800049 position entry 129
- % change -145.05070375801677
1690.199951 position entry 130
- % change -99.36279615949415
1930.579956 position entry 131
- % change -34.567331641767026
1950.400024 position entry 132
- % change -26.667349753888224
1934.030029 position entry 133
- % change -43.36540479847948
1731.48999 position entry 134
- % change -24.27620664442882
1845.349976 position entry 135
+ % change 0.2758265947488762
1688.22998 position entry 136
- % change -25.352589106372815
1615.72998 position entry 137
- % change -30.621453839706554
1463.209961 position entry 138
- % change -47.6575540480482
1328.26001 position entry 139
- % change -52.61545102152101
1314.849976 position entry 140
- % change -37.31072646724526
1172.060059 position entry 141
- % change -27.877410162647653
1329.75 position entry 142
- % change -27.106595299868403
1478.780029 position entry 143
- % change -30.552206422852635
1335.51001 position entry 144
- % change -46.041587812584055
1320.910034 position entry 145
- % change -46.41648403134169
1337.52002 position entry 146
- % change -29.455257798683277
1341.170044 position entry 147
- % change -37.592543485112316
1464.310059 position entry 148
- % change -15.291837928977866
1595.910034 position entry 149
- % change -1.2419212598296172
1622.800049 position entry 150
+ % change 9.834242246809294
1735.02002 position entry 151
+ % change 23.44411046046604
1810.449951 position entry 152
+ % change 27.3744090371709
1786.939941 position entry 153
+ % change 34.40965574119428
1932.209961 position entry 154
+ % change 31.179839311469117
1960.26001 position entry 155
+ % change 24.562046797047092
2003.369995 position entry 156
+ % change 33.33682678021741
2066.149902 position entry 157
+ % change 36.06901257641664
2029.819946 position entry 158
+ % change 34.10646975680079
1994.219971 position entry 159
+ % change 32.74713604801223
1920.150024 position entry 160
+ % change 23.73980987435595
1986.73999 position entry 161
+ % change 19.6719227461667
2047.790039 position entry 162
+ % change 20.753592014127385
1887.359985 position entry 163
+ % change 8.071590274814485
1838.099976 position entry 164
+ % change 1.5042720940658951
1896.839966 position entry 165
+ % change 5.793848029876439
1974.98999 position entry 166
+ % change 2.166088396225239
2096.810059 position entry 167
+ % change 6.5122755594334905
2175.439941 position entry 168
+ % change 7.909661984090604
2062.409912 position entry 169
- % change -0.18134076927380643
2051.719971 position entry 170
+ % change 1.067398344293833
1999.22998 position entry 171
+ % change 0.25059693232491853
1921.650024 position entry 172
+ % change 0.07805791800099393
2068.219971 position entry 173
+ % change 3.9396187128298434
2056.959961 position entry 174
+ % change 0.4457997323167168
2184.830078 position entry 175
+ % change 13.61525072340202
2152.090088 position entry 176
+ % change 14.590007813836461
2151.689941 position entry 177
+ % change 11.844177459953096
2120.300049 position entry 178
+ % change 6.853278104131191
2232.820068 position entry 179
+ % change 6.091400330427345
2205.320068 position entry 180
+ % change 1.3549111275760586
2305.820068 position entry 181
+ % change 10.556337824361407
2281.389893 position entry 182
+ % change 10.06710526353682
2339.790039 position entry 183
+ % change 14.555154664456621
2322.570068 position entry 184
+ % change 17.261913839492397
2178.879883 position entry 185
+ % change 5.078752292101458
2172.090088 position entry 186
+ % change 5.300430568513321
2091.469971 position entry 187
- % change -4.463851180964432
2183.75 position entry 188
+ % change 1.4497956267887844
2258.429932 position entry 189
+ % change 4.726291902510966
2366.709961 position entry 190
+ % change 10.411495961080297
2431.77002 position entry 191
+ % change 8.181281550629526
2415.290039 position entry 192
+ % change 8.69336467296216
2463.929932 position entry 193
+ % change 6.416978906200487
2416.149902 position entry 194
+ % change 5.5774688850410605
2421.639893 position entry 195
+ % change 3.3799349868903095
2525.090088 position entry 196
+ % change 8.020308699576184
2604.52002 position entry 197
+ % change 16.3423638033698
2603.22998 position entry 198
+ % change 16.561728902645786
2546.27002 position entry 199
+ % change 17.861422607489207
2596.360107 position entry 200
+ % change 15.891867460433136
2701.5 position entry 201
+ % change 16.400890912456042
2859.120117 position entry 202
+ % change 17.222436828455916
2660.959961 position entry 203
+ % change 8.613054850846742
2652.280029 position entry 204
+ % change 8.935330636612807
2389.860107 position entry 205
- % change -3.0993372701208086
2271.47998 position entry 206
- % change -6.368971915834365
2279.100098 position entry 207
- % change -6.254213894557963
2412.800049 position entry 208
- % change -4.653930566958472
2522.659912 position entry 209
- % change -3.2449918282920676
2292.97998 position entry 210
- % change -13.530427771113814
2325.550049 position entry 211
- % change -9.49108668269302
2367.52002 position entry 212
- % change -9.665814230369213
2091.879883 position entry 213
- % change -29.142214232957464
1720.949951 position entry 214
- % change -66.1361572623677
1535.569946 position entry 215
- % change -73.28809852859675
1577.030029 position entry 216
- % change -68.18196104241716
1476.420044 position entry 217
- % change -61.8685764062954
1377.839966 position entry 218
- % change -64.85804128576135
1528.589966 position entry 219
- % change -49.09819825416804
1717.300049 position entry 220
- % change -40.49962034328225
1774.329956 position entry 221
- % change -42.175354897744846
1835.040039 position entry 222
- % change -24.955310580010735
1978.5 position entry 223
- % change -17.541068941117004
2009.060059 position entry 224
- % change -17.842172482311046
2122.419922 position entry 225
+ % change 1.4389253834001647
2045.109985 position entry 226
+ % change 15.850493928325326
2144.600098 position entry 227
+ % change 28.398308503667703
2269.149902 position entry 228
+ % change 30.501284749410974
2147.350098 position entry 229
+ % change 31.244558333775714
2238.26001 position entry 230
+ % change 38.44146972004383
2397.959961 position entry 231
+ % change 36.25456676255154
2461.189941 position entry 232
+ % change 30.224806286090704
2257.040039 position entry 233
+ % change 21.386863974901775
2109.23999 position entry 234
+ % change 12.999940845991642
2254.699951 position entry 235
+ % change 12.249964829133935
2114.030029 position entry 236
+ % change 4.965396354831065
2368.620117 position entry 237
+ % change 10.394245714328697
2507.409912 position entry 238
+ % change 18.437349425298116
2498.22998 position entry 239
+ % change 14.155217287080998
2652.870117 position entry 240
+ % change 14.46434231894964
2700.080078 position entry 241
+ % change 20.47087360495684
2782.27002 position entry 242
+ % change 19.55273952885421
2781.070068 position entry 243
+ % change 13.775636630238255
2873.540039 position entry 244
+ % change 14.3498991628284
2835.300049 position entry 245
+ % change 20.395019927571692
2773.52002 position entry 246
+ % change 23.950792682578147
2756.379883 position entry 247
+ % change 18.200681810737187
2579.459961 position entry 248
+ % change 18.04369670539732
2415.399902 position entry 249
+ % change 1.9367304337996187
2684.409912 position entry 250
+ % change 6.593627866175157
2620.340088 position entry 251
+ % change 4.66008624449972
2605.149902 position entry 252
- % change -1.8317646506008936
2813.840088 position entry 253
+ % change 4.0428740241901036
2966.889893 position entry 254
+ % change 6.222673562493412
3091.570068 position entry 255
+ % change 10.043440490445322
3046.360107 position entry 256
+ % change 5.673001941001323
2827.340088 position entry 257
- % change -0.2815353212648263
2935.050049 position entry 258
+ % change 5.50348465284382
2939.52002 position entry 259
+ % change 6.23027350567253
3066.959961 position entry 260
+ % change 15.895218920335946
3116.22998 position entry 261
+ % change 22.48967767135081
2977.22998 position entry 262
+ % change 9.835319070648348
3010.23999 position entry 263
+ % change 12.952452405630293
3019.51001 position entry 264
+ % change 13.72275987255296
3142.129883 position entry 265
+ % change 10.448002063064308
3160.189941 position entry 266
+ % change 6.116722463170452
3267.52002 position entry 267
+ % change 5.384816341538435
3328.790039 position entry 268
+ % change 8.484462182686794
3455.909912 position entry 269
+ % change 18.18825837494806
3403.25 position entry 270
+ % change 13.757436303533389
3626.370117 position entry 271
+ % change 18.94043009510052
3589.870117 position entry 272
+ % change 14.566269501610494
3771.47998 position entry 273
+ % change 17.373816206761358
3919.709961 position entry 274
+ % change 24.044635709718523
4059.889893 position entry 275
+ % change 25.8541470498939
4176.589844 position entry 276
+ % change 27.7039373560283
4103.879883 position entry 277
+ % change 23.43514009715473
4308.120117 position entry 278
+ % change 26.64573282138132
4198.990234 position entry 279
+ % change 22.183195532528593
4114.560059 position entry 280
+ % change 19.0973034475762
4242.620117 position entry 281
+ % change 18.543027263923197
4408.180176 position entry 282
+ % change 22.796939686614117
4369.77002 position entry 283
+ % change 17.012334736096708
4580.27002 position entry 284
+ % change 21.623177207355997
4493.390137 position entry 285
+ % change 16.06604668167055
4630.740234 position entry 286
+ % change 15.354570480534536
4791.629883 position entry 287
+ % change 15.271212674336676
4736.049805 position entry 288
+ % change 11.812797247388735
4635.240234 position entry 289
+ % change 11.46349108515268
4963.529785 position entry 290
+ % change 13.204507606273976
4900.879883 position entry 291
+ % change 14.321706831352671
4941.419922 position entry 292
+ % change 16.73324421020537
5070.029785 position entry 293
+ % change 16.31962144380182
4986.870117 position entry 294
+ % change 11.604271365064719
5128.279785 position entry 295
+ % change 14.790725093014789
4776.509766 position entry 296
+ % change 4.108433890303496
4620.160156 position entry 297
+ % change 2.7438446876212486
5053.75 position entry 298
+ % change 8.370215503339107
5108.669922 position entry 299
+ % change 6.205921381506715
5007.410156 position entry 300
+ % change 5.419175632634162
4613.950195 position entry 301
- % change -0.46142758591262867
4557.950195 position entry 302
- % change -8.898289201249145
4869.850098 position entry 303
- % change -0.6371815225430317
4775.359863 position entry 304
- % change -3.4774354973046426
4948.049805 position entry 305
- % change -2.4652132619348217
4842.669922 position entry 306
- % change -2.9777002629253397
5162.129883 position entry 307
+ % change 0.6557389830789714
5213.220215 position entry 308
+ % change 8.37698065666693
5312 position entry 309
+ % change 13.024093448795181
5189.140137 position entry 310
+ % change 2.609105428366278
5323.680176 position entry 311
+ % change 4.038752270831377
5383.120117 position entry 312
+ % change 6.979408834172229
5614.790039 position entry 313
+ % change 17.825062683523793
5825.439941 position entry 314
+ % change 21.757837327946444
5911.740234 position entry 315
+ % change 17.62408520604155
6047.609863 position entry 316
+ % change 21.037236674008646
6198.52002 position entry 317
+ % change 20.17369002544579
6140.419922 position entry 318
+ % change 21.134548068128034
6348.120117 position entry 319
+ % change 18.68254242423625
6428.660156 position entry 320
+ % change 18.90658257717364
6495.959961 position entry 321
+ % change 18.22609696039042
6727.669922 position entry 322
+ % change 22.868687121062354
6873.970215 position entry 323
+ % change 22.553051446412187
6903.390137 position entry 324
+ % change 22.02207886023753
7411.47998 position entry 325
+ % change 24.24198602503679
7273.009766 position entry 326
+ % change 19.903311992885346
7063.450195 position entry 327
+ % change 16.305203961305775
7066.27002 position entry 328
+ % change 14.415811370310475
7442.120117 position entry 329
+ % change 16.710293269242598
7510.299805 position entry 330
+ % change 18.240015958990064
7671.790039 position entry 331
+ % change 17.253729771944297
8109.540039 position entry 332
+ % change 20.727191368639847
8046.350098 position entry 333
+ % change 19.268241104564478
7305.899902 position entry 334
+ % change 7.914562035564007
7330.540039 position entry 335
+ % change 6.228324537768753
6635.279785 position entry 336
- % change -4.040678926698803
7281.740234 position entry 337
- % change -1.7817134617658787
7532.529785 position entry 338
+ % change 3.445323502295313
7729.319824 position entry 339
+ % change 8.614854141918604
8095.390137 position entry 340
+ % change 12.71242150883383
7453.149902 position entry 341
+ % change 0.14798823510902356
8006.240234 position entry 342
+ % change 6.194423530958967
8175.419922 position entry 343
+ % change 6.160293756223274
7962.879883 position entry 344
- % change -1.8417979192817724
7999.339844 position entry 345
- % change -0.5876766697849499
8292.360352 position entry 346
+ % change 11.896015225171436
8665.469727 position entry 347
+ % change 15.405162444230868
8972.599609 position entry 348
+ % change 26.049527738377442
9150.94043 position entry 349
+ % change 20.426318041281366
8567.370117 position entry 350
+ % change 12.07885638028635
7700.100098 position entry 351
- % change -0.37947202800116464
8889.549805 position entry 352
+ % change 8.93363202209991
9489.870117 position entry 353
+ % change 21.462045211255866
10058.76953 position entry 354
+ % change 20.405371550450464
10745.26953 position entry 355
+ % change 23.916101879298317
11775.45996 position entry 356
+ % change 32.37733464298579
11167.50977 position entry 357
+ % change 28.3695290288517
10911.58984 position entry 358
+ % change 24.004105051661295
12198.74023 position entry 359
+ % change 28.96422447221831
12888.28027 position entry 360
+ % change 30.381715628224764
13070.69043 position entry 361
+ % change 29.988851935497944
13192.34961 position entry 362
+ % change 35.058042196624285
13246.87012 position entry 363
+ % change 41.87230622594796
13962.67969 position entry 364
+ % change 36.33349756374738
13748.74023 position entry 365
+ % change 30.97643887188346
14503.9502 position entry 366
+ % change 30.648069034324184
14672.67969 position entry 367
+ % change 26.766822713895156
15259.24023 position entry 368
+ % change 22.830627328029156
14448.58008 position entry 369
+ % change 22.70860037341468
15498.38965 position entry 370
+ % change 29.595331602725572
15537.69043 position entry 371
+ % change 21.489359792837632
15644.96973 position entry 372
+ % change 17.620292704778542
14239.87988 position entry 373
+ % change 8.210669330449436
13751.40039 position entry 374
+ % change 4.0654098066008055
14220.51953 position entry 375
+ % change 6.846792115758939
12334.63965 position entry 376
- % change -13.198926650443346
12081.38965 position entry 377
- % change -13.80098339928967
11028.74023 position entry 378
- % change -31.510488936414095
12390.69043 position entry 379
- % change -18.416966131886486
11816.2002 position entry 380
- % change -29.13830141435823
10575.62012 position entry 381
- % change -36.62158734952746
10988.15039 position entry 382
- % change -41.046391794060604
11468 position entry 383
- % change -35.48735987094525
10466.48047 position entry 384
- % change -49.47689220691777
11584.54981 position entry 385
- % change -22.921305648907214
11455.54004 position entry 386
- % change -20.041485097895052
12221.91016 position entry 387
- % change -16.35267600428835
12226.58008 position entry 388
- % change -0.8838086308105172
12935.29004 position entry 389
+ % change 6.601323877234072
13787.91992 position entry 390
+ % change 20.01157321778237
14032.80957 position entry 391
+ % change 11.701998319072173
Total months in minus 83
Total months in plus 297<br />% ratio of long positions 78.15789473684211
% ratio of short positions 21.842105263157897</pre></pre><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeg4R2e1EBr73Q8N4mcjvoRjgze8PsO_vJLW5MOQ3DqYnmdUq_WTWk5Tmkxv3u9f9z6IcLOKd9usj5pgQ_R0sFPxmNAGBVRT_-PTSpRJYwB5KyySMBdyAp5Vc3-gJN0TFlAg74kKR1tD0AAkuA-oGcOkFldQM_7dNqBmWdGaAFmZ78Ztig04xibbN5OoTx/s1067/NYC_-_Midtown_Manhattan_%E2%80%93_Times_Square_%E2%80%93_Broadway_by_night_-_panoramio_(2).jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="800" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeg4R2e1EBr73Q8N4mcjvoRjgze8PsO_vJLW5MOQ3DqYnmdUq_WTWk5Tmkxv3u9f9z6IcLOKd9usj5pgQ_R0sFPxmNAGBVRT_-PTSpRJYwB5KyySMBdyAp5Vc3-gJN0TFlAg74kKR1tD0AAkuA-oGcOkFldQM_7dNqBmWdGaAFmZ78Ztig04xibbN5OoTx/s320/NYC_-_Midtown_Manhattan_%E2%80%93_Times_Square_%E2%80%93_Broadway_by_night_-_panoramio_(2).jpg" width="240" /></a></div><br /><p><br /></p>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-9638142475758079112023-05-28T15:11:00.003+01:002023-06-12T19:42:56.557+01:00Massive update to Interior of International Space StationQuick post in which I would like to share some progress on updating interior of International Space Station in Unity.<div><br /></div><div><a href="https://bit.ly/issunity">https://bit.ly/issunity</a> - Current project in Unity asset store<br />
<div><br /></div><div>Few years ago I found basic model and low resolution texture provided by Nasa. I imported that project into blender and added more details (cables, details on racks, lighting and many other tiny details).</div><div><br /></div><div>I also managed to use power of AI to upscale images from 1024px resolution to 4096px. I lost count on how many hours it took to achieve the current look but I think it was worth it and I had a lot of fun making those tweaks.</div><div><br /></div><div>I also added normal, roughness, height and ambient occlusion texture and use Autodesk shader build in Unity ( used bitmap2material app made by Allegorthmics - currently Adobe).</div><div><br /></div><div>I also publish change details almost on daily basis on my reddit channel - an example - <a href="https://www.reddit.com/r/Unity3D/comments/13t7be5/final_tweaks_before_updating_interior_of/">https://www.reddit.com/r/Unity3D/comments/13t7be5/final_tweaks_before_updating_interior_of/</a></div><div><br /></div><div>Enough words, let's screenshots speak for themselves.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOK5dSTsx5_JuABSCqZDSmTD-vPYul1ASailZsMwEE2tFRLWgzS__dQKxkL24nmr-5hgFIpOAPU5QDILdG2OSZsiCGDvpo1ZNRl6g6AcY2YOFncFlP7tvvmCMQaHIxzq4RHaiTonc-IjRFDqEc7QvWK1qx8_duxW9nF43sDUxGynBmKtNnLQMu9nNlBA/s1897/presentation2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="889" data-original-width="1897" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOK5dSTsx5_JuABSCqZDSmTD-vPYul1ASailZsMwEE2tFRLWgzS__dQKxkL24nmr-5hgFIpOAPU5QDILdG2OSZsiCGDvpo1ZNRl6g6AcY2YOFncFlP7tvvmCMQaHIxzq4RHaiTonc-IjRFDqEc7QvWK1qx8_duxW9nF43sDUxGynBmKtNnLQMu9nNlBA/s320/presentation2.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEignguQBin-jkY5u0ZFTegzBsTADQ1jMq1d3wzG1WfR7xMV_xcEQlRwK1xkpkxkt0-dP6oj3aGAZs3TrqyYfQGviOowCaEKC6lnP7VtZ_eCWyUR9WNTusUKQ_MmCawvS1hhYEXcdzvRTC-Fe6IH8Na6KcdQ1wT9rHby0UlyqIa3bI6Xe7htqNIYQI7nnQ/s1873/presentation3.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="883" data-original-width="1873" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEignguQBin-jkY5u0ZFTegzBsTADQ1jMq1d3wzG1WfR7xMV_xcEQlRwK1xkpkxkt0-dP6oj3aGAZs3TrqyYfQGviOowCaEKC6lnP7VtZ_eCWyUR9WNTusUKQ_MmCawvS1hhYEXcdzvRTC-Fe6IH8Na6KcdQ1wT9rHby0UlyqIa3bI6Xe7htqNIYQI7nnQ/s320/presentation3.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTzMs1_EE3xTUHp-9cL5bqC9KuVB0jkFvGhIJJjRcTu9dXGrQ2jaAFbNg9vj-AkuYTwF9vjldQ8-Ga9Lynq_Y5I20Dqz3jtMXI_CkHj7dUTECRYtjR0fpSQaMmwnFZfjjsv9Ar1E-GjsjVMxeVX7NBXq6XP7HFYF9u1ac0U0u3lYMfllkDukA2O-hDPw/s1901/presentation4.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="877" data-original-width="1901" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTzMs1_EE3xTUHp-9cL5bqC9KuVB0jkFvGhIJJjRcTu9dXGrQ2jaAFbNg9vj-AkuYTwF9vjldQ8-Ga9Lynq_Y5I20Dqz3jtMXI_CkHj7dUTECRYtjR0fpSQaMmwnFZfjjsv9Ar1E-GjsjVMxeVX7NBXq6XP7HFYF9u1ac0U0u3lYMfllkDukA2O-hDPw/s320/presentation4.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVy8LrdsgweyirUpfGRC9kS4bX3Bjgqx-zqCri0C1_jncJv4XFGlMyUF8_CuiyrCSct6wIMosGEtGukBXWBiT44v6t46wzAkcsExtupxBftUemXY9wwTDt6QHZjAKvgh13SAHgNH_rRRgoM77LggO8bMyxKk5yJFwbQQVKYjhhxVVEpU_KB6tlRa9T6Q/s1897/presentation5.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="883" data-original-width="1897" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVy8LrdsgweyirUpfGRC9kS4bX3Bjgqx-zqCri0C1_jncJv4XFGlMyUF8_CuiyrCSct6wIMosGEtGukBXWBiT44v6t46wzAkcsExtupxBftUemXY9wwTDt6QHZjAKvgh13SAHgNH_rRRgoM77LggO8bMyxKk5yJFwbQQVKYjhhxVVEpU_KB6tlRa9T6Q/s320/presentation5.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlOx3-8x2NtyCj7Cxzf9L64uTNJb0m-QX-oCsT71ydeL-ZUsqKa-TK7D9Qj2SK1_u0oVrbPv9OtmPRIixrquOI7JDtGoouneP-4FL-6Nl0FUd37VKNMa3D2JvJJK0rgBGK0DEoI6R6Ze-tcjqIoTWBFHA79FCzxJ70tXG-3EVlIraC9W7GLr4mYHowtQ/s1875/presentation6.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="873" data-original-width="1875" height="149" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlOx3-8x2NtyCj7Cxzf9L64uTNJb0m-QX-oCsT71ydeL-ZUsqKa-TK7D9Qj2SK1_u0oVrbPv9OtmPRIixrquOI7JDtGoouneP-4FL-6Nl0FUd37VKNMa3D2JvJJK0rgBGK0DEoI6R6Ze-tcjqIoTWBFHA79FCzxJ70tXG-3EVlIraC9W7GLr4mYHowtQ/s320/presentation6.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ms7uknO3vv_iFLCO-jlvnimqFPZB8SoBgFqEzuOt7C4c4LKOxHeuYQll_72QH0xcq-KC4iTxv9IpFJqY3iB24w9GMn57HCRZMhDkO38PCZoZanxhHMSLIQMVQlXwILiNfwcxm4moSIx1wSbLScoo3L0MqQeraokcG4lOguOl5CicrSmWK8ptbAJfUA/s1829/presentation7.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="883" data-original-width="1829" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6ms7uknO3vv_iFLCO-jlvnimqFPZB8SoBgFqEzuOt7C4c4LKOxHeuYQll_72QH0xcq-KC4iTxv9IpFJqY3iB24w9GMn57HCRZMhDkO38PCZoZanxhHMSLIQMVQlXwILiNfwcxm4moSIx1wSbLScoo3L0MqQeraokcG4lOguOl5CicrSmWK8ptbAJfUA/s320/presentation7.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcfhg3XLQKdhK-ZBxudxkRmU3uT7fYMjgkzvyvDzvZfQyy_r3VbEoc6guy2XJdOLCLjou8gApXzIK2Wzj6h8QyLI7A3v7CpPrXiPW_d2BkLWg7ItoiQcN8c9gzaCSTprn7mkrYI_oDuV5ksWO0RLI75kV_xZ8XpxhhT9amXAkRiFC-DaLOPfNuog-Fzw/s1775/presentation8.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="885" data-original-width="1775" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcfhg3XLQKdhK-ZBxudxkRmU3uT7fYMjgkzvyvDzvZfQyy_r3VbEoc6guy2XJdOLCLjou8gApXzIK2Wzj6h8QyLI7A3v7CpPrXiPW_d2BkLWg7ItoiQcN8c9gzaCSTprn7mkrYI_oDuV5ksWO0RLI75kV_xZ8XpxhhT9amXAkRiFC-DaLOPfNuog-Fzw/s320/presentation8.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2zIKin6ri6JNQv38kZtQre4b0iU6cIE64uswqtJJQwaPbVPYyhtZPT5bTs5u9EBK5A9XBPdShumOYG4d1YWpjin54BDlZnjOGY8W2unSDRNqPQIiCzClt3iRt7SINonMfwvaMcOboqAj9J6YGsHeGWvPgw3uq0bC95ufznHOn2MEp1rouwwxIH1G-Lg/s1777/presentation9.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="885" data-original-width="1777" height="159" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2zIKin6ri6JNQv38kZtQre4b0iU6cIE64uswqtJJQwaPbVPYyhtZPT5bTs5u9EBK5A9XBPdShumOYG4d1YWpjin54BDlZnjOGY8W2unSDRNqPQIiCzClt3iRt7SINonMfwvaMcOboqAj9J6YGsHeGWvPgw3uq0bC95ufznHOn2MEp1rouwwxIH1G-Lg/s320/presentation9.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfFdhmqcZ_RV11SHYcgyBI5bCUcEsO0Yi-uScR7vpu4Mbc7jgM2hGZUoVrIfTR8fehQV3QmZNFG_jzqEiP1KvphZczk5zCNg6Ye-mrkAfkRmJcJbd9SV3BUXapxlRNnYhjNGRPmHehR985skLF92FU3Xnw5HvJuJOmpXAbK5EKkqlYA3fG-ruQngHWdQ/s1883/presentation1.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="889" data-original-width="1883" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfFdhmqcZ_RV11SHYcgyBI5bCUcEsO0Yi-uScR7vpu4Mbc7jgM2hGZUoVrIfTR8fehQV3QmZNFG_jzqEiP1KvphZczk5zCNg6Ye-mrkAfkRmJcJbd9SV3BUXapxlRNnYhjNGRPmHehR985skLF92FU3Xnw5HvJuJOmpXAbK5EKkqlYA3fG-ruQngHWdQ/s320/presentation1.png" width="320" /></a></div><br /> </div><div><br /></div><div><br /></div></div>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-43946506018756162642021-07-22T10:49:00.000+01:002021-07-22T10:49:03.693+01:00Blender 2.8 + - Quick tips and shortcuts<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4fnMD81aonVTyyjMNH97JdCM7A1PNtRDIpIAcPuPRk-DM3A4eXF5o4TB1ybYleVKNxU9NDFa3xfSUipwSH0VbNQhumL3Kul_U_uMb9ASTk7YT9s-cpMWOqyxOpHw22ns7MrKwpGfU9kI/s1680/blender_293_splash_erindale_s-e1620391412241.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="671" data-original-width="1680" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE4fnMD81aonVTyyjMNH97JdCM7A1PNtRDIpIAcPuPRk-DM3A4eXF5o4TB1ybYleVKNxU9NDFa3xfSUipwSH0VbNQhumL3Kul_U_uMb9ASTk7YT9s-cpMWOqyxOpHw22ns7MrKwpGfU9kI/s320/blender_293_splash_erindale_s-e1620391412241.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;">image credit : Blender.org</div><br /><p><br /></p><p>Default blender 2.8+ shortcuts settings and by default we are in <b>Edit </b>mode</p><p>This post will grow over time as I will be adding more tips/shortcuts if I find them useful </p><p>Shift + G - Select similar vertices, edges, faces</p><p>Set rotation to 0 - select faces, ctrl+s, s z 0 (apply to every axis, depends in which direction you want to reset rotation)</p><p>Selecting all faces that follows topology - 3 (for face mode), ctrl + shift + left click</p><p>Ctrl + 1 - subdivision modifier (Object mode)</p><p><br /></p><p><br /></p>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-91755477962521467332020-11-06T12:49:00.001+00:002021-03-25T14:12:52.155+00:00STRIDE<p> S - Spoofing, identity steal, pretending to be someone else</p><p>T - Tampering - changing data, permissions, system access etc</p><p>R - Repudiation - injecting data that will be not valid for service - to protect use schema validation for instance</p><p>I - Information disclosure - capturing some part of the system and listen to requests, for instance hacker subscribe to an events service that send confidential data to all subscribers - to protect we can implement zero trust model, meaning that each part of the system (i.e microservice) will only trust verified users/services with valid tokens etc.</p><p>D - Denial of service - flooding the service with lots of request results in system not being able to fulfill request leading to delays/failures in response</p><p>E - Escalation of privilege - Performing actions that the currently authenticate user does not have permissions to</p>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com2tag:blogger.com,1999:blog-3410441503882094512.post-2123803683273987552020-06-11T10:34:00.001+01:002020-06-11T10:34:40.408+01:00International Space Station - Interior - US SectionHappy to announce that recently I finished working on improvement of International Space Station that was on unity asset store for over 2 years. <div><br /></div><div><a href="http://bit.ly/issunity" target="_blank">Internation Space Station - Unity</a><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLB4cUoJ46O3FH0tgKC4MLTvs_SBRRF9euc7bc6-WNKVRV9guwzBpu6iyTXZ9ZFCxrWRqDOOPMasOFEc107RjQOT_nw5vWP1ilbnVWvPrZprAjSN93BQJOVpS7uS1eCY7mzIKhK3ieiec2/s1920/ISS4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLB4cUoJ46O3FH0tgKC4MLTvs_SBRRF9euc7bc6-WNKVRV9guwzBpu6iyTXZ9ZFCxrWRqDOOPMasOFEc107RjQOT_nw5vWP1ilbnVWvPrZprAjSN93BQJOVpS7uS1eCY7mzIKhK3ieiec2/s320/ISS4.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidGTwN8AVVlEiXRqSHEQsWq_1psVkNWLa2A9ZSpaEN9tK0jHWLMD68v2dYzgdd92hbrgXf2pNHLDowxH_Uy_luPL9mm28uJeoRec04vmsmUS56813q5zq_wRBq-NiR3UCoTKNm1FA1TbJk/s1920/ISS3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidGTwN8AVVlEiXRqSHEQsWq_1psVkNWLa2A9ZSpaEN9tK0jHWLMD68v2dYzgdd92hbrgXf2pNHLDowxH_Uy_luPL9mm28uJeoRec04vmsmUS56813q5zq_wRBq-NiR3UCoTKNm1FA1TbJk/s320/ISS3.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioMhi46-ZhAp-FNVNMy6bO81FVOml_9EOHNeMLqB4l2H7DSz03lKcvVCT60bW0GnTIgPHr5qUGpSu0pdxsdjb5yM8GflTJqfWW23DtcdZnTSlueLW9ImMpnFnSZL2AZsjnz1gpCpGM83_1/s1920/ISS2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1080" data-original-width="1920" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioMhi46-ZhAp-FNVNMy6bO81FVOml_9EOHNeMLqB4l2H7DSz03lKcvVCT60bW0GnTIgPHr5qUGpSu0pdxsdjb5yM8GflTJqfWW23DtcdZnTSlueLW9ImMpnFnSZL2AZsjnz1gpCpGM83_1/s320/ISS2.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZowOQkixgNNMr4ex7sxqOx8jXOpIvOiyZFVeMu2baw9tn_K2cedDQmzgX5HKE6cv5FUzo1_yFRb9kdwQMTHdoHD3-P7uk18Pi2ugRrsTT-JKXMxvGcQwZkX159GQYzPtbmHGJrHTTz4nF/s1914/ISS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1074" data-original-width="1914" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZowOQkixgNNMr4ex7sxqOx8jXOpIvOiyZFVeMu2baw9tn_K2cedDQmzgX5HKE6cv5FUzo1_yFRb9kdwQMTHdoHD3-P7uk18Pi2ugRrsTT-JKXMxvGcQwZkX159GQYzPtbmHGJrHTTz4nF/s320/ISS.jpg" width="320" /></a></div><div><br /></div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/NFw_vtY8h7w" width="320" youtube-src-id="NFw_vtY8h7w"></iframe></div><div><br /></div>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com4tag:blogger.com,1999:blog-3410441503882094512.post-4569465604799622232020-03-07T20:42:00.001+00:002020-04-08T10:11:40.610+01:00Solar System Unreal Presentation - Release to Unreal marketplace<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Quick link - <a href="https://bit.ly/solarsystemunreal">Unreal marketplace</a></div>
<div class="separator" style="clear: both; text-align: left;">
Finished work on Solar System for Unreal engine.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h3 style="clear: both; text-align: left;">
<span style="font-size: large;">Features:</span></h3>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Distance From Target</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">(float) </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">is connected with Target Actor and it is used to specify the radius</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> where the center is target actor, in this example it is a Sun. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Starting Angle (float)</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> variable is used to offset planet radius.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> For instance if all planets would have a starting angle set up to 0 they would all start at the same position.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> So to add variety this value can be modified for each planet individually. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Orbit speed (float) </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">is used to set up a velocity that the planet rotates around the target(Sun),</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> the higher the value the faster the planet will complete a full rotation cycle.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Clockwise (boolean)</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">, if selected planet would rotate in clockwise direction around target(Sun). </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Target Actor (actor)</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> is an actor variable that the planet will rotate around</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Orbit Draw (boolean) </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> if selected orbit preview line will be displayed during play mode</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Own Rotation Speed (float)</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> is used to set up speed of planet rotation around it’s own axis</span></div>
<div class="separator" style="clear: both; text-align: left;">
<b id="docs-internal-guid-8589217a-7fff-3be3-1cd7-5462bc5058c4" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<h3 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: large;">Advanced materials</span></span></h3>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Each advanced material relies on a source of light vector 3 values (by default 0,0,0)</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">so if the Sun is located in this location you do not need to change it, however if your Sun is in different </span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">direction, change this value to your Sun location. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Atmosphere Color</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> (float4) - atmosphere color of a planet</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Atmosphere Power</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> (float) - related to atmosphere strength parameter, used to change the amount of atmosphere for</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> a planet</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Atmosphere Strength </b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">(float) - related to atmosphere powerparameter, used to change the amount of atmosphere for</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> a planet</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>Base Reflect</b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> (float) - planet self reflection</span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><b>BrightsideIllumination </b></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">- use to change emission value for side of the planet that is facing the Sun</span></div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Few screenshots and video.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzNjB7sh076t7u5FEE7XivqfrSPV2zy-KoTOQZPkgK0rqiKEo_SHfkZCiYhJXoiYfg3y6-rlUgL3KMEk3KHpuYM28aPGw459Cbhs63Fd2RjVQoHeSHGF8kR89zRzbGk3CKNkG5TIz5XWSq/s1600/Solars1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzNjB7sh076t7u5FEE7XivqfrSPV2zy-KoTOQZPkgK0rqiKEo_SHfkZCiYhJXoiYfg3y6-rlUgL3KMEk3KHpuYM28aPGw459Cbhs63Fd2RjVQoHeSHGF8kR89zRzbGk3CKNkG5TIz5XWSq/s400/Solars1.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgikErdq1Rl0CuZewXdiJ1K9X-t5B7LIZMNZS94_lVyRDet4gT0qnW0IFSpeVu7Np9yPUoVVPvVQ8WPqMo7Uf_zbGDwwl0hvVauZlAbsstK2ugCSfy_Jx08Oc4VdpDivQTTXahG4regEXYm/s1600/SolarS2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="900" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgikErdq1Rl0CuZewXdiJ1K9X-t5B7LIZMNZS94_lVyRDet4gT0qnW0IFSpeVu7Np9yPUoVVPvVQ8WPqMo7Uf_zbGDwwl0hvVauZlAbsstK2ugCSfy_Jx08Oc4VdpDivQTTXahG4regEXYm/s400/SolarS2.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib4KpgErN0LHClZLwd4CT70QtjBDc10p0TvrgNNll64e7fuWNwpk4erjILryq9TjYjsMGfN2laLJGPlSfhyphenhyphenmbVVKTvo27yGlo8SzqKulY6wDGNsA_U_WdEhmnbWjjIx_IdCCayEf0z_Vto/s1600/SolarSSmallEarthNight.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="905" data-original-width="1600" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib4KpgErN0LHClZLwd4CT70QtjBDc10p0TvrgNNll64e7fuWNwpk4erjILryq9TjYjsMGfN2laLJGPlSfhyphenhyphenmbVVKTvo27yGlo8SzqKulY6wDGNsA_U_WdEhmnbWjjIx_IdCCayEf0z_Vto/s400/SolarSSmallEarthNight.png" width="400" /></a></div>
<iframe allowfullscreen="" frameborder="0" height="600" src="https://www.youtube.com/embed/QsaR3A3LRpY" width="800"></iframe>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com2tag:blogger.com,1999:blog-3410441503882094512.post-63554877165228466782020-03-04T14:44:00.000+00:002020-03-04T14:46:10.392+00:00Chaining http calls in Angular using observables Imagine situation in which you want to execute http call only when previous call has finished and returned results that the second http call depends on. For instance you want to send email to the customer only when his data has been updated in the system. One endpoint (microservice) is responsible for customer update, second for sending email. This is quite common architecture nowadays where monolith app has been stripped into lots of microservices.<br />
In angular this is easily achievable with Observable and flat map and it came from <a href="https://rxjs.dev/">rxjs </a>library.<br />
<br />
Fully working demo is available in this stackblitz example :<br />
<br />
<a href="https://abdeveloper-observables-chain.stackblitz.io/">https://abdeveloper-observables-chain.stackblitz.io</a><br />
<br />
<br />
Main app component<br />
<iframe height="600" src="https://stackblitz.com/edit/abdeveloper-observables-chain?embed=1&file=src/app/app.component.ts" width="800"></iframe><br />
<br />
Service<br />
<iframe height="600" src="https://stackblitz.com/edit/abdeveloper-observables-chain?embed=1&file=src/app/mock-data.service.ts" width="800"></iframe><br />
<br />
<br />
And as you can see in network activity 2 call has been executed after 1st call finished.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl5Bzt-LjDSs-IKNSuTDo-thbZr1JQAk00XC7YYWMrsK8qUWcBYc1jXbxF2AQYr2A9n3fXh3v3wTNtoAutx2-LJDK7RPWdHnIEHfAxh9Hhjrdk1ZtcUxb5Vu6V89Yc-qMgzNuNglN_VY2r/s1600/flatMap.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="501" data-original-width="1136" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl5Bzt-LjDSs-IKNSuTDo-thbZr1JQAk00XC7YYWMrsK8qUWcBYc1jXbxF2AQYr2A9n3fXh3v3wTNtoAutx2-LJDK7RPWdHnIEHfAxh9Hhjrdk1ZtcUxb5Vu6V89Yc-qMgzNuNglN_VY2r/s400/flatMap.png" width="400" /></a></div><br />
<br />
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com12tag:blogger.com,1999:blog-3410441503882094512.post-18123871957766446282019-11-17T20:34:00.001+00:002019-11-18T19:35:43.620+00:00Creating Virtual Machine (VM) on azure<br />
<div>
<br />
<br />
In this quick guide we are going to create Virtual Machine in azure, then we are going to use remote desktop connection (RDP) using port 3389 and enable Internet Information Service (IIS)</div>
<div>
<br /></div>
<div>
<ul>
<li>After logging to portal.azure.com create new resource. </li>
<li>From popular menu select <a aria-label="Create Windows Server 2016 Datacenter" class="ext-gallery-plusnew-gallery-item-title" data-bind="text: displayText, click: openCreatePromise, sanitizedAttr: { 'aria-label': createAriaText }" href="https://portal.azure.com/" style="background-color: white; color: #252525; display: inline !important; font-family: az_ea_font, "Segoe UI", az_font, system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-size: 14px; line-height: 18px; padding-bottom: 2px; text-decoration-line: none;">Windows Server 2016 Datacenter</a></li>
<li>Choose your subscription</li>
<li>Create new resource group, for simplicity of following this tutorial call it "amazing_vm_machine"</li>
<li>For virtual name choose "vm1"</li>
<li>For region Central US</li>
<li>For administrator account choose your credentials - this password is good for instance - %)'"C(%<P/KDe9\d</li>
<li>For inbound port rules choose RDP</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrpK0L3ndIUQnxlT77D0YvdbFdud9QjPp-mhrnYxm1bR9gmmVEnwFy1bmiWvhivlDPo6vggthZKong1ZoyE1VBM8jd8LCyzXxefKwOtjlw1G4d3NicvthG-KnJQJBf3eRqkyN2YFbeu4S/s1600/azureVM1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="908" data-original-width="1162" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrpK0L3ndIUQnxlT77D0YvdbFdud9QjPp-mhrnYxm1bR9gmmVEnwFy1bmiWvhivlDPo6vggthZKong1ZoyE1VBM8jd8LCyzXxefKwOtjlw1G4d3NicvthG-KnJQJBf3eRqkyN2YFbeu4S/s320/azureVM1.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<br /></div>
</div>
<div>
<ul>
<li>Click next and choose disk. If you are planning to use this VM choose cheapest disk to save some money. </li>
</ul>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigT5gHDflFQg4yOpDWkbpwZoMdnKk_V0cDHB4Y-BtjteWUFajTXtIddOe8PkLW5LUya5lY5jj8kCbagMq72plGMcUH6yeYYw_RK3Ss-QFJ9_vczwYxe6eNJ3tngUw_vpAJYvxG_BUlXG2U/s1600/azureVM1.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigT5gHDflFQg4yOpDWkbpwZoMdnKk_V0cDHB4Y-BtjteWUFajTXtIddOe8PkLW5LUya5lY5jj8kCbagMq72plGMcUH6yeYYw_RK3Ss-QFJ9_vczwYxe6eNJ3tngUw_vpAJYvxG_BUlXG2U/s1600/azureVM1.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"> </a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4J7D_mrp_1UAioUlUFPjBMn3kBOwKx4s0rFmCn-ZFYx3-4Sc0eyGVOob0H4Ay1kAlmQS3H-6EMygQkvMLsxLCi3js1-6xjS6PjHfjmugYQi9ieTHrL5sBjccy38FHq8C7AA6iWhnXaCD/s1600/azureVM2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="908" data-original-width="1162" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl4J7D_mrp_1UAioUlUFPjBMn3kBOwKx4s0rFmCn-ZFYx3-4Sc0eyGVOob0H4Ay1kAlmQS3H-6EMygQkvMLsxLCi3js1-6xjS6PjHfjmugYQi9ieTHrL5sBjccy38FHq8C7AA6iWhnXaCD/s320/azureVM2.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>Next click on Networking and leave all default values</li>
</ul>
<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhim-K0pJwfhaAinbaHUmq_M2NXvRyYBnDxI1WDqzqU8wHiVKh-9fiHI0TLADho19Y6JHM0z-efQFttPm-ws3VJNtKb8_QbCp5ScWFaj4-gGCa5uk2_XBHHruUO4ApKOHkPyoSxQP1IHg/s1600/azureVM3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="902" data-original-width="1151" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqhim-K0pJwfhaAinbaHUmq_M2NXvRyYBnDxI1WDqzqU8wHiVKh-9fiHI0TLADho19Y6JHM0z-efQFttPm-ws3VJNtKb8_QbCp5ScWFaj4-gGCa5uk2_XBHHruUO4ApKOHkPyoSxQP1IHg/s320/azureVM3.PNG" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<ul>
<li>Next click on management and set Enable auto-shutdown to off value. </li>
</ul>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejJAiHlQ_3FqnEUzay_ENtIUKsXvGD6F5jmDgmuPQNqKZSj39I4gqjx7kO4DbQe1WSzehqHN81O97-eOGcbb08phl3trGV2UN91l93UHdp0kxxL58Bet5YL2p2TV9fm810wd9yok-wqHR/s1600/azureVM4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="904" data-original-width="1148" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhejJAiHlQ_3FqnEUzay_ENtIUKsXvGD6F5jmDgmuPQNqKZSj39I4gqjx7kO4DbQe1WSzehqHN81O97-eOGcbb08phl3trGV2UN91l93UHdp0kxxL58Bet5YL2p2TV9fm810wd9yok-wqHR/s320/azureVM4.PNG" width="320" /></a></div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<ul>
<li>Next click on advanced and do not change anything<br /><br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxVT5aM5dplXsEZ-dnjKkVMItsHn5z5uZ1mNZdUBBR4LFFSBqTcWbQRtACbo2IJIcuExss-vaqkleOz_VW-qncoT-PjeSOUxRythL0pkwvmSfncWfCz2c9lfV9d2SguAEv6yiwd4smc6b/s1600/azureVM5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="903" data-original-width="1144" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxVT5aM5dplXsEZ-dnjKkVMItsHn5z5uZ1mNZdUBBR4LFFSBqTcWbQRtACbo2IJIcuExss-vaqkleOz_VW-qncoT-PjeSOUxRythL0pkwvmSfncWfCz2c9lfV9d2SguAEv6yiwd4smc6b/s320/azureVM5.PNG" width="320" /></a></div>
</li>
<li>Next click on tag section. If you created tags in your azure you can add them here but it is out of the scope of this guide.<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4NlpjH9K7iMrFsdn0bi2bn9syOdTrTuKdSv3wfvzDFpBN08egu-TPoEkqX-AwHOA46CSyjDhdD6SBHR_pN4XT-6LP1MudPXJ90q_Vhc_j2Ex2nAeaGmw2dHe0aeg0dK2fEv5-Ze9Tv2B3/s1600/azureVM6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="897" data-original-width="1146" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4NlpjH9K7iMrFsdn0bi2bn9syOdTrTuKdSv3wfvzDFpBN08egu-TPoEkqX-AwHOA46CSyjDhdD6SBHR_pN4XT-6LP1MudPXJ90q_Vhc_j2Ex2nAeaGmw2dHe0aeg0dK2fEv5-Ze9Tv2B3/s320/azureVM6.PNG" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</li>
<li>Finally click on Review+create tab<br /><br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivo9bkWtetg-TbmBw0f79AKoeaz6VZnhFuqN4XoS-iA4NqRNrlPHNGTTm1bCo6He2ucaqWqcP8S6rUfyXCeIxcFcRcHnxDr8vdMJFKfsla0zNvgXEc4JO66udy63Xzuw8Qgq3MEoSEoH-0/s1600/azureVM7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="896" data-original-width="1145" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivo9bkWtetg-TbmBw0f79AKoeaz6VZnhFuqN4XoS-iA4NqRNrlPHNGTTm1bCo6He2ucaqWqcP8S6rUfyXCeIxcFcRcHnxDr8vdMJFKfsla0zNvgXEc4JO66udy63Xzuw8Qgq3MEoSEoH-0/s320/azureVM7.PNG" width="320" /></a></div>
</li>
</ul>
<br />
<ul>
<li>Click Create and wait few minutes before all resources will be available for you.</li>
</ul>
<br />
<br />
In my case I will be paying 0.0544GBP/hr for this VM. You can calculate price with this Microsoft service - <a href="https://azure.microsoft.com/en-gb/pricing/calculator/">https://azure.microsoft.com/en-gb/pricing/calculator/</a></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<ul>
<li>Few minutes later you will get notification that you VM is deployed.</li>
</ul>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5-ExkjBinjkNS1KR1vmszMwgAko9gYBs0a5Xvp9xjwreyD3Uw7I_mi9mcSjrp37OvtXV_Rcu_d36Vxr7OXTN1z3K8AnoClyazfi0Ar4oqZDlk1eGYU_IwUGAnzR0yh0DYabGaKlyPiIC9/s1600/AzureVMDeploymentReady.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="238" data-original-width="461" height="165" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5-ExkjBinjkNS1KR1vmszMwgAko9gYBs0a5Xvp9xjwreyD3Uw7I_mi9mcSjrp37OvtXV_Rcu_d36Vxr7OXTN1z3K8AnoClyazfi0Ar4oqZDlk1eGYU_IwUGAnzR0yh0DYabGaKlyPiIC9/s320/AzureVMDeploymentReady.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
From the above notification you can go directly to your resource group to view all resource associated with your virtual machine, such as storage disks, network interface etc. You have probably saw previously that while creating new VM virtual network will be automatically created for you as well.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR4KPdlBoJz7BXqnkDZApuVya7iBp8FdqgJ5jTLrvd4khCZePBsQXYCprG4HIxtq5T8a9KFBbZYX0jTzHVqMM0O3u5fGzgv078SfAVhc_1Fcek_0p86Rej8Sl89XkrBQc-SFgPYhXzUgIh/s1600/VMFinal.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="689" data-original-width="1600" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR4KPdlBoJz7BXqnkDZApuVya7iBp8FdqgJ5jTLrvd4khCZePBsQXYCprG4HIxtq5T8a9KFBbZYX0jTzHVqMM0O3u5fGzgv078SfAVhc_1Fcek_0p86Rej8Sl89XkrBQc-SFgPYhXzUgIh/s320/VMFinal.PNG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Congratulations, you sucesfully deployed virtual machine in azure.</div>
<div class="separator" style="clear: both; text-align: left;">
In next guide we are going to connect to new vm via RDP.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: left;">
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com3tag:blogger.com,1999:blog-3410441503882094512.post-59723627279136093572019-10-31T20:25:00.002+00:002019-10-31T20:25:23.002+00:00Adding tags to resources in Microsoft AzureIn this article you will learn how to add tag to single resource, whole resource group, delete tags and search for resources by tag within Azure.<br />
<br />
Crete new resource group from cloud shell with this command:<br />
<br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-start" data-emphases="selection" data-selection-emphasis="selection" id="6B5922F5CBE984B70DAA56B99B0F1CBA00102" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">az </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="C3423B9161D81AA77B76BF5FDBA428C700103" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">group </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="70CE0635516D427BA4918C655FA066F000104" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">create </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900105" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="0EE7FDEFF712C1E08DB1AA958D728D1A00106" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">--name </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="ACC22D0A8A5E876EF8656885F67A44D400107" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">tagrg </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900108" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="D4EDB8F0F874CDC6685C72B22BB2169700109" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">--location </span><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" id="9DE4B07F3D6F686F730D1DB96286C0F10010A" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;">westeurope</span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><br /></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(255, 255, 255); color: #1a1a18; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span style="font-family: inherit;">In next step add VM into the resource group with this command.</span></span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><br /></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-start" data-emphases="selection" data-selection-emphasis="selection" id="6B5922F5CBE984B70DAA56B99B0F1CBA0012D" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">az </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="E7C2258D4C395EEB323ECA1E7EFC44D00012E" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">vm </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="70CE0635516D427BA4918C655FA066F00012F" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">create </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900130" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="0EE7FDEFF712C1E08DB1AA958D728D1A00131" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--name </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="C03F18FD4137EA9B962E23E967DF6A7E00132" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">vmtag1 </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900133" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="4C164E4F7481ACE63F43A5C7FBD10F6000134" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--resource-group </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="ACC22D0A8A5E876EF8656885F67A44D400135" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">tagrg </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900136" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="4F45CE617C2157DF280A1B077B65E1C200137" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--image </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="33CAEFD08CFE87D39E65F131FE2606E500138" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">Win2019Datacenter </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE900139" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="D4EDB8F0F874CDC6685C72B22BB216970013A" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--location </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="0853C2D6DF75AB244EF2FE0C310CFA1C0013B" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">westeurope </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE90013C" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="167A0E0407C9056C9EA3BCA1CA7B27AB0013D" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--admin-username </span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="46499F2FAE9DA0C6C8ABA689C136A6420013E" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">adam</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="3CF17E94B47327A8C4E81CE532A8DAE90013F" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">`
</span><span class="dtbs-word emphasis ex-selection annotator_mark" data-emphases="selection" data-selection-emphasis="selection" id="2A90C37906AF18836D8CFC52BA4DEA8300140" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">--admin-password </span><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" id="432105FFB45F895B8D8A4FC0CA5D224A00141" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;">Pass!</span></span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(255, 255, 255); padding: 0px; pointer-events: initial;"><span style="font-family: inherit;">Then add new tag from resource group.</span></span></span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNc6ko4R3mwuxvCe4qjFxe9_GFb1pMZ94MJ3Rl3mXhA7xNvqrCVFG-3K3HCHS_aKbbX0pPhpjAzKP-qtxgYQWGD8RxJpNbZs2g1LFNpbeRr2xqYZYi6WeeNCBUCYmyQCwN6bjsNZYwtSU4/s1600/azuretagsgug1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="576" data-original-width="1600" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNc6ko4R3mwuxvCe4qjFxe9_GFb1pMZ94MJ3Rl3mXhA7xNvqrCVFG-3K3HCHS_aKbbX0pPhpjAzKP-qtxgYQWGD8RxJpNbZs2g1LFNpbeRr2xqYZYi6WeeNCBUCYmyQCwN6bjsNZYwtSU4/s400/azuretagsgug1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; padding: 0px; pointer-events: initial;"><span style="font-family: inherit;">From resource group Overview select all resource and assign the same tag to them.Tag with <b>name </b>env and <b>value </b>prod will be assigned to all resources within your resource group.</span></span></span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; padding: 0px; pointer-events: initial;"><span style="font-family: inherit;"><br /></span></span></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; padding: 0px; pointer-events: initial;"><span style="font-family: inherit;">Now you can go to any resource and make sure the tag is visible there.</span></span></span><br />
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU5Vd3o-IasLPdgnfMgrJQFtYFB-oTYakU0Me_i6cavz5s0fd1mNSeGHLkCWph6-O9I51p9ZNnMtsRiuVn1GMb_l54LOUrt8TZ-KuBmZCi8gXkO6cfx5fZKPEgpmIUiDl6uAsrFHaeTBA5/s1600/azuretag2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="752" data-original-width="1600" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU5Vd3o-IasLPdgnfMgrJQFtYFB-oTYakU0Me_i6cavz5s0fd1mNSeGHLkCWph6-O9I51p9ZNnMtsRiuVn1GMb_l54LOUrt8TZ-KuBmZCi8gXkO6cfx5fZKPEgpmIUiDl6uAsrFHaeTBA5/s400/azuretag2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: inherit;">Next got to all services and search for Tags. You will see a list of all available tags you created. Click on the tag env:prod. That will display all resources with this tag.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: inherit;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: inherit;">Finally if you do not want tag to be associated with one of your resources you can simply remove it. Select any resource from the resource group <span style="color: #1a1a18; font-size: 16px; white-space: pre-wrap;">tagrg, go to Tags section and click delete all or trash icon next to tag.</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #cce2f7; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; white-space: pre-wrap;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaK6FLPuJQtr4oakzO1ic4QHU8N7YbObvoYCJAZ6IzTxSd94uMDoTLgeqNrEwSkzSOOKy1rGGNWGnetEMbhyEJ1IFBMrqSTF8lLsMqmoBLmdLxWuyxg14tgi41cic9ZNHl_khEZAJshyphenhyphenId/s1600/azuretag3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="612" data-original-width="1600" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaK6FLPuJQtr4oakzO1ic4QHU8N7YbObvoYCJAZ6IzTxSd94uMDoTLgeqNrEwSkzSOOKy1rGGNWGnetEMbhyEJ1IFBMrqSTF8lLsMqmoBLmdLxWuyxg14tgi41cic9ZNHl_khEZAJshyphenhyphenId/s400/azuretag3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: #cce2f7; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; white-space: pre-wrap;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>
<span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #1a1a18; font-family: "Lucida Console", monospace; font-size: 16px; padding: 0px; pointer-events: initial; white-space: pre-wrap;"><span class="dtbs-word emphasis ex-selection annotator_mark ex-selection-end" data-emphases="selection" data-selection-emphasis="selection" style="background: rgb(204, 226, 247); padding: 0px; pointer-events: initial;"><br /></span></span>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com1tag:blogger.com,1999:blog-3410441503882094512.post-12365777434021047762019-09-05T08:53:00.000+01:002019-10-10T10:49:08.646+01:00Unity - Scriptable Wizzard tool to create weaponRecently I was working on prototype game based on old school isometric games such as Fallout. I wanted to be able to create weapons quickly without having to copy and paste game objects. Using ScriptableWizzard base class helped me to achieve my goal. Thanks to that script I am able to quickly create new weapon from Unity editor.<br />
Full code below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7s6-_B-ZaO1-QEC6gFUNPHOged54-t-Aqd-1mEJdBaqE18clfk7vMhkOYzcTDHLdWf1mtgguR-llLBLqZDZ1iU3A08xv8D6Exo6aPYe4Xhfo1wYITGjDLrHVOcZNbJtlClzFjL8Pf5uYD/s1600/weapon.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="1600" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7s6-_B-ZaO1-QEC6gFUNPHOged54-t-Aqd-1mEJdBaqE18clfk7vMhkOYzcTDHLdWf1mtgguR-llLBLqZDZ1iU3A08xv8D6Exo6aPYe4Xhfo1wYITGjDLrHVOcZNbJtlClzFjL8Pf5uYD/s400/weapon.jpeg" width="400" /></a></div>
<br />
<br />
CreateWeaponWizard must be inside Editor folder.<br />
<br />
<iframe frameborder="0" height="1075" src="https://dotnetfiddle.net/Widget/yPrQky" width="100%"></iframe><br />
<br />
<br />
<br />
And Weapon class. Make sure you will place this class outside Editor folder.Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-25746092656426431812019-08-26T22:32:00.002+01:002019-08-26T22:35:40.435+01:00Unity - Using editor tool to find all elements with selected tagSo you have 500 objects in your project and some of them have specific tag assigned to them. You want to select them all and perform some modification. There is painful way - go through all objects in hierarchy one by one and check what tag the object have or the second way use unity editor ScriptableWizzard.<br />
<br />
<a href="https://docs.unity3d.com/ScriptReference/ScriptableWizard.html">https://docs.unity3d.com/ScriptReference/ScriptableWizard.html</a><br />
<br />
I wrote simple class that will enable to you to easily find all elements by the tag name in the editor.<br />
<br />
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/iZojz4" frameborder="0"></iframe><br />
<br />
<div>In order for the script to work you need to place in inside Editor folder.</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7zLWiNCda3QLLqTYMlDvHTxd56fyD8HZH_dU1rP-B2zRXsblLzwqxY3e5MiNLFh4ZPrnoLZB8SJjMBdbJV8helsjrkOoFlI_ZQYbo54wwdr1hIB42rDopeq-0VGGJEy-FPh8GzuG-ndCi/s1600/Editor.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="315" data-original-width="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7zLWiNCda3QLLqTYMlDvHTxd56fyD8HZH_dU1rP-B2zRXsblLzwqxY3e5MiNLFh4ZPrnoLZB8SJjMBdbJV8helsjrkOoFlI_ZQYbo54wwdr1hIB42rDopeq-0VGGJEy-FPh8GzuG-ndCi/s1600/Editor.jpg" /></a></div><div><br />
</div>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com15tag:blogger.com,1999:blog-3410441503882094512.post-13627901260955527452019-08-09T22:58:00.001+01:002019-08-09T23:00:05.299+01:00Unity 3d on build screen goes to blackRecently I updated one of my projects - <a href="http://bit.ly/solarsystemunity3d">http://bit.ly/solarsystemunity3d </a>to Unity 2019.1.6f1 and when I run it in unity editor everything was working as expected, however when I build it for desktop and run I got black screen. I could not find solution online even tough I tried all tricks and tips I found. For instance setting Clear Flags on on all camera to Don't clear, reducing texture resolution.<br />
After playing around and scratching my head I realised that I made all cameras into prefabs in my previous version of unity, when I right clicked in project hierarchy window and selected Unpack Prefab Completely it magically started to work again as expected.<br />
Hope that helps someone out there ans save a lot of time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5PzWgwPfLT_Jcbry41UzCWexQ9DCMCTcZagtUaLpTl7ZiNl7jegX-cwB0NBdSaIdZUza9PplWLNFZsoIy40QL_lK9lxA5ODA3CK3pBKOHK9F43Azmd0xcFL60TXdYV8EkqJUFV24Ta_k0/s1600/unpack.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="611" data-original-width="1600" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5PzWgwPfLT_Jcbry41UzCWexQ9DCMCTcZagtUaLpTl7ZiNl7jegX-cwB0NBdSaIdZUza9PplWLNFZsoIy40QL_lK9lxA5ODA3CK3pBKOHK9F43Azmd0xcFL60TXdYV8EkqJUFV24Ta_k0/s400/unpack.jpg" width="400" /></a></div>
<br />Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-50440488255480971862019-07-03T11:12:00.001+01:002019-07-03T11:12:46.240+01:00Modern Interior 3d design in Unity 3dI always wanted to create 3d interior design but always had some other projects in the way. Finally found some spare time and released Modern Interior asset.<div>
<br /><div>
<a href="http://bit.ly/modern-interior">Available here </a></div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJApzgA3e8jUmY6nlBhi_OQaZXH7cTr6er_SpDTr0QJRRkx7Wgq06ebf34HkVFPlzoMQbqGQQkPtH7j63N-tIGkwDQdotgUufvj3ha0mW3Y4VwcOzFX1yhRkg37Kqv6eA7gJAeerxDTG3a/s1600/modern-interior3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="785" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJApzgA3e8jUmY6nlBhi_OQaZXH7cTr6er_SpDTr0QJRRkx7Wgq06ebf34HkVFPlzoMQbqGQQkPtH7j63N-tIGkwDQdotgUufvj3ha0mW3Y4VwcOzFX1yhRkg37Kqv6eA7gJAeerxDTG3a/s320/modern-interior3.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdkFkvX12jlEYLd4QSC1n2UX4ahHZfSLz1J1xHpyjrHyCRmuZbOu-VQZ-S9796LcH8F3HiJ4NpECbzsiw_3ONXxz3GRm1CweqH2ONmUuvDNyvBUAJl2VIShmOOKUwVEttWWstz5D2r2cNH/s1600/modern-interior.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="369" data-original-width="785" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdkFkvX12jlEYLd4QSC1n2UX4ahHZfSLz1J1xHpyjrHyCRmuZbOu-VQZ-S9796LcH8F3HiJ4NpECbzsiw_3ONXxz3GRm1CweqH2ONmUuvDNyvBUAJl2VIShmOOKUwVEttWWstz5D2r2cNH/s320/modern-interior.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8CU9DP0HH_0XMWyXwnpTUemZGIVZQRTBWSGexXUZE4SK1ZgX2p1dL2xSfBB6kA67wHhLg1wLGhWiNijvrDJTt6aBRLYYfve5SSnprxiIAxSEEIWpQnDDQVhMTMv5dR_PSE7pgXKk47R4Q/s1600/modern-interior2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="785" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8CU9DP0HH_0XMWyXwnpTUemZGIVZQRTBWSGexXUZE4SK1ZgX2p1dL2xSfBB6kA67wHhLg1wLGhWiNijvrDJTt6aBRLYYfve5SSnprxiIAxSEEIWpQnDDQVhMTMv5dR_PSE7pgXKk47R4Q/s320/modern-interior2.jpg" width="320" /></a></div>
<div>
<br /></div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com12tag:blogger.com,1999:blog-3410441503882094512.post-24236890646444981032019-03-20T10:40:00.003+00:002019-03-20T10:40:44.957+00:00Different case styles in programming<h3>
<b>Camel case</b> </h3>
<div>
"theQuickBrownFoxJumpsOverTheLazyDog" or "TheQuickBrownFoxJumpsOverTheLazyDog"<div>
First letter of each word is capitalised. In languages such as C# it is almost imperative to use low case for the first word</div>
<div>
<br /><h3>
<b>Snake case</b> </h3>
<div>
"the_quick_brown_fox_jumps_over_the_lazy_dog"</div>
<div>
Spaces are replaced by underscore. Words can be lower case, upper case or mixed.</div>
<div>
<br /><h3>
<b>Kebab case</b></h3>
<div>
"the-quick-brown-fox-jumps-over-the-lazy-dog"<div>
Same as Snake case, however underscores are replaced with hyphens.</div>
<div>
<br /><div>
<h3>
<b>Studly caps</b></h3>
<dd style="background-color: white; color: #222222; font-family: sans-serif; font-size: 14px; margin-bottom: 0.1em; margin-left: 1.6em; margin-right: 0px;">"tHeqUicKBrOWnFoXJUmpsoVeRThElAzydOG"<br />Complete chaos and pattern whatsoever - use it if you want to offend other programmers. </dd></div>
</div>
</div>
</div>
</div>
</div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com9tag:blogger.com,1999:blog-3410441503882094512.post-11921433402122676662019-02-17T19:32:00.002+00:002019-02-19T14:57:41.262+00:00Blender - Quick tips to reduce poly count<h2>
Un-Subdivide</h2>
<br />
If mesh is made out of quads in edit mode, select the mesh, then ctrl+e and choose Un-Subdivide<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiToobfmnBpcXauspxN54KgnnFJQaXjKWKRX1P6E4HJPKw4VxdhNfxSDStYOaBHHkf3RF0NzKQOfuVBKYzDc0_rHGxA0Gpz_0uaW5hAt9JKGWEi9jnFbNIxoO4jzo6LKq0Zgs64EexHKlwO/s1600/UnSubdivide.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="799" data-original-width="1028" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiToobfmnBpcXauspxN54KgnnFJQaXjKWKRX1P6E4HJPKw4VxdhNfxSDStYOaBHHkf3RF0NzKQOfuVBKYzDc0_rHGxA0Gpz_0uaW5hAt9JKGWEi9jnFbNIxoO4jzo6LKq0Zgs64EexHKlwO/s320/UnSubdivide.jpg" width="320" /></a></div>
<br />
<h2>
Delete Edge Loops</h2>
<div>
Quite common tactic to reduce poly count in oval shapes objects.</div>
<div>
In edit mode select edge loop by pressing alt+right click, then space and type Delete Edge Loop</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeeqM93XUA0qT1UoHyCCzmiaAR3RRaqYFQYs86KTd29vr1jQ2ViJ5PLEnPE3lVIvXRDRMbJMBzcEc6miUAvXrABvbXtq1gwo5weXH1EMbT1R9dyDp_92KA7QwF4NGCdg1wkcMuUNkNCO6g/s1600/EdgeLoops.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="780" data-original-width="1045" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeeqM93XUA0qT1UoHyCCzmiaAR3RRaqYFQYs86KTd29vr1jQ2ViJ5PLEnPE3lVIvXRDRMbJMBzcEc6miUAvXrABvbXtq1gwo5weXH1EMbT1R9dyDp_92KA7QwF4NGCdg1wkcMuUNkNCO6g/s320/EdgeLoops.jpg" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<h2>
Limited Dissolve</h2>
<div>
<br /></div>
<div>
One of my favorite and quickest techniques. Quickly remove unnecessary vertices without breaking the mesh structure. Still might require some manual adjustment but dramatically reduce poly counts.</div>
<div>
We reduced poly count from 49,216 to 436. You can also play with max angle value under limited dissolve menu. It works well on square objects with lots of edge loops.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-OwzAZaD4aqG6T9kgOuHLYYWlObPSwJLlnG60VeOgEGeIqTeyAYrzvmPflJ-rllI48UtALrpfyFOWHxLooFnh9UIwEq7VP-zJSLvEGk7En9a53_FJBy8KmhyjPBtDEZbi4G2J0y3QEo-/s1600/LimitedDissolve1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="1048" height="229" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw-OwzAZaD4aqG6T9kgOuHLYYWlObPSwJLlnG60VeOgEGeIqTeyAYrzvmPflJ-rllI48UtALrpfyFOWHxLooFnh9UIwEq7VP-zJSLvEGk7En9a53_FJBy8KmhyjPBtDEZbi4G2J0y3QEo-/s320/LimitedDissolve1.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixDKFO_U_9bwuVe2ahNHjsevV7BV0lHw9vsN-knvyaIhIE3-cV784fj0O_XMbj7xuTbxfPuQZbZWv_UJzRLAUdLLGyBsc4ksM4b-SmBxq7JSr6jspQ9AVUlHc9ZpluH3fwXWSt2ztv1KSi/s1600/LimitedDissolve2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="822" data-original-width="1220" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixDKFO_U_9bwuVe2ahNHjsevV7BV0lHw9vsN-knvyaIhIE3-cV784fj0O_XMbj7xuTbxfPuQZbZWv_UJzRLAUdLLGyBsc4ksM4b-SmBxq7JSr6jspQ9AVUlHc9ZpluH3fwXWSt2ztv1KSi/s320/LimitedDissolve2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<h2>
Decimate modifier</h2>
<div>
<br /></div>
<div>
Select object and add Decimate modifier</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjootd1pr-JpT2hooo6qiQUTOsLSMtnBRGlDiP68lQ6Oblr9HxOKVsk1UY-bRDQS4Qlzlrz9Av8AjnJuLJKXL2JoanMaTvFxp6kiWFL6pCplELsiHMj-aTAbFcAOqgnb3UkpdoJsLV6swA5/s1600/Decimate1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="764" data-original-width="1308" height="186" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjootd1pr-JpT2hooo6qiQUTOsLSMtnBRGlDiP68lQ6Oblr9HxOKVsk1UY-bRDQS4Qlzlrz9Av8AjnJuLJKXL2JoanMaTvFxp6kiWFL6pCplELsiHMj-aTAbFcAOqgnb3UkpdoJsLV6swA5/s320/Decimate1.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibvaUCM0PhtJQEbuMMhXC_7EKNG3yOo1XrJLmDGMNyZTN6Gue2fFEcybtm1ZTENKSk-Uoe03LyRtreLWcwcQgbUTPUNwinDxh0lXS5yG4zY_YhosCY7Dnr6CkBeaGBb9oAgH9PKWm0OO3V/s1600/Decimate2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="707" data-original-width="1200" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibvaUCM0PhtJQEbuMMhXC_7EKNG3yOo1XrJLmDGMNyZTN6Gue2fFEcybtm1ZTENKSk-Uoe03LyRtreLWcwcQgbUTPUNwinDxh0lXS5yG4zY_YhosCY7Dnr6CkBeaGBb9oAgH9PKWm0OO3V/s320/Decimate2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
9750 polygons on the the top photo vs 436 after using decimate modifier.</div>
<div>
<br /></div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com3tag:blogger.com,1999:blog-3410441503882094512.post-12616686823753060632019-02-06T11:07:00.000+00:002019-02-06T11:13:23.523+00:00Use of @Input in Angular 6+According to official angular documentation it declares a data-bound input property.<br />
<br />
Let's have a look at this simple example.<br />
<br />
<br />
Example<br />
<br />
The following example creates a component with two input properties.<br />
<br />
<br />
<p class="codepen" data-height="658" data-theme-id="0" data-default-tab="js" data-user="adambielecki" data-slug-hash="ErwOgM" style="height: 658px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid black; margin: 1em 0; padding: 1em;" data-pen-title="ErwOgM"> <span>See the Pen <a href="https://codepen.io/adambielecki/pen/ErwOgM/"><br />
ErwOgM</a> by Adam Bielecki (<a href="https://codepen.io/adambielecki">@adambielecki</a>)<br />
on <a href="https://codepen.io">CodePen</a>.</span><br />
</p><script async src="https://static.codepen.io/assets/embed/ei.js"></script><br />
<br />
<br />
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com25tag:blogger.com,1999:blog-3410441503882094512.post-88596586276224861062019-01-31T19:48:00.000+00:002019-01-31T20:09:28.418+00:00Using Singleton in C#Singleton is used in application when we want to store consistent unique data in an object disallowing creating a new instances of this object in the same time. <br />
<br />
Here are the bullet points that defines Singleton.<br />
<br />
<ul><li>cannot be instantiated (private constructor instead of public)</li>
<li>cannot be inherited (sealed class)</li>
<li>public static instance has to be available across the whole application</li>
</ul><div>Singleton concept is quite popular in mobile apps and video games, less in web/desktop applications.</div><div><br />
</div><div class="separator" style="clear: both; text-align: left;">Here is a simple example of Singleton usage.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><br />
<iframe width="100%" height="475" src="https://dotnetfiddle.net/Widget/diO0oP" frameborder="0"></iframe><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWGZ7ukOq5k-q5-jVh37JP23nqzlx-4OSJ5x4_6UepIC7a-JLrLp5XxY3vDwf2g2YtoCvSaGtet7PAxEVcN4YynVkYKBXivjLpamgypSFUzq9y_r1RzGEYD_xi56fTTg4_ylynLA2Z6-Ny/s1600/SingletonLogo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="606" data-original-width="940" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWGZ7ukOq5k-q5-jVh37JP23nqzlx-4OSJ5x4_6UepIC7a-JLrLp5XxY3vDwf2g2YtoCvSaGtet7PAxEVcN4YynVkYKBXivjLpamgypSFUzq9y_r1RzGEYD_xi56fTTg4_ylynLA2Z6-Ny/s320/SingletonLogo.jpg" width="320" /></a></div><br />
<br />
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com2tag:blogger.com,1999:blog-3410441503882094512.post-50469377902585625832019-01-30T19:44:00.003+00:002019-01-31T08:58:03.608+00:00Understanding Predicate delegate with simple example in C#Predicate is a delegate that always returns boolean value (True or False).<br />
<br />
Predicate is used in conjunction with lambda expression.<br />
<br />
Below example shows how can we simply replace static method with Predicate.<br />
<br />
<br />
<pre class="brush:csharp">public class Program
{
public static void Main()
{
Predicate<int> isGreaterThan5Predicate = m => m > 5;
Console.WriteLine("Using Predicate to determine condition - 4 is not greater than 5 hence: " + isGreaterThan5Predicate(4));
Console.WriteLine("Using static method to determine condition - 6 is greater than 5 hence: " + isGreaterThan5(6));
}
public static bool isGreaterThan5(int number)
{
return number > 5? true: false;
}
}
</pre><br />
Running above code will produce those messages in the console.<br />
<br />
<span style="background-color: #fefefe; color: #333333; font-family: monospace; font-size: 11.7px; white-space: nowrap;">Using Predicate to determine condition - 4 is not greater than 5 hence: False</span><br />
<span style="background-color: #fefefe; color: #333333; font-family: monospace; font-size: 11.7px; white-space: nowrap;">Using Predicate to determine condition - 6 is greater than 5 hence: True</span><br />
<span style="background-color: #fefefe; color: #333333; font-family: monospace; font-size: 11.7px; white-space: nowrap;"><br />
</span> <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkd4K_HWmlcdGp8BvGmdpkDcP9Bs-6izwbs2LCuQqbH0A5nWC_7GcMrFRJmlL31pOljQEHJYaFT2SGUPTtGryytF0Agw0Igf-JuB36i9S74l5ocZ6SkrEKJpeuxf3RhIk8uYttbUpzo3W4/s1600/Predicate.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="606" data-original-width="940" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkd4K_HWmlcdGp8BvGmdpkDcP9Bs-6izwbs2LCuQqbH0A5nWC_7GcMrFRJmlL31pOljQEHJYaFT2SGUPTtGryytF0Agw0Igf-JuB36i9S74l5ocZ6SkrEKJpeuxf3RhIk8uYttbUpzo3W4/s320/Predicate.jpg" width="320" /></a></div><span style="background-color: #fefefe; color: #333333; font-family: monospace; font-size: 11.7px; white-space: nowrap;"><br />
</span>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com14tag:blogger.com,1999:blog-3410441503882094512.post-51424320259511949702018-12-12T16:40:00.000+00:002018-12-13T09:51:59.250+00:00Capturing exceptions with Nunit in .NETIn this tutorial we are going to capture exception that service throw using nUnit test framework. It is quite important writing unit tests or integration tests to be able to specify scenario that will force method to threw an exception so we are prepared for that eventuality.<br />
<div>
<br /></div>
<div>
We are having fruit service that stores info regarding fruit availability in the fridge. </div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<pre class="brush :csharp">public class FruitService
{
public async Task<string> CheckIfFruitIsInTheFridge(string fruit)
{
// To keep it simple call Fridge method. In real environment we would call
// some external api and we want to create new thread for that.
var fruitInTheFridge = Fridge(fruit);
if(fruitInTheFridge == null)
{
throw new Exception("Could not find fruit in the fridge.");
}
return await fruitInTheFridge;
}
private async Task<string> Fridge(string fruit)
{
// Ok beer is not part of the fruit company, but beer must always be in the fridge :)
List<string> currentfruitsInTheFridge = new List<string> { "Apple", "Pearl", "Beer" };
return currentfruitsInTheFridge.FirstOrDefault(m => m.Equals(fruit));
}
}
</string></string></pre>
<br />
Now we are going to run tests.<br />
<br />
<pre class="brush:csharp">[TestFixture]
public class WhenCallingCheckIfFruitIsInTheFridge
{
private FruitService _fruitService;
[SetUp]
public void SetUp()
{
this._fruitService = new FruitService();
}
[Test]
public void ItThrowsAnExceptionWhenfruitIsNotFoundInTheFridge()
{
var ex = Assert.ThrowsAsync<exception>(async () => await this._fruitService.CheckIfFruitIsInTheFridge("Grapes"));
Assert.That(ex.Message, Is.EqualTo("Could not find fruit in the fridge."));
}
}
</pre>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQp9kjm0iqns7Lsd1o7Xu24X5s8YAStqprPFR1F6QnIv-zSb25GkcepkViTKx0lbyYUYULIEk6x2SqTMIHaafEGuElgFL2Q5ebMQOTbDIpJ-nCVNTGYzoriNEG_22YSW6Sd3OwrJnnMtQZ/s1600/download.png" imageanchor="1"><img border="0" data-original-height="168" data-original-width="300" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQp9kjm0iqns7Lsd1o7Xu24X5s8YAStqprPFR1F6QnIv-zSb25GkcepkViTKx0lbyYUYULIEk6x2SqTMIHaafEGuElgFL2Q5ebMQOTbDIpJ-nCVNTGYzoriNEG_22YSW6Sd3OwrJnnMtQZ/s320/download.png" width="320" /></a>Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com1tag:blogger.com,1999:blog-3410441503882094512.post-80781815279704065692018-11-21T21:35:00.001+00:002018-11-21T21:38:10.786+00:00Prefix and Postfix in .NET explained in 1 minuteUsing prefix in comparison will change the value before expression evaluation, where using postfix will change value after expression evaluation. Look at below example.<br />
<br />
<pre class="brush:csharp">public static void Main()
{
// Prefix and Postfix example
int x = 5;
if(++x == 6)
{
Console.WriteLine("Using prefix will increment value before expression is evaluated.");
}
Console.WriteLine(string.Format("Value of x is {0}", x));
if(x++ == 7)
{
// we will never reach this code as expression is evaluated before increment, hence x is still equal to 6
Console.WriteLine("I am here but you will never see me in console.");
}
Console.WriteLine(string.Format("Value of x is {0}", x));
}
</pre>
<br />
You can look into example in dotnetfiddle - <a href="https://dotnetfiddle.net/txxcEa">https://dotnetfiddle.net/txxcEa</a><br />
<br />Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com4tag:blogger.com,1999:blog-3410441503882094512.post-26545101328424787052018-11-14T09:23:00.001+00:002018-11-14T09:37:38.452+00:00Setting up environment for Angular 6<span style="font-family: Georgia, Times New Roman, serif;">1. Check if you have npm installed by opening command and type <span style="background-color: #3d85c6; color: white;">npm -v</span>. If you have not installed npm download it from - https://nodejs.org/en/</span><br />
<span style="font-family: Georgia, Times New Roman, serif;">2. Install @angular-cli. Type <span style="background-color: #3d85c6; color: white;">npm install -g @angular/cli</span><span style="background-color: #0b5394; color: white;">.</span><span style="background-color: white;"> -g parameter means that package will be installed globally so you can access angular cli functionality from any location.</span></span><br />
<span style="font-family: Georgia, Times New Roman, serif;">Visit - https://cli.angular.io/ for more info. This will enable you to create new angular project with some basic data that follows good practices.</span><br />
<span style="font-family: Georgia, Times New Roman, serif;">3. Next create new angular project. Type <span style="background-color: #3d85c6; color: white;">ng new </span><i><span style="background-color: #3d85c6; color: white;">ng-project</span> </i>where<i> ng-project </i>is name of new project you want to create. Make sure that in command line you are in folder where you want this project to appear. You can also use optional parameters like --routing or --style=scss (will use scss by default instead of css)</span><br />
<span style="font-family: Georgia, Times New Roman, serif;">4. Now you open source code by typing <span style="background-color: #3d85c6; color: white;">code</span><span style="background-color: #3d85c6; color: white;"> </span><span style="background-color: #3d85c6; color: white;">. </span><span style="background-color: white;"> (make sure you type .) </span>in command line if you have Visual Studio Code installed (https://code.visualstudio.com/) - highly recommended</span><br />
<span style="font-family: Georgia, Times New Roman, serif;">5. To run app you just create type ng -serve -o to initiate localhost server and open app in a browser. If you see error message "The serve command requires to be run in an Angular project, but a project definition could not be found" make sure you are in your angular project main folder. </span><br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj33JX5sClGpXm0DAwp9xZSl_wJm96LYyhA-fzJJ0yFxiP0s06_ba9v9UrPY19ksQgOkl89RjfzjZMvlVU-sn-Fd_NH1w00LDNQdmby8IkgCBxeSKQyruMb3piwnKnqiAVhQvOuCa2zAE1R/s1600/angular6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="728" data-original-width="1600" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj33JX5sClGpXm0DAwp9xZSl_wJm96LYyhA-fzJJ0yFxiP0s06_ba9v9UrPY19ksQgOkl89RjfzjZMvlVU-sn-Fd_NH1w00LDNQdmby8IkgCBxeSKQyruMb3piwnKnqiAVhQvOuCa2zAE1R/s320/angular6.jpg" width="320" /></a></div>
<div>
<br /></div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com1tag:blogger.com,1999:blog-3410441503882094512.post-1561249935171150362018-10-29T14:11:00.000+00:002018-10-29T14:20:16.030+00:00IndexOf keyword in .NETIndexOf is an extension method (default functionality can be overridden) on string.<br />
Method will return index number of a character position in string.<br />
<br />
Take a look in this example<br />
<br />
<pre class="brush:csharp">public static void Main()
{
var character = "ABS";
Console.WriteLine(character.IndexOf("B"));
}
</pre>
<br />
We are expecting to see 1 in Console.<br />
<br />
If character does not exist in the string method will return -1.<br />
<br />
<br />
<pre class="brush:csharp">public static void Main()
{
var character = "ABS";
Console.WriteLine(character.IndexOf("F"));
}
</pre>
<br />
Above method will return -1.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUEviz2x2zMcwyEvzkIoiYueR00bd-b1mML28RM7Nhcj31jTPQ1I_5vaIdY9KXfEsd0_d0hoAOanvbcDoVrnRKdk4VWVA_-fYQpah6T6kCfJBSNcBu1uhc8ae2UOfqVyutG7weUKM-pyNp/s1600/indexOf.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="368" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUEviz2x2zMcwyEvzkIoiYueR00bd-b1mML28RM7Nhcj31jTPQ1I_5vaIdY9KXfEsd0_d0hoAOanvbcDoVrnRKdk4VWVA_-fYQpah6T6kCfJBSNcBu1uhc8ae2UOfqVyutG7weUKM-pyNp/s200/indexOf.jpg" width="200" /></a></div>
<br />Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com4tag:blogger.com,1999:blog-3410441503882094512.post-75231524861874385942018-10-16T10:08:00.003+01:002018-10-16T10:08:27.807+01:00Understanding versioning in npm and bowerIf you ever got confused what is the difference between 1.1.2 and 1.1.x, or ^1.1.2 and ~1.1.2 numbers next to your npm package name keep reading this post.<br />
<br />
When you have for instance "angular": "~1.6.1" defined in your package.json and version 1.6.2 is available on the server it will pull this version, however if version 1.7.1 is available it will ignore it.<br />
<br />
In order to pull 1.7.1 you can change ~ to ^ so "angular": "^1.6.1"<br />
For major update it is recommended to manually update version as major version usually means breaking changes.<br />
<br />
~ - patch update<br />
^ - minor update<br />
<br />
You can find all available packages and version https://semver.npmjs.com/<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBgAWFgYzByWFw1nEOHX1a0rzbYXW3WC9ibiEOaSyGqABQomTAL5Mq47oE1_Rtf_SbNaqN_hFcWXPygW05C9JEuCAngAjAUOrHKA6hzdYswRLFaBQhbRJxguznTlFyxoQtCRe1qH2z_4L/s1600/npmVersioning.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1600" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJBgAWFgYzByWFw1nEOHX1a0rzbYXW3WC9ibiEOaSyGqABQomTAL5Mq47oE1_Rtf_SbNaqN_hFcWXPygW05C9JEuCAngAjAUOrHKA6hzdYswRLFaBQhbRJxguznTlFyxoQtCRe1qH2z_4L/s400/npmVersioning.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggTm8UeoHRqKAxPYtyU5EMXvpdpkCc9iqw0tHPUINUDrzbsxNu0_on7kLV3JR2xgVkU1rc-naLfWn9AntvcUHlAqMyUPyswSdJZIT8T802UWoinZ5EZ8cZc2zW_0z4xjQngDEqRZPJeDKK/s1600/npmVersioning2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="775" data-original-width="1600" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggTm8UeoHRqKAxPYtyU5EMXvpdpkCc9iqw0tHPUINUDrzbsxNu0_on7kLV3JR2xgVkU1rc-naLfWn9AntvcUHlAqMyUPyswSdJZIT8T802UWoinZ5EZ8cZc2zW_0z4xjQngDEqRZPJeDKK/s400/npmVersioning2.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWVQmyUWy_RmXEfGwNgsu50wBvLq704Ejpg8sS5okdPk7ummrcDsv8mbwSUEw-ia9TBDnhnTl_NlF0SfTadKdD1UDvSKApVd0bF1D64F8f8Thtzh8mA5C_Gbnx0-5bfA65tjqRJ9iq0dky/s1600/npmVersioning3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="786" data-original-width="1600" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWVQmyUWy_RmXEfGwNgsu50wBvLq704Ejpg8sS5okdPk7ummrcDsv8mbwSUEw-ia9TBDnhnTl_NlF0SfTadKdD1UDvSKApVd0bF1D64F8f8Thtzh8mA5C_Gbnx0-5bfA65tjqRJ9iq0dky/s400/npmVersioning3.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-6346375421272213852018-02-24T16:27:00.000+00:002018-02-24T19:18:08.904+00:00Reference for converting GLSL to HLSL - Unity 3d ShaderToy<div>
<a href="https://msdn.microsoft.com/en-GB/library/windows/apps/dn166865.aspx?ranMID=24542&ranEAID=TnL5HPStwNw&ranSiteID=TnL5HPStwNw-6Ma4ZZxbZUhEVKVl119z5Q&tduid=(a09704fb53f605580d3bf4b9ec3f9d7d)(256380)(2459594)(TnL5HPStwNw-6Ma4ZZxbZUhEVKVl119z5Q)()">Microsoft GLSL-HLSL reference</a><br />
<a href="https://docs.unity3d.com/Manual/SL-ShaderPrograms.html">UNITY3d Shader Info</a></div>
<div>
<br /></div>
<ul style="background: rgb(255, 255, 255); border: 0px; list-style: square; margin: 0px 0px 24px 1.5em; padding: 0px; vertical-align: baseline;">
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">iGlobalTime</strong> shader input (“shader playback time in seconds”) with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">_Time.y</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace<strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> <span class="skimlinks-unlinked" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">iResolution.xy</span></strong> (“viewport resolution in pixels”) with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">_ScreenParams.xy</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">vec2</strong> types with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">float2</strong>, <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mat2</strong> with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">float2x2</strong> etc.</li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">vec3(1)</strong> shortcut constructors in which all elements have same value with explicit <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">float3(1,1,1)</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Texture2D</strong> with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Tex2D</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">atan(x,y)</strong> with<strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"> atan2(y,x)</strong> <- Note parameter ordering!</li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mix()</strong> with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">lerp()</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">*=</strong> with <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mul()</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace signed integer vector <b>ive2, ivec3, ivec4</b> with<b> int2, int3,int4</b></span></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace iTime with _Time</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Remove third (bias) parameter from Texture2D lookups</li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;"><strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">mainImage(out vec4 fragColor, in vec2 fragCoord)</strong> is the fragment shader function, equivalent to <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">float4 mainImage(float2 fragCoord : SV_POSITION) : SV_Target</strong></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">UV coordinates in GLSL have 0 at the top and increase downwards, in HLSL 0 is at the bottom and increases upwards, so you may need to use <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">uv.y = 1 – uv.y</strong> at some point.</li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;">Replace <b>fract </b>with <b>frac</b></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;"><b>Replace function dFdx with ddx</b></li>
<li style="background: transparent; border: 0px; color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline;"><b>Replace function dfdy with ddy</b></li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><b style="color: #333333; font-family: Georgia, "Bitstream Charter", serif; font-size: 16px;">fragCoord </b><span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">in GLSL</span><br />
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">Default Unity shader naming :</span><br />
<br />
HLSL - Shader Lab in Unity</li>
</ul>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">struct v2f</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>float2 uv : TEXCOORD0;</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>float4 vertex : SV_POSITION;</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>};<br />
<br />
In frag method:</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"></span><br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">fixed4 frag (v2f i) : SV_Target</span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">{</span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> // GLSL - fragCoord, <b>fragCoord</b>.xy = i.vertex.xy</span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> i.vertex.position </span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">}</span><br />
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span> <span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">In GLSL we would have method:</span><br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">void mainImage( out vec4 fragColor, in vec2 <b>fragCoord </b>)</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">{</span></div>
<div>
</div>
</div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">}</span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span> <br />
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"> </span><br />
<div>
<ul>
<li><span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">Replace <b>mod </b>with <b>fmod</b></span></li>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">
</span></ul>
</div>
</div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;"><br />
</span></div>
<div>
<span style="color: #333333; font-family: "georgia" , "bitstream charter" , serif;">I took some information from https://alastaira.wordpress.com/2015/08/07/unity-shadertoys-a-k-a-converting-glsl-shaders-to-cghlsl/</span></div>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com0tag:blogger.com,1999:blog-3410441503882094512.post-51928510134419857322018-02-14T09:44:00.000+00:002018-02-14T09:44:28.312+00:00Principles for fast and good game development<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/KFziBfvAFnM/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/KFziBfvAFnM?feature=player_embedded" width="320"></iframe></div>
<h3>
<span style="font-family: Trebuchet MS, sans-serif; font-weight: normal;"><br /></span><span style="font-family: Trebuchet MS, sans-serif; font-weight: normal;">Above video is a John Romero's presentation in WeAreDevelopers 2017. Just in case you are not sure who is John Romero, he was one of the main creators behind FPS legends such as Doom, Wolfenstein 3D, Quake. </span><br />
<span style="font-family: Trebuchet MS, sans-serif; font-weight: normal;"><br /></span>
<span style="font-family: Trebuchet MS, sans-serif; font-weight: normal;">I personally think is the easiest way to improve skills in any field is to listen the experts. I wasted too much time in the past trying to figure out too many things on my own. I summarize principles that John Romero's team was following. There is not a paradigm in those, however it is good to print them and place them on your office wall as a good reminder to your team.</span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><br /></span>
<ol>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Polish game as you go</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Always maintain shippable code</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">No prototypes for small game/team</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Game can always be run by your team</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Have defaults for your core methods, so when someone override it with faulty code other team members won't be blocked by it.</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Keep code super simple, refactor as you go</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Test properly your code before you commit it, so testers do not have to waste too much time creating bug reports etc.</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Write code specifically for the game you are working on, do not try to make your code ready for future games as in the future you will be writing better code as you become more experienced</span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Run your code after writing few lines of code so you can quickly detect problem if occur </span></span></li>
<li><span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: normal;">Write the code is it is very easy to understand by other developers</span></span></li>
</ol>
<br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: 400;"><br /></span></span>
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: 400;">My </span><span style="font-size: 18.72px; font-weight: 400;">personal</span><span style="font-weight: 400;"> favourite that is </span><span style="font-size: 18.72px; font-weight: 400;">related</span><span style="font-weight: 400;"> to point 10</span></span><br />
<span style="font-family: Trebuchet MS, sans-serif;"><span style="font-weight: 400;"><br /></span></span>
<b style="color: #3a4145; font-family: "Open Sans", sans-serif; font-size: 17px;">Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.</b><span style="color: #3a4145; font-family: "Open Sans", sans-serif; font-size: 17px; font-weight: 400;"></span><br />
<div>
<b style="color: #3a4145; font-family: "Open Sans", sans-serif; font-size: 17px;"><br /></b></div>
<div style="color: #3a4145; font-family: "Open Sans", sans-serif; font-size: 17px; font-weight: 400; margin-bottom: 0.8em; margin-top: 0.8em;">
</div>
</h3>
Adam Bieleckihttp://www.blogger.com/profile/09009328766226552535noreply@blogger.com6