text:
0022460X85800687.html},
  journal = {Journal of Sound and Vibration},
  keywords = {_tablet},
  number = {4}
}

@article{zdravkovichFlowTwoIntersecting1985,
  title = {Flow {{Around Two Intersecting Circular Cylinders}}},
  author = {Zdravkovich, M. M.},
  year = {1985},
  volume = {107},
  pages = {507},
  issn = {00982202},
  doi = {10.1115/1.3242521},
  journal = {Journal of Fluids Engineering},
  language = {en},
  number = {4}
}

@article{zdravkovichInterferenceTwoCircular1977,
  title = {Interference between Two Circular Cylinders; {{Series}} of Unexpected Discontinuities},
  author = {Zdravkovich, M.M. and Pridden, D.L.},
  year = {1977},
  month = nov,
  volume = {2},
  pages = {255--270},
  issn = {01676105},
  doi = {10.1016/0167-6105(77)90026-5},
  file = {/home/san/Zotero/storage/H5RNEEJA/0167610577900265.html},
  journal = {Journal of Wind Engineering and Industrial Aerodynamics},
  language = {en},
  number = {3}
}

@article{zdravkovichReviewClassificationVarious1981,
  title = {Review and Classification of Various Aerodynamic and Hydrodynamic Means for Suppressing Vortex Shedding},
  author = {Zdravkovich, M. M.},
  year = {1981},
  month = mar,
  volume = {7},
  pages = {145--189},
  issn = {0167-6105},
  doi = {10.1016/0167-6105(81)90036-2},
  abstract = {A wide variety of aerodynamic and hydrodynamic means for suppressing vortex shedding is classified into three categories in accordance with the phenomenological mechanism of vortex shedding. The three categories are as follows: 1.(i) surface protrusions, which affect separation lines and/or separated shear layers, e.g. helical strakes, wires, fins, studs or spheres, etc.;2.(ii) shrouds, which affect the entrainment layers, e.g. perforated, gauze, axial-rod, axial-slat, etc.;(iii) nearwake stabilisers, which prevent interaction of entrainment layers, e.g. splitter plates, guiding vanes, base-bleed, slits cut across the cylinder, etc . Most means in the first two categories are omnidirectional, i.e. they are effective irrespective of the direction of fluid velocity. Some means in the first and all in the third category are unidirectional, i.e. they are effective only for one velocity direction. All means are described in detail and the reasons for their effectiveness explained. A comparative assessment of effectiveness is attempted and the need for comparative tests of various means under identical model conditions is stressed. The reduction of effectiveness in the post-synchronisation range, at high intensity of turbulence, and due to multi-cylinder interference is emphasised.},
  file = {/home/san/Zotero/storage/AEQAW3HB/0167610581900362.html;/home/san/Zotero/storage/GJEKRQI6/0167610581900362.html},
  journal = {Journal of Wind Engineering and Industrial Aerodynamics},
  number = {2}
}

@article{zdravkovichREVIEWReviewFlow1977,
  title = {{{REVIEW}}\textemdash{{Review}} of {{Flow Interference Between Two Circular Cylinders}} in {{Various Arrangements}}},
  author = {Zdravkovich, M. M.},
  year = {1977},
  volume = {99},
  pages = {618},
  issn = {00982202},
  doi = {10.1115/1.3448871},
  file = {/home/san/Zotero/storage/2GUP824E/413061.html},
  journal = {Journal of Fluids Engineering},
  language = {en},
  number = {4}
}

@article{zendehbadMeasurementsTowerDeflections2017a,
  title = {Measurements of Tower Deflections on Full-Scale Wind Turbines Using an Opto-Mechanical Platform},
  author = {Zendehbad, M. and Chokani, N. and Abhari, R.S.},
  year = {2017},
  month = sep,
  volume = {168},
  pages = {72--80},
  issn = {01676105},
  doi = {10.1016/j.jweia.2017.05.011},
  abstract = {In this study tower deflections of a full-scale turbine are measured with an opto-mechanical platform. This measurement approach is advantageous as no modification to the turbine is required. The tower deflections are measured simultaneously with measurements of wind speed and turbulence upstream of the turbine and of turbine parameters (blade pitch angle, rotor torque and rotor speed). Measurements show that tower deflections during normal operation are sensitive to the yaw misalignment of the rotor, and the tower deflections with negative yaw misalignment are seen to be larger than with positive yaw misalignment. The tower deflections during power cut-off and normal operation are, respectively, modeled with free and forced vibration single-degree-of-freedom models to calculate the damping ratio. The damping ratio during power cut-off, 6.8\%, is in the lower range of damping ratios that are measured during normal operation, 5.5\%\textendash 13.2\%. These findings suggest that blade pitch and rotor torque can be used to alleviate the unsteady structural loads caused by the lightly damped oscillations during transition to power cutoff. Additionally, positive yaw misalignments can be used as a strategy for load alleviation during normal operation of wind turbines.},
  file = {/home/san/Zotero/storage/9RI2XVPN/Zendehbad et al. - 2017 - Measurements of tower deflections on full-scale wi.pdf},
  journal = {Journal of Wind Engineering and Industrial Aerodynamics},
  keywords = {_tablet},
  language = {en}
}

@article{zhangClosedloopmanipulatedWakeStationary2005,
  title = {Closed-Loop-Manipulated Wake of a Stationary Square Cylinder},
  author = {Zhang, M. M. and Zhou, Y. and Cheng, L.},
  year = {2005},
  month = jul,
  volume = {39},
  pages = {75--85},
  issn = {1432-1114},
  doi = {10.1007/s00348-005-0979-3},
  abstract = {Vortex shedding from a fixed rigid square cylinder in a cross flow was manipulated by perturbing the cylinder surface using piezo-ceramic actuators, which were activated by a feedback hot-wire signal via a proportional\textendash integral\textendash derivative (PID) controller. The manipulated flow was measured at a Reynolds number (Re) of 7,400 using particle image velocimetry (PIV), laser-induced fluorescence (LIF) flow visualisation, two-component laser Doppler anemometry (LDA), hot wires and load cells. It is observed that the vortex circulation, fluctuating streamwise velocity, lift and drag coefficients and mean drag coefficient may decrease by 71\%, 40\%, 51\%, 42\% and 20\%, respectively, compared with the unperturbed flow, if the perturbation velocity of the cylinder surface is anti-phased with the flow lateral velocity associated with vortex shedding. On the other hand, these quantities may increase by 152\%, 90\%, 60\%, 67\% and 37\%, respectively, given in-phased cylinder surface perturbation and vortex shedding. Similar effects are obtained at Re=3,200 and 9,500, respectively. The relationship between the perturbation and flow modification is examined, which provides insight into the physics behind the observation.},
  file = {/home/san/Zotero/storage/BGZ6FAUL/zhang_et_al_2005_closed-loop-manipulated_wake_of_a_stationary_square_cylinder.pdf},
  journal = {Experiments in Fluids},
  keywords = {_tablet},
  language = {en},
  number = {1}
}

@article{zhangExperimentalInvestigationCoupled2020,
  title = {Experimental Investigation on Coupled Cross-Flow and in-Line Vortex-Induced Vibration Responses of Two Staggered Circular Cylinders},
  author = {Zhang, Cheng and Kang, Zhuang and Xiong, Yeping and Ai, Shangmao and Ma, Gang},
  year = {2020},
  month = mar,
  pages = {1475090220907473},
  publisher = {{SAGE Publications}},
  issn = {1475-0902},
  doi = {10.1177/1475090220907473},
  abstract = {In order to better understand the vortex-induced vibration mechanism of multiple cylinders, this article takes a relatively simple case of two staggered circular cylinders as the embarkation point and investigates their vortex-induced vibration characteristics by model test. The experimental Reynolds number ranges from 22,000 to 88,000. The in-line gap L is set as 3.0D, 3.6D, 4.2D and 5.5D in turn, and the cross-flow gap T is set as 0.7D, 1.1D, 1.5D, 1.9D, 2.3D and 2.7D, respectively. By measuring the vibrating response in model test, the response differences between the two staggered cylinders and the isolated cylinder and the effects of the gaps are discussed. The results indicate that the variation trend of response of the upstream cylinder with reduced velocity is basically similar to that of the isolated cylinder. However, the downstream cylinder shows some great differences. When the in-line gap ratio L/D is 3.6, the cross-flow amplitude curve of downstream cylinder changes from ``single peak'' to ``double peaks'' with the increase in cross-flow gap ratio T/D, and in-line amplitude curve even shows four different kinds of forms. When L/D is increasing, maximum amplitudes of the downstream cylinder in two directions also show an increasing trend, and the wake galloping phenomenon even appears in some conditions. Generally, the case of staggered cylinders is a generalized combination of two circular cylinders in tandem and side-by-side arrangements, and this article has extended the research scope of the double-cylinder vortex-induced vibration to arbitrary flow direction.},
  journal = {Proceedings of the Institution of Mechanical Engineers, Part M: Journal of Engineering for the Maritime Environment},
  language = {en}
}

