| 1 | package fr.sii.ogham.template.thymeleaf.common.buider; | |
| 2 | ||
| 3 | import java.util.HashMap; | |
| 4 | import java.util.HashSet; | |
| 5 | import java.util.Map; | |
| 6 | import java.util.Set; | |
| 7 | ||
| 8 | import org.thymeleaf.TemplateEngine; | |
| 9 | import org.thymeleaf.cache.ICacheManager; | |
| 10 | import org.thymeleaf.dialect.IDialect; | |
| 11 | import org.thymeleaf.messageresolver.IMessageResolver; | |
| 12 | import org.thymeleaf.templateresolver.ITemplateResolver; | |
| 13 | ||
| 14 | import fr.sii.ogham.core.builder.Builder; | |
| 15 | import fr.sii.ogham.core.builder.context.BuildContext; | |
| 16 | import fr.sii.ogham.core.fluent.AbstractParent; | |
| 17 | ||
| 18 | public abstract class AbstractThymeleafEngineConfigBuilder<MYSELF extends AbstractThymeleafEngineConfigBuilder<MYSELF, P>, P> extends AbstractParent
 implements Builder<TemplateEngine> { | |
| 19 | protected final MYSELF myself; | |
| 20 | protected final BuildContext buildContext; | |
| 21 | protected Set<IDialect> dialects; | |
| 22 | protected Map<String, IDialect> dialectsByPrefix; | |
| 23 | protected Set<ITemplateResolver> templateResolvers; | |
| 24 | protected ICacheManager cacheManager; | |
| 25 | protected Set<IMessageResolver> messageResolvers; | |
| 26 | ||
| 27 | @SuppressWarnings("unchecked") | |
| 28 | public AbstractThymeleafEngineConfigBuilder(Class<?> selfType, P parent, BuildContext buildContext) { | |
| 29 | super(parent); | |
| 30 | myself = (MYSELF) selfType.cast(this); | |
| 31 | this.buildContext = buildContext; | |
| 32 | } | |
| 33 | | |
| 34 | ||
| 35 | /** | |
| 36 | *
 | |
| 37 | * Sets a new unique dialect for this template engine. | |
| 38 | *
 | |
| 39 | *
 | |
| 40 | * This operation is equivalent to removing all the currently configured | |
| 41 | * dialects and then adding this one. | |
| 42 | *
 | |
| 43 | *
 | |
| 44 | * This operation can only be executed before processing templates for the | |
| 45 | * first time. Once a template is processed, the template engine is | |
| 46 | * considered to be initialized, and from then on any attempt to | |
| 47 | * change its configuration will result in an exception. | |
| 48 | *
 | |
| 49 | * | |
| 50 | * @param dialect | |
| 51 | * the new unique {@link IDialect} to be used. | |
| 52 | * @return this for fluent use | |
| 53 | */ | |
| 54 | public MYSELF setDialect(final IDialect dialect) { | |
| 55 |
1
1. setDialect : removed call to java/util/Set::clear → NO_COVERAGE |
dialects().clear(); |
| 56 | dialects().add(dialect); | |
| 57 |
1
1. setDialect : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setDialect → NO_COVERAGE |
return myself; |
| 58 | } | |
| 59 | ||
| 60 | /** | |
| 61 | *
 | |
| 62 | * Adds a new dialect for this template engine, using the specified prefix. | |
| 63 | *
 | |
| 64 | *
 | |
| 65 | * This dialect will be added to the set of currently configured ones. | |
| 66 | *
 | |
| 67 | *
 | |
| 68 | * This operation can only be executed before processing templates for the | |
| 69 | * first time. Once a template is processed, the template engine is | |
| 70 | * considered to be initialized, and from then on any attempt to | |
| 71 | * change its configuration will result in an exception. | |
| 72 | *
 | |
| 73 | * | |
| 74 | * @param prefix | |
| 75 | * the prefix that will be used for this dialect | |
| 76 | * @param dialect | |
| 77 | * the new {@link IDialect} to be added to the existing ones. | |
| 78 | * @return this for fluent use | |
| 79 | */ | |
| 80 | public MYSELF addDialect(final String prefix, final IDialect dialect) { | |
| 81 | this.dialectsByPrefix().put(prefix, dialect); | |
| 82 |
1
1. addDialect : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::addDialect → NO_COVERAGE |
return myself; |
| 83 | } | |
| 84 | ||
| 85 | /** | |
| 86 | *
 | |
| 87 | * Adds a new dialect for this template engine, using the dialect's | |
| 88 | * specified default dialect. | |
| 89 | *
 | |
| 90 | *
 | |
| 91 | * This dialect will be added to the set of currently configured ones. | |
| 92 | *
 | |
| 93 | *
 | |
| 94 | * This operation can only be executed before processing templates for the | |
| 95 | * first time. Once a template is processed, the template engine is | |
| 96 | * considered to be initialized, and from then on any attempt to | |
| 97 | * change its configuration will result in an exception. | |
| 98 | *
 | |
| 99 | * | |
| 100 | * @param dialect | |
| 101 | * the new {@link IDialect} to be added to the existing ones. | |
| 102 | * @return this for fluent use | |
| 103 | */ | |
| 104 | public MYSELF addDialect(final IDialect dialect) { | |
| 105 | dialects().add(dialect); | |
| 106 |
1
1. addDialect : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::addDialect → NO_COVERAGE |
return myself; |
| 107 | } | |
| 108 | ||
| 109 | /** | |
| 110 | *
 | |
| 111 | * Sets a new set of dialects for this template engine, referenced by the | |
| 112 | * prefixes they will be using. | |
| 113 | *
 | |
| 114 | *
 | |
| 115 | * This operation can only be executed before processing templates for the | |
| 116 | * first time. Once a template is processed, the template engine is | |
| 117 | * considered to be initialized, and from then on any attempt to | |
| 118 | * change its configuration will result in an exception. | |
| 119 | *
 | |
| 120 | * | |
| 121 | * @param dialects | |
| 122 | * the new map of {@link IDialect} objects to be used, referenced | |
| 123 | * by their prefixes. | |
| 124 | * @return this for fluent use | |
| 125 | */ | |
| 126 | public MYSELF setDialectsByPrefix(final Map<String, IDialect> dialects) { | |
| 127 |
1
1. setDialectsByPrefix : removed call to java/util/Map::clear → NO_COVERAGE |
dialectsByPrefix().clear(); |
| 128 |
1
1. setDialectsByPrefix : removed call to java/util/Map::putAll → NO_COVERAGE |
dialectsByPrefix().putAll(dialects); |
| 129 |
1
1. setDialectsByPrefix : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setDialectsByPrefix → NO_COVERAGE |
return myself; |
| 130 | } | |
| 131 | ||
| 132 | /** | |
| 133 | *
 | |
| 134 | * Sets a new set of dialects for this template engine, all of them using | |
| 135 | * their default prefixes. | |
| 136 | *
 | |
| 137 | *
 | |
| 138 | * This operation can only be executed before processing templates for the | |
| 139 | * first time. Once a template is processed, the template engine is | |
| 140 | * considered to be initialized, and from then on any attempt to | |
| 141 | * change its configuration will result in an exception. | |
| 142 | *
 | |
| 143 | * | |
| 144 | * @param dialects | |
| 145 | * the new set of {@link IDialect} objects to be used. | |
| 146 | * @return this for fluent use | |
| 147 | */ | |
| 148 | public MYSELF setDialects(final Set<IDialect> dialects) { | |
| 149 |
1
1. setDialects : removed call to java/util/Set::clear → NO_COVERAGE |
this.dialects().clear(); |
| 150 | this.dialects().addAll(dialects); | |
| 151 |
1
1. setDialects : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setDialects → NO_COVERAGE |
return myself; |
| 152 | } | |
| 153 | ||
| 154 | /** | |
| 155 | *
 | |
| 156 | * Sets an additional set of dialects for this template engine, all of them | |
| 157 | * using their default prefixes. | |
| 158 | *
 | |
| 159 | *
 | |
| 160 | * This operation can only be executed before processing templates for the | |
| 161 | * first time. Once a template is processed, the template engine is | |
| 162 | * considered to be initialized, and from then on any attempt to | |
| 163 | * change its configuration will result in an exception. | |
| 164 | *
 | |
| 165 | * | |
| 166 | * @param additionalDialects | |
| 167 | * the new set of {@link IDialect} objects to be used. | |
| 168 | * | |
| 169 | * @since 2.0.9 | |
| 170 | * @return this for fluent use | |
| 171 | */ | |
| 172 | public MYSELF setAdditionalDialects(final Set<IDialect> additionalDialects) { | |
| 173 | dialects().addAll(additionalDialects); | |
| 174 |
1
1. setAdditionalDialects : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setAdditionalDialects → NO_COVERAGE |
return myself; |
| 175 | } | |
| 176 | ||
| 177 | /** | |
| 178 | *
 | |
| 179 | * Removes all the currently configured dialects. | |
| 180 | *
 | |
| 181 | *
 | |
| 182 | * This operation can only be executed before processing templates for the | |
| 183 | * first time. Once a template is processed, the template engine is | |
| 184 | * considered to be initialized, and from then on any attempt to | |
| 185 | * change its configuration will result in an exception. | |
| 186 | *
 | |
| 187 | * | |
| 188 | * @return this for fluent use | |
| 189 | */ | |
| 190 | public MYSELF clearDialects() { | |
| 191 |
1
1. clearDialects : removed call to java/util/Set::clear → NO_COVERAGE |
dialects().clear(); |
| 192 |
1
1. clearDialects : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::clearDialects → NO_COVERAGE |
return myself; |
| 193 | } | |
| 194 | ||
| 195 | /** | |
| 196 | *
 | |
| 197 | * Sets the entire set of template resolvers. | |
| 198 | *
 | |
| 199 | * | |
| 200 | * @param templateResolvers | |
| 201 | * the new template resolvers. | |
| 202 | * @return this for fluent use | |
| 203 | */ | |
| 204 | public MYSELF setTemplateResolvers(final Set<? extends ITemplateResolver> templateResolvers) { | |
| 205 |
1
1. setTemplateResolvers : removed call to java/util/Set::clear → NO_COVERAGE |
this.templateResolvers().clear(); |
| 206 | this.templateResolvers().addAll(templateResolvers); | |
| 207 |
1
1. setTemplateResolvers : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setTemplateResolvers → NO_COVERAGE |
return myself; |
| 208 | } | |
| 209 | ||
| 210 | /** | |
| 211 | *
 | |
| 212 | * Adds a new template resolver to the current set. | |
| 213 | *
 | |
| 214 | * | |
| 215 | * @param templateResolver | |
| 216 | * the new template resolver. | |
| 217 | * @return this for fluent use | |
| 218 | */ | |
| 219 | public MYSELF addTemplateResolver(final ITemplateResolver templateResolver) { | |
| 220 | templateResolvers().add(templateResolver); | |
| 221 |
1
1. addTemplateResolver : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::addTemplateResolver → NO_COVERAGE |
return myself; |
| 222 | } | |
| 223 | ||
| 224 | /** | |
| 225 | *
 | |
| 226 | * Sets a single template resolver for this template engine. | |
| 227 | *
 | |
| 228 | *
 | |
| 229 | * Calling this method is equivalent to calling | |
| 230 | * {@link #setTemplateResolvers(Set)} passing a Set with only one template | |
| 231 | * resolver. | |
| 232 | *
 | |
| 233 | * | |
| 234 | * @param templateResolver | |
| 235 | * the template resolver to be set. | |
| 236 | * @return this for fluent use | |
| 237 | */ | |
| 238 | public MYSELF setTemplateResolver(final ITemplateResolver templateResolver) { | |
| 239 |
1
1. setTemplateResolver : removed call to java/util/Set::clear → NO_COVERAGE |
templateResolvers().clear(); |
| 240 | templateResolvers().add(templateResolver); | |
| 241 |
1
1. setTemplateResolver : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setTemplateResolver → NO_COVERAGE |
return myself; |
| 242 | } | |
| 243 | ||
| 244 | /** | |
| 245 | *
 | |
| 246 | * Sets the Cache Manager to be used. If set to null, no caches will be used | |
| 247 | * throughout the engine. | |
| 248 | *
 | |
| 249 | *
 | |
| 250 | * By default, an instance of | |
| 251 | * {@link org.thymeleaf.cache.StandardCacheManager} is set. | |
| 252 | *
 | |
| 253 | *
 | |
| 254 | * This operation can only be executed before processing templates for the | |
| 255 | * first time. Once a template is processed, the template engine is | |
| 256 | * considered to be initialized, and from then on any attempt to | |
| 257 | * change its configuration will result in an exception. | |
| 258 | *
 | |
| 259 | * | |
| 260 | * @param cacheManager | |
| 261 | * the cache manager to be set. | |
| 262 | * @return this for fluent use | |
| 263 | * | |
| 264 | */ | |
| 265 | public MYSELF setCacheManager(final ICacheManager cacheManager) { | |
| 266 | this.cacheManager = cacheManager; | |
| 267 |
1
1. setCacheManager : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setCacheManager → NO_COVERAGE |
return myself; |
| 268 | } | |
| 269 | ||
| 270 | /** | |
| 271 | *
 | |
| 272 | * Sets the message resolvers to be used by this template engine. | |
| 273 | *
 | |
| 274 | *
 | |
| 275 | * This operation can only be executed before processing templates for the | |
| 276 | * first time. Once a template is processed, the template engine is | |
| 277 | * considered to be initialized, and from then on any attempt to | |
| 278 | * change its configuration will result in an exception. | |
| 279 | *
 | |
| 280 | * | |
| 281 | * @param messageResolvers | |
| 282 | * the Set of template resolvers. | |
| 283 | * @return this for fluent use | |
| 284 | */ | |
| 285 | public MYSELF setMessageResolvers(final Set<? extends IMessageResolver> messageResolvers) { | |
| 286 |
1
1. setMessageResolvers : removed call to java/util/Set::clear → NO_COVERAGE |
this.messageResolvers().clear(); |
| 287 | this.messageResolvers().addAll(messageResolvers); | |
| 288 |
1
1. setMessageResolvers : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setMessageResolvers → NO_COVERAGE |
return myself; |
| 289 | } | |
| 290 | ||
| 291 | /** | |
| 292 | *
 | |
| 293 | * Adds a message resolver to the set of message resolvers to be used by the | |
| 294 | * template engine. | |
| 295 | *
 | |
| 296 | *
 | |
| 297 | * This operation can only be executed before processing templates for the | |
| 298 | * first time. Once a template is processed, the template engine is | |
| 299 | * considered to be initialized, and from then on any attempt to | |
| 300 | * change its configuration will result in an exception. | |
| 301 | *
 | |
| 302 | * | |
| 303 | * @param messageResolver | |
| 304 | * the new message resolver to be added. | |
| 305 | * @return this for fluent use | |
| 306 | */ | |
| 307 | public MYSELF addMessageResolver(final IMessageResolver messageResolver) { | |
| 308 | messageResolvers().add(messageResolver); | |
| 309 |
1
1. addMessageResolver : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::addMessageResolver → NO_COVERAGE |
return myself; |
| 310 | } | |
| 311 | ||
| 312 | /** | |
| 313 | *
 | |
| 314 | * Sets a single message resolver for this template engine. | |
| 315 | *
 | |
| 316 | *
 | |
| 317 | * Calling this method is equivalent to calling | |
| 318 | * {@link #setMessageResolvers(Set)} passing a Set with only one message | |
| 319 | * resolver. | |
| 320 | *
 | |
| 321 | *
 | |
| 322 | * This operation can only be executed before processing templates for the | |
| 323 | * first time. Once a template is processed, the template engine is | |
| 324 | * considered to be initialized, and from then on any attempt to | |
| 325 | * change its configuration will result in an exception. | |
| 326 | *
 | |
| 327 | * | |
| 328 | * @param messageResolver | |
| 329 | * the message resolver to be set. | |
| 330 | * @return this for fluent use | |
| 331 | */ | |
| 332 | public MYSELF setMessageResolver(final IMessageResolver messageResolver) { | |
| 333 |
1
1. setMessageResolver : removed call to java/util/Set::clear → NO_COVERAGE |
messageResolvers().clear(); |
| 334 | messageResolvers().add(messageResolver); | |
| 335 |
1
1. setMessageResolver : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::setMessageResolver → NO_COVERAGE |
return myself; |
| 336 | } | |
| 337 | ||
| 338 | | |
| 339 | @Override | |
| 340 | public TemplateEngine build() { | |
| 341 | TemplateEngine engine = buildContext.register(new TemplateEngine()); | |
| 342 |
1
1. build : removed call to fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::configureDialects → NO_COVERAGE |
configureDialects(engine); |
| 343 |
1
1. build : removed call to fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::configureMessageResolvers → NO_COVERAGE |
configureMessageResolvers(engine); |
| 344 |
1
1. build : removed call to fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::configureTemplateResolvers → NO_COVERAGE |
configureTemplateResolvers(engine); |
| 345 |
1
1. build : removed call to fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::configureCacheManager → NO_COVERAGE |
configureCacheManager(engine); |
| 346 |
1
1. build : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::build → NO_COVERAGE |
return engine; |
| 347 | } | |
| 348 | ||
| 349 | protected void configureTemplateResolvers(TemplateEngine engine) { | |
| 350 |
1
1. configureTemplateResolvers : negated conditional → NO_COVERAGE |
if (templateResolvers != null) { |
| 351 |
1
1. configureTemplateResolvers : removed call to org/thymeleaf/TemplateEngine::setTemplateResolvers → NO_COVERAGE |
engine.setTemplateResolvers(templateResolvers); |
| 352 | } | |
| 353 | } | |
| 354 | ||
| 355 | protected void configureMessageResolvers(TemplateEngine engine) { | |
| 356 |
1
1. configureMessageResolvers : negated conditional → NO_COVERAGE |
if (messageResolvers != null) { |
| 357 |
1
1. configureMessageResolvers : removed call to org/thymeleaf/TemplateEngine::setMessageResolvers → NO_COVERAGE |
engine.setMessageResolvers(messageResolvers); |
| 358 | } | |
| 359 | } | |
| 360 | ||
| 361 | protected void configureCacheManager(TemplateEngine engine) { | |
| 362 |
1
1. configureCacheManager : negated conditional → NO_COVERAGE |
if (cacheManager != null) { |
| 363 |
1
1. configureCacheManager : removed call to org/thymeleaf/TemplateEngine::setCacheManager → NO_COVERAGE |
engine.setCacheManager(cacheManager); |
| 364 | } | |
| 365 | } | |
| 366 | ||
| 367 | protected void configureDialects(TemplateEngine engine) { | |
| 368 |
1
1. configureDialects : negated conditional → NO_COVERAGE |
if (dialects != null) { |
| 369 |
1
1. configureDialects : removed call to org/thymeleaf/TemplateEngine::setDialects → NO_COVERAGE |
engine.setDialects(dialects); |
| 370 | } | |
| 371 |
1
1. configureDialects : negated conditional → NO_COVERAGE |
if (dialectsByPrefix != null) { |
| 372 |
1
1. configureDialects : removed call to org/thymeleaf/TemplateEngine::setDialectsByPrefix → NO_COVERAGE |
engine.setDialectsByPrefix(dialectsByPrefix); |
| 373 | } | |
| 374 | } | |
| 375 | ||
| 376 | protected Set<IDialect> dialects() { | |
| 377 |
1
1. dialects : negated conditional → NO_COVERAGE |
if (dialects == null) { |
| 378 | dialects = new HashSet<>(); | |
| 379 | } | |
| 380 |
1
1. dialects : replaced return value with Collections.emptyList for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::dialects → NO_COVERAGE |
return dialects; |
| 381 | } | |
| 382 | ||
| 383 | protected Map<String, IDialect> dialectsByPrefix() { | |
| 384 |
1
1. dialectsByPrefix : negated conditional → NO_COVERAGE |
if (dialectsByPrefix == null) { |
| 385 | dialectsByPrefix = new HashMap<>(); | |
| 386 | } | |
| 387 |
1
1. dialectsByPrefix : replaced return value with null for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::dialectsByPrefix → NO_COVERAGE |
return dialectsByPrefix; |
| 388 | } | |
| 389 | ||
| 390 | protected Set<IMessageResolver> messageResolvers() { | |
| 391 |
1
1. messageResolvers : negated conditional → NO_COVERAGE |
if (messageResolvers == null) { |
| 392 | messageResolvers = new HashSet<>(); | |
| 393 | } | |
| 394 |
1
1. messageResolvers : replaced return value with Collections.emptyList for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::messageResolvers → NO_COVERAGE |
return messageResolvers; |
| 395 | } | |
| 396 | ||
| 397 | protected Set<ITemplateResolver> templateResolvers() { | |
| 398 |
1
1. templateResolvers : negated conditional → NO_COVERAGE |
if (templateResolvers == null) { |
| 399 | templateResolvers = new HashSet<>(); | |
| 400 | } | |
| 401 |
1
1. templateResolvers : replaced return value with Collections.emptyList for fr/sii/ogham/template/thymeleaf/common/buider/AbstractThymeleafEngineConfigBuilder::templateResolvers → NO_COVERAGE |
return templateResolvers; |
| 402 | } | |
| 403 | } | |
Mutations | ||
| 55 |
1.1 |
|
| 57 |
1.1 |
|
| 82 |
1.1 |
|
| 106 |
1.1 |
|
| 127 |
1.1 |
|
| 128 |
1.1 |
|
| 129 |
1.1 |
|
| 149 |
1.1 |
|
| 151 |
1.1 |
|
| 174 |
1.1 |
|
| 191 |
1.1 |
|
| 192 |
1.1 |
|
| 205 |
1.1 |
|
| 207 |
1.1 |
|
| 221 |
1.1 |
|
| 239 |
1.1 |
|
| 241 |
1.1 |
|
| 267 |
1.1 |
|
| 286 |
1.1 |
|
| 288 |
1.1 |
|
| 309 |
1.1 |
|
| 333 |
1.1 |
|
| 335 |
1.1 |
|
| 342 |
1.1 |
|
| 343 |
1.1 |
|
| 344 |
1.1 |
|
| 345 |
1.1 |
|
| 346 |
1.1 |
|
| 350 |
1.1 |
|
| 351 |
1.1 |
|
| 356 |
1.1 |
|
| 357 |
1.1 |
|
| 362 |
1.1 |
|
| 363 |
1.1 |
|
| 368 |
1.1 |
|
| 369 |
1.1 |
|
| 371 |
1.1 |
|
| 372 |
1.1 |
|
| 377 |
1.1 |
|
| 380 |
1.1 |
|
| 384 |
1.1 |
|
| 387 |
1.1 |
|
| 391 |
1.1 |
|
| 394 |
1.1 |
|
| 398 |
1.1 |
|
| 401 |
1.1 |


