query_id
string
corpus_id
string
query
string
code
string
label
int64
b6ab6c353dfe3ce9730344fddbdbd8be
257a2325de872856eae6098af932209d
An Unflatten module receives an input of shape (N, C*H*W) and reshapes it to produce an output of shape (N, C, H, W).
batch_size, num_heads, depth, height, width = inputs.size() ret_shape = (batch_size, num_heads * depth, height, width) return torch.reshape(inputs, ret_shape)
0
cf3fa400bdba8022f91a2f40bf3a5e3e
c2b532b9fa1daa91b02c4c0acdf03352
Test addAccount() with callback and handler
creator.permissions.add_signatory = true; add_signatory->account_id = "noacc"; EXPECT_CALL(*wsv_command, insertAccountSignatory(add_signatory->account_id, add_signatory->pubkey)) .WillOnce(Return(false)); ASSERT_FALSE(validateAndExecute()); }
0
eccf3f860909683a1408470cdd8c4def
2e8fa50906d0053d0b130ef897d20630
Set last reviewed.
class Library extends DomainResource get lastReviewDate() { return this.__lastReviewDate; }
0
b4d914c050591a149eec3fad3c6031a6
d8e026e01932c8542e2f93b44fa8c0c1
allow dash
def Add_Dash(server): external_stylesheets = ['/static/css/bootstrap.min.css'] dash_app = Dash(server=server, external_stylesheets=external_stylesheets, url_base_pathname=url_dash) dash_app.index_string = '''<!DOCTYPE html> <html> <head> ...
1
4eebb8569fc01e91abe4e86bbb72d113
912334fe90a93a01ce066bbb9feb736f
转为中文数子 以下属算法来自 http://www.shang11.com
{ if (!preg_match('/^-?\d+(\.\d+)?$/', $number)) { return 'number2chinese() wrong number'; } list($integer, $decimal) = explode('.', $number . '.0'); $symbol = ''; if (substr($integer, 0, 1) == '-') { $symbol = '负'; $integer = substr($integ...
1
0a1ff4cbffabbb6c848131ee05bf684a
343e98b3795ac0befd7ed161c762d5cc
Initialize a new Apple TV.
self._xboxone = XboxOne(base_url, liveid, ip, auth) self._name = name self._liveid = liveid self._state = STATE_UNKNOWN self._running_apps = None self._current_app = None
0
29c598dacdd7cd2d467a97dedd19fc1f
6ac7021ffeec50ebef9b640464bee94a
Returns true if this dataframe has a key column.
class SSP(object): def _haskey(self, key): ecode = True if key not in self.data.columns: ecode = False return ecode
1
77bc322dd4c5dfaa3b623dbef7312276
d957ddf01b6e050ee6c947e5bf5ae4c4
Build FlatBuffer for Convolution2dLayer
weights = self.readWeightsRaw() (bias, beta, gamma, mean, invstd) = self.readBatchNormLayerRaw() self.numInterleaveChannels = weights.shape[0] (Wb, T) = makeConvBNComplex(weights, bias, beta, gamma, mean, invstd, self.interleaveChannels, WPrecisions_fract, APrecisions_fract, IPrecisions_...
0
b670324a9b0c269cf39da9f61d6e076c
5dba211d2e30856822b5eebd6b44f4af
Specify the preferred bitness for launched test application
namespace WinAppDriver public class Program public static void Main(string[] args) { Helpers.SetProcessDpiAwareness(Helpers.PROCESS_PER_MONITOR_DPI_AWARE); CreateHostBuilder(args).Build().Run(); }
0
038af06747ac379f41f781b2ebb94c86
ed094a9db536bf0ef0d047531e64641a
Return the best instruction for loading the specified integer constant onto the stack - hopefully use short form
char **special_reg_lookup, word_t instr, char *res) { switch(TYPE(instr)) { case 0: { if (r_lookup[R_TYPE(instr)] == 0) { sprintf(res, "%s", "UNKNOWN"); } else if (R_TYPE(instr) == MOVS2I) { sprintf(res, "%s\t%d, %s", lookup[R_TYPE(instr)], R_DST(instr), ...
0
4d57ceb3209833352042e2915802afba
08670fb22b1f05f63917de52aba3137e
test spending P2PKH outputs to P2SH address
prev_txid = unhexlify('4fe5233fe5b25047730e41fc2fcdbaf270aa01a35c6292f13ab7432529d6d293') inputs = [{'txid': prev_txid, 'vout':2, 'scriptSig': unhexlify('483045022057a5995013c8c55a16c1f692d91881fef443a467316d73a15abd65b6ca6c77dd022100f349283acebe70c2be16dcfd7860aa530e920e74f7a4af...
1
f1012a3398ce0e9826deae6a8eb0701c
d70df3b9b69e5d3d92b0804223703ba3
Evaluate if outdoor movement has been detected (old interface)
{ return Game1.currentLocation != null && Game1.player != null && Game1.hasLoadedGame && Game1.player.CanMove && Game1.activeClickableMenu == null && Game1.CurrentEvent == null && Game1.gameMode == 3 && Game1.currentLocation.IsOutdoors; }
1
fdfb9c76fdd7dd608771c876901aec65
d0343a396b1db74cbb3dab0d5ef1c754
Parse the quote data from the Yahoo quote page HTML soup
class MySpider(CrawlSpider): def parse_item(response): quote_block = response.css('div.quote') for quote in quote_block: loader = QuotesLoader(selector=quote) loader.add_css('text', 'span.text::text') loader.add_xpath('author', 'span/small/text()') yield...
0
dd0b0420d6f5ea6b7ae6710d41a32d50
74c16d19688fcf26502ca80e21ea27bb
闪光灯 高电平有效
def bulb3(): p.ChangeDutyCycle(25) time.sleep(0.1)
0
d0445f0eb1eddf87bb1113034a73b6cd
455fa069edd6f7cc42c71897dd7800b4
Get the full text for the Payment Mode
$paymentParentType = $this->payment_types ? PaymentTypes::getCategoryOptions($this->payment_types->uid) : ''; $result = $this->payment_types->title . '(' . $paymentParentType . ')'; return $result; }
1
06278f6343acdd9fe6164423c0df84ec
e51da476b84722ea71ce78bc23b9fbb3
Returns an array of Spotify links for each song.
if 'track' in url: return [get_spotify_track(url)] if 'album' in url: return get_spotify_album(url) if 'playlist' in url: return get_spotify_playlist(url) return []
0
6ece9adde4f713f7752bd84b5ee04d5b
edde0c7334011c76869ad36f4c389106
Makes the Hashized value from the full attribute name e.g. userCertificate;binary => "some_bin" becomes userCertificate => {"binary" => "some_bin"}
def serialized_to_hash serialized = HashWithIndifferentAccess.new self.attributes_to_serialize.each { |key| serialized[key] = send(key) } serialized end
0
f25f42adb533b77c80d4e74dfbe10a6f
20fd88454a08ac96f7e5de62c3291950
@brief 별점 추가하기
class Rate extends DBController //繼承父類別DBController function addRating($productid, $rating, $member_id) { $query = "INSERT INTO tbl_member_rating (productid,rating,member_id) VALUES (?, ?, ?)"; $params = array( array( "param_type" => "i", "param_value" =>...
1
28d2c0e1650669c6439251506a587d79
f9592ae71b297e32c6e9d3f7e3a2565a
Creates an instance of the specified implementation of a keyed hash algorithm.
{ KeyedHashAlgorithm KHA = null; switch( KeyedHashAlgorithm_in ) { case KeyedHashAlgorithms.None: return null; case KeyedHashAlgorithms.HMACSHA1_160: KHA = new HMACSHA1( System.Text.Encoding.ASCII.GetBytes( Password_in ) ); break; case KeyedHashAlgorithms.MACTripleDES_64: if( ...
1
66cc1a4ec3829c611007242dce7f602d
0b76ebd1bc91c5a9430ed97c9fcc12e0
Sets the inverse path.
public class Cell void setPath(ArrayList<Cell> path) { this.path = new ArrayList<>(path); }
0
6c1b9abe820b0080acb1d627d0ad66dc
559868c0b0561a75fb8c7bb235009318
This API is used create a database proxy for a source instance.
const options = { method: "POST", url: "/v3/{project_id}/instances/{instance_id}/database", contentType: "application/json;charset=UTF-8", queryParams: {}, pathParams: {}, headers: {}, data: {} ...
0
8496fc3c9e21929cf3f82fe870921096
26cc205c215787dd48ebff8b7b270865
Returns the meta object for enum '{@link com.github.icelyframework.configuration.DatabaseType <em>Database Type</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
void unsetDatabaseType();
0
3ad8183e11306c55953a909c84a92590
5de22f6eb1a40ff73737fe94fa57f02a
GAME :: getRandomPoint Gets a random point within the boundaries of the world.
let xCoord = Math.floor(Math.random() * (Math.floor(xMax) - Math.floor(xMin) + 1)) + Math.floor(xMin); let yCoord = Math.floor(Math.random() * (Math.floor(yMax) - Math.floor(yMin) + 1)) + Math.floor(yMin); return {x: xCoord, y: yCoord}; }
1
ec6dfe06a6156ed909bd5cdc10e2494c
271313cf07756a7fb3a2877b1848fd02
Draws a seperation line on screen
void DrawUI::drawLine() { cout << "----------------------------------------\n"; }
1
3c545c6e4c7830861353001a98c9077f
10969093ae937df915ce058ac953cc61
Получить список всех типов пользователей
namespace Common public class Utils public static List<UserType> GetUserTypes() { var list = new List<UserType>(); foreach (StoreUserType type in Enum.GetValues(typeof(StoreUserType))) { var model = new UserType(); model.TypeId = (int)type;...
1
ae511d97e6c4707e2ae8e973034d2f45
6bd8377bb210199f1d9bfb3f697d290a
Setzt alle Einfluesse auf das Client-Objekt zurück. Dies sind: <ul> <li>Die Kraft F, die gerade auf das Objekt wirkt.</li> <li>Die Geschwindigkeit v, die das Objekt gerade hat.</li> </ul>
velocity = new Vector3 (0, 0, 0); acceleration= new Vector3 (0, 0, 0); drag = 0f; decay_time = -1; time_remaining = -1; dying = false; }
1
35e05dbf9655664150b89b689fa08fbb
e9afb9f42b10b29e03b45db17f34889f
设置每一项的性质(设置每一项数据是 组Group的属性 还是 子布局的属性)
public class MainActivity extends AppCompatActivity private void setGroupCheck(List<DemoItemBean> beans, int itemId, boolean isChecked) { for (DemoItemBean bean : beans) { if (bean.getItemType() == DemoItemBean.TYPE_GROUP && bean.getItemId() == itemId) { bean.setC...
0
304de4f567b08b9c324db115b3b3dabf
772faf358e9f9f1b1e80e9a42b07d19d
A JObject containing Conda dependencies.
json = dict() json['name'] = self.name json['url_friendly_name'] = self.url_friendly_name json['description'] = self.description json['anaconda_project_version'] = version commands = dict() for key, command in self.commands.items(): commands[key] = dic...
1
fef631eea36007459ff25ecc78a30e20
00eec9ee953ef193a2a01ebb90986d91
获取粉丝ID
print(datetime.datetime.now(), user_id, since_id) if since_id >= 4999: return response = self.get_response(url=self.get_fans_url.format(user_id, since_id)) if response is None: print('哥们。这个用户解析好像有点问题....\t{} is None'.format(user_id)) return eli...
1
b26164f254755a5bd26c1e3ed3ff0368
7d593678a36aa69650b00aa809db42d3
测试工程师基础信息
@ResponseBody public Test getTestBasicInfo(@RequestBody Test test){ Test test1=testService.getTestBasicInfo(test); return test1; }
0
0f81c242450da3f8a44218cc353fae29
7a35d993fba7a80d314534aafa1ca539
If a_string is not an integer, return a_errorValue
class TestFloat: def test_to_value_error(self): with pytest.raises(ValueError): Integer.to_value("abc")
0
70a7e330aa460f329510fbb0cc46e60a
78a170a7c551df8ee533e4dd809337d9
Deletes all rows from the operation_tasks table.
class SkillsViewModel(app: Application): AndroidViewModel(app) fun nukeTask() = viewModelScope.launch { repository.nukeTaskTable() }
1
4ead8f91e2059f9795457d3f994a5646
6a795493fc7b062cfe814ee86c58b2f1
Generate a value for each element following a uniform distribution.
def uniform(N): return np.random.rand(N)
1
2772d562220bf7dab09fd8a40047b7a5
a03faeadfbfbc280a464d992fb03710c
Test the sm operation.
scaled_data = self.data / 10000 S, F, R = spy.smacc(scaled_data, 10) data_shape = scaled_data.shape H = scaled_data.reshape(data_shape[0] * data_shape[1], data_shape[2]) assert(np.allclose(np.matmul(F, S) + R, H)) assert(np.min(F) == 0.0) assert(len(S.shape) == 2 ...
1
9cdefb74d3b1addbb80acc667beb7c9d
3e31ddbdab8d694659954be2a9b64565
显示退出账号模态框
loginOut(){ this.setData({ showDialog:true}) }
1
901a933b0beeb0850d91cb29d21c946d
27e68e1f0db4b7b7aaeec5a116a5511d
Elementwise test if x > y.
if self.check_is_scalar(other): ret = self.get_val() > other if type(ret) != sparse.coo_matrix: ret = sparse.coo_matrix(ret) return dnnval(val = ret, is_sparse = True) else: ret = self.get_val() > other.get_val() if type(ret) !=...
1
b663526c5555963f7393184611f210c5
899c809e32a75482e672689c1e0f1b0d
分析30天股票价格的变化情况
{ List<positionChange> myChange = new List<positionChange>(); DataBase myData = new DataBase(optionCode,today); basicInformation data = myData.GetBasicInformation(); List<tradeInformation> tickData = myData.GetTickData(myData.Today); for (int i = 1; i ...
0
7b11a01e6eafdcca85cbb8aee9a0cfff
9ed4329cd8fbd107a177db3b122834f1
Sets up assets, creates and mints rebalancing set
uint256 entropy; GenerateAssetEntropy(entropy, prevout, contract); CAsset asset; CalculateAsset(asset, entropy); CAsset reissuance; CalculateReissuanceToken(reissuance, entropy, false); CMutableTransaction txNew; txNew.nVersion = 1; txNew.vin.resize(1); txNew.vin[0].prevout = pre...
1
6e497da438e28d9b6cca45e204b61ac4
2b905e6e0997cfa422fdafcaeb3d6901
returns true if ParameterHolder does not contain any value
{ return _values == null || _values.size() == 0; }
1
29aa771b62d27d711513e1f384cf5e78
d28e23a74af82504c8300b5f40caae9a
Checks for collision between projectile and current walls.
class Projectile extends MovingObject hitWall() { let xCoord = this.position[0]; let yCoord = this.position[1]; let xAdjustedTileNegative = this.game.floor.floorTiles[Math.floor((yCoord - 30) / 40) + 1][Math.floor((xCoord - 50) / 40) + 1]; let xAdjustedTilePositive = this.game.floor.floo...
1
37453a3a8e89bb46ea9fcef3e921a4f0
9b2829a1a6e9205ae9cfee80792d7fd0
Invoke the action asynchronously. Returns immediately and will run the client-specified callback when the action later completes. Any output arguments can then be retrieved by calling {@link #endRestore}. This is guaranteed to be run but may indicate an error.
namespace Gecko [return: MarshalAs(UnmanagedType.U1)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] bool DoRestore();
0
8176ecb0ef3d3a6e43168b906a59560e
6f7b34a026799e7e9b3deca2c332205f
判断帐号密码是否错误
class Cookies(): def password_error(self): try: print('正在测试账号密码') return bool(self.wait.until(EC.presence_of_element_located((By.CLASS_NAME,'msg-error')))) except ex.TimeoutException: return False
1
fdc7c5b0209f5555695745807b97043f
9906a2e8fe815c67f8a5e30f249bb795
Povleče potezo (i,j) oz. ne naredi nič, če ni veljavna. Vrne stanje_igre po potezi ali None, če je poteza neveljavna.
if (self.je_veljavna({i,j}) == False) or (self.na_potezi == None): if self.veljavne_poteze == []: self.stanje_igre = NEODLOCENO self.zadnji_trikotnik = [] self.na_potezi = None return None else: vrednost= self.preveri_tr...
1
cc244d677fadac07895424e9fad01c80
662308f558d8213f6b95cf6cbb1b231a
Initialize Spring IOC Container
{ ContainerBuilder builder = new ContainerBuilder(); builder.RegisterInstance(this).As<IIocInitializer>().SingleInstance(); builder.RegisterType<SignalRIocResolver>().As<IIocResolver>().SingleInstance(); builder.Update(Container); }
0
7445ef19c929056c5c836adc41043edd
53d4dcf2928f3fb53c6ded23fb99a544
推送消息到所有站点
public void pushToAll(HKPushInfo pushInfo);
1
1046a0e28b6919d397a63900e00fb55d
f087fae9b10a44ec455c847b6cd08e1c
解析路径分析结果,并绘制UI元素
List<BusStep> steps = busPath.getSteps(); BusStep step = null; RoutePathDrawer routePathDrawer = null; for(int i = 0; i < steps.size() ; i++) { Log.v("step" + i); step = steps.get(i); if(step.getWalk() != null) { Log.v("步行:" + step.getWalk().getSteps().size()); } else { Log.v("步行:null"); ...
1
f7f0f269dff7f282e17a3f1e24a7a524
2f4da89377008ae9f06ab1afc55b5ee5
Fonction permettant aux clients de supprimer leurs bons de commande
DAO dao = new DAO(DataSourceFactory.getDataSource()); int order = Integer.parseInt(request.getParameter("order")); dao.deleteBonCommande(order); pageClient(request, response); }
1
2cb225f3600ab03c5b5e1cce8f42fb47
5a3f836b4c7a5ab9ec18b06bbfd61a8b
Adds a synthetic member to the class. It is the responsibility of the pass that defines the synthetic member to ensure that its name/signature does not introduce a name-space conflict.
auto *vd = dyn_cast<ValueDecl>(member); if (!vd || !LookupTable.getInt()) return; auto *table = LookupTable.getPointer(); assert(table); table->addMember(vd); }
1
1e579ce9ec7161f8946580196714aa00
d07b909532877920d94c7a89dc2dbc84
Gets the Data that should be set as the $args property of the box array (which is the second parameter passed to your callback).
abstract class Flightless_Meta_Box public function set_callback_args( $args ) { $this->callback_args = $args; }
0
b12d029ee262e885dac27496273f1507
c21ace94ff5a3900bf88785f13539825
Fills patcher list
class SimplePatchingFx(fixtures.Fixture): def add_patchers(self, *patchers): for patcher in patchers: self.patchers[patcher.name] = patcher
1
2a5db87c42dcc07ac9178088a217b1e1
19d807f9b15d735bfff6e60529a71003
This is the layer used to display messages over the map
class ViewMap: def __init__(self): pass
0
5f939dcedb633b87fe077428d82e17b4
e85b4230c056bdfb3fdb35e1e6125bb2
Receives the integer asynchronously.
ServiceCall getIntNullAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
0
6b15283095e9b6ed5948e88a8339cd50
1ada6170b5e28915afc21110332e3d54
设置阶梯价格,会覆盖掉之前所有的阶梯价格。注意阶梯价格应该从高到低排列 参数示例:<pre>[],</pre> 此参数必填
class AlibabaProductProductSKUInfo extends SDKDomain public function setPrice($price) { $this->price = $price; }
0
471fc84e990746268f6d6c198f113969
deca1f958ef791bf33894983c83926cb
Called when part of the body has been read
const std::size_t offset) { m_socket.async_read_some( boost::asio::buffer(packet->data()+offset, packet->size()-offset), boost::bind(&XBridgeConnector::onReadBody, this, packet...
1
63019cc8ea6df646721e1ef51153d77b
590b0d4596dc8e97863b5186c39893c4
Whether there are new tasks since previous reset().
boolean isTaskNew();
1
c2c10230403e282bedc57727d1276b03
1489c137698144ec2d8717484b97d433
Gives inheriting classes the chance to update their state when the TabSwitcher transition has finished.
transitionCompleted(): void { }
1
b800829ab24fcfcbe2b639e703266bdc
5d601671ecf4d88639f4af1741908ad9
计算信用卡号从右往左偶数位的2倍的和,如果该位的2倍是两位数,那么取这两位数的和
{ int a=0, b=0, sum_0=0; for(int j = 1 ; j < i ; j++) { a = j % 2 + 1; b = card[j] * a / 10 + card[j] * a % 10; sum_0 += b; } return sum_0; }
0
04ae74372c7ba9982b2864e44969d55f
35ef807f4b2a9c64bc9fd7e94405328e
如果EventKey不在集合中,不抛出一个异常
{ if (events.Contains(newEvent)) return; addFunctor(newEvent); if (CanRun && events.Count == 1 && !running) Resume(); }
0
b5fbe91405ffd79a272117b93b2cde32
220e74fb9cb9dec19180712737033139
遍历整个表,查看这个表里有没有此元素。
local index = 1 while table[index] do if (item == table[index]) then return index end index = index + 1 end return false end
1
ef5edafdc5ca0780fcbf17740c77f8d3
4cecb98817805b53f718646b1037ec50
Handles the <see cref="ListControl.SelectedIndexChanged"/> event of the <see cref="CategoriesList"/> control.
public partial class ItemControl : System.Web.UI.UserControl protected void lstCategory_SelectedIndexChanged(object sender, EventArgs e) { if(ddlCategory.SelectedValue != lstCategory.SelectedValue) ddlCategory.SelectedValue = lstCategory.SelectedValue; lstCategory.Visible...
1
b98adc0392992db5f87a1320bc78a50a
0c3315ca70cdbce8e231e55ccd8241e1
Рекурсивный обход для построение списка всех родительских категорий.
namespace Kartel.Trade.Web.Areas.ControlPanel.Controllers public class ManageCategoriesController : BaseRootController private void EnumerateCategories(int parentId, List<ExtJSTreeNodeModel> categoriesList) { var repository = Locator.GetService<ICategoriesRepository>(); categoriesLis...
1
472f8a279ec56d3250ec3989310894f7
143d050977aecf37d23ece3507cdba08
Count Visitor Stats
class count_plugin{ public function visitor_count(){ if (is_front_page()){ $data = get_option("visitor_counter_data"); $data["count"]+=1; $data['time']=current_time('d/m/Y H:i:s'); update_option("visitor_counter_data",$data); } }
1
06e3289736d5631a8850ad9a685e18d7
7788c3d059b9c1b55c1f6ad5000ca1df
Get or create the GD image resource and return it
{ error_clear_last(); $safeResult = \imagecreatefromgd($filename); if ($safeResult === false) { throw ImageException::createFromPhpError(); } return $safeResult; }
1
5e602f363eb8fc016d9e76200053b486
038d3871e7069ada5c36f6509c68f0f1
商品詳細画面で、購入するボタンを押した際に実行されるアクション
@user = User.find(current_user.id) @cart = @user.cart.find_by(status_flag: 0) cd = Cd.find_by(params[:id]) @cart.item_in_cart.create(cd_id: cd.id, price: cd.price) redirect_to user_path(@user.id) end
1
d423261c1af59fc67faaa36b17f2192a
dfc9ac97b313394c27b796ca3e8c4d7e
指定されたモジュールを、次にするモジュールのセットに追加する。 このメソッドでは、セットへの追加のみで、指定されたモジュールは変更しない。
public class JavaProcessDefinition implements ProcessDefinition public JavaProcessDefinition addLimitModule(String limitModuleName) throws StfException { checkAndUpdateLevel(Stage.MODULE_LIMITMODS); limitModules.add(limitModuleName); return this; }
1
a64902af4ba14fd6beb34ee16f1601b9
9ccd0f644603fe19af401f8a7a3a8aea
Overriding toString() method of object class to print Equity_Warning_Parameters_On_Payment_Plan format string
java.text.NumberFormat p = java.text.NumberFormat.getPercentInstance(); java.text.NumberFormat c = java.text.NumberFormat.getCurrencyInstance(); return "Savings Account[" + this.ownerName + ", " + this.accountNumber + ", " + c.format(this.balance) + ", " + p.format(this.interestRate) + ", " + c.format...
0
196854f57b3e0d8a039bb400b67145c9
b5d1bd3fe03c99cc112c6e82a9f88b9f
隐藏坐标轴设置
option.yAxis.forEach(item => { item.axisLine = { lineStyle: { color: 'rgba(2,87,144,0.5)' } } item.axisTick = false }) if (sub !== 'lineUpDown' && sub !== 'lineUpDown2') { option.xAxis.forEach(item => { item.axisLine = { ...
1
9a2d25920f37ca48dc7853b3ab371661
3665607cd57a4d6666e1b3c2026ca53f
Modifies the prediction based off of movie's average ratings
sql = 'SELECT id, vote_count, vote_average FROM movies WHERE 1;' stufftodo = [] for row in dbcu.execute(sql): stufftodo.append(row) for item in stufftodo: newval = (5.0 + (item[1] * item[2])) / (1.0 + item[1]) updaterec = {'laplace_num': newval} subwhere = 'id = ' + str(i...
1
9c67e3155a314351c79baaa6b2a987f0
7efee0dc01b02e63e6c4908ccf71a848
GET: Mensajes/Create
{ ViewBag.ID_Usuario = new SelectList(db.Usuarios, "ID_Usuario", "Nickname"); return View(); }
1
d1d8fcf72ad74f09e4aac95b0a4ac466
c1a733c15e8bd3dada9e0f1e963a7840
Remove element at front of list.
ACTION void list_pop_front(){ slist.self().pop_front(); }
1
65330c78d58d3c38cb355a388cf15ed7
63922aabe70f8e00a4c9b5c2bfbf339f
HTML element that represents live search
export default class Search constructor() { this._csrf = document.querySelector('[name="_csrf"]').value this.injectHTML(); this.searchIcon = document.querySelector('.header-search-icon'); this.overlayDiv = document.querySelector('.search-overlay'); this.closeIcon = document.querySelector('.close-liv...
1
b572ef5ff44b5cd27f9381e72284e4bb
db0d931f99edf0f1056d836dc0bb5dcc
Get structures which must not be removed (do not remove tables and foreign keys)
{ return array_filter($this->getDeclaredProperties(), function (IProperty $value) { return $value instanceof IStructuralProperty; }); }
0
87663cbd1b976d658755d7b0c13da2ed
d2c48849c22db6fd3b3429900fe0747e
Bob measures the incoming state using a homodyne detector, which is randomly switched between the two quadratures.
def bob_measure_qubit(bob_bases, qubit_index, qubit_circuit): if bob_bases[qubit_index] == '1': qubit_circuit.h(0) qubit_circuit.measure([0], [0])
0
e11acc58e038d6e6c92be6affa030db1
f7c24dea055128f88a43a68cb31c9935
Tests for returning an empty substring
class TestComplete: def test_empty_string(self): iterable = ('alpha', 'beta', 'delta') start_string = '' sut = utility.complete(iterable, start_string) assert sut == start_string
1
fe0704327424c45eb00e415e2ae6cce6
82bf2ca4a702f99902c12c5902d327c3
Получение отчетов проверенных инспектором
namespace Diplom public partial class MainDisplay : Form private void ReportStrip_Click(object sender, EventArgs e) { object ObjMissing = Missing.Value; Excel._Application ObjExel = new Excel.Application(); Excel.Workbook ObjWorkBook = ObjExel.Workbooks.Add(Missing.Value)...
0
fa99a1ecfe1e5fa661c9bca99a9850e6
67388edaa7b514fc8f6753e482ddacb9
Filter content to only items linked to schedules that the user has booked and can access.
{ return ( from sc in this.BaseQueryForFind join sci in this.DataContextForFind.CustomerContext.ScheduleItem on sc.ScheduleItemId equals sci.ScheduleItemId join sct in this.DataContextForFind.CustomerContext.ServiceCallTicket on sc.ServiceCallId equals sct.ServiceCallId join sctr in this.Data...
1
037dfc00262b3d4dcec4dc8b9d0cf053
0dfd9b751597cd077a073ad22a5b4138
Sets the return type to a collection of EntityType instances.
namespace Microsoft.OData.ModelBuilder public class FunctionConfiguration : OperationConfiguration public FunctionConfiguration ReturnsCollectionViaEntitySetPath<TElementEntityType>(string entitySetPath) where TElementEntityType : class => ReturnsCollectionViaEntitySetPath(typeof(TElementEnt...
1
3616c69bf2eb6769c00f669956808df4
43b724848af2124aafda835917ae0d76
Get the response from standard input. This is a blocking operation.
public class IntegrationTest public static JsonElement stdinRead() { InputStreamReader reader = new InputStreamReader(System.in); return new JsonStreamParser(reader).next(); }
1
2786cc4c4cd4a5966d6b0c96b8603e24
e514a8572872df2498f7514ce1350c43
轮廓拖动模式切换
export class WySliderComponent implements OnInit, OnChanges,OnDestroy, ControlValueAccessor private toggleDragMoving(movable: boolean) { this.isDragging = movable; if (this.isDragging) { this.subscribeDrag(['move','end']); } else { this.unSubscribeDrag(['move','end']); } }
1
e75e84dba4b7dbe2373267ffdce99a47
0989515b79354655aaf2d38bac0ec7c8
<b> Permite guardar archivos en la base de datos </b> <p> </p>
public class ControladorPersistencia public boolean GuardarBD(String Tabla, List Datos) { return this.ControladorAlmacenamiento.GuardarBD(Tabla, Datos); }
1
e1bb3acacaf2eff6e258a06d3482645b
2a968be0739aa9fbfd6606512d05ab6e
服务记录
{ $where = [ 'app_id' => $this->app_id, 'store_id' => $this->store_id, ]; $statusarr = [ '未支付','支付成功,待发货','待收货','订单完成' ]; $data = db(self::$table_goushui_order) ->where($where) ->page(input('page',1),input('pages...
1
c16920a281d6f745419951f0b8532d2e
5fb6ef430b3f06f4995c45c1278162a2
Extracts all additional dialog functions
$(document).on("click", "a.accessibleNotesLink", function () { var title = $(this).text(); var note = $(this).parent().parent().parent().find('div.detailNote span').html() $('div#additionaInfoDialog h2[id*=additionalInfoHeader]').html(title); $('div#additionaInfoDialog div#additional...
1
6674f81db72a74159ae6ee63282cf905
2d81419ea7b88209771d2e5c45287715
移除监控,不是真的删,而是存到另一个字典。
temp_dict = dict() temp_dict['ip'] = addr[0] temp_dict['username'] = data['login_user'] if temp_dict in md.user_list: md.user_list.remove(temp_dict)
0
2bb48c4253da988fee63dd7fa2e67d3c
db2a8155293b8575dc34df44cfa6e6f8
Retorna a lista dos candidatos vindos do Banco de Dados
function listar(): Promise<Candidatura[]> { return fetch(API_URL + CONTROLLER, { method: "GET", headers: { authorization: 'Bearer ' + localStorage.getItem(TOKEN_KEY) } }) .then(handleErrors) .then(response => { return response.json(); }) ...
1
00ff798efc73d7b692c065ef2e447b78
40e8bb2a2957dda7b6e1ece5c70fe723
Funcion para consultar la orden de incapacidad
if (Yii::$app->user->identity){ if (UsuarioDetalle::find()->where(['=','codusuario', Yii::$app->user->identity->codusuario])->andWhere(['=','id_permiso',81])->all()){ $form = new FormFiltroIncapacidad(); $id_empleado = null; $numero_incapacidad = null;...
1
0417b3ca9e703cf18528f5ec184b7de4
9c0ffab1fb2c39036bd7e8b6220bcdbe
23/10/20 Fonction permetant de modifier un Projet de la BDD
_Log.debug('update projet service start') cursor = kwargs['cursor'] login = super().getLogin(cursor, request) pinfo = request.json['body'] pinfo['updateUserId'] = login['id'] dao = super().dao_manager.get_dao('projectDao') dao.updateProject(cursor, pinfo) ...
1
048d169496e76c4ec0a54b382b00118d
b2813d62e8bcb14820d200476b2bee92
Handles mouse moves and shifts it onto the building structure
class Scroller(object): def move_buildings(self):
0
906b9dba90271aaffd4e66670a044f3e
542c714d50962d1c9b3c9999ca1b8202
Driver code. Parses arguments passed to the program and creates DV with them.
int main(int argc, char **argv) { int phase = 0; int batch_size = 100; int num_repetitions = 70; int input_size = 500; if (argc > 2) { parse_args(argc, argv, &phase, &batch_size, &num_repetitions, &input_size, NULL, NULL, NULL); PolyEvalD2Prover prover(phase, batch_size, num_repetitions, input_size)...
1
b58f99b4e7ae97927fa5db0090108178
03970655cbceb6c28a97a1045b262dab
Check project name and description labels.
{ verifyThat("#usernameLabel", (Label label) -> { return label.getText().equals("Username"); }); verifyThat("#passwordLabel", (Label label) -> { return label.getText().equals("Password"); }); }
0
ac9bdc1a625d85dfb8c6c4bf71d0a037
99631195bd661b0d61f6873c118effaf
Is a context set?
class NodeContext def list_context? klass.kind_of?(Array) end
0
2956fab67d5f9fd127dc331df3646583
abb36f5f1324cc1c7ae348de53088da8
Fixed parameters used in the subsurface fracture model Fixed model parameters that the user should not adjust and that are used by the subsurface fracture model. These include parameters such as entrainment coefficients and other model constants that have been fitted to data and are not considered further calibration ...
class FixedCouponBond(Priceable): def model_params(self) -> defaultdict: return self.sim_config.get('model_params')
0
3a7307187b0e08c65810600ede503570
3828015e5758cf74d35f5a8889a5fe28
对每一条鱼与每一个子弹计算碰撞
class Main extends egret.DisplayObjectContainer private checkhit(){ for(var i=0;i<this.fishlist.length;i++){ for(var a=0;a<this.bulletlist.length;a++){ if(this.sat(this.bulletlist[a],this.fishlist[i].getChildAt(0) as egret.Bitmap)){ if(!this.fishlist[i].catch){ ...
1
c43ca39b573cc0c9cea585d94a339895
8f36da597cb3843280fe2fce7cb360f4
输入一个字符串,返回输入字符串的大写的结果
public class FirstUpper{ public static void main(String[] args){ System.out.println("请输入字符串"); Scanner scnaner=new Scanner(System.in); String str=scnaner.nextLine(); System.out.println(firstUpper(str)); System.out.println(str); }
0
243d1db81158c097323204890a5495b8
c51a0fad6ea401ce3737cd64b6d1f4c0
## Append predicted values to the data frame for plotting.
extract_predicted_points <- function(lm_output, incidence_data, weeks_ahead, log_transform) { intercept <- lm_output$coefficients[["(Intercept)"]] gradient <- lm_output$coefficients[["t"]] last_timepoint_used <- lm_output$model$t[length(lm_output$model$t)] if(missing(weeks_...
1
ccb55afb22d4ac2653101439d284c17d
7e68db3a4432aec0c8914b41d7c2ae4a
Every delay (e.g. 5 minutes), update() gets executed.
public class MyService extends Service implements DataApi.DataListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener private final class ServiceHandler extends Handler @Override public void handleMessage(Message msg) { timerHandl...
0
3cebf14f31a08d346cdb1d7975c57f82
63ea74ee68c3ee7ad4da93852f40d708
Get JSON from API with Circuit Breaker Example -> Fallback
HttpClient { install(JsonFeature) { serializer = KotlinxSerializer() } }.use { client -> val hello = client.get<String>{ url(secureURL) } println("Get hello got $hello") } }
0
be3392ccee02affc06de4ac9e4c6c834
e0b74edec6ebb58b0242e18c36f1eedd
Get upcoming trips.
url = 'https://api.at.govt.nz/v2/public/realtime/tripupdates?' headers = { 'Ocp-Apim-Subscription-Key': api_key, } params = { 'callback': '', 'tripid': '', 'vehicleid': '', } r = requests.get(url, params=params, headers=headers) return r.json()
0
e97fa91225e2bbda162f9569fa92ee4d
41434a4ebdb35e1719715f747415676e
升级人物
let model = 20001 if (info.image && info.image != 0) { model = info.image } tiannv.loadModel(model) if (FightSystem.getInstance().isFight()) { tiannv.doCommand(ActorCommand.SetNameColor, "springgreen") } else { tiannv.doCommand(ActorCom...
0
2c59c86234bbf0fbcb236e3b64f6c813
63920d81cc66db19a3a9e3ec35b2b4d3
修改SD卡上的文件或目录名
public class FileUtil public static boolean renameSDFile(String oldfileName, String newFileName) { File oleFile = new File(Environment.getExternalStorageDirectory().getPath() + "/" + oldfileName); File newFile = new File(Environment.getExternalStorageDirectory().getPath() + "/" + newFileName); r...
1
6f6489c15fe3ca8bafe586cde122be49
15b42445c8bce0d58306683d3bdbb0d7
Number of bins.
class SparselyBin(Factory, Container): def size(self): return len(self.bins)
1