@article{zhangFloatingStateOneStep2019,
  title = {Floating {{State}} of a {{One}}-{{Step Integrated Transportation Vessel}} with {{Two Composite Bucket Foundations}} and {{Offshore Wind Turbines}}},
  author = {Zhang, Puyang and Liang, Disheng and Ding, Hongyan and Le, Conghuan and Zhao, Xing},
  year = {2019},
  month = aug,
  volume = {7},
  pages = {263},
  doi = {10.3390/jmse7080263},
  abstract = {Offshore wind power is an important of source renewable energy. As a new technology, the one-step integrated transportation and installation technology of offshore wind power has broader application prospects. In order to ensure stability during the towing process, it is necessary to study the behavior of the wind turbine transportation structure. The numerical model of the specialized transportation vessel was set up by MOSES software. An analysis in the frequency domain and time domain was conducted considering the effects of draft, speed, and wave height on the towing stability of the wind turbine transportation vessel. The results show that the one-step integrated transportation method can ensure stability of the wind turbine during the towing process. Reducing draft, increasing speed, and increasing wave height will reduce the towing stability of the wind turbine. In the practical towing process, the combination of various adverse situations will be avoided.},
  annotation = {WOS:000482991100037},
  file = {/home/san/Zotero/storage/94VQQ83N/2019_Zhang et al_Floating State of a One-Step Integrated Transportation Vessel with Two.pdf},
  journal = {Journal of Marine Science and Engineering},
  keywords = {_tablet,air cushion floating structure,composite bucket   foundation(CBF),offshore wind turbine,one-step integrated transportation   and installation,towing technology,vessel},
  language = {English},
  number = {8}
}

