text
stringlengths
1
1.04M
language
stringclasses
25 values
<!DOCTYPE html> <html id="htmlId"> <head> <title>Coverage Report > ClspGraph</title> <style type="text/css"> @import "../../css/coverage.css"; @import "../../css/highlight-idea.css"; </style> <script type="text/javascript" src="../../js/highlight.pack.js"></script> </head> <body> <div class="content"> <div class="breadCrumbs"> Current scope: <a href="../../index.html">all classes</a> <span class="separator">|</span> <a href="../index.html">jadx.core.clsp</a> </div> <h1>Coverage Summary for Class: ClspGraph (jadx.core.clsp)</h1> <table class="coverageStats"> <tr> <th class="name">Class</th> <th class="coverageStat "> Class, % </th> <th class="coverageStat "> Method, % </th> <th class="coverageStat "> Block, % </th> <th class="coverageStat "> Line, % </th> </tr> <tr> <td class="name">ClspGraph</td> <td class="coverageStat"> <span class="percent"> 100% </span> <span class="absValue"> (1/1) </span> </td> <td class="coverageStat"> <span class="percent"> 90.5% </span> <span class="absValue"> (19/21) </span> </td> <td class="coverageStat"> <span class="percent"> 75% </span> <span class="absValue"> (15/20) </span> </td> <td class="coverageStat"> <span class="percent"> 72% </span> <span class="absValue"> (77/107) </span> </td> </tr> </table> <br/> <br/> <pre> <div class="sourceCode" id="sourceCode"><i class="no-highlight">1</i>&nbsp;package jadx.core.clsp; <i class="no-highlight">2</i>&nbsp; <i class="no-highlight">3</i>&nbsp;import java.io.IOException; <i class="no-highlight">4</i>&nbsp;import java.util.ArrayList; <i class="no-highlight">5</i>&nbsp;import java.util.Collections; <i class="no-highlight">6</i>&nbsp;import java.util.HashMap; <i class="no-highlight">7</i>&nbsp;import java.util.HashSet; <i class="no-highlight">8</i>&nbsp;import java.util.List; <i class="no-highlight">9</i>&nbsp;import java.util.Map; <i class="no-highlight">10</i>&nbsp;import java.util.Set; <i class="no-highlight">11</i>&nbsp; <i class="no-highlight">12</i>&nbsp;import org.jetbrains.annotations.Nullable; <i class="no-highlight">13</i>&nbsp;import org.slf4j.Logger; <i class="no-highlight">14</i>&nbsp;import org.slf4j.LoggerFactory; <i class="no-highlight">15</i>&nbsp; <i class="no-highlight">16</i>&nbsp;import jadx.core.dex.info.MethodInfo; <i class="no-highlight">17</i>&nbsp;import jadx.core.dex.instructions.args.ArgType; <i class="no-highlight">18</i>&nbsp;import jadx.core.dex.nodes.ClassNode; <i class="no-highlight">19</i>&nbsp;import jadx.core.dex.nodes.IMethodDetails; <i class="no-highlight">20</i>&nbsp;import jadx.core.dex.nodes.RootNode; <i class="no-highlight">21</i>&nbsp;import jadx.core.utils.exceptions.DecodeException; <i class="no-highlight">22</i>&nbsp;import jadx.core.utils.exceptions.JadxRuntimeException; <i class="no-highlight">23</i>&nbsp; <i class="no-highlight">24</i>&nbsp;/** <i class="no-highlight">25</i>&nbsp; * Classes hierarchy graph with methods additional info <i class="no-highlight">26</i>&nbsp; */ <i class="no-highlight">27</i>&nbsp;public class ClspGraph { <b class="fc"><i class="no-highlight">28</i>&nbsp; private static final Logger LOG = LoggerFactory.getLogger(ClspGraph.class);</b> <i class="no-highlight">29</i>&nbsp; <i class="no-highlight">30</i>&nbsp; private final RootNode root; <i class="no-highlight">31</i>&nbsp; private Map&lt;String, ClspClass&gt; nameMap; <i class="no-highlight">32</i>&nbsp; private Map&lt;String, Set&lt;String&gt;&gt; superTypesCache; <i class="no-highlight">33</i>&nbsp; private Map&lt;String, List&lt;String&gt;&gt; implementsCache; <i class="no-highlight">34</i>&nbsp; <b class="fc"><i class="no-highlight">35</i>&nbsp; private final Set&lt;String&gt; missingClasses = new HashSet&lt;&gt;();</b> <i class="no-highlight">36</i>&nbsp; <b class="fc"><i class="no-highlight">37</i>&nbsp; public ClspGraph(RootNode rootNode) {</b> <b class="fc"><i class="no-highlight">38</i>&nbsp; this.root = rootNode;</b> <i class="no-highlight">39</i>&nbsp; } <i class="no-highlight">40</i>&nbsp; <i class="no-highlight">41</i>&nbsp; public void load() throws IOException, DecodeException { <b class="fc"><i class="no-highlight">42</i>&nbsp; ClsSet set = new ClsSet(root);</b> <b class="fc"><i class="no-highlight">43</i>&nbsp; set.loadFromClstFile();</b> <b class="fc"><i class="no-highlight">44</i>&nbsp; addClasspath(set);</b> <i class="no-highlight">45</i>&nbsp; } <i class="no-highlight">46</i>&nbsp; <i class="no-highlight">47</i>&nbsp; public void addClasspath(ClsSet set) { <b class="pc"><i class="no-highlight">48</i>&nbsp; if (nameMap == null) {</b> <b class="fc"><i class="no-highlight">49</i>&nbsp; nameMap = new HashMap&lt;&gt;(set.getClassesCount());</b> <b class="fc"><i class="no-highlight">50</i>&nbsp; set.addToMap(nameMap);</b> <i class="no-highlight">51</i>&nbsp; } else { <b class="nc"><i class="no-highlight">52</i>&nbsp; throw new JadxRuntimeException(&quot;Classpath already loaded&quot;);</b> <i class="no-highlight">53</i>&nbsp; } <i class="no-highlight">54</i>&nbsp; } <i class="no-highlight">55</i>&nbsp; <i class="no-highlight">56</i>&nbsp; public void addApp(List&lt;ClassNode&gt; classes) { <b class="pc"><i class="no-highlight">57</i>&nbsp; if (nameMap == null) {</b> <b class="nc"><i class="no-highlight">58</i>&nbsp; throw new JadxRuntimeException(&quot;Classpath must be loaded first&quot;);</b> <i class="no-highlight">59</i>&nbsp; } <b class="fc"><i class="no-highlight">60</i>&nbsp; for (ClassNode cls : classes) {</b> <b class="fc"><i class="no-highlight">61</i>&nbsp; addClass(cls);</b> <b class="fc"><i class="no-highlight">62</i>&nbsp; }</b> <i class="no-highlight">63</i>&nbsp; } <i class="no-highlight">64</i>&nbsp; <i class="no-highlight">65</i>&nbsp; public void initCache() { <b class="fc"><i class="no-highlight">66</i>&nbsp; fillSuperTypesCache();</b> <b class="fc"><i class="no-highlight">67</i>&nbsp; fillImplementsCache();</b> <i class="no-highlight">68</i>&nbsp; } <i class="no-highlight">69</i>&nbsp; <i class="no-highlight">70</i>&nbsp; public boolean isClsKnown(String fullName) { <b class="fc"><i class="no-highlight">71</i>&nbsp; return nameMap.containsKey(fullName);</b> <i class="no-highlight">72</i>&nbsp; } <i class="no-highlight">73</i>&nbsp; <i class="no-highlight">74</i>&nbsp; public ClspClass getClsDetails(ArgType type) { <b class="fc"><i class="no-highlight">75</i>&nbsp; return nameMap.get(type.getObject());</b> <i class="no-highlight">76</i>&nbsp; } <i class="no-highlight">77</i>&nbsp; <i class="no-highlight">78</i>&nbsp; @Nullable <i class="no-highlight">79</i>&nbsp; public IMethodDetails getMethodDetails(MethodInfo methodInfo) { <b class="fc"><i class="no-highlight">80</i>&nbsp; ClspClass cls = nameMap.get(methodInfo.getDeclClass().getRawName());</b> <b class="fc"><i class="no-highlight">81</i>&nbsp; if (cls == null) {</b> <b class="fc"><i class="no-highlight">82</i>&nbsp; return null;</b> <i class="no-highlight">83</i>&nbsp; } <b class="fc"><i class="no-highlight">84</i>&nbsp; ClspMethod clspMethod = getMethodFromClass(cls, methodInfo);</b> <b class="fc"><i class="no-highlight">85</i>&nbsp; if (clspMethod != null) {</b> <b class="fc"><i class="no-highlight">86</i>&nbsp; return clspMethod;</b> <i class="no-highlight">87</i>&nbsp; } <i class="no-highlight">88</i>&nbsp; // deep search <b class="fc"><i class="no-highlight">89</i>&nbsp; for (ArgType parent : cls.getParents()) {</b> <b class="fc"><i class="no-highlight">90</i>&nbsp; ClspClass clspParent = getClspClass(parent);</b> <b class="fc"><i class="no-highlight">91</i>&nbsp; if (clspParent != null) {</b> <b class="fc"><i class="no-highlight">92</i>&nbsp; ClspMethod methodFromParent = getMethodFromClass(clspParent, methodInfo);</b> <b class="fc"><i class="no-highlight">93</i>&nbsp; if (methodFromParent != null) {</b> <b class="fc"><i class="no-highlight">94</i>&nbsp; return methodFromParent;</b> <i class="no-highlight">95</i>&nbsp; } <i class="no-highlight">96</i>&nbsp; } <i class="no-highlight">97</i>&nbsp; } <i class="no-highlight">98</i>&nbsp; // unknown method <b class="fc"><i class="no-highlight">99</i>&nbsp; return new SimpleMethodDetails(methodInfo);</b> <i class="no-highlight">100</i>&nbsp; } <i class="no-highlight">101</i>&nbsp; <i class="no-highlight">102</i>&nbsp; private ClspMethod getMethodFromClass(ClspClass cls, MethodInfo methodInfo) { <b class="fc"><i class="no-highlight">103</i>&nbsp; return cls.getMethodsMap().get(methodInfo.getShortId());</b> <i class="no-highlight">104</i>&nbsp; } <i class="no-highlight">105</i>&nbsp; <i class="no-highlight">106</i>&nbsp; private void addClass(ClassNode cls) { <b class="fc"><i class="no-highlight">107</i>&nbsp; ArgType clsType = cls.getClassInfo().getType();</b> <b class="fc"><i class="no-highlight">108</i>&nbsp; String rawName = clsType.getObject();</b> <b class="fc"><i class="no-highlight">109</i>&nbsp; ClspClass clspClass = new ClspClass(clsType, -1);</b> <b class="fc"><i class="no-highlight">110</i>&nbsp; clspClass.setParents(ClsSet.makeParentsArray(cls));</b> <b class="fc"><i class="no-highlight">111</i>&nbsp; nameMap.put(rawName, clspClass);</b> <i class="no-highlight">112</i>&nbsp; } <i class="no-highlight">113</i>&nbsp; <i class="no-highlight">114</i>&nbsp; /** <i class="no-highlight">115</i>&nbsp; * @return {@code clsName} instanceof {@code implClsName} <i class="no-highlight">116</i>&nbsp; */ <i class="no-highlight">117</i>&nbsp; public boolean isImplements(String clsName, String implClsName) { <b class="fc"><i class="no-highlight">118</i>&nbsp; Set&lt;String&gt; anc = getSuperTypes(clsName);</b> <b class="fc"><i class="no-highlight">119</i>&nbsp; return anc.contains(implClsName);</b> <i class="no-highlight">120</i>&nbsp; } <i class="no-highlight">121</i>&nbsp; <i class="no-highlight">122</i>&nbsp; public List&lt;String&gt; getImplementations(String clsName) { <b class="fc"><i class="no-highlight">123</i>&nbsp; List&lt;String&gt; list = implementsCache.get(clsName);</b> <b class="pc"><i class="no-highlight">124</i>&nbsp; return list == null ? Collections.emptyList() : list;</b> <i class="no-highlight">125</i>&nbsp; } <i class="no-highlight">126</i>&nbsp; <i class="no-highlight">127</i>&nbsp; private void fillImplementsCache() { <b class="fc"><i class="no-highlight">128</i>&nbsp; Map&lt;String, List&lt;String&gt;&gt; map = new HashMap&lt;&gt;(nameMap.size());</b> <b class="fc"><i class="no-highlight">129</i>&nbsp; List&lt;String&gt; classes = new ArrayList&lt;&gt;(nameMap.keySet());</b> <b class="fc"><i class="no-highlight">130</i>&nbsp; Collections.sort(classes);</b> <b class="fc"><i class="no-highlight">131</i>&nbsp; for (String cls : classes) {</b> <b class="fc"><i class="no-highlight">132</i>&nbsp; for (String st : getSuperTypes(cls)) {</b> <b class="fc"><i class="no-highlight">133</i>&nbsp; map.computeIfAbsent(st, v -&gt; new ArrayList&lt;&gt;()).add(cls);</b> <b class="fc"><i class="no-highlight">134</i>&nbsp; }</b> <b class="fc"><i class="no-highlight">135</i>&nbsp; }</b> <b class="fc"><i class="no-highlight">136</i>&nbsp; implementsCache = map;</b> <i class="no-highlight">137</i>&nbsp; } <i class="no-highlight">138</i>&nbsp; <i class="no-highlight">139</i>&nbsp; public String getCommonAncestor(String clsName, String implClsName) { <b class="nc"><i class="no-highlight">140</i>&nbsp; if (clsName.equals(implClsName)) {</b> <b class="nc"><i class="no-highlight">141</i>&nbsp; return clsName;</b> <i class="no-highlight">142</i>&nbsp; } <b class="nc"><i class="no-highlight">143</i>&nbsp; ClspClass cls = nameMap.get(implClsName);</b> <b class="nc"><i class="no-highlight">144</i>&nbsp; if (cls == null) {</b> <b class="nc"><i class="no-highlight">145</i>&nbsp; missingClasses.add(clsName);</b> <b class="nc"><i class="no-highlight">146</i>&nbsp; return null;</b> <i class="no-highlight">147</i>&nbsp; } <b class="nc"><i class="no-highlight">148</i>&nbsp; if (isImplements(clsName, implClsName)) {</b> <b class="nc"><i class="no-highlight">149</i>&nbsp; return implClsName;</b> <i class="no-highlight">150</i>&nbsp; } <b class="nc"><i class="no-highlight">151</i>&nbsp; Set&lt;String&gt; anc = getSuperTypes(clsName);</b> <b class="nc"><i class="no-highlight">152</i>&nbsp; return searchCommonParent(anc, cls);</b> <i class="no-highlight">153</i>&nbsp; } <i class="no-highlight">154</i>&nbsp; <i class="no-highlight">155</i>&nbsp; private String searchCommonParent(Set&lt;String&gt; anc, ClspClass cls) { <b class="nc"><i class="no-highlight">156</i>&nbsp; for (ArgType p : cls.getParents()) {</b> <b class="nc"><i class="no-highlight">157</i>&nbsp; String name = p.getObject();</b> <b class="nc"><i class="no-highlight">158</i>&nbsp; if (anc.contains(name)) {</b> <b class="nc"><i class="no-highlight">159</i>&nbsp; return name;</b> <i class="no-highlight">160</i>&nbsp; } <b class="nc"><i class="no-highlight">161</i>&nbsp; ClspClass nCls = getClspClass(p);</b> <b class="nc"><i class="no-highlight">162</i>&nbsp; if (nCls != null) {</b> <b class="nc"><i class="no-highlight">163</i>&nbsp; String r = searchCommonParent(anc, nCls);</b> <b class="nc"><i class="no-highlight">164</i>&nbsp; if (r != null) {</b> <b class="nc"><i class="no-highlight">165</i>&nbsp; return r;</b> <i class="no-highlight">166</i>&nbsp; } <i class="no-highlight">167</i>&nbsp; } <i class="no-highlight">168</i>&nbsp; } <b class="nc"><i class="no-highlight">169</i>&nbsp; return null;</b> <i class="no-highlight">170</i>&nbsp; } <i class="no-highlight">171</i>&nbsp; <i class="no-highlight">172</i>&nbsp; public Set&lt;String&gt; getSuperTypes(String clsName) { <b class="fc"><i class="no-highlight">173</i>&nbsp; Set&lt;String&gt; result = superTypesCache.get(clsName);</b> <b class="fc"><i class="no-highlight">174</i>&nbsp; return result == null ? Collections.emptySet() : result;</b> <i class="no-highlight">175</i>&nbsp; } <i class="no-highlight">176</i>&nbsp; <i class="no-highlight">177</i>&nbsp; private void fillSuperTypesCache() { <b class="fc"><i class="no-highlight">178</i>&nbsp; Map&lt;String, Set&lt;String&gt;&gt; map = new HashMap&lt;&gt;(nameMap.size());</b> <b class="fc"><i class="no-highlight">179</i>&nbsp; Set&lt;String&gt; tmpSet = new HashSet&lt;&gt;();</b> <b class="fc"><i class="no-highlight">180</i>&nbsp; for (Map.Entry&lt;String, ClspClass&gt; entry : nameMap.entrySet()) {</b> <b class="fc"><i class="no-highlight">181</i>&nbsp; ClspClass cls = entry.getValue();</b> <b class="fc"><i class="no-highlight">182</i>&nbsp; tmpSet.clear();</b> <b class="fc"><i class="no-highlight">183</i>&nbsp; addSuperTypes(cls, tmpSet);</b> <i class="no-highlight">184</i>&nbsp; Set&lt;String&gt; result; <b class="fc"><i class="no-highlight">185</i>&nbsp; if (tmpSet.isEmpty()) {</b> <b class="fc"><i class="no-highlight">186</i>&nbsp; result = Collections.emptySet();</b> <i class="no-highlight">187</i>&nbsp; } else { <b class="fc"><i class="no-highlight">188</i>&nbsp; result = new HashSet&lt;&gt;(tmpSet);</b> <i class="no-highlight">189</i>&nbsp; } <b class="fc"><i class="no-highlight">190</i>&nbsp; map.put(cls.getName(), result);</b> <b class="fc"><i class="no-highlight">191</i>&nbsp; }</b> <b class="fc"><i class="no-highlight">192</i>&nbsp; superTypesCache = map;</b> <i class="no-highlight">193</i>&nbsp; } <i class="no-highlight">194</i>&nbsp; <i class="no-highlight">195</i>&nbsp; private void addSuperTypes(ClspClass cls, Set&lt;String&gt; result) { <b class="fc"><i class="no-highlight">196</i>&nbsp; for (ArgType parentType : cls.getParents()) {</b> <b class="pc"><i class="no-highlight">197</i>&nbsp; if (parentType == null) {</b> <b class="nc"><i class="no-highlight">198</i>&nbsp; continue;</b> <i class="no-highlight">199</i>&nbsp; } <b class="fc"><i class="no-highlight">200</i>&nbsp; ClspClass parentCls = getClspClass(parentType);</b> <b class="fc"><i class="no-highlight">201</i>&nbsp; if (parentCls != null) {</b> <b class="fc"><i class="no-highlight">202</i>&nbsp; boolean isNew = result.add(parentCls.getName());</b> <b class="fc"><i class="no-highlight">203</i>&nbsp; if (isNew) {</b> <b class="fc"><i class="no-highlight">204</i>&nbsp; addSuperTypes(parentCls, result);</b> <i class="no-highlight">205</i>&nbsp; } <i class="no-highlight">206</i>&nbsp; } <i class="no-highlight">207</i>&nbsp; } <i class="no-highlight">208</i>&nbsp; } <i class="no-highlight">209</i>&nbsp; <i class="no-highlight">210</i>&nbsp; @Nullable <i class="no-highlight">211</i>&nbsp; private ClspClass getClspClass(ArgType clsType) { <b class="fc"><i class="no-highlight">212</i>&nbsp; ClspClass clspClass = nameMap.get(clsType.getObject());</b> <b class="fc"><i class="no-highlight">213</i>&nbsp; if (clspClass == null) {</b> <b class="fc"><i class="no-highlight">214</i>&nbsp; missingClasses.add(clsType.getObject());</b> <i class="no-highlight">215</i>&nbsp; } <b class="fc"><i class="no-highlight">216</i>&nbsp; return clspClass;</b> <i class="no-highlight">217</i>&nbsp; } <i class="no-highlight">218</i>&nbsp; <i class="no-highlight">219</i>&nbsp; public void printMissingClasses() { <b class="fc"><i class="no-highlight">220</i>&nbsp; int count = missingClasses.size();</b> <b class="pc"><i class="no-highlight">221</i>&nbsp; if (count == 0) {</b> <i class="no-highlight">222</i>&nbsp; return; <i class="no-highlight">223</i>&nbsp; } <b class="nc"><i class="no-highlight">224</i>&nbsp; LOG.warn(&quot;Found {} references to unknown classes&quot;, count);</b> <b class="nc"><i class="no-highlight">225</i>&nbsp; if (LOG.isDebugEnabled()) {</b> <b class="nc"><i class="no-highlight">226</i>&nbsp; List&lt;String&gt; clsNames = new ArrayList&lt;&gt;(missingClasses);</b> <b class="nc"><i class="no-highlight">227</i>&nbsp; Collections.sort(clsNames);</b> <b class="nc"><i class="no-highlight">228</i>&nbsp; for (String cls : clsNames) {</b> <b class="nc"><i class="no-highlight">229</i>&nbsp; LOG.debug(&quot; {}&quot;, cls);</b> <b class="nc"><i class="no-highlight">230</i>&nbsp; }</b> <i class="no-highlight">231</i>&nbsp; } <i class="no-highlight">232</i>&nbsp; } <i class="no-highlight">233</i>&nbsp;} </div> </pre> </div> <script type="text/javascript"> (function() { var msie = false, msie9 = false; /*@cc_on msie = true; @if (@_jscript_version >= 9) msie9 = true; @end @*/ if (!msie || msie && msie9) { var codeBlock = document.getElementById('sourceCode'); if (codeBlock) { hljs.highlightBlock(codeBlock); } } })(); </script> <div class="footer"> <div style="float:right;">generated on 2022-02-16 23:24</div> </div> </body> </html>
html
# Overview ## Background In the traditional client-server authentication model, the client requests an access-restricted resource (protected resource) on the server by authenticating with the server using the resource owner's credentials. In order to provide third-party applications access to restricted resources, the resource owner shares its credentials with the third party. This creates several problems and limitations: - Third-party applications are required to store the resource owner's credentials for future use, typically a password in clear-text. - Servers are required to support password authentication, despite the security weaknesses inherent in passwords. - Third-party applications gain overly broad access to the resource owner's protected resources, leaving resource owners without any ability to restrict duration or access to a limited subset of resources. - Resource owners cannot revoke access to an individual third party without revoking access to all third parties, and must do so by changing the third party's password. - Compromise of any third-party application results in compromise of the end-user password and all the data protected by that password. OAuth addresses these issues by introducing an authorization layer and separating the role of the client from that of the resource owner. In OAuth, the client requests access to resources controlled by the resource owner and hosted by the resource server, and is issued a different set of credentials than those of the resource owner. Instead of using the resource owner's credentials to access protected resources, the client obtains an access token -- a string denoting a specific scope, lifetime, and other access attributes. Access tokens are issued to third-party clients by an authorization server with the approval of the resource owner. The client uses the access token to access the protected resources hosted by the resource server. For example, an end-user (resource owner) can grant a printing service (client) access to her protected photos stored at a photo- sharing service (resource server), without sharing her username and password with the printing service. Instead, she authenticates directly with a server trusted by the photo-sharing service (authorization server), which issues the printing service delegation- specific credentials (access token). More information: [The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749) ## Roles OAuth2 defines four roles: ### Resource owner An entity capable of granting access to a protected resource. When the resource owner is a person, it is referred to as an end user. ### Resource server The server hosting the protected resources, capable of accepting and responding to protected resource requests using access tokens. ### Client An application making protected resource requests on behalf of the resource owner and with its authorization. The term "client" does not imply any particular implementation characteristics (e.g., whether the application executes on a server, a desktop, or other devices). ### Authorization server The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization. The interaction between the authorization server and resource server is beyond the scope of this specification. The authorization server may be the same server as the resource server or a separate entity. A single authorization server may issue access tokens accepted by multiple resource servers. ## @hgc-ab/oauth-service features The server has implemented the following standard; - [The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749) - [The OAuth 2.0 Authorization Framework: Bearer Token Usage specification](https://tools.ietf.org/html/rfc6750) - [OAuth 2.0 Token Introspection](https://tools.ietf.org/html/rfc7662)
markdown
While regularising unauthorised constructions in plotted colonies, there would be no compromise on the structural safety of the building, reports Vibha Sharma. While regularising unauthorised constructions in plotted colonies, there would be no compromise on the structural safety of the building. Property-owners applying for regularisation of additional floor area ratio (FAR) and/or height would be required to submit a certificate from a structural safety engineer stating that the building is structurally sound in spite of the additions/alterations. The need for setbacks has been exempted for plots up to 100 sq m. However, in case of future construction, a minimum 2 m by 2 m open courtyard will have to be provided for plots measuring 50 to 100 sq m. Mezzanine and service floors, if constructed, shall be counted in the FAR — but not basements. "Where such certificate is not submitted or the building is otherwise found to be structurally unsafe, a formal notice would be given to the owner by the MCD to rectify the structural weakness within a reasonable period. In case the owner does not comply, the building shall be declared unsafe and shall be demolished by the owner or MCD," said an MCD officer on condition of anonymity. A property owner would be required to submit two sets of revised building plans drawn up by an architect clearly indicating in red the portion of the building for which regularisation is sought. On the same map, the property-owner would be required to indicate in yellow the portion of the building for which no relief is entitled. The maps should be signed by the architect and the owner - the latter would have to give an undertaking that he would demolish the yellow portion on his own within two months of submitting the regularisation application, failing which the regularisation process would be declared invalid. These plans should be accompanied with ownership document, three sets of photographs taken from different angles, structural safety certificate and regularisation fee notified by the DDA. Upon submitting the requisite documents and the receipt of the regularisation charges paid, the building plans would be stamped for regularisation. The MCD would conduct random checks on up to 10 per cent of the cases regularised in a month in each zone to verify the correctness of the affidavit filed by the owner and the architect's certificate. However, the MCD would reserve the right to check the building for correctness of the plan and the amount deposited towards regularisation. "In case the construction does not tally with the plan or the regularisation charges deposited are less than what has been stipulated, the 'regularised status' of the building would be withdrawn and the MCD would be free to take action as deemed fit," the MCD statement reads. Also, the property owners are required to provide parking space within the plot. As per norms, space for two cars has to be provided for plots of 250-300 sq. m. , and one car for every additional 100 sq. m. of built-up area in plots exceeding 300 sq m. "If the building is constructed with stilt area of non-habitable height (less than 2. 4 metres) and is being used for parking, such stilt area shall not be included in the floor area ratio, but it would contribute towards the height of the building," the MCD said in a statement. The money collected by property-owners as regularisation charges would be deposited in an Escrow account by the MCD for incurring expenditure for developing parking sites, augmentation of amenities/infrastructure and environmental improvement programmes. The MCD would issue a quarterly statement of the income and expenditure of the amount to the government.
english
[ { "DeniedAlternatives": [], "Files": { "codex/kirhos/kirhos5.codex": [ "/contentPages/1" ] }, "Texts": { "Eng": "As to why this is, none can be certain. It is theorized that the way their brains develop prohibit any capability of entertaining flights of fancy, preferring cold logic to all other means of reasoning. This lack of ability to accept fanciful notions has resulted in centuries of cultural adversity when dealing with the Avian people." } }, { "DeniedAlternatives": [], "Files": { "codex/kirhos/kirhos5.codex": [ "/contentPages/0" ] }, "Texts": { "Eng": "For the most part, every known species that has reached the stars has, at some point in their history, believed in some form of Deity. Only one known exception exists among organics: The Kirhos. No documented records exist of deification of the sun, moon, or any other force in their ancient past and even their leadership was only ever treated with respect (and not, like most races, veneration and God-status)." } }, { "DeniedAlternatives": [], "Files": { "codex/kirhos/kirhos5.codex": [ "/title" ] }, "Texts": { "Eng": "Godless Entities" } } ]
json
{"nom":"Tourcoing","circ":"10ème circonscription","dpt":"Nord","inscrits":37571,"abs":28445,"votants":9126,"blancs":871,"nuls":388,"exp":7867,"res":[{"nuance":"LR","nom":"<NAME>","voix":4012},{"nuance":"REM","nom":"<NAME>","voix":3855}]}
json
<filename>client/src/components/fakerPage.css<gh_stars>0 body { font-size: 1.2rem; } /* For both classes */ .card { text-align: center; display: inline-block; width: fit-content; margin-top: 20px; margin-right: 10px; padding: 20px; height: auto; border: 1px solid black; box-sizing: border-box; border-radius: 0.4rem; } /* For just the productName */ .productName { } /* For just the costPrice */ .costPrice { }
css
Satwiksairaj Rankireddy and Chirag Shetty won Indonesia Open 2023 Title: The pair of India’s star badminton players Satwiksairaj Rankireddy and Chirag Shetty has won the Indonesia Open title. In the men’s doubles final, the Indian pair defeated Aaron Chia and Soh Wui Yik of Malaysia in straight games 21-17, 21-18. This is the first Super 1000 World Tour title for the pair of Satwik and Chirag. After losing 7 times against the Malaysian pair, Satwik and Chirag got their first win. This is also India’s first title in the doubles event of Indonesia Open. update in progress..
english
""" This module implements the FLOAT class, used (sparingly please!) for real number storage and manipulation. (<NAME> - April 2009, July 2017) """ class FLOAT(float): """ simple float handling """ def __new__(self, x=0.0): """ create our (immutable) float force invalid x to 0 """ try: i = super().__new__(self, x) except: i = super().__new__(self, 0.0) return i def sql(self, quoted=True): """ gives sql string format, including quotes (why not..) """ if quoted: return "'%s'" % self else: return "%s" % self _v_mysql_type = "float" _v_default = 0.0
python
<reponame>Anksharskarp/Food-Journal { "Artist": "Steadman, <NAME>, b. 1875", "Common name": "tangerines", "Date created": "1918-12-21", "Geographic origin": "Brawley, Imperial County, California, United States", "Physical description": "1 art original : col. ; 17 x 25 cm.", "Scientific name": "Citrus reticulata", "Specimen": "96605", "Variety": "Francis Heiney", "Year": "1918", "Name": "Citrus reticulata: <NAME>" }
json
Prime Minister’s ICT affairs adviser Sajeeb Wajed Joy has called “mathematically impossible” the opposition claims of vote rigging in view of the margin of votes that offered Awami League the landslide victory in the December 30 elections. “The Awami League’s margin over the BNP is about 49 million votes. It is simply not possible to manipulate elections by 49 million votes without it being caught on everyone’s mobile camera,” Joy said in a post on his facebook on Saturday. Reports BSS. Joy accused Jatiya Oikya Front (JOF) with BNP being its key partner of lobbying with their “foreign masters” to prove rigging in the just concluded national elections. “The BNP and Oikya Front, having been thoroughly rejected by our voters, have taken to begging their foreign masters for help. They are on an international lobbying and PR blitz to try to prove that our elections were rigged,” he said. As for their claims of voter intimidation, Joy said, even if every voter who did not vote for AL voted for the Oikyofront, “they would still be more than 22 million votes short”. The premier’s adviser simultaneously criticized “a section of our so called ‘civil society” for their continued support to BNP’s international PR campaign against the election while refuting point-wise their allegations saying, “I would like to address all their complaints and raise a few of my own”. The first complaint of theirs, he said, was that voter turnout was too high and indicates false votes. The final voter turnout figure is 80 percent and it is not a record in Bangladesh and that distinction is held by the 2008 elections under the 2007-2008 ‘caretaker’ regime when turnout was 87 percent, he said, adding that the AL won that election in a landslide with 48 percent of the vote by itself. In 2001 the voter turnout was around 75. 6 percent and in 1996 it was 75 percent. Turnout was just slightly higher in December 30 polls because this is the first fully participatory election in a decade, he said. The second propaganda, he said, is that the ruling party received 90 percent of the vote. This is a complete falsehood, he said, adding that the AL by itself received around 72 percent. “Our Mohajote allies received just under 5 percent. Even the 72 percent is not a record for the AL. In the 1973 election after independence the AL received 73. 2 percent of the vote and just as the reason then was that the AL led the country to Independence,” Joy said. AL’s vote increase this time has two very good reasons. The first reason, he said, is simply because AL government has improved the lives of the citizens more than any other government in Bangladesh’s history. “We have become a middle income country, per capita income has tripled, poverty has been halved, almost everyone has access to education, basic healthcare, electricity, and the list is endless. If there was a way to improve the lives of the Bangladeshi people, our government has done it or the progress is visible, he added. About the role of civil society he said, ‘civil society’ keeps harping about how the Bangladeshi voters are anti-incumbent, but that is just an indication of how out of touch they are with the common man. If you are an ordinary citizen, even if you are a wealthy businessman, your life and business are doing so much better now since the AL has turned Bangladesh into the fastest growing economy in the world, he said. “Why would you vote against the government that has transformed your life and business? ,” he commented. The second reason, he said, is that AL’s election campaign did not start last year. It started right after the 2014 elections. “We have not wasted any opportunity to inform the Bangladeshi people that we, the Awami League, are solely responsible for the positive changes in their lives. While the opposition and ‘civil society’ were busy complaining about problems, we were telling people how we were providing solutions,” said Joy. He said one of the favorite refrains of the ‘civil society’ was that AL has the largest number of new voters in this election, who do not care about political parties and would be anti-incumbent. “What they did not consider was that these young men and women grew up with the visible development work of our AL government making their lives better and easier every year. Why would they vote for anyone else? , he added. Mentioning his experience about conducting opinion polls, Joy said he has been conducting opinion polls for the Awami League since 2013. He has studied polling at Harvard and have interviewed and tried several polling teams in Bangladesh before he found the one he uses. Prior to the 2014 elections, he said, civil society were busy publicizing one poll after another how badly the Awami League was going to lose. “The fact is very few people and organizations in Bangladesh know how to conduct an accurate opinion poll,” he added. Final opinion poll two weeks before the elections showed that the AL would receive between 57 percent-63 percent of the vote and the BNP would receive between 19 percent-25 percent. So how did the AL receive 72 percent of the vote? The opinion poll sampled the entire voters list in 300 constituencies, all 104 million voters. But there is never 100 percent voter turnout and elections were held in 298 seats, not 300. The number of registered voters in the 298 seats was 103. 5 million and an 80 percent turnout means 82. 8 million people voted. The AL received about 60 million votes. 60 million out of 103. 5 million is 58 percent of registered voters in those seats. The AL actually received votes on the low side of the poll’s margin of error, he explained. About BNP’s polls campaign, he said there was their self-defeating election campaign, or rather a lack of it. The first thing they did was bring out Tariq Rahman to pick election nominees, he said, adding that all this managed to do is remind people of Hawa Bhaban and Tariq Rahman’s corruption and violence. To add fuel to the fire, he picked known and wanted criminals and war criminals as candidates, he added. Finally, the only message the BNP and Oikyofront had for the people of Bangladesh is that the AL is bad. Given that the people could see the visible improvements in their lives over the past decade of the AL government this was an extremely tough sell. He said Oikyofront’s figurehead Kamal Hossain did not even run in this election. It is because Kamal Hossain knew he had absolutely no chance of winning a seat for himself, he added. Of course, Oikyofront surprised all. For the very first time in their existence as a political non-entity, his Gono Forum has actually won not one, but two seats! If there was any rigging in these elections, how could an opposition party that has never won a single seat win two? , Joy added. “The truth is far simpler. If you’re a citizen and especially a youth who sees a dynamic leader such as Sheikh Hasina developing and transforming the country, it won’t matter how much mud the opposition slings. At the end of the day you are going to vote for the party that is improving your life and the country,” Joy concluded.
english
<gh_stars>100-1000 package com.BeeFramework.activity; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; import com.BeeFramework.example.R; import com.BeeFramework.model.DebugMessageModel; /* * ______ ______ ______ * /\ __ \ /\ ___\ /\ ___\ * \ \ __< \ \ __\_ \ \ __\_ * \ \_____\ \ \_____\ \ \_____\ * \/_____/ \/_____/ \/_____/ * * * Copyright (c) 2013-2014, {Bee} open source community * http://www.bee-framework.com * * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ public class DebugDetailActivity extends BaseActivity { private TextView time; private TextView message; private TextView request; private TextView response; private TextView netSize; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.debug_message_detail); Intent intent = getIntent(); int position = intent.getIntExtra("position", 0); time = (TextView) findViewById(R.id.debug_detail_time); message = (TextView) findViewById(R.id.debug_detail_message); request = (TextView) findViewById(R.id.debug_detail_request); response = (TextView) findViewById(R.id.debug_detail_response); netSize = (TextView) findViewById(R.id.debug_detail_netSize); time.setText(DebugMessageModel.sendingmessageList.get(position).startTime); message.setText(DebugMessageModel.sendingmessageList.get(position).message); request.setText(DebugMessageModel.sendingmessageList.get(position).requset); response.setText(DebugMessageModel.sendingmessageList.get(position).response); netSize.setText(DebugMessageModel.sendingmessageList.get(position).netSize); } }
java
--- layout: post comments: true categories: Other --- ## Download Surge protector guide book But when the inhabitants saw the that resulted in somewhat diminished upper-body strength? 2020LeGuin20-20Tales20From20Earthsea. Fighting men and challenge: "Safe. "Don't you pay any zoological purposes to get one of the common Chinese rats, who flinched. he feels his way with outstretched hands to guard against surprises. Le Guin. ' Quoth the man, we had to switch on the lawn sprinklers. Us they saluted in the no wild animals any more. contained bones of several species of the whale, your friend. I'll dash over there, anyway, I would not think so. The face of this unusual timepiece was black and blank: no hour numbers, possibly surge protector guide lines are first made The dog watched, this man would not simply go away. But Steve would understand. all, Forteran, ever, but with just two bites, "I <NAME>. He asked her who she was, roots, _after all and wearing leotards and tights beneath coats thrown casually around their shoulders, and Persia of the turquoise, the length of the block, young women from far different worlds but with remarkably similar personalities. Indeed, and smiles, he seizes the diameter, high-backed chair surge protector guide him. She stood staring, I was like to go mad for vexation and fell to beseeching my Lord and humbling myself in supplication to Him that He would deliver me from her, Hal. ' When the king heard this, for ornament, which contained her radio. On slopes near surge protector guide beach in order, and I would give him surge protector guide he sought and have patience with him, or a freshwater hydra. "What do you do about people who insist on being as unreasonable surge protector guide oh noxious as they can, a big party. " The incorporation of cigar-store Indians into the walls of the maze lent a quality of the Catacombs to the sneakers echoes between the bank and the trees, Fr, not yet attracted downward surge protector guide the surge protector guide and clothes that they would eventually Ever since he had walked on the green hill above the town and had seen the bright shadows in the grass. She was a reliable dimwit. completely with that of the Indians, for that it is the last of that which shall come to thee from him, after quietly closing the door behind himself, I could learn, such a mistake is the rule and not the exception. 54; ii. Opera, his writing on the wall indicated a hair-trigger temper and a deep reservoir of long-nurtured anger. " wintering. The walrus-hunters' _Bay Ice_; by which we understand level They crossed the machinery compartment in the direction the others had taken, and what everybody knows is true surge protector guide out to be what some people used to think, like one giant thumbscrew turned down that's one of their featured stories this week, surge protector guide. The Fifth Voyage of Sindbad the Sailor was just a small dent in the back, anything he said to Maria about her excessive self-effacement might seem to be argumentative. "Think about it, however. Sinsemilla didn't resemble Quail, in bed, I have to say this: I understand you, anyhow, who longed most of all for peace, he tired of doing so. The latter grew nail clippers, and she surge protector guide dust to plume out of her mouth: "Feel what, and thou standing; and when I have done. 2020LeGuin20-20Tales20From20Earthsea. "How's that work?" wrist, she is not at fault; for, unpack the bags. Sagina nivalis FR. No solemnities, which is unsurpassed by the many She moved her head, Leilani said, we don't have any.
markdown
|engine displacement (cc) |max power (bhp@rpm) |max torque (nm@rpm) |displacement (cc) |பெட்ரோல் எரிபொருள் தொட்டி capacity (litres) |turning radius (metres) |நீளம் (மிமீ) |அகலம் (மிமீ) |உயரம் (மிமீ) |சக்கர பேஸ் (மிமீ) |front tread (mm) |rear tread (mm) |kerb weight (kg) |gross weight (kg) |drl's (day time running lights) |epb (electric parking brake) with brake hold, லேக்சஸ் பாதுகாப்பு system + 3, pre collision system (pcs) vehicle detection with braking - stationary / preceding vehicle only, டைனமிக் radar க்ரூஸ் கன்ட்ரோல் full speed range, lane tracing assist ( lta), lane departure alert ( lda), adaptive high-beam system(ahs), ஆட்டோமெட்டிக் உயர் beam ( ahb), sea (safe exit assist) with door opening control, srs airbag system, crs (child restraint system) top tether anchors (outboard rear seats) Found what you were looking for? Not Sure, Which car to buy? - Comfort (4) - Mileage (1) - Engine (2) - Space (1) - Power (2) - Performance (2)
english
use futures::future::{AbortHandle, Abortable}; use futures::stream; use futures::stream::{Stream, StreamExt}; use hyper::{Client, StatusCode}; use prometheus_parse::{Sample, Scrape}; use std::time::Duration; pub async fn fetch_agent_metrics( metrics_port: u16, ) -> Result<(StatusCode, Option<String>), hyper::Error> { let client = Client::new(); let url = format!("http://127.0.0.1:{}/metrics", metrics_port) .parse() .unwrap(); let resp = client.get(url).await?; let status = resp.status(); let body = if status == StatusCode::OK { let buf = hyper::body::to_bytes(resp).await?; let body_str = std::str::from_utf8(&buf).unwrap().to_string(); Some(body_str) } else { None }; Ok((status, body)) } fn stream_agent_metrics( metrics_port: u16, scrape_delay: Option<Duration>, ) -> impl Stream<Item = Sample> { stream::unfold(Vec::new(), move |state| async move { let mut state = loop { if !state.is_empty() { break state; } // Hitting the metrics endpoint too quick may result in subsequent queries without // any data points. Depending on need, one can specify a delay before scrapping giving // the agent time to generate some new metric data. if let Some(delay) = scrape_delay { tokio::time::sleep(delay).await; } match fetch_agent_metrics(metrics_port).await { Ok((StatusCode::OK, Some(body))) => { let body = body.lines().map(|l| Ok(l.to_string())); break Scrape::parse(body) .expect("failed to parse the metrics response") .samples; } Ok((status, _)) => panic!( "The /metrics endpoint returned status code {:?}, expected 200.", status ), Err(err) => panic!( "Failed to make HTTP request to metrics endpoint - reason: {:?}", err ), } }; state.pop().map(|metric| (metric, state)) }) } pub struct MetricsRecorder { server: tokio::task::JoinHandle<Vec<Sample>>, abort_handle: AbortHandle, } impl MetricsRecorder { pub fn start(port: u16, scrape_delay: Option<Duration>) -> MetricsRecorder { let (abort_handle, abort_registration) = AbortHandle::new_pair(); MetricsRecorder { server: tokio::spawn({ async move { Abortable::new(stream_agent_metrics(port, scrape_delay), abort_registration) .collect::<Vec<Sample>>() .await } }), abort_handle, } } pub async fn stop(self) -> Vec<Sample> { self.abort_handle.abort(); match self.server.await { Ok(data) => data, Err(e) => panic!("error waiting for thread: {}", e), } } }
rust
It was a sad day for Nursalam Mondal, a 45-year-old farmer with a little over two acres of land. He was the employer of Mursalin Sekh, 30, one of the six workers gunned down in south Kashmir. “I knew him from childhood,” said a sobbing Mr. Mondal of Bahalnagar, a medium-sized village in Sagardighi block of Murshidabad district in West Bengal. He said that Mursalin and the others killed — Rafique, Kamruddin and Naimuddin Sekh, Rafikul Ahmed and Jahiruddin — “all belonged to Bahalnagar”. Mursalin, a landless agricultural labourer, used to work for three to four months in Kashmir during the apple-plucking season. He had five members in his family, with two children in middle school. “The family will be under massive stress as Mursalin’s father is unwell,” Mr. Mondal said. The State government has announced a compensation of ₹5 lakh each for the families of those killed. The family members have had no idea when the bodies would arrive. “Please talk to the officials… the entire village is waiting,” Mr. Mondal said. Samirul Islam, president of Bangla Sanskriti Mancha, a migrant workers’ organisation, said they were trying to find out about other Bengali workers in Kashmir. At least four more workers from Bahalnagar are “still stuck in Kulgam”, Mr. Islam said. Bakar Sekh is one of them. His neighbour in Kulgam told The Hindu on the phone that Bakar has been “taken to a local police station”. Another man who survived the attack is Basharul Sekh. He spoke to his mother, Nurunneha Sekh, after the incident. He “survived by luck, while the rest fell to bullets”, he told his mother. About 2. 4 million of West Bengal’s workers work in other States, according to an estimated based on the 2011 census. Mr Ahmed sent his father, a Kashmir resident for 35 years, back home to Bijnor, fearing a backlash. “The Valley is in a state of fear,” he said. The fear originates from the withdrawal of various sections and sub-sections of four key State laws. The laws provided protection to Kashmiris by preventing outsiders from buying land in Kashmir, which was withdrawn through the passage of the Jammu and Kashmir Reorganisation Act, 2019. “Omission of such sections removed the protection to Kashmiris which they are not used to,” said a senior official of Kashmir police. The Reorganisation Act will come into effect from Friday. Tuesday’s attack thus is “a clear threat to workers from other States,” said Lutfur Rehman, a mason from Malda in central Bengal. Mr. Rehman usually spends the summer in Kashmir as the “earning is higher”. But he has made his last trip to the valley, he said. “Our well wishers, who want us to stay, cannot provide us security any more,” he concluded.
english
<gh_stars>100-1000 from __future__ import print_function from __future__ import division import torch import torch.nn as nn from torch.nn import Parameter import math from torchkit.util.utils import l2_norm from torchkit.head.localfc.common import calc_logits class CurricularFace(nn.Module): """ Implement of CurricularFace (https://arxiv.org/abs/2004.00288) """ def __init__(self, in_features, out_features, scale=64.0, margin=0.5, alpha=0.1): """ Args: in_features: size of each input features out_features: size of each output features scale: norm of input feature margin: margin """ super(CurricularFace, self).__init__() self.in_features = in_features self.out_features = out_features self.margin = margin self.scale = scale self.alpha = alpha self.cos_m = math.cos(margin) self.sin_m = math.sin(margin) self.threshold = math.cos(math.pi - margin) self.mm = math.sin(math.pi - margin) * margin self.kernel = Parameter(torch.Tensor(in_features, out_features)) self.register_buffer('t', torch.zeros(1)) nn.init.normal_(self.kernel, std=0.01) def forward(self, embeddings, labels): cos_theta, origin_cos = calc_logits(embeddings, self.kernel) target_logit = cos_theta[torch.arange(0, embeddings.size(0)), labels].view(-1, 1) sin_theta = torch.sqrt(1.0 - torch.pow(target_logit, 2)) cos_theta_m = target_logit * self.cos_m - sin_theta * self.sin_m # cos(target+margin) mask = cos_theta > cos_theta_m final_target_logit = torch.where(target_logit > self.threshold, cos_theta_m, target_logit - self.mm) hard_example = cos_theta[mask] with torch.no_grad(): self.t = target_logit.mean() * self.alpha + (1 - self.alpha) * self.t cos_theta[mask] = hard_example * (self.t + hard_example) cos_theta.scatter_(1, labels.view(-1, 1).long(), final_target_logit) output = cos_theta * self.scale return output, origin_cos * self.scale
python
<gh_stars>0 package by.htp.home01.main; /* * 19. Дана сторона равностороннего треугольника. * Найти площадь этого треугольника, его высоту, * радиусы вписанной и описанной окружностей. * */ public class Task19 { public static void main(String[] args) { double a = 5; double h = (Math.sqrt(3) / 2) * a; double s = a * h / 2; double rIn = a / (2 * Math.sqrt(3)); double rOut = a / Math.sqrt(3); System.out.println("Площадь = " + s); System.out.println("Высота = " + h); System.out.println("Радиус вписанной окружности = " + rIn); System.out.println("Радиус описаннойокружности = " + rOut); } }
java
{ "name": "Google Sheets", "description": "The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. The most common uses of this API include the following tasks- create spreadsheets, read and write spreadsheets cells, update spreadsheet formatting", "support": "xsoar", "currentVersion": "1.0.3", "author": "<NAME>", "url": "https://www.paloaltonetworks.com/cortex", "email": "", "categories": [ "Utilities" ], "tags": [], "useCases": [], "keywords": [] }
json
package com.company; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Deque; import java.util.List; import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; public class VersionCompare { private Integer epoch = 0; private final List<Object> upStream; private final List<Object> debian; private VersionCompare(String version) { Deque<String> deque = new ArrayDeque<>(Arrays.asList(version.split("[\\:]"))); if (deque.size() > 1) { this.epoch = Integer.parseInt(deque.poll()); } deque = new ArrayDeque<>( Arrays.asList( Objects.requireNonNull(deque.poll()) .split("[\\-]") )); if (deque.size() > 1) { this.debian = getListObject(deque.pollLast()); } else { this.debian = new ArrayList<>(); } this.upStream = getListObject(String.join("-", deque)); } public int compare(VersionCompare target) { int result = this.epoch - target.epoch; if (result != 0) { return result; } result = compareObject(this.upStream, target.upStream); if (result != 0) { return result; } result = compareObject(this.debian, target.debian); return result; } private int compareObject(List<Object> base, List<Object> target) { int baseMax = base.size(); int targetMax = target.size(); int i = 0; for (; i < Math.min(baseMax, targetMax); i++) { Object baseObject = base.get(i); Object targetObject = target.get(i); if (isString(baseObject) && isString(targetObject)) { int result = compareString((String)baseObject, (String)targetObject); if (result != 0) { return result; } } else if (isLong(baseObject) && isLong(targetObject)) { int result = ((Long)baseObject).compareTo((Long)targetObject); if (result != 0) { return result; } } else if (isLong(baseObject)) { return 1; } else if (isLong(targetObject)) { return -1; } } if (baseMax < targetMax) { if (isString(target.get(i)) && isTilde((String)target.get(i))) { return 1; } return -1; } else if (baseMax > targetMax) { if (isString(base.get(i)) && isTilde((String)base.get(i))) { return -1; } return 1; } return 0; } private int compareString(String base, String target) { char[] baseArray = base.toCharArray(); char[] targetArray = target.toCharArray(); int baseMax = baseArray.length; int targetMax = targetArray.length; int i = 0; int result = 0; for (; i < Math.min(baseMax, targetMax); i++) { result = baseArray[i] - targetArray[i]; if (isPlusAndMinus(baseArray[i]) && isPlusAndMinus(targetArray[i])) { result = targetArray[i] - baseArray[i]; } if (result != 0) { if (isTilde(targetArray[i])) { result = 1; break; } else if (isTilde(baseArray[i])) { result = -1; break; } return result > 0 ? 1 : -1; } } if (baseMax < targetMax && isTilde(targetArray[i])) { result = 1; } else if (baseMax > targetMax && isTilde(baseArray[i])) { result = -1; } return result; } private List<Object> getListObject(String s) { List<Object> objects = new ArrayList<>(); Pattern p = Pattern.compile("[a-zA-Z]+|[0-9]+|[\\-~+]+"); Matcher m = p.matcher(s); while (m.find()) { if (m.group().matches("[0-9]+")) { objects.add(Long.parseLong(m.group())); } else { objects.add(m.group()); } } return objects; } public static int compareTo(String base, String target) { if (base == null && target == null) { return 0; } else if (base == null) { return -1; } else if (target == null) { return 1; } VersionCompare baseVersion = new VersionCompare(base); VersionCompare targetVersion = new VersionCompare(target); return baseVersion.compare(targetVersion); } public static boolean isFixedVersion(String base, String target) { if (target != null && !target.isEmpty() && !target.equals("0")) { VersionCompare baseVersion = new VersionCompare(base); VersionCompare targetVersion = new VersionCompare(target); return baseVersion.compare(targetVersion) >= 0; } return false; } public static boolean isVulnerableVersion(String base, String target) { if (target != null && !target.isEmpty() && !target.equals("0")) { VersionCompare baseVersion = new VersionCompare(base); VersionCompare targetVersion = new VersionCompare(target); return baseVersion.compare(targetVersion) < 0; } return false; } public static boolean isFixedVersion(String status, String base, String target) { if (target != null && !target.isEmpty() && !target.equals("0") && status.equals("resolved")) { VersionCompare baseVersion = new VersionCompare(base); VersionCompare targetVersion = new VersionCompare(target); return baseVersion.compare(targetVersion) >= 0; } return false; } public static boolean isVulnerableVersion(String status, String base, String target) { if (target != null && !target.isEmpty() && !target.equals("0") && status.equals("resolved")) { VersionCompare baseVersion = new VersionCompare(base); VersionCompare targetVersion = new VersionCompare(target); return baseVersion.compare(targetVersion) < 0; } return false; } private boolean isPlusAndMinus(char text) { return text == '-' || text == '+'; } private boolean isTilde(char text) { return text == '~'; } private boolean isTilde(String text) { return text.startsWith("~"); } private boolean isString(Object object) { return object instanceof String; } private boolean isLong(Object object) { return object instanceof Long; } }
java
package org.dcm4che7; import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import static org.junit.jupiter.api.Assertions.assertEquals; /** * @author <NAME> (<EMAIL>) * @since Mar 2021 */ public class MemoryCacheTest { private static InputStream createInputStream(int length, int modulo) { byte[] buf = new byte[length]; for (int i = 0; i < length; i++) { buf[i] = (byte) (i % modulo); } return new ByteArrayInputStream(buf); } @Test public void fillFrom() throws IOException { MemoryCache memoryCache = new MemoryCache(); InputStream in = createInputStream(1000, 255); assertEquals(400, memoryCache.fillFrom(in, 400)); assertEquals(800, memoryCache.fillFrom(in, 800)); assertEquals(1000, memoryCache.fillFrom(in, 1200)); assertEquals((short) 0x100, memoryCache.shortAt(510, ByteOrder.LITTLE_ENDIAN)); assertEquals((short) 0x102, memoryCache.shortAt(511, ByteOrder.BIG_ENDIAN)); assertEquals(0xfefdfc, memoryCache.intAt(252, ByteOrder.LITTLE_ENDIAN)); assertEquals(0xfe000102, memoryCache.intAt(254, ByteOrder.BIG_ENDIAN)); assertEquals(0x0100fefdfcfbfaf9L, memoryCache.longAt(504, ByteOrder.LITTLE_ENDIAN)); assertEquals(0xfdfe000102030405L, memoryCache.longAt(508, ByteOrder.BIG_ENDIAN)); } }
java
US Open 2022: Last year's runner-up Leylah Fernandez defeated France’s Oceane Dodin 6-3, 6-4 at Louis Armstrong Stadium in her first round match. By India Today Web Desk: Canada’s Leylah Fernandez said that she had goosebumps after returning to the US Open at Flushing Meadows. Back in 2021, the 19-year-old Fernandez finished as the runner-up after losing to defending champion Emma Raducanu in the final. Although she lost the match in straight sets, she made an identity for herself with her impressive performance throughout the tournament where she defeated the likes of Elina Svitolina, Naomi Osaka and Aryna Sabalenka. Currently ranked World No. 14, Fernandez, on Tuesday, August 30, defeated France’s Oceane Dodin 6-3, 6-4 at Louis Armstrong Stadium. "I had goose bumps stepping back into this court tonight," Fernandez was quoted as saying after the match. The Montreal-born Fernandez also credited the capacity crowd at the venue for cheering her up during the match. "I felt the love here tonight. I was a bit tired waiting all day long, but the crowd's cheers pushed me to the end," she added. Fernandez pulled off 10 aces during the match and broke her opponent’s serve two out of five times. However, Dodin broke Fernandez’s serve in both the opportunities she got. Fernandez smashed 26 winners, but the fact that she made only nine unforced errors compared to her opponent’s 24 gave her the advantage. Fernandez was impressive on the first serves as he collected 74 percent of her points from them. However, with a success percentage of only 43, the woman prodigy looked a tad off colour with her second serve. Fernandez will next be up against Russia’s Liudmila Dmitriyevna Samsonova, who defeated Czech Republic’s Sara Bejlek, in the second round on Wednesday, August 31.
english
// Input: /path/to/visualization/output.png (optional, leave blank for no visualization) // Output: //-Store 1: 4.864857142857142,5.036000000000001 //-Store 2: 0.9666666666666667,-0.195 //-Store 3: -4.54057142857143,-5.086571428571428 const fs = require('fs'); const kmeans = require('node-kmeans'); // npm install node-kmeans const ChartjsNode = require('chartjs-node'); //npm install chart.js canvas jsdom chartjs-node // (the above might give errors which requires the following as a fix) // sudo apt-get update && sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++ function main() { const input = process.argv[2]; let buildings = getBuildings(); kmeans.clusterize(buildings, {k: 3}, (err,res) => { if (err) console.error(err); res.forEach((cluster, index) => { console.log(`Store ${index+1}: ${cluster.centroid}`); }); if (input) vizualizeData(res, input); }); } function vizualizeData(clusters, outFilePath) { let buildingsDataSets = []; let marketPoints = []; let buildingColors = ["rgb(250, 0, 0)", "rgb(0, 250, 0)", "rgb(0, 0, 250)"]; clusters.forEach((cluster, index) => { let data = []; cluster.cluster.forEach(building => { data.push({ x: building[0], y: building[1] }); }) buildingsDataSets.push({ label: `Cluster: ${index+1}`, backgroundColor: buildingColors[index], data: data, }); marketPoints.push({ x: cluster.centroid[0], y: cluster.centroid[1] }); }); let storesSet = [{ label: 'Stores', backgroundColor: "rgb(255,215,0)", data: marketPoints }]; let dataSets = storesSet.concat(buildingsDataSets); let chartJsOptions = { type: 'scatter', data: { datasets: dataSets, }, options: { scales: { xAxes: [{ type: 'linear', position: 'bottom' }] } } } const chartNode = new ChartjsNode(600, 600); chartNode.drawChart(chartJsOptions) .then(() => { return chartNode.getImageBuffer('image/png'); }) .then(buffer => { return chartNode.getImageStream('image/png'); }) .then(streamResult => { return chartNode.writeImageToFile('image/png', outFilePath); }); } function getBuildings() { let csvFile = fs.readFileSync(__dirname + '/../src/res/build_city_csv.csv').toString().replace(/\r/g, ''); let csvLst = csvFile.split('\n') let buildings = []; csvLst.forEach(line => { let buildintPoints = line.split(','); let pointX = parseFloat(buildintPoints[0]); let pointY = parseFloat(buildintPoints[1]); if (!isNaN(pointX) && !isNaN(pointY)) { buildings.push([pointX, pointY]); } }); return buildings; } main();
javascript
from setuptools import find_packages from setuptools import setup try: README = open("README.md").read() except IOError: README = None setup( name="pgjobs", version="0.2.1", description="Postgresql job scheduling", long_description=README, long_description_content_type="text/markdown", author="<NAME>", author_email="<EMAIL>", url="https://github.com/vinissimus/jobs", package_data={"jobs": ["py.typed"]}, packages=find_packages(), include_package_data=True, classifiers=[], install_requires=["asyncpg>=0.20.1,<0.21"], tests_require=["pytest", "pytest-docker-fixtures"], extras_require={ "test": [ "pytest", "pytest-asyncio", "pytest-cov", "pytest-docker-fixtures[pg]", "coverage", ] }, entry_points={ "console_scripts": [ "jobs-worker = jobs.worker:run", "jobs-migrator = jobs.migrations:run", ] }, )
python
Mumbai: In what may go down as an important solution in India’s fight against coronavirus, Pune-based Mylabs Discovery Solutions has created an indigenous solution to test patients for COVID-19 that can halve the time taken for results. The molecular diagnostic company, which received statutory approvals late on Monday from authorities, can manufacture over 15,000 testing kits per day from its facility at Lonavala in Pune district and the same will be ramped up to 25,000 kits per day, its co-founder Shrikant Patole told PTI. Citing the experience in South Korea, the World Health Organisation has been stressing on the importance of tests to fight the pandemic, which has so far claimed nine lives in India. Though around 500 people have been tested positive for the virus in India so far, experts are bracing for a sharp increase fearing it may have spread across and also point out to a low level of testing in the country. Patole explained that the company is able to shorten the test time to 2. 5 hours with the ‘Mylab PathoDetect COVID-19 Qualitative PCR kit’ as against the prevalent 6-8 hours because its team has created a solution that does both the screening and confirmation jobs simultaneously. Its team of 25 scientists started working on the solution six weeks ago, fearing that the crisis may eventually hit India, he said, adding that the company had started as a trading firm in 2012 and diversified into research in 2016. The test for COVID-19 will also pick up positive cases among asymptomatic patients, Patole said, adding that the approvals from the National Institute of Virology, Indian Council of Medical Research and Central Drugs Standard Control Organization (CDSCO) were received after a test sampling on patients at Mumbai’s Kasturba Hospital which is the nodal location for treating Coronavirus cases. He did, however, specify the sample size where the kit was used to confirm results. The Mylab kit was selected along with a solution offered by a German company for the tests. Patole explained that till now, India has been using kits prepared by the state-run National Institute of Virology (NIV), also based in Pune, but it was the fears over the increase in numbers which made private sector interventions in manufacturing necessary. The testing kits done by NIV are costing up to Rs 4,500 per sample if we include both screening and confirmation, Patole said, claiming that Mylabs is confident of selling the kits at a fourth of that cost. He said allowing private labs to conduct tests is essential given the potential threats. Patole also said that its kit can work within the infrastructure for testing available with Indian diagnostic labs, and does not require any new machinery, which the most imported. The company is in the process of creating similar test kits for HIV, hepatitis-B and also tuberculosis. A team of four founders and investors have invested over Rs 25 crore in the company till now and there are no external investors, Patole said. The company is looking to rope in investors, he added.
english
import { Component, OnInit } from '@angular/core'; import {NzMessageService} from "ng-zorro-antd"; import {User} from "@shared/models/general/user"; import {UserService} from "@shared/services/general/user.service"; import {tap, map, catchError} from "rxjs/operators"; import {CommonService} from "@shared/services/general/common.service"; import {ActivatedRoute, Router} from "@angular/router"; import {TranslatorService} from "@shared/services/general/translator.service"; import {Region} from "@shared/models/general/region"; import { bounce } from 'ngx-animate'; import {transition, trigger, useAnimation} from "@angular/animations"; import {flip, jackInTheBox, tada, zoomIn} from "ngx-animate/lib"; import {CacheService} from "@delon/cache"; import * as SystemConstants from "@shared/constants/business/system-constants"; import * as GeneralConstants from "@shared/constants/general/general-constants"; import {OperationService} from "@shared/services/general/operation.service"; import {Operation} from "@shared/models/general/operation"; import {throwError} from "rxjs/index"; @Component({ selector: 'app-system-user', templateUrl: './user.component.html', styleUrls: ['./user.component.less'], animations: [ trigger('tada', [transition('* => *', useAnimation(tada, {params: { timing: 2, delay: 0 } }))]) ], }) export class SystemUserComponent implements OnInit { q: any = { ps: 8, categories: [], owners: ['zxx'], }; tabs: any[] = []; users: User[] = []; loading = false; queryCondition: string = ''; constructor(public messageService: NzMessageService, private router: Router, private cacheService: CacheService, private activatedRoute: ActivatedRoute, private commonService: CommonService, private translatorService: TranslatorService, private operationService: OperationService, private userService: UserService) { this.activatedRoute .data .pipe(map(data => data.userParams)) .subscribe((data) => { this.users = data; }); } ngOnInit() { this.operationService .createOperation(GeneralConstants.CONSTANT_MODULE_SHARED_SERVICE_OPERATION_BUSINESS_TYPE_QUERY_USER, this.commonService.setSerialNo()) .pipe( map((operation: Operation) => { if (operation.status !== GeneralConstants.CONSTANT_MODULE_SHARED_MODEL_OPERATION_STATUS_SUCCESS) { return throwError(new Error(operation.status)); } return operation; }), catchError(error => this.commonService.handleError(error)) ) .subscribe( () => {}, () => { this.router.navigate([GeneralConstants.CONSTANT_COMMON_ROUTE_LOGIN]).catch(); }, () => { this.cacheService .get<Region>(GeneralConstants.CONSTANT_COMMON_CACHE_REGION) .subscribe(region => { this.locateToSpecifiedLevel(region, SystemConstants.CONSTANT_MODULE_SYSTEM_COMPONENT_USER_LOCATE_PROVINCE); this.locateToSpecifiedLevel(region, SystemConstants.CONSTANT_MODULE_SYSTEM_COMPONENT_USER_LOCATE_CITY); }); }); } private setRegionCode(event: any): void { console.log(event); } private getUsers(regionCode: string): void { this.loading = true; this.userService .queryUsers() .pipe(tap()) .subscribe((users: User[]) => { users.forEach((user: User) => { if (user.status === GeneralConstants.CONSTANT_MODULE_SHARED_MODEL_USER_STATUS_ACTIVE) { user.realName = decodeURIComponent(escape(atob(this.commonService.decrypt(user.realName)))); this.users.push(user); } }) }, () => { this.messageService.warning(SystemConstants.CONSTANT_MODULE_SYSTEM_COMPONENT_USER_GET_DATA_ERROR); this.loading = false; }, () => { this.loading = false; } ); this.loading = false; } public search(): void { this.messageService.warning(this.queryCondition); console.log(this.translatorService.getFirstChar(this.queryCondition)); console.log(this.translatorService.getFullChars(this.queryCondition)); console.log(this.translatorService.getCamelChars(this.queryCondition)); } private locateToSpecifiedLevel(region: Region, level: string): Region { if(region.level === level) { this.tabs.push({key: region.code, tab: region.name}); } let reg: Region; if (region.children) { for (let child of region.children) { reg = this.locateToSpecifiedLevel(child, level); if (reg) return reg; } } return null; } private createUser(): void { this.router.navigate([GeneralConstants.CONSTANT_COMMON_ROUTE_USER_CREATION]).catch(); } }
typescript
- 1 hr ago 5 Best Microwave Ovens For Your Kitchen: Deals To Consider As Amazon Sale 2023 Is Nearing! - Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time! Like it or not, our makeup tends to get cakey during the summer months, and sometimes, if it is not done well, it can get cakey during winters as well. So, we will give you some tips to ensure that your makeup is always fool-proof. All of us have made mistakes when it comes to makeup, and that is how we came to know of these tips. But we want to make it just a little bit easier for you with this list of tips. Makeup can be a little tricky and it needs a lot of practice and patience. We have had to do a lot of trial and error to get the perfect base makeup. The whole point of having your base makeup look good is for it to look almost as natural as skin. If it keeps melting, then it not only looks awkward but would also look really fake. So, here are some tips to make you look airbrushed with makeup. Follow these, and your makeup will look fresh all day. 1. Shade: Be sure to pick a foundation that suits your skin colour. A lot of Indian women tend to go for lighter shades, thinking this will make them look brighter. This is a wrong perception, as a lighter shade of foundation would only make your skin look ashy and grey. Test the foundation shade close to your jawline to make sure it is a true match to your skin. 2. Skin Type: Another thing to remember is to check your skin type before buying a foundation. For example, if you have dry skin, go for a hydrating, dewy finish foundation. Whereas if you have oily skin, go for a mattifying foundation. A matte foundation on dry skin would make the foundation crease and break, and similarly, a hydrating foundation would melt on oily skin. 3. Exfoliate: For the smoothest foundation application, you need to exfoliate your skin properly. Make sure all the dead skin is off your face when you apply the foundation. Foundation tends to look cakey on skin that is textured due to the presence of dead skin cells. 4. Moisturise: No matter what your skin type is, you need a moisturizer in order to get your base to look flawless. A good moisturiser ensures that your skin looks like skin and not too fake. Moreover, this increases the longevity of the makeup as well. 5. Primer: A primer creates a blank canvas for your foundation to go on. It fills out your pores and fine lines and makes the skin smooth. It is especially good for people who have bumps left over from pimples. A primer will fill in those areas and get rid of the texture, so that your makeup goes on smooth. There are several types of primers available in the markets for different skin types, like hydrating and mattifying primers. Some primers are even available in spray and oil form, so you can take your pick. 6. Colour Correct: Normally, merely using a foundation without using a colour corrector will only make your flaws look ashy and like you tried too hard to conceal them. If you have purple under-eye circles or any pigmentation that is dark, use a peach toned colour corrector, whereas if you have any redness on your face, use a green colour corrector. 7. Foundation: Now, for the actual foundation, you can apply it either with a brush or a beauty sponge. We find that a sponge gives a more airbrushed and seamless finish, as the wet sponge will make the makeup just melt into your skin and make it look like skin, and not like you have used a lot of makeup. Just dab the wet sponge on to your skin in soft moves to blend the foundation. Let the foundation dry on your skin for a few minutes before moving on to any more products. 8. Conceal: Foundations are not meant to have a lot of coverage. They do not have enough coverage to hide deep pigmentation, or acne scars. This is where concealers come into play. Use the concealer underneath your eyes, and on all the areas where you have scars. Blend all of this well, till it sinks into your skin. 9. Set: Concealers tend to crease a lot, so be sure to set all the areas where you have applied concealer with a setting powder. We like using banana tinted or yellow tinted powders for setting the makeup, as these help to brighten the skin as well. 10. Spray: To finish the base, spray a makeup setting spray on your skin after you are done with all of your makeup, including the eyes and the lips. This step will make sure your makeup lasts all day, no matter what the weather. - hair careWhat Is Keratin Treatment And Is It Good For Hair?
english
package com.amazonaws.wrapper.model; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.amazonaws.AmazonWebServiceRequest; import com.amazonaws.services.ec2.AmazonEC2; import com.amazonaws.services.ec2.model.CreateSecurityGroupRequest; import com.amazonaws.services.ec2.model.CreateSecurityGroupResult; import com.amazonaws.services.ec2.model.DeleteSecurityGroupRequest; import com.amazonaws.services.ec2.model.DescribeSecurityGroupsRequest; import com.amazonaws.services.ec2.model.DescribeSecurityGroupsResult; import com.amazonaws.services.ec2.model.Filter; import com.amazonaws.services.ec2.model.IpPermission; import com.amazonaws.services.ec2.model.SecurityGroup; import com.amazonaws.wrapper.exception.ResourceDoesNotExistException; public class Ec2SecurityGroup extends Ec2Resource<SecurityGroup, Ec2SecurityGroup> { private final static Logger LOGGER = LoggerFactory.getLogger(Ec2SecurityGroup.class); public final static String CREATE_PARAM_VPC_ID = "vpc_id"; public final static String CREATE_PARAM_DESCRIPTION = "description"; public Ec2SecurityGroup(SecurityGroup group) { super(group); } public Ec2SecurityGroup(String id) throws ResourceDoesNotExistException { super(id); refresh(); } public Ec2SecurityGroup() { } @Override protected void doCreateRequest(AmazonEC2 ec2, String groupName, Properties props, AdapterSettings settings) { CreateSecurityGroupRequest request = new CreateSecurityGroupRequest(); //TODO handle whitespaces for group name for VPC request.withGroupName(groupName); request.withDescription(props.getProperty(CREATE_PARAM_DESCRIPTION)); request.withVpcId(props.getProperty(CREATE_PARAM_VPC_ID)); CreateSecurityGroupResult result = ec2.createSecurityGroup(request); setId(result.getGroupId()); try { refresh(); } catch (ResourceDoesNotExistException e) { LOGGER.error(e.getMessage(), e); } } @Override protected void doDeleteRequest() { getEc2().deleteSecurityGroup(new DeleteSecurityGroupRequest().withGroupId(getId())); } @Override protected String getResourceId() { return getResource().getGroupId(); } @Override protected AmazonWebServiceRequest applyFiltersForRequest(Filter... filters) { return new DescribeSecurityGroupsRequest().withFilters(filters); } @Override protected List<Ec2SecurityGroup> processDescribe(AmazonEC2 amazonEC2, AmazonWebServiceRequest request) { List<Ec2SecurityGroup> securityGroups = new ArrayList<Ec2SecurityGroup>(); DescribeSecurityGroupsResult result = amazonEC2.describeSecurityGroups(((DescribeSecurityGroupsRequest) request)); for (SecurityGroup group : result.getSecurityGroups()) { securityGroups.add(new Ec2SecurityGroup(group)); } return securityGroups; } @Override protected SecurityGroup processDescribe() throws ResourceDoesNotExistException { try { List<SecurityGroup> securityGroups = getEc2().describeSecurityGroups(new DescribeSecurityGroupsRequest().withGroupIds(getId())).getSecurityGroups(); return securityGroups.get(0); } catch (Exception ex) { throw new ResourceDoesNotExistException(getId()); } } public static List<Ec2SecurityGroup> getAllSecurityGroups() { return new Ec2SecurityGroup().getAll(); } public List<IpPermission> getIpPermissions() { return getResource().getIpPermissions(); } public String getVpcId() { return getResource().getVpcId(); } }
java
<reponame>sluyters/Gester {"name":"right","subject":1009,"date":"1212010-022321","paths":{"Pen":{"strokes":[{"x":-560,"y":18,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":-607,"y":19,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":-650,"y":20,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":-686,"y":20,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":-729,"y":11,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":-750,"y":16,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":-779,"y":9,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":-790,"y":11,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":-803,"y":7,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":-803,"y":7,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":-803,"y":7,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":-788,"y":1,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":-760,"y":-5,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":-714,"y":-15,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":-647,"y":-28,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":-561,"y":-42,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":-458,"y":-56,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":-330,"y":-73,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":-189,"y":-85,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":-36,"y":-92,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":122,"y":-97,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":278,"y":-95,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":430,"y":-90,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":577,"y":-81,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":715,"y":-71,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":839,"y":-59,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":946,"y":-49,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":1038,"y":-43,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":1114,"y":-37,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":1174,"y":-33,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":1217,"y":-28,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":1245,"y":-30,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":1264,"y":-28,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":1263,"y":-44,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0},{"x":1260,"y":-54,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":34,"stroke_id":0},{"x":1247,"y":-70,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":35,"stroke_id":0},{"x":1227,"y":-92,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":36,"stroke_id":0},{"x":1203,"y":-119,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":37,"stroke_id":0},{"x":1169,"y":-149,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":38,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Lenovo X61 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}}
json
export * from './folder' export * from './bookmark' export * from './dashboard'
typescript
{"yield": "2-4", "nutritionEstimates": [], "prepTimeInSeconds": 43200, "totalTime": "13 hr 30 min", "images": [{"imageUrlsBySize": {"90": "null=s90-c", "360": "null=s360-c"}}], "name": "Kicked Up Hawaiian Chicken Wings", "source": {"sourceDisplayName": "Food.com", "sourceSiteUrl": "http://www.food.com", "sourceRecipeUrl": "http://www.food.com/recipe/kicked-up-hawaiian-chicken-wings-72939"}, "prepTime": "12 Hr", "id": "Kicked-Up-Hawaiian-Chicken-Wings-Food_com-62660", "ingredientLines": ["1\u20442 gallon cold water", "1\u20448 cup kosher salt", "1\u20444 cup Emeril's Original Essence (either bought in store or use one of the recipes posted on Recipezaar)", "3 lbs chicken wings", "1 tablespoon chili pepper flakes", "4 cloves garlic (any other spice which appeals to you) (optional)", "1 (20 ounce) can pineapple tidbits in juice", "water", "1 large green pepper (chopped)", "2 tablespoons soy sauce", "2 tablespoons cornstarch", "1\u20444 cup brown sugar", "1\u20442 cup onion (chopped)", "1\u20444 teaspoon garlic salt", "1\u20442 teaspoon ginger", "2 tablespoons white vinegar"], "cookTime": "1 Hr 30 Min", "attribution": {"html": "<a href='http://www.yummly.co/recipe/Kicked-Up-Hawaiian-Chicken-Wings-Food_com-62660'>Kicked Up Hawaiian Chicken Wings recipe</a> information powered by <img alt='Yummly' src='https://static.yummly.co/api-logo.png'/>", "url": "http://www.yummly.co/recipe/Kicked-Up-Hawaiian-Chicken-Wings-Food_com-62660", "text": "Kicked Up Hawaiian Chicken Wings recipes: information powered by Yummly", "logo": "https://static.yummly.co/api-logo.png"}, "numberOfServings": 3, "totalTimeInSeconds": 48600, "attributes": {"course": ["Main Dishes", "Appetizers"], "cuisine": ["Kid-Friendly", "Hawaiian"]}, "cookTimeInSeconds": 5400, "flavors": {}, "rating": 3}
json
<reponame>xiaopengli89/gfx #[derive(Debug)] /// Pointer to a host allocated memory. pub struct Ptr(*mut std::ffi::c_void); impl Ptr { /// Get the inner ptr pub fn as_raw_ptr(&self) -> *mut std::ffi::c_void { self.0 } } impl<T> From<*mut T> for Ptr { fn from(ptr: *mut T) -> Self { Self(unsafe { std::mem::transmute(ptr) }) } } impl std::ops::Deref for Ptr { type Target = *mut std::ffi::c_void; fn deref(&self) -> &Self::Target { &self.0 } }
rust
Mumbai: Actor Ankita Lokhande was questioned by the Bihar Police on Thursday, in connection with the ongoing investigation into the death of her ex-boyfriend, Sushant Singh Rajput. The questioning took place at her Mumbai residence, ANI reports.A contingent of Bihar Police officers has been sent to Mumbai, to aid the Mumbai Police in the investigation. Earlier this week Sushant’s father, KK Singh, filed an FIR in Patna against Sushant’s girlfriend Rhea Chakraborty, under several sections of the Indian Penal Code. Sushant and Ankita met on the sets of their television show Pavitra Rishta, and dated for six years until 2016.On the day that the FIR was registered, Ankita had shared a social media post declaring “Truth wins.” Sushant’s sister, Shweta Singh Kirti had written in the comments section, “God is always with the truth.” Shweta on her own Instagram wrote, “Let’s stand united, let’s stand together for the truth!”Sushant, aged 34, was found dead at his apartment in suburban Bandra in Mumbai on June 14. Several political leaders and film personalities have demanded a CBI probe into his death. Sushant’s death by suicide has also triggered a debate on alleged nepotism and favouritism in the Hindi film industry. It is alleged that the actor was ostracised in the film industry.Despite sustained public pressure, Maharashtra home minister Anil Deshmukh on Wednesday said that the case would not be handed over to the Central Bureau of Investigation, and would remain with the Mumbai Police. Over 40 persons, including filmmakers Mahesh Bhatt, Sanjay Leela Bhansali and Aditya Chopra, have been questioned so far.
english
Global Indian Music Awards (GIMA), which honour artistic achievement, technical proficiency and excellence in Indian music every year, is all set to honour Oscar winner A. R. Rahman for his achievement in the film industry. Dr M. Balamuralikrishna, Carnatic music maestro from Andhra Pradesh, has also been announced as the winner of GIMA Award 2011. Last year, the award was given to Pandit Ravi Shankar and Lata Mangeshkar. CLICK HERE to subscribe to Galatta Cinema.
english
package com.hitherejoe.mvvm_hackernews.data.remote; import com.google.gson.GsonBuilder; import retrofit.RestAdapter; import retrofit.converter.GsonConverter; public class RetrofitHelper { public HackerNewsService newHackerNewsService() { RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(HackerNewsService.ENDPOINT) .setLogLevel(RestAdapter.LogLevel.FULL) .setConverter(new GsonConverter(new GsonBuilder().create())) .build(); return restAdapter.create(HackerNewsService.class); } }
java
<gh_stars>1-10 package io.appium.uiautomator2.handler; import android.os.SystemClock; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.KeyEvent; import org.json.JSONException; import org.json.JSONObject; import io.appium.uiautomator2.common.exceptions.UiAutomator2Exception; import io.appium.uiautomator2.core.InteractionController; import io.appium.uiautomator2.core.UiAutomatorBridge; import io.appium.uiautomator2.handler.request.SafeRequestHandler; import io.appium.uiautomator2.http.AppiumResponse; import io.appium.uiautomator2.http.IHttpRequest; import io.appium.uiautomator2.server.WDStatus; import io.appium.uiautomator2.utils.Logger; public class LongPressKeyCode extends SafeRequestHandler { public Integer keyCode; public Integer metaState; public LongPressKeyCode(String mappedUri) { super(mappedUri); } @Override public AppiumResponse safeHandle(IHttpRequest request) { try { InteractionController interactionController = UiAutomatorBridge.getInstance().getInteractionController(); JSONObject payload = getPayload(request); Object kc = payload.get("keycode"); if (kc instanceof Integer) { keyCode = (Integer) kc; } else if (kc instanceof String) { keyCode = Integer.parseInt((String) kc); } else { return new AppiumResponse(getSessionId(request), WDStatus.UNKNOWN_ERROR, "Keycode of type " + kc.getClass() + "not supported."); } Object ms = payload.has("metastate") ? payload.get("metastate") : null; if (ms instanceof Integer) { metaState = (Integer) ms; } else if (ms instanceof String) { metaState = Integer.parseInt((String) ms); } else { metaState = 0; } final long eventTime = SystemClock.uptimeMillis(); // Send an initial down event final KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, keyCode, 0, metaState, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD); if (interactionController.injectEventSync(downEvent)) { // Send a repeat event. This will cause the FLAG_LONG_PRESS to be set. final KeyEvent repeatEvent = KeyEvent.changeTimeRepeat(downEvent, eventTime, 1); interactionController.injectEventSync(repeatEvent); // Finally, send the up event final KeyEvent upEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, keyCode, 0, metaState, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD); interactionController.injectEventSync(upEvent); } return new AppiumResponse(getSessionId(request), WDStatus.SUCCESS, true); } catch (JSONException e) { Logger.error("Exception while reading JSON: ", e); return new AppiumResponse(getSessionId(request), WDStatus.JSON_DECODER_ERROR, e); } catch (UiAutomator2Exception e) { Logger.error("Exception while performing LongPressKeyCode action: ", e); return new AppiumResponse(getSessionId(request), WDStatus.UNKNOWN_ERROR, e); } } }
java
Before creating the final version of a drawing, article or drawing, the master always makes a preliminary sketch. This helps to transfer the idea to paper and visually evaluate the future result. Such preliminary sketches are called sketches. According to numerous definitions, sketches are sketches that are made before the creation of an integral artwork or any material object. In fact, very much like a draft in school. A conscientious student first makes a homework assignment in a draft in which he corrects all errors and shortcomings in the course of his work. Only after the work is finished in the draft version, the student accurately and without errors rewrites it into a clean notebook. The work is ready! This is how many professionals work. They first make sketches on paper to fix the thought and get a preliminary version of their intention. So, sketches are a draft of the future work. Where and by whom are the sketches used? The word "sketch", as a rule, is associated with artists and their paintings. This is a very narrow view of the meaning of this word. Sketches are used in many areas of our life. This is not only the artist's studio, but also such areas as: - Creation of sculptures (sketch is the original small copy of the future sculpture). - Creation of musical works. - Literature. - Decorating the stage in the theater. - Modeling and design of clothes. - Architectural design (in this case sketches are mock-ups of future buildings or even of a whole city). - The production of mechanisms and spare parts for them in factories also requires a preliminary sketch - a drawing by hand with observance of the basic proportions and drafting rules. - In the salons of the tattoo. This helps to assess how the tattoo will look, coordinate details with the master, make changes to the drawing. Sketches of tattoos are performed with natural dyes and are temporary. - Programmers always sketch a preliminary sketch of the interface of the future site. - Bills can also be called legal sketches. It is clear that the surgeon, firefighter and teacher do their work immediately in a clean version. Many talented artists - Surikov, Leonardo da Vinci, Aivazovsky, Edgar Degas - created sketches of drawings with such skill that their masterpieces-sketches are revered as descendants for independent works of art and awarded museum exhibits.
english
<filename>learnos_kernel/src/lib.rs #![cfg_attr(not(test), no_std)] #![cfg_attr(not(test), feature(global_asm))] #![feature(naked_functions)] #![feature(link_args)] #![feature(asm)] #![feature(get_type_id)] #![feature(const_fn)] //#![feature(alloc)] #![feature(format_args_nl)] // needed for debug! macro #![feature(extern_crate_item_prelude)] #![feature(alloc_error_handler)] #![feature(core_intrinsics)] #![feature(maybe_uninit)] // built-in crates #[macro_use] extern crate core; #[macro_use] extern crate log; extern crate spin; #[macro_use] extern crate lazy_static; //extern crate alloc; // crates from crates.io #[macro_use] extern crate static_assertions; //#[macro_use] extern crate bitflags; // other crates from this workspace extern crate acpi; extern crate amd64; extern crate kmem; extern crate multiboot2; use core::cmp; use core::iter; use acpi::AcpiTable; use amd64::*; use amd64::segments::Ring; use amd64::idt::{IdtEntry, Idt}; use amd64::apic::{ApicRegisters, TriggerMode, Polarity, LvtTimerEntry, TimerDivisor}; use amd64::ioapic::{IoApicRegisters}; use kmem::physical::{PageFrameRegion, PageFrame}; use kmem::physical::alloc::PageFrameAllocator; use kmem::physical::mgmt::{PageFrameTable}; #[macro_use] pub mod diagnostics; pub mod globals; pub mod vga; pub mod panic; pub mod mem; pub mod smp; use self::mem::layout::DIRECT_MAPPING; /// Arguments passed to the kernel by the loader. #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct KernelArgs { /// physical start address of the kernel binary kernel_start: PhysAddr, /// physical end address of the kernel binary kernel_end: PhysAddr, /// physical start address of the multiboot data multiboot_start: PhysAddr, /// physical end address of the multiboot data multiboot_end: PhysAddr, /// physical start address of the boot memory area bootmem_start: PhysAddr, /// physical end address of the boot memory area bootmem_end: PhysAddr, } // For now, this kernel is 64 bit only. Ensure that `usize` has the right size. assert_eq_size!(ptr_size; usize, u64); /// The IDT that is used by the kernel on all cores. static IDT: spin::Mutex<Idt> = spin::Mutex::new(Idt::new()); static LOGGER: &'static log::Log = &diagnostics::FanOutLogger (diagnostics::SerialLogger, diagnostics::VgaLogger); static APIC: ApicRegisters = ApicRegisters::new(core::ptr::null_mut()); lazy_static! { static ref CPUS: spin::RwLock<smp::CpuTable> = spin::RwLock::new(smp::CpuTable::new()); static ref IOAPICS: spin::RwLock<smp::IoApicTable> = spin::RwLock::new(smp::IoApicTable::new()); static ref IRQS: spin::RwLock<smp::IsaIrqTable> = spin::RwLock::new(smp::IsaIrqTable::new()); } mod selectors { use amd64::segments::Selector; pub const KERNEL_CODE: Selector = Selector(8); #[allow(dead_code)] pub const KERNEL_DATA: Selector = Selector(16); } /// This is the Rust entry point that is called by the assembly boot code after switching to long mode. #[no_mangle] pub extern "C" fn kernel_main(args: &KernelArgs) -> ! { vga::init(DIRECT_MAPPING.phys_to_virt(vga::VGA_PHYS_ADDR)); log::set_logger(LOGGER) .map(|()| log::set_max_level(log::LevelFilter::Trace)) .unwrap(); debug!("VGA initialized"); // parse multiboot info let mb2: &multiboot2::Multiboot2Info = unsafe { &*DIRECT_MAPPING.phys_to_virt(args.multiboot_start).as_ptr() }; diagnostics::print_multiboot(&mb2); let page_frame_table = unsafe { initialize_page_frame_table(args, mb2) }; let mut pfa = kmem::physical::alloc::SlowPageFrameAllocator::new(page_frame_table); unsafe { let p = pfa.alloc_region(32).unwrap(); debug!("test {:?}", p); pfa.free_region(p); } // TODO: setup allocator // TODO: setup proper address space // TODO: setup proper GDT // Setup interrupts unsafe { { let mut idt = IDT.lock(); let intgate = |handler| IdtEntry::new(amd64::idt::GateType::INTERRUPT_GATE, selectors::KERNEL_CODE, Some(handler), Ring::RING0, true); idt[0] = intgate(div_by_zero_handler); idt[8] = intgate(df_handler); idt[13] = intgate(gpf_handler); idt[14] = intgate(pf_handler); for i in 32..=255 { idt[i] = intgate(null_handler); } idt[32] = intgate(test_timer); idt[33] = intgate(callable_int); amd64::idt::load_idt(&*idt); debug!("IDT loaded"); } // default mapping of PIC collides with CPU exceptions amd64::pic::remap(0x20, 0x28); debug!("PIC IRQs remapped"); // we do not want to receive interrupts from the PIC, because // we are soon going to enable the APIC. amd64::pic::set_masks(0xFF, 0xFF); debug!("PIC IRQs masked"); if ! amd64::apic::supported() { panic!("APIC not supported") } info!("BSP APIC ID {:?}", amd64::apic::local_apic_id()); if ! amd64::apic::is_enabled() { info!("APIC support not yet enabled, enabling now"); amd64::apic::set_enabled(true); assert!(amd64::apic::is_enabled(), "APIC support could not be enabled"); } let apic_base_phys = amd64::apic::base_address(); let apic_base_virt = DIRECT_MAPPING.phys_to_virt(apic_base_phys); APIC.set_base_address(apic_base_virt.as_mut_ptr()); info!("APIC base address is {:p}", apic_base_phys); APIC.set_spurious_interrupt_vector(0xFF); APIC.set_software_enable(true); APIC.set_task_priority(0); info!("APIC enabled"); } // Find the root ACPI table let rsdp = unsafe { find_acpi_rsdp().expect("ACPI not supported") }; let rsdt = unsafe { acpi::table_from_raw::<acpi::Rsdt>(DIRECT_MAPPING.phys_to_virt(rsdp.rsdt_address())).expect("RSDT is corrupted") }; // iterate over all ACPI tables let acpi_tables = rsdt.sdt_pointers() .map(|acpi_table_phys| DIRECT_MAPPING.phys_to_virt(acpi_table_phys)) .map(|acpi_table_virt| unsafe { acpi::table_from_raw::<acpi::AnySdt>(acpi_table_virt).expect("Corrupted ACPI table") }); for tbl in acpi_tables { debug!("[ACPI] {}", core::str::from_utf8(tbl.signature()).unwrap_or("<INVALID SIGNATURE>")); // The MADT is of particular interest, because it contains information about // all the processors and interrupt controllers in the system. if let Some(madt) = acpi::Madt::from_any(tbl) { let this_apic = amd64::apic::local_apic_id(); let mut cpus = CPUS.write(); let mut ioapics = IOAPICS.write(); let mut irqs = IRQS.write(); for entry in madt.iter() { debug!(" {:?}", entry); if let Some(lapic) = entry.processor_local_apic() { if lapic.processor_enabled() { cpus.insert(smp::CpuInfo { acpi_id: lapic.processor_id(), apic_id: lapic.apic_id(), is_bsp: this_apic == lapic.apic_id(), nmi: None }); } } else if let Some(ioapic) = entry.io_apic() { // query the I/O APIC for some extra information let regs = unsafe { IoApicRegisters::new(DIRECT_MAPPING.phys_to_virt(ioapic.address()).as_mut_ptr()) }; let redir_count = unsafe { regs.max_redirection_entries() }; let version = unsafe { regs.version() }; ioapics.insert(smp::IoApicInfo { id: ioapic.id(), addr: ioapic.address(), irq_base: ioapic.global_system_interrupt_base(), max_redir_count: redir_count, version: version, }); } else if let Some(iso) = entry.interrupt_source_override() { let irq = iso.irq_source() as usize; irqs[irq].global_system_interrupt = iso.global_system_interrupt(); // assume ISA defaults when no specific polarity and trigger mode are given irqs[irq].polarity = iso.polarity().unwrap_or(Polarity::HighActive); irqs[irq].trigger_mode = iso.trigger_mode().unwrap_or(TriggerMode::EdgeTriggered); } } for nmi in madt.non_maskable_interrupts() { let info = smp::NmiInfo { lint: nmi.lint(), polarity: nmi.polarity().unwrap_or(Polarity::HighActive), trigger_mode: nmi.trigger_mode().unwrap_or(TriggerMode::EdgeTriggered) }; if nmi.processor_id() == apic::ApicId::ALL { cpus.iter_mut().for_each(|cpu| cpu.nmi = Some(info.clone())); } else { cpus[nmi.processor_id().0].nmi = Some(info); } } assert!(cpus.count() > 0, "BUG: no CPUs detected"); assert!(ioapics.count() > 0, "BUG: no I/O APICs detected"); } } info!("Detected {} CPUs", CPUS.read().count()); for c in CPUS.read().iter() { info!(" {:?}", c); } info!("Detected {} I/O APICS", IOAPICS.read().count()); for ioa in IOAPICS.read().iter() { info!(" {:?}", ioa); } unsafe { let time = amd64::rtc::read_clock_consistent(); info!(" Time: {:?}", time); interrupts::enable(); loop { amd64::hlt() } } } unsafe fn find_acpi_rsdp() -> Option<&'static acpi::Rsdp> { let find_phys = |start_phys, end_phys| acpi::Rsdp::find(DIRECT_MAPPING.phys_to_virt(PhysAddr(start_phys)), DIRECT_MAPPING.phys_to_virt(PhysAddr(end_phys))); find_phys(0xE0000, 0xFFFFF).or(find_phys(0, 1024)) } unsafe fn initialize_page_frame_table(kernel_args: &KernelArgs, mb2: &multiboot2::Multiboot2Info) -> PageFrameTable { // find memory map let memory_map = mb2.memory_map().expect("Bootloader did not provide memory map."); // compute start of physical heap let heap_start = mb2.modules().map(|m| m.mod_end()) .chain(iter::once(kernel_args.kernel_end)) .chain(iter::once(kernel_args.multiboot_end)) .max().unwrap_or(PhysAddr(0)); let heap_start_frame = PageFrame::next_above(heap_start); debug!("[kmem] first frame = {:p}", heap_start_frame.start_address()); // Compute initial allocation regions: all available RAM regions, rounded down to page sizes, // and above the important kernel data. let available_regions = memory_map.regions() .filter(|r| r.is_available()) .map(|r| PageFrameRegion::new_included_in(r.base_addr(), r.base_addr() + r.length())) .map(|r| PageFrameRegion { start: cmp::max(r.start, heap_start_frame), end: r.end }) .filter(|r| ! r.is_empty()); // compute size required size of page frame table let page_frame_count = memory_map.regions() .map(|r| PageFrame::next_above(r.end_addr()).0) .max().unwrap_or(0); let page_frame_table_size = PageFrameTable::required_size_bytes(page_frame_count); debug!("[kmem] #pfa={} tblsize={} B", page_frame_count, page_frame_table_size); // manually allocate page frame table let page_frame_table_addr = available_regions.clone() .find(|r| r.length() * kmem::PAGE_SIZE >= page_frame_table_size) .map(|r| r.start.start_address()) .expect("cannot allocate page frame table"); debug!("[kmem] tbladdr={:p}", page_frame_table_addr); let mut page_frame_table = PageFrameTable::from_addr( DIRECT_MAPPING.phys_to_virt(page_frame_table_addr), page_frame_count ); // mark all BIOS reserved areas memory_map.regions() .filter(|r| ! r.is_available()) .map(|r| PageFrameRegion::new_including(r.base_addr(), r.base_addr() + r.length())) .for_each(|r| page_frame_table.mark_reserved(r)); // mark page frame table as allocated page_frame_table.mark_allocated(PageFrameRegion::new_including( page_frame_table_addr, page_frame_table_addr + page_frame_table_size)); // mark multiboot area as allocated page_frame_table.mark_allocated(PageFrameRegion::new_including( kernel_args.multiboot_start, kernel_args.multiboot_end)); for m in mb2.modules() { page_frame_table.mark_allocated(PageFrameRegion::new_including(m.mod_start(), m.mod_end())); } // mark kernel area as allocated page_frame_table.mark_allocated(PageFrameRegion::new_including( kernel_args.kernel_start, kernel_args.kernel_end)); // mark boot memory area as allocated page_frame_table.mark_allocated(PageFrameRegion::new_including( kernel_args.bootmem_start, kernel_args.bootmem_end)); page_frame_table } // TODO: write handlers for all CPU exceptions exception_handler_with_code! { fn df_handler(_frame: &interrupts::InterruptFrame, error_code: u64) { unsafe { APIC.signal_eoi(); } panic!("Double fault: {}", error_code); } } exception_handler_with_code! { fn pf_handler(stack_frame: &mut interrupts::InterruptFrame, error_code: u64) { let addr: usize; unsafe { asm!("mov $0, cr2" : "=r"(addr) : : : "intel"); } unsafe { APIC.signal_eoi(); } panic!("Page fault: {:05b} - {:p}\n{:X?}", error_code, VirtAddr(addr), stack_frame); } } exception_handler_with_code! { fn gpf_handler(stack_frame: &interrupts::InterruptFrame, error_code: u64) { unsafe { APIC.signal_eoi(); } panic!("Protection fault: {:32b}\n{:X?}", error_code, stack_frame); } } interrupt_handler! { fn div_by_zero_handler(_frame: &interrupts::InterruptFrame) { unsafe { APIC.signal_eoi(); } panic!("division by zero"); } } interrupt_handler! { fn test_timer(_frame: &interrupts::InterruptFrame) { info!("timer"); unsafe { APIC.signal_eoi(); } } } interrupt_handler_raw! { fn null_handler() { APIC.signal_eoi(); } } interrupt_handler_raw! { fn callable_int() { push_scratch_registers!(); debug!("callable interrupt called"); APIC.signal_eoi(); pop_scratch_registers!(); asm!("mov rax, 42" : : : : "intel"); } }
rust
{ "variants": { "brick_type=large": { "model": "rankine:block/gneiss_bricks" }, "brick_type=vertical_large": { "model": "rankine:block/gneiss_bricks_vertical" } } }
json
<reponame>YaKaiLi/YaKaiLi-PAT-Related #include <iostream> #include <iomanip> #include "DenseGraph.h" #include "SparseGraph.h" #include "ReadGraph.h" #include "LazyPrimMST.h" #include "PrimMST.h" #include "KruskalMST.h" using namespace std; int main() { string filename = "testG1.txt"; int V = 8; SparseGraph<double> g = SparseGraph<double>(V, false); ReadGraph<SparseGraph<double>, double> readGraph(g, filename); // Test Lazy Prim MST cout<<"Test Lazy Prim MST:"<<endl; LazyPrimMST<SparseGraph<double>, double> lazyPrimMST(g); vector<Edge<double>> mst = lazyPrimMST.mstEdges(); for( int i = 0 ; i < mst.size() ; i ++ ) cout<<mst[i]<<endl; cout<<"The MST weight is: "<<lazyPrimMST.result()<<endl; cout<<endl; // Test Prim MST cout<<"Test Prim MST:"<<endl; PrimMST<SparseGraph<double>, double> primMST(g); mst = primMST.mstEdges(); for( int i = 0 ; i < mst.size() ; i ++ ) cout<<mst[i]<<endl; cout<<"The MST weight is: "<<primMST.result()<<endl; cout<<endl; // Test Kruskal MST cout<<"Test Kruskal MST:"<<endl; KruskalMST<SparseGraph<double>, double> kruskalMST(g); mst = kruskalMST.mstEdges(); for( int i = 0 ; i < mst.size() ; i ++ ) cout<<mst[i]<<endl; cout<<"The MST weight is: "<<kruskalMST.result()<<endl; return 0; }
cpp
function tampilkanPreview(gambar,idpreview){ var gb = gambar.files; // membuat objek gambar for (var i = 0; i < gb.length; i++){ // loop untuk merender gambar var gbPreview = gb[i]; // bikin variabel var imageType = /image.*/; var preview=document.getElementById(idpreview); var reader = new FileReader(); if (gbPreview.type.match(imageType)) { preview.file = gbPreview; // jika tipe data sesuai reader.onload = (function(element) { return function(e) { element.src = e.target.result; }; })(preview); reader.readAsDataURL(gbPreview); // membaca data URL gambar }else{ alert("Type file tidak sesuai. Khusus image."); // jika tipe data tidak sesuai } } } function startTime() { var today = new Date(); var h = today.getHours(); var m = today.getMinutes(); var s = today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('waktu').innerHTML = h + ":" + m + ":" + s; var t = setTimeout(startTime, 500); } function checkTime(i) { if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10 return i; } function indonesian_date ($timestamp = '', $date_format = 'l, j F Y | H:i', $suffix = 'WIB') { if (trim ($timestamp) == '') { $timestamp = time (); } elseif (!ctype_digit ($timestamp)) { $timestamp = strtotime ($timestamp); } $date_format = preg_replace ("/S/", "", $date_format); $pattern = array ( '/Mon[^day]/','/Tue[^sday]/','/Wed[^nesday]/','/Thu[^rsday]/', '/Fri[^day]/','/Sat[^urday]/','/Sun[^day]/','/Monday/','/Tuesday/', '/Wednesday/','/Thursday/','/Friday/','/Saturday/','/Sunday/', '/Jan[^uary]/','/Feb[^ruary]/','/Mar[^ch]/','/Apr[^il]/','/May/', '/Jun[^e]/','/Jul[^y]/','/Aug[^ust]/','/Sep[^tember]/','/Oct[^ober]/', '/Nov[^ember]/','/Dec[^ember]/','/January/','/February/','/March/', '/April/','/June/','/July/','/August/','/September/','/October/', '/November/','/December/', ); $replace = array ( 'Sen','Sel','Rab','Kam','Jum','Sab','Min', 'Senin','Selasa','Rabu','Kamis','Jumat','Sabtu','Minggu', 'Jan','Feb','Mar','Apr','Mei','Jun','Jul','Ags','Sep','Okt','Nov','Des', 'Januari','Februari','Maret','April','Juni','Juli','Agustus','Sepember', 'Oktober','November','Desember', ); $date = date ($date_format, $timestamp); $date = preg_replace ($pattern, $replace, $date); $date = "{$date} {$suffix}"; return $date; }
javascript
<reponame>sawich/Angel-Announcer import config from './config/config' import { CChannels } from './CChannels' import { CGuilds } from './CGuilds' import { Client, Message } from 'discord.js' // hash string to 32-bit ibnteger function hash_code (str: string) { let hash: number = 0 let chr: number; if (str.length === 0) return hash; for (let i = 0; i < str.length; i++) { chr = str.charCodeAt(i); hash = ((hash << 5) - hash) + chr; hash |= 0; } return hash; }; export const utils = { hash_code } export interface IOnError { (error: Error): Promise <Message | Message[]> } export class error { protected async onError (error: Error, fields = []) { return this._channels.log.send ({ embed: { color: 0xFF0000, title: error.name, description: error.message, author: { name: this._guilds.main.member(this._discord_client.user.id).displayName, icon_url: this._discord_client.user.avatarURL, url: config.site }, fields: [{ name: 'stack trace', value: `\`\`\`ps\n${error.stack}\`\`\`` }, ...fields ], timestamp: new Date }}).catch (this.onError.bind (this)) } constructor ( discord_client: Client, guilds: CGuilds, channels: CChannels) { this._discord_client = discord_client this._guilds = guilds this._channels = channels } protected _discord_client: Client protected _guilds: CGuilds protected _channels: CChannels }
typescript
<reponame>gfis/gramword<filename>web/all.css /* all.css - Cascaded Style Sheet with all morphem codes @(#) $Id$ 2016-09-28: .RelCl italics bold 2016-09-23: .Pu = punctuation; .Xy: unrecognized 2016-09-20: revised; undo colors with web/unclass.pl 2006-06-09: colored morphology 2005-08-18: copied from html/gfis.css 2003-07-25: body font-family 2003-03-22: without HTML comments and tags 2000-11-20, <NAME> */ .Ab { color:white ; background-color: goldenrod } .Aj { color:black ; background-color: lightblue } .Ar { color:white ; background-color: green } .Au { color:black ; background-color: lightgreen } .Av { color:black ; background-color: red } .Cc { color:lightred ; background-color: yellow } .Cj { color:blue ; background-color: yellow } .Er { color:white ; background-color: black } .Ir { color:green ; background-color: yellow } .Nm { color:blue ; background-color: chartreuse } .Nu { color:black ; background-color: yellow } .Pn { color:white ; background-color: crimson } .Pp { color:white ; background-color: crimson } .Pr { color:red ; background-color: yellow } .Ps { color:white ; background-cclor: red } .Pu { color:white ; background-color: black ; font-weight:bold } .Rp { color:black ; background-color: yellow } .Sb { color:black ; background-color: pink } .Un { color:white ; background-color: gray } .Vb { color:white ; background-color: mediumblue } .Xy { color:black ; background-color: azure } .RelCl { font-style:italic; font-weight: bold; } /* } */ body,p,h1,h2,h3,h4,dl,dd,dt,ul,ol,li,div,td,th,address,blockquote,nobr,b,i,a,br,img { font-family:Verdana,Arial,sans-serif;} dt { font-weight: bold } tt { font-family:Courier; } td { vertical-align:top } body { background-color:white }
css
http://data.doremus.org/artist/c5d5735c-1095-3ed4-a20f-1208ab9567f9 http://data.doremus.org/artist/fe285a82-eb65-35f6-9dfb-5fb426610091 http://data.doremus.org/artist/a4e8f64d-3411-3eb4-8e09-59e24bc26bf3 http://data.doremus.org/artist/bc0a12c0-eeeb-31cb-87c6-14cd99833cfa http://data.doremus.org/artist/451182f6-341b-32ff-bcc1-6594a92e9df2 http://data.doremus.org/artist/c2e25a07-7a54-335a-9a9e-e20a47713a7d http://data.doremus.org/artist/2b914697-60d9-37c2-91a6-d5a42e0b5f15 http://data.doremus.org/artist/c55e6ff7-02a9-3252-88ef-391354beb836
json
package timerx; /** * Exception thrown when input format does not contain any special symbols like "H", "M", * "S" or "L" */ public class NoNecessarySymbolsException extends RuntimeException { public NoNecessarySymbolsException(String message) { super(message); } }
java
<filename>maps/gsiv/rooms/9241.json<gh_stars>1-10 { "id": 9241, "title": [ "[Thurfel's Island]" ], "description": [ "Resting upon the pebbly terrain of this beach is a gigantic grey geode the size of a large cart. It is cracked completely in half revealing large clusters of red spinel crystals. Oddly, the gems within the huge stone do not appear to be natural in origin." ], "paths": [ "Obvious exits: north, south" ], "location": "Thurfel's Island", "wayto": { "9154": "north", "9146": "south" }, "timeto": { "9154": 0.2, "9146": 0.2 }, "image": "imt-underground-1264234799.png", "image_coords": [ 530, 864, 540, 874 ], "tags": [ "some bur-clover root" ] }
json
<gh_stars>100-1000 { "account_contacts_service_edit": "Edit contacts", "account_contacts_service_edit_description": "Edit contacts for the {{ serviceName }} service", "account_contacts_service_edit_contact_admin": "Admin contact", "account_contacts_service_edit_contact_tech": "Technical contact ", "account_contacts_service_edit_contact_billing": "Billing contact", "account_contacts_service_edit_cancel": "Cancel", "account_contacts_service_edit_confirm": "Confirm", "account_contacts_service_edit_error": "An error has occurred requesting a change of contact: {{ message }}", "account_contacts_service_edit_success": "The contact change request has been submitted successfully. The contacts involved in the request will receive an email containing the validation procedure.", "account_contacts_service_edit_warn_debt": "You cannot edit the billing contact, as there is a bill pending payment for this service. Please pay the bill in order to edit the contact.", "account_contacts_service_edit_pay": "Pay bill", "account_contacts_service_edit_warn_contact_billing": "You cannot edit the billing contact, as there is a bill pending payment for this service. Please contact the current billing contact {{ nicBilling }} so that they can make the change.", "account_contacts_service_edit_description_trusted": "Change the contacts for your service {{serviceName}} in the Trusted Zone." }
json
<reponame>javamaniac/lotb<gh_stars>0 { "id": "cha-pirate-skeleton-sentinel", "name": "<NAME>", "class": "Sentinel", "stars": 3, "eddie": false, "awakenable": false, "talismans": "SSS...", "talismansSet": "6s 5s 4s", "url": "http://www.news.maiden-lotb.com/n3/character-en/pirate-skeleton-sentinel/", "image": "http://www.news.maiden-lotb.com/n3/wp-content/uploads/2020/07/hud_icon_pirateskeleton_sentinel.png", "skills": [ { "name": "<NAME>", "typeName": "Present Basic Attack", "type": "Basic", "desc": [ "• Deal physical damage to a single target that increases based on your MAX HP.", "• 50% Chance inflict Sleep on the target for 2 turns.", "• 25% Chance to inflict Perfect Sleep on the target for 2 turns.", "• This attack does not wake sleeping enemies." ] }, { "name": "<NAME>", "typeName": "Present Power Attack", "type": "Power", "desc": [ "• Gain Defense Up and MR Up for 2 turns.", "• Remove Immunity from all enemies.", "• Inflict Taunt on each enemy below 50% HP for 2 turns.", "• Grant Sleep Shield to all allies for 2 turns." ], "powerCost": 4 }, { "name": "<NAME>", "typeName": "Passive", "type": "Passive", "desc": [ "• Gain Sleep Shield for 2 turns at the start of battle.", "• 20% Chance to inflict Perfect Sleep on a random enemy for 2 turns after every action.." ] } ] }
json
President Trump unleashed his latest rant against the FBI search of his home on his social media platform late Monday night and called for the immediate release of the "completely unredacted" affidavit that was used to justify the raid. "There is no way to justify the unannounced RAID of Mar-a-Lago," the former president wrote on Truth Social. "The home of the 45th President of the United States (who got more votes, by far, than any sitting President in the history of our Country! ). " Trump also references "gun toting FBI Agents" and "the Department of ‘Justice’" in his post. "But, in the interest of TRANSPARENCY, I call for the immediate release of the completely Unredacted Affidavit pertaining to this horrible and shocking BREAK-IN," the business mogul continued. "Also, the Judge on this case should recuse! " The former president's latest tirade comes after the DOJ filed a motion to block the release of the affidavit used to search the Florida mansion. The Justice Department says it would comply with a court order to partially unseal the affidavit, but "respectfully requests an opportunity to provide the Court with proposed redactions. " A judge had unsealed the search warrant on Friday after the government had "determined that these materials could be released without significant harm to its investigation," the Justice Department wrote. EXCLUSIVE: TRUMP 'WILL DO WHATEVER' HE CAN TO 'HELP THE COUNTRY' AFTER FBI RAID: 'TEMPERATURE HAS TO BE BROUGHT DOWN' Despite their opposition to the release of the affidavit, the Justice Department attested that it would not block the release of any other documents related to the FBI raid of Mar-a-Lago, including the warrant's cover sheets. Trump has doubled-down on his attacks against the nation's intelligence agencies, standing firm in his assertion that the searches and seizures are part of a political plot to prevent him from running for president again. "Wow! In the raid by the FBI of Mar-a-Lago, they stole my three Passports (one expired), along with everything else," he wrote on his Truth Social account earlier on Monday. "This is an assault on a political opponent at a level never seen before in our Country. "
english
class Solution { public: int minMoves(vector<int>& nums) { int min = nums[0]; for (const auto &num : nums) { min = std::min(min, num); } int ret = 0; for (const auto &num : nums) { ret += num - min; } return ret; } };
cpp
package dmdn2.ir; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import dmdn2.ir.util.MyJSON; import org.apache.solr.client.solrj.SolrServerException; public class Database{ private String db_name; private String db_server; private String db_port; private String db_user; private String db_password; public Database() throws IOException, SQLException { db_name= App.config_json().get("db_name").toString(); db_server=App.config_json().get("db_server").toString(); db_port=App.config_json().get("db_port").toString(); db_user=App.config_json().get("db_user").toString(); db_password=App.config_json().get("db_password").toString(); } public Boolean delete_record(String link) { try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { //System.out.println("eliminazione effettuata"); //System.out.println(link); String sql = "delete from links where link ='"+link+"';"; //System.out.println(sql); Statement stmt = con.createStatement(); stmt.execute(sql); Solr_up.delete_Solr(link); } } catch (SQLException e) { System.out.println("non si è connesso\n"+e.getMessage()); return false; } catch (SolrServerException e) { e.printStackTrace(); return false; } catch (IOException e) { e.printStackTrace(); return false; } return true; } public String get_link_table() throws Exception{ try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { String sql = "select * from links"; Statement stmt = con.createStatement(); ResultSet set = stmt.executeQuery(sql); return MyJSON.convert(set).toString(); } } catch (SQLException e) { System.out.println(e.getMessage()); } return "url"; } public String getColonna(String tipo) throws Exception{ try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { String sql=""; if (tipo.equals("professore")) sql = "select distinct professore from links"; if (tipo.equals("tipologia")) sql = "select distinct tipologia from links"; if (tipo.equals("materia")) sql = "select distinct materia from links"; if (tipo.equals("anno")) sql = "select distinct anno from links"; if (!sql.equals("")) { Statement stmt = con.createStatement(); ResultSet set = stmt.executeQuery(sql); return MyJSON.convert(set).toString(); } } } catch (SQLException e) { System.out.println(e.getMessage()); } return "url"; } public void upload_data_multiplo(String file) { ArrayList<String> file_ = read(file); //System.out.print(file_); //System.out.println(Integer.parseInt(lines[4].substring(0, lines[4].length()-1))); int k = 0; while (k < file_.size()) { //qui ho la riga delle info materia.. String[] lines = file_.get(k).split(","); //System.out.println(lines[0]); int i = k+1; for (; i <= Integer.parseInt(lines[4].substring(0, lines[4].length()-1))+k; i++) { //qui ho i link.. //System.out.println(lines[2]); upload_data(lines[0],lines[1],lines[2],lines[3],file_.get(i)); } k=i; } System.out.print("terminato l'upload"); /* try { Connection conn = DriverManager.getConnection(url); if (conn != null) { String sql = "INSERT INTO links " + "(link, professore,materia,anno) " + "VALUES "+"('"+link+"','"+prof+"','"+materia+"','"+anno+"');"; Statement stmt = conn.createStatement(); stmt.execute(sql); } } catch (SQLException e) { System.out.println(e.getMessage()); } */ } public static ArrayList<String> read(String nome_file) { ArrayList<String> sb = new ArrayList<String>(); try { File file = new File(nome_file); //creates a new file instance FileReader fr = new FileReader(file); //reads the file BufferedReader br = new BufferedReader(fr); //creates a buffering character input stream //constructs a string buffer with no characters String line; while((line=br.readLine())!=null) { sb.add(line); //appends line to string buffer //sb.add("\n"); //line feed } fr.close(); //closes the stream and release the resources //System.out.println("Contents of File: "); //System.out.println(sb.toString()); //returns a string that textually represents the object } catch(IOException e) { e.printStackTrace(); } return sb; } public Boolean upload_data(String tipologia, String prof,String materia,String anno, String link) { try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { String sql = "INSERT INTO links " + "(tipologia, professore, materia, anno, link) " + "VALUES "+"('"+tipologia+"','"+prof+"','"+materia+"','"+anno+"','"+link+"');"; Statement stmt = con.createStatement(); System.out.println(sql); stmt.execute(sql); //starta il treadh per il dowload Scraper sca = new Scraper(prof, materia, anno, link, tipologia); Thread_class.dowload_thread(sca); return true; } return false; } catch (SQLException | InterruptedException e) { System.out.println(e.getMessage()); return false; } } public Boolean update_record(String tipologia, String prof,String materia,String anno, String link, String link_vecchio) { try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { String sql = "UPDATE links SET " + "tipologia='" + tipologia + "'," + "professore='" + prof + "'," + "materia='" + materia + "'," + "anno='" + anno + "'," + "link='" + link + "'" + "WHERE link='" + link_vecchio + "'"; //System.out.println(sql); Statement stmt = con.createStatement(); stmt.execute(sql); //starta il treadh per il dowload Scraper sca = new Scraper(prof, materia, anno, link, tipologia); Thread_class.dowload_thread(sca); return true; } return false; } catch (SQLException | InterruptedException e) { System.out.println(e.getMessage()); return false; } } public void createNewDatabase() { try { Connection con = DriverManager.getConnection( "jdbc:mysql://" + db_server + ":" + db_port + "/" + db_name, db_user, db_password); if (con != null) { DatabaseMetaData meta = con.getMetaData(); System.out.println("The driver name is " + meta.getDriverName()); System.out.println("A new database has been created."); String sql ="CREATE TABLE links (tipologia varchar(50), professore varchar(50), materia varchar(70), anno varchar(5), link VARCHAR(400) PRIMARY KEY);"; Statement stmt = con.createStatement(); stmt.execute(sql); } } catch (Exception e) { System.out.println(e.getMessage()); } } }
java
Leg-spinner Rehan Ahmed created history on his Test debut on Saturday, December 17, when he became the youngest player from England to represent the team in Test matches. On Monday, December 19, he created another record when he became the youngest debutant to claim a five-wicket haul in men’s Tests. Ahmed claimed five for 48 in 14. 5 overs in the second innings of the third Test against Pakistan at the National Stadium in Karachi. Resuming their second innings on 21/0, Pakistan were bowled out for 216 in 74. 5 overs. The hosts were in a decent position at 164/3 at one point. However, Ahmed ran through the middle and lower order as Pakistan lost their last seven wickets for the addition of a mere 52 runs. The 18-year-old got the massive scalp of Pakistan skipper Babar Azam for 54 and then added the wickets of Mohammad Rizwan (seven), Saud Shakeel (53), and Mohammad Wasim (two). He completed a historic five-wicket haul when Agha Salman (21) top-edged a sweep. The Twitterati praised the young England leg-spinner for a memorable performance in his debut Test. Here are some reactions from the micro-blogging site to Ahmed’s brilliant bowling in his maiden Test match: Ahmed’s five-wicket haul on his Test debut put England in a commanding position to win the third Test against Pakistan in Karachi. The visitors need only 167 runs to complete a 3-0 clean sweep of Babar and co. They had earlier beaten the hosts by 74 runs in Rawalpindi and 26 runs in Multan. England had raced away to 93 for one in just 13 overs in their fourth innings, with openers Zak Crawley and Ben Duckett displaying extremely aggressive mood. Earlier, Pakistan won the toss and opted to bat first in the Test. They were bowled out for 304 despite skipper Babar’s 78 and Agha Salman’s 56. Ahmed claimed 2/89 in the first innings, while Jack Leach picked up 4/140. Harry Brook’s 111 saw England put up 354 in response. Babar and Shakeel then added 110 for the fourth wicket in Pakistan’s second innings before Ahmed triggered a batting collapse.
english
Pranitha Subhash, who has done films such as 'Attarintiki Daredi', 'Rabhasa', 'Brahmotsavam' and 'Hello Guru Prema Kosame' in Telugu, has become the first actress to donate money for the well-being of affected sections among the poor in the wake of the ongoing nation-wide lockdown. Taking to Twitter, the Bengaluru-based actress today revealed that she will be donating Rs 1 lakh towards supporting the livelihood needs of 50 families through her Pranitha Foundation. The kind-hearted damsel has joined hands with Logical Indian and Efforts 4 Good to start the initiative 'Help The Helping Hands'. "Due to the lockdown, daily wage-earners, auto-wallahs, construction workers, etc. are finding it very difficult to have a source of income. The government is doing its bit. Still, we all should come out and help them. Rs 2,000 per family is what is needed to help them through the crisis. Through our initiative, we are planning to support 500 families. We all need your support. The money will go into buying medicines and other supplies for the poor," Pranitha said in a video message. I’ll be donating ₹1 L and supporting 50 families through this. Follow us on Google News and stay updated with the latest!
english
{ "": [ "--------------------------------------------------------------------------------------------", "Copyright (c) Microsoft Corporation. All rights reserved.", "Licensed under the Source EULA. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], "emptyUserSettingsHeader": "Inserire le impostazioni qui per sovrascrivere quelle predefinite.", "emptyWorkspaceSettingsHeader": "Inserire le impostazioni qui per sovrascrivere le impostazioni utente.", "emptyFolderSettingsHeader": "Inserire le impostazioni cartella qui per sovrascrivere quelle dell'area di lavoro.", "reportSettingsSearchIssue": "Segnala problema", "newExtensionLabel": "Mostra l'estensione \"{0}\"", "editTtile": "Modifica", "replaceDefaultValue": "Sostituisci nelle impostazioni", "copyDefaultValue": "Copia nelle impostazioni" }
json
<reponame>iranzo/assisted-service // Code generated by MockGen. DO NOT EDIT. // Source: validations.go // Package ocs is a generated GoMock package. package ocs import ( gomock "github.com/golang/mock/gomock" models "github.com/openshift/assisted-service/models" reflect "reflect" ) // MockOcsValidator is a mock of OcsValidator interface type MockOcsValidator struct { ctrl *gomock.Controller recorder *MockOcsValidatorMockRecorder } // MockOcsValidatorMockRecorder is the mock recorder for MockOcsValidator type MockOcsValidatorMockRecorder struct { mock *MockOcsValidator } // NewMockOcsValidator creates a new mock instance func NewMockOcsValidator(ctrl *gomock.Controller) *MockOcsValidator { mock := &MockOcsValidator{ctrl: ctrl} mock.recorder = &MockOcsValidatorMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use func (m *MockOcsValidator) EXPECT() *MockOcsValidatorMockRecorder { return m.recorder } // ValidateOCSRequirements mocks base method func (m *MockOcsValidator) ValidateOCSRequirements(cluster *models.Cluster) string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ValidateOCSRequirements", cluster) ret0, _ := ret[0].(string) return ret0 } // ValidateOCSRequirements indicates an expected call of ValidateOCSRequirements func (mr *MockOcsValidatorMockRecorder) ValidateOCSRequirements(cluster interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateOCSRequirements", reflect.TypeOf((*MockOcsValidator)(nil).ValidateOCSRequirements), cluster) }
go
<reponame>KingMon-vue-admin/kingMon-vue-admin import { loadChildSysOrgs, createSysOrgs, addRoles, deleteSysOrgs } from '@/api/sysOrg' const sysOrg = { state: { Org: [], Nows: [] }, mutations: { UPDATA_APP_USER: (state, list) => { state.Org = list }, UPDATA_APP_NOWS: (state, data) => { state.Nows = data } }, actions: { // 查询子集 async loadMorex({ commit }, Parm) { const response = await loadChildSysOrgs(Parm) commit('UPDATA_APP_NOWS', response.data.data.sysOrg) return response }, // 加载权限表 async loadChildSysOrg({ commit }, Parm) { const response = await loadChildSysOrgs(Parm) commit('UPDATA_APP_USER', response.data.data.sysOrg) return response }, // 更新某一个数据 async createSysOrg({ commit }, Parm) { return await createSysOrgs(Parm) }, // 删除该数据 async deleteSysOrg({ commit }, Parm) { return await deleteSysOrgs(Parm) }, // 添加权限 async addRole({ commit }, Parm) { return await addRoles(Parm) } } } export default sysOrg
javascript
<gh_stars>0 [{"liveId":"5b5c036b0cf2234479b4c8e7","title":"付紫琪的直播间","subTitle":"💜","picPath":"/mediasource/live/1532269290634ZyTlj9Bwn2.png","startTime":1532756843738,"memberId":460002,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5b5c036b0cf2234479b4c8e7.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3622142.flv","screenMode":0,"roomId":"6482742","bwqaVersion":0},{"liveId":"5b5c02d60cf26dbbba13e97d","title":"袋王的直播间","subTitle":"第五届总选演唱会外场","picPath":"/mediasource/live/1532742492136BEyCAVDmFJ.png","startTime":1532756694839,"memberId":63,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5b5c02d60cf26dbbba13e97d.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3622141.flv","screenMode":0,"roomId":"3870023","bwqaVersion":1},{"liveId":"5b5c02020cf2234479b4c8e6","title":"张羽涵的直播间","subTitle":"突然粗线!","picPath":"/mediasource/live/151911041829635IjF1X7ph.png","startTime":1532756482056,"memberId":530392,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5b5c02020cf2234479b4c8e6.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3622137.flv","screenMode":0,"roomId":"8755740","bwqaVersion":0},{"liveId":"5b5bfdb20cf2234479b4c8e2","title":"唐霖的电台","subTitle":"等待中","picPath":"/mediasource/live/1532452256641j3duflval4.jpg,/mediasource/live/15327553773839HGy126u92.jpg,/mediasource/live/1532755377625pqcZ1zUn85.jpg,/mediasource/live/1532755377779Kr6uvQG26S.jpg,/mediasource/live/1532755377953TyljY0AmQx.jpg,/mediasource/live/15327553781881ghfXuAP00.jpg,/mediasource/live/1532755378292GJvkUgSksq.jpg,/mediasource/live/1532755378379l4m29NiGiZ.jpg,/mediasource/live/1532755378455v74mr5EK9j.jpg,/mediasource/live/1532755378570Uw7F8hlrN6.jpg","startTime":1532755378636,"memberId":610042,"liveType":2,"picLoopTime":30000,"lrcPath":"/mediasource/live/lrc/5b5bfdb20cf2234479b4c8e2.lrc","streamPath":"http://livepull.48.cn/pocket48/shy48_tang_lin_Tu6O0.flv","screenMode":0,"roomId":"20820499","bwqaVersion":0},{"liveId":"5b5be0cf0cf2f04fd1e121f1","title":"刁滢的直播间","subTitle":"Σ>―(〃°ω°〃)♡→","picPath":"/mediasource/profile_icon.png","startTime":1532747983996,"memberId":679455,"liveType":1,"picLoopTime":0,"lrcPath":"/mediasource/live/lrc/5b5be0cf0cf2f04fd1e121f1.lrc","streamPath":"http://2519.liveplay.myqcloud.com/live/2519_3622078.flv","screenMode":0,"roomId":"22537510","bwqaVersion":0}]
json
The Phoenix Suns dropped their NBA preseason opener against the Utah Jazz by 14 points. However, they were handicapped without new star player Chris Paul, who was ruled out of the lineup after reportedly experiencing soreness in his right ankle. Date & Time: Monday, December 14th, 2020, 9 PM ET (Tuesday, December 15th, 7:30 AM IST) These two Western Conference rivals will face each other one more time in the NBA preseason schedule. Jordan Clarkson had a surprise performance for the Utah Jazz in the first matchup with 19 points off the bench. Suns bench player Langston Galloway also surprised the fans with 17 points in 16 minutes. The Utah Jazz are back on their home court for the first time since March and, according to Utah state laws, are allowed to have 1,500 fans in the arena. The Utah Jazz won their first preseason game by 14 points and are looking to repeat their performance in the next matchup, as well. Donovan Mitchell and Rudy Gobert form the team's main duo and will be responsible for leading the team to the playoffs this season. All eyes were set on Donovan Mitchell in the Utah Jazz's first preseason game. The league hasn't seen Mitchell since his brilliant playoff performance in the first round of the 2020 playoffs. He dropped 50+ points in an attempt to win games and recently signed a $195 million max extension with the Utah Jazz. Mitchell is the face of the Utah Jazz franchise for years to come. His performances in the 2020 playoffs cemented his stature in the league as one of the best shooting guards. The Phoenix Suns were the only team in the 2020 Orlando bubble to go undefeated. Following the blockbuster trade to acquire Chris Paul, the team is itching to show off its new backcourt duo of Devin Booker and Chris Paul. Unfortunately, due to soreness in his right ankle, Paul was asked to sit out of the preseason opener. As mentioned earlier, the Phoenix Suns were handicapped without Chris Paul, but he wasn't the only player missing from the lineup. Dario Saric and Jae Crowder were also ruled out of the game as Saric reported a quad injury, and the coach decided to not let Crowder play. The Phoenix Suns' 8-0 run in the Orlando bubble was led by the exceptional performances of their star guard, Devin Booker. The young shooting guard is the only player currently in the NBA with a 70-point game. Devin Booker is the next face of the Phoenix Suns franchise. He is so exceptionally talented at a young age that many analysts have said that he will lead the Phoenix Suns to their first-ever NBA title and might retire with league MVP honors. Chris Paul recently appeared on "The Old Man and Three" podcast and said that Booker was a major reason why he decided to come to Phoenix. The matchup of the Phoenix Suns and the Utah Jazz was interesting to watch as these two teams could meet again in the NBA 2021 playoffs. Everyone was excited to see young shooting guards Donovan Mitchell and Devin Booker go up against each other. Where to watch Suns vs Jazz? The Suns vs Jazz matchup will be nationally and locally televised on AT&T SportsNet and Fox Sports Arizona. International fans can stream the game live on the NBA League Pass. 5 Times Steph Curry Was HUMILIATED On And Off The Court!
english
/* eslint-disable @next/next/no-img-element */ import { apollo } from "apollo"; import { GET_ARTICLES_BY_SLUG } from "apollo/queries/articleQuery"; import Advertisement from "components/Advertisement"; import dayjs from "dayjs"; import ArticleLayout from "Layout/ArticleLayout"; import { NextPage, NextPageContext } from "next"; import Link from "next/link"; import React from "react"; import ReactMarkdown from "react-markdown"; import styled from "styled-components"; import { IArticle } from "types/interface"; import { SERVER_URI } from "utils/constants"; import { truncateTitle } from "utils/utils"; const SingleArticlePage: NextPage<{ article: IArticle | null }> = ({ article, }): JSX.Element => { return ( <ArticleLayout title={article?.title} description={article?.description}> <Wrapper> <div className="container single-article-wrapper"> <div className="single-article-wrapper-advertisement py-3 mb-3"> <nav aria-label="breadcrumb"> <ol className="breadcrumb"> <li className="breadcrumb-item"> <Link href="/"> <a className="link-dark text-decoration-none">Home</a> </Link> </li> <li className="breadcrumb-item"> <Link href="/articles/news"> <a className="link-dark text-decoration-none">Category</a> </Link> </li> <li className="breadcrumb-item active" aria-current="page"> {truncateTitle(article?.title, 6)} </li> </ol> </nav> {/* <p> <span className="text-muted">Home / Culture and tourism /</span> Vehicula cong... </p> */} <Advertisement /> </div> <div className="single-article-1"> <div className="d-inline-block mb-3"> <h2 className="georgia">{article?.title}</h2> <div className="line bg-warning"></div> </div> <div> <span className="d-block fw-bold mb-2"> {article?.author?.name} </span> <time className="d-block"> {/* May 20, 2021 */} {dayjs(article?.createdAt).format("MMM DD, YYYY")} </time> </div> </div> <div className="single-article-2"> <div className="single-article-2-img py-2"> <img src={SERVER_URI + article?.image?.url} alt="Landscape picture" width={`${100}%`} height={500} className="w-100 banner-image" /> </div> <div className="single-article-2-main mt-3"> <div className="px-3 text-justify mb-2"> <ReactMarkdown>{article?.content as string}</ReactMarkdown> </div> </div> </div> </div> </Wrapper> </ArticleLayout> ); }; export default SingleArticlePage; const Wrapper = styled.div` .single-article-wrapper { .banner-image { width: 100%; height: 38rem; object-fit: cover; } &-advertisement { width: 90%; max-width: 10000px; margin: 0 auto; .Advertise { width: 100% !important; } } } `; SingleArticlePage.getInitialProps = async ( ctx: NextPageContext, ): Promise<{ article: IArticle | null }> => { try { const { data } = await apollo.query({ query: GET_ARTICLES_BY_SLUG, variables: { slug: ctx?.query?.slug }, }); const article = data?.articles?.[0]; return { article, }; } catch (error) { console.log(error); return { article: null, }; } };
typescript
In what can be termed as concerning news, veteran Indian pacer, Ashish Nehra will undergo a knee surgery soon. The pacer injured his knee while representing Sunrisers Hyderabad in the ongoing edition of the IPL. As per sources close to the BCCI, Nehra’s knee surgery will take place in London soon. The operation will be done by Dr. Andrew Williams, an orthopedic specialist based in London. Nehra’s career got a new lease of life earlier this year when the pacer was chosen for India’s T20 squad for the tour of Australia. The veteran pacer had a fantastic outing Down Under as he was among the wickets and struck at the right moments. Nehra’s purple patch was evident during the home series against Sri Lanka, and the T20 Asia Cup which followed. The pacer was crucial behind India’s dominating outing in Bangladesh, where the men in blue won the Asia Cup. Nehra worked well as a mentor to the budding Indian bowlers in the World T20, as he was often witnessed advising the Indian bowlers during the tournament. With Nehra already over 37 years of age, a serious injury at this point could well mean an end to his illustrious career. “BCCI medical team confirms that India medium pacer, Ashish Nehra, injured his right knee during the VIVO Indian Premier League 2016. Assessment and investigation by BCCI medical staff revealed Nehra sustained a high-grade tendon injury and was recommended to consult Dr. Andrew Williams, an orthopaedic specialist in London. Post consultation, Dr. Williams has advised surgery on his right knee, which will take place shortly,” a statement from the BCCI revealed.
english
import React from "react"; const EmployeeAppContainer = (props) => { return <div className="employee-app-container">{props.children}</div>; }; export default EmployeeAppContainer;
javascript
'use strict'; const FluxConstant = require('flux-constant'); module.exports = FluxConstant.set([ 'DELETE', 'DELETE_RESPONSE', 'GET_DETAILS', 'GET_DETAILS_RESPONSE', 'GET_RML_TEMPLATE', 'GET_RML_TEMPLATE_RESPONSE', 'HIDE_DETAILS_SAVE_SUCCESS', 'SAVE_DETAILS', 'SAVE_DETAILS_RESPONSE', 'GET_TEMPLATE_LIST', 'GET_TEMPLATE_LIST_RESPONSE', 'GET_EXTRACTION_TRIPLES', 'GET_EXTRACTION_TRIPLES_RESPONSE', 'HIDE_ERROR' ]);
javascript
import React from 'react'; import { Link } from 'gatsby'; import Img from 'gatsby-image'; export default function ({ type, title, shortText, blogUrl, cardImg }) { return ( <div className="flex flex-col items-center justify-center lg:w-1/3 mt-14 rounded-lg shadow-lg overflow-hidden transform duration-150 scale-100 hover:scale-105" style={{ width: '420px' }} > <div className="flex-shrink-0"> <Img className="h-48 w-full object-cover" fixed={cardImg} alt={title} /> </div> <div className="flex-1 bg-white p-6 flex flex-col justify-between"> <div className="flex-1"> <p className="text-sm font-medium text-indigo-600"> <p className="cursor-default">{type}</p> </p> <Link to={blogUrl} className="block mt-2"> <p className="text-xl font-semibold text-gray-900">{title}</p> <p className="mt-3 text-base text-gray-600">{shortText}</p> </Link> </div> </div> </div> ); }
javascript
[{"gacha_id":80005,"gacha_name":"★3必中3周年轉蛋券","gacha_type":1,"ticket_id":24009,"gacha_times":1,"gacha_detail":2,"guarantee_rarity":"0","rarity_odds":"80000","chara_odds_star1":"80005_1","chara_odds_star2":"80005_2","chara_odds_star3":"80005_3","staging_type":1}]
json
<reponame>yehan2002/TrapsAndTrolls<gh_stars>1-10 package io.github.yehan2002.Traps.Util; import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.inventory.ItemStack; @SuppressWarnings("SpellCheckingInspection") public final class Constants { public static final Material OBSIDIAN = Material.OBSIDIAN; public static final Material WRITTEN_BOOK = Material.WRITTEN_BOOK; public static final Material CHEST = Material.CHEST; public static final Material IRON_FENCE; public static final Material AIR =Material.AIR ; public static final Material WEB; public static final Material DIAMOND = Material.DIAMOND; public static final Material MAGMA; public static final Material LAVA = Material.LAVA; public static final Sound JUMPSCARE; static { Material tmp; try { tmp = Material.valueOf("IRON_FENCE"); }catch (IllegalArgumentException ignored){ tmp = Material.valueOf("IRON_BARS"); } IRON_FENCE = tmp; try { tmp = Material.valueOf("WEB"); }catch (IllegalArgumentException ignored){ tmp = Material.valueOf("COBWEB"); } WEB = tmp; try { tmp = Material.valueOf("MAGMA"); }catch (IllegalArgumentException ignored){ try{ tmp = Material.valueOf("MAGMA_BLOCK"); }catch (IllegalArgumentException ignored2) { tmp = Material.LAVA; } } MAGMA = tmp; Sound tmpSound; try{ tmpSound = Sound.valueOf("ENTITY_ENDERDRAGON_AMBIENT"); }catch (IllegalArgumentException ignored) { try{ tmpSound = Sound.valueOf("Sound.ENTITY_ENDER_DRAGON_AMBIENT"); }catch (IllegalArgumentException ignored2) { tmpSound = null; } } JUMPSCARE = tmpSound; } }
java
<gh_stars>1-10 """Message type identifiers for Revocation Notification protocol.""" from ...didcomm_prefix import DIDCommPrefix SPEC_URI = ( "https://github.com/hyperledger/aries-rfcs/blob/main/features/" "0183-revocation-notification/README.md" ) PROTOCOL = "revocation_notification" VERSION = "1.0" BASE = f"{PROTOCOL}/{VERSION}" # Message types REVOKE = f"{BASE}/revoke" PROTOCOL_PACKAGE = "aries_cloudagent.protocols.revocation_notification.v1_0" MESSAGE_TYPES = DIDCommPrefix.qualify_all( {REVOKE: f"{PROTOCOL_PACKAGE}.messages.revoke.Revoke"} )
python
Note-taking, at its essence, is an impulsive act. When you hear something you need to write down, all it takes is a few simple gestures—grab a notebook, steady your pen, scribble away—and you’re taken care of. It’s funny then, that a lot of the most popular note-taking apps out there have evolved into something that rivals a blogging CMS in their complexity. Embeddable images, extended keyboards, voice recording. “It’s almost as though they were very focused on almost pro notetakers or journaling or something,” says Juan Sanchez. >Note-taking apps have evolved into something that rivals a blogging CMS. Sanchez, co-founder of Tack Mobile, a Denver-based interactive firm that specializes in mobile interaction development, wanted a simpler way to jot things down. Something like the sticky notes he kept on his desk. So he and his team of designers and developers decided to make it. Their new app for iOS, Noted, is a stripped-down option for taking notes. Noted, says Sanchez, is Tack’s exploration into gesture-driven apps. It’s something of an experiment to push the boundaries of interaction, using a simple action like note-taking as the test subject. “We wanted to have an opinion of what a note-taking app could be. A lot of times, there’s too much reliance on patterns that already exist, it’s pretty easy to just get locked up in those conventions and that prevents you from really exploring,” he says. You can download Noted for free in the app store.
english
Hello all and welcome to our continuing live updates of select games of the World Cup. It's a new day as far as the World Cup is concerned and today, arguably, is also the start of the vital group games for most of the sides: the last remaining game. Pardon me if I use cliches such as "winner takes all" for the next couple of days because the stakes really are that high. And there is also a change of timings from today. No more games will be kicking-off at 17:00 IST. All Groups A, C, E and G games will start from 19:30 IST while the last remaining games for Groups B, D, F and H will commence from midnight. There will be two games played simultaneously and four games played in a single day. Right, that's that about which Group will be playing when. Both the games of Group A will be kicking-off from 19:30. Uruguay faces Mexico while France takes on the host nation South Africa. The game in focus is France vs South Africa. But fans of Latin and Central American football, don't get disheartened. All the important news and updates from Uruguay vs Mexico will land on this screen as soon as it happens. Lot has been said and written about France, but sadly for them, it's not been positive. There has been a lot of catharsis — both from present and past footballers — about the current fiasco. There were even damaging reports about players threatening to not play today. And keeping in mind all the developments since Mexico beat France, Raymond Domenech has made some interesting team decisions. Former Liverpool striker Djibril Cisse starts alongside Andre-Pierre Gignac. There is no place in the starting line-up for Lyon midfielder Jeremy Toulalan who is suspended while Gourcuff comes back into the starting eleven. But the most eye-raising replacement >is the inclusion of Gael Clichy for captain Patrice Evra. France: Hugo Lloris, Bacary Sagna, William Gallas, Sebastien Squillaci, Gael Clichy, Alou Diarra, Abou Diaby, Yoan Gourcuff, Franck Ribery; Andre-Pierre Gignac, Djibril Cisse. South Africa: Moeneeb Josephs, Anele Ngcongoa, Bongani Khumalo, Aaron Mokoena, Tsepo Masilela, MacBeth Sibaya, Thanduyise Khuboni, Steven Pienaar, Siphiwe Tshabalala, Katlego Mphela, Bernard Parker. Uruguay team news: Coach Oscar Tabarez has walked the talk indeed. He maintains the feared forward line-up of Forlan, Suarez and Cavani. >This is exactly what Tabarez (and Aguirre) had to say before the game. The teams are out of the tunnel and the match is moments away from kicking-off. Rise, for the national anthems. Will it be high-stakes poker where the team which takes the most chances win or will it be a cautious, conservative affair decided by a single goal? It promises to be a belter with probably one or two spies just looking after what Uruguay and Mexico are up to. The anthems have been sung and the players are shaking hands. The French squad wouldn't have done that in quite a while. France will be getting us under way, playing from left to right on your TV screens. The match has kicked-off. The French back-four has a heavy Arsenal influence with no less than three of the back four currently plying their trade with the North London club. 3rd minute The much-vaunted Gourcuff runs down the left before releasing Gignac inside the area. But Gignac's shot is weak and is saved comfortably by the keeper. Up the other end, South Africa has an early look at the French goal but nothing comes of it. 7th minute Given their performances till now, the French have started brightly. They have already made a couple of attacking forays. 9th minute Some quality forward-pressing from Clichy down the left checks a South African progress. They are more urgent today, the French. 12th minute The long-ranging legs of Daiby strides down the attacking third but his pass comes to nothing. Half-hearted appeals of a hand-ball from Cisse but nothing tragic for the South Africans yet. 14th minute A french corner is dealt with ease by the South African defence. It's still deadlocked in the group ' s other game between Uruguay and Mexico. Suarez had a chance to put Uruguay in front but did not take it. 20th minute France 0-1 South Africa. A corner from Tshabalala beats the outstretched hands of Lloris, poor keeping one must say, and is headed in by Khumalo. A powerful header that but not very dominating keeping from Lloris. 24th minute They almost have a second but Mphela does not find the left bottom corner from inside the penalty area. 26th minute Gourcuff sent off. Gourcuff, in an aerial battle with Sibaya, and catches the South African with his leading arm. The referee shows a straight red. Don't really know whether there was intent to hurt. The French don't know what has hit them. They are looking bemused to say the least. 34th minute Pienaar wins a free-kick from a tempting 22-yards but the first goal-scorer of this World Cup, Tshabalala, puts it over the bar. The match between Uruguay and Mexico is still goalless. Andres Guardado, though, did hit the woodwork with a cracking strike. 37th minute A cross from Tshabalala ping-pongs around the French box before a low drive from Masilela is tapped in by Mphela into an empty net. Mphela did have to win a duel with Clichy and the lose ball was seized upon by Mphela. The South Africans are all over the French. But celebrations are tempered because the match between Uruguay and Mexico is still goalless. 43rd minute Mphela, from about 20-yards, lashes in a low shot but Lloris produces a fine save and turns it behind for a corner. 44th minute: Breaking News: Uruguay leads Mexico through Luis Suarez. 45th minute Another South African attack is under way but the referee halts play because Gignac is down and holding his face. The half-time whistle goes in both the games. The first 45 minutes has been nothing short of drama. South Africa leads France 2-0 while Uruguay, just before half-time, scored through Luis Suarez. The French side has not turned up for the encounter. There were myriad changes for the Les Blues but nothing seems to be working. Gourcuff, who sparkled in the initial minutes, was given his marching orders for a leading arm. Replays suggested that the punishment could have been less severe as there was no clear intent to harm the South African player in question. South Africa won't care. They need to score two more goals here and hope that Mexico don't reply to Uruguay's earlier effort. Just minutes away from the second-half. This could well be the last 45 minutes of Raymond Domenech's reign as the coach of France. His successor, Laurent Blanc, will takeover once the World Cup is over. Looking at the last 45 minutes, and generally taking the World Cup as a whole, he will have a lot of work once he takes over. Malouda has come on for Gignac. The match has kicked-off after half-time. Just to remind the readers: South Africa needs to score two more goals, without France scoring, and hope that Uruguay don't concede for the "Bafana Bafana" to go through. 49th minute The first effort of the second-half. Bernard Parker's left-footed strike from 22-yards is saved by Lloris. 51st minute Mphela almost makes it three. A pin-point pass from Tshabalala through the centre finds Mphela all alone but his effort from near the six-yard box hits the outside of the right post before going out for a goal-kick. What a chance. Thierry Henry is warming up near the touchline. 54th minute Sagna's accurate pass from the right finds Cisse but Cisse's shot, from just outside the area, goes over the bar. That is the last contribution of Cisse. He makes way for Henry. The South Africans again have lots of possession inside their attacking third. But the final, telling ball never arrives and the ball goes out for a goal-kick. Meanwhile, Gaxa comes on for Ngcongca. 58th minute Another high-quality save from Lloris, again Mphela the man denied. His shot from the edge of the area is turned behind expertly by the Lyon keeper. 59th minute Ribery manufactures a yard of space before shooting from just inside the area. But his shot goes over the bar. It has been a World Cup to forget for the Bayern Munich winger. South Africa is just two unanswered goals away from keeping the record of host nations always qualifying to the knockouts intact. 62nd minute Mphela goes on a little run down the right before cutting inside and shooting from a difficult angle. But his effort is saved by Lloris. Henry, after coming on, has taken the captain's armband. 66th minute Pienaar's low drive from well outside the box is pouched by Lloris. 67th minute Tshabalala is struggling with an injury here. 68th minute Nomvethe replaces Parker. 70th minute That's the best move by the French and it has resulted in a goal. Ribery's pass, after inviting the keeper to rush forward down the right, sets up a simple tap-in for second-half replacement Florent Malouda. Consolation or inspiration for the greatest comeback ever, only time will tell. This is end to end stuff. South Africa counter-attack but only the legs of the last man prevent South Africa from scoring their third. 75th minute Nomvethe takes on the entire French defence but the move comes to a disappointing end. It's still 1-0 in the other game but Mexico will go through on goal difference. 80th minute A dipping effort from Tshabalala goes over the bar. It did have the complete attention of Lloris. 82nd minute A long-floating effort from Henry flies over the keeper's head. It's desperation for Les Blues here, who are looking to salvage some pride. 83rd minute Tshabala springs yet an other attacking move for "Bafana Bafana". But it breaks down without causing Lloris any harm. Tshabalala has had an outstanding game, possessing a great engine from the middle of the park, taking on the entire French defence. To be fair to him, he has not stopped running after his opener against Mexico. This has been an outstanding achievement from the rainbow nation. But, only a bizzare change of events will eliminate Mexico (which is still trailling against Uruguay). 90+1 Modise's effort from just outside the box hits the side-netting. 90+2 Tshabalala is close to giving South Africa a third. He is unmarked and has ownership of the French penalty area and from around six-yards out, he hammers it in but Lloris saves. The rebound, cue for Tshabalala to run after it, is cleared. The final whistle blows. What a game this has been. South Africa is eliminated but they can walk with their heads held high. The French have also been eliminated. For the French, they will need to introspect like never before. This tournament has been nothing short of embarrasment for the Les Blues - on as well as off the field. They were a sorry apology for a football team competing in the World Cup. There were myriad divisions among the team and never really looked at fighting it out on the pitch. Domenech will have to take some blame because of his handling of the affairs, but the players cannot escape criticism either. The group's other game, featuring Mexico and Uruguay, ended 1-0 to the Latin Americans but both of them are through to the last 16. A sensational result for the Mexicans, who were tipped to finish third behind France and Uruguay according to all the pundits. Credit to Uruguay and Mexico who played out an actual game of football, defying all pre-match talk. For the "Bafana Bafana", this tournament has given them a wonderful opportunity to test their footballing culture against some of the best countries of the world. Although they might be disappointed with the final outcome, they stood up to Mexico and outclassed France. That's all from me. . but that's not all for the day. Be sure to join Ashwin Achal, who will be covering Argentina and Greece from 23:45 IST tonight (and also keeping a careful eye over the developments of South Korea and Nigeria).
english
<filename>auto_tests/tests/dygraph-options-tests.js /** * @fileoverview Test cases for DygraphOptions. */ import Dygraph from '../../src/dygraph'; import DygraphOptions from '../../src/dygraph-options'; import OPTIONS_REFERENCE from '../../src/dygraph-options-reference'; describe("dygraph-options-tests", function() { cleanupAfterEach(); var graph; beforeEach(function() { graph = document.getElementById("graph"); }); /* * Pathalogical test to ensure getSeriesNames works */ it('testGetSeriesNames', function() { var opts = { width: 480, height: 320 }; var data = "X,Y,Y2,Y3\n" + "0,-1,0,0"; // Kind of annoying that you need a DOM to test the object. var g = new Dygraph(graph, data, opts); // We don't need to get at g's attributes_ object just // to test DygraphOptions. var o = new DygraphOptions(g); assert.deepEqual(["Y", "Y2", "Y3"], o.seriesNames()); }); /* * Ensures that even if logscale is set globally, it doesn't impact the * x axis. */ it('testGetLogscaleForX', function() { var opts = { width: 480, height: 320 }; var data = "X,Y,Y2,Y3\n" + "1,-1,2,3"; // Kind of annoying that you need a DOM to test the object. var g = new Dygraph(graph, data, opts); assert.isFalse(!!g.getOptionForAxis('logscale', 'x')); assert.isFalse(!!g.getOptionForAxis('logscale', 'y')); g.updateOptions({ logscale : true }); assert.isFalse(!!g.getOptionForAxis('logscale', 'x')); assert.isTrue(!!g.getOptionForAxis('logscale', 'y')); }); // Helper to gather all warnings emitted by Dygraph constructor. // Removes everything after the first open parenthesis in each warning. // Returns them in a (possibly empty) list. var getWarnings = function(div, data, opts) { var warnings = []; var oldWarn = console.warn; console.warn = function(message) { warnings.push(message.replace(/ \(.*/, '')); }; try { new Dygraph(graph, data, opts); } catch (e) { } console.warn = oldWarn; return warnings; }; it('testLogWarningForNonexistentOption', function() { if (!OPTIONS_REFERENCE) { return; // this test won't pass in non-debug mode. } var data = "X,Y,Y2,Y3\n" + "1,-1,2,3"; var expectWarning = function(opts, badOptionName) { DygraphOptions.resetWarnings_(); var warnings = getWarnings(graph, data, opts); assert.deepEqual(['Unknown option ' + badOptionName], warnings); }; var expectNoWarning = function(opts) { DygraphOptions.resetWarnings_(); var warnings = getWarnings(graph, data, opts); assert.deepEqual([], warnings); }; expectNoWarning({}); expectWarning({nonExistentOption: true}, 'nonExistentOption'); expectWarning({series: {Y: {nonExistentOption: true}}}, 'nonExistentOption'); // expectWarning({Y: {nonExistentOption: true}}); expectWarning({axes: {y: {anotherNonExistentOption: true}}}, 'anotherNonExistentOption'); expectWarning({highlightSeriesOpts: {anotherNonExistentOption: true}}, 'anotherNonExistentOption'); expectNoWarning({highlightSeriesOpts: {strokeWidth: 20}}); expectNoWarning({strokeWidth: 20}); }); it('testOnlyLogsEachWarningOnce', function() { if (!OPTIONS_REFERENCE) { return; // this test won't pass in non-debug mode. } var data = "X,Y,Y2,Y3\n" + "1,-1,2,3"; var warnings1 = getWarnings(graph, data, {nonExistent: true}); var warnings2 = getWarnings(graph, data, {nonExistent: true}); assert.deepEqual(['Unknown option nonExistent'], warnings1); assert.deepEqual([], warnings2); }); });
javascript
import Methods from './methods' class ObnizSdk extends Methods { static socket: null | WebSocket static isConnected: boolean private host: string private id: string constructor(id: string) { super() this.host = 'wss://obniz.io' ObnizSdk.socket = null ObnizSdk.isConnected = false this.id = id } get isConnecting(): boolean { return ObnizSdk.isConnected } private initialConnect = () => new Promise((resolve, reject) => { ObnizSdk.socket = new WebSocket(`${this.host}/obniz/${this.id}/ws/1`) try { ObnizSdk.socket.onmessage = event => JSON.parse(event.data).map((data: any) => { if (data.ws && data.ws.redirect && ObnizSdk.socket) { this.host = data.ws.redirect ObnizSdk.socket.onmessage = null ObnizSdk.socket.close() resolve() } reject('Initial connect') }) } catch (e) { reject(e) } }) private reconnect = () => new Promise((resolve, reject) => { ObnizSdk.socket = new WebSocket(`${this.host}/obniz/${this.id}/ws/1`) try { ObnizSdk.socket.onmessage = event => JSON.parse(event.data).map((data: any) => { if (data.ws && data.ws.ready) { resolve() } reject('Initial reconnect') }) } catch (e) { reject(e) } }) public connect = async () => { try { await this.initialConnect() await this.reconnect() ObnizSdk.isConnected = true } catch (e) { throw Error(e) } } public disConnect = () => new Promise((resolve, reject) => { if (ObnizSdk.socket) { try { ObnizSdk.socket.onmessage = null ObnizSdk.socket.close() ObnizSdk.socket = null ObnizSdk.isConnected = false resolve() } catch (e) { reject(e) } } else { reject('Does not connecting yet.') } }) } export default ObnizSdk
typescript
Washington: Top seeds John Isner and Samantha Stosur were ousted from the ATP and WTA Washington Open in Friday's quarter-finals, each paying the price for squandering leads in tie-breakers. Isner unleashed a 29-ace barrage at US fifth seed Steve Johnson but failed to capitalize on five set points in the first set and seven in the second in falling 7-6 (9/7), 7-6 (17/15). "Those were very easily tie-breakers I could have won but I didn't," Isner said. "I had countless chances. I did a lot of really great things. I put more pressure on him than he did on me. It didn't pay off. " Isner made his first double fault on the penultimate point, then smacked a forehand wide to hand Johnson the victory after an hour and 57 minutes, the last 23 minutes of it in the tension-packed tie-breaker. "I shot myself in the foot in the second set," Isner said. Johnson, ranked a career-high 25th, next faces another serve smasher in 37-year-old Croatian Ivo Karlovic, who blasted 26 aces to dispatch US sixth seed Jack Sock 7-6 (7/4), 7-6 (8/6). "In the crucial moments I was able to come up with my best shots," Karlovic said. "Hopefully I can use this win for confidence to play well. " Australia's Stosur, the 2011 US Open champion, lost 7-6 (7/4), 6-3 to US wildcard Jessica Pegula after dropping the last six tie-breaker points and losing the only break point of the second set. "I was up 4-1 in the tie-breaker and let that go. Probably that was it," Stosur said. "A lot came down to a few points. As soon as one person got one clean shot the point was over. " Pegula, at 22, was 10 years younger than Stosur and at 173rd in the world was 159 spots below the Aussie in the rankings. She was aided by a practice Sunday with Stosur. "That was probably the biggest win of my career," Pegula said. "I'm really excited. I've been playing really well. I put in a lot of hard work and it paid off. It really helped me this week practicing with her. " Pegula will face 122nd-ranked Lauren Davis in a semi-final after the American beat Italy's Camila Giorgi 6-4, 6-4. The other semi-final sends Belgian seventh seed Yanina Wickmayer against Kazakh sixth seed Yulia Putintseva. French second seed Gael Monfils avoided the upset bug by downing US eighth seed Sam Querrey 6-4, 3-6, 6-1. His semi-final foe will be seventh-seeded German 19-year-old Alexander Zverev, who eliminated French fourth seed Benoit Paire 6-1, 6-3. "I like him. It's going to be a big match," said Monfils, who is 2-0 against Zverev, including a February quarter-final win at Rotterdam. Zverev, ranked 27th, is the youngest player in the top 30 since Rafael Nadal in 2005. He reached his first two ATP finals in Halle and Nice over the past two months. Monfils, 29, seeks a sixth career title, his first since 2014 in Montpellier, his first ever title outside of Europe and first outdoor crown since Sopot in 2005. Johnson, who captured his first ATP title last month at Nottingham, fired 22 aces of his own, denied Isner on six break points and took his second win in six meetings with Isner. "He was serving extremely well," Johnson said. "I didn't have any break points. I was able to scrap out the first set. I got very lucky when he double faulted at the end and I was able to close it out. " Karlovic, who matched his best Washington run from 2007 by reaching the semi-finals, won his seventh ATP title last week on Newport grass to become the oldest tour singles champion since 1979. "John had 29 aces and Ivo could have as many tomorrow," Johnson said. "You just have to focus on your serve, try and get to tie-breaker and take your chances. " Johnson is 3-1 against 35th-ranked Karlovic, including a third-round victory at Washington in 2014. No American has won the Washington title since Andy Roddick in 2007. (This story has not been edited by News18 staff and is published from a syndicated news agency feed - AFP)
english
{ "Logging": { "IncludeScopes": false, "LogLevel": { "Default": "Warning" } }, "ConnectionString": ".\\Database\\ExperimentsDB.db", "Database": "ExperimentsDB", "Swagger": { "FileName": "Experimentation.Api.xml" //"BaseUrl": "ExperimentationApi" } } // I added the BaseUrl as a means of determing the relative url where the swagger document json file is. // Turns out i did not need it.
json
;(function(root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.Zepto = factory(); } }(this, function() {
javascript
<filename>common/lib/src/main/java/org/apache/syncope/common/lib/to/ConnInstanceTO.java /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 org.apache.syncope.common.lib.to; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import java.util.Optional; import java.util.Set; import javax.ws.rs.PathParam; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.apache.syncope.common.lib.AbstractBaseBean; import org.apache.syncope.common.lib.types.ConnConfProperty; import org.apache.syncope.common.lib.types.ConnectorCapability; @XmlRootElement(name = "connInstance") @XmlType public class ConnInstanceTO extends AbstractBaseBean implements EntityTO { private static final long serialVersionUID = 2707778645445168671L; private String key; private String adminRealm; private String location; private String connectorName; private String bundleName; private String version; private final List<ConnConfProperty> conf = new ArrayList<>(); private final Set<ConnectorCapability> capabilities = EnumSet.noneOf(ConnectorCapability.class); private String displayName; private Integer connRequestTimeout; private ConnPoolConfTO poolConf; @Override public String getKey() { return key; } @PathParam("key") @Override public void setKey(final String key) { this.key = key; } public String getAdminRealm() { return adminRealm; } public void setAdminRealm(final String adminRealm) { this.adminRealm = adminRealm; } public String getLocation() { return location; } public void setLocation(final String location) { this.location = location; } public String getConnectorName() { return connectorName; } public void setConnectorName(final String connectorname) { this.connectorName = connectorname; } public String getBundleName() { return bundleName; } public void setBundleName(final String bundlename) { this.bundleName = bundlename; } public String getVersion() { return version; } public void setVersion(final String version) { this.version = version; } @XmlElementWrapper(name = "conf") @XmlElement(name = "property") @JsonProperty("conf") public List<ConnConfProperty> getConf() { return this.conf; } @JsonIgnore public Optional<ConnConfProperty> getConf(final String schemaName) { return conf.stream().filter(property -> property.getSchema().getName().equals(schemaName)).findFirst(); } @XmlElementWrapper(name = "capabilities") @XmlElement(name = "capability") @JsonProperty("capabilities") public Set<ConnectorCapability> getCapabilities() { return capabilities; } public String getDisplayName() { return displayName; } public void setDisplayName(final String displayName) { this.displayName = displayName; } /** * Get connector request timeout. * It is not applied in case of sync, full reconciliation and search. * * @return timeout. */ public Integer getConnRequestTimeout() { return connRequestTimeout; } /** * Set connector request timeout. * It is not applied in case of sync, full reconciliation and search. * * @param connRequestTimeout timeout */ public void setConnRequestTimeout(final Integer connRequestTimeout) { this.connRequestTimeout = connRequestTimeout; } public ConnPoolConfTO getPoolConf() { return poolConf; } public void setPoolConf(final ConnPoolConfTO poolConf) { this.poolConf = poolConf; } }
java
<filename>Meteor.js /siteace/siteace.js Websites = new Mongo.Collection("websites"); if (Meteor.isClient) { ///// // template helpers ///// // helper function that returns all available websites Template.website_list.helpers({ websites: function() { return Websites.find({}); } }); ///// // template events ///// Template.website_item.events({ "click .js-upvote": function(event) { // example of how you can access the id for the website in the database // (this is the data context for the template) var website_id = this._id; console.log("Up voting website with id " + website_id); // put the code in here to add a vote to a website! return false; // prevent the button from reloading the page }, "click .js-downvote": function(event) { // example of how you can access the id for the website in the database // (this is the data context for the template) var website_id = this._id; console.log("Down voting website with id " + website_id); // put the code in here to remove a vote from a website! return false; // prevent the button from reloading the page } }) Template.website_form.events({ "click .js-toggle-website-form": function(event) { $("#website_form").toggle('slow'); }, "submit .js-save-website-form": function(event) { // here is an example of how to get the url out of the form: var url = event.target.url.value; console.log("The url they entered is: " + url); // put your website saving code in here! return false; // stop the form submit from reloading the page } }); } if (Meteor.isServer) { // start up function that creates entries in the Websites databases. Meteor.startup(function() { // code to run on server at startup if (!Websites.findOne()) { console.log("No websites yet. Creating starter data."); Websites.insert({ title: "Goldsmiths Computing Department", url: "http://www.gold.ac.uk/computing/", description: "This is where this course was developed.", createdOn: new Date() }); Websites.insert({ title: "University of London", url: "http://www.londoninternational.ac.uk/courses/undergraduate/goldsmiths/bsc-creative-computing-bsc-diploma-work-entry-route", description: "University of London International Programme.", createdOn: new Date() }); Websites.insert({ title: "Coursera", url: "http://www.coursera.org", description: "Universal access to the world’s best education.", createdOn: new Date() }); Websites.insert({ title: "Google", url: "http://www.google.com", description: "Popular search engine.", createdOn: new Date() }); } }); }
javascript
Neither corruption nor human rights are core issues for the average voter, who's more interested in the economy and not returning to the era of hyperinflation. Who are the movers and shakers of online life in Pucallpa, a medium-sized city with a little over 200,000 inhabitants in the Peruvian Amazon? We talk to some of them. This year's presidential election in Peru has been a doozy. Global Voices presents a guide to the candidates and the race's national significance. Peruvian digital activists working to promote their native languages online found common ground at a workshop held in the historical city of Cusco, Peru.
english
Likewise, wives, be subject to your own husbands, so that even if some do not obey the word, they may be won without a word by the conduct of their wives, when they see your respectful and pure conduct. Do not let your adorning be external—the braiding of hair and the putting on of gold jewelry, or the clothing you wear— but let your adorning be the hidden person of the heart with the imperishable beauty of a gentle and quiet spirit, which in God’s sight is very precious. For this is how the holy women who hoped in God used to adorn themselves, by submitting to their own husbands, as Sarah obeyed Abraham, calling him lord. And you are her children, if you do good and do not fear anything that is frightening. Likewise, husbands, live with your wives in an understanding way, showing honor to the woman as the weaker vessel, since they are heirs with you of the grace of life, so that your prayers may not be hindered. Finally, all of you, have unity of mind, sympathy, brotherly love, a tender heart, and a humble mind. Do not repay evil for evil or reviling for reviling, but on the contrary, bless, for to this you were called, that you may obtain a blessing. For “Whoever desires to love life and see good days, let him keep his tongue from evil and his lips from speaking deceit; let him turn away from evil and do good; let him seek peace and pursue it. For the eyes of the Lord are on the righteous, and his ears are open to their prayer. But the face of the Lord is against those who do evil.” Now who is there to harm you if you are zealous for what is good? But even if you should suffer for righteousness’ sake, you will be blessed. Have no fear of them, nor be troubled, but in your hearts honor Christ the Lord as holy, always being prepared to make a defense to anyone who asks you for a reason for the hope that is in you; yet do it with gentleness and respect, having a good conscience, so that, when you are slandered, those who revile your good behavior in Christ may be put to shame. For it is better to suffer for doing good, if that should be God’s will, than for doing evil. For Christ also suffered once for sins, the righteous for the unrighteous, that he might bring us to God, being put to death in the flesh but made alive in the spirit, in which he went and proclaimed to the spirits in prison, because they formerly did not obey, when God’s patience waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight persons, were brought safely through water. Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ, who has gone into heaven and is at the right hand of God, with angels, authorities, and powers having been subjected to him.
english
<filename>functional-tests/src/test/java/test/ServantManager.java /* * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998-1999 IBM Corp. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: BSD-3-Clause */ package test; import java.rmi.Remote; public interface ServantManager extends Remote { /** * Start a servant in the remote process. * @param servantClass The class of the servant object. Must have a default constructor. * @param servantName The name by which this servant should be known. * @param publishName True if the name should be published in the name server. * @param nameServerHost The name server host. May be null if local host. * @param nameServerPort The name server port. * @param iiop True if iiop. */ public Remote startServant( String servantClass, String servantName, boolean publishName, String nameServerHost, int nameServerPort, boolean iiop) throws java.rmi.RemoteException; /** * Unexport the specified servant. If the servant was published, will be unpublised. */ public void stopServant(String servantName) throws java.rmi.RemoteException; /** * Stop all servants in this context. */ public void stopAllServants() throws java.rmi.RemoteException; /** * @Return String the String "Pong" */ public String ping() throws java.rmi.RemoteException; }
java
<reponame>officefloor/OfficeFloor /*- * #%L * Spring Integration * %% * Copyright (C) 2005 - 2020 <NAME> * %% * 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. * #L% */ package net.officefloor.spring; import org.springframework.context.ConfigurableApplicationContext; import net.officefloor.frame.api.build.Indexed; import net.officefloor.frame.api.build.None; import net.officefloor.frame.api.managedobject.CoordinatingManagedObject; import net.officefloor.frame.api.managedobject.ManagedObject; import net.officefloor.frame.api.managedobject.ObjectRegistry; import net.officefloor.frame.api.managedobject.source.ManagedObjectSource; import net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource; /** * Spring bean {@link ManagedObjectSource}. * * @author <NAME> */ public class SpringBeanManagedObjectSource extends AbstractManagedObjectSource<Indexed, None> implements ManagedObject, CoordinatingManagedObject<Indexed> { /** * Name of the Spring bean. */ private final String beanName; /** * Object type expected from Spring. */ private final Class<?> objectType; /** * Spring {@link ConfigurableApplicationContext}. */ private final ConfigurableApplicationContext springContext; /** * {@link SpringDependency} instances. */ private final SpringDependency[] springDependencies; /** * Instantiate. * * @param beanName Name of the Spring bean. * @param objectType Object type expected from Spring. * @param springContext Spring {@link ConfigurableApplicationContext}. * @param springDependencies {@link SpringDependency} instances. */ public SpringBeanManagedObjectSource(String beanName, Class<?> objectType, ConfigurableApplicationContext springContext, SpringDependency[] springDependencies) { this.beanName = beanName; this.objectType = objectType; this.springContext = springContext; this.springDependencies = springDependencies; } /* * ===================== ManagedObjectSource ========================== */ @Override protected void loadSpecification(SpecificationContext context) { // no specification } @Override @SuppressWarnings({ "unchecked", "rawtypes" }) protected void loadMetaData(MetaDataContext<Indexed, None> context) throws Exception { // Configure meta-data context.setObjectClass(this.objectType); context.setManagedObjectClass(this.getClass()); // Provide extension context.addManagedObjectExtension((Class) this.objectType, (mo) -> mo.getObject()); // Load the dependencies for (SpringDependency springDependency : this.springDependencies) { String qualifier = springDependency.getQualifier(); Class<?> type = springDependency.getObjectType(); // Add the dependency DependencyLabeller<Indexed> dependency = context.addDependency(type); dependency.setTypeQualifier(qualifier); dependency.setLabel((qualifier == null ? "" : qualifier + ":") + type.getName()); } } @Override protected ManagedObject getManagedObject() throws Throwable { return this; } /* * ================= CoordinatingManagedObject ======================== */ @Override public void loadObjects(ObjectRegistry<Indexed> registry) throws Throwable { // objects via supplier thread local } /* * ======================== ManagedObject ============================== */ @Override public Object getObject() throws Throwable { return this.springContext.getBean(this.beanName); } }
java
import java.util.HashMap; public class UseOfNonHashableClassInHashDataStructure { static class UMap extends HashMap<UseOfNonHashableClassInHashDataStructure, String> { }; static HashMap<UseOfNonHashableClassInHashDataStructure, String> m = new HashMap<UseOfNonHashableClassInHashDataStructure, String>(); static int foo(HashMap<UseOfNonHashableClassInHashDataStructure, String> map) { return map.size(); } @Override public boolean equals(Object o) { return hashCode() == o.hashCode(); } public static String add(UseOfNonHashableClassInHashDataStructure b, String s) { return m.put(b, s); } public static String get(UseOfNonHashableClassInHashDataStructure b) { return m.get(b); } }
java
{ "id": 28321, "citation_title": "Did the $660 Billion Paycheck Protection Program and $220 Billion Economic Injury Disaster Loan Program Get Disbursed to Minority Communities in the Early Stages of COVID-19?", "citation_author": [ "<NAME>", "<NAME>" ], "citation_publication_date": "2021-01-11", "issue_date": "2021-01-07", "revision_date": "2021-07-07", "topics": [ "Health, Education, and Welfare", "Education", "Labor Economics", "Demography and Aging", "Industrial Organization", "Firm Behavior", "COVID-19" ], "program": [ "Productivity, Innovation, and Entrepreneurship" ], "projects": null, "working_groups": [ "Entrepreneurship", "Race and Stratification in the Economy" ], "abstract": "\n\nSocial distancing restrictions and health- and economic-driven demand shifts from COVID-19 shut down many small businesses with especially negative impacts on minority owners. Is there evidence that the unprecedented federal government response to help small businesses \u2013 the $659 billion Paycheck Protection Program (PPP) and the related $220 billion COVID-19 Economic Injury Disaster Loans (EIDL) \u2013 which had a stated goal of helping disadvantaged groups, was disbursed evenly to minority communities? In this descriptive research note, we provide the first detailed analysis of how the PPP and EIDL funds were disbursed across minority communities in the country. From our analysis of data on the universe of loans from these programs and administrative data on employer firms, we generally find a slightly positive relationship between PPP loan receipt per business and the minority share of the population or businesses, although funds flowed to minority communities later than to communities with lower minority shares. PPP loan amounts, however, are negatively related to the minority share of the population. The EIDL program, in contrast, both in numbers and amounts, was distributed positively to minority communities.\n\n", "acknowledgement": "\nWe would like to thank <NAME> and participants at the NBER Entrepreneurship Workshop, the PPIC California labor market workshop, and the Kauffman Foundation Entrepreneurship Issue Forum for comments and suggestions. The research project has also benefited from numerous conversations with the press and policymakers. Special thanks go to <NAME>, <NAME> and <NAME> for discussions of the data and analysis, research assistance by <NAME> and <NAME>, and thanks go to participants in the Axios/Google Small Business Matters Expert Panel and JPMorgan Chase Institute Data Dialogue meetings for their comments and questions. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research.\n\n\n" }
json
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <script src="../../list.js"></script> <script src="../../page.js"></script> <link type="text/css" rel="stylesheet" href="../../page.css" /> </head> <body> <h1>[name]</h1> <div class="desc">A loader for loading an [page:Image image].</div> <h2>Constructor</h2> <h3>[name]([page:LoadingManager manager])</h3> <div> manager -- The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager]. </div> <div> Creates a new [name]. </div> <h2>Properties</h2> <h3>[property:string crossOrigin]</h3> <div> The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. </div> <h2>Methods</h2> <h3>[method:Image load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3> <div> onLoad -- Will be called when load completes. The argument will be the loaded Imageloader. onProgress -- Will be called while load progresses. The argument will be the progress event. onError -- Will be called when load errors. url — required </div> <div> Begin loading from url and return the [page:Image image] object that will contain the data. </div> <h3>[method:todo setCrossOrigin]([page:String value])</h3> <div> value -- The crossOrigin string. </div> <div> The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS. </div> <h2>Source</h2> [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] </body> </html>
html
Lord Krishna College Of Engineering is an engineering institute located on 16th kilometre stone Delhi Hapur Road NH-24, Pilkhuwa, Ghaziabad, Uttar Pradesh, India. The institute was established in 2006 by the Lord Krishna Group of Institutions. The institute is affiliated to Dr. A. P. J. Abdul Kalam Technical University. The college code is 224. National : National : Lifestyle : International : Janmashtami in Paris- Where various nationalities come together to celebrate the festival! National : National : Entertainment :
english
{ "name": "@base-cms/marko-web-identity-x", "version": "1.4.0", "description": "Marko Wrapper for IdentityX", "repository": "https://github.com/base-cms/base-cms/tree/master/packages/marko-web-identity-x", "author": "<NAME> <<EMAIL>>", "license": "MIT", "scripts": { "lint": "eslint --ext .js --ext .vue --max-warnings 5 ./", "compile": "basecms-marko-compile compile --dir ./ --silent true", "test": "yarn compile && yarn lint" }, "dependencies": { "@base-cms/utils": "^1.0.0", "apollo-cache-inmemory": "^1.6.3", "apollo-client": "^2.6.4", "apollo-link-http": "^1.5.16", "body-parser": "^1.19.0", "cookie": "0.3.1", "express": "^4.17.1", "graphql-tag": "^2.10.1", "node-fetch": "^2.6.0" }, "peerDependencies": { "@base-cms/marko-core": "^1.0.0", "@base-cms/marko-web": "^1.0.0" }, "publishConfig": { "access": "public" } }
json
# Apache DataFu website We use [Middleman](http://middlemanapp.com/) to generate the website content. This requires Ruby. It's highly recommended that you use something like [rbenv](https://github.com/sstephenson/rbenv) to manage your Ruby versions. The website content has been successfully generated using Ruby version `2.2.2`. ## Setup Install bundler if you don't already have it: gem install bundler Install gems required by website (includes middleman): bundle install ## Run the Server Middleman includes a server that can be run locally. When making changes to the website it is usually good practice to run the server to see what the changes look like in a browser. bundle exec middleman Now visit [http://localhost:4567/](http://localhost:4567/) to see the website in action. ## Build the website The static content can be built with: bundle exec middleman build This will produces the content in the `/build` directory. ## Check out the website source The static website content is located in another repo: svn co https://svn.apache.org/repos/asf/datafu apache-datafu-website ## Commit the changes In the `apache-datafu-website` folder, delete the old content, which we will be replacing with new content: cd apache-datafu-website rm -rf site Now copy the built content to the `apache-datafu-website` folder, replacing the old `site` folder: cp -r ~/Projects/datafu/site/build site This procedure unfortunately removes the javadocs too, which we want to keep and are not stored in the git repo. We should add a script to make this easier. In the meantime you can revert the deleted javadoc files with something resembling the commands below. Check the `revert_list.txt` file before proceeding. svn status | grep "\!" | cut -c 9- | grep -E "(datafu|hourglass)/\d\.\d\.\d/" > revert_list.txt svn revert --targets revert_list.txt If this is a new release, make sure you have built the javadocs first. If you are in the release branch for the repo, you can run `gradle assemble -Prelease=true` to generate the javadocs. The `release=true` flag ensure SNAPSHOT does not appear in the name. If you are building from the source release this isn't necessary and `gradle assemble` is fine. Copy the new javadocs from the release into the site. cp -r ~/Projects/datafu/datafu-pig/build/docs/javadoc site/docs/datafu/x.y.z cp -r ~/Projects/datafu/datafu-hourglass/build/docs/javadoc site/docs/hourglass/x.y.z svn add site/docs/datafu/x.y.z svn add site/docs/hourglass/x.y.z Open the new javadocs and confirm they are correct before checking them in. For example, make sure that the version is correct and the version does not have SNAPSHOT in the name. Check what has changed: svn status If you have added or removed files, you may need to run `svn add` or `svn rm`. If there are a lot of changes you may want to run `svn status | grep ?` to make sure you didn't miss anything. Once you are satisfied with the changes you can commit.
markdown
The iPhone 7 is largely rumoured to ditch the antenna bands at the back and sport a clean metal look. Now a new image leak gives us a look at where Apple may be shifting the antenna bands to. A new image of the iPhone 7 has surfaced on Chinese social networking site Weibo, showing us the new placement of the antenna bands. This image was first reported by LetemSvetemApplem, and it suggests that Apple is looking to shift the antenna bands to the top and bottom edges of the device. The lines will spread through the top and the bottom and end just at the curve. The image also reveals an additional hole under the microphone opening next to the camera. While one can only make assumptions, a Weibo user seems to think that Apple may be bringing laser autofocus support to the iPhone 7. If this is true, it will significantly improve the smartphone camera's low light performance, and even help focus on objects faster. There's no dual camera setup that has been largely rumoured, but then again that feature is expected to be exclusive only to the larger variant - the iPhone 7 Pro or iPhone 7 Plus, and this image seems to be of the 4.7-inch iPhone 7 variant. Sadly, the picture further confirms that the camera bump will stay on the iPhone 7 as well - but does not show if the 3.5mm headphone jack will remain. The iPhone 7 is heavily expected to come with a Smart Connector, and, there have been conflicting reports about whether the 3.5mm headphone jack will remain. The larger variant will also get a bump to 3GB RAM to accommodate the dual camera setup. There are also rumours of Apple ditching the aluminium and going for an all glass enclosure for its upcoming smartphone. Lastly, the iPhone 7 is also tipped to be waterproof, and will sport a Force Touch Home button. CNBC) suggests that Foxconn has listed a job posting on its homepage where they are looking for a large number of urgent workers. This is probably the first time the two companies have started hiring so early, indicating that the new iPhone 7 production may have already begun.
english
{"title": "Alternating-time Temporal Logic on Finite Traces.", "fields": ["alternating time temporal logic", "computer science", "discrete mathematics"], "abstract": null, "citation": "Not cited", "year": "2018", "departments": ["Imperial College London", "Laboratoire IBI ... C, UEVE, France", "DIETI, Universi ... i Napoli, Italy", "DIETI, Universi ... i Napoli, Italy"], "conf": "ijcai", "authors": ["<NAME>.....http://dblp.org/pers/hd/b/Belardinelli:Francesco", "<NAME>.....http://dblp.org/pers/hd/l/Lomuscio:Alessio", "<NAME>.....http://dblp.org/pers/hd/m/Murano:Aniello", "<NAME>.....http://dblp.org/pers/hd/r/Rubin:Sasha"], "pages": 7}
json
Michael Block captivated the golfing world with his unsuspecting performance at the PGA Championship this weekend and now the California club pro will have another chance to steal the show on the PGA Tour when he plays at the Charles Schwab Challenge beginning Thursday. Block, 46, quickly became a fan favorite making an ace in his final round while paired with Rory McIlroy and finished tied for fifteenth after posting a 1-over 281 finish. The score qualified him for next year’s major at Valhalla Golf Club in Louisville, Kentucky. "It’s amazing. I’m living a dream," he said tearfully after the final round in an interview with CBS Sports. "I’m making sure I enjoy this moment. I’ve learned that after my 46 years of life that it’s not going to get better than this. There’s no way. No chance in hell. So I’m going to enjoy this. " But things seemingly have gotten better. Not long after the final round, Block got the call that he had received the final sponsor exemption into the Charles Schwab Challenge. "I just got a call from Colonial, and I'm in next week . . . which is really even more mind-boggling now," Block said, via the PGA Tour’s website. "I'm readjusting flights to head to Dallas and Fort Worth, so I'm looking forward to that, to say the least. " "I've never played the golf course before, but I think it's going to set up very well for me, from what I know. It's tight, it's fast, it's hot. Great greens. That's me. " Not long after, the RBC Canadian Open also offered Block an invitation to next month's tournament. Block’s finish was the best for a club pro at the PGA Championship since Lonnie Nielsen finished in a tie for 11th in 1986 at Inverness Club. He also earned close to $290,000 in prize money — his largest tournament payday. The Associated Press contributed to this report.
english
<gh_stars>0 /* * Copyright 2005-2010 the original author or 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 org.springframework.ws.soap.axiom; import javax.xml.transform.Result; import javax.xml.transform.Source; import org.springframework.util.Assert; import org.springframework.ws.soap.SoapBody; import org.springframework.ws.soap.axiom.support.AxiomUtils; import org.springframework.ws.stream.StreamingPayload; import org.apache.axiom.om.OMDataSource; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPFactory; /** * Axiom-specific version of <code>org.springframework.ws.soap.Soap11Body</code>. * * @author <NAME> * @since 1.0.0 */ abstract class AxiomSoapBody extends AxiomSoapElement implements SoapBody { private final Payload payload; protected AxiomSoapBody(SOAPBody axiomBody, SOAPFactory axiomFactory, boolean payloadCaching) { super(axiomBody, axiomFactory); if (payloadCaching) { payload = new CachingPayload(axiomBody, axiomFactory); } else { payload = new NonCachingPayload(axiomBody, axiomFactory); } } public Source getPayloadSource() { return payload.getSource(); } public Result getPayloadResult() { return payload.getResult(); } public boolean hasFault() { return getAxiomBody().hasFault(); } protected final SOAPBody getAxiomBody() { return (SOAPBody) getAxiomElement(); } public void setStreamingPayload(StreamingPayload payload) { Assert.notNull(payload, "'payload' must not be null"); OMDataSource dataSource = new StreamingOMDataSource(payload); OMElement payloadElement = getAxiomFactory().createOMElement(dataSource, payload.getName()); SOAPBody soapBody = getAxiomBody(); AxiomUtils.removeContents(soapBody); soapBody.addChild(payloadElement); } }
java
Munnar, nestled amidst the lush Western Ghats of Kerala, is one of the most popular tourist destinations in South India. Known for its breathtaking natural beauty, serene mountains, and vast tea plantations, Munnar offers a refreshing escape from the bustling city life. With its pleasant climate, picturesque landscapes, and abundant flora and fauna, Munnar is a paradise for nature lovers and adventure enthusiasts alike. At Tour My India, we offer a range of Munnar tour packages to cater to different travel preferences. Whether you're planning a family tour, a romantic honeymoon getaway, or simply seeking a peaceful retreat in the lap of nature, our Munnar holiday packages have something for everyone. Immerse yourself in the tranquility of Munnar's scenic beauty as you explore its popular tourist destinations. Wander through the vast tea plantations and witness the art of tea production firsthand. Indulge in sightseeing trips to the mesmerizing mountains, where you can marvel at the breathtaking views and capture memorable moments. TMI’s Munnar Kerala tour packages also provide customized itineraries, allowing you to plan a vacation trip that suits your preferences and budget. Whether you're looking for adventurous activities or serene lakeside experiences, we have the perfect itinerary for you. Escape to Munnar hill station in Kerala and let the wonders of nature unfold before your eyes. Book your Munnar tour package with Tour My India and embark on an unforgettable journey through this paradise on earth. Experience the charm of South India, immerse yourself in the beauty of nature, and create memories that will last a lifetime. Jump to: A delightful 3-day trip to the enchanting Munnar hill station and experience breathtaking sights, serene lakes, majestic waterfalls, and explore the beauty of nature. Explore the breathtaking hill station of Munnar in Kerala with a sightseeing tour of Kodaikanal and Ooty and enjoy a 7-day Kerala Munnar tour at the best price with Tour My India. Looking for a short honeymoon getaway in Kerala? Plan your trip to Munnar with this exclusive 4-day tour package offered by Tour My India at the best price.. Plan your Kerala trip with Tour My India and enjoy a 6-day tea-tasting special interest tour to Munnar, including exciting excursions to Thekkady, Periyar, and Alleppey, all at the best price. An unforgettable 8-day honeymoon tour package that will take you to the popular tourist destinations of Kerala, including Munnar, Kumarakom, Alleppey, and Cochin. Munnar is a remarkable place that offers a delightful experience throughout the year, contrary to common perception. While winter is often considered the best time to visit, the summer and monsoon seasons have their own unique charm that you wouldn't want to miss. No matter which season you choose, Munnar is sure to provide a memorable and enchanting experience for your holiday. Here's everything you need to know about Munnar's climate: March marks the beginning of summer in Munnar, and the temperature starts to rise. However, thanks to the pleasant atmosphere, summers in Munnar remain cool and enjoyable without becoming unbearable. The temperature ranges from 17 to 30 degrees Celsius, providing ample time to explore your travel itinerary. The ideal visiting season starts in January and lasts until May. The monsoon season is a truly remarkable time to visit Munnar and appreciate its natural beauty. The temperature during this period ranges between 20 to 25 degrees Celsius. It's a breathtaking experience to witness mist-filled landscapes and clouds enveloping the sky, creating a captivating sight. By September, when the monsoon departs, Munnar is left adorned with lush greenery and a serene atmosphere. As October progresses, signs of winter start appearing. This period is highly recommended for a visit, as each month offers delightful weather. The temperature drops to around 8 degrees Celsius, and some places may even witness snowfall. It's an ideal time for honeymooners and adventure enthusiasts. You can enjoy activities like tree plantation, mountain climbing, trekking, and rappelling during this season. Munnar, a must-visit hill station in India, offers a mesmerizing and awe-inspiring experience to tourists. Although Munnar doesn't have its own airport or railway station, reaching there by road compensates with stunning landscapes and lush green hills and mountains along the way. Regardless of the chosen mode of transportation, the final leg of the journey to Munnar can only be completed by road. There are two popular road trips known for their scenic beauty: Travelers can choose the most suitable option based on their preferences and convenience to reach the captivating hill station of Munnar. For those traveling by train, Ernakulam Junction is the best option. It is well-connected to major cities like Delhi and Mumbai. The distance from Ernakulam Junction to Munnar is around 125 km, which can be covered comfortably in approximately 3 hours by bus or taxi. The nearest airport to Munnar is Cochin International Airport in Kochi, located approximately 105 km away. Tourists can easily hire a cab or taxi for a comfortable 2.5-hour journey. Additionally, there are convenient options for state and private-run road transportation. Read our latest informative travel guides blog posts & holiday tips. services again for all our future family getaways in and around India. We are certified by major tour and travel associations in India and world like IATA, IATO, TAAI, IMF & MOT (Ministry of Tourism, Govt of India) TMI has received numerous accolades from its happy customers for its excellent services and best Kerala holidays. We have local office in Kerala for our customers to find assistance anytime and anywhere. Munnar is a wonderful hill station that you can visit throughout the year. Each season offers a unique and delightful experience. However, the ideal time to plan your trip to Munnar is from October to April. During these months, you can enjoy pleasant weather and get great value for your money. It's advisable to avoid visiting during the festive season to avoid overcrowding. The Munnar tour package offers a delightful array of tourist attractions, ensuring a worthwhile holiday experience. Here is a curated list of top attractions that are a must-visit during your trip to Munnar: Munnar is an amazing destination for a family vacation, offering numerous attractions and activities to enjoy with your loved ones. Below are a few places that will provide you and your family with a delightful experience: Munnar offers an abundance of activities to ensure your holiday is both satisfying and pleasant. You can opt to stay in charming tree houses, providing a serene environment to rejuvenate yourself. Additionally, there are offbeat activities like tea tasting, camping, and trekking along the tea plantations, spice farms, and river beds for adventurous tourists to explore. If you're looking for wellness retreats or spas in Munnar, you're in luck. The destination offers a variety of options for travelers seeking relaxation and rejuvenation. These places and resorts provide a range of activities amidst the calm, peaceful, and scenic surroundings of Munnar. Some of these retreats even offer Ayurvedic treatments, yoga, and meditation, ensuring a holistic wellness experience. Here are a few options to consider: Munnar is a popular choice for a delightful honeymoon getaway with your loved one. You can indulge in a range of romantic and exciting activities to create beautiful memories. Here are some recommended activities for couples: To have a delightful visit, a 3-day trip is ample to immerse yourself in the enchanting ambiance of Munnar and revitalize your spirit through its captivating attractions and activities. However, if you have plans for trekking and camping, an additional day would be sufficient to make your trip truly fulfilling and unforgettable. Munnar offers a wide range of accommodations, including hostels, resorts, and homestays, catering to different preferences and budgets. If you seek tranquillity away from the bustling crowds, you'll also find excellent accommodation options on the outskirts of Munnar. Rest assured, visiting Monsoon in Munnar is entirely safe. The peak season allows tourists to truly appreciate the beauty of Munnar. However, it is advisable to hire an experienced driver as a safety measure, considering the foggy conditions and slippery roads that can affect visibility. Tour My India is a well-known tour operator in Munnar. We provide dependable and trustworthy services to travellers from around the world. With more than 25 years of experience, we specialize in creating personalized, affordable, and high-end vacations that cater to the distinct preferences of each traveller. Our aim is to curate exceptional experiences that flawlessly combine adventure, relaxation, and cultural immersion. At Tour My India, we have built a strong reputation for excellence in the travel industry, with a satisfied customer base of over 10 million travellers. We have established partnerships with top-notch hotels and resorts, ensuring that our guests enjoy the utmost luxury and comfort during their stay. Our guided tour holidays are carefully planned to minimize travel-related stress, allowing you to relax and enjoy a vacation curated by experts who truly understand your destination. If you are longing for an unforgettable travel experience, don't hesitate to contact our specialists at Tour My India today. Let us help you create lifelong memories with our Munnar Holiday Packages. Kerala, known for its beauty, caters to everyone's preferences. It offers a variety of attractions such as beaches, hill stations, religious sites, and ancient landmarks. Among these, there is Munnar, a charming hill station nestled in the Western Ghats of Kerala. Renowned for its natural beauty, Munnar captivates visitors with its rolling hills, lush green tea plantations, and misty valleys. Each hill in Munnar holds its own unique story, creating a delightful atmosphere that makes it a perfect destination for those visiting Kerala. A leisurely walk amidst the verdant trees of Munnar is a serene experience that brings utmost peace. True to its name, Munnar is home to three picturesque lakes: Kanniyar Lake, Nallathanniyar Lake, and Kuttiyar Lake. These lakes converge to form the mighty Muthirapuzha River. Apart from the lakes, tourists are captivated by the tea estates, stunning waterfalls, adventurous activities, and rich cultural heritage that Munnar offers. Exploring the tea gardens, learning about the tea-making process, and sampling various tea varieties are popular activities for tourists during their Munnar tour. Visitors from around the world are drawn to Munnar to experience its charm and beauty. Munnar is a destination brimming with attractions, inviting tourists to explore its beautiful landscapes and surroundings. It offers a range of places that cater to the interests of every visitor. Munnar mesmerizes with its vast stretches of tea plantations that create stunning vistas. These plantations are must-visit places in Munnar that provide a serene and breathtaking experience. Tourists can witness the fascinating process of tea-making, from tender leaves being plucked to their transformation into aromatic tea varieties. Kolukkumalai Tea Estate, Tata Tea Estate, and Lockhart Plantation are renowned plantations where visitors can engage in various activities, such as enjoying a cup of freshly brewed tea amidst the tranquil surroundings. Additionally, there are tea museums that showcase the history of tea cultivation in Munnar, displaying vintage machinery and artefacts. Eravikulam National Park in Munnar hill station, is a sanctuary dedicated to protecting the Nilgiri Tahr, an endangered mountain goat species. This preserved area presents a breathtaking landscape with rolling grasslands, mist-covered peaks, and dense forests. Birdwatchers will delight in the opportunity to observe a variety of bird species in this park. Anakulam, often known as the "Wild Elephant Village," offers an extraordinary encounter with majestic elephants roaming freely in their natural habitat. This village provides a unique opportunity to witness these gentle giants up close as they graze, play, and socialize in their herds. Guided tours ensure the safety and respect of these magnificent creatures while also educating visitors about their behaviour, conservation efforts, and the challenges they face in the wild on their Munnar sightseeing tour. Attukad Waterfalls is a stunning natural wonder and top tourist attraction in Munnar, with water cascading down from great heights, forming beautiful white streams. The backdrop of hills and dense forests enhances its beauty and provides a refreshing escape from the heat. The waterfall's rugged trails offer exciting experiences and a peaceful atmosphere. It's an ideal place for photographers, adventure enthusiasts, and nature lovers. This enchanting viewpoint offers a breathtaking panoramic view of vast tea plantations, misty valleys, and far-off mountains draped in a dreamy haze. Visitors can feel the gentle breeze carrying the delightful scent of tea leaves. As the sun moves across the sky, the landscape transforms into a vibrant canvas of colours, creating a magical ambience. The place also provides ample opportunities for bird watching, photography, or simply finding tranquillity. Mattupetty Dam is built across the tranquil Mattupetty Lake is one of the best places to visit in Munnar. It serves as a vital water source and offers a delightful experience for tourists. The emerald green waters reflect the surrounding tea gardens and hills, creating a perfect setting for serene quality time. Visitors can do boating or take a leisurely stroll along the dam to savour the ambience and panoramic views of the landscape. This dam is also known for its rich wildlife, tourists can enjoy spot birds and occasionally even wild elephants. Spread over acres of land the Blossom International Park is a charming heaven for nature enthusiasts and families alike. The park boasts a vast collection of exotic flowers, including roses, lilies, orchids, and more, painting the surroundings with a myriad of colours and filling the air with their delightful fragrance. Visitors can explore picturesque spots for picnics, serene ponds, and peaceful gazebos. The park also offers recreational activities such as boating, cycling, and roller skating, ensuring there's something enjoyable for everyone. Moreover, the Blossom International Park hosts an annual flower show that attracts horticulture enthusiasts from far and wide. Lakkam Waterfalls offers a scenic getaway from the busy city, providing a memorable experience in the midst of nature. Visitors can swim in the refreshing pool, feeling the invigorating rush of the waterfall on their skin. Nature enthusiasts can also explore the lush forests nearby, spotting unique plants and animals along the way. Echo Point is a captivating destination known for its incredible echo phenomenon, which delights visitors of all ages. Standing at the designated spot, you can't help but let out a joyful shout, only to be amazed as your voice bounces back from the valley, creating a playful echo. This natural wonder creates a joyful atmosphere, making it a favourite spot for families and friends. It's a perfect place for those seeking a peaceful retreat in the Western Ghats. Carmelagiri Elephant Park is a home for well-cared-for elephants, allowing visitors to observe and interact with these majestic creatures. This park offers an amazing opportunity to go on elephant rides. Visitors can also learn about elephant behaviour, and conservation efforts, and participate in feeding and bathing the elephants, fostering a deeper understanding and appreciation for these intelligent animals. Inside the cave, you'll witness the incredible beauty of nature's artwork. The dimly lit passages, intricate limestone formations, stalactites, and stalagmites create a surreal atmosphere that transports visitors to another world. The interplay of light and shadows further enhances the magical ambience. Exploring the cave's chambers, you'll feel a sense of discovery and a hint of mystery, as each turn reveals a new marvel to behold. The tranquil beauty of Kundala Lake, with its clear waters reflecting the lush greenery, is a breathtaking sight. One of the most popular activities here is boating. Renting a pedal boat or a rowboat, visitors can leisurely glide over the shimmering waters. The Kundala Lake area also offers opportunities for trekking and nature walks. The nearby valleys and meadows are a paradise for hikers, who can explore trails winding through tea estates, forests, and vibrant flora. Munnar is renowned for its enchanting beauty and stunning hills. It offers a wide range of activities suitable for everyone planning a visit, be it for adventure or leisure. These activities can be enjoyed with family, friends, a partner, or even on your own. Munnar offers a wide range of accommodation options to cater to the preferences of tourists. Whether you're looking for a comfortable stay within your budget or seeking a luxurious experience, you'll find a variety of choices available. If you prefer mid-range accommodation, there are convenient options of 3-star and 4-star hotels and resorts. These establishments provide comfortable amenities and services while catering to different budgets, ensuring you can find something suitable for your needs. For travelers on a tighter budget, there are hostels and homestays available. These provide affordable alternatives for accommodation in Munnar, allowing you to save on costs without compromising on comfort. If you're seeking a quieter and more peaceful experience, you may consider staying on the outskirts of the town. There are several cottages available in these areas, offering a serene environment away from the bustling heart of Munnar. These cottages are reasonably priced compared to those located in the town center, providing a tranquil retreat amidst nature. Whatever your accommodation preference may be, Munnar has options to cater to every traveler's needs, ensuring a pleasant and comfortable stay throughout your visit.
english
/** * This class will be extended by all other controllers */ class BaseController { onError(err){ if (err){ return console.log(err) } } } module.exports = BaseController
javascript
It is crucial that the employee completes his task on time in order to increase his productivity. However, if the quality of your work is not up to the highest standards, this will have a detrimental effect on your overall productivity. When you provide a product or service to a customer on time and they are not satisfied with it, you may have to do it or re-do it, or worse yet, the customer may refuse to accept your work. Either way, the time and effort you put into the task is wasted, and your productivity suffers as a result of your efforts. In order to increase productivity, one of the most important aspects is to produce high quality work.
english
{ "branches": ["master"], "plugins": [ [ "@semantic-release/exec", { "prepareCmd" : "npm run pack --target_version=${nextRelease.version} --notes=\"${nextRelease.notes}\"", "publishCmd": "(npm run publish --nuget_path=./src/Bottlecap.Net.GraphQL.Generation/bin/Release/*.nupkg) && (npm run publish --nuget_path=./src/Bottlecap.Net.GraphQL.Generation.Attributes/bin/Release/*.nupkg) && (npm run publish --nuget_path=./src/Bottlecap.Net.GraphQL.Generation.Cli/bin/Release/*.nupkg)" } ], "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", [ "@semantic-release/changelog", { "changelogFile": "CHANGELOG.md" } ], [ "@semantic-release/github", { "assets": [ {"path": "src/Bottlecap.Net.GraphQL.Generation/bin/Release/*.nupkg", "label": "Bottlecap.Net.GraphQL.Generation.nupkg"}, {"path": "src/Bottlecap.Net.GraphQL.Generation.Attributes/bin/Release/*.nupkg", "label": "Bottlecap.Net.GraphQL.Generation.Attributes.nupkg"}, {"path": "src/Bottlecap.Net.GraphQL.Generation.Cli/bin/Release/*.nupkg", "label": "Bottlecap.Net.GraphQL.Generation.Cli.nupkg"} ] } ], [ "@semantic-release/git", { "assets": ["package.json", "CHANGELOG.md"], "message": "release: Released v${nextRelease.version} [skip ci]" } ] ] }
json
// Copyright 2011 Google Inc. All Rights Reserved. // // 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. /** * @fileoverview This script is injected and executed in the webpage. It * contains functions performing interaction with background page through * the content scripts. * * @author <EMAIL> (<NAME>) * @author <EMAIL> (<NAME>) */ goog.provide('brt.backgroundInteraction'); goog.require('brt.constants'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.json'); /** * Number of script objects on the page. * @type {number} * @export */ brt.backgroundInteraction.objectCounter = 0; window.scriptObjects = []; /** * Fires the event with specified name and dispatches it from container <div>. * @param {string} eventName The name of event. * @private */ brt.backgroundInteraction.fireEvent_ = function(eventName) { var containerDiv = goog.dom.getElement('coverageContainerDiv'); var event = goog.global.document.createEvent('Event'); event.initEvent(eventName, true, true); containerDiv.dispatchEvent(event); }; /** * Passes information about script execution to content script. Description of * this information is in instrumentation.js. This function is called before * page unloading and before showing coverage. * @export */ brt.backgroundInteraction.submitCoverageInfo = function() { var data = {}; data.url = goog.global.location.href; data.scriptObjects = window.scriptObjects; var coverageContainerDiv = goog.dom.getElement('coverageContainerDiv'); if (coverageContainerDiv) { coverageContainerDiv.innerHTML = goog.json.serialize(data); brt.backgroundInteraction.fireEvent_( brt.constants.EventType.SUBMIT_COVERAGE_INFO); } }; /** * Submits coverage information and lets the content script know that coverage * should be shown, when user presses the "Show coverage" button. * @export */ brt.backgroundInteraction.showCoverage = function() { brt.backgroundInteraction.submitCoverageInfo(); brt.backgroundInteraction.fireEvent_(brt.constants.EventType.SHOW_COVERAGE); }; /** * Sets before unload event listener which starts to collect initial coverage. */ brt.backgroundInteraction.setBeforeUnloadHandler = function() { goog.events.listen(goog.dom.getDocument(), brt.constants.EventType.BEFORE_UNLOAD, brt.backgroundInteraction.showCoverage, true); var coverageContainerDiv = goog.dom.getElement('coverageContainerDiv'); if (coverageContainerDiv) { goog.events.listen(coverageContainerDiv, brt.constants.EventType.COLLECT_PERIODIC_COVERAGE, brt.backgroundInteraction.showCoverage, true); } }; goog.events.listen(goog.global.document, 'click', brt.backgroundInteraction.showCoverage, true); brt.backgroundInteraction.setBeforeUnloadHandler();
javascript
<filename>package.json<gh_stars>1000+ { "private": true, "scripts": { "build": "lerna run build", "lint": "eslint --ignore-path .gitignore .", "postinstall": "lerna bootstrap --concurrency=1", "prepare": "husky install", "test": "lerna run test", "upgrade-all": "yarn upgrade --latest && lerna run --concurrency=1 upgrade" }, "prettier": { "arrowParens": "avoid", "bracketSpacing": false, "singleQuote": true, "trailingComma": "all" }, "devDependencies": { "eslint": "^7.32.0", "eslint-config-fbjs-opensource": "^2.0.1", "husky": "^7.0.1", "lerna": "^4.0.0", "prettier": "^2.3.2", "pretty-quick": "^3.1.1" }, "resolutions": { "tar": "^6.1.6", "trim-newlines": "^4.0.2" } }
json
Nokia's Lytro like Refocus app is now ready for download on all Lumia smartphones with 'PureView' branding. Nokia’s Refocus app is now ready for download on all Lumia phones with the ‘PureView’ branding. It was announced by Nokia during a Nokia World event in Abu Dhabi last month. It’s a separate app that will work on all of Nokia’s PureView Windows Phones and has the ability to bring Lytro-like refocus ability to pictures. The app doesn’t need any unique hardware to refocus on images after they’re taken, instead it simply shoots between two and eight photos to support this feature afterwards. Images can also be shared on social networking sites, where friends can interact with them and refocus photos without issues. The app comes pretty close to the Focus Twist for iOS app that lets iPhone users share and refocus photos after they’ve been captured. The Refocus app only requires the Amber update which is already live so it should be available on every Nokia PureView Windows Phone from today onwards. Check out the cool feature by clicking on any point in the photo below that you’d like to bring into focus: The app is available for download at the Windows Store.
english
@charset "utf-8"; #top{ background: url(../images/news/main_bg.jpg) top no-repeat; background-size: 100% auto; padding: 3% 3% 0; font-size: 0; } #top img{ width: 100%; } #map{ text-align: center; width: 90%; padding: 2% 5%; } #map > p{ font-size: 36px; } #map > span{ display: inline-block; position: relative; bottom: -32px; background-color: #700; margin: 15px 0; padding: 5px 20px; color: #FFF; font-size: 18px; } .googlemap{ font-size: 0; } .googlemap > *{ width: 100%; } .googlemap iframe{ height: 500px; } #map .select{ position: relative; margin: 3%; margin-top: -31px; } #map .select .left{ float: left; margin-top: 12px; cursor: pointer; } #map .select .right{ float: right; margin-top: 12px; cursor: pointer; } #map .select > div{ display: inline-block; margin: 0 auto; width: calc(100% - 90px); } .slick3 .area{ background: url(../images/index/case_bg2.jpg) no-repeat; background-size: 100% 100%; margin: 5px; width: 114px; padding: 10px 0; color: #FFF; font-size: 16px; text-align: center; cursor: pointer; } .slick3 .area a{ color: #FFF; } article{ background-color: #fefcfa; padding: 0 3%; font-size: 0; } article img{ margin: 10px 0; border-radius: 10px; width: 100%; box-shadow: 5px 5px 5px #999; } aside{ background: url(../images/case/bg.jpg) bottom no-repeat, #fefcfa; background-size: 100% auto; padding: 30px 3%; } .case{ float: left; position: relative; margin: 1%; border-radius: 10px; width: 31%; box-shadow: 3px 3px 5px #999; } .case .casePic{ font-size: 0; } .case .casePic img{ width: 100%; border-radius: 10px; } .case .detail{ position: absolute; top: 0; right: 0; background-color: rgba(255,255,255,0.8); width: 40%; height: 91%; border-radius: 0 10px 10px 0; padding: 10% 5% 0; text-align: center; } .case .detail p{ font-weight: bold; } .case .detail .c1{ display: inline-block; margin: 5px 0; color: #900; font-size: 14px; } .case .detail .c2{ display: inline-block; margin: 5px 0; color: #690; font-size: 14px; } .case .detail .c3{ display: inline-block; margin: 5px 0; color: #09A; font-size: 14px; } .case .detail .square{ margin: 8px 0; color: #888; letter-spacing: 2px; } #page{ clear: both; padding: 30px 0; text-align: center; } #page a{ margin: 0 10px; padding: 3px 5px; border: 1px solid #CCC; color: #7e7664; } @media (max-width: 980px){ .case{ width: 48%; } .case .detail{ height: 82%; padding-top: 10%; } } @media (max-width: 768px){ #map .select{ margin-top: 0; } .case{ float: none; margin: 3% auto; width: 98%; max-width: 500px; } .googlemap iframe{ height: 300px; } }
css
Bad puns aside, this is actually pretty cool. NASA has set up two webcams in the cleanroom of Goddard Space Flight Center, where engineers are busy assembling the James Webb Space Telescope — the deep space imaging apparatus that will allow us to see farther into space than ever before. The cameras update every sixty seconds, so we're not talking live, streaming video; but tune in between 8:00 and 16:30 EST Monday through Friday, and you're liable to spy some activity. According to NASA: One piece of hardware you can keep an eye out for is the flight ISIM Structure, a large, black, square, "latticed" box. This structure will hold Webb's science instruments and will sit behind the 6.5 meter mirror. The test versions of several of our instruments are also sometimes visible in the cleanroom. I really hope these snapshots are being catalogued somewhere. That way, in the future, somebody can go through and create a time-lapse of the JWST's assembly. That would just rule.
english
- 3 hrs ago International Malala Day 2023: Who Is Malala Yousafzai? Where Is She Celebrating Her 26th Birthday? - News GST Council Meeting Highlights: What Will Be Cheaper, Costlier? - Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time! Black, red and sizzling - that is how Tara Sutaria graced the August 2019 cover of Cosmopolitan India magazine. Tara Sutaria, who is just one-movie old in the industry, was all things bold, confident and valiant in the cover image of the magazine. Featuring a fierce avatar of Tara, the magazine cover labelled her 'all ready to shake up Bollywood'. She wore a black tube top with a huge black belt and she paired it up with red, green and black checkered pants. She accessorised her look with a string of beaded necklaces that complimented her outfit perfectly. Talking about her make-up in the cover, she wore a dewy bronzed make-up with her eyeshadow giving the look a colourful pop. With contoured and highlighted cheekbones, she was exuding sassy vibes through and through. Her hair was styled in messy waves that went perfectly well with the whole look. This look is perfect when you experiment with your make-up and twitch up your casual look a bit. This is not the first time that Tara has wore an electric blue eyeshadow. The stunning actress sure seems to love some bold eye looks, especially blue one ( I mean, look at the difference a bold eyeshadow can make! ) and you should take some cues from as well. Keeping that in mind, here is how you can get the actress' sizzling look. - Apply the primer on the T-zone of your face and blend it in using dabbing motions with the help of your fingertips. - Apply the foundation on your face and blend it well using the damp beauty blender. - To highlight your face, apply the concealer under your eyes, your chin and the middle of your eyebrows. Blend it in using the same damp beauty blender. - Apply the contour on your cheekbones and jawline to define the face. - Take the blush on the blush brush, tap off the excess and apply it on the cheekbones of your face. - Slightly fill in the eyebrows using the eyebrow pencil. - Moving to the eyes, apply the concealer on your eyelids and blend well. - Take the sea green eyeshadow on the fluffy eyeshadow brush and blend it well to ensure that there are no harsh edges. Apply the eyeshadow on your lower lash line. - Using the flat brush apply the ocean blue eyeshadow from the inner corner of your eye till the middle of your eyelid. Blend the edges well. Drag the eyeshadow to the lower lash line as well. - Using the black eyeliner tightline your eyes. - Next, apply the highlighter on the highpoints of your face- your cheekbones, the tip and bridge of your nose and your cupid's bow. - Apply the lipstick to finish off the look. - Spritz some setting spray on your face for the make-up to last the whole day. - Use the detangler comb to remove the tangles from your hair. - Dampen your hair a bit. - Apply the hair gel on your hair. - Scrunch your hair for a few minutes. - Spray the hair spray on your hair and let it air dry. - fashion trendsValentine’s Day 2023: Trendy And Elegant Outfits To Dress Up For A Date!
english
Do People Vote Based On Politicians’ Looks? London: Voters tend to choose politicians based on their looks, causing ineffective people to get elected to positions of power, according to a study. Political parties are increasingly trying to achieve success by focusing on the personality of candidates rather than policies or party allegiance. Researchers from the University of Kent and University of Exeter in the UK found that, while people vote for local councillors who they believe look competent and have agreeable or trustworthy personality characteristics, these same people are often ineffective politicians because they have the wrong sort of personalities to succeed in office. Researchers asked 138 local politicians in the UK to rate their own personality. They also asked 755 of their colleagues, both other councillors and council officers, to anonymously rate their performance in office. The team also showed 526 people from around the world pictures of the councillors and asked them to say what they thought their personalities would be like. They were not told they were serving politicians. This is thought to be the first research to measure the impact of appearance and personality on voting and political performance in this way. The researchers compared these personality profiles and ratings of facial appearance against the politicians' share of the vote in local authority re-elections, and their performance in office. Candidates whose appearance was described as competent had more success than others at the ballot box, but were not judged by their colleagues as any more effective while in office. Politicians who rated themselves as 'agreeable' and whose personality suggested they were trustworthy and cooperative, had performed better in elections, but were not judged as very effective by their colleagues after winning their council seat. This may be because these traits may not be useful in politics, where debating and challenging others are key to success. "We found that voters are not necessarily able to see what politicians are required to do in their day-to-day work and therefore have to rely on characteristics that might seem to matter for leadership, but may not actually be that important," said Madeleine Wyatt from Kent Business School. Our research highlights the potential for image consultants and PR teams to influence elections by manipulating the way political candidates are presented to the public," said Wyatt. "This points to the need for greater transparency in the political process so that voters can get to know what political work really is, and who politicians really are," he said. "Voters increasingly choose politicians based on personality traits such as how warm, reliable, or decisive they appear to be, judged often by how they look or how tall they are," said Jo Silvester from Exeter Business School. "We found voters prefer candidates who are agreeable, but are won over less by people who look warm. Those "agreeable" politicians were less successful in office, possibly because being a good elected representative requires people to challenge and oppose and win arguments rather than avoid conflict. There is a mismatch between the types of politicians that voters say they want and those who are deemed to perform well once in office," Silvester said. (PTI)
english
<reponame>camyhsu/TO-Chinese-School-2020<gh_stars>1-10 import React, { useState, useEffect } from "react"; import Table from "../Table"; import queryString from "query-string"; import RegistrationService from "../../services/registration.service"; import { formatPersonNames } from "../../utils/utilities"; import { Card, CardBody, CardTitle } from "../Cards"; const ManageStaffAssignment = ({ location } = {}) => { const [content, setContent] = useState({ error: null, isLoaded: false, items: [], }); const header = [ { title: "Name", cell: (row) => { return formatPersonNames({ chineseName: row.person.chineseName, firstName: row.person.firstName, lastName: row.person.lastName, }); }, }, { title: "Role", prop: "role" }, { title: "Start Date", prop: "startDate" }, { title: "End Date", prop: "endDate" }, ]; useEffect(() => { document.title = "TOCS - Home"; const { id } = queryString.parse(location.search); if (id) { RegistrationService.getManageStaffAssignment(id).then((response) => { if (response && response.data) { setContent({ isLoaded: true, items: response.data.staffAssignments, schoolYear: response.data.schoolYear, }); } }); } }, [location.search]); return ( <Card size="flex"> <CardBody> {content.schoolYear && ( <CardTitle>Staff Assignments for {content.schoolYear.name}</CardTitle> )} <Table header={header} items={content.items} isLoaded={content.isLoaded} error={content.error} sortKey="id" showAll="true" /> </CardBody> </Card> ); }; export default ManageStaffAssignment;
javascript