query_id
string
corpus_id
string
query
string
code
string
label
int64
eb2f8d7f7ece3927b8e58c3199518ddc
fdb901d1ffbc5d45253c34cfff997de6
For CompleteTotalAmount TextBox Click Event
{ decimal v_sum; decimal v_amount; decimal v_total_sum = 0; decimal v_tax = 0.18m; if (this.taxtextBox.Text != "") { v_tax = (decimal)Convert.ChangeType(this.taxtextBox.Text, typeof(decimal)); } else ...
0
986d36939ea9a5091b48aed5f3cd87c1
568db4fe179bc4bfe28d7572dfc5bda6
创建有圆点样式的tab
ToggleButton tab = (ToggleButton) LayoutInflater.from(getContext()).inflate(layoutRes, null); tab.setTextSize(textSize); LayoutParams lp = new LayoutParams(0, LayoutParams.MATCH_PARENT); lp.weight = 1; tab.setLayoutParams(lp); tab.setSingleLine(true); tab.setEllipsize(TruncateAt.END); tab.setPadding(Dim...
0
3ff8e2bbcf0cea40290a380162993dd2
687b073e1e7d3fb5dad9b9f07bf0a966
The assembly references to be emitted, in row order. These are just the assembly references from the current generation.
public List<CompositeReferenceModel> getReferences();
1
fdae7604a37c7f12b69bb4d1944701a0
44780cc87fbb7c852b1ab00209a9bb37
Create the configurations that are used by the InstallByShutdown extension if missing.
{ $manifest = $recipe->getManifest(); foreach (array_keys($this->postInstallConfigurators) as $key) { if (isset($manifest[$key])) { $this->get($key)->configure($recipe, $manifest[$key], $lock, $options); } } }
0
29b51a821b9c020978e8fba3c967dbea
65f2a75021be3d674f7979757667ff0d
Appends a byte array to the body of the HTTP response.
namespace DAVSharp public class DavResponse public void AppendContent( byte[] additionalContent ) { AppendContent( additionalContent, 0, additionalContent.Length ); }
1
06aa0635959b84fe38422c87dc05dc8c
ecfb627eafce14eba108e4bcde3a9f50
Function to calculate the maximum root-to-leaf sum in a binary tree
int sum; if(!root) { sum = 0; res = max(res, 0); return sum; } if(!root->left && !root->right) { sum = root->val; res = max(res, root->val); return sum; } if(!root->left && root->right) { ...
0
06fac9c6a4a87999c04b9df5e074ac86
bfc697c25c3a011cac334b8e4c0c3749
Reverse the bit order of the data, due to LCD connections to data bus being backwards.
uint8_t cSharpLcd::reverseByte (uint8_t b) { b = ((b & 0xF0) >> 4) | ((b & 0x0F) << 4); b = ((b & 0xCC) >> 2) | ((b & 0x33) << 2); return ((b & 0xAA) >> 1) | ((b & 0x55) << 1); }
1
c7c505d69fa55593f96be5f26ac70e23
8ef0cf9ecfd1d3e7f5320037b7c3f403
https://developer.github.com/v3/repos/forks#list-forks
namespace Octokit.Reactive public class ObservableRepositoryForksClient : IObservableRepositoryForksClient public IObservable<Repository> GetAll(string owner, string repositoryName, RepositoryForksListRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.Argu...
1
7f4d44d24a7cfab73adb2965ca7bd94e
25c295ce340d0aa01502db10e91ada40
获取ComposerAutoloaderInit类名称
{ $result = false; $classes = get_declared_classes(); natsort($classes); foreach ($classes as $class) { if (stristr($class, 'ComposerAutoloaderInit')) { $result = true; break; } } return $result; }
0
969757a6ea4c88ad9c0a9db2a76be191
aa8c020146e78bbaeb34133592618d40
Fetches facebook video info
if (preg_match('~^http://(?:www\.)?vimeo\.com/(?:clip:)?(\d+)~', $link, $match)) { $id = $match[1]; } else { $id = substr($link, 10, strlen($link)); } if (!function_exists('curl_init')) die('CURL is not installed!'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http:...
0
b0d9426f55c716bd0540d65a397ec876
b2bf64ddae4639aee9a5a6a80543cdbf
回收损毁的防御工事
function recycleObject():void { let monsterCount = GameData.monsters.length; let bossCount = GameData.boss.length; recycleHero(); for (let i = 0; i < monsterCount; i++) { let monster:Monster = GameData.monsters[i]; monster.recycle(); monster.removeComp...
0
4cdff534b6dd9f2dfd18622f1bcc207c
ca3f90a203e31059a6dafdc9a054fd64
expr : NAME LPAREN exprlist RPAREN
{ mpdm_t v = NULL; if (c->error) {} else if (c->token == T_LPAREN) { token(c); v = expr(c); if (c->token == T_RPAREN) token(c); else c_error(c); } else c_error(c); return v; }
0
5a009b4f3992eb08e263812f7619672d
bd3102f39554c7194cc54183a24ac1e2
活动报名人员清单下载
List<JSONObject> downloadList(long activityId);
1
94c387e8ca57d5a46a4529048b3bd833
d0ae5bba766ac29717bb6e7dd5416fae
Check if a page has any answers associated with it
$query = $this->db->get_where ('test_answers_offline', array('test_id'=>$tid) ); if ($query->num_rows() > 0 ) { return $query->num_rows(); } else { return 0; } }
1
104d1f2ac8c2eebe9ddd68edf328a406
fc3e9bd0c1ca0203c33a646187ed3a30
从相册选择识别
public class UserInfoActivity extends BaseActivity private void selectFromAlbum() { Intent intent = new Intent(Intent.ACTION_PICK, null); intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*"); startActivityForResult(intent, GALLERY_REQUEST_CODE); }
1
5331b596f4893b7c3d6d723da56ba4ba
97d7a1f0fc67b2a26544f09d4f28a961
Elimina registro de tarea profesionales.
{ $Profesionales_tratamiento = Profesionales_tratamiento::find($id); $Profesionales_tratamiento->delete(); return redirect('/profesionales_tratamiento')->with('message','Eliminado Satisfactoriamente !'); }
1
23d516deac504fa3a0f44195ba969091
fde192d091ac5a780c41d8d568afa914
Resets the app code (changes from predefined custom app code to standard MarketSim).
void resetApp();
1
ec204ab1fdeb7619ecdedbd2985104cb
d9db72fa8d77632912e17a6287e6ae61
Sets the name of the record field to use as the lookup key.
class ZCRMRecord public function setLookupLabel($lookupLabel) { $this->lookupLabel = $lookupLabel; }
0
ff6bd09c66d7154f37e15b0bfc0b4722
a7683c280609917225441fd64e4cd366
通过TUser的id更新TUser中的数据,包括null值
@Service @Transactional public class TUserServiceImpl extends ServiceImpl<TUserMapper, TUser> implements ITUserService @Override public boolean updateUser(TUser tUser) { return this.updateById(tUser); }
1
c4448eac17842685416f5de65ba338c2
a5103dc2c5e58690cd40c91c6b706c95
Respects FlightTask interface, where NAN-setpoints are of no interest and do not require control.
class CrazyflieConnection(connection.Connection): def take_control(self): pass
0
6d02fe2ab45554204d914601c337efd0
17d1cc2c12ba1f90a8998dfecb01e9a8
Получает список матчей и автоматически присоединяется к одному из возможных
class Controls: def __matches(self): import json import requests res = requests.get( url=self.host + "api/matches" + "?sender=" + self.api_key) return [str(match) for match in json.loads(res.content)['matches']]
0
8c67f8ea14d101ec6fdb5f1657b44ccd
036e3b723e4b78c9772c2998cf83ad74
베팅을 시작한다.
{ BettingGameViewModel gameViewModel = (BettingGameViewModel)DataContext; if (gameViewModel.ConfirmBet(BettingBox.Text, Wallet.Text)) { gameViewModel.StartTimer(); LeverStory.Stop(); } else { ...
1
faa30197d95e2fba287d211d95308b8e
f72d7672e112f7295b45ae7f337fe3ad
Agrega taxonomia a imagenes para armar albumes
namespace AbaxXBRL.Taxonomia.Impl public class EstrategiaCacheTaxonomiaMemoria: IEstrategiaCacheTaxonomia public bool AgregarTaxonomia(IList<ArchivoImportadoDocumento> dtsTaxonomia, ITaxonomiaXBRL taxonomia) { if (dtsTaxonomia == null) return true; foreach (var keyValTax in _cacheTax...
0
a0ea7340c2ecb027b223a6326fd9730e
82d937a6a939b385a049d6459b10fc01
GET: Roupas
{ DBPawnshopEntitiesConection db = new DBPawnshopEntitiesConection(); string idUser = System.Web.HttpContext.Current.Session["id"].ToString(); SqlParameter param1 = new SqlParameter("@id", idUser); var data = db.Database.SqlQuery<tblGarment>("getProductData @id", ...
1
0ace4e0ff2175601716017c530af5b4c
1a525f054f1de20a0de03c5ebcd40651
A function that returns the url for an ohlcv request
class GetPricesData: def GetAPIUrl(self, cur): u = 'https://poloniex.com/public?command=returnChartData&currencyPair=USDT_' + cur + '&start=1520985600&end=9999999999&period=300' return u
1
350ac8d1d9685b30f1eaeb6bdbee8b81
8f602fcf97948f4f94bb82a92b9e83aa
[deutsch] <p>Liefert das koptische Jahr. </p>
Optional<Integer> getYear();
0
c2e30d40920989578c638f0a31dbdce2
3cd9222f1f7801b10d16d39f9b6c4e98
保存上传产品店铺和站点的默认配置
class SiteConfig extends Base public function store() { $param = Request::param(); $model = new SiteConfigModel; $result = $model->store($param); return json($result); }
1
9aa2b95de158e8390c1873fabcd192a0
b6710752db4914ab1e3cf165372dd5f9
射影変換を行う関数
function _projection(x, y, z) { var c1 = rotateX(x, y, z, rotateXAngle); var c2 = rotateY(c1.x, c1.y, c1.z, rotateYAngle); var c3 = rotateZ(c2.x, c2.y, c2.z, rotateZAngle); var scale = focalLength / (focalLength + c3.z + centerPoint.z); return { ...
1
07fa30044e2f48b3d879bc1697fef0a8
95962206fbf6650a100c8499711dbd91
MSH
void NS_dash_M() { switch(Pop()) { case 0: WEBE3(); break; case 2: WEC3A(); break; case 4: WEC8C(); break; case 5: WEC64(); break; case 6: WEC11(); break; default: NOP(); break; } }
0
ce6eecc90888e4ece193ee63530ecbee
8eb577cde7c47af59110a3848dcd71f1
显示提示信息的函数,txt是内容,t是显示时间
function showTips(contex) { $("#Tip").show().delay(1800).hide(200); $("#Tip").text(contex); }
0
d7092b42dfeb92d2f06abbff75a46360
a3de6ed318457c2baf83f1fb58c1968e
Allows the commercial settings to be set.
await this.sendFrame( new ElType.ElObject(0x05, 0xFF, 0x01), new ElType.ElObject(0x01, 0x30, 0x01), ElType.ElService.SetC, [ new ElType.ElProperty(0x8F, new Uint8Array([setting])), ] ); return; }
1
2d198d1d5659d7e881f1020d01c36468
7c90d6af0a4f2af1193eba0780fa12a8
Метод для форматирования даты из unix timestamp в формат mysql
class DateTimeUtils// extends DateTime public static function convertMysqlDate( $mysqlDate, $printFormat = null, $locale = null ) { preg_match( "/^([0-9]{4})-([0-9]{2})-([0-9]{2})(?: ([0-9]{2}):([0-9]{2}):([0-9]{2}))?$/", $mysqlDate, $date ); if (count( $date ) == 4) { $_h = 0; $_j = 0; ...
0
e71ac81c7f15dd40ac28be99032e7522
a46bea119c590e251ad77f284f2c8e17
Tells whether the router needs rebooting for changes to take effect.
def reboot_required(): result = run("/usr/local/bin/check_reboot_required 30 0", warn_only=True) return (not result.succeeded)
1
9ab6aae8ed537381ca857e4d2a95bb83
55ef58c0d9c8cc97dafb0504081b2cb3
x와 y의 값을 출력해줌
public class Point2D{ void print(){ System.out.println(x + ", " + y); }
1
99916fe35db444f2d8a3bb6c195a92c0
27ec8b2c46976cbb6b06c5ee9cd2bef4
Simple call of "fn:trace" function with integer value. .
Object g2int_gensym_list_trace_hook(a_list) Object a_list; { x_note_fn_call(20,9); return VALUES_1(a_list); }
0
925d869bdb5bb49980f610560fb3676f
eb24c01c781544ad3750cd715ca6c5c1
Converts the given instance to a dynamo db record.
ret = { self.key: { 'Action': self.action, } } if not is_null(self.value): ret[self.key]['Value'] = dynamizer.encode(self.value) return ret
1
fa3c4f590e08dd272255b63f0c30b075
4662899a83fb33b8f5f21215e1ca9948
Run RPCA on data
int x = 0; int Ra, Rb, Rc, Rd; int D0, D1, D2; while(x < w) { int err, pred, sign; Ra = x ? R(cur, x - stride) : R(last, x); Rb = R(last, x); Rc = x ? R(last, x - stride) : last2; Rd = (x >= w - stride) ? R(last, x) : R(last, x + stride); D0 = Rd - Rb; ...
0
7785f139f3c6dd7fba2a80e1c2dfb952
33c4c72ccba45fed20c4bd2ac7228717
Teleport player back and reward
if (SceneManager.GetActiveScene().buildIndex == 0 || SceneManager.GetActiveScene().name=="Reward") return; this.transform.position = Player.transform.position; }
0
c959e69e0d4c0918a23e648a90143cf4
27c00eed196b0022ccf017a3722639aa
Sets whether to show the active records only. if true only the active records are shown
abstract class TSLAppBasicRecordDAO_postgre extends \TSLBasicRecordDAO public function __construct(bool $activeSearchOnly = TRUE) { $this->activeSearchOnly = $activeSearchOnly; }
1
3cb974a078733dd59b2d29c076e0f23e
438d9ac2562401c07b1ab899a4132630
Plays the next music of the playlist
void nextMusic();
1
b1f2aadf52f8ab27c2af27c0d9c90b4c
2c95250441cb229da311e0eb10cc872e
Método para listar estufas.
class RackController extends Controller public function listar_rack() { $rack = Rack::all(); return view('listar-rack', compact('rack')); }
0
55ab6346223c5dd8d4ef601f56e817c8
a95156c6a0172b9f56c7079c089e5ffc
Verifica se eh equilatero #
if self.a == self.b and self.a == self.c: return True else: return False
1
4c9fca39808f8fa68d8666dfbf794fb1
14b67dbf813b218043464821563243c6
Sets the modified time of this office supply application.
public class OfficeSupplyWrapper implements OfficeSupply, ModelWrapper<OfficeSupply> @Override public void setModifiedTime(java.util.Date modifiedTime) { _officeSupply.setModifiedTime(modifiedTime); }
1
0706d39ad8beaf7091aa9ed93345bdfc
513d5582935b581ce61f708bf7c84d10
Annualized standard deviation
class Index(): def Annulstd(self, portfolio,colname='net_value',period='all',year_day=251): portfolio = self.YearProcess(portfolio,period=period) RET = portfolio[colname].pct_change(1).fillna(0) return np.std(RET) * np.sqrt(year_day)
1
bbf72baabcb63755791ae1d8fd8dc8df
24a2a3581e8eb5b5bf347c9873407bf1
Gets the minimum required PHP version for this plugin.
public static function getMinimumVersion();
1
dcf5e9968f5af31ade06b5bbf2a91416
94cebb37e2adce2e7ef49d0fb43edff6
fonctions à nombre de paramètres <strong>nommés</strong> non fixés
def fonctionParametre(**parametres): print(parametres)
1
10f30a7d0cfcab19c83c9e5ac4870294
7ee102347d0968ef40e797dab8de6a42
扫描某一个IP的某一个端口
for (int port = portStart; port <= portEnd; port++){ scan(ip,port); } }
0
3e83880821123e8441161f83bf76b6db
20ed53faf851f39ffc0bb27c0944bd57
修改最大投票数
namespace TeamFight.Core.Character.Team public class VoteCollector public void ChagneVoteSize(uint newSize) { if (!_collector.Any()) mVoteSize = newSize; }
1
18caab0d7ac3266dffd19eb1b8cd7582
e8ae0edc3942b7d0ae2f4d2eba3e143c
This method will be used get the Interim Tests based on the Logged In User.
@SpringBootApplication @RestController @CrossOrigin("*") @RequestMapping("/Admin") public class AdminController @GetMapping("userTests") public ResponseEntity<List<User_Test>> allExams() throws Exception{ return new ResponseEntity<List<User_Test>>(service.allExams(), HttpStatus.OK); }
0
df2b840bb9767be3744889546d721a65
fc90c57c3d028315de44058f9d161aa8
向下滑动时相关效果 页面滑动未超过200px时,页面向上滑动元导航慢慢消失,新导航逐渐显示,页面向下滑动,原导航逐渐显示,新导航消失。滑动页面滚动超过200px时新导航固定顶部。
var oFixedLeftWr = document.getElementById('fixed-left-wr'), aFixedLeftWrLi = oFixedLeftWr.getElementsByTagName('li'), oItemTop = document.getElementById('item-top'), oFixedLeftLast = getByClass(oFixedLeftWr,'fixed-left-last')[0], scrollTimer = 0; window.onscroll = function(){ ...
0
8c0a6acfe761496fabbbd5cecfe0a2c9
93bb382ee643694d6fefe3a7391187d0
Resolve selection as string to list of indicies. Selections are expected to have pandas.DataFrame.query-compatible syntax, e.g., ``` "event_no % 5 > 0" ``` Selections may also specify a fixed number of events to randomly sample, e.g., ``` "10000 random events ~ event_no % 5 > 0" "20% random events ~ event_no % 5 > 0" `...
trips = self.feed.trips routes = self.feed.routes freq = self.feed.frequencies for key in selection.keys(): if type(selection[key]) not in [list, tuple]: selection[key] = [selection[key]] if "trip_id" in selection: trips = trips[trips.trip_...
0
3365fe50cd1fa102ebc82b9f6ec26af6
9bbd4470eef6423649f5eba373e0bb92
Event handler which activates when the toggle is being left clicked in order to toggle it 'On' or 'Off'.
class MainContentComponent : public AudioAppComponent, private Slider::Listener, private ToggleButton::Listener void buttonClicked (Button* button) override { if(button == &onOffButton && onOffButton.getToggleState()){ onOff = 1; } else{ onOff = 0; ...
1
541a6a9d7c2359197c4c1bde6379d9fc
50f03ff95ec12967f3b054219a976e5a
the terminal in raw mode is resumed; our function is to restore the terminal to raw mode.
void disable_raw_mode() { if(tcsetattr(STDIN_FILENO, TCSAFLUSH, &editor.orig_terminal)==-1) error("tcsetattr failed, cannot establish canonical mode"); }
0
542dc0fd0b913a789cea3d6f2098ce58
ce2432967961f22c4f8db843c4e4730c
Creates a new validator to check if the e-mail address is available.
$this->_validatorOptions = array( 'table' => $table, 'field' => $field ); $this->addValidator(new \ZendY_Validate_NoEmailExists($this->_validatorOptions)); return $this; }
1
19add6d8bf947288734126cc3afb3624
84559b7b73fce6208c7d34dd11ccc3cf
Do two usernames map to the same SID?
{ SymEntry *se0 = sideTbl[0].Lookup(pfp->side_name[0]); SymEntry *se1 = sideTbl[1].Lookup(pfp->side_name[1]); return(se0 && se1); }
0
265987b169aa3aacbaf7dcde883d0917
03416e803e79581a819bb0f0bcb9641a
Returns the total number of appliations the user is signed on.
public class ProgramAdapter extends BaseAdapter public int getUserAppSize() { return userAppList.size(); }
1
29d557652ed1e370e51806fe38a6f046
f1c881ff044f519e27bc3c2642909da6
功能: 蚂蚁找到一条路径之后,就更新信息素
void Updateinfo() { cout << "updateinfo" << endl; cout << vertex_count << endl; double **tmpinfo; tmpinfo = new double*[vertex_count]; for(int i = 0;i<vertex_count;i++){ tmpinfo[i] = new double[vertex_count]; } for(int i = 0;i<vertex_count;i++){ ...
1
f99846cbb495f28e1cd81e2d152f0367
0fb631fbbbbe1a9933ffee038519240d
Maximizes this instance.
class Window(LayoutTaskHandler, WidgetComponent): def maximize(self): self.abstract_obj.maximize()
1
f95af025347951e265645006bad92e3c
630c2328135f8103fe79e67251425b37
Sums even numbers
int evensum(int n) { int i,sum=0; for(i=2;i<=n;i+=2) sum+=i; return sum; }
1
64dad6227db32241e4117336700fd1ff
dd090f0b41f4c4ed17e055c879e51a47
Returns the global property name for the given element type using the information provided.
function getGlobalProperty(propertyKey, propertyType) { return getProperty(propertyKey, propertyType, null, null); }
0
ac86d285f5bc9047a655ece0626300b9
1b178bd3c656e62fe05e42a0206516dc
fills in stop and route info for the primary test stop
const stopsCopy = Object.assign({}, stops); for (let i=0; i<stopsCopy[stopId].departures.length; i++) { let departure = stopsCopy[stopId].departures[i]; if (departure.route_id === route) { stopsCopy[stopId].routeId = route; stopsCopy[stopId].nextSt...
1
e231055ad01a6a86a3660d5b50c52f9d
10ce98d77c8578e96c1076f79649c3b3
Переименовать кнопку
await bot.delete_message(chat_id=call.message.chat.id,message_id=call.message.message_id) await bot.send_message(call.message.chat.id,text='Отправь мне кнопку по принципу\n\n' 'ИМЯ КНОПКИ - ССЫЛКА') await st_reg.step_regbutton.set()
0
69cf09e8f0b96e76abd00e8a204233c9
d9a6a5bf7da0c452a7529bd8604b410e
elimina un grupo de la lista de grupos del usuario
log.info("Remove group {} ", idGroup, idUser); User user = (User) this.load(idUser); if(user == null) throw new NotFoundException(); if(idUser == null || idGroup == null) throw new MissingParametersException(); ArrayList<Group> groups = user.getGroups() .stream() ...
1
ef277f0e5494b0d4daea259784b97429
7f57d495dd9639bd61992dbf1135ca36
Returns the address as a 64-bit integer.
public long getAddress();
1
b10dafd60570207c0f738ae2c5c3e95d
351274a631f544604e0be78f5329b7e2
Constructor del servicio de actuacion
export class IncidenciaAddReviewComponent implements OnInit, OnChanges ngOnInit() { this.actuacion = new ActuacionR(); }
0
3d92fa8c66244f583cf458d2afc56edf
e54d692651384fc2149765aa10bec714
@brief Configure PLLSAI.
static void Playback_Init(void) { RCC_PeriphCLKInitTypeDef RCC_PeriphCLKInitStruct; RCC_PeriphCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SAI1; RCC_PeriphCLKInitStruct.Sai1ClockSelection = RCC_SAI1CLKSOURCE_PLL2; RCC_PeriphCLKInitStruct.PLL2.PLL2P = 38; RCC_PeriphCLKInitStruct.PLL2.PLL2Q = 1; RCC_Per...
1
132643c9e5729dae712b0ff0f5741b99
aba6f8495fef241bf3e9b2107bcfe608
Extract the last token of each padded sequence, given its length
class SMILESBatchColumnSampler: def _iter_steps(self, batch: mx.np.ndarray) -> Generator[Batch, None, None]: def get_valid_lengths(sample: mx.np.ndarray) -> mx.np.ndarray: lengths: List[int] = [] for seq in sample: for i, s in enumerate(seq): if s == pad_t...
0
19a29f58f5cfad2a7ed479f6003327ec
43a45f7d851aeaf9594e3916c665dbe2
Create a new note for a deal
note_content, note_author_id): return self.raise_request(16, customer_id, description, service_id, \ assignee_id, note_content, note_author_id)
1
3520717783e90ef88018a4fd7348e913
a2589f05774b985894dd67d7326df1f1
Faces a turtle northwards
class Game(cmd.Cmd): def do_n(self, args): self.move('n')
0
be9e2790d80917eec44bec845d829fe1
f4cc25067be3723d34f89969a3c4880f
查询一个目录是否可以被改变权限
class Store private function directoryPermissions($d) { $tfile = "_test.txt"; $fp = fopen($d . "/" . $tfile, "w"); if (!$fp) { return false; } fclose($fp); $rs = unlink($d . "/" . $tfile); if ($rs) { return true; } retur...
0
e48fec9346f518cb98bbc23e6d085b38
7f63a6393a4f2b1dc362b4c0c8ba76d4
volume saving utility for masked volumes
def count_mask(input_mask): mask_vol = nb.load(input_mask) mask_data = mask_vol.get_data() return mask_data.sum()
0
2c9d1553b92d52303ba5662bb652993b
e06acc0a51d4d20023f8dc9ea0fbf327
Adds service API versioning to the specified container builder.
{ return services.AddApiVersioning(o => { o.AssumeDefaultVersionWhenUnspecified = true; o.Conventions.Add(new VersionByNamespaceConvention()); o.ApiVersionReader = new HeaderApiVersionReader(apiVersionHeaderName); }); }
1
efc05aa4dd49bf9f37cd05e72c76653f
17097ece5eae4e293ab8d8e2bea9e259
绑定Dictionary数据集至ListControl.
public sealed class EnumUtil public static void BindDictionaryItems2ListControl(ISession session, ListControl listCtrl, string groupCode) { IList<DictionaryItem> list = DictionaryItem.GetDictionaryItemsByGroup(session, groupCode); if (list != null && list.Count > 0) { foreach (Di...
1
7754cffb7e8f41deaff61655151e83fa
ba8bd2e16c998f004b0e8df4a83c9760
Deassert the chip select for the TRF79x0.
void SSITRF79x0WriteContinuousStop(void) { SSITRF79x0ChipSelectDeAssert(); }
1
eb2591a5f9f67faa549b8c3135ee3028
27788603130c810036c57b7f74d1802c
넘어온 셀 영역을 병합하는 함수
function TableAppendRowMerge(FirstCellName,left,right,top,bottom,font,size,bold,italic,underline){ if (pHwpCtrl.MoveToField(FirstCellName)){ pHwpCtrl.Run("TableCellBlock"); pHwpCtrl.Run("TableColPageDown"); pHwpCtrl.Run("Cancel"); pHwpCtrl.Run("TableAppendRow"); pHwpCtrl.Run("TableCellBlockRow"); se...
1
414b7390bdcadd90c3423bda361c31aa
39dd15e97f44556400363464ab147197
save the page to disk for further processing
public class BrowsrController implements HyperLinkListener, FormListener public void savePage(String filename,String htmlCode) { new Saver().saveToFile(filename, htmlCode); }
1
46390ae83332194af62fcc486536cf53
113a1f924048e5720dfeebe84e679678
initialises the value of scoreText
public class ScoreManager : MonoBehaviour void Start() { amountScoreText.text = string.Format("{0}", 0); }
1
a5e0dc28aa138d0f2bb19fc790017c95
837b899626c86dbc03018dc8c7dd3d34
Create a Haiku conditioner that assumes a single batch dimension.
out_channels, groups): return CondenseComplexConv( in_channels=in_channels, out_channels=out_channels, kernel_size=1, stride=1, padding=0, groups=groups)
0
b3fe4acd2c29c5e57fd3c0cc87c6abed
2aadb49d2fdedc64b645061767127aa5
Helper to grab the last gram in a line.
for word in line.split(): if word.endswith("lbs"): m = re.search(INTERVAL, word) if m is not None: return _convert(m.group(1).removesuffix("lbs"), float) elif word == "bar" or "bar-" in word: return "bar" elif word == "bodyweight" or "bodyw...
0
6bfa13f68ca7aaa038ee628ea2e9123b
9a5328faa96684f9115d9648a17aa87a
Store information of connected modules/components. Side effect:
class LSTM(NN): def store(self): self.igate.store() self.fgate.store() self.ogate.store() super(LSTM, self).store()
1
4b90933057486244bcd67a0440140365
b00eb99e7b9d7e6b920436e45f421f9e
购物车数量金额计算(减法)
$goods_id=input('post.goods_id'); if($this->checkLogin()){ $user_id=$this->getUserId(); $cart_model=model('Cart'); $cartWhere=[ ['c.goods_id','in',$goods_id], ['user_id','=',$user_id], ['is_del','=',1] ]; $info=$cart_model ->field('buy_number,goods_pric...
0
badbc50c411da0caa4886b0016067a0c
2f723f604c314e41454582159dd4d32e
! Decode the current block using static codes.
def decode_from_bits_static(bits): cb = deserialize_codebook(bits) return decode_data(bits, cb)
1
d96be40627b7ab7feb222919e6e31923
c35cfad99b6852d6159da96918aa3b3d
Returns True if the binning value is circular
class Sensicam(LibraryDriver): def binning(self): return self.coc.binning
0
3dbf8ab23ea0c5e3bf8b3b102c5f3e54
38647590a6bb119b5ea24b7ddfd6ef1e
Get the fait generic7.
class SuiviClient public function getFaitGeneric9(): ?string { return $this->faitGeneric9; }
0
228ee0751c5647dbc6dff6af24d68500
a75082f16bef0bc5bcfe8f4750c687e9
Met à jour le joueur courant lorsqu'il a trouvé un trésor c-à-d enlève le trésor de sa liste de trésors à trouver
boolean success = false; if(isInsideBoard(position)) { removeFromBoard(TREASURE, position); for(int i=0; i<getTreasuresPos().size(); i++) { if(position.getX() == getTreasuresPos().get(i).getX() && position.getY() == getTreasuresPos().get(i).getY()) { getTreasuresPos().remove(i); success = ...
1
e39ba9fb7c6cf6bf2d1c1c0d94270629
f5046bca59bc1f5a3424560815e6d4b4
The canonical host is guaranteed to be lower case.
public class HmuxRequest extends AbstractHttpRequest implements ServerRequest @Override protected CharBuffer getHost() { if (_host.length() > 0) return _host; _host.append(_serverName); _host.toLowerCase(); return _host; }
1
777b384258ff8a5d00a8fdb0e75c916d
a2b5e3b24c1e958c539fc2c59de1055f
update and return rooms values with the changes of guests and objects
function change_rooms(socket){ let rooms={}; let users=[]; users=Object.keys(nickNames).map(n=>({name:nickNames[n],id:n})); rooms=Object.keys(socket.adapter.rooms).map(room_row=>{ let room={}; let clinets=socket.adapter.rooms[room_row].sockets; room['users']=Object.keys(clinet...
1
a363b847bf43d048fcd9287ba3bcac7f
9d75bf1bc64093ef38471fa73a3859bf
========================================= Edita un profesional con sus datos =========================================
{ ProfesionalBE wProfesional = null; using (Health.Back.BE.HealthEntities dc = new Health.Back.BE.HealthEntities(Common.CnnString_Entities)) { var x = dc.Profesional_FullView.Where(p => p.IdProfesional.Equals(idProfesional)).FirstOrDefault(); i...
0
7c2768019a07697506c18f93ac843d51
30b3e81a8590a0cbf6bcb7b53a9f8abf
Check that the EMS inventory is as up to date as the CloneVM_Task completeTime to prevent issues with post-provision depending on data that isn't in VMDB yet
public void checkAndUpdateOcsEngineStateOnAllVms();
0
91560fe314824e582739bbe8ab6bd396
0ed456b2a65550d50cc1206fc467502a
validate the node if it's ok to use and have enough resources
class DagNode(object): def validate(self): return True
0
dc57f854388a3de255e7033d76a64ffe
3ad10592428482952cdea6781421d7f1
Clone course files
class utils public static function cleanup_files() { global $DB; $assignids = $DB->get_fieldset_select(constants::M_TABLE,'assignment','assignment>0'); if(!$assignids){return true;} $assignids = array_unique($assignids); foreach($assignids as $assignid) { $cm = get_co...
0
573547a484788a21732f6de55fe27887
2c1b82cb4823a80f7b7ad2a7993369fe
接收数据 如果缓冲已满,断开连接,不再接受数据。
namespace SDK.Lib public class NetTCPClient public void Receive() { if (mSocket.Connected) { IAsyncResult asyncSend = mSocket.BeginReceive(mClientBuffer.dynBuffer.buffer, 0, (int)mClientBuffer.dynBuffer.capacity, SocketFlags.None, new System.AsyncCallback(ReceiveData)...
0
ea24d1d03c6b281264597b643408da8b
4e9a046b9ce7cf5875d383c8802a47e9
get definition of a previously defined association
if __debug__: if not isinstance(obj, unicode): raise TypeError, "The argument must be a unicode object." res = sa.select( columns=[self._table.c.definition], whereclause=(self._table.c.object==obj.lower()), from_obj=self._table ...
1
a157f2ac231e8c9eb0d856859ffbd39f
c4bb8911f3a3826f20616f45e9646f57
One hot encoding of the network outputs
class NNet(object): def one_hot(self): Y = np.zeros((self.Y.shape[0],self.layer_dims[-1])) Y[np.arange(self.Y.shape[0]),self.Y]=1 return Y.T
1
26ca5c7e33e48176261bd5249b96de07
80e755d4be08690d21d486a2846102ce
get a request from user to share a file with another user.
{ string type, category, assignment_name, filename; cout << "Type: " << flush; cin >> type; cout << "Category: " << flush; cin >> category; cout << "Assignment Name: " << flush; cin >> assignment_name; cout << "File Name: " << flush; cin >> filename; string to_send = ...
1
fdae354884398d8176995fb82e6f7aed
d02cb3eebbf83975d461a884cb2c2479
返回“可选包”列表 (以前的“标准扩展”) 已声明在与这个类装入器相关的库中可用, 加上实现相同类的任何父类装入器
{ foreach (var className in _optionalClasses) yield return className; }
0
85bab5498e5d2d9b10b2ef6b5f6fe2e7
8e8758c21142e242021c20328c371b8a
Performs POIs conflation by identifying the duplicates among a group of POIs.
def find_duplicates(df, to_dedup, tolerance, next_group_id=0): groups = ( pd.DataFrame(neighborhoods(to_dedup.geometry, tolerance)) .join(df[["dropped", "excluded", "ManualReview", "dup_sort"]]) .sort_values(by="dup_sort") ) groups.loc[groups.ManualReview == 11, "dropped"] = False ...
1
d3420ea1631cabb9c009025195b3af95
7753fa2b3fd6f67aa16abeb00f7fa79c
Liga uma propriedade do relatório a uma propriedade do tipo da fonte de dados no formato de unidade monetária
class Price extends \Magento\Ui\Component\Listing\Columns\Column public function prepareDataSource(array $dataSource) { if (isset($dataSource['data']['items'])) { $currency = $this->getCurrency(); $fieldName = $this->getData('name'); foreach ($dataSource['data']['items'] ...
1
05a17c88d8417b00ab8e1c6822a5bd04
3b2ecc4bae2a0e1b2fbc4099bcbfe8d2
Loads test events for the program (if any)
for(int j = 0; j < 9; j++) { events[j].clear(); } eventLoader(); }
1
1480109b2022beed4a09d219ba039b4c
406a10dae168ec46df7995304ea09f1e
Начать перетаскивать мышью можно: 1) задания уже назначенные на процессоры из области расписания 2) свободные задания из первой колонки области матрицы ресурсов
{ if (readyToDragDeparts != null) { readyToDragDeparts.IsChecked = true; readyToDragDeparts.Visibility = Visibility.Visible; if (ScrollBarVerticalOffsetLayout != null) { App.Current.RootVisual.Dispatcher....
0