Development of Novel Methods for Computational Protein-Ligand Docking
Sam DeLuca
Overview of accomplishments
- Implemented a knowledge based potential for protein design (DeLuca, et al Biochemistry, 2011)
- 30-fold improvement of RosettaLigand speed, 15% improvement of scientific performance (DeLuca et al. PLoS ONE, under review)
- Implemented neural networks combining Rosetta and ligand chemical information
- Implemented tools for managing large Rosetta datasets
- Generated/analyzed models for screen of mGluR5 and RPA70
- Contributed to analysis of human germline antibody models (Willis et al, PLoS Comp. Bio., 2013)
- Contributed to analysis of protein-small molecule interface design project (Allison et al, J. Struct. Bio, 2013)
- Contributed to OSR1 target validation (Austin et al, J. Struct. Bio, 2014)
- Co-authored reviews of Rosetta best practices (Kaufmann et al, Biochemistry, 2010) and (Combs et al Nature Protocols, 2013)
Protein design
- Proteins can be engineered for specific purposes or to be more efficient
- Enzymes to convert cellulose into bio-fuels
- Proteins to sequester toxic compounds for hazmat cleanup
- Enzyme pathways to synthesize complex therapeutics
- Protein surfaces have few direct contacts and are hard to model
The Rosetta molecular modeling suite
- Originally a protein structure prediction tool
- Expanded to protein design, protein-protein docking, protein-ligand docking
- An extensive collection of tools for manipulating and scoring large molecules
A new Rosetta energy term improves design of native-like proteins
- Knowledge based potential generated by Durham et al. based on propensity of amino acid burial
- Rosetta energy function optimization:
- Minimize overall score
- Maintain overall amino acid profile
- New design performance metric based on PSSM score
DeLuca, et al Biochemistry, 2011
Ligand docking is inconsistently successful
Davis et al. (2009). Protein Science.
doi: 10.1002/pro.192
RosettaLigand: What we accomplished
- Improved sampling yields improved scientific performance
- Improved speed allows for larger screening studies
- Groundwork laid for future development of RosettaLigand
- RosettaLigand is a generic tool, useful across a wide range of protein targets
A brief history of RosettaLigand
- Originally developed in 2006 (Meiler and Baker)
- Extended to allow protein flexibility in 2008 (Davis and Baker)
- Redesigned for modularity and multiple ligand support in 2012 (Lemmon and Meiler)
RosettaLigand: Docking protocol
- Initial Placement
- Refinement
- Minimization
- One model: 50 seconds
- 1000 models for success
- 14 CPU hours per protein-ligand complex
- 583 CPU days for a 1000 compound screen
RosettaLigand: Initial placement grid energy function
RosettaLigand: Initial placement sampling
Using the grid energy function
- Translate — Translate ligand to a non-clashing position
- Rotate — Collect diverse rotations, select random non-clashing rotation
- Slide Together — Slide ligand toward center of protein until contact is made
RosettaLigand: Refinement and minimization
Using Rosetta all-atom energy function
- Alternating rounds of side-chain optimization and small perturbations
- Minimization of entire complex
Improving RosettaLigand sampling
Original RosettaLigand initial placement
New RosettaLigand initial placement
Improving RosettaLigand performance
- Profiled code to identify rate limiting steps
- Single slowest step was conversion of internal coordinates to Cartesian
- Rosetta performs rotations in internal coordinate space
- RosettaLigand initial placement grid is in Cartesian space
Internal coordinate space
- Rosetta was optimized for large molecules
- Frequent internal coordinate changes, infrequent Cartesian lookup
- RosettaLigand initial placement: Cartesian lookup after every move
- We can perform ligand sampling entirely in Cartesian space
- We optimized the code to take advantage of modern CPU features
Comparing new and old sampling methods
New tools developed for screening large libraries
- Bulk parameterization
- Create ligand conformers
- Generate Rosetta parameter files
- Attach experimental data
- Screening JobInputter
- Automated cross-docking
- Large screens can be split into small chunks
- SQL data storage (with Matt O'Meara)
- Relational database storage of models
- Online filtering by score
- Tracking of protocols parameters
- Support of multiple SQL servers
- Preparation time reduced from a few days of work to an afternoon
Testing the new RosettaLigand
- 43-Protein subset of Community Structure Activity Resource (CSAR), excluding:
- co-factors
- metal ions
- structural waters
- Methods tested:
- Previously published RosettaLigand sampling method (Old)
- New RosettaLigand sampling method (New)
- Previously published RosettaLigand refinement method (Long)
- Minimization only refinement method (Short)
New sampling method improves sampling speed
New sampling method improves probability of success
New sampling method improves docking success rate
Docking into crystal structures
New sampling method improves docking success rate
Docking into crystal structures
New sampling method improves docking success rate
Docking into repacked crystal structures
New sampling method improves docking success rate
Docking into relaxed crystal structures
Q-Dock: A more challenging benchmark
New shape complementarity scoring grid
New hydrogen bonding scoring grid
Grid Manager: A generic framework for managing scoring grids
New potentials don't improve success rate
Minimal difference in performance between old and new scoring grids
Impact of improved sampling on docking symmetric ligands
Impact of improved sampling on docking flexible ligands
Rough guidelines for RosettaLigand success
- Protein model accuracy: RMSD < 10.0 Å is required, RMSD < 5.0 Å is better
- Correct modeling of loops in binding site is critical
- Small ( < 100 atom) ligands are more likely to succeed
- Highly flexible ( > 20 rotatable bonds) ligands are more likely to fail
- Ligands with > 10 stereo-centers are more likely to fail
Hydrogen bonding grids as visualization tools in FoldIt
Future directions
- Investigate new sampling algorithms
- Improve quality of grid energy terms
- "Deep sampling" to map energy function
- Implement Gasteiger atom-typing and orbital based energy function
Summary
- Rosetta protein design
- New Rosetta energy term for protein design
- New quality metric for protein design
- Rosetta ligand docking
- Substantial improvements to RosettaLigand sampling
- 30-fold speed-up
- 15% increase in success rate over a range of proteins
- A new framework for scoring, with several new knowledge based scoring grids
- Laid groundwork for further exploration of RosettaLigand scoring and sampling methods


UUP announces 16 candidates for general election
by Rebecca Black, Press AssociationThe leader of the UUP has announced the party will run candidates in 16 constituencies across the north.
Steve Aiken had previously suggested the party would run in all 18 constituencies.
He later rowed back from that position following pressure in North Belfast and from unionist rivals over standing a candidate against DUP deputy leader Nigel Dodds, who is expected to face a tight race against Sinn Féin's John Finucane.
The other constituency which the UUP will not run in is West Belfast, a seat which has traditionally been dominated by Sinn Féin with only a small unionist vote.
Mr Aiken also came under pressure for his party to stand aside in South Belfast where the DUP's Emma Little Pengelly is expected to come under pressure from SDLP candidate Claire Hanna.
Sinn Féin and the Green Party have stepped aside in South Belfast for Ms Hanna as a remain candidate in the Brexit debate.
Mr Aiken described next month's poll as the "most important election in generations" and said he wants to offer pro-union voters a choice.
"The future direction of the United Kingdom and Northern Ireland's place within it is at stake," he said.
"Three years on from the EU referendum we are offered a deal that puts a border up the Irish Sea and weakens the United Kingdom.
"The Ulster Unionist Party is clear, if we are being asked to leave the European Union with the current disastrous deal then we are better to remain and protect our United Kingdom.
"We want to offer pro-Union voters a choice. A choice between Ulster Unionist candidates who will offer a positive, progressive vision for unionism, protecting our place within the United Kingdom and the DUP who have dropped the ball, allowing a border to be put up the Irish Sea and dragged the reputation of unionism into the gutter.
"I am proud to offer a slate of candidates who will stand up for positive, progressive, pro-Union values and ensure Northern Ireland is a modern, vibrant part of a modern, vibrant United Kingdom."
UUP election candidates
East Antrim: Steve Aiken
North Antrim: Robin Swann
South Antrim: Danny Kinahan
East Belfast: Carl McClean
South Belfast: Michael Henderson
East Derry: Richard Holmes
Fermanagh South Tyrone: Tom Elliott
West Tyrone: Andy McKane
Foyle: Darren Guy
Lagan Valley: Robbie Butler
Mid Ulster: Neil Richardson
Newry & Armagh: Sam Nicholson
North Down: Alan Chambers
South Down: Jill Macauley
Strangford: Philip Smith
Upper Bann: Doug Beattie


This was a project that allowed a specific client's admin users to upload the custom images for their company, which are see on the their dashboard. I finished this while interning over this past summer. It was a fun project that I was able to do from design to production.


SD ARTS
menu
Faculty
Program
Cadaver Training
Venue
Sponsorship
Contact Us
Register Now
Faculty
Program
Cadaver Training
Venue
Sponsorship
Contact Us
Register Now
Online Registration
First Name
Last Name
Suffix
MD
PhD
No Suffix
Email Address
Phone Number
Address Line 1
Address Line 2
City
State
Zip Code
Country


The zip function is used to create a compressed file in ZIP format. The following options can be used:
Similar to the pack function, the sync function returns an object containing a function called 'to'.
A simple flat ZIP file.
zip('Build/*.*').to('Build.zip');
This compresses the entire directory structure underneath the Build directory to Content/Build.zip.
zip({ to: 'Content/Build.zip', include: 'Build/*.*', recursive: true });


Note: this visualization works best on Firefox and you must "disable protection for now"
I created two other graphics that emulate the same trends... But they're both pretty ugly
Five Thirty Eight determined an NBA team's strength based on a value known as ELO, a measure that is calculated based on game-by-game results. But how does a team increase their Elo value?
The average ELO rating is ~1500, depending on team expansions. Here's an outline of what these numbers represent:


This SRFI describes abstractions for creating
new data types representing records - data structures with named fields.
This SRFI comes in four parts:
- a procedural layer for creating and
manipulating record types and record instances
- an explicit-naming syntactic layer for
defining the various entities associated with a record type -
construction procedure, predicate, field accessors, mutators, etc. - at
once
- an implicit-naming syntactic layer built on
top of the explicit-naming syntactic layer, which chooses the names for
the various products based on the names of the record type and
fields
- a set of reflection procedures


You know what?
Shout-out / attribution to Craveonline/Mandatory.com for creating the data-set!


Class RecognitionConfig (2.0.0)
public final class RecognitionConfig extends GeneratedMessageV3 implements RecognitionConfigOrBuilder
Provides information to the recognizer that specifies how to process the
request.
Protobuf type google.cloud.speech.v1p1beta1.RecognitionConfig
Static Fields
ADAPTATION_FIELD_NUMBER
public static final int ADAPTATION_FIELD_NUMBER
Field Value
ALTERNATIVE_LANGUAGE_CODES_FIELD_NUMBER
public static final int ALTERNATIVE_LANGUAGE_CODES_FIELD_NUMBER
Field Value
AUDIO_CHANNEL_COUNT_FIELD_NUMBER
public static final int AUDIO_CHANNEL_COUNT_FIELD_NUMBER
Field Value
DIARIZATION_CONFIG_FIELD_NUMBER
public static final int DIARIZATION_CONFIG_FIELD_NUMBER
Field Value
DIARIZATION_SPEAKER_COUNT_FIELD_NUMBER
public static final int DIARIZATION_SPEAKER_COUNT_FIELD_NUMBER
Field Value
ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER
public static final int ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER
Field Value
ENABLE_SEPARATE_RECOGNITION_PER_CHANNEL_FIELD_NUMBER
public static final int ENABLE_SEPARATE_RECOGNITION_PER_CHANNEL_FIELD_NUMBER
Field Value
ENABLE_SPEAKER_DIARIZATION_FIELD_NUMBER
public static final int ENABLE_SPEAKER_DIARIZATION_FIELD_NUMBER
Field Value
ENABLE_SPOKEN_EMOJIS_FIELD_NUMBER
public static final int ENABLE_SPOKEN_EMOJIS_FIELD_NUMBER
Field Value
ENABLE_SPOKEN_PUNCTUATION_FIELD_NUMBER
public static final int ENABLE_SPOKEN_PUNCTUATION_FIELD_NUMBER
Field Value
ENABLE_WORD_CONFIDENCE_FIELD_NUMBER
public static final int ENABLE_WORD_CONFIDENCE_FIELD_NUMBER
Field Value
ENABLE_WORD_TIME_OFFSETS_FIELD_NUMBER
public static final int ENABLE_WORD_TIME_OFFSETS_FIELD_NUMBER
Field Value
ENCODING_FIELD_NUMBER
public static final int ENCODING_FIELD_NUMBER
Field Value
LANGUAGE_CODE_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
MAX_ALTERNATIVES_FIELD_NUMBER
public static final int MAX_ALTERNATIVES_FIELD_NUMBER
Field Value
public static final int METADATA_FIELD_NUMBER
Field Value
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
Field Value
PROFANITY_FILTER_FIELD_NUMBER
public static final int PROFANITY_FILTER_FIELD_NUMBER
Field Value
SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
Field Value
SPEECH_CONTEXTS_FIELD_NUMBER
public static final int SPEECH_CONTEXTS_FIELD_NUMBER
Field Value
TRANSCRIPT_NORMALIZATION_FIELD_NUMBER
public static final int TRANSCRIPT_NORMALIZATION_FIELD_NUMBER
Field Value
USE_ENHANCED_FIELD_NUMBER
public static final int USE_ENHANCED_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static RecognitionConfig getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static RecognitionConfig.Builder newBuilder()
Returns
newBuilder(RecognitionConfig prototype)
public static RecognitionConfig.Builder newBuilder(RecognitionConfig prototype)
Parameter
Returns
public static RecognitionConfig parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static RecognitionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static RecognitionConfig parseFrom(byte[] data)
Parameter
| Name |
Description |
| data |
byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static RecognitionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static RecognitionConfig parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static RecognitionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RecognitionConfig parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static RecognitionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static RecognitionConfig parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static RecognitionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static RecognitionConfig parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static RecognitionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<RecognitionConfig> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getAdaptation()
public SpeechAdaptation getAdaptation()
Speech adaptation configuration improves the accuracy of speech
recognition. When speech adaptation is set it supersedes the
speech_contexts
field. For more information, see the speech
adaptation
documentation.
.google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
Returns
getAdaptationOrBuilder()
public SpeechAdaptationOrBuilder getAdaptationOrBuilder()
Speech adaptation configuration improves the accuracy of speech
recognition. When speech adaptation is set it supersedes the
speech_contexts
field. For more information, see the speech
adaptation
documentation.
.google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
Returns
getAlternativeLanguageCodes(int index)
public String getAlternativeLanguageCodes(int index)
A list of up to 3 additional
BCP-47 language tags,
listing possible alternative languages of the supplied audio.
See Language
Support for a list
of the currently supported language codes. If alternative languages are
listed, recognition result will contain recognition in the most likely
language detected including the main language_code. The recognition result
will include the language tag of the language detected in the audio. Note:
This feature is only supported for Voice Command and Voice Search use cases
and performance may vary for other use cases (e.g., phone call
transcription).
repeated string alternative_language_codes = 18;
Parameter
| Name |
Description |
| index |
int
The index of the element to return.
|
Returns
| Type |
Description |
| String |
The alternativeLanguageCodes at the given index.
|
getAlternativeLanguageCodesBytes(int index)
public ByteString getAlternativeLanguageCodesBytes(int index)
A list of up to 3 additional
BCP-47 language tags,
listing possible alternative languages of the supplied audio.
See Language
Support for a list
of the currently supported language codes. If alternative languages are
listed, recognition result will contain recognition in the most likely
language detected including the main language_code. The recognition result
will include the language tag of the language detected in the audio. Note:
This feature is only supported for Voice Command and Voice Search use cases
and performance may vary for other use cases (e.g., phone call
transcription).
repeated string alternative_language_codes = 18;
Parameter
| Name |
Description |
| index |
int
The index of the value to return.
|
Returns
| Type |
Description |
| ByteString |
The bytes of the alternativeLanguageCodes at the given index.
|
getAlternativeLanguageCodesCount()
public int getAlternativeLanguageCodesCount()
A list of up to 3 additional
BCP-47 language tags,
listing possible alternative languages of the supplied audio.
See Language
Support for a list
of the currently supported language codes. If alternative languages are
listed, recognition result will contain recognition in the most likely
language detected including the main language_code. The recognition result
will include the language tag of the language detected in the audio. Note:
This feature is only supported for Voice Command and Voice Search use cases
and performance may vary for other use cases (e.g., phone call
transcription).
repeated string alternative_language_codes = 18;
Returns
| Type |
Description |
| int |
The count of alternativeLanguageCodes.
|
getAlternativeLanguageCodesList()
public ProtocolStringList getAlternativeLanguageCodesList()
A list of up to 3 additional
BCP-47 language tags,
listing possible alternative languages of the supplied audio.
See Language
Support for a list
of the currently supported language codes. If alternative languages are
listed, recognition result will contain recognition in the most likely
language detected including the main language_code. The recognition result
will include the language tag of the language detected in the audio. Note:
This feature is only supported for Voice Command and Voice Search use cases
and performance may vary for other use cases (e.g., phone call
transcription).
repeated string alternative_language_codes = 18;
Returns
getAudioChannelCount()
public int getAudioChannelCount()
The number of channels in the input audio data.
ONLY set this for MULTI-CHANNEL recognition.
Valid values for LINEAR16 and FLAC are 1
-8
.
Valid values for OGG_OPUS are '1'-'254'.
Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only 1
.
If 0
or omitted, defaults to one channel (mono).
Note: We only recognize the first channel by default.
To perform independent recognition on each channel set
enable_separate_recognition_per_channel
to 'true'.
int32 audio_channel_count = 7;
Returns
| Type |
Description |
| int |
The audioChannelCount.
|
getDefaultInstanceForType()
public RecognitionConfig getDefaultInstanceForType()
Returns
getDiarizationConfig()
public SpeakerDiarizationConfig getDiarizationConfig()
Config to enable speaker diarization and set additional
parameters to make diarization better suited for your application.
Note: When this is enabled, we send all the words from the beginning of the
audio for the top alternative in every consecutive STREAMING responses.
This is done in order to improve our speaker tags as our models learn to
identify the speakers in the conversation over time.
For non-streaming requests, the diarization results will be provided only
in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
Returns
getDiarizationConfigOrBuilder()
public SpeakerDiarizationConfigOrBuilder getDiarizationConfigOrBuilder()
Config to enable speaker diarization and set additional
parameters to make diarization better suited for your application.
Note: When this is enabled, we send all the words from the beginning of the
audio for the top alternative in every consecutive STREAMING responses.
This is done in order to improve our speaker tags as our models learn to
identify the speakers in the conversation over time.
For non-streaming requests, the diarization results will be provided only
in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
Returns
getDiarizationSpeakerCount()
public int getDiarizationSpeakerCount()
If set, specifies the estimated number of speakers in the conversation.
Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
Note: Use diarization_config instead.
int32 diarization_speaker_count = 17 [deprecated = true];
Returns
| Type |
Description |
| int |
The diarizationSpeakerCount.
|
getEnableAutomaticPunctuation()
public boolean getEnableAutomaticPunctuation()
If 'true', adds punctuation to recognition result hypotheses.
This feature is only available in select languages. Setting this for
requests in other languages has no effect at all.
The default 'false' value does not add punctuation to result hypotheses.
bool enable_automatic_punctuation = 11;
Returns
| Type |
Description |
| boolean |
The enableAutomaticPunctuation.
|
getEnableSeparateRecognitionPerChannel()
public boolean getEnableSeparateRecognitionPerChannel()
This needs to be set to true
explicitly and audio_channel_count
> 1
to get each channel recognized separately. The recognition result will
contain a channel_tag
field to state which channel that result belongs
to. If this is not true, we will only recognize the first channel. The
request is billed cumulatively for all channels recognized:
audio_channel_count
multiplied by the length of the audio.
bool enable_separate_recognition_per_channel = 12;
Returns
| Type |
Description |
| boolean |
The enableSeparateRecognitionPerChannel.
|
getEnableSpeakerDiarization()
public boolean getEnableSpeakerDiarization()
If 'true', enables speaker detection for each recognized word in
the top alternative of the recognition result using a speaker_tag provided
in the WordInfo.
Note: Use diarization_config instead.
bool enable_speaker_diarization = 16 [deprecated = true];
Returns
| Type |
Description |
| boolean |
The enableSpeakerDiarization.
|
getEnableSpokenEmojis()
public BoolValue getEnableSpokenEmojis()
The spoken emoji behavior for the call
If not set, uses default behavior based on model of choice
If 'true', adds spoken emoji formatting for the request. This will replace
spoken emojis with the corresponding Unicode symbols in the final
transcript. If 'false', spoken emojis are not replaced.
.google.protobuf.BoolValue enable_spoken_emojis = 23;
Returns
| Type |
Description |
| BoolValue |
The enableSpokenEmojis.
|
getEnableSpokenEmojisOrBuilder()
public BoolValueOrBuilder getEnableSpokenEmojisOrBuilder()
The spoken emoji behavior for the call
If not set, uses default behavior based on model of choice
If 'true', adds spoken emoji formatting for the request. This will replace
spoken emojis with the corresponding Unicode symbols in the final
transcript. If 'false', spoken emojis are not replaced.
.google.protobuf.BoolValue enable_spoken_emojis = 23;
Returns
getEnableSpokenPunctuation()
public BoolValue getEnableSpokenPunctuation()
The spoken punctuation behavior for the call
If not set, uses default behavior based on model of choice
e.g. command_and_search will enable spoken punctuation by default
If 'true', replaces spoken punctuation with the corresponding symbols in
the request. For example, "how are you question mark" becomes "how are
you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
for support. If 'false', spoken punctuation is not replaced.
.google.protobuf.BoolValue enable_spoken_punctuation = 22;
Returns
| Type |
Description |
| BoolValue |
The enableSpokenPunctuation.
|
getEnableSpokenPunctuationOrBuilder()
public BoolValueOrBuilder getEnableSpokenPunctuationOrBuilder()
The spoken punctuation behavior for the call
If not set, uses default behavior based on model of choice
e.g. command_and_search will enable spoken punctuation by default
If 'true', replaces spoken punctuation with the corresponding symbols in
the request. For example, "how are you question mark" becomes "how are
you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
for support. If 'false', spoken punctuation is not replaced.
.google.protobuf.BoolValue enable_spoken_punctuation = 22;
Returns
getEnableWordConfidence()
public boolean getEnableWordConfidence()
If true
, the top result includes a list of words and the
confidence for those words. If false
, no word-level confidence
information is returned. The default is false
.
bool enable_word_confidence = 15;
Returns
| Type |
Description |
| boolean |
The enableWordConfidence.
|
getEnableWordTimeOffsets()
public boolean getEnableWordTimeOffsets()
If true
, the top result includes a list of words and
the start and end time offsets (timestamps) for those words. If
false
, no word-level time offset information is returned. The default is
false
.
bool enable_word_time_offsets = 8;
Returns
| Type |
Description |
| boolean |
The enableWordTimeOffsets.
|
getEncoding()
public RecognitionConfig.AudioEncoding getEncoding()
Encoding of audio data sent in all RecognitionAudio
messages.
This field is optional for FLAC
and WAV
audio files and required
for all other audio formats. For details, see AudioEncoding.
.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1;
Returns
getEncodingValue()
public int getEncodingValue()
Encoding of audio data sent in all RecognitionAudio
messages.
This field is optional for FLAC
and WAV
audio files and required
for all other audio formats. For details, see AudioEncoding.
.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1;
Returns
| Type |
Description |
| int |
The enum numeric value on the wire for encoding.
|
getLanguageCode()
public String getLanguageCode()
Required. The language of the supplied audio as a
BCP-47 language tag.
Example: "en-US".
See Language
Support for a list
of the currently supported language codes.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
| Type |
Description |
| String |
The languageCode.
|
getLanguageCodeBytes()
public ByteString getLanguageCodeBytes()
Required. The language of the supplied audio as a
BCP-47 language tag.
Example: "en-US".
See Language
Support for a list
of the currently supported language codes.
string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
Returns
| Type |
Description |
| ByteString |
The bytes for languageCode.
|
getMaxAlternatives()
public int getMaxAlternatives()
Maximum number of recognition hypotheses to be returned.
Specifically, the maximum number of SpeechRecognitionAlternative
messages
within each SpeechRecognitionResult
.
The server may return fewer than max_alternatives
.
Valid values are 0
-30
. A value of 0
or 1
will return a maximum of
one. If omitted, will return a maximum of one.
int32 max_alternatives = 4;
Returns
| Type |
Description |
| int |
The maxAlternatives.
|
public RecognitionMetadata getMetadata()
Metadata regarding this request.
.google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
Returns
public RecognitionMetadataOrBuilder getMetadataOrBuilder()
Metadata regarding this request.
.google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
Returns
getModel()
Which model to select for the given request. Select the model
best suited to your domain to get best results. If a model is not
explicitly specified, then we auto-select a model based on the parameters
in the RecognitionConfig.

Model
Description

command_and_search
Best for short queries such as voice commands or voice search.

phone_call
Best for audio that originated from a phone call (typically
recorded at an 8khz sampling rate).

video
Best for audio that originated from video or includes multiple
speakers. Ideally the audio is recorded at a 16khz or greater
sampling rate. This is a premium model that costs more than the
standard rate.

default
Best for audio that is not one of the specific audio models.
For example, long-form audio. Ideally the audio is high-fidelity,
recorded at a 16khz or greater sampling rate.

string model = 13;
Returns
| Type |
Description |
| String |
The model.
|
getModelBytes()
public ByteString getModelBytes()
Which model to select for the given request. Select the model
best suited to your domain to get best results. If a model is not
explicitly specified, then we auto-select a model based on the parameters
in the RecognitionConfig.

Model
Description

command_and_search
Best for short queries such as voice commands or voice search.

phone_call
Best for audio that originated from a phone call (typically
recorded at an 8khz sampling rate).

video
Best for audio that originated from video or includes multiple
speakers. Ideally the audio is recorded at a 16khz or greater
sampling rate. This is a premium model that costs more than the
standard rate.

default
Best for audio that is not one of the specific audio models.
For example, long-form audio. Ideally the audio is high-fidelity,
recorded at a 16khz or greater sampling rate.

string model = 13;
Returns
getParserForType()
public Parser<RecognitionConfig> getParserForType()
Returns
Overrides
getProfanityFilter()
public boolean getProfanityFilter()
If set to true
, the server will attempt to filter out
profanities, replacing all but the initial character in each filtered word
with asterisks, e.g. "f***". If set to false
or omitted, profanities
won't be filtered out.
bool profanity_filter = 5;
Returns
| Type |
Description |
| boolean |
The profanityFilter.
|
getSampleRateHertz()
public int getSampleRateHertz()
Sample rate in Hertz of the audio data sent in all
RecognitionAudio
messages. Valid values are: 8000-48000.
16000 is optimal. For best results, set the sampling rate of the audio
source to 16000 Hz. If that's not possible, use the native sample rate of
the audio source (instead of re-sampling).
This field is optional for FLAC and WAV audio files, but is
required for all other audio formats. For details, see AudioEncoding.
int32 sample_rate_hertz = 2;
Returns
| Type |
Description |
| int |
The sampleRateHertz.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSpeechContexts(int index)
public SpeechContext getSpeechContexts(int index)
Array of SpeechContext.
A means to provide context to assist the speech recognition. For more
information, see
speech
adaptation.
repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
Parameter
| Name |
Description |
| index |
int
|
Returns
getSpeechContextsCount()
public int getSpeechContextsCount()
Array of SpeechContext.
A means to provide context to assist the speech recognition. For more
information, see
speech
adaptation.
repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
Returns
getSpeechContextsList()
public List<SpeechContext> getSpeechContextsList()
Array of SpeechContext.
A means to provide context to assist the speech recognition. For more
information, see
speech
adaptation.
repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
Returns
getSpeechContextsOrBuilder(int index)
public SpeechContextOrBuilder getSpeechContextsOrBuilder(int index)
Array of SpeechContext.
A means to provide context to assist the speech recognition. For more
information, see
speech
adaptation.
repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
Parameter
| Name |
Description |
| index |
int
|
Returns
getSpeechContextsOrBuilderList()
public List<? extends SpeechContextOrBuilder> getSpeechContextsOrBuilderList()
Array of SpeechContext.
A means to provide context to assist the speech recognition. For more
information, see
speech
adaptation.
repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
Returns
| Type |
Description |
| List<? extends com.google.cloud.speech.v1p1beta1.SpeechContextOrBuilder> |
|
getTranscriptNormalization()
public TranscriptNormalization getTranscriptNormalization()
Use transcription normalization to automatically replace parts of the
transcript with phrases of your choosing. For StreamingRecognize, this
normalization only applies to stable partial transcripts (stability > 0.8)
and final transcripts.
.google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
Returns
getTranscriptNormalizationOrBuilder()
public TranscriptNormalizationOrBuilder getTranscriptNormalizationOrBuilder()
Use transcription normalization to automatically replace parts of the
transcript with phrases of your choosing. For StreamingRecognize, this
normalization only applies to stable partial transcripts (stability > 0.8)
and final transcripts.
.google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUseEnhanced()
public boolean getUseEnhanced()
Set to true to use an enhanced model for speech recognition.
If use_enhanced
is set to true and the model
field is not set, then
an appropriate enhanced model is chosen if an enhanced model exists for
the audio.
If use_enhanced
is true and an enhanced version of the specified model
does not exist, then the speech is recognized using the standard version
of the specified model.
bool use_enhanced = 14;
Returns
| Type |
Description |
| boolean |
The useEnhanced.
|
hasAdaptation()
public boolean hasAdaptation()
Speech adaptation configuration improves the accuracy of speech
recognition. When speech adaptation is set it supersedes the
speech_contexts
field. For more information, see the speech
adaptation
documentation.
.google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
Returns
| Type |
Description |
| boolean |
Whether the adaptation field is set.
|
hasDiarizationConfig()
public boolean hasDiarizationConfig()
Config to enable speaker diarization and set additional
parameters to make diarization better suited for your application.
Note: When this is enabled, we send all the words from the beginning of the
audio for the top alternative in every consecutive STREAMING responses.
This is done in order to improve our speaker tags as our models learn to
identify the speakers in the conversation over time.
For non-streaming requests, the diarization results will be provided only
in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
Returns
| Type |
Description |
| boolean |
Whether the diarizationConfig field is set.
|
hasEnableSpokenEmojis()
public boolean hasEnableSpokenEmojis()
The spoken emoji behavior for the call
If not set, uses default behavior based on model of choice
If 'true', adds spoken emoji formatting for the request. This will replace
spoken emojis with the corresponding Unicode symbols in the final
transcript. If 'false', spoken emojis are not replaced.
.google.protobuf.BoolValue enable_spoken_emojis = 23;
Returns
| Type |
Description |
| boolean |
Whether the enableSpokenEmojis field is set.
|
hasEnableSpokenPunctuation()
public boolean hasEnableSpokenPunctuation()
The spoken punctuation behavior for the call
If not set, uses default behavior based on model of choice
e.g. command_and_search will enable spoken punctuation by default
If 'true', replaces spoken punctuation with the corresponding symbols in
the request. For example, "how are you question mark" becomes "how are
you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
for support. If 'false', spoken punctuation is not replaced.
.google.protobuf.BoolValue enable_spoken_punctuation = 22;
Returns
| Type |
Description |
| boolean |
Whether the enableSpokenPunctuation field is set.
|
public boolean hasMetadata()
Metadata regarding this request.
.google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
Returns
| Type |
Description |
| boolean |
Whether the metadata field is set.
|
hasTranscriptNormalization()
public boolean hasTranscriptNormalization()
Use transcription normalization to automatically replace parts of the
transcript with phrases of your choosing. For StreamingRecognize, this
normalization only applies to stable partial transcripts (stability > 0.8)
and final transcripts.
.google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
Returns
| Type |
Description |
| boolean |
Whether the transcriptNormalization field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public RecognitionConfig.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected RecognitionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public RecognitionConfig.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions


{% extends 'base.html' %} {% block title %} Paste Deactivation - Modern Paste {% endblock %} {% block head %} {{ super() }} {{ import_js([ 'paste/DeactivateController.js', ])|safe }} {% endblock %} {% block content %}
PASTE DEACTIVATION
{% if success %} This paste has been successfully deactivated. {% else %} There was an error deactivating this paste. It is possible that this paste has already been deactivated. {% endif %}


“Mona Lisa” with aspect ratio 1:1
“Mona Lisa” with aspect ratio 1:1 (cropped)
“Mona Lisa” with aspect ratio 16:9
“Mona Lisa” with aspect ratio 9:16
© Leonardo da Vinci.


Vacation Planner
Let's first talk a bit about who you are:
What Biome type do you prefer?
Temperate
Mountain
Coastal
Desert
Tropical
What is your budget per person?
Under $500
$500 to $2500
$2500 to $5000
$5000 to $20000
I have a trustfund and don't care
What activity would you mainly like to do?
Rest and Relaxtion
Camping and Hiking
Shopping and Sightseeing
Gambling and Partying
Hunt another Human (Deposit Required)
What to you want in population density at your vacation site?
Alone on a Deserted Island
Forest Village of Ewoks
Small Village with some Amenities
Medium City with average Population
Large Metropolitan City
How important is the Food and/or Wine scene to you?
Eat what you kill
Bread and Water
Red Lobster is amazing
Gastro Pub or Farm to Table please
Nothing Less than 3 Michelins
Where am I going?
, your vacation awaits!
Mt Hood National Forest
, your vacation awaits!
Ewok Village on Endor
, your vacation awaits!
Cabo San Lucas
, your vacation awaits!
Las Vegas
, your vacation awaits!
Burj Al Arab Jumeirah


Please enter quantity
The quantity must be a whole number
Value cannot be less than 1
Value cannot be greater than {{maximumProductOrderLimit}}. Value cannot be greater than available stock. Stock Not Available


|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.numericalmethod.suanshu.stats.random.pseudorandom.MersenneTwister
public class MersenneTwister
Mersenne Twister is one of the best pseudo random number generators available. It was invented by Makoto Matsumoto and Takuji Nishimura in 1997. This class implements the MT19937 version that produces uniformly 32-bit integers.
The code here is by-and-large a Java translation of the 2002-01-26 version of the C by Makoto Matsumoto and Takuji Nishimura.
We do not guarantee that the translation is faithful and free of errors.
Here is their copyright notice.
A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.   Any feedback is very welcome. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
| Constructor Summary | |
|---|---|
MersenneTwister()
Construct a pseudo uniform random number generator using the Mersenne Twister algorithm. |
|
MersenneTwister(long... seeds)
Construct a pseudo uniform random number generator implementing Mersenne Twister algorithm. |
| Method Summary | |
|---|---|
double |
nextDouble()
Get the next random double. |
long |
nextLong()
Get a positive long random number. |
void |
seed(long... seeds)
Seed the random number generator to produce repeatable sequences. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MersenneTwister()
public MersenneTwister(long... seeds)
seeds
- the seeds| Method Detail |
|---|
public void seed(long... seeds)
RandomNumberGenerator
seed
in interface RandomNumberGenerator
seeds
- the seedspublic long nextLong()
nextLong
in interface RandomLongGenerator
public double nextDouble()
RandomNumberGenerator
nextDouble
in interface RandomNumberGenerator
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Title
Profile
Add Post
Pending
Viewuser
Home
New Document
Logout
E-Notice Web
home
Home
account_circle
Profile
watch_later
Pending Approval
receipt
New Documents
supervisor_account
View Users
account_balance
Other Department
exit_to_app
Logout
Card Example
{{user.username}}
{{user.approved}}


Oklahoma police chief killed, allegedly by one of his officers, during Florida training retreat
by CNN NewsourcePENSACOLA BEACH, Fla. – The police chief of an Oklahoma town was found dead during a training retreat in Florida. The suspect? One of his officers.
The body of Chief Lucky Miller of Mannford was discovered in a hotel room on Pensacola Beach, the Escambia County Sheriff's Office said.
Mannford Officer Michael Nealey, 49, was arrested and will be charged with homicide, the office said.
Deputies found the body in the men's hotel room after responding to a call about a fight Sunday night, sheriff's spokesperson Amber Southard told CNN.
It is unclear what led to the fight, and officials have not released a cause of death.
Miller, 44, was chief of police since 2007. He had a wife and three children.
"We are heartbroken by the news," Mannford Mayor Tyler Buttram said in a Facebook post. "Please keep both families in your prayers as we work to move forward."
Nealey is being held without bond at the Escambia County Jail. He has a court appearance scheduled for December 5.


|
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Short class definition. More...
#include <cylinder_bounding_box.hpp>
Public Member Functions | |
Life Cycle | |
| CylinderBoundingBox () | |
| Default constructor. More... | |
| CylinderBoundingBox (Parameters CustomParameters) | |
| CylinderBoundingBox (PointType FirstCenter, PointType SecondCenter, double Radius, PointType Velocity, int Convexity) | |
| CylinderBoundingBox & | operator= (CylinderBoundingBox const &rOther) |
| Assignment operator. More... | |
| CylinderBoundingBox (CylinderBoundingBox const &rOther) | |
| Copy constructor. More... | |
| virtual | ~CylinderBoundingBox () |
| Destructor. More... | |
Operations | |
| bool | IsInside (const PointType &rPoint, double &rCurrentTime, double Radius=0) override |
| bool | IsInside (BoundingBoxParameters &rValues, const ProcessInfo &rCurrentProcessInfo) override |
| void | CreateBoundingBoxBoundaryMesh (ModelPart &rModelPart, int linear_partitions=4, int angular_partitions=4) override |
Input and output | |
| std::string | Info () const override |
| Turn back information as a string. More... | |
| void | PrintInfo (std::ostream &rOStream) const override |
| Print information about this object. More... | |
| void | PrintData (std::ostream &rOStream) const override |
| Print object's data. More... | |
Protected Member Functions | |
Protected Operations | |
| bool | ContactSearch (const PointType &rPoint, const double &rRadius) |
| bool | ContactSearch (BoundingBoxParameters &rValues, const ProcessInfo &rCurrentProcessInfo) |
| void | CreateQuadrilateralBoundaryMesh (ModelPart &rModelPart, const unsigned int &rInitialNodeId, const unsigned int &angular_partitions) |
Protected Attributes | |
Protected static Member Variables | |
| PointType | mFirstCenter |
| PointType | mSecondCenter |
Type Definitions | |
| typedef array_1d< double, 3 > | PointType |
| typedef ModelPart::NodeType | NodeType |
| typedef ModelPart::NodesContainerType | NodesContainerType |
| typedef NodesContainerType::Pointer | NodesContainerTypePointer |
| typedef Quaternion< double > | QuaternionType |
| typedef ModelPart::ElementType | ElementType |
| typedef ElementType::GeometryType | GeometryType |
| KRATOS_CLASS_POINTER_DEFINITION (CylinderBoundingBox) | |
| Pointer definition of CylinderBoundingBox. More... | |
Short class definition.
Detail class definition.
This Box represents a 3D wall composed by a cylinder
A convexity parameter is given to determine if the internal or external space is considered as boundary
This bounding box is essentially used for rigid wall contact purposes
| typedef ModelPart::ElementType Kratos::CylinderBoundingBox::ElementType |
| typedef ModelPart::NodesContainerType Kratos::CylinderBoundingBox::NodesContainerType |
| typedef NodesContainerType::Pointer Kratos::CylinderBoundingBox::NodesContainerTypePointer |
| typedef ModelPart::NodeType Kratos::CylinderBoundingBox::NodeType |
| typedef array_1d<double, 3> Kratos::CylinderBoundingBox::PointType |
|
inline |
Default constructor.
|
inline |
|
inline |
|
inline |
Copy constructor.
|
inlinevirtual |
Destructor.
|
inlineprotected |
|
inlineprotected |
|
inlineoverride |
|
inlineprotected |
|
inlineoverride |
Turn back information as a string.
|
inlineoverride |
|
inlineoverride |
| Kratos::CylinderBoundingBox::KRATOS_CLASS_POINTER_DEFINITION | ( | CylinderBoundingBox | ) |
Pointer definition of CylinderBoundingBox.
|
inline |
Assignment operator.
|
inlineoverride |
Print object's data.
|
inlineoverride |
Print information about this object.
|
protected |
|
protected |


var ( // PrioritiesByHeight selects peers by descending height PrioritiesByHeight = &byHeight{} // NoExclusion accepts all peers and rejects no peers NoExclusion = selectionFunc(noExclusion) // NoPriorities is indifferent to how it selects peers NoPriorities = &noPriorities{} )
var ( // ErrNotFound defines an error that means that an element wasn't found ErrNotFound = errors.New("not found") )
NoFilter returns a noop Filter
var NoFilter = NewFilter(NoPriorities, NoExclusion)
ChannelResponse aggregates responses for a given channel
type ChannelResponse interface { // Config returns a response for a config query, or error if something went wrong Config() (*discovery.ConfigResult, error) // Peers returns a response for a peer membership query, or error if something went wrong Peers(invocationChain ...*discovery.ChaincodeCall) ([]*Peer, error) // Endorsers returns the response for an endorser query for a given // chaincode in a given channel context, or error if something went wrong. // The method returns a random set of endorsers, such that signatures from all of them // combined, satisfy the endorsement policy. // The selection is based on the given selection hints: // Filter: Filters and sorts the endorsers // The given InvocationChain specifies the chaincode calls (along with collections) // that the client passed during the construction of the request Endorsers(invocationChain InvocationChain, f Filter) (Endorsers, error) }
Client interacts with the discovery server
type Client struct {
// contains filtered or unexported fields
}
func NewClient(createConnection Dialer, s Signer, signerCacheSize uint) *Client
NewClient creates a new Client instance
func (c *Client) Send(ctx context.Context, req *Request, auth *discovery.AuthInfo) (Response, error)
Send sends the request and returns the response, or error on failure
Dialer connects to the server
type Dialer func() (*grpc.ClientConn, error)
Endorsers defines a set of peers that are sufficient for satisfying some chaincode's endorsement policy
type Endorsers []*Peer
func (endorsers Endorsers) Filter(f ExclusionFilter) Endorsers
Filter filters the endorsers according to the given ExclusionFilter
func (endorsers Endorsers) Shuffle() Endorsers
Shuffle sorts the endorsers in random order
func (endorsers Endorsers) Sort(ps PrioritySelector) Endorsers
Sort sorts the endorsers according to the given PrioritySelector
ExclusionFilter returns true if the given Peer is not to be considered when selecting peers
type ExclusionFilter interface { // Exclude returns whether the given Peer is to be excluded or not Exclude(Peer) bool }
func ExcludeByHost(reject func(host string) bool) ExclusionFilter
ExcludeByHost creates a ExclusionFilter out of the given exclusion predicate
func ExcludeHosts(endpoints ...string) ExclusionFilter
ExcludeHosts returns a ExclusionFilter that excludes the given endpoints
Filter filters and sorts the given endorsers
type Filter interface { Filter(endorsers Endorsers) Endorsers }
func NewFilter(ps PrioritySelector, ef ExclusionFilter) Filter
NewFilter returns an endorser filter that uses the given exclusion filter and priority selector to filter and sort the endorsers
InvocationChain aggregates ChaincodeCalls
type InvocationChain []*discovery.ChaincodeCall
func (ic InvocationChain) String() string
String returns a string representation of this invocation chain
func (ic InvocationChain) ValidateInvocationChain() error
ValidateInvocationChain validates the InvocationChain's structure
LocalResponse aggregates responses for a channel-less scope
type LocalResponse interface { // Peers returns a response for a local peer membership query, or error if something went wrong Peers() ([]*Peer, error) }
MemoizeSigner signs messages with the same signature if the message was signed recently
type MemoizeSigner struct { sync.RWMutex // contains filtered or unexported fields }
func NewMemoizeSigner(signFunc Signer, maxEntries uint) *MemoizeSigner
NewMemoizeSigner creates a new MemoizeSigner that signs message with the given sign function
func (ms *MemoizeSigner) Sign(msg []byte) ([]byte, error)
Signer signs a message and returns the signature and nil, or nil and error on failure
Peer aggregates identity, membership and channel-scoped information of a certain peer.
type Peer struct { MSPID string AliveMessage *gossip.SignedGossipMessage StateInfoMessage *gossip.SignedGossipMessage Identity []byte }
Priority defines how likely a peer is to be selected over another peer. Positive priority means the left peer is selected Negative priority means the right peer is selected Zero priority means their priorities are the same
type Priority int
PrioritySelector guides the selection of peers via giving peers a relative priority to their selection
type PrioritySelector interface { // Compare compares between 2 peers and returns // their relative scores Compare(Peer, Peer) Priority }
Request aggregates several queries inside it
type Request struct { *discovery.Request // contains filtered or unexported fields }
func NewRequest() *Request
NewRequest creates a new request
func (req *Request) AddConfigQuery() *Request
AddConfigQuery adds to the request a config query
func (req *Request) AddEndorsersQuery(interests ...*discovery.ChaincodeInterest) (*Request, error)
AddEndorsersQuery adds to the request a query for given chaincodes interests are the chaincode interests that the client wants to query for. All interests for a given channel should be supplied in an aggregated slice
func (req *Request) AddLocalPeersQuery() *Request
AddLocalPeersQuery adds to the request a local peer query
func (req *Request) AddPeersQuery(invocationChain ...*discovery.ChaincodeCall) *Request
AddPeersQuery adds to the request a peer query
func (req *Request) OfChannel(ch string) *Request
OfChannel sets the next queries added to be in the given channel's context
Response aggregates several responses from the discovery service
type Response interface { // ForChannel returns a ChannelResponse in the context of a given channel ForChannel(string) ChannelResponse // ForLocal returns a LocalResponse in the context of no channel ForLocal() LocalResponse }
Signer signs a message and returns the signature and nil, or nil and error on failure
type Signer func(msg []byte) ([]byte, error)


ReferenceError: Can't find variable: Intl https://static.licdn.com/sc/h/3cgizl1jci1meg8eah0ivkznw:130
Main content starts below.


firefight-bundle.js contains firefight.js and all its dependences in one file. This is a great way to get started quickly with firefight, but may not be appropriate in some cases.
ff.min.js contains only firefight.js and has dependencies on the following libraries.


The structure element defines a structure component of a binding. This can take any of several forms. The first is where the structure is a complex XML element (one with attributes or child elements) that's linked to an object property of the containing object type. This is the most common form of usage. It's essentially equivalent to an "in-line" mapping definition. This variation applies when both an element name and an object property are defined by the structure element (or when the property is implied rather than defined directly, as when the structure element is the child of a collection element).
Variations of the structure element that define either an element name or a linked property value (but not both) are used for structure mapping. Each of these variations works differently depending on whether the structure element is empty (does not have any child elements). The full set of structure mapping variations is shown in the table below.
| Defines | Empty? | What it Does |
|---|---|---|
Element |
yes |
Adds an empty element to the XML when marshalling (unless optional, in which case it's ignored when marshalling), discards and ignores the named element when unmarshalling. |
no |
Structure mapping that defines a complex element (one with attributes or child elements) in the XML representation with no corresponding object. Child attribute or element values are in this case linked directly to properties of the containing object type. |
|
Property |
yes |
References the mapping for the property object type, which must be
defined within some enclosing context of this definition. If the property type
exactly matches a defined mapping, that mapping will be used; if not, the
mapping will be determined by the element name when unmarshalling or the actual
object type when marshalling. This allows generic |
no |
Structure mapping that defines an object with no corresponding XML
element. Attributes or child elements defined within this structure
are part of the XML element defined by the containing structure or
mapping. Optional structures with no associated element name are subject to some
unmarshalling limitations. If the structure defines both attribute and element
values, the presence or absence of the structure is determined based only on the
attributes - if one of the defined attributes is present on the containing
element the structure is considered to be present, otherwise it is not and the
property will be set to |
Structures with child definitions may be ordered (where the XML components bound to the child definitions occur in a particular sequence) or unordered (where the XML components can occur in any order), as determined by the ordered attribute of the structure attribute group. In the case of unordered structures only optional components are allowed as child definitions.
A structure element can be used without either an element name or a linked property value when you just want to say that some child elements make up an unordered set:
<mapping name="alphas" class="AlphabetBean"> <value name="a" field="a"/> <structure ordered="false"> <value name="b" field="b" usage="optional"/> <value name="c" field="c" usage="optional"/> </structure> <value name="d" field="d"/> </mapping>
The above binding definition unmarshals both the element sequences (a, b, c, d) and (a, c, b, d). Since the unordered elements are (and have to be) optional, though, the binding will also allow (a, b, d), (a, c, d), and just (a, d). The unordered elements may also be duplicated without an error, so (a, c, b, c, d) would also be accepted (with repeated values stored in order, so that the final value for a property would be that of the last instance of the element). When marshalling an unordered group the sequence used in the binding definition will always be followed (so (a, c, b, d) would marshal as (a, b, c, d)). If you need to control the order of elements (or preserve the order, when starting from an unmarshalled document) you'll need to instead work with objects that can be held in a collection.
When a structure element is used with an object property JiBX will
reuse an existing instance of the object during unmarshalling. The way this
works is that JiBX only creates a new instance of the object for use in
unmarshalling if the property value is null
. If an element name is
used with an optional structure, and that name is missing from an input XML
document, the object property for that structure will always be set to
null
(since the representation is missing from the XML). If you
don't want the property to ever be set to null
, use a wrapper
structure element for the optional element name around the actual
structure definition.
The structure element supports one unique attribute along with several common attribute groups, listed below. The unique attribute is used to reference mapping definitions for objects. It may only be used when a property is supplied (or implied).
| map-as | This optional attribute can be used to override the type (or type name)
to be used for a mapping reference. If used as a type, the value of this
attribute must be the fully-qualified class name for the mapped type, and the
specified class must be assignment compatible with the actual property type (so
you can't map a |
| style | A value-style attribute present on the structure element sets a default for all contained elements. See the style attribute group description for usage details. |
| name | Attributes from the name group define an element mapped to the structure definition as a whole. The element defined in this way will be a wrapper for the XML representations of all child values defined by the structure. The name is optional unless this structure defines a mapping reference to the property type (property definition with no children, see the third row of the table at the top of this page), in which case it's forbidden. See the name attribute group description for usage details. |
| object | Attributes from the object group define the way object instances are created and used in marshalling and unmarshalling. See the object attribute group description for usage details. |
| property | Attributes from the property group define a property value, including how it is accessed and whether it is optional or required. See the property attribute group description for usage details. |
| structure | Attributes from the structure group define ordering and reuse of child binding components. See the structure attribute group description for usage details. |


Twelve new confirmed cases were reported from 1 to 7 January in the ongoing Ebola virus disease (EVD) outbreak in North Kivu and Ituri Provinces. The confirmed cases in this week were reported from nine health areas in four health zones: Butembo (42%, n=5), Mambasa (33%, n=4), Mangina (17%, n=2), and Beni (8%, n=1). The new case reported in Beni is linked to a transmission chain that originated in Aloya Health Area, Mabalako Health Zone.
In the past 21 days (18 December 2019 to 7 January 2020), 41 confirmed cases were reported from 13 health areas within six active health zones in North Kivu and Ituri Provinces (Figure 2, Table 1): Mabalako (49%, n=20), Butembo (22%, n=9), Kalunguta (12%, n=5), Mambasa (10%, n=4), Katwa (5%, n=2), and Beni (2%, n=1). Mabalako Health Zone remains the main hotspot of the outbreak having reported 49% of confirmed cases in the past 21 days. Although the majority of the cases (76%, n=31) are linked to known chains of transmission, there are concerns around the reintroduction of the disease into health zones with dense populations which have previously been cleared, such as Butembo, Katwa, and Beni Health Zones. The sources of exposure for five new cases reported in Kalunguta Health Zone and four new cases reported in Mambasa Health Zone in the past 21 days are currently under investigation.
As of 7 January, a total of 3392 EVD cases were reported, including 3274 confirmed and 118 probable cases, of which 2235 cases died (overall case fatality ratio 66%) (Table 1). Of the total confirmed and probable cases, 56% (n=1903) were female, 28% (n=956) were children aged less than 18 years, and 169 (5% of all reported cases) were healthcare workers.
*3392 confirmed and probable cases, reported as of 7 January 2020. Excludes n=173 cases for whom onset dates not reported. Data in recent weeks are subject to delays in case confirmation and reporting, as well as ongoing data cleaning. Other health zones include: Alimbongo, Ariwara, Biena, Bunia, Goma, Kayna, Komanda, Kyondo, Lolwa, Lubero, Mandima, Manguredjipa, Masereka, Musienene, Mutwanga, Mwenga, Nyakunde, Nyiragongo, Oicha, Pinga, Rwampara, Tchomia, and Vuhovi.
**Total cases and areas affected during the last 21 days are based on the initial date of case alert and may differ from date of confirmation and daily reporting by the Ministry of Health.
For further information about public health response actions by the Ministry of Health, WHO, and partners, please refer to the latest situation reports published by the WHO Regional Office for Africa:
WHO continuously monitors changes to the epidemiological situation and context of the outbreak to ensure that support to the response is adapted to the evolving circumstances. The last assessment concluded that the national and regional risk levels remain very high, while global risk levels remain low.
WHO advises against any restriction of travel to, and trade with, the Democratic Republic of the Congo based on the currently available information. Any requirements for certificates of Ebola vaccination are not a reasonable basis for restricting movement across borders or the issuance of visas for travellers to/from the affected countries. WHO continues to closely monitor and, if necessary, verify travel and trade measures in relation to this event. Currently, no country has implemented travel measures that significantly interfere with international traffic to and from the Democratic Republic of the Congo. Travellers should seek medical advice before travel and should practise good hygiene. Further information is available in the WHO recommendations for international traffic related to the Ebola Virus Disease outbreak in the Democratic Republic of the Congo.
For more information, please see:


[gecode-users] Gecode/J New users
Guido Tack
tack at ps.uni-sb.de
Fri Nov 2 10:15:21 CET 2007
Malcolm Ryan wrote:
> Thanks Guido for you prompt reply. I'm starting to find my way
> around. I've been reading through the Gecode class, you have by far
> the most complete set of constraints that I've seen in any of the
> libraries I've looked at! Although some are a little counter-
> intuitive.
>
> Am I right in thinking that if I want to say: x in s for intvar x and
> setvar s, I do:
>
> Gecode.rel(list, x, SetRelType.SRT_SUB, s);
>
> and if x is a constant int, I do:
>
> Gecode.dom(this, s, SetRelType.SRT_SUP, x);
>
> Is that right?
Exactly.
> More below....
>
>>> 3) Do you have any means to label constraints with meaningful tags
>>> for debugging?
>>
>> No, that's currently not possible. What kind of information would
>> you like to attach to a constraint? We are currently integrating
>> reflection capabilities into the C++ base library, which might
>> eventually also become available in Java.
>
> I just want to attach strings that are names decribing the semantic
> intent of the constraint, for debugging. What kind of debugging
> support do you have? Can I trace the constraints as they propagate?
Currently, you can't. We're working on some debugging support, but
it's not something you should expect to see in the near future, sorry.
> Ultimately, it would be nice to be able to attach a Java StackTrace
> to each constraint, recording the context in which it was posted. If
> these could be examined as the constraints propagated, it would be
> possible to build a tracing tool which showed _in_the_code_ which
> constraints are executing. That would enable you to build an
> interactive debugging tool much like a traditional execution tracer.
Sounds useful! One of the problems I see is that often there's a
difference between the constraints you post and the propagators that
are actually installed in the space. E.g., one constraint could be
implemented by a number of propagators, or a propagator rewrites
itself into a number of simpler propagators. These are the typical
issues a debugger would have to address.
Cheers,
Guido
More information about the gecode-users
mailing list


{% extends "base.html" %}
{% block title %}Upload a new sample {{ super() }}{% endblock %}
{% block body %}
{{ super() }}
Please select a file using the "browse" button below, and then press the "Upload file" button. This can take a while though! For bigger files it's recommended to use FTP upload instead.
The maximum allowed upload size is: {{ upload_size }} MB
Accepted files: {{ accept }}. If you want to upload another type, please make a request to get it added.


Thanksgiving Presence
by ROBERT KAHNI’m one of those people who has trouble being present. I had dinner with friends the other night and the only thing I remember about it is the spicy chicken soup. We could have been plotting the overthrow of the government for all I know.
I’ve had long trips on the freeway, made it home and then wondered how I got there because I don’t remember the drive. I may have used a transporter beam and forgotten about it when my atoms were reassembled.
I guess I’m used to this because it’s normal for me, but it also explains why I don’t see friends all that often. Apparently, I say next to nothing in conversations and that seems to annoy the less self-centered friends. The ones who talk endlessly are fine.
I can get away with this because I have a wife who does talk and only occasionally gets annoyed with me for not helping with discussions. I do chip in with quips when the sarcastic lobe of my brain subconsciously plucks a straight line out of the random words floating about around me. I can’t contribute, but I can react. Observers then falsely believe I’ve been listening.
I’m not bragging about any of this because I know it’s awful and I’m trying to reform. It’s just that the trendy remedies — the ones that pop up on the internet or the best-seller list — don’t seem to work for me. Some of them seem self-contradictory.
Take meditation. Somehow this is supposed to make you more present and turn off your mind. Maybe not at the same time, but I don’t see how one helps the other. If I’ve spent part of the morning counting breaths, I’m ready for a nap, not negotiation.
Other common advice just seems weird. Keeping a journal is counterproductive — I’d spend the day worrying about what to write. Finding an “accountability partner” seems like a good way to lose a friend.
If nothing else, worrying about presence is contributing to the economy. There are ample opportunities for spending money on books and T-shirts that are supposed to concentrate your mind.
You can spend many enjoyable hours on the internet laughing at suggestions for improving awareness. The domain names alone are worth the effort. My favorite so far is “productiveflourishing.com” where the first suggestion is “Drink Water.” The third is “Wiggle Your Toes.”
If you Google “how to be more present,” you’ll get something like this list of suggestions:
Yes, number 8 is “Stop worrying.” Why didn’t I think of that?
But just because I’m skeptical of all this popular advice doesn’t mean I think the situation is hopeless. Thanksgiving is coming up so I know I need to do something. It’s the perfect time to experiment with solutions.
Here are some the things I’m going to try this year. You may want to try them too.
Focus on the turkey. Fix the image of the turkey in your mind and then place it around the head of the person talking so that their face is in the open belly where the stuffing is supposed to go. You will be fascinated by what the turkey has to say.
Take three deep breaths and fix your gaze on the lips of the person doing the most talking.  Watch the lips as they move provocatively. Change the colors. Use paisley, polka dot, and patterned checks. You will be enveloped by those lips.
Play with the mashed potatoes. Sculpt them into castles and gardens and magical creatures. Other vegetables can inhabit this paradise too. You’ll be fully occupied and your friends and family will benefit as well as they’re drawn into your edible world.
Wiggle your fingers.
Copyright © 2019 courthousenews.com


This is a city-scale agent-based simulator, built based on the descriptions given in this
study of non-pharmaceutical interventions (from the Imperial College, London), this
paper on pandemics in SE Asia, and its associated
supplementary
material.
The simulator instantiates a smaller scale Bengaluru with population 100,000 across its
198 wards. The population distribution, employed fraction, age distribution, and
household size distribution are based on 2011 census data (with scaling for population growth).
Commute distances and workplace sizes are based on Thailand data given in the aforementioned
supplementary
material.
Average school size is kept at 300.
Interventions implemented include:


Logging in
Login to Udemy
Login
Loading Courses
Getting Info
Courses
Settings
Download Settings
Enable Lecture Start/End
Lecture Start
Lecture End
Video Quality
Select Quality
Lowest
360p
480p
720p
1080p
Highest
Save


{% extends 'base.html' %} {% load staticfiles %} {% block title %}Dashboard - CommuniCode{% endblock %} {% block content %} {# TRENDING BOX #}
CommuniCode is a coding social network integrated with git. You can upload and download projects freely, including tutorials and unfinished projects.
CommuniCode has a focus on learning and is designed to be easy to use.


All Saints
In this Mass, the
colour white is used.
ENTRANCE ANTIPHON
The souls of the Saints are rejoicing in heaven, the Saints who followed the footsteps of Christ, therefore they exult with Christ for ever.
COLLECT
O God, fount of all holiness, make us each walk worthily in our vocation, through the intercession of your Saints, on whom you bestowed a great variety of graces on earth and a single glorious reward in heaven. Through our Lord Jesus Christ, your Son, who lives and reigns with you in the unity of the Holy Spirit, one God, for ever and ever.
PRAYER OVER THE OFFERINGS
May these offerings we bring in honour of all the Saints be pleasing to you, O Lord, and grant that, just as we believe the Saints to be already assured of immortality, so we may experience their concern for our salvation. Through Christ our Lord.
Preface of the Apostles I or II
COMMUNION ANTIPHON
Blessed are
the clean of heart, for they will see God. Blessed are the peacemakers, for
they will be called children of God. Blessed are they who are persecuted for
the sake of righteousness, for theirs is the
PRAYER AFTER COMMUNION
O God, who
refresh us with the one Bread and sustain us with one hope, strengthen us
likewise, we pray, by your grace, that, as we are one with your Saints, one
body and one spirit in Christ, we may rise with him to glory. Who lives and
reigns for ever and ever.