text
stringlengths
3
181k
src
stringlengths
5
1.02k
/* BibEdt Copyright (C) 2005, Ascher Stefan. All rights reserved. stievie[at]users[dot]sourceforge[dot]net, http://bibedt.sourceforge.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. $Id: BibEdtList.h,v 1.7 2006/05/22 18:49:31 stievie Exp $ */ // BibEdtList.h: Schnittstelle für die Klasse CBibEdtList. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BIBEDTLIST_H__7E19C108_F78B_464B_9193_F25ACD611323__INCLUDED_) #define AFX_BIBEDTLIST_H__7E19C108_F78B_464B_9193_F25ACD611323__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /** * A list class that has a modified flag. */ class CBibEdtList : public CObList { public: void Clear(); void Move(POSITION curpos, POSITION newpos); void ExchangeItems(int i1, int i2); void ExchangeItems(POSITION i1, POSITION i2); void Move(int curindex, int newindex); void Delete(CObject* item); CObject* RemoveHead(); CObject* RemoveTail(); // add before head or after tail POSITION AddHead(CObject* newElement); POSITION AddTail(CObject* newElement); // add another list of elements before head or after tail void AddHead(CObList* pNewList); void AddTail(CObList* pNewList); // remove all elements void RemoveAll(); void SetAt(POSITION pos, CObject* newElement); void RemoveAt(POSITION position); // inserting before or after a given position POSITION InsertBefore(POSITION position, CObject* newElement); POSITION InsertAfter(POSITION position, CObject* newElement); virtual void SetModified(BOOL value) { m_Modified = value; } virtual BOOL GetModified() { return m_Modified; } CBibEdtList(); virtual ~CBibEdtList(); protected: BOOL m_Modified; void QuickSort(int l, int u, PFNLVCOMPARE pfnCompare); }; #endif // !defined(AFX_BIBEDTLIST_H__7E19C108_F78B_464B_9193_F25ACD611323__INCLUDED_)
stievie/bibedt-BibEdtList.h
import tarfile import time import os import json class BackupTool(object): """Simple backup utility.""" def __init__(self): pass @staticmethod def backup(openbazaar_installation_path, backup_folder_path, on_success_callback=None, on_error_callback=None): """ Creates an 'openbazaar-YYYY-MM-DD-hh-mm-ss.tar.gz' file inside the html/backups/ folder. @param openbazaar_installation_path: str The path to OpenBazaar's installation folder, where the db/ folder lives. @param backup_folder_path: str The folder where the backup file will reside. Optional callback functions can be passed: @param on_success_callback(backupFilePath: str) @param on_error_callback(errorMessage: str) """ date_time = time.strftime('%Y-%h-%d-%H-%M-%S') output_file_path = os.path.join( backup_folder_path, "openbazaar-%s.tar.gz" % date_time ) # Create the folder for the backup, if it doesn't exist. try: os.makedirs(backup_folder_path) except os.error: pass db_folder = os.path.join(openbazaar_installation_path, "db") try: with tarfile.open(output_file_path, "w:gz") as tar: tar.add(db_folder, arcname=os.path.basename(db_folder)) except tarfile.TarError as exc: # TODO: Install proper error logging. print "Error while backing up to:", output_file_path if on_error_callback is not None: on_error_callback(exc) return if on_success_callback is not None: on_success_callback(output_file_path) @staticmethod def restore(backup_tar_filepath): raise NotImplementedError @staticmethod def get_installation_path(): """Return the Project Root path.""" file_abs_path = os.path.abspath(__file__) real_file_abs_path = os.path.realpath(file_abs_path) return real_file_abs_path[:real_file_abs_path.find('/node')] @classmethod def get_backup_path(cls): """Return the backup path.""" # TODO: Make backup path configurable on server settings. return os.path.join( cls.get_installation_path(), 'html', 'backups' ) class Backup(json.JSONEncoder): """ A (meant to be immutable) POPO to represent a backup. So that we can tell our Web client about the backups available. """ def __init__(self, file_name=None, full_file_path=None, created_timestamp_millis=None, size_in_bytes=None): super(Backup, self).__init__() self.file_name = file_name self.full_file_path = full_file_path self.created_timestamp_millis = created_timestamp_millis self.size_in_bytes = size_in_bytes def to_dict(self): """Return a dictionary with attributes of self.""" return { "file_name": self.file_name, "full_file_path": self.full_file_path, "created_timestamp_millis": self.created_timestamp_millis, "size_in_bytes": self.size_in_bytes } def __repr__(self): return repr(self.to_dict()) @classmethod def get_backups(cls, backup_folder_path=None): """ Return a list of Backup objects found in the backup folder path given. """ if backup_folder_path is None or not os.path.isdir(backup_folder_path): return [] result_gen = ( cls.get_backup(os.path.join(backup_folder_path, x)) for x in os.listdir(backup_folder_path) ) result = [backup for backup in result_gen if backup is not None] result.reverse() return result @classmethod def get_backup(cls, backup_file_path): """ Create and return a Backup object from a backup path. Return None if the path was invalid. """ try: file_stat = os.stat(backup_file_path) file_name = os.path.basename(backup_file_path) except os.error: print "Invalid backup path:", backup_file_path return None created_timestamp_millis = file_stat.st_ctime size_in_bytes = file_stat.st_size return cls( file_name=file_name, full_file_path=backup_file_path, created_timestamp_millis=created_timestamp_millis, size_in_bytes=size_in_bytes ) class BackupJSONEncoder(json.JSONEncoder): # pylint: disable=method-hidden def default(self, o): if isinstance(o, Backup): return o.to_dict()
atsuyim/OpenBazaar-node/backuptool.py
using System; using System.Linq; class ExtractMiddleElements { static void Main() { MiddleElementOptionsSecond(); //MiddleElementOptionsFirst(); } private static void MiddleElementOptionsFirst() { // ----- Options one //Памет: 8.69 MB //Време: 0.015 s int[] middleArr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); string message = null; if (middleArr.Length > 1) { for (int i = 0; i < middleArr.Length; i++) { bool isOddOgEven = middleArr.Length % 2 == 0; if (isOddOgEven) { message += middleArr[middleArr.Length / 2 - 1] + ", "; message += middleArr[middleArr.Length / 2] + " "; break; } else { message += middleArr[middleArr.Length / 2 - 1] + ", "; message += middleArr[middleArr.Length / 2] + ", "; message += middleArr[middleArr.Length / 2 + 1] + " "; break; } } } else { message = $"{middleArr[0]}"; } Console.WriteLine("{ " + message + " }"); } private static void MiddleElementOptionsSecond() { int[] middleArr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); // ----- Options two //Памет: 8.96 MB //Време: 0.015 s int[] message = new int[1]; if (middleArr.Length > 1) { for (int i = 0; i < middleArr.Length; i++) { bool isOddOgEven = middleArr.Length % 2 == 0; if (isOddOgEven) { message = new int[2]; message[0] = middleArr[middleArr.Length / 2 - 1]; message[1] = middleArr[middleArr.Length / 2]; break; } else { message = new int[3]; message[0] = middleArr[middleArr.Length / 2 - 1]; message[1] = middleArr[middleArr.Length / 2]; message[2] = middleArr[middleArr.Length / 2 + 1]; break; } } } else { message[0] = middleArr[0]; } Console.WriteLine("{ " + string.Join(", ", message) + " }"); } }
Peter-Georgiev/Programming.Fundamentals-Arrays-Lab.Fast/09.ExtractMiddleElements/ExtractMiddleElements.cs
sap.ui.define(['sap/ui/webc/common/thirdparty/base/asset-registries/Icons'], function (Icons) { 'use strict'; const name = "web-cam"; const pathData = "M80 480h30q6-13 13.5-29t15.5-32 17-30 18-23q-49-23-79.5-69.5T64 192q0-40 15-75t41-61 61-41 75-15 75 15 61 41 41 61 15 75q0 58-30.5 104.5T338 366q8 9 17 23t17.5 30 16 32 13.5 29h30q7 0 11.5 5t4.5 11q0 16-16 16H80q-16 0-16-16 0-6 4.5-11t11.5-5zm176-128q33 0 62-12.5t51-34 34.5-51T416 192t-12.5-62T369 79t-51-34.5T256 32t-62 12.5T143 79t-34.5 51T96 192t12.5 62.5 34.5 51 51 34 62 12.5zm-64-160q0-26 19-45t45-19 45 19 19 45q0 27-19 45.5T256 256t-45-18.5-19-45.5zm-32 288h192q-3-9-9.5-25t-15-32-18.5-27.5-21-11.5h-64q-10 0-20.5 11.5t-19 27.5-15 32-9.5 25z"; const ltr = false; const collection = "SAP-icons"; const packageName = "@ui5/webcomponents-icons"; Icons.registerIcon(name, { pathData, ltr, collection, packageName }); var pathDataV5 = { pathData }; return pathDataV5; });
SAP/openui5-src/sap.ui.webc.common/src/sap/ui/webc/common/thirdparty/icons/v4/web-cam.js
'use strict'; var requirejs = require('requirejs'); requirejs.config({ baseUrl: __dirname + '/../../source/js' }); exports['API string builder'] = { setUp: function (callback) { var that = this; requirejs(['libs/api'], function (api) { that.api = api; callback(); }); }, tearDown: function (callback) { callback(); }, 'default': function (test) { var base = '//example.com'; var endpoint = 'items'; var fields = {}; var parameters = {}; var output = this.api(base)(endpoint, fields, parameters); test.equals(output, '//example.com/items'); test.done(); }, 'query string parameters': function (test) { var base = '//example.com'; var endpoint = ''; var fields = {}; var parameters = { where: 'wonderland' }; var output = this.api(base)(endpoint, fields, parameters); test.equals(output, '//example.com/?where=wonderland'); test.done(); } };
devmerge/frontend-tests/nodeunit/api_test.js
var users = { admin: {id:1, username:"admin", password:"1234"}, pepe: {id:2, username:"pepe", password:"5678"} }; //Comprueba si el usuario esta registrado en users //Si autenticación falla o hay errores se ejecuta callback(error). exports.autenticar = function(login, password, callback) { if (users[login]) { if (password === users[login].password) { callback(null, users[login]); } else { callback(new Error('Password erróneo.')); } } else { callback(new Error('No existe el usuario.')); } };
ddomenech/Quiz-controllers/user_controller.js
/* This file is part of KDevelop Copyright 2012 Olivier de Gaalon <[email protected]> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //"internalContext" : { "type" : "Class" } class Base { public: //"isVirtual" : false Base(); //"isVirtual" : true virtual ~Base(); //"isVirtual" : true virtual int anIntFunc(); //"isVirtual" : false int anIntFunc(int foo); //"isVirtual" : true virtual operator int(); //"isVirtual" : false operator char(); }; template<class T> class Derived : public Base { public: //"isVirtual" : false Derived(); //"EXPECT_FAIL" : { "isVirtual" : "Destructors currently don't inherit the virtual specifier as they should" }, //"isVirtual" : true ~Derived(); //"isVirtual" : true int anIntFunc(); //"EXPECT_FAIL" : { "isVirtual" : "Virtual specifier inheritance doesn't match functions with their overloads" }, //"isVirtual" : false #Hides a non-virtual function int anIntFunc(int foo); //"isVirtual" : true operator int(); //"EXPECT_FAIL" : { "isVirtual" : "Virtual specifier inheritance doesn't differentiate between cast operators" }, //"isVirtual" : false #Hides a non-virtual cast operator in base operator char(); }; template<> class Derived<int> : public Base { //"isVirtual" : false Derived<int>(); //"EXPECT_FAIL" : { "isVirtual" : "Destructors currently don't inherit the virtual specifier as they should" }, //"isVirtual" : true ~Derived<int>(); //"isVirtual" : true int anIntFunc(); //"EXPECT_FAIL" : { "isVirtual" : "Virtual specifier inheritance doesn't match functions with their overloads" }, //"isVirtual" : false #Hides a non-virtual function int anIntFunc(int foo); //"isVirtual" : true operator int(); //"EXPECT_FAIL" : { "isVirtual" : "Virtual specifier inheritance doesn't differentiate between cast operators" }, //"isVirtual" : false #Hides a non-virtual cast operator in base operator char(); };
krf/kdevelop-languages/cpp/tests/cpptestfiles/virtualspecifier.cpp
fbq('track', 'ViewContent'); ## I've been wracking my brain for years, trying to think of a way to get those basic facts to stick! There is way too much math that depends on knowing the basic facts, so we want the little ones to go beyond the "counting on fingers" or "counting on in your head" stage! We've been using this sequence for learning facts at my school, and I must say, the kids are getting it! We all know it's not a good idea to introduce all the facts at once. There are 200 facts to be learned, and learning them in some systematic way is necessary. My knowledge of brain based learning tells me we need to help the children make connections, use visuals like color and pictures, practice frequently, add a social component, and make it fun. This will all help those facts stick! I've taken 8 basic patterns and made 8 color coded sets of cards to be practiced based on these concepts:  plus one families, plus 10 families, plus 9 families, sums of 10, doubles, doubles plus 1, plus 2 families, and the remaining facts.  The "families" include 2 addition and 2 subtraction facts for each fact.  (For example, 1+8=9, 8+1=9, 9-1=8, and 9-8=1 are all connected.) These connections help children remember! I've even included a game that's connected to the cute little pictures on each card. Practicing the facts is only half the challenge.  The other challenge is showing mastery. I've included assessments with each set. There are 2 basic assessments with each family. The 2 assessments are both similar. I just thought you'd like a second option so they aren't taking the exact same assessment each time. Each assessment has 5 columns of 10 facts. I give the children one minute to complete as many facts as they can. (The timing helps distinguish between the kids who know the facts, and the kids who still need to figure them out.) I have found that kids that get 20 - 25 facts in a minute are definitely ready to move on to the next level. (This, of course, is up to you.) Some kids really need a one on one assessment with the cards, as their writing skills just can't keep up with their thinking skills. Want to check it out? See the image below for the freebie version of the first set along with the assessments. Addition and Subtraction Fact Fluency Freebie! ## Did you ever notice it's easier to go to school sick rather than go through the trouble of writing up sub plans? I stayed ultra late at school last night making plans for today's sub. (I'm not known for leaving early anyway, but last night was totally ridiculous!) I've learned to keep a tub of emergency plans. I have a folder for each day of the week, and detailed descriptions of my day inside each folder. I also have a binder that includes emergency information, procedures, and management ideas. I also keep folders for each subject that is filled with already run-off materials ready for an emergency day. After having subbed at every level, I know how important it is to have clear, easy-to-understand directions so the kids stay engaged and don't have any opportunities to make the sub crazy. The trick is to have the folders all updated to include materials that the children can do which isn't necessarily dependent on something the children are learning now. ## Good ideas to have on hand: 1. Practice on a skill that needs frequent review, like math facts, sight words, or parts of speech. 2. Writing prompts. 3. Vocabulary builders. 4 . Mini units that can be done in a day. Here are some examples of things I keep in my sub tub or leave for subs: I always keep a supply of these letter writing pages. I usually make a set with one letter addressed to everyone in the class. Then they choose one and write to that person! This is a "win-win" activity. Everyone writes a letter, and everyone gets a letter! (Explore image for this resource.) This number booklet to 1,000 can be used any time of year. Here's a math game the kiddos can play over and over, and all they need is a deck of playing cards! It practices addition skills, and gets them thinking about strategies! No, we don't do the gambling version! (Explore image for resource!) There's always an opportunity for kids to come up with a themed ABC booklet.  This is a fun activity to start off by reading an ABC book or two. (Explore the image for examples and this resource!) Here's a mini-unit that can be done any time of year: (Explore image for link!) If you find a couple of books about camping, you've got yourself a mini-unit in a day! Fun activities that practice important skills! I happen to have a number of "no prep" activities you can find HERE. Most of them are seasonal, which adds to the fun! (I go straight to these sets if I'm going to be out!) Now I suppose you're wondering why I was at school so late last night if I have all these ideas...  Well, I just hadn't updated my files from last year, and my schedule is totally different!  Now that the files are updated for the year, next time I'm sick will be easy peasy! ## Some of my students have been struggling with counting once they get over 100. I decided to give them a hand and have them make some booklets where they can count to 1,000 with little help. The kids started working on their booklets on Friday and they were totally into it!  You couldn't hear a peep in the whole room! To make this booklet, click the image above or click here: Count to 1,000 booklet. I have a few games and activities I play with the children with these booklets. • First, I have them trace the numbers, each hundred in a different color. • Then, we play "find the number". With a small group, I'll name a 3-digit number and have a race to see who can find that number the quickest.  (I'll give a token to the first few to find that number.) • Then I'll let individuals call out 3-digit numbers for classmates to find in the booklets. • Then we call out numbers for them to name the number before or after. • I'll bet you can think of other ways to get the children to search their "Count to 1,000" booklets to help them get to know Number sense! Feel free to find more differentiation options by exploring the image below or see here: Count to 1,000 booklet. This resource gives the option of making booklets with the numbers already there, having the children fill in most of the numbers, or having the children write ALL the numbers.  I had my second graders fill in the numbers, one page at a time. The first hundred were easy for them, but when they got to the second hundred, many of the children needed assistance.  Going through this process will really help the little ones understand our number system and its patterns, and help them develop their number sense!
finemath-3plus
package com.alexaegis.advancedjava; public class MainTest { }
AlexAegis/elte-advanced-java-lesson04/bdd/src/test/java/com/alexaegis/advancedjava/MainTest.java
// // BGSSwatchStrip.h // Saturation // // Created by Shawn Roske on 12/19/09. // Copyright 2009 Bitgun. All rights reserved. // #import <UIKit/UIKit.h> #import "FontsAndColors.h" #import "UIColor+ColorFromHex.h" #define COLOR_STRIP_ENTRY_WIDTH 10.0f #define COLOR_STRIP_ENTRY_HEIGHT 10.0f @interface BGSSwatchStrip : UIView { NSArray *swatches; } @property (nonatomic, retain) NSArray *swatches; - (id)initWithFrame:(CGRect)frame andSwatches:(NSArray *)andSwatches; @end
sroske/saturation-Classes/BGSSwatchStrip.h
import attr def Field(*args, default=attr.NOTHING, **kwargs): if callable(default): default = attr.Factory(default) return attr.ib(*args, default=default, **kwargs) def ForeignKey(cls, *args, **kwargs): metadata = { 'related': { 'target': cls, 'type': 'ForeignKey', } } return attr.ib(*args, metadata=metadata, **kwargs)
onyb/reobject-reobject/models/fields.py
class Solution { public: int maxSumAfterPartitioning(vector<int>& A, int K) { vector<int> dp(1 + A.size()); for (int j = 1; j <= A.size(); ++j) { int currMax = A[j - 1]; for (int i = j; i > max(j - K, 0); --i) { currMax = max(currMax, A[i - 1]); dp[j] = max(dp[j], dp[i - 1] + currMax * (j - i + 1)); } } return dp.back(); } };
jiadaizhao/LeetCode-1001-1100/1043-Partition Array for Maximum Sum/1043-Partition Array for Maximum Sum.cpp
/* * Copyright 2015-present Boundless Spatial Inc., http://boundlessgeo.com * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations * under the License. */ /** @module reducers/esri * @desc Esri Reducer * * Handles Esri ArcGIS REST requests. * */ import {ESRI} from '../action-types'; const defaultState = { sources: {}, }; /** Add a source to the state. * @param {Object} state Current state. * @param {Object} action Action to handle. * * @returns {Object} The new state. */ function addSource(state, action) { const new_source = {}; new_source[action.sourceName] = action.sourceDef; const new_sources = Object.assign({}, state.sources, new_source); return Object.assign({}, state, { sources: new_sources }); } /** Remove a source from the state. * @param {Object} state Current state. * @param {Object} action Action to handle. * * @returns {Object} The new state. */ function removeSource(state, action) { const new_sources = Object.assign({}, state.sources); delete new_sources[action.sourceName]; return Object.assign({}, state, {sources: new_sources}); } /** Esri reducer. * @param {Object} state The redux state. * @param {Object} action The selected action object. * * @returns {Object} The new state object. */ export default function EsriReducer(state = defaultState, action) { switch (action.type) { case ESRI.ADD_SOURCE: return addSource(state, action); case ESRI.REMOVE_SOURCE: return removeSource(state, action); default: return state; } }
bartvde/sdk-src/reducers/esri.js
/* * Copyright 2012 zhongl * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.github.zhongl.util; /** @author <a href="mailto:[email protected]">zhongl<a> */ public interface Nils { Void VOID = null; Object OBJECT = new Object() {}; }
zhongl/iPage-src/main/java/com/github/zhongl/util/Nils.java
'use strict'; var grunt = require('grunt'); /* ======== A Handy Little Nodeunit Reference ======== https://github.com/caolan/nodeunit Test methods: test.expect(numAssertions) test.done() Test assertions: test.ok(value, [message]) test.equal(actual, expected, [message]) test.notEqual(actual, expected, [message]) test.deepEqual(actual, expected, [message]) test.notDeepEqual(actual, expected, [message]) test.strictEqual(actual, expected, [message]) test.notStrictEqual(actual, expected, [message]) test.throws(block, [error], [message]) test.doesNotThrow(block, [error], [message]) test.ifError(value) */ exports.StupidMIIDeployer = { setUp: function(done) { // setup here if necessary done(); }, default_options: function(test) { test.expect(1); var actual = grunt.file.read('tmp/default_options'); var expected = grunt.file.read('test/expected/default_options'); test.equal(actual, expected, 'should describe what the default behavior is.'); test.done(); }, custom_options: function(test) { test.expect(1); var actual = grunt.file.read('tmp/custom_options'); var expected = grunt.file.read('test/expected/custom_options'); test.equal(actual, expected, 'should describe what the custom option(s) behavior is.'); test.done(); }, };
luctogno/gruntStupidMIIDeployer-test/StupidMIIDeployer_test.js
Agències de col·locació | Servei Públic d'Ocupació Estatal Publicació ... Què contracte de treball celebrar i els seus incentius Les agències de col·locació són entitats que el Servei Públic d'Ocupació Estatal i els serveis públics d'ocupació de les comunitats autònomes utilitzen com a eina perquè les persones que cerquen feina en trobin en tan aviat com sigui possible. Per aconseguir aquesta finalitat valoraran perfils, aptituds o coneixements de les persones desocupades. Poden dur a terme actuacions relacionades amb la recerca de feina: orientació, informació professional o selecció de personal.
c4-ca
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ package com.facebook.react.bridge; /** * This interface includes the methods needed to use a running JS * instance, without specifying any of the bridge-specific * initialization or lifecycle management. */ public interface JSInstance { void invokeCallback( ExecutorToken executorToken, int callbackID, NativeArray arguments); // TODO if this interface survives refactoring, think about adding // callFunction. }
kssujithcj/TestMobileCenter-node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSInstance.java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ Ext.define('sisprod.view.DeferredProductionReason.UpdateDeferredProductionReason', { extend: 'sisprod.view.base.BaseDataWindow', alias: 'widget.updateDeferredProductionReason', require: [ 'sisprod.view.base.BaseDataWindow' ], messages: { deferredProductionReasonLabel: 'Reason', deferredProductionCodeLabel: 'Code', deferredProductionTypeLabel: 'Type' }, title: 'Update Deferred Production Reason', autoMappingOptions: { autoMapping: false }, modal: true, width: 400, initComponent: function(){ var me=this; me.formOptions= { bodyPadding: 2, items: [ { xtype: 'hiddenfield', name: 'idDeferredProductionReason' }, { xtype: 'textfield', grow: true, name: 'deferredProductionReasonName', fieldLabel: me.messages.deferredProductionReasonLabel, fieldStyle: { textTransform: 'uppercase' }, labelWidth:100, anchor: '100%', allowBlank: false, maxLength: 150 }, { xtype: 'textfield', grow: true, name: 'deferredProductionCode', fieldLabel: me.messages.deferredProductionCodeLabel, labelWidth:100, anchor: '100%', allowBlank: false, maxLength: 6 }, { xtype: 'combobox', anchor: '100%', fieldLabel : me.messages.deferredProductionTypeLabel, labelWidth:100, store : Ext.create('sisprod.store.DeferredProductionTypeAll').load(), displayField : 'deferredProductionTypeName', valueField : 'idDeferredProductionType', id:'idDeferredProductionType', name:'idDeferredProductionType', forceSelection : true, allowBlank : false, editable : false } ] }; me.callParent(arguments); } });
jgin/testphp-web/bundles/hrmpayroll/app/view/DeferredProductionReason/UpdateDeferredProductionReason.js
# Question: Consider the following facts The standard deviation of the cash Consider the following facts. The standard deviation of the cash flows associated with Business I is 0.8. The larger this standard deviation, the riskier a business’s future cash flows are likely to be. The standard deviation of the cash flows associated with Business II is 1.3. So Business II is riskier than Business I. Finally, the correlation between the cash flows for these two businesses over time is -0.8. This means that when Business I is up, Business II tends to be down, and vice versa. Suppose one firm owns both of these businesses. Assuming that Business I constitutes 40% of this firm’s revenues, and Business II constitutes 60% of its revenues, calculate the riskiness of this firm’s total revenues using the equation provided. Given this result, does it make sense for this firm to own both Business I and Business II? Why or why not? Sales1 Views170
finemath-3plus
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of the Vodafone Group Services Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GETIMEI_H #define GETIMEI_H namespace isab{ ///This function return a IMEI number as a string. ///Don't foirget to delete[] the string when done with it. ///In non-device code this function will return a fake IMEI number. char* GetIMEI( const char* dataPath = NULL ); } #endif
wayfinder/Wayfinder-S60-Navigator-CPP/include/GetIMEI.h
'use strict'; var express = require('express'); var controller = require('./schedule-import.controller'); var router = express.Router(); router.get('/', controller.index); router.get('/:id', controller.show); router.post('/', controller.create); router.put('/:id', controller.update); router.patch('/:id', controller.update); router.delete('/:id', controller.destroy); module.exports = router;
tcrosen/nhl-data-server/api/schedule-import/index.js
/* global chrome:false */ /** * Contains the in-app tracking/metrics functions that send info * out to Mixpanel. When called from a content script the actual * mixpanel call is delegated to the background page to avoid being * blocked by other extensions. * * Usage: * * const track = require('./track'); * track('Activity', { * attribute_1: 'value', * attribute_2: 'value' * }).then(() => { * console.log('All done!'); * }).catch((err) => { * console.error(`Problem: ${err.message}`); * }); * * By default the following properties are set: * 1. Specific version of Chrome (major, minor, build) * 2. User mode: * - dev - loaded as an unpacked extension * - user - installed version from Chrome web store * 3. Extension version */ const mixpanel = require('mixpanel-browser'); const logger = require('util/logger')('track'); function isBackground() { // Synchronous shortcut since we don't use an options page. return location.protocol == 'chrome-extension:'; } function getChromeVersion() { let groups = /Chrome\/([0-9.]+)/.exec(navigator.userAgent); return groups && groups[1]; } function getExtensionVersion() { return chrome.runtime.getManifest().version; } function isDevMode() { return !('update_url' in chrome.runtime.getManifest()); } function track(event_name, properties = {}) { logger.debug(`Received tracking event: ${event_name}`); return new Promise((resolve) => { mixpanel.track(event_name, properties, resolve); }); } if (isBackground()) { // Developer property to segment out test/unpacked extension usage. let mode = isDevMode() ? 'dev' : 'user'; mixpanel.init('45697f2913c69b86acf923f43dd9d066'); // Chrome version. mixpanel.register({ 'Mode': mode, 'Chrome Version': getChromeVersion(), 'Version': getExtensionVersion() }); module.exports = track; // Set up listener for content script. chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { let method = message.method; if (method == 'track') { logger.debug('Received event from content script.'); track(message.event_name, message.properties).then(() => { sendResponse({ failed: false }); }).catch((err) => { sendResponse({ failed: true, reason: err.message }); }); return true; } }); } else { // Delegate to background page. module.exports = (event_name, properties = {}) => { return new Promise((resolve, reject) => { chrome.runtime.sendMessage({ method: 'track', event_name: event_name, properties: properties }, (result) => { if (chrome.runtime.lastError) { logger.error(`Chrome error: ${chrome.runtime.lastError.message}`); reject(chrome.runtime.lastError.message); } else if (!result) { reject('No result returned from background page.'); } else if (result.failed) { reject(new Error(result.reason)); } else { resolve(); } }); }); }; }
chrahunt/TagProReplays-src/js/util/track.js
# How to Add Tax to a Price How to Add Tax to a Price ## TAX Since local governments may add their own additional taxes, always look up the tax rate for the specific city where the purchase will take place. For example, try searching “Fort Worth sales tax” rather than just “Texas sales tax”. Not available at all locations and to all applicants. Additional fees, terms and conditions apply; consult your Cardholder Agreement for details. Enrollment restrictions apply. There is no tuition fee for the H&R Block Income Tax Course; however, you may be required to purchase course materials, which may be non-refundable. Additional training or testing may be required in CA, OR, and other states. ## Calculating the Tax Rate For example, if you were shopping in San Diego, the sales tax is 7.75%, which is 0.0775 when divided by 100. This is the number you then go on to multiply by the total cost of all taxable items. To add tax to the price of an item, multiply the cost by (1 + the sales tax rate as a decimal). To calculate sales tax, first convert the sales tax from a percentage to a decimal by moving the decimal 2 places to the left. Then multiply the cost of the item or service by that decimal to get the sales tax. Remember to add the sales tax to the cost of the item or service to get the total amount you will pay for it. Referring client will receive a \$20 gift card for each valid new client referred, limit two. Gift card will be mailed approximately two weeks after referred client has had his or her taxes prepared in an H&R Block or Block Advisors office and paid for that tax preparation. Referred client must have taxes prepared by 4/10/2018. H&R Block employees, including Tax Professionals, are excluded from participating. OBTP#B13696 ©2017 HRB Tax Group, Inc. Type of federal return filed is based on taxpayer’s personal situation and IRS rules/regulations. Whether you’re trying to get back to the pre-tax price of an item as part of a word problem or calculating the sales tax backwards from a receipt in your hand, the math is the same. You’ll need to know the total amount paid and either the amount of tax paid, which will let you calculate the tax rate, or the tax rate, in which case you can calculate the amount of tax paid. Enrollment in, or completion of, the H&R Block Income Tax Course is neither an offer nor a guarantee of employment. Additional qualifications may be required. The Send A Friend coupon must be presented prior to the completion of initial tax office interview. A new client is defined as an individual who did not use H&R Block or Block Advisors office services to prepare his or her prior-year tax return. Discount valid only for tax prep fees for an original 2017 personal income tax return prepared in a participating office. May not be combined with any other promotion including Free 1040EZ. Void if sold, purchased or transferred, and where prohibited. • Valid for 2017 personal income tax return only. • Return must be filed January 5 – February 28, 2018 at participating offices to qualify. ### How do I calculate sales tax backwards calculator? Sales Tax Calculation To calculate the sales tax that is included in a company’s receipts, divide the total amount received (for the items that are subject to sales tax) by “1 + the sales tax rate”. In other words, if the sales tax rate is 6%, divide the sales taxable receipts by 1.06. ## How do I calculate the amount of sales tax that is included in total receipts? All tax situations are different. Fees apply if you have us file a corrected or amended return. Prices based on hrblock.com, turbotax.com and intuit.taxaudit.com (as of 11/28/17). TurboTax® offers limited Audit Support services at no additional charge. H&R Block Audit Representation constitutes tax advice only. Only available for returns not prepared by H&R Block. All tax situations are different and not everyone gets a refund. Fees apply if you have us file an amended return. The IRS allows taxpayers to amend returns from the previous three tax years to claim additional refunds to which they are entitled. Applies to individual tax returns only. Valid at participating locations only. This course is not open to any persons who are either currently employed by or seeking employment with any professional tax preparation company or organization other than H&R Block. Valid for 2017 personal income tax return only. Return must be filed January 5 – February 28, 2018 at participating offices to qualify. Type of federal return filed is based on your personal tax situation and IRS rules. Additional fees apply for Earned Income Credit and certain other additional forms, for state and local returns, and if you select other products and services. Visit hrblock.com/ez to find the nearest participating office or to make an appointment. Not valid on subsequent payment. CTEC# 1040-QE-2127 ©2019 HRB Tax Group, Inc. The H&R Block Emerald Prepaid Mastercard® is a tax refund-related deposit product issued by Axos Bank®, Member FDIC, pursuant to a license by Mastercard International Incorporated. Emerald Financial Services, LLC is a registered agent of Axos Bank. Mastercard is a registered trademark, and the circles design is a trademark of Mastercard International Incorporated. Consult your attorney for legal advice. Does not provide for reimbursement of any taxes, penalties or interest imposed by taxing authorities. When you’re trying to find the total cost of an item, you’ll need to add the total cost of the item to the sales tax. In the example above, you would add \$65.87 to \$5.10, which would leave you with a total payment due of \$70.97. When trying to determine how much sales tax to add to a transaction and whether or not a certain item should be taxed, it is important to review your local tax rate and laws regarding what is taxable. Additional fees apply with Earned Income Credit and you file any other returns such as city or local income tax returns, or if you select other products and services such as Refund Transfer. Available at participating U.S. locations. It does not provide for reimbursement of any taxes, penalties, or interest imposed by taxing authorities and does not include legal representation. The student will be required to return all course materials, which may not be refundable. Discount is off course materials in state where applicable. Discount must be used on initial purchase only. Additional terms and restrictions apply; See Free In-person Audit Support for complete details. Once you know the sales tax rate for the area in which you are shopping, you’ll need to convert the percentage to a decimal by dividing it by 100.
finemath-3plus
# Sequential Kernelized Independence Testing Aleksandr Podkopaev\({}^{1}\), Patrick Blobaum\({}^{2}\), Shiva Prasad Kasiviswanathan\({}^{2}\), Aaditya Ramdas\({}^{1,2}\) Carnegie Mellon University\({}^{1}\) Amazon Web Services\({}^{2}\) A large fraction of this work was completed while AP was an intern at Amazon in Summer 2022. ###### Abstract Independence testing is a classical statistical problem that has been extensively studied in the batch setting when one fixes the sample size before collecting data. However, practitioners often prefer procedures that adapt to the complexity of a problem at hand instead of setting sample size in advance. Ideally, such procedures should (a) stop earlier on easy tasks (and later on harder tasks), hence making better use of available resources, and (b) continuously monitor the data and efficiently incorporate statistical evidence after collecting new data, while controlling the false alarm rate. Classical batch tests are not tailored for streaming data: valid inference after data peeking requires correcting for multiple testing which results in low power. Following the principle of testing by betting, we design sequential kernelized independence tests that overcome such shortcomings. We exemplify our broad framework using bets inspired by kernelized dependence measures, e.g., the Hilbert-Schmidt independence criterion. Our test is also valid under non-i.i.d. time-varying settings. We demonstrate the power of our approaches on both simulated and real data. ###### Contents * 1 Introduction * 2 Sequential Kernel Independence Test * 3 Alternative Dependence Measures * 4 Symmetry-based Betting Strategies * 5 Conclusion * A Independence Testing for Streaming Data * A.1 Failure of Batch HSIC under Continuous Monitoring * A.2 Sequential Independence Testing via Sequential Two-Sample Testing * A.3 Comparison in the Batch Setting * B Proofs * B.1 Auxiliary Results * B.2 Proofs for Section 2 * B.2.1 Supporting Lemmas * B.2.2 Main Results * B.3 Proofs for Section 3 * B.4 Proofs for Section 4 C Selecting Betting Fractions * O Omitted Details for Sections 2 and 3 * E Additional Simulations * E.1 Test of Instantaneous Dependence * E.2 Distribution Drift * E.3 Symmetry-based Payoff Functions * E.4 Hard-to-detect Dependence * E.5 Additional Results for Real Data * E.6 Experiment with MNIST data * F Scaling Sequential Testing Procedures * F.1 Incomplete/Pivoted Cholesky Decomposition for COCO and KCC * F.2 Linear-time Updates of the HSIC Payoff Function ## 1 Introduction Independence testing is a fundamental statistical problem that has also been studied within information theory and machine learning. Given paired observations \((X,Y)\) sampled from some (unknown) joint distribution \(P_{XY}\), the goal is to test the null hypothesis that \(X\) and \(Y\) are independent. The literature on independence testing is vast as there is no unique way to measure dependence, and different measures give rise to different tests. Traditional measures of dependence, such as Pearson's \(r\), Spearman's \(\rho\), and Kendall's \(\tau\), are limited to the case of univariate random variables. Kernel tests [13, 15, 20] are amongst the most prominent modern tools for nonparametric independence testing that work for general \(\mathcal{X},\mathcal{Y}\) spaces. In the literature, heavy emphasis has been placed on _batch_ testing when one has access to a sample whose size is specified in advance. However, even if random variables are dependent, the sample size that suffices to detect dependence is never known a priori. If the results of a test are promising yet non-conclusive (e.g., a p-value is slightly larger than a chosen significance level), one may want to collect more data and re-conduct the study. This is not allowed by traditional batch tests. We focus on sequential tests that allow peeking at observed data to decide whether to stop and reject the null or to continue collecting data. Problem Setup.Suppose that one observes a stream of data: \(\left(Z_{t}\right)_{t\geq 1}\), where \(Z_{t}=\left(X_{t},Y_{t}\right)\stackrel{{\text{iid}}}{{\sim}}P_{XY}\). We design sequential tests for the following pair of hypotheses: \[H_{0} :Z_{t}\stackrel{{\text{iid}}}{{\sim}}P_{XY},\ t\geq 1 \text{ and }P_{XY}=P_{X}\times P_{Y}, \tag{1a}\] \[H_{1} :Z_{t}\stackrel{{\text{iid}}}{{\sim}}P_{XY},\ t\geq 1 \text{ and }P_{XY}\neq P_{X}\times P_{Y}. \tag{1b}\] Following the framework of "tests of power one" [7], we define a level-\(\alpha\) sequential test as a mapping \(\Phi:\cup_{t=1}^{\infty}(\mathcal{X}\times\mathcal{Y})^{t}\rightarrow\{0,1\}\) that satisfies \[\mathbb{P}_{H_{0}}\left(\exists t\geq 1:\Phi(Z_{1},\ldots,Z_{t})=1\right)\leq\alpha.\] As is standard, \(0\) stands for "do not reject the null yet" and \(1\) stands for "reject the null and stop". Defining the stopping time \(\tau:=\inf\left\{t\geq 1:\Phi(Z_{1},\ldots,Z_{t})=1\right\}\) as the first time that the test outputs \(1\), a sequential test must satisfy \[\mathbb{P}_{H_{0}}\left(\tau<\infty\right)\leq\alpha.\] We work in a very general composite nonparametric setting: \(H_{0}\) and \(H_{1}\) consist of huge classes of distributions (discrete/continuous) for which there may not be a common reference measure, making it impossible to define densities and thus ruling out likelihood-ratio based methods. Our Contributions.Following the principle of testing by betting, we design consistent sequential nonparametric independence tests. Our bets are inspired by popular kernelized dependence measures: Hilbert-Schmidt independence criterion (HSIC) [13], constrained covariance criterion (COCO) [15], and kernelized canonical correlation (KCC) [20]. We provide theoretical guarantees on _time-uniform_ type I error control for these tests -- the type I error is controlled even if the test is continuously monitored and adaptively stopped -- and further establish consistency and asymptotic rates for our sequential HSIC under the i.i.d. setting. Our tests also remain valid even if the underlying distribution changes over time. Additionally, while the initial construction of our tests requires bounded kernels, we also develop variants based on symmetry-based betting that overcome this requirement. This strategy can be readily used with a linear kernel to construct a sequential linear correlation test. We justify the practicality of our tests through a detailed empirical study. We start by highlighting two major shortcomings of existing tests that our new tests overcome. (i) Limitations of Corrected Batch tests and Reduction to Two-sample Testing.Batch tests (without corrections for multiple testing) have an inflated false alarm rate under continuous monitoring (see Appendix A.1). Naive Bonferroni corrections restore type I error control, but generally result in tests with low power. This motivates a direct design of sequential tests (not by correcting batch tests). It is tempting to reduce sequential independence testing to sequential two-sample testing, for which a powerful solution has been recently designed [30]. This can be achieved by splitting a single data stream into two and permuting the \(X\) data in one of the streams (see Appendix A.2). Still, the splitting results in inefficient use of data and thus low power, compared to our new direct approach (Figure 1). (ii) Time-varying Independence Testing: Beyond the i.i.d. Setting.A common practice of using a permutation p-value for batch independence testing requires \((X,Y)\)-pairs to be i.i.d. (more generally, exchangeable). If data distribution drifts, the resulting test is no longer valid, and even under mild changes, an inflated false alarm rate is observed empirically. Our tests handle more general non-stationary settings. For a stream of independent data: \((Z_{t})_{t\geq 1}\), where \(Z_{t}\sim P_{XY}^{(t)}\), consider the following pair of hypotheses: \[H_{0} :P_{XY}^{(t)}=P_{X}^{(t)}\times P_{Y}^{(t)},\ \forall t, \tag{2a}\] \[H_{1} :\exists t^{\prime}:P_{XY}^{(t^{\prime})}\neq P_{X}^{(t^{\prime} )}\times P_{Y}^{(t^{\prime})}. \tag{2b}\] Suppose that under \(H_{0}\) in (2a), it holds that either \(P_{X}^{(t-1)}=P_{X}^{(t)}\) or \(P_{Y}^{(t-1)}=P_{Y}^{(t)}\) for each \(t\geq 1\), meaning that either the distribution of \(X\) may change or that of \(Y\) may change, but not both simultaneously. In this case, our tests control the type I error, whereas batch independence tests fail to. Figure 1: Valid sequential independence tests for: \(Y_{t}=X_{t}\beta+\varepsilon_{t}\), \(X_{t},\varepsilon_{t}\sim\mathcal{N}(0,1)\). Batch + \(n\)-step is batch HSIC with Bonferroni correction applied every \(n\) steps (allowing monitoring only at those steps). Seq-MMD refers to the reduction to two-sample testing (Appendix A.2). Our test outperforms other tests. **Example 1**.: Let \(\left((W_{t},V_{t})\right)_{t\geq 1}\) be a sequence of i.i.d. jointly Gaussian random variables with zero mean and covariance matrix with ones on the diagonal and \(\rho\) off the diagonal. For \(t=1,2,\dots\) and \(i\in\{0,1\}\), consider the following stream: \[\begin{cases}X_{2t-i}=2c\sin(t)+W_{2t-1},\\ Y_{2t-i}=3c\sin(t)+V_{2t-1},\end{cases} \tag{3}\] Setting \(\rho=0\) falls into the null case (2a), whereas any \(\rho\neq 0\) implies dependence as per (2b). Visually, it is hard to distinguish between \(H_{0}\) and \(H_{1}\): the drift makes data seem dependent (see Appendix E.1). In Figure 2(a), we show that our test controls type I error, whereas batch test fails1. Footnote 1: This is also related to Yule’s nonsense correlation [8, 33], which would not pose a problem for our method. Related Work.In addition to the aforementioned papers on batch independence testing, our work is also related to methods for "safe, anytime-valid inference", e.g., confidence sequences [32, and references therein] and e-processes [17, 25]. Sequential nonparametric two-sample tests of Balsubramani and Ramdas [1], based on linear-time test statistics and empirical Bernstein inequality for random walks, are amongst the first results in this area. While such tests are valid in the same sense as ours, betting-based tests are much better empirically [30]. The roots of the principle of testing by betting can be traced back to Ville's 1939 doctoral thesis [31] and was recently popularized by Shafer [28]. The latter work considered it mainly in the context of parametric and simple hypotheses, far from our setting. The most closely related works to the current paper are [16, 27, 30] which also handle composite and nonparametric hypotheses. Shekhar and Ramdas [30] use testing by betting to design sequential nonparametric two-sample tests, including a state-of-the-art sequential kernel maximum mean discrepancy test. Two recent works by Grunwald et al. [16], Shaer et al. [27], developed in parallel to the current paper, extend these ideas to the setting of sequential conditional independence tests \((H_{0}:X\perp\!\!\!\perp Y\mid Z)\) under the model-X assumption, i.e., when the distribution \(X\mid Z\) is assumed to be known. Our methods are very different from the aforementioned papers because when \(Z=\emptyset\), the model-X assumption reduces to assuming \(P_{X}\) is known, which we of course avoid. The current paper can be seen as extending the ideas from [30] to nonparametric independence testing. Figure 2: Under distribution drift (3), SKIT controls type I error under \(H_{0}\) and has high power under \(H_{1}\). Batch HSIC fails to control type I error under \(H_{0}\) (hence we do not plot its power). Sequential Kernel Independence Test We begin with a brief summary of the principle of testing by betting [28, 29]. Suppose that one observes a sequence of random variables \(\left(Z_{t}\right)_{t\geq 1}\), where \(Z_{t}\in\mathcal{Z}\). A player begins with initial capital \(\mathcal{K}_{0}=1\). At round \(t\) of the game, she selects a payoff function \(f_{t}:\mathcal{Z}\rightarrow[-1,\infty)\) that satisfies \(\mathbb{E}_{Z\sim P_{Z}}\left[f_{t}(Z)\mid\mathcal{F}_{t-1}\right]=0\) for all \(P_{Z}\in H_{0}\), where \(\mathcal{F}_{t-1}=\sigma(Z_{1},\ldots,Z_{t-1})\), and bets a fraction of her wealth \(\lambda_{t}\mathcal{K}_{t-1}\) for an \(\mathcal{F}_{t-1}\)-measurable \(\lambda_{t}\in[0,1]\). Once \(Z_{t}\) is revealed, her wealth is updated as \[\mathcal{K}_{t}=\mathcal{K}_{t-1}(1+\lambda_{t}f_{t}(Z_{t})). \tag{4}\] A level-\(\alpha\) sequential test is obtained using the following stopping rule: \(\Phi(Z_{1},\ldots,Z_{t})=\mathbb{1}\left\{\mathcal{K}_{t}\geq 1/\alpha\right\}\), i.e., the null is rejected once the player's capital exceeds \(1/\alpha\). If the null is true, imposed constraints on sequences of payoffs \(\left(f_{t}\right)_{t\geq 1}\) and betting fractions \(\left(\lambda_{t}\right)_{t\geq 1}\) prevent the player from making money. Formally, the wealth process \(\left(\mathcal{K}_{t}\right)_{t\geq 0}\) is a nonnegative martingale. The validity of the resulting test then follows from Ville's inequality [31]. To ensure that the resulting test has power under the alternative, payoffs and betting fractions have to be chosen carefully. Inspired by sequential two-sample tests of Shekhar and Ramdas [30], our construction relies on dependence measures: \(m(P_{XY};\mathcal{C})\), which admit a variational representation: \[\sup_{c\in\mathcal{C}}\left[\mathbb{E}_{P_{XY}}c(X,Y)-\mathbb{E}_{P_{X}\times P _{Y}}c(X,Y)\right], \tag{5}\] for some class \(\mathcal{C}\) of bounded functions \(c:\mathcal{X}\times\mathcal{Y}\rightarrow\mathbb{R}\). The supremum above is often achieved at some \(c^{*}\in\mathcal{C}\), and in this case, \(c^{*}\) is called the "witness function". In what follows, we use sufficiently rich functional classes \(\mathcal{C}\) for which the following characteristic condition holds: \[\begin{cases}m(P_{XY};\mathcal{C})=0,&\text{under }H_{0},\\ m(P_{XY};\mathcal{C})>0,&\text{under }H_{1},\end{cases} \tag{6}\] for \(H_{0}\) and \(H_{1}\) defined in (1). To proceed, we bet on _pairs_ of points from \(P_{XY}\). Swapping \(Y\)-components in a pair of points from \(P_{XY}\): \(Z_{2t-1}\) and \(Z_{2t}\), gives two points from \(P_{X}\times P_{Y}\): \(\tilde{Z}_{2t-1}=(X_{2t-1},Y_{2t})\) and \(\tilde{Z}_{2t}=(X_{2t},Y_{2t-1})\). We consider payoffs \(f(Z_{2t-1},Z_{2t})\) of the form: \[s\cdot\left(\left(c(Z_{2t-1})+c(Z_{2t})\right)-(c(\tilde{Z}_{2t-1})-c(\tilde{Z}_ {2t}))\right), \tag{7}\] where the scaling factor \(s>0\) ensures that \(f(z,z^{\prime})\in[-1,1]\) for any \(z,z^{\prime}\in\mathcal{X}\times\mathcal{Y}\). When the witness function \(c^{*}\) is used in the above, we denote the resulting function as the "oracle payoff" \(f^{*}\). Let the oracle wealth process \(\left(\mathcal{K}^{*}_{t}\right)_{t\geq 0}\) be defined by using \(f^{*}\) along with the betting fraction \[\lambda^{*}=\frac{\mathbb{E}\left[f^{*}(Z_{1},Z_{2})\right]}{\mathbb{E}\left[ f^{*}(Z_{1},Z_{2})\right]+\mathbb{E}\left[(f^{*}(Z_{1},Z_{2}))^{2}\right]}. \tag{8}\] We have the following result regarding the above quantities, whose proof is presented in Appendix B.2.2. **Theorem 1**.: _Let \(\mathcal{C}\) denote a class of functions \(c:\mathcal{X}\times\mathcal{Y}\rightarrow\mathbb{R}\) for measuring dependence as per (5)._ 1. _Under_ \(H_{0}\) _in (_1a_) and (_2a_), any payoff_ \(f\) _of the form (_7_) satisfies_ \(\mathbb{E}_{H_{0}}\left[f(Z_{1},Z_{2})\right]=0\)_._ 2. _Suppose that_ \(\mathcal{C}\) _satisfies (_6_). Under_ \(H_{1}\) _in (_1b_), the oracle payoff_ \(f^{*}\) _based on the witness function_ \(c^{*}\) _satisfies_ \(\mathbb{E}_{H_{1}}\left[f^{\star}(Z_{1},Z_{2})\right]>0\)_. Further, for_ \(\lambda^{\star}\) _defined in (_8_), it holds that_ \(\mathbb{E}_{H_{1}}\left[\log(1+\lambda^{\star}f^{\star}(Z_{1},Z_{2})\right]>0\)_. Hence,_ \(\mathcal{K}^{*}_{t}\stackrel{{\text{\tiny{\rm max}}}}{{\longrightarrow }}+\infty\)_, which implies that the oracle test is consistent:_ \(\mathbb{P}_{H_{1}}(\tau^{\star}<\infty)=1\)_, where_ \(\tau^{*}=\inf\left\{t\geq 1:\mathcal{K}^{*}_{t}\geq 1/\alpha\right\}\)_._ _Remark 1_.: While the betting fraction (8) suffices to guarantee the consistency of the corresponding test, the fastest growth rate of the wealth process is ensured by considering \[\lambda^{\star}_{\mathrm{K}}\in\operatorname*{arg\,max}_{\lambda\in(0,1)} \mathbb{E}\left[\log(1+\lambda f^{\star}(Z_{1},Z_{2})\right].\] _Overshooting with the betting fraction may, however, result in the wealth tending to zero almost surely._ **Example 2**.: Consider a sequence \(\left(W_{t}\right)_{t\geq 1}\), where \[W_{t}=\begin{cases}1,&\text{with probability }3/5,\\ -1,&\text{with probability }2/5.\end{cases}\] In this case, we have \(\lambda_{\text{K}}^{\star}=1/5\) and \(\mathbb{E}\left[\log(1+\lambda^{\star}W_{t})\right]>0\), implying that \(\mathcal{K}_{t}\overset{\text{a.s.}}{\rightarrow}+\infty\). On the other hand, it is easy to check that for \(\tilde{\lambda}=2\lambda_{\text{K}}^{\star}\) we have: \(\mathbb{E}[\log(1+\tilde{\lambda}W_{t})]<0\). As a consequence, for the wealth process \(\mathcal{K}_{t}\) corresponding to the pair \((f^{\star},\tilde{\lambda})\) it holds that \(\mathcal{K}_{t}\overset{\text{a.s.}}{\rightarrow}0\). To construct a practical test, we select an appropriate class \(\mathcal{C}\) for which the condition (6) holds and replace the oracle \(f^{\star}\) and \(\lambda^{\star}\) with predictable estimates \(\left(f_{t}\right)_{t\geq 1}\) and \(\left(\lambda_{t}\right)_{t\geq 1}\), meaning that those are computed using data observed prior to a given round of the game. We begin with a particular dependence measure, namely HSIC [13], and defer extensions to other measures to Section 3. HSIC-based Sequential Kernel Independence Test (SKIT).Let \(\mathcal{G}\) be a separable RKHS2 with positive-definite kernel \(k(\cdot,\cdot)\) and feature map \(\varphi(\cdot)\) on \(\mathcal{X}\). Let \(\mathcal{H}\) be a separable RKHS with positive-definite kernel \(l(\cdot,\cdot)\) and feature map \(\psi(\cdot)\) on \(\mathcal{Y}\). Footnote 2: Recall that an RKHS is a Hilbert space \(\mathcal{G}\) of real-valued functions over \(\mathcal{X}\), for which the evaluation functional \(\delta_{x}:\mathcal{G}\rightarrow\mathbb{R}\), which maps \(g\in\mathcal{G}\) to \(g(x)\), is a continuous map, and this fact must hold for every \(x\in\mathcal{X}\). Each RKHS is associated with a unique positive-definite kernel \(k:\mathcal{X}\times\mathcal{X}\rightarrow\mathbb{R}\), which can be viewed as a generalized inner product on \(\mathcal{X}\). We refer the reader to [23] for an extensive recent survey of kernel methods. **Assumption 1**.: Suppose that: 1. [label=(A0)] 2. Kernels \(k\) and \(l\) are nonnegative and bounded by one: \(\sup_{x\in\mathcal{X}}k(x,x)\leq 1\) and \(\sup_{y\in\mathcal{Y}}l(y,y)\leq 1\). 3. The product kernel \(k\otimes l:(\mathcal{X}\times\mathcal{Y})^{2}\rightarrow\mathbb{R}\), defined as \((k\otimes l)((x,y),(x^{\prime},y^{\prime})):=k(x,x^{\prime})l(y,y^{\prime})\), is a characteristic kernel on the joint domain. Assumption (A1) is used to justify that the mean embeddings introduced later are well-defined elements of RKHSs, and the particular bounds are used to simplify the constants. Assumption (A2) is a sufficient condition for the characteristic condition (6) to hold [11], and we use it to argue about the consistency of our test. Under mild assumptions, it can be further relaxed to characteristic property of the kernels on the respective domains [12]. We note that the most common kernels on \(\mathbb{R}^{d}\): Gaussian (RBF) and Laplace, satisfy both (A1) and (A2). Define mean embeddings of the joint and marginal distributions: \[\begin{split}\mu_{XY}&:=\mathbb{E}_{P_{XY}}\left[ \varphi(X)\otimes\psi(Y)\right],\\ \mu_{X}&:=\mathbb{E}_{P_{X}}\left[\varphi(X)\right], \quad\mu_{Y}:=\mathbb{E}_{P_{Y}}\left[\psi(Y)\right].\end{split} \tag{9}\] The cross-covariance operator \(C_{XY}:\mathcal{H}\rightarrow\mathcal{G}\) associated with the joint measure \(P_{XY}\) is defined as \[C_{XY}:=\mu_{XY}-\mu_{X}\otimes\mu_{Y},\] where \(\otimes\) is the outer product operation. This operator generalizes the covariance matrix. _Hilbert-Schmidt independence criterion_ (HSIC) is a criterion defined as Hilbert-Schmidt norm, a generalization of Frobenius norm for matrices, of the cross-covariance operator [13]: \[\text{HSIC}(P_{XY};\mathcal{G},\mathcal{H}):=\left\|C_{XY}\right\|_{\text{HS} }^{2}. \tag{10}\] HSIC is the squared kernel maximum mean discrepancy (MMD) between mean embeddings of \(P_{XY}\) and \(P_{X}\times P_{Y}\) in the _product RKHS_\(\mathcal{G}\otimes\mathcal{H}\) on \(\mathcal{X}\times\mathcal{Y}\), defined by a product kernel \(k\otimes l\). We can rewrite (10) as \[\bigg{(}\sup_{\begin{subarray}{c}g\in\mathcal{G}\otimes\mathcal{H}\\ \|g\|_{\otimes\mathcal{H}}\leq 1\end{subarray}}\mathbb{E}_{P_{XY}}\left[g(X,Y) \right]-\mathbb{E}_{P_{X}\times P_{Y}}\left[g(X^{\prime},Y^{\prime})\right] \bigg{)}^{2},\]which matches the form (5). The witness function for HSIC admits a closed form (see Appendix D): \[g^{\star}=\frac{\mu_{XY}-\mu_{X}\otimes\mu_{Y}}{\left\|\mu_{XY}-\mu_{X}\otimes\mu_ {Y}\right\|_{\mathcal{G}\otimes\mathcal{H}}}, \tag{11}\] where \(\mu_{XY}\), \(\mu_{X}\) and \(\mu_{Y}\) are defined in (9). The oracle payoff based on HSIC: \(f^{\star}(Z_{2t-1},Z_{2t})\), is given by \[\frac{1}{2}\left(g^{\star}(Z_{2t-1})+g^{\star}(Z_{2t})-g^{\star}(\tilde{Z}_{2t -1})-g^{\star}(\tilde{Z}_{2t})\right), \tag{12}\] which has the form (7) with \(s=1/2\). To construct the test, we use estimators \(\left(f_{t}\right)_{t\geq 1}\) of the oracle payoff \(f^{\star}\) obtained by replacing \(g^{\star}\) in (12) with the plug-in estimator: \[\hat{g}_{t}=\frac{\hat{\mu}_{XY}-\hat{\mu}_{X}\otimes\hat{\mu}_{Y}}{\left\| \hat{\mu}_{XY}-\hat{\mu}_{X}\otimes\hat{\mu}_{Y}\right\|_{\mathcal{G}\otimes \mathcal{H}}}, \tag{13}\] where \(\hat{\mu}_{XY},\hat{\mu}_{X},\hat{\mu}_{Y}\) denote the empirical mean embeddings, computed at round \(t\) as3 Footnote 3: At round \(t\), evaluating HSIC-based payoff requires a number of operations that is linear in \(t\) (see Appendix F.2). Thus after \(T\) steps, we have expended a total of \(O(T^{2})\) computation, the same as batch HSIC. However, our test threshold is \(1/\alpha\), but batch HSIC requires permutations to determine the right threshold, requiring recomputing HSIC hundreds of times. Thus, our test is actually more computationally feasible than batch HSIC. \[\begin{array}{l}\hat{\mu}_{XY}=\frac{1}{2(t-1)}\sum_{i=1}^{2(t-1)}\varphi(X_ {i})\otimes\psi(Y_{i}),\\ \hat{\mu}_{X}=\frac{1}{2(t-1)}\sum_{i=1}^{2(t-1)}\varphi(X_{i}),\quad\hat{\mu}_ {Y}=\frac{1}{2(t-1)}\sum_{i=1}^{2(t-1)}\psi(Y_{i}).\end{array} \tag{14}\] Note that in (13) the witness function is defined as an operator. We clarify this point in Appendix D. To select betting fractions, we follow Cutkosky and Orabona [6] who state the problem of choosing the optimal betting fraction for coin betting as an online optimization problem with exp-concave losses and propose a strategy based on online Newton step (ONS) [18] as a solution. ONS betting fractions are inexpensive to compute while being supported by strong theoretical guarantees. We also consider other strategies for selecting betting fractions and defer a detailed discussion to Appendix C. We conclude with formal guarantees on time-uniform type I error control and consistency of HSIC-based SKIT. In fact, we establish a stronger result: we show that the wealth process grows exponentially and characterize the rate of the growth of wealth in terms of the true HSIC score. The proof is deferred to Appendix B.2.2. ``` Input: sequence of payoffs \(\left(f_{t}(Z_{2t-1},Z_{2t})\right)_{t\geq 1}\), \(\lambda_{1}^{\text{ONS}}=0\), \(a_{0}=1\). for\(t=1,2,\ldots\)do Observe \(f_{t}(Z_{2t-1},Z_{2t})\); Set \(z_{t}=f_{t}(Z_{2t-1},Z_{2t})/(1-\lambda_{t}^{\text{ONS}}f_{t}(Z_{2t-1},Z_{2t}))\); Set \(a_{t}=a_{t-1}+z_{t}^{2}\); Set \(\lambda_{t+1}^{\text{ONS}}:=\frac{1}{2}\wedge\left(0\vee\left(\lambda_{t}^{ \text{ONS}}-\frac{2}{2-\log 3}\cdot\frac{z_{t}}{a_{t}}\right)\right)\); ``` **Algorithm 1** Online Newton step (ONS) strategy for selecting betting fractions **Theorem 2**.: _Suppose that Assumption 1 is satisfied. The following claims hold for HSIC-based SKIT (Algorithm 2):_ 1. _Under_ \(H_{0}\) _in (_1a_) or (_2a_), SKIT ever stops with probability at most_ \(\alpha\)_:_ \(\mathbb{P}_{H_{0}}\left(\tau<\infty\right)\leq\alpha\)_._ 2. _Suppose that_ \(H_{1}\) _in (_1b_) is true. Then it holds that_ \(\mathcal{K}_{t}\)_a.s._\(\longrightarrow+\infty\) _and thus SKIT is consistent:_ \(\mathbb{P}_{H_{1}}(\tau<\infty)=1\)_. Further, the wealth grows exponentially, and the corresponding growth rate satisfies_ \[\liminf_{t\rightarrow\infty}\frac{\log\mathcal{K}_{t}}{t}\overset{\text{a.s. }}{\geq}\frac{\mathbb{E}[f^{\star}(Z_{1},Z_{2})]}{4}\cdot\left(\frac{\mathbb{E }[f^{\star}(Z_{1},Z_{2})]}{\mathbb{E}[(f^{\star}(Z_{1},Z_{2}))^{2}]}\wedge 1 \right),\] (15) _where_ \(f^{\star}\) _is the oracle payoff defined in (_12_)._Since \(\mathbb{E}\left[f^{\star}(Z_{1},Z_{2})\right]=\sqrt{\mathrm{HSIC}(P_{XY};\mathcal{G },\mathcal{H})}\) and \(\mathbb{E}\left[(f^{\star}(Z_{1},Z_{2}))^{2}\right]\leq 1\), Theorem 2 implies that: \[\liminf_{t\to\infty}\left(\tfrac{1}{t}\log\mathcal{K}_{t}\right)\stackrel{{ \mathrm{a.s.}}}{{\geq}}\tfrac{1}{4}\cdot\mathrm{HSIC}(P_{XY};\mathcal{G}, \mathcal{H}).\] However, the lower bound (15) is never worse. Further, if the variance of the oracle payoffs: \(\sigma^{2}=\mathbb{V}\left[f^{\star}(Z_{1},Z_{2})\right]\), is small, i.e., \(\sigma^{2}\leq\mathbb{E}\left[f^{\star}(Z_{1},Z_{2})\right](1-\mathbb{E}\left[ f^{\star}(Z_{1},Z_{2})\right])\), we get a faster rate: \(\sqrt{\mathrm{HSIC}(P_{XY};\mathcal{G},\mathcal{H})}/4\), reminiscent of an empirical Bernstein type adaptation. Up to some small constants, we show that this is the best possible exponent that adapts automatically between the low- and high-variance regimes. We do this by considering the oracle test, i.e., assuming that the oracle HSIC payoff \(f^{\star}\) is known. Amongst the betting fractions that are constrained to lie in \([-0.5,0.5]\), like ONS bets, the optimal growth rate is ensured by taking \[\lambda^{\star}=\operatorname*{arg\,max}_{\lambda\in[-0.5,0.5]}\mathbb{E} \left[\log(1+\lambda f^{\star}(Z_{1},Z_{2}))\right]. \tag{16}\] We have the following result about the growth rate of the oracle test, whose proof is deferred to Appendix B.2.2. **Proposition 1**.: _The optimal log-wealth \(S^{\star}:=\mathbb{E}\left[\log(1+\lambda^{\star}f^{\star}(Z_{1},Z_{2}))\right]\) -- that can be achieved by an oracle betting scheme (16) which knows \(f^{\star}\) from (12) and the underlying distribution -- satisfies:_ \[S^{\star}\leq\frac{\mathbb{E}\left[f^{\star}(Z_{1},Z_{2})\right]}{2}\left( \frac{8\mathbb{E}\left[f^{\star}(Z_{1},Z_{2})\right]}{3\mathbb{E}\left[(f^{ \star}(Z_{1},Z_{2}))^{2}\right]}\wedge 1\right). \tag{17}\] _Remark 2_ (Minibatching).: While our test processes the data stream in pairs, it is possible to use larger batches of points from the joint distribution \(P_{XY}\). For a batch size is \(b\geq 2\), at round \(t\), the bet is placed on \(\left\{(X_{b(t-1)+1},Y_{b(t-1)+1}),\ldots,(X_{bt},Y_{bt})\right\}\). In this case, the empirical mean embeddings are computed analogous to (14) but using \(\left\{(X_{i},Y_{i})\right\}_{i\leq b(t-1)}\). We defer the details to Appendix D. Such payoff function satisfies the necessary conditions for the wealth process to be a nonnegative martingale, and hence, the resulting sequential test has time-uniform type I error control. The same argument as in the proof of Theorem 2 can be used to show that the resulting test is consistent. The main downside of minibatching is that monitoring of the test (and hence, optional stopping) is allowed only after processing every \(b\) points from \(P_{XY}\). Distribution Drift.As discussed in Section 1, batch independence tests have an inflated false alarm rate even under mild changes in distribution. In contrast, SKIT remains valid even when the data distribution drifts over time. For a stream of independent points, we claimed that our test controls the type I error as long as only one of the marginal distributions changes at each round. In Appendix D, we provide an example that shows that this assumption is necessary for the validity of our tests. Our tests can also be used to test instantaneous independence between two streams. Formally, define \(\mathcal{D}_{t}:=\left\{(X_{i},Y_{i})\right\}_{i\leq 2t}\) and consider: \[H_{0}:\forall t,\ X_{2t-1}\perp\!\!\!\perp Y_{2t-1}\mid \mathcal{D}_{t-1}\text{ and }X_{2t}\perp\!\!\!\perp Y_{2t}\mid\mathcal{D}_{t-1}, \tag{18a}\] \[H_{1}:\exists t^{\prime}:X_{2t^{\prime}-1}\not\!\!\perp Y_{2t^{ \prime}-1}\mid\mathcal{D}_{t-1}\text{ or }X_{2t^{\prime}}\not\!\!\perp Y_{2t^{ \prime}}\mid\mathcal{D}_{t-1}. \tag{18b}\] **Assumption 2**.: Suppose that under \(H_{0}\) in (18a), it also holds that:1. The cross-links between \(X\) and \(Y\) streams are not allowed, meaning that for all \(t\geq 1\), \[\begin{array}{c}Y_{t}\perp\!\!\!\perp X_{t-1}\mid Y_{t-1},\{(X_{i},Y_{i}) \}_{i\leq t-2},\\ X_{t}\perp\!\!\!\perp Y_{t-1}\mid X_{t-1},\{(X_{i},Y_{i})\}_{i\leq t-2}.\end{array}\] (19) 2. For all \(t\geq 1\), either \((X_{t},X_{t-1})\) or \((Y_{t},Y_{t-1})\) are exchangeable conditional on \(\{(X_{i},Y_{i})\}_{i\leq t-2}\). In the above, (a) relaxes the independence assumption within each pair, and (b) generalizes the assumption about allowed changes in the marginal distributions of \(X\) and \(Y\). Under the above setting, we deduce that our test retains type-1 error control, and the proof is deferred to Appendix B.2.2. **Theorem 3**.: _Suppose that \(H_{0}\) in (18a) is true. Further, assume that Assumption 2 holds. Then HSIC-based SKIT (Algorithm 2) satisfies: \(\mathbb{P}_{H_{0}}\left(\tau<\infty\right)\leq\alpha\)._ Chwialkowski and Gretton [4] considered a related (at a high level) problem of testing instantaneous independence between a pair of time series. Similar to distribution drift, HSIC fails to test independence between innovations in time series since naively permuting one series destroys the underlying structure. Chwialkowski and Gretton [4] used a subset of permutations -- rotations by circular shifting (allowed by their assumption of strict stationarity) of one series for preserving the structure -- to design a p-value and used the assumption of mixing (decreasing memory of a process) to justify the asymptotic validity. The setting we consider is very different, and we make no assumptions of mixing or stationarity anywhere. Related works on independence testing for time series also include [2, 5]. ## 3 Alternative Dependence Measures Let \(\mathcal{C}_{1}\) and \(\mathcal{C}_{2}\) denote some classes of bounded functions \(c_{1}:\mathcal{X}\rightarrow\mathbb{R}\) and \(c_{2}:\mathcal{Y}\rightarrow\mathbb{R}\) respectively. For a class \(\mathcal{C}\) of functions \(c:\mathcal{X}\times\mathcal{Y}\rightarrow\mathbb{R}\) that factorize into the product: \(c(x,y)=c_{1}(x)c_{2}(y)\) for some \(c_{1}\in\mathcal{C}_{1}\) and \(c_{2}\in\mathcal{C}_{2}\), the general form of dependence measures (5) reduces to \[m(P_{XY};\mathcal{C}_{1},\mathcal{C}_{2})=\sup_{c_{1}\in\mathcal{C}_{1},c_{2} \in\mathcal{C}_{2}}\text{Cov}\left(c_{1}(X),c_{2}(Y)\right).\] Next, we develop SKITs based on two dependence measures of this form: COCO and KCC. While the corresponding witness functions do not admit a closed form, efficient algorithms for computing the plug-in estimates are available. Witness Functions for COCO._Constrained covariance_ (COCO) is a criterion for measuring dependence based on covariance between smooth functions of random variables: \[\sup_{\begin{subarray}{c}g,h:\\ \|g\|_{\mathcal{G}}\leq 1,\|h\|_{\mathcal{H}}\leq 1\end{subarray}}\text{Cov} \left(g(X),h(Y)\right)=\sup_{\begin{subarray}{c}g,h:\\ \|g\|_{\mathcal{G}}\leq 1,\|h\|_{\mathcal{H}}\leq 1\end{subarray}} \langle g,C_{XY}h\rangle_{\mathcal{G}}, \tag{20}\] where the supremum is taken over the unit balls in the respective RKHSs [14, 15]. At round \(t\), we are interested in empirical witness functions computed from \(\{(X_{i},Y_{i})\}_{i\leq 2(t-1)}\). The key observation is that maximizing the objective function in (20) with the plug-in estimator of the cross-covariance operator requires considering only functions in \(\mathcal{G}\) and \(\mathcal{H}\) that lie in the span of the data: \[\begin{split}\hat{g}_{t}&=\sum_{i=1}^{2(t-1)}\alpha _{i}\bigg{(}\varphi(X_{i})-\frac{1}{2(t-1)}\sum_{j=1}^{2(t-1)}\varphi(X_{j}) \bigg{)},\\ \hat{h}_{t}&=\sum_{i=1}^{2(t-1)}\beta_{i}\bigg{(} \psi(Y_{i})-\frac{1}{2(t-1)}\sum_{j=1}^{2(t-1)}\psi(Y_{j})\bigg{)}.\end{split} \tag{21}\] Coefficients \(\alpha\) and \(\beta\) that solve the maximization problem (20) define the leading eigenvector of the following generalized eigenvalue problem (see Appendix D): \[\begin{pmatrix}0&\frac{1}{2(t-1)}\tilde{K}\tilde{L}\\ \frac{1}{2(t-1)}\tilde{L}\tilde{K}&0\end{pmatrix}\begin{pmatrix}\alpha\\ \beta\end{pmatrix}=\gamma\begin{pmatrix}\tilde{K}&0\\ 0&\tilde{L}\end{pmatrix}\begin{pmatrix}\alpha\\ \beta\end{pmatrix}, \tag{22}\]where \(\tilde{K}=HKH\), \(\tilde{L}=HLH\), and \(H=\mathbf{I}_{2(t-1)}-(1/(2(t-1))\mathbf{1}\mathbf{1}^{\top}\) is centering projection matrix. Computing the leading eigenvector for (22) is computationally demanding for moderately large \(t\). A common practice is to use low-rank approximations of \(K\) and \(L\) with fast-decaying spectrum [20]. We present an approach based on incomplete Cholesky decomposition in Appendix F.1. Witness Functions for KCC._Kernelized canonical correlation_ (KCC) relies on the regularized correlation between smooth functions of random variables: \[\sup_{\begin{subarray}{c}g\in\mathcal{G},\\ h\in\mathcal{H}\end{subarray}}\frac{\operatorname{Cov}\left(g(X),h(Y)\right)}{ \sqrt{\mathbb{V}\left[g(X)\right]+\kappa_{1}\left\lVert g\right\rVert_{\mathcal{ G}}^{2}}\cdot\sqrt{\mathbb{V}\left[h(Y)\right]+\kappa_{2}\left\lVert h \right\rVert_{\mathcal{H}}^{2}}}, \tag{23}\] where regularization is necessary for obtaining meaningful estimates of correlation [10, 20]. Witness functions for KCC have the same form as for COCO (21), but \(\alpha\) and \(\beta\) define the leading eigenvector of a modified problem (Appendix D). SKIT based on COCO or KCC.Given a pair of the witness functions \(g^{\star}\) and \(h^{\star}\) for COCO (or KCC) criterion, the corresponding oracle payoff: \(f^{\star}(Z_{2t-1},Z_{2t})\), is given by \[\frac{1}{2}\left(g^{\star}(X_{2t})-g^{\star}(X_{2t-1})\right)\left(h^{\star}(Y _{2t})-h^{\star}(Y_{2t-1})\right), \tag{24}\] which has the form (7) with \(s=1/2\). To construct the test, we rely on estimates \((f_{t})_{t\geq 1}\) of the oracle payoff \(f^{\star}\) obtained by using \(\hat{g}_{t}\) and \(\hat{h}_{t}\), defined in (21), in (24). We assume that \(\alpha\) and \(\beta\) in (22) are normalized: \(\alpha^{\top}\tilde{K}\alpha=1\) and \(\beta^{\top}\tilde{L}\beta=1\). We conclude with a guarantee on time-uniform false alarm rate control of SKITs based on COCO (Algorithm 3), whose proof is deferred to Appendix B.3. ``` Input: significance level \(\alpha\in(0,1)\), data stream \((Z_{i})_{i\geq 1}\), where \(Z_{i}=(X_{i},Y_{i})\sim P_{XY}\), \(\lambda_{1}^{\text{ONS}}=0\). for\(t=1,2,\ldots\)do Use \(Z_{1},\ldots,Z_{2(t-1)}\) to compute \(\hat{g}_{t}\) and \(\hat{h}_{t}\) as in (21); Compute COCO payoff \(f_{t}(Z_{2t-1},Z_{2t})\); Update the wealth process \(\mathcal{K}_{t}\) as in (4); if\(\mathcal{K}_{t}\geq 1/\alpha\)then Reject \(H_{0}\) and stop; else Compute \(\lambda_{t+1}^{\text{ONS}}\) (Algorithm 1); ``` **Algorithm 3** SKIT based on COCO (or KCC) **Theorem 4**.: _Suppose that (A1) in Assumption 1 is satisfied. Then, under \(H_{0}\) in (1a) and (18a), COCO/KCC-based SKIT (Algorithm 3) satisfies: \(\mathbb{P}_{H_{0}}\left(\tau<\infty\right)\leq\alpha\)._ _Remark 3_.: The above result does not contain a claim regarding the consistency of the corresponding tests. If (A2) in Assumption 1 holds, the same argument as in the proof of Theorem 2 can be used to deduce that SKITs based on the _oracle_ payoffs (with oracle witness functions \(g^{\star}\) and \(h^{\star}\)) are consistent. In contrast to HSIC, for which the oracle witness function is closed-form and the respective plug-in estimator is amenable for the analysis, to argue about the consistency of SKITs based on COCO/KCC, it is necessary to place additional assumptions, especially since low-rank approximations of kernel matrices are involved. We note that a sufficient condition for consistency is that the payoffs are positive on average: \(\liminf_{t\rightarrow\infty}\frac{1}{t}\sum_{i=1}^{t}f_{i}(Z_{2i-1},Z_{2i}) \overset{\text{a.s.}}{>}0\). Synthetic Experiments.To compare SKITs based on HSIC, COCO, and KCC payoffs, we use RBF kernel with hyperparameters taken to be inversely proportional to the second moment of the underlying variables; we observed no substantial difference when such selection is data-driven (median heuristic). We consider settings where the complexity of a task is controlled through a single univariate parameter:1. _Gaussian model._ For \(t\geq 1\), we consider \(Y_{t}=X_{t}\beta+\varepsilon_{t}\), where \(X_{t},\varepsilon_{t}\sim\mathcal{N}(0,1)\). We have that \(\beta\neq 0\) implies nonzero linear correlation (hence dependence). We consider 20 values for \(\beta\), spaced uniformly in [0,0.3], and use \(\lambda_{X}=1/4\) and \(\lambda_{Y}=1/(4(1+\beta^{2}))\) as kernel hyperparameters. 2. _Spherical model._ We generate a sequence of dependent but linearly uncorrelated random variables by taking \((X_{t},Y_{t})=((U_{t})_{(1)},(U_{t})_{(2)})\), where \(U_{t}\stackrel{{\text{iid}}}{{\sim}}\text{Unif}(\mathbb{S}^{d})\), for \(t\geq 1\). \(\mathbb{S}^{d}\) denotes a unit sphere in \(\mathbb{R}^{d}\) and \(u_{(i)}\) is the \(i\)-th coordinate of \(u\). We consider \(d\in\{3,\dots,15\}\), and use \(\lambda_{X}=\lambda_{Y}=d/4\) as kernel hyperparameters. We stop monitoring after 20000 points from \(P_{XY}\) (if SKIT does not stop by that time, we retain the null) and aggregate the results over 200 runs for each value of \(\beta\) and \(d\). In Figure 3, we confirm that SKITs control the type I error and adapt to the complexity of a task. In settings with a very low signal-to-noise ratio (small \(\beta\) or large \(d\)), SKIT's power drops, but in such cases, both sequential and batch independence tests inevitably require a lot of data to reject the null. We defer additional experiments to Appendix E.4. ## 4 Symmetry-based Betting Strategies In this section, we develop a betting strategy that relies on symmetry properties, whose advantage is that it overcomes the kernel boundedness assumption that underlined the SKIT construction. For example, using this betting strategy with a linear kernel: \(k(x,y)=l(x,y)=\langle x,y\rangle\) readily implies a valid sequential linear correlation test. Consider \[W_{t}=\hat{g}_{t}(Z_{2t-1})+\hat{g}_{t}(Z_{2t})-\hat{g}_{t}(\tilde{Z}_{2t-1}) -\hat{g}_{t}(\tilde{Z}_{2t}), \tag{25}\] where \(\hat{g}_{t}=\hat{\mu}_{XY}-\hat{\mu}_{X}\otimes\hat{\mu}_{Y}\) is the _unnormalized_ plug-in witness function computed from \(\left\{Z_{i}\right\}_{i\leq 2(t-1)}\). Symmetry-based betting strategies rely on the following key fact. **Proposition 2**.: _Under any distribution in \(H_{0}\), \(W_{t}\) is symmetric around zero, conditional on \(\mathcal{F}_{t-1}\)._ By construction, we expect the sign and magnitude of \(W_{t}\) to be positively correlated under the alternative. We consider three payoff functions that aim to exploit this fact. 1. _Composition with an odd function._ This approach is based on the idea from sequential symmetry testing [24] that composition with an odd function of a symmetric around zero random variable is Figure 3: Rejection rate and scaled sample size used to reject the null hypothesis for synthetic data. Inspecting the rejection rate for \(\beta=0\) (independence holds) confirms that the type I error is controlled. Further, we confirm that SKITs are adaptive to the complexity (smaller \(\beta\) and larger \(d\) correspond to harder settings). mean-zero. Absent knowledge regarding the scale of considered random variables, it is natural to standardize \(\left\{W_{i}\right\}_{i\geq 1}\) in a predictable way. We consider \[f_{t}^{\text{odd}}(W_{t})=\tanh{(W_{t}/N_{t-1})},\] (26) where \(N_{t}=\mathbf{Q}_{0.9}(\left\{\left|W_{i}\right|\right\}_{i\leq t})-\mathbf{Q }_{0.1}(\left\{\left|W_{i}\right|\right\}_{i\leq t})\), and \(\mathbf{Q}_{\alpha}(\left\{\left|W_{i}\right|\right\}_{i\leq t})\) is the \(\alpha\)-quantile of the empirical distribution of the absolute values of \(\left\{W_{i}\right\}_{i\leq t}\). (The choices of \(0.1\) and \(0.9\) are heuristic, and can be replaced by other constants without violating the validity of the test.) The composition approach has demonstrated promising empirical performance for the betting-based two-sample tests of Shekhar and Ramdas [30] and conditional independence tests of Shaer et al. [27]. 2. _Rank-based approach._ Inspired by sequential signed-rank test of symmetry around zero of Reynolds Jr. [26], we consider the following payoff function: \[f_{t}^{\text{rank}}(W_{t})=\text{sign}(W_{t})\cdot\frac{\text{rk}(\left|W_{t} \right|)}{t},\] (27) where \(\text{rk}(\left|W_{t}\right|)=\sum_{i=1}^{t}\mathbb{1}\left\{\left|W_{i} \right|\leq\left|W_{t}\right|\right\}\). 3. _Predictive approach._ At round \(t\), we fit a probabilistic predictor \(p_{t}:\mathbb{R}_{+}\rightarrow\left[0,1\right]\), e.g., logistic regression, using \(\left\{\left|W_{i}\right|,\text{sign}\left(W_{i}\right)\right\}_{i\leq t-1}\) as feature-label pairs. We consider the following payoff function: \[f_{t}^{\text{pred}}(W_{t})=\left(2p_{t}(\left|W_{t}\right|)-1\right)_{+}\cdot \left(1-2\ell_{t}(W_{t})\right),\] (28) where \(\left(\cdot\right)_{+}=\max{\left\{\cdot,0\right\}}\) and \(\ell_{t}(\left|W_{t}\right|,\text{sign}\left(W_{t}\right))\) is the misclassification loss of the predictor \(p_{t}\). Next, we show that symmetry-based SKITs are valid; the proof is deferred to Appendix B.4. ``` Input: significance level \(\alpha\in(0,1)\), data stream \((Z_{i})_{i\geq 1}\), where \(Z_{i}=(X_{i},Y_{i})\sim P_{XY}\), \(\lambda_{1}^{\text{ONS}}=0\). for\(t=1,2,\ldots\)do After observing \(Z_{2t-1},Z_{2t}\), compute \(W_{t}\) as in (25) and \(f_{t}^{\text{odd}}(W_{t})\) as in (26); Update the wealth process \(\mathcal{K}_{t}\) as in (4); if\(\mathcal{K}_{t}\geq 1/\alpha\)then Reject \(H_{0}\) and stop; else Compute \(\lambda_{t+1}^{\text{ONS}}\) (Algorithm 1); ``` **Algorithm 4** SKIT with symmetry-based betting **Theorem 5**.: _Under \(H_{0}\) in (1a) or (18a), the symmetry-based SKIT (Algorithm 4) satisfies: \(\mathbb{P}_{H_{0}}\left(\tau<\infty\right)\leq\alpha\)._ Synthetic Experiments.To compare the symmetry-based payoffs, we consider the Gaussian model along with aGRAPA betting fractions. For visualization purposes, we complete monitoring after observing 2000 points from the joint distribution. In Figure 4(a), we observe that the resulting SKITs demonstrate similar performance. In Figure 4(b), we demonstrate that SKIT with a linear kernel has high power under the Gaussian model, whereas its false alarm rate does not exceed \(\alpha\) under the spherical model. Additional synthetic experiments can be found in Appendix E.3. Real Data Experiments.We analyze average daily temperatures4 in four European cities: London, Amsterdam, Zurich, and Nice, from January 1, 2017, to May 31, 2022. The processes underlying temperature formation are complex and act both on macro (e.g., solar phase) and micro (e.g., local winds) levels. While average daily temperatures in selected cities share similar cyclic patterns, one may still expect the temperature fluctuations occurring in nearby locations to be dependent. We use SKIT for testing instantaneous independence (as per (18)) between fluctuations (assuming that the conditions that underlie our test hold). We run SKIT with the rank-based payoff and ONS betting fractions for each pair of cities using \(6/\alpha\) as a rejection threshold (accounting for multiple testing). We select the kernel hyperparameters via the median heuristic using recordings for the first 20 days. In Figure 5, we illustrate that SKIT supports our conjecture that temperature fluctuations are dependent in nearby locations. We also run this experiment for four cities in South Africa (see Appendix E.5). In addition, we analyze the performance of SKIT on MNIST data; the details are deferred to Appendix E.6. ## 5 Conclusion A key advantage of sequential tests is that they can be continuously monitored, allowing an analyst to adaptively decide whether to stop and reject the null hypothesis or to continue collecting data, without Figure 4: (a) SKITs with symmetry-based payoffs have high power under the Gaussian model. (b) SKIT with linear kernel has high power under the Gaussian model (\(X\) and \(Y\) are linearly correlated for \(\beta\neq 0\)), and its false alarm rate is controlled under the spherical model (\(X\) and \(Y\) are linearly uncorrelated but dependent). Figure 5: Solid lines connect cities for which the null is rejected. SKIT supports the conjecture regarding dependent temperature fluctuations in nearby locations. inflating the false positive rate. In this paper, we design consistent sequential kernel independence tests (SKITs) following the principle of testing by betting. SKITs are also valid beyond the i.i.d. setting, allowing the data distribution to drift over time. Experiments on synthetic and real data confirm the power of SKITs. Acknowledgements.The authors thank Ian Waudby-Smith, Tudor Manole, and the anonymous reviewers for constructive feedback. The authors also acknowledge Lucas Janson and Will Hartog for thoughtful questions and comments at the International Seminar for Selective Inference. ## References * [1] Akshay Balsubramani and Aaditya Ramdas. Sequential nonparametric testing with the law of the iterated logarithm. In _Conference on Uncertainty in Artificial Intelligence_, 2016. * [2] Michel Besserve, Nikos K Logothetis, and Bernhard Scholkopf. Statistical analysis of coupled time series with kernel cross-spectral density operators. In _Advances in Neural Information Processing Systems_, 2013. * [3] Leo Breiman. Optimal gambling systems for favorable games. _Berkeley Symposium on Mathematical Statistics and Probability_, 1962. * [4] Kacper Chwialkowski and Arthur Gretton. A kernel independence test for random processes. In _International Conference on Machine Learning_, 2014. * [5] Kacper P Chwialkowski, Dino Sejdinovic, and Arthur Gretton. A wild bootstrap for degenerate kernel tests. In _Advances in Neural Information Processing Systems_, 2014. * [6] Ashok Cutkosky and Francesco Orabona. Black-box reductions for parameter-free online learning in banach spaces. In _Conference on Learning Theory_, 2018. * [7] Donald A. Darling and Herbert E. Robbins. Some nonparametric sequential tests with power one. _Proceedings of the National Academy of Sciences_, 1968. * [8] Philip A. Ernst, Larry A. Shepp, and Abraham J. Wyner. Yule's "nonsense correlation" solved! _The Annals of Statistics_, 2017. * [9] Xiequan Fan, Ion Grama, and Quansheng Liu. Exponential inequalities for martingales with applications. _Electronic Journal of Probability_, 2015. * [10] Kenji Fukumizu, Francis R. Bach, and Arthur Gretton. Statistical consistency of kernel canonical correlation analysis. _Journal of Machine Learning Research_, 2007. * [11] Kenji Fukumizu, Arthur Gretton, Xiaohai Sun, and Bernhard Scholkopf. Kernel measures of conditional dependence. In _Advances in Neural Information Processing Systems_, 2007. * [12] Arthur Gretton. A simpler condition for consistency of a kernel independence test. _arXiv preprint: 1501.06103_, 2015. * [13] Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Scholkopf. Measuring statistical dependence with Hilbert-Schmidt norms. In _Algorithmic Learning Theory_, 2005. * [14] Arthur Gretton, Ralf Herbrich, Alexander Smola, Olivier Bousquet, and Bernhard Scholkopf. Kernel methods for measuring independence. _Journal of Machine Learning Research_, 2005. * [15] Arthur Gretton, Alexander Smola, Olivier Bousquet, Ralf Herbrich, Andrei Belitski, Mark Augath, Yusuke Murayama, Jon Pauls, Bernhard Scholkopf, and Nikos Logothetis. Kernel constrained covariance for dependence measurement. In _Tenth International Workshop on Artificial Intelligence and Statistics_, 2005. * [16] Peter Grunwald, Alexander Henzi, and Tyron Lardy. Anytime-valid tests of conditional independence under model-X. _Journal of the American Statistical Association_, 2023. * [17] Peter Grunwald, Rianne de Heide, and Wouter M. Koolen. Safe testing. In _Information Theory and Applications Workshop_, 2020. * [18] Elad Hazan, Amit Agarwal, and Satyen Kale. Logarithmic regret algorithms for online convex optimization. _Machine Learning_, 2007. * [19] Wassily Hoeffding. The strong law of large numbers for U-statistics. Technical report, University of North Carolina, 1961. * [20] Michael I. Jordan and Francis R. Bach. Kernel independent component analysis. _Journal of Machine Learning Research_, 2001. * [21] John L. Kelly. A new interpretation of information rate. _The Bell System Technical Journal_, 1956. * [22] Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. _Proceedings of the IEEE_, 1998. * [23] Krikamol Muandet, Kenji Fukumizu, Bharath Sriperumbudur, and Bernhard Scholkopf. Kernel mean embedding of distributions: A review and beyond. _Foundations and Trends in Machine Learning_, 2017. * [24] Aaditya Ramdas, Johannes Ruf, Martin Larsson, and Wouter Koolen. Admissible anytime-valid sequential inference must rely on nonnegative martingales. _arXiv preprint: 2009.03167_, 2020. * [25] Aaditya Ramdas, Johannes Ruf, Martin Larsson, and Wouter Koolen. Testing exchangeability: Fork-convexity, supermartingales and e-processes. _International Journal of Approximate Reasoning_, 2022. * [26] Marion R. Reynolds Jr. A sequential signed-rank test for symmetry. _The Annals of Statistics_, 1975. * [27] Shalev Shaer, Gal Maman, and Yaniv Romano. Model-free sequential testing for conditional independence via testing by betting. In _International Conference on Artificial Intelligence and Statistics_, 2023. * [28] Glenn Shafer. Testing by betting: a strategy for statistical and scientific communication. _Journal of the Royal Statistical Society: Series A (Statistics in Society)_, 2021. * [29] Glenn Shafer and Vladimir Vovk. _Game-Theoretic Foundations for Probability and Finance_. Wiley Series in Probability and Statistics. Wiley, 2019. * [30] Shubhanshu Shekhar and Aaditya Ramdas. Nonparametric two-sample testing by betting. _arXiv preprint: 2112.09162_, 2021. * [31] Jean Ville. _Etude critique de la notion de collectif_. Theses de l'entre-deux-guerres. Gauthier-Villars, 1939. * [32] Ian Waudby-Smith and Aaditya Ramdas. Estimating means of bounded random variables by betting. _Journal of the Royal Statistical Society: Series B (Statistical Methodology)_, 2023. * [33] George U. Yule. Why do we sometimes get nonsense-correlations between time-series?-a study in sampling and the nature of time-series. _Journal of the Royal Statistical Society_, 1926. Appendix ## Appendix A Independence Testing for Streaming Data In Section A.1, we describe a permutation-based approach for conducting batch HSIC and show that continuous monitoring of batch HSIC (without corrections for multiple testing) leads to an inflated false alarm rate. In Section A.2, we introduce the sequential two-sample testing (2ST) problem and describe a reduction of sequential independence testing to sequential 2ST. In Section A.3, we compare our test to HSIC in the batch setting.
2212.07383v3.mmd
অন্ধ মেয়ে ‘ময়নার ইতিকথা’ – United news 24 অন্ধ মেয়ে ‘ময়নার ইতিকথা’ Posted by: ahm foysal in Featured, বিনোদন 28/04/2018 0 32 Views নজরুল ইসলাম তোফা:: অন্ধ মেয়ে “ময়না”। ময়না কেন্দ্রীয় চরিত্রে অভিনয় করেছেন, বর্তমানের এমন আলোচিত এবং নবাগত মিষ্টি নায়িকা সানাই তার নাম। তিনি দেখতে অনেকটাই সুন্দরী! কিন্তু জীবন যাপনে বলা যায় খুবই সহজ-সরল একজন মেয়ে।এই সহজ কিংবা সরলতাকে পুঁজি করে এক শ্রেণীর অসাধু ব্যক্তির লালসার জিহ্বা প্রদর্শিত হয় এমন এ সুন্দরী অন্ধ নায়িকা ময়না দিকে। সুতরাং অন্ধত্বকে দুর্বলতা মনে করেই যেন বিভিন্ন ফন্দি আঁটে সুযোগ সন্ধানীরা। এমনই এক নারী কেন্দ্রিক গল্পের করুন ক্লাইমেকস্ ‘ময়নার ইতিকথা’। চমৎকার গানে এবং নাচের সমন্বয়ে ‘ময়নার ইতিকথা’ গত ১১ এপ্রিলের সকাল থেকেই গাজীপুরে ১ম কাজের শুটিং সম্পন্ন হয়েছে। আবারও খুুুব শীঘ্রই বলা যায়, এ সিনেমার বাদ বাঁঁকি কাজের দ্বিতীয় লটের শুটিং শুরু হবে। শুটিং লটের পরিকল্পনাকারি সুদক্ষ তরুণ চলচ্চিত্র পরিচালক “বাবু সিদ্দিকী” বলেছেন, যদিও আমরা ময়নার ইতিকথা সিনেমাটা নিয়ে আগাম কিছু তথ্য কখনোই দর্শকদের জানাতে চাই নি। কারণ ছবিতে যা রয়েছে সেটা অবশ্যই সিনেমা হলে গেলে জানবে অথবা দেখতে পাবে। ছবির গল্প কিংবা প্লট এগুলো আগে বলা সিনেমার জন্যই খুব একটা স্বাস্থ্যকর না। যাই হোক, যেহেতু এই সব নিয়ে বিভিন্ন জনের বিভিন্ন রকমের স্পেকুলেশন দেখতে পাওয়া যায় নানা ধরনের পত্র পত্রিকায় এবং সোশ্যাল মিডিয়ায়, সে কারনেই এমন সিনেমার দু’একটি কথা দর্শকের কাছে পরিষ্কার করে দিতে চাই। এটি প্রথম সিনেমা হলেও বলতে চাই যে, কাজটি অনেক ভালোই হবে, আশাবাদী আমি, এই সিনেমাটি দর্শকদের অবশ্যই দেখতে ভালো লাগবে এবং মজা পাবে। নারীকেন্দ্রিক এমন এই ছবিতে অভিনয় করে বেশ উচ্ছ্বসিত হয়ে আছেন অভিনেত্রী “সানাই”। নজরুল ইসলাম তোফাকে তিনি বলেছেন, ১১ তারিখ থেকে ১৭ এপ্রিল পর্যন্ত টানা শুটিং করেছেন গাজীপুরে। একেবারেই বলা যায় যে, এমন কাজের এই শুটিং স্পট নিভৃত গ্রাম্য পরিবেশের মাঝে। খুব শিগগির দ্বিতীয় লটের দৃশ্য ধারণ করতে যাবেন। একটু তার অতীত স্মৃতি চারণ করেই বলেছেন, এ ছবির একটি শটের জন্য তাঁকে যেন, দীর্ঘ ৫ ঘণ্টার মতো নোংরা পানিতে ভিজেই কাজ করতে হয়েছে। সানাই আরও বলেছেন, এত শ্রম আর অনেক কষ্টের পরও পুরো টিমের সহাযোগিতা পেয়ে প্রথম ধাপের শুটিং খুবই ভালোভাবে সমাপ্ত করেছেন। Previous: খাগড়াছড়ি রিজিয়ন কাপ ফুটবল টুর্ণামেন্টে লংগদু জোন চ্যাম্পিয়ন Next: বিশ্বমানের চিকিৎসা সেবা বিআরবি হসপিটালে
c4-bn
package io.codearcs.candlestack.aws.s3; public class S3Location { private String id, name, bucket, key; S3Location() {} public String getId() { return id; } public String getName() { return name; } public String getBucket() { return bucket; } public String getKey() { return key; } }
CodeArcsInc/candlestack-src/main/java/io/codearcs/candlestack/aws/s3/S3Location.java
// // ALOrderedMap.h // patchwork // // Created by Alex Lee on 27/10/2016. // Copyright © 2016 Alex Lee. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface ALOrderedMap<__covariant KeyType, __covariant ObjectType> : NSObject + (instancetype)orderedMap; - (void)setObject:(ObjectType)object forKey:(KeyType)key; - (nullable ObjectType)removeObjectForKey:(KeyType)key; - (nullable ObjectType)objectForKey:(KeyType)key; - (BOOL)containsKey:(KeyType)key; - (BOOL)containsObject:(ObjectType)obj; - (NSArray<KeyType> *)orderedKeys; - (NSArray<ObjectType> *)orderedObjects; - (void)enumerateKeysAndObjectsUsingBlock:(void(NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block; - (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void(NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block; @end NS_ASSUME_NONNULL_END
alexlee002/alloy-patchwork/Foundations/ALOrderedMap.h
define( "dojox/editor/plugins/nls/hr/TableDialog", ({ insertTableTitle: "Umetni tablicu", modifyTableTitle: "Promijeni tablicu", rows: "Redovi:", columns: "Stupci:", align: "Poravnaj:", cellPadding: "Punjenje ćelije:", cellSpacing: "Prored ćelije:", tableWidth: "Širina tablice:", backgroundColor: "Boja pozadine:", borderColor: "Boja obruba:", borderThickness: "Debljina obruba:", percent: "postotak", pixels: "pikseli", "default": "zadano", left: "lijevo", center: "sredina", right: "desno", buttonSet: "Postavi", // translated elsewhere? buttonInsert: "Umetni", buttonCancel: "Opoziv", selectTableLabel: "Označi tablicu", insertTableRowBeforeLabel: "Dodaj red prije", insertTableRowAfterLabel: "Dodaj red nakon", insertTableColumnBeforeLabel: "Dodaj stupac prije", insertTableColumnAfterLabel: "Dodaj stupac nakon", deleteTableRowLabel: "Izbriši red", deleteTableColumnLabel: "Izbriši stupac", colorTableCellTitle: "pozadinska boja ćelije tablice", tableContextMenuTitle: "Kontekstni izbornik tablice" }) );
trainkg/zsq-bench/bench.webapp/src/main/webapp/zsq/dojo/dojox/editor/plugins/nls/hr/TableDialog.js.uncompressed.js
import org.jibble.pircbot.*; public class ReportHospRegEx extends RegExTask { public ReportHospRegEx(String aPattern) { super(aPattern); } public boolean execute(LaikaBot aBot, String aChannel, String aTarget, String aSender) { if (aTarget.matches(fPattern)) { if (aBot.getChainDetail().isRegistered(aSender)) { aBot.getChainDetail().resetTimer(aChannel, aBot); String[] lSplitted = aTarget.split(" "); aBot.sendMessage(aChannel, Colors.BOLD + Colors.RED + "Good work hospitalizing " + lSplitted[4] + "!"); aBot.getChainDetail().setChainCount(aBot.getChainDetail().getChainCount() + 1); aBot.sendMessage(aChannel, Colors.BOLD + Colors.BLUE + aBot.getChainDetail().getChainCount() + " hits have been made in the chain."); aBot.getChainDetail().nextRotation(); String lNextPerson = aBot.getChainDetail().getCurrentRotationString(); if (lNextPerson != null) aBot.sendMessage(aChannel, Colors.BOLD + Colors.RED + aBot.getChainDetail().getCurrentRotationString() + " is hitting next."); aBot.getChainDetail().updateLastHospTime(); return true; } else { aBot.sendMessage(aChannel, Colors.BOLD + Colors.RED + "You (" + aSender + ") are not in the current rotation list!"); } } return false; } }
aki-null/laika-src/ReportHospRegEx.java
/******************************************************************************* * Copyright (c) 2015 XLAB d.o.o. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * @author XLAB d.o.o. *******************************************************************************/ package eu.cloudscale.showcase.db.common; public class Soundex { public static String soundex(String s) { char[] x = s.toUpperCase().toCharArray(); char firstLetter = x[0]; // convert letters to numeric code for ( int i = 0; i < x.length; i++ ) { switch ( x[i] ) { case 'B': case 'F': case 'P': case 'V': { x[i] = '1'; break; } case 'C': case 'G': case 'J': case 'K': case 'Q': case 'S': case 'X': case 'Z': { x[i] = '2'; break; } case 'D': case 'T': { x[i] = '3'; break; } case 'L': { x[i] = '4'; break; } case 'M': case 'N': { x[i] = '5'; break; } case 'R': { x[i] = '6'; break; } default: { x[i] = '0'; break; } } } // remove duplicates String output = "" + firstLetter; for ( int i = 1; i < x.length; i++ ) if ( x[i] != x[i - 1] && x[i] != '0' ) output += x[i]; // pad with 0's or truncate output = output + "0000"; return output.substring( 0, 4 ); } public static void main(String[] args) { String name1 = args[0]; String name2 = args[1]; String code1 = soundex( name1 ); String code2 = soundex( name2 ); System.out.println( code1 + ": " + name1 ); System.out.println( code2 + ": " + name2 ); } }
CloudScale-Project/CloudStore-src/main/java/eu/cloudscale/showcase/db/common/Soundex.java
/* This test program is part of GDB, the GNU debugger. Copyright 2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Define typedefs of different types, for testing the "whatis" and "ptype" commands. */ /* Helper macro used to consistently define variables/typedefs using the same name scheme. BASE is the shared part of the name of all typedefs/variables generated. Defines a variable of the given typedef type, and then a typedef of that typedef and a variable of that new typedef type. The "double typedef" is useful to checking that whatis only strips one typedef level. For example, if BASE is "int", we get: int_typedef v_int_typedef; // "v_" stands for variable of typedef type typedef int_typedef int_typedef2; // typedef-of-typedef int_typedef2 v_int_typedef2; // var of typedef-of-typedef */ #define DEF(base) \ base ## _typedef v_ ## base ## _typedef; \ \ typedef base ## _typedef base ## _typedef2; \ base ## _typedef2 v_ ## base ## _typedef2 /* Void. */ /* (Can't have variables of void type.) */ typedef void void_typedef; typedef void_typedef void_typedef2; void_typedef *v_void_typedef_ptr; void_typedef2 *v_void_typedef_ptr2; /* Integers. */ typedef int int_typedef; DEF (int); /* Floats. */ typedef float float_typedef; DEF (float); /* Enums. */ typedef enum colors {red, green, blue} colors_typedef; DEF (colors); /* Structures. */ typedef struct t_struct { int member; } t_struct_typedef; DEF (t_struct); /* Unions. */ typedef union t_union { int member; } t_union_typedef; DEF (t_union); /* Arrays. */ typedef int int_array_typedef[3]; DEF (int_array); /* An array the same size of t_struct_typedef, so we can test casting. */ typedef unsigned char uchar_array_t_struct_typedef[sizeof (t_struct_typedef)]; DEF (uchar_array_t_struct); /* A struct and a eunion the same size as t_struct, so we can test casting. */ typedef struct t_struct_wrapper { struct t_struct base; } t_struct_wrapper_typedef; DEF (t_struct_wrapper); typedef union t_struct_union_wrapper { struct t_struct base; } t_struct_union_wrapper_typedef; DEF (t_struct_union_wrapper); /* Functions / function pointers. */ typedef void func_ftype (void); func_ftype *v_func_ftype; typedef func_ftype func_ftype2; func_ftype2 *v_func_ftype2; /* C++ methods / method pointers. */ #ifdef __cplusplus namespace ns { struct Struct { void method (); }; void Struct::method () {} typedef Struct Struct_typedef; DEF (Struct); /* Typedefs/vars in a namespace. */ typedef void (Struct::*method_ptr_typedef) (); DEF (method_ptr); } /* Similar, but in the global namespace. */ typedef ns::Struct ns_Struct_typedef; DEF (ns_Struct); typedef void (ns::Struct::*ns_method_ptr_typedef) (); DEF (ns_method_ptr); #endif int main (void) { return 0; }
ganboing/binutils-gdb-gdb/testsuite/gdb.base/whatis-ptype-typedefs.c
/* eslint-disable func-names */ import authenticator from 'extensions/safe/reducers/authenticator'; import { TYPES } from 'extensions/safe/actions/authenticator_actions'; import initialState from 'extensions/safe/reducers/initialAppState'; jest.mock('extensions/safe/ffi/ipc'); jest.mock('electron-redux', () => { return { createAliasedAction : () => {} } }); describe( 'authenticator reducer', () => { it( 'should return the initial state', () => { expect( authenticator( undefined, {} ) ).toEqual( initialState.authenticator ); } ); describe( 'SET_AUTH_NETWORK_STATUS', () => { it( 'should handle setting authenticator netork state', () => { const state = 0; expect( authenticator( undefined, { type : TYPES.SET_AUTH_NETWORK_STATUS, payload : state } ) ).toMatchObject( { networkState: state } ); } ); } ); describe( 'SET_AUTH_LIB_STATUS', () => { const state = false; it( 'should handle setting auth lib status', () => { expect( authenticator( undefined, { type : TYPES.SET_AUTH_LIB_STATUS, payload : state } ) ).toMatchObject( { libStatus: state } ); } ); } ); describe( 'SET_AUTH_HANDLE', () => { it( 'should add the auth handle to the store', () => { const handle = '111111'; expect( authenticator( undefined, { type : TYPES.SET_AUTH_HANDLE, payload : handle } ) ).toMatchObject( { authenticatorHandle: handle } ); } ); } ); describe( 'ADD_AUTH_REQUEST', () => { it( 'should add an authenticator request to the queue', () => { const url = 'safe-auth://111111'; const authQueue = authenticator( undefined, { type : TYPES.ADD_AUTH_REQUEST, payload : url } ).authenticationQueue; expect(authQueue).toMatchObject( [url] ); expect(authQueue.length).toBe( 1 ); } ); } ); describe( 'REMOVE_AUTH_REQUEST', () => { it( 'should remove an authenticator request from the queue', () => { const url = 'safe-auth://111111'; const authQueue = authenticator( { authenticationQueue: [ url ] }, { type : TYPES.REMOVE_AUTH_REQUEST, payload : url } ).authenticationQueue; expect(authQueue).toMatchObject( [] ); expect(authQueue.length).toBe( 0 ); } ); } ); } );
joshuef/peruse-app/extensions/safe/test/reducers/authenticator.spec.js
"use strict"; var OpenSpeedMonitor = OpenSpeedMonitor || {}; OpenSpeedMonitor.MeasurementSetupWizard = OpenSpeedMonitor.MeasurementSetupWizard || {}; OpenSpeedMonitor.MeasurementSetupWizard.Wizard = (function () { var formSubmissonButton = $("#createJobTabCreationButton"); var setJobGroupCardValid = false; var scriptCardIsValid = false; var createJobCardValid = false; var progressBar = $("#setupWizardProgressBar"); var scriptDiv = $("#createScript"); var jobGroupDiv = $("#setJobGroup"); var jobDiv = $("#createJob"); var setJobGroupTabNextButton = $("#setJobGroubTabNextButton"); var createScriptTabNextButton = $("#createScriptTabNextButton"); var locationAndConnectivityDiv = $("#selectLocationAndConnectivity"); var init = function () { initTabEventListeners(); initTabNavigation(); } var initTabEventListeners = function () { jobGroupDiv.on('changed', function () { var jobGroupCard = OpenSpeedMonitor.MeasurementSetupWizard.CreateJobGroupCard; setJobGroupCardValid = jobGroupCard.isValid(); var scriptCard = OpenSpeedMonitor.MeasurementSetupWizard.CreateScriptCard; if (scriptCard) { scriptCard.setDefaultScriptName(jobGroupCard.getJobGroup()); } validateForm(); }) scriptDiv.on('changed', function () { scriptCardIsValid = OpenSpeedMonitor.MeasurementSetupWizard.CreateScriptCard.isValid(); validateForm(); setDefaultJobName(); }); locationAndConnectivityDiv.on("changed", function() { setDefaultJobName(); }) jobDiv.on('changed', function () { createJobCardValid = OpenSpeedMonitor.MeasurementSetupWizard.CreateJobCard.isValid(); validateForm(); }) } var setDefaultJobName = function () { if (!OpenSpeedMonitor.MeasurementSetupWizard.CreateJobCard) { return; } var scriptCard = OpenSpeedMonitor.MeasurementSetupWizard.CreateScriptCard; var scriptName = scriptCard ? scriptCard.getScriptName() : ""; var locationConnectivityCard = OpenSpeedMonitor.MeasurementSetupWizard.SelectLocationAndConnectivity; var browser = locationConnectivityCard ? locationConnectivityCard.getBrowserOrLocationName() : ""; var defaultJobName = (scriptName + " " + browser).trim(); OpenSpeedMonitor.MeasurementSetupWizard.CreateJobCard.setDefaultJobName(defaultJobName); } var initTabNavigation = function () { setJobGroupTabNextButton.on('click', function () { $("#setJobGroupTab").parent().toggleClass("active"); $("#createScriptTab").parent().toggleClass("active"); if (!$("#createScriptTab").parent().hasClass("wasActive")) progressBar.css("width", "37.5%"); $("#createScriptTab").parent().addClass("wasActive"); setTimeout(function() { OpenSpeedMonitor.script.codemirrorEditor.refresh() }, 1); // so codemirror is properly initialized after the browser has layouted the page }); createScriptTabNextButton.on('click', function () { $("#createScriptTab").parent().toggleClass("active"); $("#selectLocationAndConnectivityTab").parent().toggleClass("active"); if (!$("#selectLocationAndConnectivityTab").parent().hasClass("wasActive")) progressBar.css("width", "62.5%"); $("#selectLocationAndConnectivityTab").parent().addClass("wasActive"); }); $("#selectLocationAndConnectivityTabNextButton").on('click', function () { $("#selectLocationAndConnectivityTab").parent().toggleClass("active"); $("#createJobTab").parent().toggleClass("active"); if (!$("#createJobTab").parent().hasClass("wasActive")) progressBar.css("width", "100%"); $("#createJobTab").parent().addClass("wasActive"); }); $("#createScriptTabPreviousButton").on('click', function () { $("#createScriptTab").parent().toggleClass("active"); $("#setJobGroupTab").parent().toggleClass("active"); }); $("#selectLocationAndConnectivityTabPreviousButton").on('click', function () { $("#selectLocationAndConnectivityTab").parent().toggleClass("active"); $("#createScriptTab").parent().toggleClass("active"); }); $("#createJobTabPreviousButton").on('click', function () { $("#createJobTab").parent().toggleClass("active"); $("#selectLocationAndConnectivityTab").parent().toggleClass("active"); }); } var allCardsValid = function () { return setJobGroupCardValid && scriptCardIsValid && createJobCardValid; } var validateForm = function () { setJobGroupTabNextButton.prop('disabled', !setJobGroupCardValid); createScriptTabNextButton.prop('disabled', !scriptCardIsValid); formSubmissonButton.prop('disabled', !allCardsValid()); } init(); return {} })();
iteratec/OpenSpeedMonitor-grails-app/assets/javascripts/measurementSetup/_wizard.js
/* * OMAP4 clock function prototypes and macros * * Copyright (C) 2009 Texas Instruments, Inc. * Copyright (C) 2010 Nokia Corporation */ #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H /* * XXX Missing values for the OMAP4 DPLL_USB * XXX Missing min_multiplier values for all OMAP4 DPLLs */ #define OMAP4470_MAX_DPLL_MULT 4095 #define OMAP4470_MAX_DPLL_DIV 256 #define OMAP4430_MAX_DPLL_MULT 2047 #define OMAP4430_MAX_DPLL_DIV 128 #define OMAP4430_REGM4XEN_MULT 4 int omap4xxx_clk_init(void); int omap4_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate); #endif
CandyDevices/kernel_samsung_espresso10-arch/arm/mach-omap2/clock44xx.h
class ManageIQ::Providers::CloudManager::ProvisionWorkflow < ::MiqProvisionVirtWorkflow include_concern "DialogFieldValidation" include CloudInitTemplateMixin def allowed_availability_zones(_options = {}) source = load_ar_obj(get_source_vm) targets = get_targets_for_ems(source, :cloud_filter, AvailabilityZone, 'availability_zones.available') targets.each_with_object({}) { |az, h| h[az.id] = az.name } end def allowed_cloud_subnets(_options = {}) src = resources_for_ui return {} if src[:cloud_network_id].nil? az_id = src[:availability_zone_id].to_i if (cn = CloudNetwork.find_by(:id => src[:cloud_network_id])) targets = get_targets_for_source(cn, :cloud_filter, CloudNetwork, 'cloud_subnets') targets.each_with_object({}) do |cs, hash| next if !az_id.zero? && az_id != cs.availability_zone_id hash[cs.id] = "#{cs.name} (#{cs.cidr}) | #{cs.availability_zone.try(:name)}" end else {} end end def allowed_cloud_networks(_options = {}) return {} unless (src = provider_or_tenant_object) targets = get_targets_for_source(src, :cloud_filter, CloudNetwork, 'all_cloud_networks') allowed_ci(:cloud_network, [:availability_zone], targets.map(&:id)) end def allowed_guest_access_key_pairs(_options = {}) source = load_ar_obj(get_source_vm) targets = get_targets_for_ems(source, :cloud_filter, ManageIQ::Providers::CloudManager::AuthKeyPair, 'key_pairs') targets.each_with_object({}) { |kp, h| h[kp.id] = kp.name } end def allowed_security_groups(_options = {}) return {} unless (src = provider_or_tenant_object) src_obj = get_targets_for_source(src, :cloud_filter, SecurityGroup, 'security_groups') src_obj.each_with_object({}) do |sg, h| h[sg.id] = display_name_for_name_description(sg) end end def allowed_floating_ip_addresses(_options = {}) return {} unless (src_obj = provider_or_tenant_object) targets = get_targets_for_source(src_obj, :cloud_filter, FloatingIp, 'floating_ips.available') targets.each_with_object({}) do |ip, h| h[ip.id] = ip.address end end def display_name_for_name_description(ci) ci.description.blank? ? ci.name : "#{ci.name}: #{ci.description}" end def supports_cloud_init? true end def set_or_default_hardware_field_values(_vm) end def update_field_visibility show_dialog(:customize, :show, "enabled") super(:force_platform => 'linux') end def show_customize_fields(fields, _platform) show_customize_fields_pxe(fields) end def allowed_customization_templates(options = {}) allowed_cloud_init_customization_templates(options) end private # Run the relationship methods and perform set intersections on the returned values. # Optional starting set of results maybe passed in. def allowed_ci(ci, relats, filtered_ids = nil) return {} if (sources = resources_for_ui).blank? super(ci, relats, sources, filtered_ids) end def cloud_network_display_name(cn) cn.cidr.blank? ? cn.name : "#{cn.name} (#{cn.cidr})" end def availability_zone_to_cloud_network(src) if src[:availability_zone] load_ar_obj(src[:availability_zone]).cloud_subnets.each_with_object({}) do |cs, hash| cn = cs.cloud_network hash[cn.id] = cloud_network_display_name(cn) end else load_ar_obj(src[:ems]).all_cloud_networks.each_with_object({}) do |cn, hash| hash[cn.id] = cloud_network_display_name(cn) end end end def get_source_and_targets(refresh = false) return @target_resource if @target_resource && refresh == false result = super return result if result.blank? add_target(:placement_availability_zone, :availability_zone, AvailabilityZone, result) add_target(:cloud_network, :cloud_network, CloudNetwork, result) add_target(:cloud_subnet, :cloud_subnet, CloudSubnet, result) add_target(:cloud_tenant, :cloud_tenant, CloudTenant, result) rails_logger('get_source_and_targets', 1) @target_resource = result end def get_targets_for_source(src, filter_name, klass, relats) process_filter(filter_name, klass, src.deep_send(relats)) end def get_targets_for_ems(src, filter_name, klass, relats) ems = src.try(:ext_management_system) return {} if ems.nil? process_filter(filter_name, klass, ems.deep_send(relats)) end def dialog_name_from_automate(message, extra_attrs) extra_attrs['platform_category'] = 'cloud' super(message, extra_attrs) end def provider_or_tenant_object src = resources_for_ui return nil if src[:ems].nil? obj = src[:cloud_tenant] || src[:ems] load_ar_obj(obj) end end
gerikis/manageiq-app/models/manageiq/providers/cloud_manager/provision_workflow.rb
import { StyleSheet } from 'react-native'; export default StyleSheet.create({ label: { fontSize: 18, paddingLeft: 20, flex: 1 }, input: { color: '#000', paddingRight: 5, paddingLeft: 5, fontSize: 18, lineHeight: 23, flex: 2 }, container: { flex: 1, height: 40, flexDirection: 'row', alignItems: 'center' } });
ultimagriever/manager-src/components/FormField/styles.js
import math #------------------------------------------------------------------------------- def zero_array(n): a = [] for i in range(n): a.append(0.0) return a #------------------------------------------------------------------------------- # see: http://blog.plover.com/math/choose.html def binom(n, k): if k == 0: return 1 if n == 0: return 0 m = n b = 1 for j in range(k): b = b*m b = b/(j + 1) m -= 1 return b #------------------------------------------------------------------------------- # float to prevent overflow def fac(n): r = 1.0 for i in range(n): r *= float(i + 1) return r #------------------------------------------------------------------------------- # float to prevent overflow def fac2(n): if n < 0: r = float(n + 2) i = n + 4 while i < 2: r *= float(i) i += 2 return 1.0/r elif n == 0: return 1.0 else: r = float(n) i = n - 2 while i > 0: r *= float(i) i -= 2 return r #------------------------------------------------------------------------------- def get_cs_trans(max_l_value): n = 0 for l in range(2, max_l_value + 1): t = (l+1)*(l+2)/2 n += t*t cs_trans = [] cs_trans.append([[1.0]]) cs_trans.append([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]) for l in range(2, max_l_value + 1): nc = (l+1)*(l+2)/2 ns = 2*l + 1 legendre_coef = zero_array(l + 1) cossin_coef = zero_array((l + 1)*(l + 1)) tmat = zero_array(int(nc*ns)) k = 0 while k <= l/2: legendre_coef[l - 2*k] = ((-1.0)**k/2.0**l)*binom(l, k)*binom(2*(l - k), l) k += 1 for m in range(l + 1): cossin_coef[m] = 1.0 for k in range(1, m + 1): cossin_coef[k*(l+1) + m] += cossin_coef[(k-1)*(l+1) + m - 1]*((-1.0)**(k-1)) if m > k: cossin_coef[k*(l+1) + m] += cossin_coef[k*(l+1) + m - 1] for m in range(l + 1): if m == 0: cm = 1.0 else: cm = math.sqrt(2.0*fac(l - m)/fac(l + m)) cm = cm/math.sqrt(fac2(2*l - 1)) k = (l - m)%2 while k <= (l - m): if m > 0: legendre_coef[k] = float(k + 1)*legendre_coef[k+1] cmk = cm*legendre_coef[k] i = 0 while i <= (l - k - m)/2: cmki = cmk*binom((l - k - m)/2, i) for j in range(i + 1): cmkij = cmki*binom(i, j) for n in range(m + 1): ix = l - 2*j - m + n ix = ix*(ix + 1)/2 + l + 1 - m - 2*i if n%2 == 1: ilm = 1 + l - m else: ilm = 1 + l + m tmat[int((ilm - 1)*nc + ix - 1)] += cmkij*cossin_coef[n*(l+1) + m] i += 1 k += 2 tc = [] for i in range(int(nc)): ts = [] for j in range(ns): ts.append(tmat[int(j*nc + i)]) tc.append(ts) cs_trans.append(tc) return cs_trans
miroi/xcint-src/density/cs_trans.py
# 1 chapter 6 principles of diffusion and mass transfer between phases Post on 04-Jan-2016 233 views Category: ## Documents Tags: • #### kinds of diffusion Embed Size (px) TRANSCRIPT • Chapter 6 Principles of Diffusion and Mass Transfer Between Phases • 1.THEORY OF DIFFUSIONDiffusion is the movement, under the influence of a physical stimulus, of an individual component through a mixtureThe most common cause of diffusion is a concentration gradient of the diffusing component.E.g., The process of dissolution of ammonia into water: (1)A concentration gradient in the gas phase causes ammonia to diffuse to the gas-liquid interface; (2)Ammonia dissolves in the interface; (3)A gradient in the liquid phase causes ammonia to diffuse into the bulk liquid. • A concentration gradient tends to move the component in such a direction as to equalize concentrations and destroy the gradient.If the two phases are in equilibrium with each other, diffusion, or mass transfer fluxes is equal to zero.Other causes of diffusion: activity gradient (reverse osmosis); temperature gradient (thermal diffusion); application of an external force field (forced diffusion, e.g., centrifuge, etc).Two kinds of diffusion caused by concentration gradient : molecular diffusion and eddy diffusion. [e.g., diffusion process of ink in the stagnant or agitated water] • Mass transfer driving forcesE.g., absorption or stripping process: Gas-liquid phases are not in equilibrium with each other. • Question: Can we use (p-c) or (y-x) as mass transfer driving force? Compare mass transfer driving forces with heat transfer driving force? • (1)Comparison of diffusion and heat transfer • (2)Diffusion quantities1.Velocity u, length/time.2.Flux across a plane N, mol/areatime.3.Flux relative to a plane of zero velocity J, mol/areatime.4.Concentration c and molar density M, mol/volume (mole fraction may also be used).5.Concentration gradient dc/db, where b is the length of the path perpendicular to the area across which diffusion is occurring.Appropriate subscripts are used when needed. • (3)Velocities in diffusionVelocity without qualification refers to the velocity relative to the interface between the phases and is that apparent to an observer at rest with respect to the interface. • (4)Molal flow rate, velocity , and flux • (5)Relations between diffusivitiesFor ideal gases, and for diffusion of A and B in a gas at constant temperature and pressure, • (6)Interpretation of diffusion equationsThe vector nature of the fluxes and concentration gradients must be understood, since these quantities are characterized by directions and magnitudes.The sign of the gradient is opposite to the direction of the diffusion flux, since diffusion is in the direction of lower concentrations. A • (7)Equimolal diffusion()Zero convective flow and equimolal counterdiffusion of A and B, as occurs in the diffusive mixing of two gases and in the diffusion of A and B in the vapor phase for distillations that have constant molal overflow. • Fig.17.1(a) Component A and B diffusing at same molal (equimolal) rates in opposite directions [Like the case of diffusion of A and B in the vapor phase for distillations that have constant molal overflow].Note that for equimolal diffusion, NA=JA. • Assuming a constant flux NA and zero total flux (N=0), integrating Eq.(17.17) over a film thickness BT, • (8)One-component mass transfer (one-way diffusion) Fig.17.1(b) Component A diffusing, component B stationary with respect to interface. [Like the case of diffusion of solute A from gas phase into liquid phase in absorption process.] • (8)One-component mass transfer (one-way diffusion) When only component A is being transferred, the total flux to or away from the interface N is the same as NA, and Eq.(17.17) becomes • [Comparing one-way diffusion in the Chinese textbook, • Comparing Eq.(17.26) with Eq.(17.19),the flux of component A for a given concentration difference is therefore greater for one-way diffusion than for equimolal diffusion.[Example17.1.] • 2.PREDICTION OF DIFFUSIVITIESDiffusivities are physical properties of fluids. Diffusivities are best estimated by experimental measurements, or from published correlations. The factors influencing diffusivities are temperature, pressure, and compositions for a given fluid. • Assume concentrations of component A in the two layers with distance of the molecular mean free path of a binary mixture are cA1 and cA2, respectively, the diffusion flux is • In general, influence of concentrations for diffusion in gases can be neglected, and • (2)Diffusion in liquidsDiffusivities in liquids are generally 4 to 5 orders of magnitude smaller than in gases at atmospheric pressure. • Other empirical correlations for diffusivities:For dilute aqueous solutions of non-electrolytes, using Eq.(17.32).For dilute solutions of completely ionized univalent electrolytes,using Nernst equation(17.33). (3)Schmidt number ScSc is analogous to the Prandtl number. • For gases, Sc is independent of pressure when the ideal gas law applies, since the viscosity is independent of pressure, and the effects of pressure on and Dv cancel. Temperature has only a slight effect on Sc because and Dv both change with about T0.7~0.8.For liquids, Sc decreases markedly with increasing temperature because of the decreasing viscosity and the increase in the diffusivity.Unlike the case for binary gas mixtures the diffusion coefficient for a dilute solution of A and B is not the same for a dilute solution of B in A. i.e., DABDBA [Comparing with eq.(17.15)?] • EXAMPLE 17.3. [p.522]From eq.(17.31), it is apparent that unlike the case for binary gas mixtures, the diffusion coefficient for a dilute solution of A and B is not the same for a dilute solution of B in A. But, from EXAMPLE 17.3., the diffusivities of benzene in toluene and toluene in benzene have only a slight difference, and in this case the conclusion of Eq.(17.15) DAB=DBA is still effective • (4)Turbulent diffusionIn a turbulent stream the moving eddies transport matter from one location to another, just as they transport momentum and heat energy. • The eddy diffusivity is not a parameter of physical property, it depends on the fluid properties but also on the velocity and position in the flowing stream. Recommended
finemath-3plus
/** * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; under version 2 * of the License (non-upgradable). * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Copyright (c) 2015 (original work) Open Assessment Technologies SA; */ define([ 'lodash', 'i18n', 'core/errorHandler' ], function (_, __, errorHandler){ 'use strict'; var _ns = '.sectionCategory'; /** * Check if the given object is a valid assessmentSection model object * * @param {object} model * @returns {boolean} */ function isValidSectionModel(model){ return (_.isObject(model) && model['qti-type'] === 'assessmentSection' && _.isArray(model.sectionParts)); } /** * Set an array of categories to the section model (affect the childen itemRef) * * @param {object} model * @param {array} selected - all categories active for the whole section * @param {array} partial - only categories in an indeterminate state * @returns {undefined} */ function setCategories(model, selected, partial){ var toRemove, toAdd, currentCategories = getCategories(model); partial = partial || []; //the categories that are no longer in the new list of categories should be removed toRemove = _.difference(currentCategories.all, selected.concat(partial)); //the categories that are not in the current categories collection should be added to the children toAdd = _.difference(selected, currentCategories.propagated); model.categories = _.difference(model.categories, toRemove); model.categories = model.categories.concat(toAdd); //process the modification addCategories(model, toAdd); removeCategories(model, toRemove); } /** * Get the categories assign to the section model, infered by its interal itemRefs * * @param {object} model * @returns {object} */ function getCategories(model) { var categories, arrays, union, propagated, partial, itemCount = 0; if (!isValidSectionModel(model)) { return errorHandler.throw(_ns, 'invalid tool config format'); } categories = _.map(model.sectionParts, function (itemRef){ if(itemRef['qti-type'] === 'assessmentItemRef' && ++itemCount && _.isArray(itemRef.categories)){ return _.compact(itemRef.categories); } }); if (!itemCount) { return createCategories(model.categories, model.categories); } //array of categories arrays = _.values(categories); union = _.union.apply(null, arrays); //categories that are common to all itemRef propagated = _.intersection.apply(null, arrays); //the categories that are only partially covered on the section level : complementary of "propagated" partial = _.difference(union, propagated); return createCategories(union, propagated, partial); } /** * Add an array of categories to a section model (affect the childen itemRef) * * @param {object} model * @param {array} categories * @returns {undefined} */ function addCategories(model, categories){ if(isValidSectionModel(model)){ _.each(model.sectionParts, function (itemRef){ if(itemRef['qti-type'] === 'assessmentItemRef'){ if(!_.isArray(itemRef.categories)){ itemRef.categories = []; } itemRef.categories = _.union(itemRef.categories, categories); } }); }else{ errorHandler.throw(_ns, 'invalid tool config format'); } } /** * Remove an array of categories from a section model (affect the childen itemRef) * * @param {object} model * @param {array} categories * @returns {undefined} */ function removeCategories(model, categories){ if(isValidSectionModel(model)){ _.each(model.sectionParts, function (itemRef){ if(itemRef['qti-type'] === 'assessmentItemRef' && _.isArray(itemRef.categories)){ itemRef.categories = _.difference(itemRef.categories, categories); } }); }else{ errorHandler.throw(_ns, 'invalid tool config format'); } } function createCategories(all = [], propagated = [], partial = []) { return _.mapValues({ all: all, propagated: propagated, partial: partial }, function (categories) { return categories.sort(); }); } return { isValidSectionModel : isValidSectionModel, setCategories : setCategories, getCategories : getCategories, addCategories : addCategories, removeCategories : removeCategories }; });
oat-sa/extension-tao-testqti-views/js/controller/creator/helpers/sectionCategory.js
/** * complex enum simple emulation * kind of Factory with static singleton ViewerItemCardType constants. * * Resources: * - TypeScript enums: https://github.com/Microsoft/TypeScript/issues/1206#issuecomment-296441490 * - Using real factory sample: https://github.com/torokmark/contact-me/issues/2 * - More about enums: https://basarat.gitbooks.io/typescript/content/docs/enums.html#enum-with-static-functions * - Singleton: https://basarat.gitbooks.io/typescript/docs/tips/singleton.html * - Similar sample: https://codepen.io/ImagineProgramming/pen/GZMXWe?editors=0010#0 */ export class ViewerItemCardType { public static Big: ViewerItemCardType = new ViewerItemCardType( 1, "FeaturedBig", 330, 660, 110, 160, 21, 16, 68, 18, 58 ); public static Medium: ViewerItemCardType = new ViewerItemCardType( 2, "FeaturedSmall", 155, 310, 50, 125, 20, 14, 66, 16, 68 ); public static Small: ViewerItemCardType = new ViewerItemCardType( 3, "NormalArticle", 100, 200, 35, 115, 18, 12, 62, 14, 75 ); public static All: ViewerItemCardType[] = [ ViewerItemCardType.Big, ViewerItemCardType.Medium, ViewerItemCardType.Small ]; private constructor( public id: number, public name: string, public imageHeight: number, public imageWidth: number, public titleMaxWords: number, public summaryMaxWords: number, public titleFontSize: number, public summaryFontSize: number, public titleMinHeight: number, public dateMinHeight: number, public summaryMinHeight: number ) {} }
jquintozamora/react-typescript-webpack2-cssModules-postCSS-app/src/components/ViewerItem/ViewerItemCardType.ts
package net.krazyweb.starmodmanager.view; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class BackupViewController { @SuppressWarnings("unused") private static final Logger log = LogManager.getLogger(BackupViewController.class); private BackupListView view; protected BackupViewController(final BackupListView view) { this.view = view; this.view.build(); } }
KrazyTheFox/Starbound-Mod-Manager-src/main/java/net/krazyweb/starmodmanager/view/BackupViewController.java
# -*- coding: utf-8 -*- from collections import namedtuple from urllib.parse import urlparse RedisConf = namedtuple('RedisUrl', ['host', 'port', 'database']) def parse_redis_url(url): parser = urlparse(url) host = parser.hostname port = parser.port db = int(parser.path[1:]) return RedisConf(host, port, db) class cache_property: def __init__(self, func): self.func = func def __get__(self, obj, cls=None): if obj is None: return self value = self.func(obj) setattr(obj, self.func.__name__, value) return value
alone-walker/BlogSpider-spider/src/mydm/util.py
package victor.training.java8.patterns; import java.util.function.Consumer; public class TemplateMethod { public static class MyResource { } public static void withResource(Consumer<MyResource> consumer) { try { System.out.println("Open connection"); System.out.println("Prepare resource"); MyResource resource = new MyResource(); consumer.accept(resource); } catch (RuntimeException e) { System.err.println("Careful logging"); } finally { System.out.println("Release resource"); } } public static void main(String[] args) { withResource(resource -> {System.out.println("Do stuff with resource " + resource);}); } }
victorrentea/training-java8/src/main/java/victor/training/java8/patterns/TemplateMethod.java
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2016 Indiana University # # This file is part of AEGeAn (http://github.com/BrendelGroup/AEGeAn) and is # licensed under the ISC license: see LICENSE. # ----------------------------------------------------------------------------- from __future__ import division from __future__ import print_function import argparse import pandas import re def cli(): """Define the command-line interface of the program.""" desc = 'Summarize iLocus content of the specified genome(s)' parser = argparse.ArgumentParser(description=desc) parser.add_argument('-w', '--workdir', metavar='WD', default='./species', help='working directory for data files; default is ' '"./species"') parser.add_argument('--outfmt', metavar='FMT', choices=['tsv', 'tex'], default='tsv', help='output format; "tsv" for machine ' 'readability, "tex" for typesetting') parser.add_argument('species', nargs='+', help='species label(s)') return parser def count_seqs(data): """Count sequences from iLocus positions.""" seqids = dict() for locuspos in data['LocusPos']: posmatch = re.search(r'(\S+)_(\d+)-(\d+)', locuspos) assert posmatch, 'error parsing iLocus position: ' + locuspos seqid = posmatch.group(1) seqids[seqid] = True return len(seqids) def get_row(data, fmt): """Calculate the summary for a row of the table.""" assert fmt in ['tsv', 'tex'] row = [ data['Species'][0], data['EffectiveLength'].sum() / 1000000, count_seqs(data), len(data.loc[data.LocusClass == 'fiLocus']), len(data.loc[data.LocusClass == 'iiLocus']), len(data.loc[data.LocusClass == 'niLocus']), len(data.loc[data.LocusClass == 'siLocus']), len(data.loc[data.LocusClass == 'ciLocus']), ] if fmt == 'tex': row[1] = '{:.1f}'.format(row[1]) for i in range(2, len(row)): row[i] = '{:,d}'.format(row[i]) return row def print_row(values, fmt): assert fmt in ['tsv', 'tex'] if fmt == 'tsv': print(*values, sep='\t') elif fmt == 'tex': vals = ['{:>12}'.format(v) for v in values] + [' \\\\'] print(*vals, sep=' & ') def main(args): column_names = ['Species', 'Mb', '#Seq', 'fiLoci', 'iiLoci', 'niLoci', 'siLoci', 'ciLoci'] print_row(column_names, args.outfmt) for species in args.species: ilocustable = '{wd:s}/{spec:s}/{spec:s}.iloci.tsv'.format( wd=args.workdir, spec=species ) data = pandas.read_table(ilocustable, low_memory=False) row = get_row(data, args.outfmt) print_row(row, args.outfmt) if __name__ == '__main__': main(args=cli().parse_args())
BrendelGroup/AEGeAn-LocusPocus/scripts/fidibus-ilocus-summary.py
import {createStore, applyMiddleware} from 'redux'; import rootReducer from '../reducers'; import thunk from 'redux-thunk'; // handles async API calls by using a wrapping the Action object into a funciton in src/actions/courseActions.js export default function configureStore(initialState) { return createStore( rootReducer, initialState, applyMiddleware(thunk) ); }
RockingChewee/react-redux-building-applications-src/store/configureStore.prod.js
class AtomsController < ApplicationController before_action :set_atom, only: [:show, :edit, :update, :destroy] include ActsAsTaggableOn::TagsHelper # GET /atoms # GET /atoms.json def index if params[:tag] @atoms = Atom.tagged_with(params[:tag]) else @atoms = Atom.all end end # GET /atoms/1 # GET /atoms/1.json def show end # GET /atoms/new def new @atom = Atom.new end # GET /atoms/1/edit def edit end # POST /atoms # POST /atoms.json def create @atom = Atom.new(atom_params) respond_to do |format| if @atom.save format.html { redirect_to @atom, notice: 'Atom was successfully created.' } format.json { render :show, status: :created, location: @atom } else format.html { render :new } format.json { render json: @atom.errors, status: :unprocessable_entity } end end end # PATCH/PUT /atoms/1 # PATCH/PUT /atoms/1.json def update respond_to do |format| if @atom.update(atom_params) format.html { redirect_to @atom, notice: 'Atom was successfully updated.' } format.json { render :show, status: :ok, location: @atom } else format.html { render :edit } format.json { render json: @atom.errors, status: :unprocessable_entity } end end end # DELETE /atoms/1 # DELETE /atoms/1.json def destroy @atom.destroy respond_to do |format| format.html { redirect_to atoms_url, notice: 'Atom was successfully destroyed.' } format.json { head :no_content } end end private # Use callbacks to share common setup or constraints between actions. def set_atom @atom = Atom.find(params[:id]) end # Never trust parameters from the scary internet, only allow the white list through. def atom_params params[:atom].permit(:tag_list, :content, :quote, :quoted_name, :quoted_title, :quoted_org, :img_url, :img_caption, :img_citation, :img_location, :tag_list) end end
redshirtjustin/projectalex-app/controllers/atoms_controller.rb
data:extend({ ---- Alien Control Station { type = "radar", name = "AlienControlStation", icon = "__Natural-Evolution__/graphics/icons/AlienControlStation.png", flags = {"placeable-neutral", "placeable-player", "player-creation"}, minable = {hardness = 0.8, mining_time = 1.5, result = "Building_Materials"}, --- NOTE, when mined, you will lose the Alien artifacts! ---- max_health = 250, corpse = "big-remnants", dying_explosion = "medium-explosion", resistances = { { type = "fire", percent = 70 } }, collision_box = {{-1.4, -1.4}, {1.4, 1.4}}, selection_box = {{-1.5, -1.5}, {1.5, 1.5}}, energy_per_sector = "15MJ", max_distance_of_nearby_sector_revealed = 5, max_distance_of_sector_revealed = 15, energy_per_nearby_scan = "250kJ", energy_source = { type = "electric", usage_priority = "secondary-input" }, energy_usage = "500kW", pictures = { filename = "__Natural-Evolution__/graphics/entity/AlienControlStation.png", priority = "high", width = 128, height = 128, axially_symmetrical = false, apply_projection = false, direction_count = 16, line_length = 4, shift = {0.225, -0.3}, }, }, })
TheSAguy/Natural-Evolution-prototypes/Alien_Control_Station/entity.lua
// ==UserScript== // @name Sticky vote buttons // @namespace http://stackexchange.com/users/4337810/ // @version 1.0 // @description Makes the vote buttons next to posts sticky whilst scrolling on that post // @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/) // @match *://*.stackexchange.com/* // @match *://*.stackoverflow.com/* // @match *://*.superuser.com/* // @match *://*.serverfault.com/* // @match *://*.askubuntu.com/* // @match *://*.stackapps.com/* // @match *://*.mathoverflow.net/* // @require https://cdn.rawgit.com/EnzoMartin/Sticky-Element/master/jquery.stickyelement.js // @grant none // ==/UserScript== $(document).ready(function() { $(window).scroll(function(){ $(".votecell").each(function(){ var offset = 0; if($(".topbar").css("position") == "fixed"){ offset = 34; } var vote = $(this).find(".vote"); if($(this).offset().top - $(window).scrollTop() + offset <= 0){ if($(this).offset().top + $(this).height() + offset - $(window).scrollTop() - vote.height() > 0){ vote.css({position:"fixed", left:$(this).offset().left, top:0 + offset}); }else{ vote.css({position:"relative", left:0, top:$(this).height()-vote.height()}); } }else{ vote.css({position:"relative", left:0, top:0}); } }); }); });
shu8/Stack-Overflow-Optional-Features-Stand-alone-scripts/stickyVoteButtons.user.js
package com.twu.biblioteca; /** * Created by gchasifa on 6/10/15. */ public interface LibraryManager { public abstract void list(); public abstract void checkOut(String name); public abstract void returnTo(String name); }
Gabicha/twu-biblioteca-GabrielaChasifan-src/com/twu/biblioteca/LibraryManager.java
package rpc import ( "context" "log" "net/rpc" "github.com/hashicorp/packer/packer" ) // An implementation of packer.Provisioner where the provisioner is actually // executed over an RPC connection. type provisioner struct { client *rpc.Client mux *muxBroker } // ProvisionerServer wraps a packer.Provisioner implementation and makes it // exportable as part of a Golang RPC server. type ProvisionerServer struct { context context.Context contextCancel func() p packer.Provisioner mux *muxBroker } type ProvisionerPrepareArgs struct { Configs []interface{} } func (p *provisioner) Prepare(configs ...interface{}) (err error) { args := &ProvisionerPrepareArgs{configs} if cerr := p.client.Call("Provisioner.Prepare", args, new(interface{})); cerr != nil { err = cerr } return } func (p *provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.Communicator) error { nextId := p.mux.NextId() server := newServerWithMux(p.mux, nextId) server.RegisterCommunicator(comm) server.RegisterUi(ui) go server.Serve() done := make(chan interface{}) defer close(done) go func() { select { case <-ctx.Done(): log.Printf("Cancelling provisioner after context cancellation %v", ctx.Err()) if err := p.client.Call("Provisioner.Cancel", new(interface{}), new(interface{})); err != nil { log.Printf("Error cancelling provisioner: %s", err) } case <-done: } }() return p.client.Call("Provisioner.Provision", nextId, new(interface{})) } func (p *ProvisionerServer) Prepare(args *ProvisionerPrepareArgs, reply *interface{}) error { return p.p.Prepare(args.Configs...) } func (p *ProvisionerServer) Provision(streamId uint32, reply *interface{}) error { client, err := newClientWithMux(p.mux, streamId) if err != nil { return NewBasicError(err) } defer client.Close() if p.context == nil { p.context, p.contextCancel = context.WithCancel(context.Background()) } if err := p.p.Provision(p.context, client.Ui(), client.Communicator()); err != nil { return NewBasicError(err) } return nil } func (p *ProvisionerServer) Cancel(args *interface{}, reply *interface{}) error { p.contextCancel() return nil }
bryson/packer-packer/rpc/provisioner.go
/** @odoo-module */ import KanbanView from 'web.KanbanView'; import ListView from 'web.ListView'; import viewRegistry from 'web.view_registry'; import { SurveyKanbanRenderer, SurveyListRenderer } from './survey_renderers.js'; const SurveyKanbanView = KanbanView.extend({ config: _.extend({}, KanbanView.prototype.config, { Renderer: SurveyKanbanRenderer, }), }); const SurveyListView = ListView.extend({ config: _.extend({}, ListView.prototype.config, { Renderer: SurveyListRenderer, }), }); viewRegistry.add('survey_view_kanban', SurveyKanbanView); viewRegistry.add('survey_view_tree', SurveyListView); export { SurveyKanbanView, SurveyListView, };
jeremiahyan/odoo-addons/survey/static/src/js/survey_views.js
Membership | ISC VUT Brno Membership Note: Please, if you are new incoming student and you want to register to our buddy system, visit section for incoming students and fill the form. This page is for (local) students who want to join us and help foreign students.___________________________________________________________________________________________________________ Máš zájem se přidat k Mezinárodnímu studentskému klubu (Internatinal Students Club), který je součástí ESN (Erasmus Student Network)? Tak to jsi na správném místě ;). Práci v mezinárodním prostředí společně s lidmi motivovanými a otevřenými k mezinárodnímu prostředí Zlepšení jazykových, komunikačních a měkkých ("soft") dovedností Prostor pro tvoje vlastní projekty a seberealizaci Kontakt se studenty z celého světa být ESNer (= mít přátelé po celé Evropě :)) Pomáháme přijíždějícím zahraničním studentům Osobně asistujeme zahraničním studentům Orientační týden – prolomení kulturních a jazykových bariér u nově přijíždějících studentů Akce, výlety, exkurze a jiné volnočasové aktivity Lekce češtiny (Czech For Fun) a Tandemové jazykové kurzy Komunikační úroveň angličtiny (další jazyky vítány) Časovou dostupnost a flexibilitu Přátelskost a otevřenost Entusiasmus & motivaci :) Chceš vědět víc? Můžeš navštívit naši facebookovou stránku: Chceš si udělat ještě lepší představu, jak to u nás funguje ve skutečnosti? Přijď se podívat na Prezentace národů nebo jinou veřejnou akci. V případě jakýchkoliv dotazů neváhej kontakovat HR: [email protected]. Máš pocit, že tohle není přesně to, co bys chtěl/a dělat? Možná pro tebe bude zajímavější náš "Buddy" program.
c4-cs
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ define(function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace--eiffel"; exports.cssText = require("../requirejs/text!./Eiffel.css"); var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); });
Colorsublime/colorsublime.github.io-ace/lib/ace/theme/Eiffel.js
/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */ char** binaryTreePaths(struct TreeNode* root, int* returnSize) { if(NULL == root){ *returnSize=0; return NULL; } int leftSize = 0; int rightSize = 0; char** left = binaryTreePaths(root->left, &leftSize); char** right = binaryTreePaths(root->right, &rightSize); char** current = NULL; int i=0; int j=0; if(NULL == left && NULL == right){ *returnSize = 1; current = (char**)malloc(sizeof(char*)); current[0] = (char*)malloc(11*sizeof(char)); sprintf(current[0], "%d", root->val); }else if(NULL != left && NULL != right){ *returnSize = leftSize + rightSize; current = (char**)malloc((*returnSize)*sizeof(char*)); for(;i<leftSize;i++){ current[i]=(char*)malloc(11*sizeof(char)+strlen(left[i])); sprintf(current[i], "%d->%s", root->val, left[i]); free(left[i]); } for(;j<rightSize;j++){ current[i+j]=(char*)malloc(11*sizeof(char)+strlen(right[j])); sprintf(current[i+j], "%d->%s", root->val, right[j]); free(right[j]); } }else if(NULL != left && NULL == right){ *returnSize = leftSize; current = (char**)malloc((*returnSize)*sizeof(char*)); for(;i<leftSize;i++){ current[i]=(char*)malloc(11*sizeof(char)+strlen(left[i])); sprintf(current[i], "%d->%s", root->val, left[i]); free(left[i]); } }else if(NULL != right && NULL == left){ *returnSize = rightSize; current = (char**)malloc((*returnSize)*sizeof(char*)); for(;i<rightSize;i++){ current[i]=(char*)malloc(11*sizeof(char)+strlen(right[i])); sprintf(current[i], "%d->%s", root->val, right[i]); free(right[i]); } } return current; }
nolink/algorithm-Leetcode/N257BinaryTreePaths.c
Ext.define('desktop.StartMenu', { extend : 'Ext.panel.Panel', xtype : 'startmenu', ariaRole : 'menu', cls : 'x-menu ux-start-menu', defaultAlign : 'bl-tl', iconCls : 'user', floating : true, shadow : true, width : 300, initComponent : function() { var me = this; var menu = me.menu; me.menu = new Ext.menu.Menu({ cls : 'ux-start-menu-body', border : false, floating : false, items : menu }); me.menu.layout.align = 'stretch'; me.items = [ me.menu ]; me.layout = 'fit'; Ext.menu.Manager.register(me); me.callParent(); me.toolbar = new Ext.toolbar.Toolbar(Ext.apply({ dock : 'right', cls : 'ux-start-menu-toolbar', vertical : true, width : 100, listeners : { add : function(tb, c) { c.on({ click : function() { me.hide(); } }); } } }, me.toolConfig)); me.toolbar.layout.align = 'stretch'; me.addDocked(me.toolbar); delete me.toolItems; }, addMenuItem : function() { var cmp = this.menu; cmp.add.apply(cmp, arguments); }, addToolItem : function() { var cmp = this.toolbar; cmp.add.apply(cmp, arguments); } });
gsys02/extjs-desktop-www/desktop/StartMenu.js
module Monitoring module Host include Misc def monitor begin task = nil TATEX.synchronize do task = Task.create(:action => :deploying, :object => "monit", :target => self.hostname, :target_type => :host) end NOTEX.synchronize do ::Notification.create(:type => :info, :message => I18n.t('task.actions.deploying')+" monit on "+self.hostname, :task => task) end self.reload ret = Deploy.launch(self, "monit", task) if ret != 1 raise ExecutionError, ret[1] else NOTEX.synchronize do msg = "Deploy monit successfully deployed on host "+self.hostname ::Notification.create(:type => :success, :sticky => false, :message => msg, :task => task) end TATEX.synchronize do task.update(:status => :finished) end end rescue ExecutionError => e NOTEX.synchronize do msg = "Unable to monitor host "+self.hostname+": "+e.message ::Notification.create(:type => :error, :sticky => true, :message => msg, :task => task) end TATEX.synchronize do task.update(:status => :failed) end end end def monitor_service(service, task = nil) begin unless File.exist?("data/monitors/"+service) raise end parsed_cfg = Deploy.parse_config(self, "data/monitors/"+service) if self.user != "root" upload_file(parsed_cfg.path, "/tmp/"+service) exec_cmd("sudo mv /tmp/"+service+" /etc/monit/conf.d/"+service) exec_cmd("sudo chown root:root /etc/monit/conf.d/"+service) exec_cmd("sudo /usr/bin/monit -c /etc/monit/monitrc reload") else upload_file(parsed_cfg.path, "/etc/monit/conf.d/"+service) exec_cmd("/usr/bin/monit -c /etc/monit/monitrc reload") end parsed_cfg.unlink return 1 rescue NOTEX.synchronize do msg = "Monitor file not found for service "+service if task.nil? ::Notification.create(:type => :error, :sticky => true, :message => msg) else ::Notification.create(:type => :error, :sticky => true, :message => msg, :task => task) end end return 5 end end def unmonitor_service(service, task = nil) begin if self.user != "root" exec_cmd("sudo rm /etc/monit/conf.d/"+service) exec_cmd("sudo /usr/bin/monit -c /etc/monit/monitrc reload") else exec_cmd("rm /etc/monit/conf.d/"+service) exec_cmd("/usr/bin/monit -c /etc/monit/monitrc reload") end return 1 rescue => e NOTEX.synchronize do msg = "Error un-monitoring "+service+": "+e.message if task.nil? ::Notification.create(:type => :error, :sticky => true, :message => msg) else ::Notification.create(:type => :error, :sticky => true, :message => msg, :task => task) end end return 5 end end def get_status short = true stat = Status.new(self, short) status = 1 if stat.system_status.nil? || stat.system_status == 'down' status = 3 else if stat.system_status != 'ok' status = 2 end stat.services.each do |service| if service[1] != 'ok' status = 2 end end unless stat.services.nil? end MOTEX.synchronize do hoststatus = HostStatus.first(:host_hostname => self.hostname) if hoststatus.nil? HostStatus.create(:host_hostname => self.hostname, :status => status) else hoststatus.update(:status => status) end end return status end def get_full_status short = false stat = Status.new(self, short) return stat end # Status codes: # 4 == not monitored # 3 == host down # 2 == problem # 1 == all ok def is_ok? if self.opt_vars.nil? or self.opt_vars["monitored"].nil? or self.opt_vars["monitored"].to_i != 1 return 4 else hoststatus = HostStatus.first(:host_hostname => self.hostname) if hoststatus.nil? return self.get_status else return hoststatus.status end end end end end
AsydSolutions/ASYD-models/monitor/host_functions.rb
// "Create enum constant 'A'" "true" public enum E {; public static final Foo QQQ; static { QQQ = new Foo((<caret>A.BAR)); } } class Bar { public static final int BAR = 0; }
siosio/intellij-community-java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/createEnumConstantFromUsage/beforeParentheses.java
// // INShoppingListControllerDelegate.h // InDoorNavigation // // Created by Roman Temchenko on 2015-11-14. // Copyright © 2015 Temkal. All rights reserved. // #import <Foundation/Foundation.h> @class INShoppingListItem; @protocol INShoppingListControllerDelegate <NSObject> - (void)showItems:(NSArray<INShoppingListItem *> *)items; @end
AlexUnique/IndoorNavigation-InDoorNavigation/InDoorNavigation/INShoppingListControllerDelegate.h
/* * Licensed to the Technische Universität Darmstadt under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The Technische Universität Darmstadt * licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.tudarmstadt.ukp.clarin.webanno.ui.core.page; public class NameUtil { /** * Check if the name is valid, SPecial characters are not allowed as a project/user name as it * will conflict with file naming system * * @param aName * a name. * @return if the name is valid. */ public static boolean isNameValid(String aName) { if (aName == null || aName.contains("^") || aName.contains("/") || aName.contains("\\") || aName.contains("&") || aName.contains("*") || aName.contains("?") || aName.contains("+") || aName.contains("$") || aName.contains("!") || aName.contains("[") || aName.contains("]")) { return false; } else { return true; } } }
webanno/webanno-webanno-ui-core/src/main/java/de/tudarmstadt/ukp/clarin/webanno/ui/core/page/NameUtil.java
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import collections from oslo_log import log as logging from oslo_utils import reflection from neutron._i18n import _LE from neutron.callbacks import events from neutron.callbacks import exceptions LOG = logging.getLogger(__name__) class CallbacksManager(object): """A callback system that allows objects to cooperate in a loose manner.""" def __init__(self): self.clear() def subscribe(self, callback, resource, event): """Subscribe callback for a resource event. The same callback may register for more than one event. :param callback: the callback. It must raise or return a boolean. :param resource: the resource. It must be a valid resource. :param event: the event. It must be a valid event. """ LOG.debug("Subscribe: %(callback)s %(resource)s %(event)s", {'callback': callback, 'resource': resource, 'event': event}) callback_id = _get_id(callback) try: self._callbacks[resource][event][callback_id] = callback except KeyError: # Initialize the registry for unknown resources and/or events # prior to enlisting the callback. self._callbacks[resource][event] = {} self._callbacks[resource][event][callback_id] = callback # We keep a copy of callbacks to speed the unsubscribe operation. if callback_id not in self._index: self._index[callback_id] = collections.defaultdict(set) self._index[callback_id][resource].add(event) def unsubscribe(self, callback, resource, event): """Unsubscribe callback from the registry. :param callback: the callback. :param resource: the resource. :param event: the event. """ LOG.debug("Unsubscribe: %(callback)s %(resource)s %(event)s", {'callback': callback, 'resource': resource, 'event': event}) callback_id = self._find(callback) if not callback_id: LOG.debug("Callback %s not found", callback_id) return if resource and event: del self._callbacks[resource][event][callback_id] self._index[callback_id][resource].discard(event) if not self._index[callback_id][resource]: del self._index[callback_id][resource] if not self._index[callback_id]: del self._index[callback_id] else: value = '%s,%s' % (resource, event) raise exceptions.Invalid(element='resource,event', value=value) def unsubscribe_by_resource(self, callback, resource): """Unsubscribe callback for any event associated to the resource. :param callback: the callback. :param resource: the resource. """ callback_id = self._find(callback) if callback_id: if resource in self._index[callback_id]: for event in self._index[callback_id][resource]: del self._callbacks[resource][event][callback_id] del self._index[callback_id][resource] if not self._index[callback_id]: del self._index[callback_id] def unsubscribe_all(self, callback): """Unsubscribe callback for all events and all resources. :param callback: the callback. """ callback_id = self._find(callback) if callback_id: for resource, resource_events in self._index[callback_id].items(): for event in resource_events: del self._callbacks[resource][event][callback_id] del self._index[callback_id] def notify(self, resource, event, trigger, **kwargs): """Notify all subscribed callback(s). Dispatch the resource's event to the subscribed callbacks. :param resource: the resource. :param event: the event. :param trigger: the trigger. A reference to the sender of the event. """ errors = self._notify_loop(resource, event, trigger, **kwargs) if errors and event.startswith(events.BEFORE): abort_event = event.replace( events.BEFORE, events.ABORT) self._notify_loop(resource, abort_event, trigger) raise exceptions.CallbackFailure(errors=errors) def clear(self): """Brings the manager to a clean slate.""" self._callbacks = collections.defaultdict(dict) self._index = collections.defaultdict(dict) def _notify_loop(self, resource, event, trigger, **kwargs): """The notification loop.""" LOG.debug("Notify callbacks for %(resource)s, %(event)s", {'resource': resource, 'event': event}) errors = [] callbacks = self._callbacks[resource].get(event, {}).items() # TODO(armax): consider using a GreenPile for callback_id, callback in callbacks: try: LOG.debug("Calling callback %s", callback_id) callback(resource, event, trigger, **kwargs) except Exception as e: LOG.exception(_LE("Error during notification for " "%(callback)s %(resource)s, %(event)s"), {'callback': callback_id, 'resource': resource, 'event': event}) errors.append(exceptions.NotificationError(callback_id, e)) return errors def _find(self, callback): """Return the callback_id if found, None otherwise.""" callback_id = _get_id(callback) return callback_id if callback_id in self._index else None def _get_id(callback): """Return a unique identifier for the callback.""" # TODO(armax): consider using something other than names # https://www.python.org/dev/peps/pep-3155/, but this # might be okay for now. return reflection.get_callable_name(callback)
apporc/neutron-neutron/callbacks/manager.py
class Kallisto < Formula desc "Quantify abundances of transcripts from RNA-Seq data" homepage "https://pachterlab.github.io/kallisto/" url "https://github.com/pachterlab/kallisto/archive/v0.46.2.tar.gz" sha256 "c447ca8ddc40fcbd7d877d7c868bc8b72807aa8823a8a8d659e19bdd515baaf2" license "BSD-2-Clause" bottle do cellar :any_skip_relocation sha256 "7ef1f941663072b0a57597992acf8203ba3664129f305cb8626c0c346e51bf0c" => :catalina sha256 "b2e59c1cc0fc1b07d02bab1cbc1533bcca1edf4bc0b81791d5ac597a7b84cce0" => :mojave sha256 "8491424ec8d4f8e170315e13c5f3bb92895b608c9c7108f260459e06bbbf73f9" => :high_sierra end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "cmake" => :build depends_on "hdf5" def install # Upstream issue 15 Feb 2018 "cmake does not run autoreconf for htslib" # https://github.com/pachterlab/kallisto/issues/159 system "autoreconf", "-fiv", "ext/htslib" system "cmake", ".", *std_cmake_args # Upstream issue 15 Feb 2018 "parallelized build failure" # https://github.com/pachterlab/kallisto/issues/160 # Upstream issue 15 Feb 2018 "cannot use system htslib" # https://github.com/pachterlab/kallisto/issues/161 system "make", "htslib" system "make", "install" end test do (testpath/"test.fasta").write <<~EOS >seq0 FQTWEEFSRAAEKLYLADPMKVRVVLKYRHVDGNLCIKVTDDLVCLVYRTDQAQDVKKIEKF EOS output = shell_output("#{bin}/kallisto index -i test.index test.fasta 2>&1") assert_match "has 1 contigs and contains 32 k-mers", output end end
lembacon/homebrew-core-Formula/kallisto.rb
package com.legendshop.event; public class GenericEvent extends SystemEvent<EventContext> { public GenericEvent(EventContext paramEventContext, BaseEventId paramBaseEventId) { super(paramEventContext, paramBaseEventId); } }
covito/legend-shop-src/main/java/com/legendshop/event/GenericEvent.java
/* This file is part of the Neper software package. */ /* Copyright (C) 2003-2022, Romain Quey. */ /* See the COPYING file in the top-level directory. */ #ifdef __cplusplus extern "C" { #endif /// \file neut_nset.h /// \brief /// \author Romain Quey /// \bug No known bugs #ifndef NEUT_NSET_H #define NEUT_NSET_H extern void neut_nset_expand (struct NSET, struct NSET, struct NSET, char *, char **); extern void neut_nset_set_zero (struct NSET *); extern void neut_nset_free (struct NSET *); extern void neut_nsets_inter (struct NSET NSet, int id1, int id2, char **pname, int **pnodes, int *pnodeqty); #endif /* NEUT_NSET_H */ #ifdef __cplusplus } #endif
rquey/neper-src/neut/neut_nset/neut_nset.h
/* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */ #ifndef _ATM_CONFIG_H #define _ATM_CONFIG_H /* Define if lex declares yytext as a char * by default, not a char[]. */ #define YYTEXT_POINTER 1 /* Default config file location for atmsigd */ #define ATMSIGD_CONF "/usr/local/etc/atmsigd.conf" #define YY_USE_CONST 1 /* The UNI version can be configured at run time. Dynamic is the default. Use the explicit version selections only in case of problems. */ #define DYNAMIC_UNI 1 /* #undef UNI30 */ /* Note: some UNI 3.0 switches will show really strange behaviour if confronted with using 3.1 signaling, so be sure to test your network *very* carefully before permanently configuring machines to use UNI 3.1. */ /* #undef UNI31 */ /* #undef ALLOW_UNI30 */ /* Some partial support for UNI 4.0 can be enabled by using UNI40 */ /* #undef UNI40 */ /* If using UNI40, you can also enable peak cell rate modification as specified in Q.2963.1 */ /* #undef Q2963_1 */ /* If you're using a Cisco LS100 or LS7010 switch, you should add the following line to work around a bug in their point-to-multipoint signaling (it got confused when receiving a CALL PROCEEDING, so we don't send it, which of course makes our clearing procedure slightly non-conformant): */ /* #undef CISCO */ /* Some versions of the Thomson Thomflex 5000 won't do any signaling before they get a RESTART. Uncomment the next line to enable sending of a RESTART whenever SAAL comes up. Note that the RESTART ACKNOWLEDGE sent in response to the RESTART will yield a warning, because we don't implement the full RESTART state machine. */ /* #undef THOMFLEX */ /* Use select() instead of poll() with MPOA */ #define BROKEN_POLL 1 /* Use proposed MPOA 1.1 features */ /* #undef MPOA_1_1 */ /* Define if you have the mpr library (-lmpr). */ /* #undef HAVE_LIBMPR */ /* Define if you have the resolv library (-lresolv). */ #define HAVE_LIBRESOLV 1 /* Name of package */ #define PACKAGE "linux-atm" /* Version number of package */ #define VERSION "2.4.0" #endif
ysleu/RTL8685-uClinux-dist/lib/libatm/config.h
সিনেমায় ধূমপান করে বিপাকে শাকিব খান, আইনি নোটিশ | দৈনিক মাথাভাঙ্গা সিনেমায় ধূমপান করে বিপাকে শাকিব খান, আইনি নোটিশ | দৈনিক মাথাভাঙ্গা বাড়ি বিনোদন সিনেমায় ধূমপান করে বিপাকে শাকিব খান, আইনি নোটিশ অনলাইন ডেস্ক: সিনেমায় ধূমপান করে বিপাকে পড়তে যাচ্ছেন ঢাকাই ছবির চিত্রনায়ক শাকিব খান ও তার সদ্য মুক্তিপ্রাপ্ত ‘শাহেন শাহ’ সিনেমার সংশ্লিষ্টরা। ছবির কয়েকটি দৃশ্যে ধূমপান ও তামাকজাত দ্রব্য ব্যবহার (নিয়ন্ত্রণ) আইন ভঙ্গ করা হয়েছে জানিয়ে তার ব্যবস্থা গ্রহণ করতে চার সচিবসহ মোট পাঁচ জনকে আইনি নোটিশ পাঠিয়েছেন আদালত। সে নোটিশের অনুলিপি পাঠানো হয়েছে ‘শাহেন শাহ’ সিনেমার পরিচালক ও প্রযোজক সংস্থার কাছেও। বাংলাদেশ ক্যানসার সোসাইটি, মাদকবিরোধী সংগঠন ‘প্রত্যাশা’ এবং পপুলেশন ডেভেলপমেন্ট অর্গানাইজেশনের (পিডিও) পক্ষে বুধবার রেজিস্ট্রি ডাকযোগে এ নোটিশ পাঠান সুপ্রিমকোর্টের আইনজীবী মনিরুজ্জামান লিংকন। নোটিশ গ্রহীতারা হলেন- স্বাস্থ্য ও পরিবার পরিকল্পনা মন্ত্রণালয়, আইন মন্ত্রণালয়, স্বরাষ্ট্র মন্ত্রণালয় ও তথ্য মন্ত্রণালয়ের সচিব এবং বাংলাদেশ চলচ্চিত্র সেন্সর বোর্ডের চেয়ারম্যান। নোটিশে বলা হয়েছে, সম্প্রতি মুক্তিপ্রাপ্ত শাকিব খান অভিনীত ‘শাহেন শাহ’ চলচ্চিত্রের একাধিক দৃশ্যে ধূমপানের দৃশ্য রয়েছে। কিন্তু এসব দৃশ্যে কোনো সতর্কবার্তা ব্যবহার করা তো হয়নি বরং নানা নাটকীয় ভঙ্গিতে ধূমপানের দৃশ্যকে আকর্ষণীয় করার চেষ্টা করা হয়েছে। এটি একটি গর্হিত অন্যায়। এতে ধূমপান ও তামাকজাত দ্রব্য ব্যবহার (নিয়ন্ত্রণ) আইন ভঙ্গ করা হয়েছে। তাই ধূমপান ও তামাকজাত দ্রব্য ব্যবহার (নিয়ন্ত্রণ) আইন-২০০৫ ভঙ্গ করে সিনেমাটিতে কীভাবে ধূমপানের দৃশ্য ধারণ করা হয়েছে এবং তা প্রদর্শনীতে অনুমতি দেয়া হয়েছে সরকার এবং সংশ্লিষ্টদের কাছে তার ব্যাখ্যা চেয়েছেন আদালত। আগামী ১০ দিনের মধ্যে নোটিশ গ্রহীতাদের প্রয়োজনীয় ব্যবস্থা গ্রহণ করতে বলা হয়েছে। অন্যথায় এ বিষয়ে প্রতিকার চেয়ে হাইকোর্টে রিট দায়ের করা হবে বলেও নোটিশে উল্লেখ করা হয়। পূর্ববর্তী নিবন্ধপরিচালকের সঙ্গে বিয়ের কথা বলতেই তেড়ে উঠলেন নায়িকা! পরবর্তী নিবন্ধএক্সপ্রেসওয়ে যুগে বাংলাদেশ ১,০৭৪,৪৮৮ ২২৭,৬৫৬ ৫৮,১০৯
c4-bn
Callsign # Thread: Help building a 20 Meter(And maybe an 80M) extended double zepp 1. Ham Member Join Date Feb 2006 Posts 104 ## Help building a 20 Meter(And maybe an 80M) extended double zepp Although I already have a dipole cut for 160 meters, it's performance is not great, so I was looking into building first a 20M extended double zepp, then maybe cutting down the length of the 160M antenna to get a 80 M extended double zepp. What I am having an issue is is with the length of both the wire tops, and the feed-line (300 ohm). Starting with the 20 meter EDZ, how long do I need to cut each side of the dipole (using 12awg solid copper wire, insulated.) And also, what is the proper length for the feed-line so I won't be attaching it to the 4:1 balun at a high impedance point where I'll be impossible to tune up on my rig. I am looking at a distance of 100ft of less for the 300 ohm feed-line to the 20M EDZ, and less than 200 or so feet going out to the big 160M dipole. So, for the 20 M EDZ, what should the length of each of the sides of the dipole be? What is the proper length for the 300 ohm feed-line (the dipole will be less than 100ft from the house, so any multiples around 60-80 ft or so would be good.) If I want to turn the 160M dipole into a 80M EDZ, again, what should each length of each side of the dipole be? How long should the feed-line be? I have about 200ft of 300 ohm ladder line ruining out to it now, but I can shorten or lengthen it a bit if needed. Thanks in advance for the math problems! 73's 2. Ham Member Join Date Mar 2001 Location Occom, CT a village or borough of the city of Norwich CT Posts 67 I've had some interest in the same thing niggling at the back of my brain, so your post prompted a quick Google search which yielded this chart : http://www.qsl.net/n4xy/PDFs/ANTs/ant_edz.pdf The same search produced this article, which goes into the discussion of feedline length : http://www.w5dxp.com/rotdip.htm I only glanced over both, but I'll be reading them in a little more depth later when I have more time to contemplate doing this, myself. Good luck 73 Greg N1KPW Last edited by N1KPW; 06-28-2012 at 10:00 AM. Reason: link text didnt show up on post 3. Here is another site that has some good info. home.comcast.net/~n8itf/doubzepp.htm Good day Dennis 4. Ham Member Join Date Jan 2000 Posts 1,854 A tid bit of information I hope you will find useful: The EDZ gets its gain by squeezing the pattern down into narrower lobes. There will be a beamwidth of 35 to 40 degrees (bi-directional) where it will have more gain than a half wave dipole. In all other directions the half wave dipole will have more gain, and in the directions where the EDZ has a null, the gain of the half wave dipole will be a lot more than the EDZ (maybe 10 to 15 dB more). The EDZ is a good antenna if you have one direction that you want coverage and can aim the antenna. It is a poor general purpose antenna because the area coverage is low. Jerry, K4SAV 5. It is a poor general purpose antenna because the area coverage is low. Jerry, K4SAV True, if it is a fixed wire EDZ---but not if it is rotatable (see W5DXP's version linked earlier)! Same gain as a two-element Yagi on some frequencies and still better than a dipole on others. Only wish I had the space for a 44' rotatable EDZ! 73, Jeff 6. Originally Posted by AB2UI So, for the 20 M EDZ, what should the length of each of the sides of the dipole be? What is the proper length for the 300 ohm feed-line (the dipole will be less than 100ft from the house, so any multiples around 60-80 ft or so would be good.) An EDZ's length is ~1200/f so each side for 14.2 MHz would be ~83 feet. The feedline should be 0.18WL plus N*0.5WL, so for VF-0.9 it should be ~22' plus N*61.5' so something around 84' would be excellent. If I want to turn the 160M dipole into a 80M EDZ, again, what should each length of each side of the dipole be? How long should the feed-line be? Using the above formulas for 3.8 MHz, each element of the dipole should be ~158' and the series section transformer should be ~42' long. However, please note that an EDZ needs to be at least 1/2WL high to get the full EDZ effect and that's hard to do on 80m. Also please note that your 20m EDZ fed with ~84' of twinlead will be resonant somewhere around the middle of 80m. Save yourself the trouble of the 80m EDZ and just use the 20m EDZ for 80m operation. At a reasonable height, you probably cannot tell the difference in actual operation. Also, the 20m EDZ can be used on all HF bands with a tuner. IOW-IMO, your 80m EDZ would be a waste of time. Originally Posted by NH7RO Only wish I had the space for a 44' rotatable EDZ! I have settled for a 33' rotatable dipole that works well 20m-10m. With a 64' length of twinlead, my IC-756PRO achieves a good match on 20m, 17m, and 12m. Take away 9' of twinlead and it tunes well on 15m and 10m. Last edited by W5DXP; 06-28-2012 at 03:37 PM. 7. Ham Member Join Date Mar 2007 Posts 3,876 Originally Posted by W5DXP Using the above formulas for 3.8 MHz, each element of the dipole should be ~158' and the series section transformer should be ~42' long. Cecil, Is that the right dipole length? Or is my calculator playing up again Edit: it's not the calculator, it's the brain! Please ignore Steve G3TXQ 8. Ham Member Join Date Jan 2000 Posts 1,854 Originally Posted by NH7RO True, if it is a fixed wire EDZ---but not if it is rotatable (see W5DXP's version linked earlier)! Same gain as a two-element Yagi on some frequencies and still better than a dipole on others. Only wish I had the space for a 44' rotatable EDZ! 73, Jeff Since a wire version of an EDZ for 14.1 MHz has a total length of about 86.8 ft, (each side is 0.64 wavelength) it's a little difficult to rotate. It would be much easier to rotate a two element 20 meter Yagi. The Yagi also has a beamwidth of approximately twice that of the EDZ. The exact length to get 0.64 wavelengths varies a little with wire size, insulation, and height above ground, so you will see different formulas in different places. Since an EDZ is a non-resonant antenna, the exact length isn't critical and you might want to vary that a little to facilitate the matching. Jerry, K4SAV 9. Ham Member Join Date Feb 2006 Posts 104 I found another side dealing with DEZ: http://home.comcast.net/~n8itf/doubzepp.htm According to this each side should be 42' 3" for a total length of 84' 6". I already have a large 160m dipole that tunes great on 20 meters. I was just thinking about sitting another dipole that would five me some gain a d hopefully be able for me to tune to 6m easier than the 160.). And yes I know I could just build a resonant antenna with coax cut for 6m but that seems rather boring. For this antenna I'll be using insulated 12 awg with 300 ohm ladder line in the middle going to a LDG 4:1 balun. 10. Ham Member Join Date Feb 2006 Posts 104 Oh. One more thing...... If anyone is handy with antenna modeling software I would LOVE to see a 3D model of this antenna. Figure that the dipole will be about 1/4 to 1/2 wavelength from The ground. Ground type is hard dirk and rock, like you would find in the woods. #### Posting Permissions • You may not post new threads • You may not post replies • You may not post attachments • You may not edit your posts •
finemath-3plus
package stl // This file defines functions to write a Solid into the STL binary format. import ( "encoding/binary" "io" "math" ) // Write solid in binary STL into an io.Writer. // Does not check whether len(solid.Triangles) fits into uint32. func writeSolidBinary(w io.Writer, solid *Solid) error { headerBuf := make([]byte, binaryHeaderSize) if solid.BinaryHeader == nil { // use name if no binary header set copy(headerBuf, solid.Name) } else { copy(headerBuf, solid.BinaryHeader) } // Write triangle count binary.LittleEndian.PutUint32(headerBuf[80:84], uint32(len(solid.Triangles))) _, errHeader := w.Write(headerBuf) if errHeader != nil { return errHeader } // Write each triangle for _, t := range solid.Triangles { tErr := writeTriangleBinary(w, &t) if tErr != nil { return tErr } } return nil } func writeTriangleBinary(w io.Writer, t *Triangle) error { buf := make([]byte, 50) offset := 0 encodePoint(buf, &offset, &t.Normal) encodePoint(buf, &offset, &t.Vertices[0]) encodePoint(buf, &offset, &t.Vertices[1]) encodePoint(buf, &offset, &t.Vertices[2]) encodeUint16(buf, &offset, t.Attributes) _, err := w.Write(buf) return err } func encodePoint(buf []byte, offset *int, pt *Vec3) { encodeFloat32(buf, offset, pt[0]) encodeFloat32(buf, offset, pt[1]) encodeFloat32(buf, offset, pt[2]) } func encodeFloat32(buf []byte, offset *int, f float32) { u32 := math.Float32bits(f) binary.LittleEndian.PutUint32(buf[*offset:(*offset)+4], u32) *offset += 4 } func encodeUint16(buf []byte, offset *int, u uint16) { binary.LittleEndian.PutUint16(buf[*offset:(*offset)+2], u) *offset += 2 }
hschendel/stl-writebinary.go
#ifndef _KERNEL_VGA_COLORS #define _KERNEL_VGA_COLORS enum vga_color { VGA_COLOR_BLACK = 0, VGA_COLOR_BLUE = 1, VGA_COLOR_GREEN = 2, VGA_COLOR_CYAN = 3, VGA_COLOR_RED = 4, VGA_COLOR_MAGENTA = 5, VGA_COLOR_BROWN = 6, VGA_COLOR_LIGHT_GREY = 7, VGA_COLOR_DARK_GREY = 8, VGA_COLOR_LIGHT_BLUE = 9, VGA_COLOR_LIGHT_GREEN = 10, VGA_COLOR_LIGHT_CYAN = 11, VGA_COLOR_LIGHT_RED = 12, VGA_COLOR_LIGHT_MAGENTA = 13, VGA_COLOR_LIGHT_BROWN = 14, VGA_COLOR_WHITE = 15, }; #endif
0xqookie/KukkiOS-drivers/devices/video/vga/vga_colors.h
// // NSViewController+PGWSConstraintConvenience.h // BurntIcing // // Created by Patrick Smith on 28/02/2015. // Copyright (c) 2015 Burnt Caramel. All rights reserved. // @import Cocoa; @interface NSViewController (PGWSConstraintConvenience) - (NSLayoutConstraint *)layoutConstraintWithIdentifier:(NSString *)constraintIdentifier; + (NSString *)layoutConstraintIdentifierWithBaseIdentifier:(NSString *)baseIdentifier forChildView:(NSView *)innerView; - (NSLayoutConstraint *)layoutConstraintWithIdentifier:(NSString *)baseIdentifier forChildView:(NSView *)innerView; #pragma mark - - (NSLayoutConstraint *)addLayoutConstraintToMatchAttribute:(NSLayoutAttribute)attribute withChildView:(NSView *)innerView identifier:(NSString *)identifier priority:(NSLayoutPriority)priority; - (NSLayoutConstraint *)addLayoutConstraintToMatchAttribute:(NSLayoutAttribute)attribute withChildView:(NSView *)innerView identifier:(NSString *)identifier; - (void)fillViewWithChildView:(NSView *)innerView; - (void)fillWithChildViewController:(NSViewController *)childViewController; @end
BurntCaramel/Lantern-Lantern/NSViewController+PGWSConstraintConvenience.h
Страна Беларусь. Иллюстрированная история: KNIHI.BY - інтэрнэт-крама беларускай кнігі Памер: 220x290 мм ГісторыяПеракладыНавукова-папулярная літаратураЛітаратура на іншых мовахПа-расейскуАрлоў УладзімерГерасімовіч Зьміцер Иллюстрации Паглядзець
c4-be
/* SPDX-License-Identifier: MIT */ /* * Copyright © 2021 Intel Corporation */ #define I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT 2 /* see i915_context_engines_parallel_submit */ /** * struct drm_i915_context_engines_parallel_submit - Configure engine for * parallel submission. * * Setup a slot in the context engine map to allow multiple BBs to be submitted * in a single execbuf IOCTL. Those BBs will then be scheduled to run on the GPU * in parallel. Multiple hardware contexts are created internally in the i915 * run these BBs. Once a slot is configured for N BBs only N BBs can be * submitted in each execbuf IOCTL and this is implicit behavior e.g. The user * doesn't tell the execbuf IOCTL there are N BBs, the execbuf IOCTL knows how * many BBs there are based on the slot's configuration. The N BBs are the last * N buffer objects or first N if I915_EXEC_BATCH_FIRST is set. * * The default placement behavior is to create implicit bonds between each * context if each context maps to more than 1 physical engine (e.g. context is * a virtual engine). Also we only allow contexts of same engine class and these * contexts must be in logically contiguous order. Examples of the placement * behavior described below. Lastly, the default is to not allow BBs to * preempted mid BB rather insert coordinated preemption on all hardware * contexts between each set of BBs. Flags may be added in the future to change * both of these default behaviors. * * Returns -EINVAL if hardware context placement configuration is invalid or if * the placement configuration isn't supported on the platform / submission * interface. * Returns -ENODEV if extension isn't supported on the platform / submission * interface. * * .. code-block:: none * * Example 1 pseudo code: * CS[X] = generic engine of same class, logical instance X * INVALID = I915_ENGINE_CLASS_INVALID, I915_ENGINE_CLASS_INVALID_NONE * set_engines(INVALID) * set_parallel(engine_index=0, width=2, num_siblings=1, * engines=CS[0],CS[1]) * * Results in the following valid placement: * CS[0], CS[1] * * Example 2 pseudo code: * CS[X] = generic engine of same class, logical instance X * INVALID = I915_ENGINE_CLASS_INVALID, I915_ENGINE_CLASS_INVALID_NONE * set_engines(INVALID) * set_parallel(engine_index=0, width=2, num_siblings=2, * engines=CS[0],CS[2],CS[1],CS[3]) * * Results in the following valid placements: * CS[0], CS[1] * CS[2], CS[3] * * This can also be thought of as 2 virtual engines described by 2-D array * in the engines the field with bonds placed between each index of the * virtual engines. e.g. CS[0] is bonded to CS[1], CS[2] is bonded to * CS[3]. * VE[0] = CS[0], CS[2] * VE[1] = CS[1], CS[3] * * Example 3 pseudo code: * CS[X] = generic engine of same class, logical instance X * INVALID = I915_ENGINE_CLASS_INVALID, I915_ENGINE_CLASS_INVALID_NONE * set_engines(INVALID) * set_parallel(engine_index=0, width=2, num_siblings=2, * engines=CS[0],CS[1],CS[1],CS[3]) * * Results in the following valid and invalid placements: * CS[0], CS[1] * CS[1], CS[3] - Not logical contiguous, return -EINVAL */ struct drm_i915_context_engines_parallel_submit { /** * @base: base user extension. */ struct i915_user_extension base; /** * @engine_index: slot for parallel engine */ __u16 engine_index; /** * @width: number of contexts per parallel engine */ __u16 width; /** * @num_siblings: number of siblings per context */ __u16 num_siblings; /** * @mbz16: reserved for future use; must be zero */ __u16 mbz16; /** * @flags: all undefined flags must be zero, currently not defined flags */ __u64 flags; /** * @mbz64: reserved for future use; must be zero */ __u64 mbz64[3]; /** * @engines: 2-d array of engine instances to configure parallel engine * * length = width (i) * num_siblings (j) * index = j + i * num_siblings */ struct i915_engine_class_instance engines[0]; } __packed;
tprrt/linux-stable-Documentation/gpu/rfc/i915_parallel_execbuf.h
// #define ENABLE_BUG_BUTTON using UnityEngine; using System.Collections; public class EndDeathScript : MonoBehaviour { private const float LABEL_WIDTH = 180.0f; private const float LABEL_HEIGHT = 100.0f; private const float BUTTON_WIDTH = 200.0f; private const float BUTTON_HEIGHT = 80.0f; private const float RESET_TIME = 1.0f; public float minDistanceForWarning = 10.0f; public bool explode = true; private Vector2 screenSpacePos; private float distance; public string WorldMapSceneName; public ThirdPersonCamera aCam; public static bool hasFinished = false; public GameObject playerWarningPrefab; private GameObject player; private GameObject playerWarning; private GrapplingHook grapplingHook; void Start() { hasFinished = false; player = GameObject.Find("Player"); grapplingHook = player.GetComponent<GrapplingHook>(); if (playerWarningPrefab != null) playerWarning = GameObject.Instantiate(playerWarningPrefab) as GameObject; } void Update() { if (playerWarning != null) { // Move death warning under player Vector3 position = player.transform.position; position.y = transform.position.y + collider.bounds.extents.y; playerWarning.transform.position = position; // Fade its transparency on player distance Color colour = playerWarning.renderer.material.color; float dist = (player.transform.position - playerWarning.transform.position).magnitude; colour.a = minDistanceForWarning / dist; playerWarning.renderer.material.color = colour; } } void OnTriggerEnter(Collider collided) { if (collided.tag == "Player" && TutorialCamera.Enabled()) { GameRecorder.StopPlayback(); if (explode) { collided.gameObject.SendMessage("Explode"); SoundManager.Play("crash"); collided.gameObject.SendMessage("Reload"); } return; } if (collided.tag == "Player" && !LevelState.Dead) { // Disable text GUIController.DisableTexts(); // Update drone count if (SaveManager.save != null) { SaveManager.save.droneCount++; SaveManager.Write(); // Display drone coun GameObject thingy = Tutorial.ShowText("DroneText", "Drones lost: " + SaveManager.save.droneCount, 0, TextAlignment.Center, TextAnchor.MiddleCenter, 0.5f, 0.5f); Mover mover = thingy.AddComponent<Mover>(); mover.direction = Vector3.up; mover.speed = 0.2f; TextFader fader = thingy.AddComponent<TextFader>(); fader.fadeRate = 1.0f; fader.FadeOut(); } // Update level state GUIController.LevelStarted = false; LevelStart.started = false; LevelState.Dead = true; if (explode) { // Create explosion effect collided.gameObject.SendMessage("Explode"); // Crash sound SoundManager.Play("crash"); // Disable renderers if exploding player.renderer.enabled = false; player.transform.FindChild("Shield").renderer.enabled = false; } // Disable default camera controller until level restarts ThirdPersonCamera cameraController = Camera.mainCamera.GetComponent<ThirdPersonCamera>(); if (cameraController != null) cameraController.enabled = false; // Detach grappling hook so we don't keep swinging grapplingHook.Detach(); // I don't really remember why ControlManager.DisabledFrame = true; // Pause and then restart the level StartCoroutine(PauseBeforeReset()); } } IEnumerator PauseBeforeReset() { float time = 0.0f; while (time < RESET_TIME && !Input.GetMouseButtonUp(0)) { time += Time.deltaTime; yield return null; } // Stop the recording, and also the line it generates GameRecorder.StopRecording(); // Reset player player.BroadcastMessage("Reload"); player.renderer.enabled = true; // Lerp camera back to start transform Camera.mainCamera.SendMessage("LerpToStartPos"); } }
Pillowdrift/StellarSwingClassic-Assets/Scripts/EndDeathScript.cs
/* * The MIT License * * Copyright 2013 gburdell. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package apfe.runtime; public class EndOfFile extends Acceptor { public EndOfFile() { } @Override protected boolean accepti() { CharBuffer buf = CharBufState.asMe().getBuf(); final char c = buf.la(); boolean match = (CharBuffer.EOF == c); if (match) { buf.accept(); } else { ParseError.push(c, "<EOF>"); } return match; } @Override public Acceptor create() { return new EndOfFile(); } @Override public String toString() { return ""; } /**NOTE: We don't memoize since cost seems high. * */ }
gburdell/apfe-src/apfe/runtime/EndOfFile.java
/* * Copyright 2021 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.dmn.client.widgets.codecompletion.feel; public enum CompletionItemKind { Method(0), Function(1), Constructor(2), Field(3), Variable(4), Class(5), Struct(6), Interface(7), Module(8), Property(9), Event(10), Operator(11), Unit(12), Value(13), Constant(14), Enum(15), EnumMember(16), Keyword(17), Text(18), Color(19), File(20), Reference(21), Customcolor(22), Folder(23), TypeParameter(24), User(25), Issue(26), Snippet(27); private final int value; CompletionItemKind(final int value) { this.value = value; } public int getValue() { return value; } }
jomarko/kie-wb-common-kie-wb-common-dmn/kie-wb-common-dmn-client/src/main/java/org/kie/workbench/common/dmn/client/widgets/codecompletion/feel/CompletionItemKind.java
avui l'alumnat de r de batxillerat ha fet una sortida molt enriquidora des de la matèria de català: la ruta de pompeu fabra, una ruta cultural que evoca els episodis més re. llegir més · count adjunts. mar . viatge a roma de n de batxillerat. l'alumnat de n de batxillerat, acompanyat de dues professores, centre, principal, oferta. per accedir al web premeu la imatge central. contacte. web optimizada per resolució x , internet explorer . o superior. ins gerbert d'aurillac. institut d'educació secundària que dóna servei educatiu als joves de a anys. e.s.o (educació secundària obligatòria) r cicle: r e.s.o n e.s.o n cicle: r e.s.o t e.s.o. batxillerat de a anys tecnològic científic tecnològic ciències de la naturalesa i la Vu sur iesgerbert.cat Vu sur santfruitos.cat com arribarhi: per tren: estació abella centre de la línia ; per bus: línies l i l. escoles adscrites a l'institut: escola l'arany, escola la ribera, escola el sol, col·legi primavera. correus electrònics de contacte. centre. bustia general: bustiainslarany.cat; director: direccioinslarany.cat; cap d'estudis eso i posts see instagram photos and videos taken at 'ins gerbert d'aurillac' gerbert d'aurillac (né entre et à aurillac, en auvergne mort le mai à rome), dit le « savant gerbert », pape sous le nom de sylvestre ii de à , est un philosophe, un mathématicien et un mécanicien. il contribua à l'introduction et à l'essor en occident de la numération de position, des tables né en auvergne, gerbert fait ses études au monastère de saintgéraud d'aurillac. il est présenté au pape jean xiii pour sa science exceptionnelle, puis à l'empereur otton ier ; adalbéron, évêque de reims, le fait écolâtre de son studium épiscopal : gerbert y enseigne et y fait enseigner toutes les connaissances possibles, ins gerbert d'aurillac, san fructuoso de bagés, cataluna, spain. interest. déc. la cançó optimista dels alumnes de l'ins gerbert d'aurillac de sant fruitós del bages: bon dia, d'els pets. Édition : gerbert, correspondance, nos et , p. . transcription pi adalberoni^ archiepiscopo. ii antiquis palatiis meis usque ad fundamenta ll dirutis, etiam renascens palatium, quod michi edificare inslltituistis, diluvio vestri pêne absortum est. instamus, ac propriis sumpti llbus fabricam tanti operis Vu sur radiosantfruitos.cat cercle gradue en degre
c4-ca
var expectThat = require('./main.js'); var util, Path= require('path'); try { util = require('util') } catch(e) { util = require('sys') } // The options exposed by jasmine-node are passed through. var args = process.argv.slice(2); var isVerbose = true; var showColors = true; var teamcity = process.env.TEAMCITY_PROJECT_NAME || false; var useRequireJs = false; var extensions = 'js'; var specFolder = null; var useHelpers = false; var match = '.' var junitreport = { report: false, savePath : "./reports/", useDotNotation: true, consolidate: true } while(args.length) { var arg = args.shift(); switch(arg) { case '--color': showColors = true; break; case '--noColor': case '--nocolor': showColors = false; break; case '--version': util.print("expectThat version: " + expectThat.expectThatApi.version + "\n"); process.exit(-1); break; case '--verbose': isVerbose = true; break; case '--coffee': require('coffee-script'); extensions = "js|coffee"; break; case '-m': case '--match': match = args.shift(); break; case '--junitreport': junitreport.report = true; break; case '--teamcity': teamcity = true; break; case '--runWithRequireJs': useRequireJs = true; break; case '--nohelpers': useHelpers = false; break; case '--test-dir': var dir = args.shift(); if(!Path.existsSync(dir)) throw new Error("Test root path '" + dir + "' doesn't exist!"); specFolder = dir; // NOTE: Does not look from current working directory. break; case '-h': help(); default: if (arg.match(/^--/)) help(); specFolder = Path.join(process.cwd(), arg); break; } } if (!specFolder) { help(); } var exitCode = 0; process.on("exit", onExit); function onExit() { process.removeListener("exit", onExit); process.exit(exitCode); } if(useHelpers){ expectThat.jasmine.loadHelpersInFolder(specFolder, new RegExp("helpers?\\.(" + extentions + ")$", 'i')); } expectThat.executeJasmineSpecs(specFolder, isVerbose, showColors, useRequireJs, teamcity, extensions, junitreport, match); function help(){ util.print([ 'USAGE: expectThat.jasmine-node [--color|--noColor] [--verbose] [--coffee] directory' , '' , 'Options:' , ' --color - use color coding for output' , ' --noColor - do not use color coding for output' , ' -m, --match REGEXP - load only specs containing "REGEXPspec"' , ' --version - displays the version of expectThat.jasmine that is being used' , ' --verbose - print extra information per each test run' , ' --coffee - load coffee-script which allows execution .coffee files' , ' --junitreport - export tests results as junitreport xml format' , ' --teamcity - converts all console output to teamcity custom test runner commands. (Normally auto detected.)' , ' --runWithRequireJs - loads all specs using requirejs instead of node\'s native require method' , ' --test-dir - the absolute root directory path where tests are located' , ' --nohelpers - does not load helpers.' , ' -h, --help - display this help and exit' , '' ].join("\n")); process.exit(-1); }
dmohl/expectThat-npm/ExpectThat.Jasmine.Node/lib/cli.js
class Libcouchbase < Formula desc "C library for Couchbase" homepage "https://docs.couchbase.com/c-sdk/3.0/hello-world/start-using-sdk.html" url "https://packages.couchbase.com/clients/c/libcouchbase-3.0.3.tar.gz" sha256 "84dd0256feefefdf48fe9dbda57e2b56119564027e201846b688add020baabd8" license "Apache-2.0" head "https://github.com/couchbase/libcouchbase.git" bottle do sha256 "ea1bb61a1b1004aef8854f84b1d587b9682313b34aedd231121ef6d21e4aac1b" => :catalina sha256 "f3a1939de16fe2e1f54db4aa56805436818b075d692aa36c40d15f3ae2303fbd" => :mojave sha256 "32623da3e2d5f30fe7387574d0eb175c4c55d9e37b2e115c1169fb0b097d8a45" => :high_sierra end depends_on "cmake" => :build depends_on "libev" depends_on "libevent" depends_on "libuv" depends_on "[email protected]" def install mkdir "build" do system "cmake", "..", *std_cmake_args, "-DLCB_NO_TESTS=1", "-DLCB_BUILD_LIBEVENT=ON", "-DLCB_BUILD_LIBEV=ON", "-DLCB_BUILD_LIBUV=ON" system "make", "install" end end test do assert_match /LCB_ERR_CONNECTION_REFUSED/, shell_output("#{bin}/cbc cat document_id -U couchbase://localhost:1 2>&1", 1).strip end end
lembacon/homebrew-core-Formula/libcouchbase.rb
 Адзін дзень з брыгадай хуткай дапамогі | zviazda.by Хатняя старонка » Грамадства » Адзін дзень з брыгадай хуткай дапамогі Адзін дзень з брыгадай хуткай дапамогі Белыя машыны з чырвонымі надпісамі ездзяць па горадзе і днём, і ноччу, а што адбываецца ўнутры, мы можам толькі здагадвацца. Шчаслівыя тыя, каму не даводзілася туды трапляць. Карэспандэнты «Звязды» правялі разам з супрацоўнікамі хуткай медыцынскай дапамогі больш за дванаццаць гадзін і даведаліся пра асаблівасці іх работы. Дзясятая падстанцыя хуткай медыцынскай дапамогі Мінска адкрылася ўсяго два гады таму. Фельдшар Святлана Цітова, перш чым заступіць на дзяжурства і пачаць непасрэдна знаёміць нас са сваёй працай, праводзіць экскурсію па будынку. — Тут сталовая, там душавыя, а гэта мой пакой для адпачынку, — жанчына запрашае ўнутр: чатыры ложкі (для кожнага супрацоўніка свой), два крэслы, тэлевізар. — Утульна. Хаця мы, канешне, надоўга тут ніколі не затрымліваемся. «Наша работа без права на сон, але з правам на адпачынак», — адзначае загадчыца падстанцыі Ірына Рудая. Нават калі нехта задрамаў, «правароніць» выклік не атрымаецца, паколькі па ўсёй падстанцыі і нават на вуліцы ўсталяваны селектары (нешта накшталт радыё). Праз іх дыспетчар перадае нумар брыгады і прозвішчы супрацоўнікаў, якія выязджаюць на выклік. За лічаныя секунды, дзе б ты ні быў, павінен з'явіцца на першым паверсе, каб высветліць падрабязнасці, забраць неабходныя рэчы і адправіцца ў дарогу. Змена брыгады 1054, за работай якой нам давялося назіраць, пачалася ў дзевяць гадзін раніцы. Скончыцца праз дваццаць чатыры гадзіны. Але па такім раскладзе працуюць не ўсе. Супрацоўнікі самі выбіраюць, якія змены для іх зручнейшыя: дзённыя, начныя ці сутачныя. Заступіць на работу можна ў восем або дзевяць (раніцы і вечара) гадзін, акрамя таго, ёсць спецыяльная начная змена з дзевятнаццаці, каб не ўзнікала накладак, пакуль адныя брыгады мяняюць другія. Святлана амаль заўсёды працуе суткамі. У гэтым месяцы, напрыклад, у яе атрымаецца 12 дзяжурстваў. — Ці не цяжка мне? Вы што, я неймаверна люблю сваю працу! Прыйшла на «хуткую» ў 1989 годзе і ні разу за ўсе гады не пашкадавала аб зробленым выбары,
c4-be
import * as M from "@effectful/core"; (function () { return M.chain(eff(1), _1); function _1() { return M.chain(eff(2), _2); } function _2(a) { if (a) { return M.jump(void 0, _3); } else { return M.chain(eff(3), _3); } } function _3() { return M.chain(eff(4), _4); } function _4() { return M.chain(eff(5), _5); } function _5() {} }); (function () { return M.chain(eff(1), _1); function _1() { return M.chain(eff(2), _2); } function _2(a) { if (a) { return M.chain(eff("a"), _3); } else { return M.chain(eff(3), _3); } } function _3() { return M.chain(eff(4), _4); } function _4() { return M.chain(eff(5), _5); } function _5() {} }); (function () { var r; return M.chain(eff(1), _1); function _1() { return M.chain(eff(2), _2); } function _2(a) { if (a) { return M.chain(eff("a"), _3); } else { return M.chain(eff(4), _5); } } function _3() { return M.chain(eff("b"), _4); } function _4(a) { return a; } function _5() { return M.chain(eff(5), _6); } function _6() { return r; } }); function a() { var r; if (e) { return M.chain(eff("b"), _1); } else { return r; } function _1(a) { return a; } }
awto/effectfuljs-packages/core/test/samples/break-stmt/test1-out-f.js
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation ([email protected]) ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * 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. ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor ** the names of its contributors may be used to endorse or promote ** products derived from this software without specific prior written ** permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef FILTEROBJECT_H #define FILTEROBJECT_H #include <QObject> class FilterObject : public QObject { Q_OBJECT public: FilterObject(QObject *parent = 0); bool eventFilter(QObject *object, QEvent *event); void setFilteredObject(QObject *object); private: QObject *target; }; #endif
sunblithe/qt-everywhere-opensource-src-4.7.1-doc/src/snippets/eventfilters/filterobject.h
/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. * * GPL HEADER END */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * * Copyright (c) 2011, 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ * Lustre is a trademark of Sun Microsystems, Inc. * * libcfs/include/libcfs/curproc.h * * Lustre curproc API declaration * * Author: Nikita Danilov <[email protected]> */ #ifndef __LIBCFS_CURPROC_H__ #define __LIBCFS_CURPROC_H__ /* * Portable API to access common characteristics of "current" UNIX process. * * Implemented in portals/include/libcfs/<os>/ */ int cfs_curproc_groups_nr(void); /* * Plus, platform-specific constant * * CFS_CURPROC_COMM_MAX, * * and opaque scalar type * * kernel_cap_t */ /* check if task is running in compat mode.*/ int current_is_32bit(void); #define current_pid() (current->pid) #define current_comm() (current->comm) int cfs_get_environ(const char *key, char *value, int *val_len); typedef __u32 cfs_cap_t; #define CFS_CAP_CHOWN 0 #define CFS_CAP_DAC_OVERRIDE 1 #define CFS_CAP_DAC_READ_SEARCH 2 #define CFS_CAP_FOWNER 3 #define CFS_CAP_FSETID 4 #define CFS_CAP_LINUX_IMMUTABLE 9 #define CFS_CAP_SYS_ADMIN 21 #define CFS_CAP_SYS_BOOT 23 #define CFS_CAP_SYS_RESOURCE 24 #define CFS_CAP_FS_MASK ((1 << CFS_CAP_CHOWN) | \ (1 << CFS_CAP_DAC_OVERRIDE) | \ (1 << CFS_CAP_DAC_READ_SEARCH) | \ (1 << CFS_CAP_FOWNER) | \ (1 << CFS_CAP_FSETID ) | \ (1 << CFS_CAP_LINUX_IMMUTABLE) | \ (1 << CFS_CAP_SYS_ADMIN) | \ (1 << CFS_CAP_SYS_BOOT) | \ (1 << CFS_CAP_SYS_RESOURCE)) void cfs_cap_raise(cfs_cap_t cap); void cfs_cap_lower(cfs_cap_t cap); int cfs_cap_raised(cfs_cap_t cap); cfs_cap_t cfs_curproc_cap_pack(void); void cfs_curproc_cap_unpack(cfs_cap_t cap); int cfs_capable(cfs_cap_t cap); /* __LIBCFS_CURPROC_H__ */ #endif /* * Local variables: * c-indentation-style: "K&R" * c-basic-offset: 8 * tab-width: 8 * fill-column: 80 * scroll-step: 1 * End: */
ziqiaozhou/cachebar-source/drivers/staging/lustre/include/linux/libcfs/curproc.h
Три тона кокаин заловиха испанските власти | Dnes.bg Новини Три тона кокаин заловиха испанските власти Това е най-голямото количество наркотици, заловени от 1999 г. 5 яну 2016 16:37, Валерия Белчевска Испанските власти иззеха три тона кокаин и арестуваха за наркотрафик дванайсет души, сред които испанци, холандци и британци, съобщи Франс прес. Това е "най-голямото количество наркотици, заловени на сушата в Галисия от 1999 г.", се похвали националната полиция в комюнике. "Трите тона кокаин е трябвало да бъдат купени от голяма група за наркотрафик, базирана в Коста дел сол", провинция Малага, допълва изявлението, което не посочва кога е бил открит наркотикът. "Задържани са 12 души, включително превозвачите на стоката, които са с испанско гражданство, продавачите и купувачите, които са съответно холандци и британци". Иберийският полуостров е смятан за основна входна врата в Европа на кокаин от Латинска Америка. През него минават и пратки канабис от Мароко. Още по темата: Испаниянаркотрафиктри тона кокаиниспанските властидванайсет душинай-голямото количество наркотици Смятай за 1гр 60евр странно, че говориме.за Марбеля и да нямс руснаци. Тези срама нямат ли? Нашите като се отчетат със 600 грама на година и медали им дават! Параван преди 2 години Значи в същото време от друго място са минали 103 тона :) От последния час преди 2 години Бойко вдигна кръвно , Доган събира агите на спешна среща , Пеевски се чуди къде да се навре ! трафика на герб дава резултати
c4-bg
--[[ Title: ItemTimeSeries Author(s): LiXizhi Date: 2014/3/29 Desc: use the lib: ------------------------------------------------------------ NPL.load("(gl)script/apps/Aries/Creator/Game/Items/ItemTimeSeries.lua"); local ItemTimeSeries = commonlib.gettable("MyCompany.Aries.Game.Items.ItemTimeSeries"); local item_ = ItemTimeSeries:new({}); ------------------------------------------------------- ]] NPL.load("(gl)script/ide/math/vector.lua"); NPL.load("(gl)script/apps/Aries/Creator/Game/GUI/EditEntityPage.lua"); local EditEntityPage = commonlib.gettable("MyCompany.Aries.Game.GUI.EditEntityPage"); local Player = commonlib.gettable("MyCompany.Aries.Player"); local EntityManager = commonlib.gettable("MyCompany.Aries.Game.EntityManager"); local BlockEngine = commonlib.gettable("MyCompany.Aries.Game.BlockEngine") local TaskManager = commonlib.gettable("MyCompany.Aries.Game.TaskManager") local block_types = commonlib.gettable("MyCompany.Aries.Game.block_types") local GameLogic = commonlib.gettable("MyCompany.Aries.Game.GameLogic") local ItemTimeSeries = commonlib.inherit(commonlib.gettable("MyCompany.Aries.Game.Items.Item"), commonlib.gettable("MyCompany.Aries.Game.Items.ItemTimeSeries")); block_types.RegisterItemClass("ItemTimeSeries", ItemTimeSeries); -- @param template: icon -- @param radius: the half radius of the object. function ItemTimeSeries:ctor() end -- not stackable function ItemTimeSeries:GetMaxCount() return 64; end -- virtual: convert entity to item stack. -- such as when alt key is pressed to pick a entity in edit mode. function ItemTimeSeries:ConvertEntityToItem(entity) if(entity and entity.GetActor and entity:GetActor()) then local itemStack = entity:GetActor():GetItemStack(); if(itemStack) then return itemStack:Copy(); end end end -- Called whenever this item is equipped and the right mouse button is pressed. -- @return the new item stack to put in the position. function ItemTimeSeries:OnItemRightClick(itemStack, entityPlayer) local curItem = GameLogic.GetPlayerController():GetItemStackInRightHand(); if(curItem ~= itemStack) then NPL.load("(gl)script/apps/Aries/Creator/Game/Movie/MovieClipController.lua"); local MovieClipController = commonlib.gettable("MyCompany.Aries.Game.Movie.MovieClipController"); MovieClipController.OnRightClickItemStack(itemStack) end return itemStack, true; end function ItemTimeSeries:SerializeServerData(serverdata, bSort) if(serverdata and serverdata.timeseries) then -- this will skip empty time series, usually saves lots of disk space and band width. local o = {}; local originalTimeSeries = serverdata.timeseries; for k, v in pairs(originalTimeSeries) do if(type(v) == "table") then if(v.data and #v.data == 0) then -- skip else o[k] = v; end else o[k] = v; end end serverdata.timeseries = o; local text = commonlib.serialize_compact(serverdata, bSort); serverdata.timeseries = originalTimeSeries; return text; else return commonlib.serialize_compact(serverdata, bSort); end end
NPLPackages/paracraft-script/apps/Aries/Creator/Game/Items/ItemTimeSeries.lua
# Fourier Analysis: How to get rid of a discontinuity When I compute the phase error of a spatial series data using Fourier analysis in Mathematica there's a discontinuity @ parameter c1 = 1.35. However @ c1 = 0.5 produces the correct result. Code: Clear[G, σ, ϕ]; G = -σ/2*((1 - Cos[ϕ])^2 + I*(3 - Cos[ϕ])*Sin[ϕ]); Ztri = (1 + G + 1/2*G^2 + 1/6*G^3 + 1/24*G^4); g[σ_Real, ϕ_Real] = -ArcTan[Re[Ztri], Im[Ztri]]/(σ*ϕ); linecolors=Blue; framecolors=Black; c1 = 1.35 gp1 = Plot[g[σ, ϕ] /. {σ -> c1}, {ϕ, 0, Pi}, PlotRange -> {-2, 2.}, PlotStyle -> {linecolors, Thickness[0.006]}, PlotLegends -> Placed[{"CFL 1.35"}, {0.2, 0.4}], AspectRatio -> Automatic]; c1 = 0.5; gp2 = Plot[g[σ, ϕ] /. {σ -> c1}, {ϕ, 0, Pi}, PlotRange -> {-2, 2.}, PlotStyle -> {linecolors,Dotted, Thickness[0.006]}, PlotLegends -> Placed[{"CFL 0.5"}, {0.2, 0.4}], AspectRatio -> Automatic]; BB = Show[gp1, gp2, Axes -> False, Frame -> True, FrameStyle -> Directive[Thick, framecolors, 15], FrameLabel -> {{"Phase error", ""}, {ω, "Numerical dispersion"}}] Plot after running code: The correct plot is like this This comes from the jump disontinuity of two argument ArcTan. My solution can be automated, but I'll leave that to you for the time being. My strategy is to find where the discontinuity is, then lift the right part of the graph up by a constant. The jump of two argument ArcTan occurs when $x < 0$ and $y = 0$: Plot3D[ArcTan[x, y], {x, -π, π}, {y, -π, π}, AxesLabel -> {x, y}, Exclusions -> {{y == 0, x <= 0}}] You have g[σ, φ] == -(1/(σ φ))ArcTan[384 + Re[σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) (-192 + 48 σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) - 8 σ^2 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^2 + σ^3 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^3)], Im[σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) (-192 + 48 σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) - 8 σ^2 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^2 + σ^3 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^3)]] so we need to solve Im[__] == 0, when σ == 1.35. Reduce[Im[σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) (-192 + 48 σ ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ]) - 8 σ^2 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^2 + σ^3 ((-1 + Cos[φ])^2 - I (-3 + Cos[φ]) Sin[φ])^3)] == 0 && 2 < φ < 3 /. σ -> Rationalize[1.35], φ] // RootReduce (* φ == 2 ArcTan[Root[-2000 - 9570 #1^2 - 10020 #1^4 + 6629 #1^6 - 1974 #1^8 - 21504 #1^10 + 2671 #1^12 &, 2]] *) This is the location of the discontinuity. From here you can also find the difference between the left and right limits to get the offset too: loc = 2 ArcTan[Root[-2000 - 9570 #1^2 - 10020 #1^4 + 6629 #1^6 - 1974 #1^8 - 21504 #1^10 + 2671 #1^12 &, 2]]; offset = -2 g[Rationalize[1.35], loc]; Now add this only when x > loc. Here are your first four lines now: Clear[G, Ztri, σ, φ]; G[σ_, φ_] := -σ/2*((1 - Cos[φ])^2 + I*(3 - Cos[φ])*Sin[φ]); Ztri[σ_, φ_] := (1 + G[σ, φ] + 1/2*G[σ, φ]^2 + 1/6*G[σ, φ]^3 + 1/24*G[σ, φ]^4); g[σ_, φ_] := -ArcTan[Re[Ztri[σ, φ]], Im[Ztri[σ, φ]]]/(σ*φ) + offset Boole[σ == 1.35 && φ > loc]; Again, this is not a general solution and only works for σ == 1.35. Here is the plot now: • Thank Chip Hurst. You give me the detailed explaination. – Flymath Jul 31 '14 at 3:03 • In fact, now the line of cfl=1.35 should be that of cfl=1 in the given correct plot. Why the line not discontinuous? And the max-values also different? I think that it is sure that the expressions of G and Ztri are correct. – Flymath Jul 31 '14 at 3:11 Please tell me if this produces what you expect: link[a : {{_, _} ..}, b : {{_, _} ..}] := Join[a, (b\[Transpose] - First[b] + Last[a])\[Transpose]] • @Flymath: Ah, the problem is that one needs to "unwrap" the result of ArcTan before dividing by $\sigma\phi$. In this case it is apparently enough to just define g[σ_Real, ϕ_Real] = (If[# < 0, # + 2 π, #] &)@-ArcTan[Re[Ztri], Im[Ztri]]/(σ*ϕ). – user484 Jul 31 '14 at 6:52
finemath-3plus
""" Django settings for bheemboy project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '6gx3w!%!akim)0i09vhq+77a6ot8%5afh^i33zp_y69f+6tx=)' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] SESSION_EXPIRE_AT_BROWSER_CLOSE = True # Application definition INSTALLED_APPS = [ 'coursereg.apps.CourseregConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles' ] MIDDLEWARE_CLASSES = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'bheemboy.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'bheemboy.wsgi.application' # Database # https://docs.djangoproject.com/en/1.9/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/1.9/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.9/howto/static-files/ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static/') AUTH_USER_MODEL = 'coursereg.User' LOGIN_URL = '/signin' DEFAULT_FROM_EMAIL = 'admin@localhost' EMAIL_HOST = 'localhost' EMAIL_TIMEOUT = 3 CAN_FACULTY_CREATE_COURSES = False CAN_ADVISER_ADD_COURSES_FOR_STUDENTS = False CONTACT_EMAIL = 'support@localhost' MANUAL_FACULTY_REVIEW = True WARN_REVIEW_BEFORE_LAST_DATE = False ## Logging LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'standard': { 'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", 'datefmt' : "%d/%b/%Y %H:%M:%S" }, }, 'handlers': { 'null': { 'level':'DEBUG', 'class':'logging.NullHandler', }, 'console':{ 'level':'INFO', 'class':'logging.StreamHandler', 'formatter': 'standard' }, }, 'loggers': { 'django': { 'handlers':['console'], 'propagate': True, 'level':'WARN', }, 'django.db.backends': { 'handlers': ['console'], 'level': 'DEBUG', 'propagate': False, }, 'coursereg': { 'handlers': ['console'], 'propogate': True, 'level': 'WARN', }, } }
s-gv/bheemboy-bheemboy/settings.py
// The MIT License (MIT) // // Copyright (c) 2014 Joakim Gyllström // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #import "BSCollectionController.h" @interface BSCollectionController (UICollectionView) <UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout> @end
asefnoor/UnitTest-BSImagePicker/Category/BSCollectionController/BSCollectionController+UICollectionView.h
/* * hit.h * * Created by Ashwin N. */ #ifndef _HIT_H_ #define _HIT_H_ void mon_hit(object *monster, char *other, boolean flame); void rogue_hit(object *monster, boolean force_hit); int get_damage(char *ds, boolean r); int get_number(char *s); long lget_number(char *s); int mon_damage(object *monster, short damage); void fight(boolean to_the_death); void get_dir_rc(short dir, short *row, short *col, short allow_off_screen); short get_hit_chance(object *weapon); short get_weapon_damage(object *weapon); #endif /* _HIT_H_ */
zerobandwidth-net/zerogue-hit.h
extern int v3p_netlib_sorm2r_( char *side, char *trans, v3p_netlib_integer *m, v3p_netlib_integer *n, v3p_netlib_integer *k, v3p_netlib_real *a, v3p_netlib_integer *lda, v3p_netlib_real *tau, v3p_netlib_real *c__, v3p_netlib_integer *ldc, v3p_netlib_real *work, v3p_netlib_integer *info, v3p_netlib_ftnlen side_len, v3p_netlib_ftnlen trans_len );
RayRuizhiLiao/ITK_4D-Modules/ThirdParty/VNL/src/vxl/v3p/netlib/lapack/single/sorm2r.h
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/compute/v1/compute.proto package com.google.cloud.compute.v1; public interface GetAddressRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.GetAddressRequest) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * Name of the address resource to return. * </pre> * * <code>string address = 462920692 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The address. */ java.lang.String getAddress(); /** * * * <pre> * Name of the address resource to return. * </pre> * * <code>string address = 462920692 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The bytes for address. */ com.google.protobuf.ByteString getAddressBytes(); /** * * * <pre> * Project ID for this request. * </pre> * * <code>string project = 227560217 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The project. */ java.lang.String getProject(); /** * * * <pre> * Project ID for this request. * </pre> * * <code>string project = 227560217 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The bytes for project. */ com.google.protobuf.ByteString getProjectBytes(); /** * * * <pre> * Name of the region for this request. * </pre> * * <code>string region = 138946292 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The region. */ java.lang.String getRegion(); /** * * * <pre> * Name of the region for this request. * </pre> * * <code>string region = 138946292 [(.google.api.field_behavior) = REQUIRED];</code> * * @return The bytes for region. */ com.google.protobuf.ByteString getRegionBytes(); }
googleapis/java-compute-proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAddressRequestOrBuilder.java
/* eslint camelcase:0 */ module.exports = function (grunt) { 'use strict'; grunt.initConfig({ jasmine_nodejs: grunt.file.readYAML('config/jasmine.conf.yml') }); // grunt.loadNpmTasks('grunt-jasmine-nodejs'); grunt.loadTasks('tasks'); grunt.registerTask('single', ['jasmine_nodejs:other']); grunt.registerTask('helpers', ['jasmine_nodejs:helpersTest']); grunt.registerTask('default', ['jasmine_nodejs:calc', 'jasmine_nodejs:other']); };
onury/grunt-jasmine-nodejs-Gruntfile.js
package model.fr.istic.aco.minieditor; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class Clipboard { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ public EditorEngineImpl editorEngineImpl; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Clipboard(){ super(); } }
mhiver/ACO_MiniEditorModel-src/main/java/model/fr/istic/aco/minieditor/Clipboard.java
/* SPDX-License-Identifier: GPL-2.0+ */ #ifndef __SAA716x_AIP_REG_H #define __SAA716x_AIP_REG_H /* -------------- AI Registers ---------------- */ #define AI_STATUS 0x000 #define AI_BUF1_ACTIVE (0x00000001 << 4) #define AI_OVERRUN (0x00000001 << 3) #define AI_HBE (0x00000001 << 2) #define AI_BUF2_FULL (0x00000001 << 1) #define AI_BUF1_FULL (0x00000001 << 0) #define AI_CTL 0x004 #define AI_RESET (0x00000001 << 31) #define AI_CAP_ENABLE (0x00000001 << 30) #define AI_CAP_MODE (0x00000003 << 28) #define AI_SIGN_CONVERT (0x00000001 << 27) #define AI_EARLYMODE (0x00000001 << 26) #define AI_DIAGMODE (0x00000001 << 25) #define AI_RAWMODE (0x00000001 << 24) #define AI_OVR_INTEN (0x00000001 << 7) #define AI_HBE_INTEN (0x00000001 << 6) #define AI_BUF2_INTEN (0x00000001 << 5) #define AI_BUF1_INTEN (0x00000001 << 4) #define AI_ACK_OVR (0x00000001 << 3) #define AI_ACK_HBE (0x00000001 << 2) #define AI_ACK2 (0x00000001 << 1) #define AI_ACK1 (0x00000001 << 0) #define AI_SERIAL 0x008 #define AI_SER_MASTER (0x00000001 << 31) #define AI_DATAMODE (0x00000001 << 30) #define AI_FRAMEMODE (0x00000003 << 28) #define AI_CLOCK_EDGE (0x00000001 << 27) #define AI_SSPOS4 (0x00000001 << 19) #define AI_NR_CHAN (0x00000003 << 17) #define AI_WSDIV (0x000001ff << 8) #define AI_SCKDIV (0x000000ff << 0) #define AI_FRAMING 0x00c #define AI_VALIDPOS (0x000001ff << 22) #define AI_LEFTPOS (0x000001ff << 13) #define AI_RIGHTPOS (0x000001ff << 4) #define AI_SSPOS_3_0 (0x0000000f << 0) #define AI_BASE1 0x014 #define AI_BASE2 0x018 #define AI_BASE (0x03ffffff << 6) #define AI_SIZE 0x01c #define AI_SAMPLE_SIZE (0x03ffffff << 6) #define AI_INT_ACK 0x020 #define AI_ACK_OVR (0x00000001 << 3) #define AI_ACK_HBE (0x00000001 << 2) #define AI_ACK2 (0x00000001 << 1) #define AI_ACK1 (0x00000001 << 0) #define AI_PWR_DOWN 0xff4 #define AI_PWR_DWN (0x00000001 << 0) #endif /* __SAA716x_AIP_REG_H */
bas-t/saa716x-drivers/media/pci/saa716x/saa716x_aip_reg.h
/* Definitions of target machine for GNU compiler, for HP PA-RISC Copyright (C) 2004-2013 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ /* HP-UX 10.10 UNIX 95 features. */ #undef TARGET_HPUX_10_10 #define TARGET_HPUX_10_10 1 #undef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \ %{!munix=93:unix95%O%s}}"
pschorf/gcc-races-gcc/config/pa/pa-hpux1010.h
const childExec = require('child_process').exec; const anonymize = require('../lambda-function/lib/dat-node')({ jarPath: '../lambda-function/lib/DicomAnonymizerTool/DAT.jar' }) .anonymize; const inPath = __dirname + '/01.dcm'; const outPath = __dirname + '/output/01-anon.dcm'; anonymize( { in: inPath, out: outPath, }, (err, stdout, stderr) => { console.log(err, stdout, stderr); const execString = `diff -y <(dcmdump ${inPath}) <(dcmdump ${outPath}) --suppress-common-lines`; childExec( execString, { shell: "/bin/bash" }, console.log ); } );
jmhmd/dat-lambda-test/test.js
Info<< "Reading thermophysical properties\n" << endl; autoPtr<basicThermo> thermo ( basicThermo::New(mesh) ); volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo->rho() ); volScalarField& p = thermo->p(); volScalarField& h = thermo->h(); Info<< "Reading field U\n" << endl; volVectorField U ( IOobject ( "U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); # include "compressibleCreatePhi.H" label pRefCell = 0; scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); dimensionedScalar pMin ( mesh.solutionDict().subDict("SIMPLE").lookup("pMin") ); Info<< "Creating turbulence model\n" << endl; autoPtr<compressible::RASModel> turbulence ( compressible::RASModel::New ( rho, U, phi, thermo() ) ); dimensionedScalar initialMass = fvc::domainIntegrate(rho);
Unofficial-Extend-Project-Mirror/openfoam-extend-Core-OpenFOAM-1.5-dev-applications/solvers/compressible/rhoSimpleFoam/createFields.H
/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 /* gettext domain */ #define GETTEXT_PACKAGE "deja-dup" /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYCURRENT */ /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ /* Define if the GNU dcgettext() function is already present or preinstalled. */ #define HAVE_DCGETTEXT 1 /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define if the GNU gettext() function is already present or preinstalled. */ #define HAVE_GETTEXT 1 /* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* whether libunity is available */ /* #undef HAVE_UNITY */ /* Locale directory */ #define LOCALE_DIR "/usr/local/share/locale" /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "deja-dup" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "https://bugs.launchpad.net/deja-dup/+filebug" /* Define to the full name of this package. */ #define PACKAGE_NAME "Déjà Dup" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "Déjà Dup 23.90" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "deja-dup" /* Define to the home page for this package. */ #define PACKAGE_URL "https://launchpad.net/deja-dup" /* Define to the version of this package. */ #define PACKAGE_VERSION "23.90" /* Package data directory */ #define PKG_DATA_DIR "/usr/local/share/deja-dup" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Icon directory */ #define THEME_DIR "/usr/local/share/icons" /* Version number of package */ #define VERSION "23.90"
feiying/Deja-dup-config.h
/** @jsx React.DOM */ !(function(){ 'use strict'; var socket = io.connect( location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') ); var ChatApp = React.createClass({ getInitialState: function() { return { messages: [ {message: 'chat'}, {message: 'this is more chat'}, {message: 'even more'}, ] }; }, render: function() { return ( <div> <div><RemoteVideo /></div> <ChatList messageList = {this.state.messages}/> <form><ChatInput messageList = {this.state.messages}/></form> <LocalVideo /> </div> ); } }); // Make it compatible for require.js/AMD loader(s) if(typeof define === 'function' && define.amd) { define(function() { return ChatApp; }); } else if(typeof module !== 'undefined' && module.exports) { // And for npm/node.js module.exports = ChatApp; } else { this.ChatApp = ChatApp; } }).call(this);
kalupa/videoView-app/scripts/components/ChatApp.react.js
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V2c0-.55-.45-1-1-1s-1 .45-1 1v1.06C6.83 3.52 3.52 6.83 3.06 11H2c-.55 0-1 .45-1 1s.45 1 1 1h1.06c.46 4.17 3.77 7.48 7.94 7.94V22c0 .55.45 1 1 1s1-.45 1-1v-1.06c4.17-.46 7.48-3.77 7.94-7.94H22c.55 0 1-.45 1-1s-.45-1-1-1h-1.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z" }), 'LocationSearchingRounded');
AlloyTeam/Nuclear-components/icon/esm/location-searching-rounded.js
--DDネクロ・スライム function c72291412.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,72291412) e1:SetTarget(c72291412.target) e1:SetOperation(c72291412.operation) c:RegisterEffect(e1) end function c72291412.filter0(c) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() end function c72291412.filter1(c,e) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) end function c72291412.filter2(c,e,tp,m,f,gc) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x10af) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc) end function c72291412.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then local mg1=Duel.GetMatchingGroup(c72291412.filter0,tp,LOCATION_GRAVE,0,c) local res=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c72291412.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c) if not res then local ce=Duel.GetChainMaterial(tp) if ce~=nil then local fgroup=ce:GetTarget() local mg2=fgroup(ce,e,tp) local mf=ce:GetValue() res=Duel.IsExistingMatchingCard(c72291412.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c) end end return res end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function c72291412.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end local mg1=Duel.GetMatchingGroup(c72291412.filter1,tp,LOCATION_GRAVE,0,c,e) local sg1=Duel.GetMatchingGroup(c72291412.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c) local mg2=nil local sg2=nil local ce=Duel.GetChainMaterial(tp) if ce~=nil then local fgroup=ce:GetTarget() mg2=fgroup(ce,e,tp) local mf=ce:GetValue() sg2=Duel.GetMatchingGroup(c72291412.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c) end if (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sg1:GetCount()>0) or (sg2~=nil and sg2:GetCount()>0) then local sg=sg1:Clone() if sg2 then sg:Merge(sg2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tg=sg:Select(tp,1,1,nil) local tc=tg:GetFirst() if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c) tc:SetMaterial(mat1) Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.BreakEffect() Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) else local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c) local fop=ce:GetOperation() fop(ce,e,tp,tc,mat2) end tc:CompleteProcedure() end end
Lsty/ygopro-scripts-c72291412.lua
The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!) A097449 If n is a cube, replace it with the cube root of n. 1 0, 1, 2, 3, 4, 5, 6, 7, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 3, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 4, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 (list; graph; refs; listen; history; text; internal format) OFFSET 0,3 LINKS Table of n, a(n) for n=0..74. EXAMPLE The 9th integer is 8 so a(9) = 8^(1/3) = 2. MATHEMATICA rcr[n_]:=Module[{crn=Power[n, (3)^-1]}, If[IntegerQ[crn], crn, n]]; Array[ rcr, 80, 0] (* Harvey P. Dale, Jan 28 2012 *) PROG (PARI) replcube(n) = { for(x=0, n, if(iscube(x), y=x^(1/3), y=x); print1(floor(y)", ")) } iscube(n) = { local(r); r = n^(1/3); if(floor(r+.5)^3== n, 1, 0) } (PARI) a(n)=ispower(n, 3, &n); n \\ Charles R Greathouse IV, Oct 27 2011 CROSSREFS Sequence in context: A167514 A091733 A066990 * A104415 A071074 A279648 Adjacent sequences: A097446 A097447 A097448 * A097450 A097451 A097452 KEYWORD nonn,easy AUTHOR Cino Hilliard, Aug 23 2004 EXTENSIONS Corrected by T. D. Noe, Oct 25 2006 STATUS approved Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents The OEIS Community | Maintained by The OEIS Foundation Inc. Last modified June 2 09:37 EDT 2023. Contains 363092 sequences. (Running on oeis4.)
finemath-3plus