@article{zhangSecondorderHydrodynamicEffects2020,
  title = {Second-Order Hydrodynamic Effects on the Response of Three Semisubmersible Floating Offshore Wind Turbines},
  author = {Zhang, Lixian and Shi, Wei and Karimirad, Madjid and Michailides, Constantine and Jiang, Zhiyu},
  year = {2020},
  month = jul,
  volume = {207},
  pages = {107371},
  issn = {00298018},
  doi = {10.1016/j.oceaneng.2020.107371},
  abstract = {Floating structures have become the most feasible solution for supporting wind turbines when offshore wind project move to deeper water. In this paper, a hydrodynamic analysis of three different semisubmersible floating offshore wind turbines is carried out including second-order hydrodynamic effects. The three examined platforms are V-shaped semisubmersible, Braceless semisubmersible and OC4-DeepCwind semisubmersible and are used to support the NREL 5 MW reference wind turbine. The main objective of the present study is to investigate and compare the hydrodynamic response of the three different semisubmersible floaters in two water depths (100 m, and 200 m) under different load conditions. The effects of second-order wave loads on the platform motions and mooring tension are discussed and compared by using different methods including Newman's approximation and the full QTF (Quadratic transfer function) method. The drag effect on the structure motion response is also discussed in this paper. The comparison presented is based on statistical values and response spectra of floating platform motions as well as mooring tensions. The results show that the dynamic response of semisubmersible FOWTs (floating offshore wind turbines) is overestimated when ignoring the Morison drag effect on the columns of the semisubmersible FOWT. The second-order difference wave loads can excite the resonance of motion especially for the platform-pitch motion, which could cause structural failures. The full QTF method should be used to calculate the second-order wave force to better simulate the realistic dynamic response of semi\- submersible FOWTs.},
  file = {/home/san/Zotero/storage/SLHTSQ5X/zhang_et_al_2020_second-order_hydrodynamic_effects_on_the_response_of_three_semisubmersible.pdf},
  journal = {Ocean Engineering},
  keywords = {_tablet},
  language = {en}
}

@article{zhangTransitionCylinderWake1995,
  title = {On the Transition of the Cylinder Wake},
  author = {Zhang, Hong-Quan and Fey, Uwe and Noack, Bernd R. and K{\"o}nig, Michael and Eckelmann, Helmut},
  year = {1995},
  month = apr,
  volume = {7},
  pages = {779--794},
  issn = {1070-6631},
  doi = {10.1063/1.868601},
  file = {/home/san/Zotero/storage/G4M9YAP2/zhang_et_al_1995_on_the_transition_of_the_cylinder_wake.pdf;/home/san/Zotero/storage/I5S8QC9A/1.html},
  journal = {Physics of Fluids},
  keywords = {_tablet},
  number = {4}
}

@article{zhaoIntegratedDynamicAnalysis2018,
  ids = {zhaoIntegratedDynamicAnalysis2018a},
  title = {An Integrated Dynamic Analysis Method for Simulating Installation of Single Blades for Wind Turbines},
  author = {Zhao, Yuna and Cheng, Zhengshun and Sandvik, Peter Christian and Gao, Zhen and Moan, Torgeir},
  year = {2018},
  month = mar,
  volume = {152},
  pages = {72--88},
  issn = {0029-8018},
  doi = {10.1016/j.oceaneng.2018.01.046},
  abstract = {Installation of blades for wind turbines is challenging due to large lifting height and high precision. Assessment of blade dynamic responses during installation needs advanced simulation tools which are limited at present. This paper alms at developing an integrated simulation tool SIMO-Aero for single blade installation for both onshore and offshore wind turbines. Based on the cross-flow principle, the aerodynamic model is established by accounting for the effect of wind turbulence and dynamic stall. Then it is coupled with SIMO to achieve the integrated simulation tool SIMO-Aero which can account for blade aerodynamics, vessel hydrodynamics and system mechanical couplings. The aerodynamic code is verified by code-to-code comparisons with HAWC2. Furthermore, SIMO-Aero is applied in case studies on the wind-induced dynamic responses of a DTU 10 MW blade during installation using a jack-up crane vessel which is assumed to be rigid, including the crane, and rigidly fixed to the seabed. The characteristics of system dynamic responses prior to mating the blade onto the hub are studied. It is shown that the blade motions are dominated by the pendulum motion. Critical parameters of the installation process are identified. The extreme responses of critical parameters are further studied under turbulent winds and wind gusts.},
  annotation = {WOS:000428489800008},
  file = {/home/san/Zotero/storage/MNGD76CL/2018_Zhao et al_An integrated dynamic analysis method for simulating installation of single.pdf;/home/san/Zotero/storage/NA56FYAN/zhao_et_al_2018_an_integrated_dynamic_analysis_method_for_simulating_installation_of_single.pdf;/home/san/Zotero/storage/GLNA26DR/S0029801818300465.html},
  journal = {Ocean Engineering},
  keywords = {_tablet,Blade installation,Extreme response,Fully coupled method,hoisting forces,Wind turbine},
  language = {English}
}

@article{zhaoIntegratedDynamicAnalysis2018a,
  title = {An Integrated Dynamic Analysis Method for Simulating Installation of Single Blades for Wind Turbines},
  author = {Zhao, Yuna and Cheng, Zhengshun and Sandvik, Peter Christian and Gao, Zhen and Moan, Torgeir},
  year = {2018},
  month = mar,
  volume = {152},
  pages = {72--88},
  issn = {00298018},
  doi = {10.1016/j.oceaneng.2018.01.046},
  abstract = {Installation of blades for wind turbines is challenging due to large lifting height and high precision. Assessment of blade dynamic responses during installation needs advanced simulation tools which are limited at present. This paper aims at developing an integrated simulation tool SIMO-Aero for single blade installation for both onshore and offshore wind turbines. Based on the cross-flow principle, the aerodynamic model is established by accounting for the effect of wind turbulence and dynamic stall. Then it is coupled with SIMO to achieve the integrated simulation tool SIMO-Aero which can account for blade aerodynamics, vessel hydrodynamics and system mechanical couplings. The aerodynamic code is verified by code-to-code comparisons with HAWC2. Furthermore, SIMO-Aero is applied in case studies on the wind-induced dynamic responses of a DTU 10 MW blade during installation using a jack-up crane vessel which is assumed to be rigid, including the crane, and rigidly fixed to the seabed. The characteristics of system dynamic responses prior to mating the blade onto the hub are studied. It is shown that the blade motions are dominated by the pendulum motion. Critical parameters of the installation process are identified. The extreme responses of critical parameters are further studied under turbulent winds and wind gusts.},
  file = {/home/san/Zotero/storage/GYR7UPIX/zhao_et_al_2018_an_integrated_dynamic_analysis_method_for_simulating_installation_of_single.pdf},
  journal = {Ocean Engineering},
  keywords = {_tablet},
  language = {en}
}

@article{zhaoNumericalModelingAnalysis2018,
  title = {Numerical Modeling and Analysis of the Dynamic Motion Response of an Offshore Wind Turbine Blade during Installation by a Jack-up Crane Vessel},
  author = {Zhao, Yuna and Cheng, Zhengshun and Sandvik, Peter Christian and Gao, Zhen and Moan, Torgeir and Van Buren, Eric},
  year = {2018},
  month = oct,
  volume = {165},
  pages = {353--364},
  issn = {0029-8018},
  doi = {10.1016/j.oceaneng.2018.07.049},
  abstract = {Jack-up crane vessels are commonly used to install offshore wind turbine blades and other components. A jack-up crane vessel is subjected to wind and wave loads, which cause motion at crane tip. Excessive motion at crane tip can lead to failure of lifting operations. Therefore, the crane tip motion should be properly assessed for jack-up crane vessels. In this study, a fully coupled model is developed for a typical elevated jack-up crane vessel, considering the hydrodynamic and aerodynamic loads on the vessel, the soil-structure interaction, and the structural flexibility of the jack-up legs and crane. The vessel model developed is further coupled with the SIMO-Aero code to achieve a fully coupled aero-hydro-soil-elastic-mechanical code SIMO-RIFLEX-Aero for numerical modeling and dynamic analysis of offshore single blade installation using jack-up crane vessels. The SIMO-RIFLEX-Aero code is then applied to study the dynamic response of the DTU 10 MW wind turbine blade installed by a typical jack-up crane vessel under various wind and wave conditions. The results show that significant motion is induced at crane tip, mainly due to wave loads. It is important to consider the structural flexibility of the jack-up legs and crane when modeling the installation of offshore wind turbine blades.},
  file = {/home/san/Zotero/storage/3Y6PQVTZ/zhao_et_al_2018_numerical_modeling_and_analysis_of_the_dynamic_motion_response_of_an_offshore.pdf;/home/san/Zotero/storage/YIFYZEVD/S0029801818313416.html},
  journal = {Ocean Engineering},
  keywords = {_tablet,Dynamic motion response,Fully coupled method,Jack-up crane vessel,Offshore wind turbine blade installation,Soil-structure interaction,Structural flexibility},
  language = {en}
}

@article{zhaoNumericalStudyFeasibility2019,
  title = {Numerical Study on the Feasibility of Offshore Single Blade Installation by Floating Crane Vessels},
  author = {Zhao, Yuna and Cheng, Zhengshun and Gao, Zhen and Sandvik, Peter Christian and Moan, Torgeir},
  year = {2019},
  month = mar,
  volume = {64},
  pages = {442--462},
  issn = {0951-8339},
  doi = {10.1016/j.marstruc.2018.12.001},
  abstract = {Compared with jack-up crane vessels that are now widely used in offshore wind turbine installation, floating crane vessels are more flexible with respect to working water depth and are much faster in relocation. They are thus a promising alternative to install offshore wind turbine components, especially in intermediate and deep water. However, the wave-induced motions of the floating vessels make the operations challenging. This study deals with a preliminary feasibility study on offshore single blade installation using floating crane vessels. Two typical floating crane vessels are considered, i.e., a mono-hull vessel and a semi-submersible vessel. They are assumed to be equipped with dynamic positioning systems that can well mitigate the slowly varying horizontal motions. Their overall performance during the blade installation is numerically evaluated by comparing their performance against a typical jack-up crane vessel. The crane dynamics plays a less important role for blade installation by floating vessels, compared to the jack-up crane vessel. The floating vessels' wave-induced motion greatly affects the blade motion. The semi-submersible vessel causes a much smaller blade motion than the mono-hull vessel. The results indicate that it is feasible to install offshore wind turbine blades by using floating crane vessels provided that the vessel type is properly selected. From the operability point of view, semi-submersible vessels are more feasible than mono-hull vessels for offshore single blade installations.},
  annotation = {WOS:000458228900026},
  file = {/home/san/Zotero/storage/RK5WJJTK/2019_Zhao et al_Numerical study on the feasibility of offshore single blade installation by.pdf},
  journal = {Marine Structures},
  keywords = {_tablet,Dynamic motion response,Feasibility study,Floating crane vessels,Fully coupled method,monopile,Offshore wind turbine blade installation,wind turbine blade},
  language = {English}
}

@article{zhouNumericalInvestigationsAerodynamic2015,
  title = {Numerical Investigations on the Aerodynamic Performance of Wind Turbine: {{Downwind}} versus Upwind Configuration},
  shorttitle = {Numerical Investigations on the Aerodynamic Performance of Wind Turbine},
  author = {Zhou, Hu and Wan, Decheng},
  year = {2015},
  month = mar,
  volume = {14},
  pages = {61--68},
  issn = {1993-5048},
  doi = {10.1007/s11804-015-1295-9},
  abstract = {Although the upwind configuration is more popular in the field of wind energy, the downwind one is a promising type for the offshore wind energy due to its special advantages. Different configurations have different aerodynamic performance and it is important to predict the performance of both downwind and upwind configurations accurately for designing and developing more reliable wind turbines. In this paper, a numerical investigation on the aerodynamic performance of National Renewable Energy Laboratory (NREL) phase VI wind turbine in downwind and upwind configurations is presented. The open source toolbox OpenFOAM coupled with arbitrary mesh interface (AMI) method is applied to tackle rotating problems of wind turbines. Two 3D numerical models of NREL phase VI wind turbine with downwind and upwind configurations under four typical working conditions of incoming wind velocities are set up for the study of different unsteady characteristics of the downwind and upwind configurations, respectively. Numerical results of wake vortex structure, time histories of thrust, pressure distribution on the blade and limiting streamlines which can be used to identify points of separation in a 3D flow are presented. It can be concluded that thrust reduction due to blade-tower interaction is small for upwind wind turbines but relatively large for downwind wind turbines and attention should be paid to the vibration at a certain frequency induced by the cyclic reduction for both configurations. The results and conclusions are helpful to analyze the different aerodynamic performance of wind turbines between downwind and upwind configurations, providing useful references for practical design of wind turbine.},
  file = {/home/san/Zotero/storage/FXPFRHZY/zhou_wan_2015_numerical_investigations_on_the_aerodynamic_performance_of_wind_turbine.pdf;/home/san/Zotero/storage/SYPPS9LY/zhou_wan_2015_numerical_investigations_on_the_aerodynamic_performance_of_wind_turbine.pdf},
  journal = {Journal of Marine Science and Application},
  keywords = {_tablet,aerodynamic performance,arbitrary mesh interface (AMI),downwind and upwind configuration,offshore wind energy,OpenFOAM,wake flows,wind turbine},
  language = {en},
  number = {1}
}

@inproceedings{zhuStudyLiftingOperation2017,
  ids = {zhuStudyLiftingOperation2017a,zhuStudyLiftingOperation2017b},
  title = {Study of Lifting Operation of a Tripod Foundation for Offshore Wind Turbine},
  booktitle = {{{IOP Conference Series}}: {{Materials Science}} and {{Engineering}}},
  author = {Zhu, H. and Li, L. and Ong, M. C.},
  year = {2017},
  month = dec,
  volume = {276},
  pages = {012012},
  doi = {10.1088/1757-899X/276/1/012012},
  abstract = {This study addresses numerical analysis of the installation of a tripod foundation using a heavy lift vessel (HLV). Limiting sea states are firstly predicted in the frequency domain based on crane tip vertical motions using linear transfer functions. Then, numerical modelling and simulations are carried out in the time domain to analyse the coupled dynamic system taking into consideration of the nonlinearities of the system. In time-domain analysis, two lifting phases are brought into focus, i.e., the lift-off and the lowering phases. For the lift-off phase, two scenarios are considered, i.e., lift-off from the own deck of the HLV and lift-off from a transport barge. Moreover, comparative studies using two types of installation vessels, a floating vessel and a Jack-up, are investigated for the lowering process. Critical responses including the motions of the tripod and the lift wire tensions are presented and compared under various environmental and loading conditions.},
  file = {/home/san/Zotero/storage/X54ZBKSD/zhu_et_al_2017_study_of_lifting_operation_of_a_tripod_foundation_for_offshore_wind_turbine.pdf},
  keywords = {_tablet,monopile},
  language = {en}
}

@book{ziadaFlowinducedVibrationProceedings2000,
  title = {Flow-Induced Vibration: Proceedings of the 7th {{International Conference}} on {{Flow}}-{{Induced Vibration}} - {{FIV}} 2000, {{Lucerne}}, {{Switzerland}}, 19-22 {{June}} 2000},
  shorttitle = {Flow-Induced Vibration},
  editor = {Ziada, Samir and Staubli, Thomas},
  year = {2000},
  publisher = {{Balkema}},
  address = {{Rotterdam}},
  annotation = {OCLC: ocm45540991},
  file = {/home/san/Zotero/storage/Q3IA27TJ/ziada_staubli_2000_flow-induced_vibration.pdf},
  isbn = {978-90-5809-129-1},
  keywords = {_tablet,Congresses,Fluid dynamics,Vibration},
  language = {en},
  lccn = {TA355 .I529 2000}
}

@article{zieglerBriefCommunicationStructural2017,
  title = {Brief Communication: {{Structural}} Monitoring for Lifetime Extension of Offshore Wind Monopiles: Can Strain Measurements at One Level Tell Us Everything ?},
  shorttitle = {Brief Communication},
  author = {Ziegler, Lisa and Smolka, Ursula and Cosack, Nicolai and Muskulus, Michael},
  year = {2017},
  month = sep,
  volume = {2},
  pages = {469--476},
  issn = {2366-7443},
  doi = {10.5194/wes-2-469-2017},
  abstract = {Operators need accurate knowledge on structural reserves to decide about lifetime extension of offshore wind turbines. Load monitoring enables us to directly compare design loads with real loading histories of the support structure in order to calculate its remaining useful lifetime. Monitoring of every hot spot is technically and financially not feasible. This paper presents a novel idea for load monitoring of monopiles. ft requires strain measurements at only one level convenient for sensor installation, such as tower bottom. Measurements are converted into damage equivalent loads for 10min time intervals. Damage equivalent loads are extrapolated to other locations of the structure with a simulation model and statistical algorithm. For this, structural loads at all locations of the monopile are calculated with aero-hydro-elastic software and updated finite element models. Damage equivalent loads at unmeasured locations are predicted from the simulation results with a kappa-nearest neighbor regression algorithm. The extrapolation was tested with numerical simulations of an 8 MW offshore wind turbine. Results show that damage can be predicted with an error of 1-3 \% if this is done conditional on mean wind speed, which is very promising. The load monitoring concept is simple, cheap and easy to implement. This makes it ideal for making decisions on lifetime extension of monopiles.},
  annotation = {WOS:000414290000001},
  journal = {Wind Energy Science},
  keywords = {turbine},
  language = {English},
  number = {2}
}

@book{zoubirBOOTSTRAPTECHNIQUESSIGNAL,
  ids = {zoubirBOOTSTRAPTECHNIQUESSIGNALa},
  title = {{{BOOTSTRAP TECHNIQUES FOR SIGNAL PROCESSING}}},
  author = {Zoubir, Abdelhak M and Iskander, D Robert},
  file = {/home/san/Zotero/storage/NFAQ9ZZS/zoubir_iskander_bootstrap_techniques_for_signal_processing.pdf;/home/san/Zotero/storage/RL6WY4YF/zoubir_iskander_bootstrap_techniques_for_signal_processing.pdf},
  keywords = {_tablet},
  language = {en}
}

@article{zoubirBOOTSTRAPTECHNIQUESSIGNALa,
  title = {{{BOOTSTRAP TECHNIQUES FOR SIGNAL PROCESSING}}},
  author = {Zoubir, Abdelhak M and Iskander, D Robert},
  pages = {231},
  file = {/home/san/Zotero/storage/Y3KBEZQC/Zoubir and Iskander - BOOTSTRAP TECHNIQUES FOR SIGNAL PROCESSING.pdf},
  keywords = {_tablet},
  language = {en}
}

@article{zuoMitigationTowerOutofplane2019,
  title = {Mitigation of Tower and Out-of-Plane Blade Vibrations of Offshore Monopile Wind Turbines by Using Multiple Tuned Mass Dampers},
  author = {Zuo, Haoran and Bi, Kaiming and Hao, Hong},
  year = {2019},
  month = feb,
  volume = {15},
  pages = {269--284},
  issn = {1573-2479, 1744-8980},
  doi = {10.1080/15732479.2018.1550096},
  abstract = {Offshore wind turbines are vulnerable to external vibration sources such as wind and wave excitations due to the increasing size and flexibility. It is necessary to mitigate the excessive vibrations of offshore wind turbines to ensure the safety and serviceability during their operations. Some research works have been carried out to control the excessive vibrations of the tower and the in-plane vibrations of blades. Very limited study focuses on the out-of-plane vibration mitigation of blades. In the present study, a detailed finite element (FE) model of the latest NREL 5MW wind turbine is developed by using the FE code ABAQUS. The tower and blades are explicitly modelled, and the rotating of the blades is considered. Multiple tuned mass dampers (MTMDs) are proposed to be installed in the tower and each blade to simultaneously mitigate the out-of-plane vibrations of the tower and blades when the wind turbine is subjected to the combined wind and wave loadings. The effectiveness and robustness of the proposed method are systematically investigated. Numerical results show that MTMDs can effectively mitigate the out-of-plane vibrations of the tower and blades when the wind turbine is in either the operational or parked condition.},
  file = {/home/san/Zotero/storage/QJEQMMXM/zuo_et_al_2019_mitigation_of_tower_and_out-of-plane_blade_vibrations_of_offshore_monopile_wind.pdf},
  journal = {Structure and Infrastructure Engineering},
  keywords = {_tablet},
  language = {en},
  number = {2}
}

@article{zuoStateoftheartReviewVibration2020,
  title = {A State-of-the-Art Review on the Vibration Mitigation of Wind Turbines},
  author = {Zuo, Haoran and Bi, Kaiming and Hao, Hong},
  year = {2020},
  month = apr,
  volume = {121},
  pages = {109710},
  issn = {13640321},
  doi = {10.1016/j.rser.2020.109710},
  abstract = {Wind energy as one of the renewable energies is serving as an indispensable role in generating new electric power. The worldwide installation of wind farms has considerably increased recently. To extract more wind resources, multi-megawatt wind turbines are usually designed and constructed with large rotors and slender tower. These flexible structures are susceptible to external dynamic excitations such as wind, wave and seismic loads. The excessive vibrations can compromise the wind energy conversion, lead to the structural fatigue damage and even result in the catastrophic failure of wind turbines in harsh environmental conditions. Various control devices have been proposed and used to mitigate the unwanted vibrations of wind turbines to enhance their safety and serviceability. This paper aims to provide a state-of-the-art review of the current vibration control techniques and their applications to wind turbines. Firstly, the widely used control strategies in engi\- neering structures are briefly introduced. Their applications to suppress the adverse vibrations of the structural components of wind turbines, mainly the tower and blades, are then reviewed and discussed in detail. It can be concluded that the vibration mitigation of wind turbines is very challenging due to the fact that the dynamic behaviours of wind turbines are very complicated, which are associated with the aerodynamics, rotation of the blades, interaction between the tower and rotating blades, and soil-structure interaction, etc. Moreover, it is a challenge to straightforwardly use many of the conventional control devices because of the limited spaces in the tower and blades.},
  file = {/home/san/Zotero/storage/IZGT63JR/Zuo et al. - 2020 - A state-of-the-art review on the vibration mitigat.pdf},
  journal = {Renewable and Sustainable Energy Reviews},
  keywords = {_tablet},
  language = {en}
}

license: MIT

license_type: permissive

branch_name: refs/heads/main

extension: bib


text:
package libdrmaa

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"github.com/dgruber/drmaa"
	"github.com/dgruber/drmaa2interface"
)

var _ = Describe("Jobstate", func() {

	Context("basic tests", func() {

		It("should convert the state", func() {
			state := ConvertDRMAAStateToDRMAA2State(drmaa.PsUndetermined)
			Expect(state).To(Equal(drmaa2interface.Undetermined))

			Expect(ConvertDRMAAStateToDRMAA2State(drmaa.PsQueuedActive)).To(Equal(drmaa2interface.Queued))
			Expect(ConvertDRMAAStateToDRMAA2State(drmaa.PsRunning)).To(Equal(drmaa2interface.Running))
			Expect(ConvertDRMAAStateToDRMAA2State(drmaa.PsDone)).To(Equal(drmaa2interface.Done))
			Expect(ConvertDRMAAStateToDRMAA2State(drmaa.PsFailed)).To(Equal(drmaa2interface.Failed))
		})
	})

})

branch_name: refs/heads/master

gha_language: Go

extension: go


text:
@article{WangweiExploringTifs2014,
 abstract = {In this paper, we focus on local image tampering detection. For a JPEG image, the probability distributions of its DCT coefficients will be disturbed by tampering operation. The tampered region and the unchanged region have different distributions, which is an important clue for locating tampering. Based on the assumption of Laplacian distribution of unquantized ac DCT coefficients, these two distributions as well as the size of tampered region can be estimated so that the probability of each DCT block being tampered is obtained. More accurate localization results could be got when we consider the prior knowledge of common tampered regions. We also design three kinds of features that can distinguish truly tampered regions from the false ones to reduce false alarm. For a tampered image which is saved in lossless compressed format, we also propose the specialized approach, which employs the quantization noise of high-frequency DCT coefficient, to improve the tampering localization performance. Extensive experiments on large scale databases prove the effectiveness of our proposed method and demonstrate that our method is suitable for locating tampered regions with different scales.},
 author = {Wang, Wei and Dong, Jing and Tan, Tieniu},
 doi = {10.1109/TIFS.2014.2345479},
 issn = {15566013},
 journal = {IEEE Transactions on Information Forensics and Security},
 keywords = {Image forensics,double quantization,graph cut,local tampering detection},
 month = {oct},
 number = {10},
 pages = {1653--1666},
 publisher = {IEEE},
 title = {Exploring DCT Coefficient Quantization Effects for Local Tampering Detection},
 url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=6871380},
 volume = {9},
 year = {2014}
}


text:
/*
Copyright 2020 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
	"context"
	"fmt"

	"knative.dev/client/pkg/config"

	"k8s.io/client-go/util/retry"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
	messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
	clientmessagingv1 "knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1"
	duckv1 "knative.dev/pkg/apis/duck/v1"

	knerrors "knative.dev/client/pkg/errors"
)

type SubscriptionUpdateFunc func(origSub *messagingv1.Subscription) (*messagingv1.Subscription, error)

// KnSubscriptionsClient for interacting with Subscriptions
type KnSubscriptionsClient interface {

	// GetSubscription returns a Subscription by its name
	GetSubscription(ctx context.Context, name string) (*messagingv1.Subscription, error)

	// CreateSubscription creates a Subscription with given spec
	CreateSubscription(ctx context.Context, subscription *messagingv1.Subscription) error

	// UpdateSubscription updates a Subscription with given spec
	UpdateSubscription(ctx context.Context, subscription *messagingv1.Subscription) error

	// UpdateSubscriptionWithRetry updates a Subscription and retries on conflict error
	UpdateSubscriptionWithRetry(ctx context.Context, name string, updateFunc SubscriptionUpdateFunc, nrRetries int) error

	// DeleteSubscription deletes a Subscription by its name
	DeleteSubscription(ctx context.Context, name string) error

	// ListSubscription lists all Subscriptions
	ListSubscription(ctx context.Context) (*messagingv1.SubscriptionList, error)

	// Namespace returns the namespace for this subscription client
	Namespace() string
}

// subscriptionsClient struct holds the client interface and namespace
type subscriptionsClient struct {
	client    clientmessagingv1.SubscriptionInterface
	namespace string
}

// newKnSubscriptionsClient returns kn subscriptions client
func newKnSubscriptionsClient(client clientmessagingv1.SubscriptionInterface, namespace string) KnSubscriptionsClient {
	return &subscriptionsClient{
		client:    client,
		namespace: namespace,
	}
}

// Get the namespace for which this client is created
func (c *subscriptionsClient) Namespace() string {
	return c.namespace
}

// GetSubscription gets Subscription by its name
func (c *subscriptionsClient) GetSubscription(ctx context.Context, name string) (*messagingv1.Subscription, error) {
	subscription, err := c.client.Get(ctx, name, metav1.GetOptions{})
	if err != nil {
		return nil, knerrors.GetError(err)
	}
	err = updateMessagingGVK(subscription)
	if err != nil {
		return nil, err
	}
	return subscription, nil
}

// CreateSubscription creates Subscription with given spec
func (c *subscriptionsClient) CreateSubscription(ctx context.Context, subscription *messagingv1.Subscription) error {
	_, err := c.client.Create(ctx, subscription, metav1.CreateOptions{})
	return knerrors.GetError(err)
}

// UpdateSubscription creates Subscription with given spec
func (c *subscriptionsClient) UpdateSubscription(ctx context.Context, subscription *messagingv1.Subscription) error {
	_, err := c.client.Update(ctx, subscription, metav1.UpdateOptions{})
	return knerrors.GetError(err)
}

func (c *subscriptionsClient) UpdateSubscriptionWithRetry(ctx context.Context, name string, updateFunc SubscriptionUpdateFunc, nrRetries int) error {
	return updateSubscriptionWithRetry(ctx, c, name, updateFunc, nrRetries)
}

func updateSubscriptionWithRetry(ctx context.Context, c KnSubscriptionsClient, name string, updateFunc SubscriptionUpdateFunc, nrRetries int) error {
	b := config.DefaultRetry
	b.Steps = nrRetries
	err := retry.RetryOnConflict(b, func() error {
		return updateSubscription(ctx, c, name, updateFunc)
	})
	return err
}

func updateSubscription(ctx context.Context, c KnSubscriptionsClient, name string, updateFunc SubscriptionUpdateFunc) error {
	sub, err := c.GetSubscription(ctx, name)
	if err != nil {
		return err
	}
	if sub.GetDeletionTimestamp() != nil {
		return fmt.Errorf("can't update subscription %s because it has been marked for deletion", name)
	}
	updatedSub, err := updateFunc(sub.DeepCopy())
	if err != nil {
		return err
	}

	return c.UpdateSubscription(ctx, updatedSub)
}

// DeleteSubscription deletes Subscription by its name
func (c *subscriptionsClient) DeleteSubscription(ctx context.Context, name string) error {
	return knerrors.GetError(c.client.Delete(ctx, name, metav1.DeleteOptions{}))
}

// ListSubscription lists subscriptions in configured namespace
func (c *subscriptionsClient) ListSubscription(ctx context.Context) (*messagingv1.SubscriptionList, error) {
	subscriptionList, err := c.client.List(ctx, metav1.ListOptions{})
	if err != nil {
		return nil, knerrors.GetError(err)
	}

	return updateSubscriptionListGVK(subscriptionList)
}

func updateSubscriptionListGVK(subscriptionList *messagingv1.SubscriptionList) (*messagingv1.SubscriptionList, error) {
	subscriptionListNew := subscriptionList.DeepCopy()
	err := updateMessagingGVK(subscriptionListNew)
	if err != nil {
		return nil, err
	}

	subscriptionListNew.Items = make([]messagingv1.Subscription, len(subscriptionList.Items))
	for idx, subscription := range subscriptionList.Items {
		subscriptionClone := subscription.DeepCopy()
		err := updateMessagingGVK(subscriptionClone)
		if err != nil {
			return nil, err
		}
		subscriptionListNew.Items[idx] = *subscriptionClone
	}
	return subscriptionListNew, nil
}

// SubscriptionBuilder is for building the Subscription object
type SubscriptionBuilder struct {
	subscription *messagingv1.Subscription
}

// NewSubscriptionBuilder for building Subscription object
func NewSubscriptionBuilder(name string) *SubscriptionBuilder {
	return &SubscriptionBuilder{subscription: &messagingv1.Subscription{
		TypeMeta: metav1.TypeMeta{
			APIVersion: messagingv1.SchemeGroupVersion.String(),
			Kind:       "Subscription",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name: name,
		},
	}}
}

// NewSubscriptionBuilderFromExisting for building Subscription object from existing Subscription object
func NewSubscriptionBuilderFromExisting(subs *messagingv1.Subscription) *SubscriptionBuilder {
	return &SubscriptionBuilder{subscription: subs.DeepCopy()}
}

// Channel sets the channel reference for this subscription
func (s *SubscriptionBuilder) Channel(channel *duckv1.KReference) *SubscriptionBuilder {
	if channel == nil {
		return s
	}

	s.subscription.Spec.Channel = *channel
	return s
}

func (s *SubscriptionBuilder) Subscriber(subs *duckv1.Destination) *SubscriptionBuilder {
	if subs == nil {
		return s
	}

	s.subscription.Spec.Subscriber = subs
	return s
}

func (s *SubscriptionBuilder) Reply(reply *duckv1.Destination) *SubscriptionBuilder {
	if reply == nil {
		return s
	}

	s.subscription.Spec.Reply = reply
	return s
}

func (s *SubscriptionBuilder) DeadLetterSink(dls *duckv1.Destination) *SubscriptionBuilder {
	if dls == nil {
		return s
	}

	ds := &eventingduckv1.DeliverySpec{}
	ds.DeadLetterSink = dls
	s.subscription.Spec.Delivery = ds
	return s
}

// Build returns the Subscription object from the builder
func (s *SubscriptionBuilder) Build() *messagingv1.Subscription {
	return s.subscription
}

repository: knative/client

repo_name: knative/client


text:
package auth

import (
	//	"github.com/astaxie/beego"
	"github.com/astaxie/beego/context"
	"github.com/juusechec/jwt-beego"

	"strings"
)

func GetClaims(ctx *context.Context) string {
	//	tokenString := c.Ctx.Input.Query("tokenString")
	auth := ctx.Input.Header("Authorization")
	if len(auth) > 0 {
		header := strings.Split(auth, " ")
		if len(header) != 2 || header[0] != "Bearer" {
			return ""
		}

		et := jwtbeego.EasyToken{}
		valid, claims, _ := et.ValidateToken(header[1])
		if !valid {
			return ""
		}
		return claims
	}
	return ""
}

func GetUsername(ctx *context.Context) (username string) {
	claims := GetClaims(ctx)
	return claims

}

repository: NyaaPantsu/manga

repo_name: NyaaPantsu/manga

gha_license_id: MIT


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;

namespace Firehose.Web.Authors
{
    public class JM2K69 : IAmAMicrosoftMVP
    {
        public string FirstName => "Jerome";
        public string LastName => "Bezet-Torres";
        public string Pronouns => "";
        public string ShortBioOrTagLine => "Geek, Father, Trainer,MCT";
        public string StateOrRegion => "Lyon, FR";
        public string EmailAddress => "bezettorres.jerome@gmail.com";
        public string TwitterHandle => "JM2K69";
        public string MastodonHandle => "";
        public string GitHubHandle => "JM2K69";
        public string GravatarHash => "d1c4718717fd44b6577e071b73649882";
        public GeoPosition Position => new GeoPosition(45.750000, 4.850000);
        public Uri WebSite => new Uri("https://JM2K69.github.io/");
        public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://jm2k69.github.io/feed.xml"); } }
        public bool Filter(SyndicationItem item)
        {
            // This filters out only the posts that have the "PowerShell" category
            return item.Categories?.Any(c => c.Name.ToLowerInvariant().Contains("powershell")) ?? false;
        }
        public string FeedLanguageCode => "en";

    }
}

repository: planetpowershell/planetpowershell

repo_name: planetpowershell/planetpowershell

gha_language: JavaScript

extension: cs


text:
// Copyright © 2020 Danila Petrunko. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.

package rdate_test

import (
	"testing"
	"time"

	"github.com/petrunkodg/rdate"
)

func TestDefaultTimeStringer(t *testing.T) {
	ts := time.Date(2019, 12, 11, 0, 2, 1, 6, time.UTC)

	expected := "2019-12-11 00:02:01"

	actual := rdate.DefaultTimeStringer.String(ts)
	if actual != expected {
		t.Errorf("expected: '%s', but actual: '%s'", expected, actual)
	}
}

repository: petrunkodg/rdate

repo_name: petrunkodg/rdate


text:
package db_test

import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/dynamodb"
	"github.com/phelix-/psostats/v2/pkg/model"
	"github.com/phelix-/psostats/v2/server/internal/db"
	"log"
	"testing"
	"time"
)

func TestGetPlayerRecentGames(t *testing.T) {

	sess, err := session.NewSession(&aws.Config{
		Region:   aws.String("us-west-2"),
		Endpoint: aws.String("http://localhost:8000"),
	})
	if err != nil {
		log.Println(err)
		return
	}
	dynamoClient := dynamodb.New(sess)
	if err = CreateAllTables(dynamoClient); err != nil {
		t.Error(err)
	}

	games, err := db.GetRecentGames(dynamoClient)
	for _, game := range games {
		log.Printf("%v - %v", game.Id, game.Quest)
	}
	questRun := createMockGame()
	id, err := db.WriteGameById(questRun, dynamoClient)
	if err != nil {
		t.Error(err)
	}
	returned, err := db.GetGame(id, dynamoClient)
	if err != nil {
		t.Error(err)
	}
	if returned.QuestName != questRun.QuestName {
		t.Fatalf("Quest names didn't match")
	}
}

func createMockGame() *model.QuestRun {
	startDate := time.Date(2021, time.April, 24, 15, 19, 0, 0, time.Local)
	questRun := model.QuestRun{
		Server:      "unseen",
		PlayerName:  "bvelix",
		PlayerClass: "HUcast",
		GuildCard:   "phelix",
		AllPlayers: []model.BasePlayerInfo{
			{Name: "bvelix", GuildCard: "42", Level: 200, Class: "HUcast"},
			{Name: "player2", GuildCard: "43", Level: 200, Class: "HUnewearl"},
		},
		Id:                  "",
		Difficulty:          "Ultimate",
		Episode:             1,
		QuestName:           "Sweep-up Operation #1",
		QuestComplete:       true,
		QuestStartTime:      startDate,
		QuestEndTime:        startDate.Add(time.Minute*5 + time.Second*20),
		QuestDuration:       (time.Minute*5 + time.Second*20).String(),
		DeathCount:          2,
		HP:                  nil,
		TP:                  nil,
		Meseta:              nil,
		MesetaCharged:       nil,
		Room:                nil,
		IllegalShifta:       false,
		PbCategory:          false,
		ShiftaLvl:           nil,
		DebandLvl:           nil,
		Invincible:          nil,
		Events:              nil,
		Monsters:            nil,
		MonsterCount:        nil,
		MonstersKilledCount: nil,
		MonstersDead:        0,
		WeaponsUsed:         nil,
		FreezeTraps:         nil,
		FTUsed:              12,
		DTUsed:              3,
		CTUsed:              1,
		TPUsed:              0,
	}
	return &questRun
}

func CreateAllTables(dynamoClient *dynamodb.DynamoDB) error {
	result, err := dynamoClient.ListTables(&dynamodb.ListTablesInput{})
	if err != nil {
		return err
	}
	tables := make(map[string]bool)
	for _, tableName := range result.TableNames {
		tables[*tableName] = true
	}
	if _, exists := tables["games_by_id"]; !exists {
		if err = CreateGamesById(dynamoClient); err != nil {
			return err
		}
	}
	if _, exists := tables["games_counter"]; !exists {
		if err = CreateGamesCounter(dynamoClient); err != nil {
			return err
		}
	}
	if _, exists := tables[db.RecentGamesByMonth]; !exists {
		if err = CreateRecentGamesByMonth(dynamoClient); err != nil {
			return err
		}
	}
	return nil
}

func CreateGamesById(dynamoClient *dynamodb.DynamoDB) error {
	attributeDefinition := dynamodb.AttributeDefinition{
		AttributeName: aws.String("Id"),
		AttributeType: aws.String(dynamodb.ScalarAttributeTypeS),
	}
	keySchemaElement := dynamodb.KeySchemaElement{
		AttributeName: aws.String("Id"),
		KeyType:       aws.String(dynamodb.KeyTypeHash),
	}
	provisionedThroughput := dynamodb.ProvisionedThroughput{
		ReadCapacityUnits:  aws.Int64(1),
		WriteCapacityUnits: aws.Int64(1),
	}
	createTableInput := dynamodb.CreateTableInput{
		AttributeDefinitions:  []*dynamodb.AttributeDefinition{&attributeDefinition},
		KeySchema:             []*dynamodb.KeySchemaElement{&keySchemaElement},
		TableName:             aws.String("games_by_id"),
		ProvisionedThroughput: &provisionedThroughput,
	}
	_, err := dynamoClient.CreateTable(&createTableInput)
	return err
}

func CreateGamesCounter(dynamoClient *dynamodb.DynamoDB) error {
	provisionedThroughput := dynamodb.ProvisionedThroughput{
		ReadCapacityUnits:  aws.Int64(1),
		WriteCapacityUnits: aws.Int64(1),
	}
	attributeDefinition := dynamodb.AttributeDefinition{
		AttributeName: aws.String("key"),
		AttributeType: aws.String(dynamodb.ScalarAttributeTypeS),
	}
	keySchemaElement := dynamodb.KeySchemaElement{
		AttributeName: aws.String("key"),
		KeyType:       aws.String(dynamodb.KeyTypeHash),
	}
	createTableInput := dynamodb.CreateTableInput{
		AttributeDefinitions:  []*dynamodb.AttributeDefinition{&attributeDefinition},
		KeySchema:             []*dynamodb.KeySchemaElement{&keySchemaElement},
		TableName:             aws.String("games_counter"),
		ProvisionedThroughput: &provisionedThroughput,
	}
	_, err := dynamoClient.CreateTable(&createTableInput)
	return err
}

func CreateRecentGamesByMonth(dynamoClient *dynamodb.DynamoDB) error {
	provisionedThroughput := dynamodb.ProvisionedThroughput{
		ReadCapacityUnits:  aws.Int64(1),
		WriteCapacityUnits: aws.Int64(1),
	}
	pk := dynamodb.AttributeDefinition{
		AttributeName: aws.String("Month"),
		AttributeType: aws.String(dynamodb.ScalarAttributeTypeS),
	}
	pkSchema := dynamodb.KeySchemaElement{
		AttributeName: aws.String("Month"),
		KeyType:       aws.String(dynamodb.KeyTypeHash),
	}
	sortKey := dynamodb.AttributeDefinition{
		AttributeName: aws.String("Id"),
		AttributeType: aws.String(dynamodb.ScalarAttributeTypeS),
	}
	sortKeySchema := dynamodb.KeySchemaElement{
		AttributeName: aws.String("Id"),
		KeyType:       aws.String(dynamodb.KeyTypeRange),
	}
	createTableInput := dynamodb.CreateTableInput{
		AttributeDefinitions:  []*dynamodb.AttributeDefinition{&pk, &sortKey},
		KeySchema:             []*dynamodb.KeySchemaElement{&pkSchema, &sortKeySchema},
		TableName:             aws.String(db.RecentGamesByMonth),
		ProvisionedThroughput: &provisionedThroughput,
	}
	_, err := dynamoClient.CreateTable(&createTableInput)
	return err
}

repository: PhantomPhire/psostats-client

repo_name: PhantomPhire/psostats-client


text:
// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls
//
// Copyright 2019 Centrifuge GmbH
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package types

import (
	"fmt"
	"hash"
	"strings"

	"github.com/centrifuge/go-substrate-rpc-client/v4/scale"
)

type MetadataV13 struct {
	Modules   []ModuleMetadataV13
	Extrinsic ExtrinsicV11
}

func (m *MetadataV13) Decode(decoder scale.Decoder) error {
	err := decoder.Decode(&m.Modules)
	if err != nil {
		return err
	}
	return decoder.Decode(&m.Extrinsic)
}

func (m MetadataV13) Encode(encoder scale.Encoder) error {
	err := encoder.Encode(m.Modules)
	if err != nil {
		return err
	}
	return encoder.Encode(m.Extrinsic)
}

func (m *MetadataV13) FindCallIndex(call string) (CallIndex, error) {
	s := strings.Split(call, ".")
	for _, mod := range m.Modules {
		if !mod.HasCalls {
			continue
		}
		if string(mod.Name) != s[0] {
			continue
		}
		for ci, f := range mod.Calls {
			if string(f.Name) == s[1] {
				return CallIndex{mod.Index, uint8(ci)}, nil
			}
		}
		return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call)
	}
	return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call)
}

func (m *MetadataV13) FindEventNamesForEventID(eventID EventID) (Text, Text, error) {
	for _, mod := range m.Modules {
		if !mod.HasEvents {
			continue
		}
		if mod.Index != eventID[0] {
			continue
		}
		if int(eventID[1]) >= len(mod.Events) {
			return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name)
		}
		return mod.Name, mod.Events[eventID[1]].Name, nil
	}
	return "", "", fmt.Errorf("module index %v out of range", eventID[0])
}

func (m *MetadataV13) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) {
	for _, mod := range m.Modules {
		if !mod.HasStorage {
			continue
		}
		if string(mod.Storage.Prefix) != module {
			continue
		}
		for _, s := range mod.Storage.Items {
			if string(s.Name) != fn {
				continue
			}
			return s, nil
		}
		return nil, fmt.Errorf("storage %v not found within module %v", fn, module)
	}
	return nil, fmt.Errorf("module %v not found in metadata", module)
}

func (m *MetadataV13) FindConstantValue(module Text, constant Text) ([]byte, error) {
	for _, mod := range m.Modules {
		if mod.Name == module {
			value, err := mod.FindConstantValue(constant)
			if err == nil {
				return value, nil
			}
		}
	}
	return nil, fmt.Errorf("could not find constant %s.%s", module, constant)
}

func (m *MetadataV13) ExistsModuleMetadata(module string) bool {
	for _, mod := range m.Modules {
		if string(mod.Name) == module {
			return true
		}
	}
	return false
}

type ModuleMetadataV13 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadataV13
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
	Constants  []ModuleConstantMetadataV6
	Errors     []ErrorMetadataV8
	Index      uint8
}

func (m *ModuleMetadataV13) Decode(decoder scale.Decoder) error {
	err := decoder.Decode(&m.Name)
	if err != nil {
		return err
	}

	err = decoder.DecodeOption(&m.HasStorage, &m.Storage)
	if err != nil {
		return err
	}

	err = decoder.DecodeOption(&m.HasCalls, &m.Calls)
	if err != nil {
		return err
	}

	err = decoder.DecodeOption(&m.HasEvents, &m.Events)
	if err != nil {
		return err
	}

	err = decoder.Decode(&m.Constants)
	if err != nil {
		return err
	}

	err = decoder.Decode(&m.Errors)
	if err != nil {
		return err
	}

	return decoder.Decode(&m.Index)
}

func (m ModuleMetadataV13) Encode(encoder scale.Encoder) error {
	err := encoder.Encode(m.Name)
	if err != nil {
		return err
	}

	err = encoder.EncodeOption(m.HasStorage, m.Storage)
	if err != nil {
		return err
	}

	err = encoder.EncodeOption(m.HasCalls, m.Calls)
	if err != nil {
		return err
	}

	err = encoder.EncodeOption(m.HasEvents, m.Events)
	if err != nil {
		return err
	}

	err = encoder.Encode(m.Constants)
	if err != nil {
		return err
	}

	err = encoder.Encode(m.Errors)
	if err != nil {
		return err
	}

	return encoder.Encode(m.Index)
}

func (m *ModuleMetadataV13) FindConstantValue(constant Text) ([]byte, error) {
	for _, cons := range m.Constants {
		if cons.Name == constant {
			return cons.Value, nil
		}
	}
	return nil, fmt.Errorf("could not find constant %s", constant)
}

type StorageMetadataV13 struct {
	Prefix Text
	Items  []StorageFunctionMetadataV13
}

type StorageFunctionMetadataV13 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageFunctionTypeV13
	Fallback      Bytes
	Documentation []Text
}

func (s StorageFunctionMetadataV13) IsPlain() bool {
	return s.Type.IsType
}

func (s StorageFunctionMetadataV13) Hasher() (hash.Hash, error) {
	return DefaultPlainHasher(s)
}

func (s StorageFunctionMetadataV13) IsMap() bool {
	return s.Type.IsMap || s.Type.IsDoubleMap || s.Type.IsNMap
}

func (s StorageFunctionMetadataV13) Hashers() ([]hash.Hash, error) {
	if !s.IsMap() {
		return nil, fmt.Errorf("Hashers() is only to be called on Maps")
	}

	var hashers = collectHashersV13(s.Type)
	hasherFns := make([]hash.Hash, len(hashers))
	for i, hasher := range hashers {
		hasherFn, err := hasher.HashFunc()
		if err != nil {
			return nil, err
		}
		hasherFns[i] = hasherFn
	}
	return hasherFns, nil
}

func collectHashersV13(x StorageFunctionTypeV13) []StorageHasherV10 {
	switch {
	case x.IsMap:
		return []StorageHasherV10{x.AsMap.Hasher}
	case x.IsDoubleMap:
		return []StorageHasherV10{x.AsDoubleMap.Hasher, x.AsDoubleMap.Key2Hasher}
	case x.IsNMap:
		return x.AsNMap.Hashers
	default:
		panic("Unexpexted type")
	}
}

type StorageFunctionTypeV13 struct {
	IsType      bool
	AsType      Type // 0
	IsMap       bool
	AsMap       MapTypeV10 // 1
	IsDoubleMap bool
	AsDoubleMap DoubleMapTypeV10 // 2
	IsNMap      bool
	AsNMap      NMapTypeV13 // 3
}

func (s *StorageFunctionTypeV13) Decode(decoder scale.Decoder) error {
	var t uint8
	err := decoder.Decode(&t)
	if err != nil {
		return err
	}

	switch t {
	case 0:
		s.IsType = true
		err = decoder.Decode(&s.AsType)
		if err != nil {
			return err
		}
	case 1:
		s.IsMap = true
		err = decoder.Decode(&s.AsMap)
		if err != nil {
			return err
		}
	case 2:
		s.IsDoubleMap = true
		err = decoder.Decode(&s.AsDoubleMap)
		if err != nil {
			return err
		}
	case 3:
		s.IsNMap = true
		err = decoder.Decode(&s.AsNMap)
		if err != nil {
			return err
		}
	default:
		return fmt.Errorf("received unexpected type %v", t)
	}
	return nil
}

func (s StorageFunctionTypeV13) Encode(encoder scale.Encoder) error {
	switch {
	case s.IsType:
		err := encoder.PushByte(0)
		if err != nil {
			return err
		}
		err = encoder.Encode(s.AsType)
		if err != nil {
			return err
		}
	case s.IsMap:
		err := encoder.PushByte(1)
		if err != nil {
			return err
		}
		err = encoder.Encode(s.AsMap)
		if err != nil {
			return err
		}
	case s.IsDoubleMap:
		err := encoder.PushByte(2)
		if err != nil {
			return err
		}
		err = encoder.Encode(s.AsDoubleMap)
		if err != nil {
			return err
		}
	case s.IsNMap:
		err := encoder.PushByte(3)
		if err != nil {
			return err
		}
		err = encoder.Encode(s.AsNMap)
		if err != nil {
			return err
		}
	default:
		return fmt.Errorf("expected to be either type, map, double map or nmap but none was set: %v", s)
	}
	return nil
}

type NMapTypeV13 struct {
	Keys    []Type
	Hashers []StorageHasherV10
	Value   Type
}

repository: centrifuge/go-substrate-rpc-client

repo_name: centrifuge/go-substrate-rpc-client


text:
SUMMARY = "Rust compiler run-time"
HOMEPAGE = "http://www.rust-lang.org"
SECTION = "devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362"

SRC_URI = "\
	https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
    "

require rust-source-${PV}.inc

ALLOW_EMPTY_${PN} = "1"

# dev and staticdev should NOT depend on the binary package
RDEPENDS_${PN}-dev = ""
INSANE_SKIP_${PN}-dev = "staticdev"

S = "${WORKDIR}/rustc-${PV}/src/compiler-rt"

do_compile () {
	oe_runmake -C ${S} \
		ProjSrcRoot="${S}" \
		ProjObjRoot="${B}" \
		CC="${CC}" \
		AR="${AR}" \
		RANLIB="${RANLIB}" \
		CFLAGS="${CFLAGS}" \
		TargetTriple=${HOST_SYS} \
		triple-builtins
}

do_install () {
	mkdir -p ${D}${libdir}
	cp triple/builtins/libcompiler_rt.a ${D}${libdir}/libcompiler-rt.a
}

FILES_${PN}-dev = ""
FILES_${PN}-staticdev = "${libdir}/*.a"

gha_language: Python

extension: bb


text:
/* Internal dependencies */
import { css, styled, Typography } from '../../../foundation'
import DisabledOpacity from '../../../constants/DisabledOpacity'
import { SemanticNames } from '../../../foundation/Colors/Theme'
import { Icon } from '../../Icon'
import { WithInterpolation } from '../../../types/InjectedInterpolation'
import {
  inputWrapperStyle,
  focusedInputWrapperStyle,
  erroredInputWrapperStyle,
} from '../constants/InputWrapperStyle'
import { TextFieldSize, TextFieldVariant } from './TextField.types'

interface ClickableElementProps {
  clickable: boolean
}

const clickableElementStyle = css`
  cursor: pointer;
`

const Input = styled.input<WithInterpolation>`
  width: 100%;
  height: 100%;
  ${Typography.Size14}
  padding: 0;

  color: ${({ foundation }) => foundation?.theme?.['txt-black-darkest']};

  background-color: transparent;
  border: none;
  outline: none;

  &::placeholder {
    color: ${({ foundation }) => foundation?.theme?.['txt-black-dark']};
  }

  ${({ interpolation }) => interpolation}
`

const LeftIcon = styled(Icon)<ClickableElementProps>`
  ${({ clickable }) => clickable && clickableElementStyle}
`

const LeftContentWrapper = styled.div<WithInterpolation>`
  display: flex;
  align-items: center;
  padding-right: 6px;

  ${({ interpolation }) => interpolation}
`

const RightContentWrapper = styled.div<WithInterpolation>`
  display: flex;
  align-items: center;
  padding-right: 2px;

  ${({ interpolation }) => interpolation}
`

const RightItemWrapper = styled.div<ClickableElementProps & WithInterpolation>`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;

  ${({ clickable }) => clickable && clickableElementStyle}

  ${({ interpolation }) => interpolation}
`

const ClearIconWrapper = styled.div`
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding-right: 2px;

  color: ${({ foundation }) => foundation?.theme?.['txt-black-dark']};

  :hover {
    color: ${({ foundation }) => foundation?.theme?.['txt-black-darker']};
  }

  ${clickableElementStyle}
`

interface WrapperProps {
  variant?: TextFieldVariant
  bgColor: SemanticNames
  size?: TextFieldSize
  hasError?: boolean
  focused?: boolean
  disabled?: boolean
}

const Wrapper = styled.div<WrapperProps & WithInterpolation>`
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: ${({ size }) => size}px;
  padding: 0 10px;
  background-color: ${({ foundation, bgColor }) => foundation?.theme?.[bgColor]};

  ${({ foundation }) => foundation?.rounding.round8}
  opacity: ${({ disabled }) => disabled && DisabledOpacity};

  ${({ variant }) => variant === TextFieldVariant.Primary && inputWrapperStyle};
  ${({ focused }) => focused && focusedInputWrapperStyle}
  ${({ hasError }) => hasError && erroredInputWrapperStyle}

  ${({ foundation }) => foundation?.transition?.getTransitionsCSS(['border-color', 'box-shadow'])};

  ${({ interpolation }) => interpolation}
`

export default {
  Input,
  LeftIcon,
  LeftContentWrapper,
  RightItemWrapper,
  RightContentWrapper,
  ClearIconWrapper,
  Wrapper,
}

repository: danivelop/bezier-react

repo_name: danivelop/bezier-react

extension: ts