query_id
string
corpus_id
string
query
string
code
string
label
int64
cfc7de993d2459f62b639ee10286de7c
a7e22479caa7471ed8c82f014b082dab
! @brief Locks the option bytes block access
void FMC_UnlockOptionByte(void) { if ((FMC->OPTCTRL & FMC_OPTCTRL_OPTLOCK) != RESET) { FMC->OPTKEY = FMC_OPT_KEY1; FMC->OPTKEY = FMC_OPT_KEY2; } }
0
8d409f09ee230462a655aad34bac4f31
52bb85ae9e7d6a566122137be9e758da
获取当前设备的本地时间跟UTC时间相差的【分钟数】,可正可负
{ if (dateTime == null) return 0; TimeSpan ts1 = new TimeSpan(dateTime.Ticks); TimeSpan ts2 = new TimeSpan(DateTime.Now.Ticks); TimeSpan ts = ts1.Subtract(ts2).Duration(); return (int)ts.TotalMinutes; }
0
d94d0d60abae1ff554965ab49bd628b0
f6da3d2186a1829a54beba6c51052c92
Cambia los TextToolTipText de los botones de la barra de herramientas
namespace Pantallas public partial class HistorialPaciente : Form private void CambiaText(Button b, string s, string c) { if (!band) b.Text = s; else b.Text = c; }
0
c0191dd6c45984fe4132a53807f229c1
a2cb5ec7035192dc9e1d07739447d2be
获取用户的FD列表
class SwooleUser extends Model public function getFdsByUid($uid) { return Redis::sMembers(self::MAP_UID_FD_PREFIX . $uid); }
1
0dc604096766fc21cf2ba45c5bd26d6a
66d72129f68056393fe1aacc52564204
Create new ry single qubit gate.
class RYGate(Gate): def __init__(self, theta): super().__init__("ry", 1, [theta])
1
fd96e834d4183c3e6d30c4e8d6dae021
e051106efe93ba1885d9a4e9cdeae9a5
Get sample width of an audio stream
factor = 80000. duration_source = calc_collect['extras'] width = int(int(duration_source[sn]['end']-duration_source[sn]['start'])/factor) return width/2.
1
93115cf21afb36b193322a575d3b566d
ad218c088b07cf4c72c692df97854e0f
判断当前商品是否被选中
def Isselect(request): prices = 0 userphone = request.session.get("userphone") groupimg = request.POST.get("groupimg") group =Cartgoods.objects.filter(userid=userphone) groupimg =group.get(productid=groupimg) if groupimg.is_select: groupimg.is_select = False groupimg.save() ...
1
23a69c66cf224a059edcdd0437e2fa41
b18d102d8a4c7b3a35c8b529eb21a3ed
make permanent the export options added via hang_options_setup()
class AUFSManager function reexport() { file_put_contents('/etc/exports', $this->getExports()); return pexec('exportfs -rvf'); }
1
6bd2e5908fc71c9dc9d7d73eea55969a
ed718df6dd7df3426599c6f430464ca9
レイヤー番号からレイヤーを取得
if( this.layers[ layer_id]) return this.layers[ layer_id ]; else if( this.attributesLayers[layer_id] ) return this.attributesLayers[layer_id]; }
1
ccedbf4a3929bb5cd4445512c2e25dd6
b8a040c1f59f895f386e5191a6d12627
The ID is always 0. As the real context implementation counter starts at 1, we are guaranteed to have unique IDs even between them and the empty context.
public class Context implements Serializable private static int genID() { return contentIDCounter++; }
0
20803e21c0e748a7bd8c1d53ce76952d
0cfdc1c706c8b5f655f47e13a194345d
Gets a logger for current thread.
Logger logger = logThreadLocal.get(); if(logger == null){ return originLogger; } return logger; }
1
47adb29e63795b0004d99c8251cd68d2
aee27241b6ea553abbf204d65830de0b
反地理云编码
namespace test_web.Helpers public static class MapFunction public static string Encode(IEnumerable<Coordinate> points) { var str = new StringBuilder(); var encodeDiff = (Action<int>)(diff => { int shifted = diff << 1; if (diff < 0) ...
0
ca4fe4148277f833c4d19a267b10981d
07f35c32c8055d18852ce136f92e445d
Given the UDP Socket, this function reads from it and then writes what ever was streamed to the socket to STDOUT. Literally doing exactly what it's name implies.
void read_and_echo(int udp_socket) { char buf[4096]; int bytes_read; if((bytes_read = read(udp_socket, buf, BUFSIZE)) < 0) { perror("read"); exit(1); } write(STDOUT_FILENO, buf, bytes_read); }
1
4d8ee4e9c5f0359818e4a7c21328e0e9
6d3e2d8d302567569ea84538fc8f5ead
Updates the health label with the specified health values.
infoLabels[0].remove(); infoLabels[0] = new Label("Health: " + object.getHealth()+" / "+ object.getMaxHealth(), textStyle); infoLabels[0].setPosition(infoLabels[1].getX(), infoLabels[1].getY() + infoLabels[1].getHeight()/2 + 10); infoLabels[0].setFontScale(infoLabels[1].getFontScaleX(),i...
1
096a88f77551ba2ce426bb63f50d015c
9647b43b4c1e36c33985c9d064a86a96
returns the top artists of a user
let url = `${ this.urlSpotiArtis }artists/${ id }/top-tracks?country=US`; let headers = this.getHeaders(); return this._httpClient.get(url, { headers }); }
0
6c8c6a1b304970bedeacf96564c4183b
8ffe5c6d1a20ff424acfdadc351f8775
Gets query for [[TicketSlots]].
class SlotGroup extends \Application\Entity\SlotGroup implements \Doctrine\ORM\Proxy\Proxy public function getSlots() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSlots', array()); return parent::getSlots(); }
0
ace2d964c31b4a8fbcf5dcd57d7ad4a2
6788f8e47084fb94b84dc70fac7a258b
#' @description explore coverage of starting epidemic parameters
parseed <- fix_epi_settings()$epi_seed nweeks <- fix_epi_settings()$nweeks mcode <- fix_epi_settings()$mcode par_dir <- paste0("haiti_ocv_JHUmodel/GeneratedData/", mcode, "/") starts_epi <- generate_epi_params(out_dir=par_dir) p1 <- qplot(theta, rho, data = starts_epi) p2 <- qplot(theta, beta1, data = sta...
1
a06308dd0b5687724c82e8c3501f739a
ba6c30193be247d176c356805dad4d5c
Verify we get None when the searched for text isn't there.
class GetTestCase(TestCase): def test_return_none_if_not_found(self): self.assertIsNone(get(self.data, 'foo.zoo.lander'))
1
5d8a76f5b881da4823fa0d44ea900757
df96c389206f33011ed130abb3e26bcd
Restore interrupts to the previous state.
namespace class SuppressInterrupts ~SuppressInterrupts() { if ( mInterruptsWereOn ) { sei(); } }
1
635acd7447267ae07577542791d3f051
acd7d667d46509dc384c946ede9c1cda
Log communication errors when logging is enabled
class DelegationProxyConnection protected function logError($message) { if ($this->supportsLaravelLogging()) { Illuminate\Support\Facades\Log::error($message); return; } error_log($message); }
1
77e65e4f1ffc1533882f35e91086223e
c8f13ea2c5929d33568f2006e36735eb
Generates a list of size 2^power with numbers from set {1, 2, 3}.
def generate_set(array_size, base): my_set = np.zeros((base ** array_size, array_size)) for i in range(my_set.shape[0]): num = int2base(i, base) num = ("%0" + str(array_size) + "d") % int(num) for j in range(array_size): my_set[i, j] = int(num[j]) return my_set
0
d7a63cbe4283519ee6630b9c6f26e03b
a6fff7d37370a5d80e9e46f5eacd1317
The authorization URL to be used for this flow. This MUST be in the form of a URL. This is a REQUIRED property. <p> Applies to oauth2 ("implicit", "authorizationCode"). </p> <p> This method sets the authorizationUrl property of an OAuthFlow instance to the given authorizationUrl argument. </p> the authorization URL use...
public class OAuthFlowImpl implements OAuthFlow public void setAuthorizationURL(String authorizationURL) { this.authorizationURL = authorizationURL; }
1
7cfeca956be9fd7818c5fb151246dd0a
e6b7b1e62f6f56cce3d35da460c3f1a5
This method tests that the GetCountries method works in a valid situation.
public void getAllCountries(){ Response response = apiSteps.getCountry("https://restcountries-v1.p.rapidapi.com/all"); apiSteps.verifyStatusCode(response); Country[] countries = response.as(Country[].class); Assert.assertEquals(250, countries.length); }
1
9f046dd5fc00d281a037b5513e9e85fc
ddfcb4760c7a146955908318d7470dd5
Возвращает возможную версию текущего API 2ГИС
class Validate_Finance_IBAN function apiVersion() { return 1.0; }
0
af4bb263b50b4b793a9a97a940e1bdeb
2768f9af62d8e7378539d19617354488
adiciona à lista de usuários ativos
class UserInactiveList public function addUser(User $User) { $this->getSearchModel()->addUser($User); }
0
73f62309086c6b09103d40eae43d6a53
8a7ee218f566f0c57b856af028f1022f
Handler for font colour button
namespace RD_AAOW public partial class GeomagDataDrawerForm: Form private void TextFontColor_Click (object sender, EventArgs e) { ColorSelectDialog.Color = TextFontColor.BackColor; ColorSelectDialog.ShowDialog (); TextFontColor.BackColor = ColorSelectDialog.Color; }
1
d5b51cac1e79d806bc18ee97c63251b2
34ee5743639446fa69aa33588c463bdd
Preprocess data for CTR model
def prepare_data(path): clicks = pd.read_csv(path).rename(columns=underscore).drop(to_drop, axis=1) to_ord = lambda dt: dt.toordinal() for date_col in [c for c in clicks.columns if c.startswith('date')]: clicks[date_col] = pd.to_datetime(clicks[date_col]).apply(to_ord) prepared = add_dummies(cli...
1
c97f22e3f0bf765e2d416bce3759965b
96f252eecd8c0a34f19eec52e96d234d
Integrate a given two column (x,y) spectrum array
def integrate_spectrum(freqs, Ls): return np.trapz(y=Ls, x=freqs)
1
b2564ea3af3ad94996208dca67f4f58a
4ff414db0376fc44bb819aff9daf2208
Create full text index
{ if ($this->db->driverName === 'mysql') { if (class_exists('\wdmg\pages\models\Pages')) { $tableName = \wdmg\pages\models\Pages::tableName(); $this->execute("ALTER TABLE $tableName ADD FULLTEXT INDEX {{%idx-pages-search}} ( `title`, ...
1
17ab83689abe2f2622276932d3769191
5fffae13bfcb952ee5975071535bda52
根据条件查询满足条件的(用户定位信息)记录数,精确查询
public int findCountByConditions(ZumaPositionUserBean positionUserBean);
1
47c2b54b86465126e4e2184a993feda2
ab472b2678ebe71afe176403dcadeb9b
京东支付异步通知页面
PaymentNotifyResponse jhjAsyncNotify(PaymentNotifyRequest request);
1
bbb6577252c59633d12dc9eb94abddca
0628860370b098a42233a288febbedd3
数字がFizzBuzzか判定
def fizzBuzz2(fizzUntil=100): def isFizzBuzz(i): if i % 3 == 0 and i % 5 == 0: return True
1
4a15133b9ef632d8d73ccb8fdd0e4d33
9323a4f664745edcc018b27e76abb8c5
automatically maps contacts from redux to props when page loads (component mounts)
function mapStateToProps(state) { return { customers: state.customerReducer.customers } }
1
b6a91114f32729414ed756ece76ca5b7
ad1b434baf1e3d24362f2ef51eee56ed
Change colorbar title.
class Graph(HasTraits): def _name_changed(self): axe = self.figure.axes[0] axe.set_title(self.name) self.figure.canvas.draw()
0
36ea99bd32fcff89d8eca950a1c6e53a
ec997cb150545cb3d0fd2ec15ff88517
初始化hystrix配置,读取环境变量.
public void initHystrixConfiguration() { read(null, hystrixConfigurationProperties.getHystrixConfig()); for (Entry<String, Object> conf : hystrixConf.entrySet()) { ConfigurationManager.getConfigInstance().setProperty(conf.getKey(), conf.getValue()); } }
1
066428a1324863da6b0827b21ca5350c
2e89d2116492a267715bc7e1e1356c8b
shifts elements of array right one from point of entry to right end
public class ArraysLab3 public static void rotateRight(int[] arr){ int elem1 = arr[arr.length - 1]; for(int i = arr.length - 1; i > 0; i--){ arr[i] = arr[i - 1]; } arr[0] = elem1; }
1
f8de977d0af4e741e9415eb70eb650bd
4af72caf222b22789dd83e6af70203fc
查询供应商有权限的药品
public JSONObject getVendorByMedicineCode(@RequestParam(name="medicineId") Integer medicineId, @RequestParam(name="category") ProductCategory category, HttpServletRequest request){ try { EmployeeSessionManager sm = new EmployeeSessionManager(request.getSession()); return JsonUtil.succeedJson(inventorySer...
1
1d52c8e06bbbde64f023e5edd46d9e67
ffe239a87daadd0112bf6bd255156747
Display the specified resource. GET /submodulesitems/{id}
{ $input = $request->all(); $result = $this->itemsSubRepository->search($input); $itemsSubs = $result[0]; $attributes = $result[1]; return view('itemsSubs.index') ->with('itemsSubs', $itemsSubs) ->with('attributes', $attributes);; }
0
49419a486a973d5f81336e9d733399e6
cda89c79333fe18d39463203917fa1f2
Get the mass per unit length, :math:`\frac{m}{L}`
class GenericAtmosphere(object): def M(self): return self._M
0
04ac5be19888fa0a9424f60d85df0c79
ee0a1f1ea09ce54fd226fcc050dac66d
Процедура удаления выбранных компаний
class CompanyController extends BeController public function actionDeleteSelected() { $ids = isset($_POST['ids']) ? $_POST['ids'] : 0; if ($ids != 0) { foreach ($ids as $id) { if (Yii::app()->request->isPostRequest) { $model = CompanyCats::model()->findByP...
1
bf6c57e523acc52bec7a2c13a698de43
43a6e437006957e62ee2030712f15d61
=================== G_RegisterCharacter ===================
CarStartLocator* spawnlocator, CarStartLocator* carlocator, const char* dynaloadString, char* VehicleName ) { MEMTRACK_PUSH_GROUP( "Mission - Characters" ); rAssert( mNumCharacters <...
1
0c8fd3bd6051e62490e500c3b9a59f6a
0e093f5b2256d4b18e6cec12df52981b
Returns the second body involved in the contact.
export default class SCNPhysicsContact extends NSObject get nodeB() { return this._nodeB }
1
db2a1d385bd769645a0539af92db1ad1
32ccd4a50e64b9be5e5e26d9e2e7f37a
Проверяем первое поле. 6.1 Допустимое газосодержание при откачке нефтегазовой смеси по объему.
def f_b_003_f_19_V0PCFuelGas(CH4,C2H6,C3H8,C4H10,C5H12,C6H14,C6H12,C6H6, C2H4,C3H6,C4H8,C5H10,C4H6,C2H2, H2,H2S,O2,CO): part1 = 0.5*CO+0.5*H2+1.5*H2S-O2 part2 = 2.0*CH4+3.5*C2H6+5.0*C3H8+6.5*C4H10+8.0*C5H12+9.5*C6H14+9.0*C6H12 part3 = 7.5*C6H6+3.0*C2...
0
361b08d8778bac5e39e45081b4ba9299
b1b334f80c1e7019f5d5eda9d9fec554
Visit a parse tree produced by {@link OracleParser#over_clause_keyword}.
T visitOver_clause_keyword(OracleParser.Over_clause_keywordContext ctx);
1
013ff6261f823e2c83089319fe5fe76a
9356e08e3ce688af0a8035822ce29215
将IP地址格式化为整数型 并返回网络序
namespace Sop.Core.WebUtility public static class WebUtility public static int IptoNum(string strIp) { string[] temp = strIp.Split('.'); return (int.Parse(temp[0])) * 256 * 256 * 256 + (int.Parse(temp[1])) * 256 * 256 * 256 + (int.Parse(temp[2])) * 256 * 256 * 256; }
0
8dfb696005fb6198fe4bd434db1468c6
f9a157c14df0693bd75342099502663e
Отработка действия 'Использовать зелье здоровья' героя.
public class CrewMember public void useMedicalItem() { useMedicalItem(HEALTH_LVL_INCREASE_MED_ITEM); }
1
30db6feb198718916105e051e5060cf6
43ad4bf374d6af8996b62969cefb75dd
parse the wiki page of an uni and get the info from the top right hand box
soup = BeautifulSoup(page,'html.parser') info = [] for item in soup.find_all(re.compile(r'h[1-3]')): temp = [] if str(item).startswith('<') and str(item).endswith('>'): for child in item.children: if str(child).startswith('<a') and str(...
0
1a1f0fee1bd5ebcc1e8e944ca5b8cade
b6e7ac4bf71fcf73c9030b3f26e8ddbb
Constructor method for Training_TypeType
class EbayTradingTypePayPalAccountTypeCodeType extends EbayTradingWsdlClass public function __construct() { parent::__construct(array()); }
0
0ae3cebbcd7002f50c057095c1fd0b47
d877ee8d9f34be766daf144b40c81d8e
Check if items title is displayed in 'Game of Thrones' page
title_of_item = self.browser.find_element(*ProductPageLocators.TITLE_OF_THE_ITEM).text message_after_add = self.browser.find_element(*ProductPageLocators.MESSAGE_AFTER_ADD_ITEM).text assert title_of_item == message_after_add, 'book title does not match message'
0
66c296f08761d29e2126be9a68352667
3eeb914c0dca6bfb4f0a71d078a83074
Test that we don't get a default channel used for this alert.
self.slackbot.get_channels.return_value = [ {'id': '123', 'name': 'general', 'is_archived': True}, {'id': '123', 'name': 'random', 'is_archived': True}, {'id': '123', 'name': 'choochoo', 'is_archived': True}, ] with self.assertRaises(IndexError): s...
1
b18b7fb37202d060c44062679052ae83
4082aa4eb4411f59c508247ba458a62f
Ekta Books => ekta-books
function pascal2Kebab(str) { return str .replace("action", "") .split(/(?=[A-Z])/) .join("-") .toLowerCase(); }
1
588c801cf969a5af7efe9357a65f9ee9
775596c8edcd9a29b5948a5134528b98
根据ip获取pad信息
{ int res = 0; if ((res = terminal_register.get_sip_info(pad_sn, pad_mac)) < 0) { OPERATION_LOG(__FILE__, __FUNCTION__, __LINE__, "get_sip_info failed!", res); return res; } return res; }
0
1e5c8b3fc31fe3984cbdced0afe1554d
c7c25ff402e15870761eca00025b8436
Removes a second from the player's available time.
class DateTimeCalculator extends AbstractDecorator public function removeSecond() { $this->wrapped->sub(new DateInterval('PT1S')); return $this; }
1
d21db478cd9df5e60d0c311dcefcf1c5
2f6c5788aac4f82a7936204f74453578
Create SQLite LIKE starts-with expression.
def startswith(attr, value): return '(%s=%s*)' % (attr, value)
1
3fb252ba0ba19b3cd1d40742d519a828
2849f3f2e120cea071a3c4264ea59355
Сложение матриц.
common_matrix *matrix1, common_matrix *matrix2, common_matrix *result ) { START_TIMER common_memory_allocation(matrix1->m, matrix1->n, &(result->M)); result->m = matrix1->m; result->n = matrix1->n; for (int i = 0; i < matrix1->m; i++) for (int j = 0; j < matrix1->n; j++) ...
1
78171aee771df98cc6c3ac6282a2f61c
bbd74f24406ace5530cf51c8ccbb9d08
Определяет площадь цилиндра
namespace AcademyGeometry public class Cylinder : Figure, IAreaMeasurable, IVolumeMeasurable public double GetArea() { double height = this.GetHeight(); return 2 * Math.PI * this.Radius * (this.Radius + height); }
1
ef234372ab3ccb4c6e2f4ec2094e156b
616d199378d6e863347e98dbf5e470ea
Compact the database and have the status callback throw an exception.
class couchClient extends couch public function compactDatabase () { return $this->_queryAndTest ( "POST", '/'.urlencode($this->dbname).'/_compact', array(202) ); }
0
8a41a510539b87b40630db0a3293c185
007d252979c47539218ee45a67651c72
Return all Teams associated with currently authenticated user
class UserTeamController extends Controller public function index() { $user = auth()->user(); if ($user) { $allUserTeams = userTeam::all(); return response()->json([ 'success' => true, 'data' => $allUserTeams, ], 200); } els...
0
f862d3876cfb9899a7f46c759f3ee74b
2aa8bc833e23e62b7447b0bd31d3ca30
@brief IFRS 수정분개관리 등록 및 수정
@Service public class AnnvrsryManageService extends EgovAbstractServiceImpl public void insertAnnvrsryManage(AnnvrsryManageVO annvrsryManageVO) { try { annvrsryManageVO.setAnnId(annvrsryManageIdGnrService.getNextStringId()); } catch (FdlException e) { throw new RuntimeException(e); } annvrsryManageMapper....
0
1678335aca90e0b5e56febac8fc87f23
30390cdcd875df25397210c3abf643da
Handle interaction with terrain
namespace Campus internal class SelectingPathController : GameStateMachine.Controller private void Clicked(object sender, TerrainClickedArgs args) { if (args.Button == MouseButton.Left) { if (IsValidTerrain()) { Transition(GameState...
1
307c7937e957f5b6df1724de4fad6ca3
e9d8b392cbd086b3ef5467c2bd3d1ce3
Test that method works with non-tuple slices.
class TestSlices(TestCase): def test_slice_constructor(self): maxint = sys.maxsize cfunc = jit(nopython=True)(slice_constructor) for args, expected in [((), (0, maxint, 1)), ((None, None), (0, maxint, 1)), ((1, None), (1, maxint, 1)),...
0
f7ee790a3c81df1f1053a803f97ce8c6
dcc61f1fb38ba86332ccdecd6301e7ba
if element exists, switch its class name
function toggleElementClass( elm, className, on ) { var oldClassName = elm.className; var newClassName = toggleClass(oldClassName, className, on); if (newClassName != oldClassName) { elm.className = newClassName; elm.parentNode.className += EMPTY_STRING; } }
1
07e380ea2e246eb337c2359cb343b7b3
5db886f99470affe08d2de03384bf9b3
Return the key used to store this party.
class ModelFriends(base.ConfigControllerModel): def GetPreferredStorageKey(self): return "mdl_friends"
1
52ac45562768ff934d2058911fd41c86
34a010bc21c349fc0140367299ceff07
Returns the version information of the native Scintilla library.
def Mix_Linked_Version(): return _ctypes.Mix_Linked_Version()
0
50545925c8e2d6df752d5daea0d39faf
9d93886d16daa2b8bb0848dea8d5c7dc
Write the sos marker
emit_sos (j_compress_ptr cinfo) { int i, td, ta; jpeg_component_info *compptr; emit_marker(cinfo, M_SOS); emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); emit_byte(cinfo, cinfo->comps_in_scan); for (i = 0; i < cinfo->comps_in_scan; i++) { compptr = cinfo->cur_comp_info[i]; emit_byte(cinfo...
1
2e69e481658c660843bd57172d371f67
868578c3e61db6e102e78bcbb501b1cd
Narrowed
var narrowDown_byCompanyName = 'Say a company name.'; var narrowDown_byCountry = 'Say a country.'; var narrowDown_byRegion = 'Say a region.'; var narrowDown_byCertificationScenario = 'Say a certification scenario.'; var narrowDown_byDate = 'Say a date.'; var narrowDown_exit = 'You can start over by saying st...
1
f6ec7db8a466e8f0031a5d91e1b8ac1a
8783aec6951ca2176208595d7fc090d4
将txtytwth转换为常用的x1y1x2y2形式。
ret = {} for y in range(h): for x in range(w): ret[(w - x - 1, y)] = txtdict[(x, y)] return ret
0
d813a3664f34caf77b4c57fd322ac7f6
678fdf10e29b073a2a138b4bd8bd9a9d
Process a page range to add to the list of page ranges
function handlePageRangesFieldBlur() { checkAndSetPageRangesField(); onPageSelectionMayHaveChanged(); }
0
c749359cd9eb95c77078691260d01ff4
31471435b0ea401dc30079a40bb60c54
获取链接实例,如获取失败则继续尝试。 无最大尝试次数,有可能造成死循环,谨慎使用
$this->url = $url; $conn = static::conn_get($url); if ($conn === false) { return false; } $this->conn = $conn; return true; }
0
41a89feddede63083812d863a0945015
c5649d4b270a95fa9e6d2457e0296bdc
角度を XY 座標に変換する
{ if(angle == 0.0f) return new double[] { x + xOrigin, y + yOrigin }; double absX = (double)(x*cosXY - y*sinXY + xOrigin); double absY = (double)(y*cosXY + x*sinXY + yOrigin); return new double[] { absX, absY }; }
1
575413974cd615b1847f9db03f933f4e
85a018be2d381e2648f03743850790f5
the maximum length of a sequence name
if (JdbcDebugCfg.entryActive) debug[methodId_getMaxCursorNameLength].methodEntry(); try { return 128; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_getMaxCursorNameLength].methodExit(); } }
0
5fdb4aef983c8d739e93d59b72439c28
3d1c3157cde063f9f0f8719bb84c995e
Закрываем документ согласно его типу
namespace testWordApp public partial class testWord : UserControl public void CloseDocument() { try { Object saveChanges = Word.WdSaveOptions.wdDoNotSaveChanges; Object originalFormat = Type.Missing; Object routeDocument = Type.Missing;...
0
ee27be217d6e0d1c46f0d1c5913e89ea
b6791495317704e822d3f138312991d2
Animation for defeating the goblin champion and it shows the victory screen after a few seconds.
async def victoryScreen(ctx): pass
0
9d23c05baddf0034be752a5505e660e2
55436afae8c827dcb19c05947099c5b7
Create a new scattering center definition
class Pyzy3d(object): def new_scatter(self, coords): return self.gateway_client.entry_point.newScatter(coords)
1
0c660903aded8bf3235bb3bc6adb0b9a
a64f562d1ee544b870e460fe73dfec29
Test case for orgApacheFelixScrScrService .
class TestConfigmgrApi(unittest.TestCase): def test_org_apache_felix_scr_scr_service(self): pass
1
8d9f08d6e47f3da2ab00d9f1478964d6
326193116a6d0cc64653578c29443ab6
Used to indicate that the categories associated with each result document should be returned.
public class StrategyRecommendationsBuilder extends RequestBuilder<StrategyResponseInfo> public StrategyRecommendationsBuilder setIncludeCategoryData(boolean include) { setParameter(Keys.INCLUDE_CATEGORY_DATA, include); return this; }
1
6fe7d635cca0c18488e524cfe7e21a5b
9e5ee4a601de0de3940b6c9f0901be08
将float 转换为 字符串 ,把小数点后的0 去掉
func floatToString(input_num float64) string { n := strconv.FormatFloat(input_num, 'f', 6, 64) s := "" r := true for i := len(n) - 1; i >= 0; i-- { if string(n[i]) == "0" && r { continue } else if string(n[i]) == "." { r = false continue } else { s = string(n[i]) + s } } return s }
1
5843f0c9318239c5c610ae3d046730b3
5dc427b0ab03f8664ed457e8ce729c3f
Generates popup to show results of resize texture function. Collects contents of resize texture dictionary, combines into a string, and generates a popup witht his string.
class BaseValidator(object): def _populate_resize_diffs(self):
0
afa47c389ce1f37db81fd64b722712db
2264a0aa2b5fd1b89c8d2b897b63487e
Проверяем формирование динамического представления при использовании поля символьного типа.
namespace ICSSoft.STORMNET.Business.LINQProvider.Tests public class TestDynamicView : BaseIntegratedTest [Fact] public void GetLcsTestNullableDecimalWithDynamicView() { int? size = 4; var testProvider = new TestLcsQueryProvider<Лапа>(); new Query<Лапа>(testProvid...
0
4f1edb1174490602255bf765a56933b9
cf7b73e2def1a919d62bab69f5fca3a4
判断鼠标在屏幕上部
return ( touchInput.center.x <= document.documentElement.clientWidth && touchInput.center.x > 0 && touchInput.center.y > document.documentElement.clientHeight / 2 ); }
0
6e2585e88ce8d6faac86b63bdcab5b18
d459b3c706b8f76939337f8874d1066d
更新device_id 到 车辆表中 绑定
@Controller @RequestMapping("/car") public class CarController extends BaseController @RequestMapping("/editCarDevice") @ResponseBody public ResultInfo<Car> editCarDevice(@ModelAttribute("car") Car car) { ResultInfo<Car> resultInfo = new ResultInfo<Car>(); if (car.getCarNo() != null && car.getCarNo().length() != ...
1
5baef8a4a1f3113b3baf125316e8fc2a
71cf2f9b5d9762a5aff91fcfefb492b7
Same as [`value_progress_factor`][Self::value_progress_factor] but returning `default` instead of [`None`]
{ return this.Exp2.Progress(world, bindings) || (this.Exp1.Progress(world, bindings) && new ProgressionValue(this, ProgressionValue.NoTimestamp)); }
0
0b79ef52523ae0b11deb328e14f13dd8
e7cc4b72bb273f84a6d4c2921ff3b41f
Создание входного слоя
def newLayer(): for i in range(1,3): inpt.append(nNeu[i].output)
0
112f70ec9750707efdb081af01f94ec5
b9fbbe04ef8b1eda1f708a640cbe052b
Returns the possible block types based on the type of the previous block.
byte getBlockTypeAt(int relativeX, int relativeY, int relativeZ);
0
0e0b8de919248685ce57f54572f54a84
3866d750f2e7ff5abe88a2ff11dcd524
get(int i) - returns the Data array at a given index If the index is out of the bounds of the array, it will throw OUT_OF_BOUNDS throw OUT_OF_BOUNDS;
if (index > data.length || index <0) { System.out.println("Error: The index exceeds the length, or is less than zero."); return -1; } else { return data[index]; } }
0
9325e29e639c1bc6e2f81ab57bb779b4
1017a44732bf44d37a9f1fadf946e152
Handles add user request and dispatches actions based on server response.
return (dispatch, getState) => { const { brackets } = getState() dispatch(showLoading()) dispatch({ type: FETCH_ADD_USER_REQUEST, user, }) return saveUser(user).then(res => { if (res.success) { dispatch({ type: FETCH_ADD_USER_SUCCESS, message: res.succ...
1
dbcc19f0f86b1f4094d637c5516621c4
647b45d33c00213a9ca1ee7402f0d80c
Copy the src file (src is a path on the host) to dst (dst is a path on the guest).
public class VMWareImageModule public void copyFileFromHostToGuestOS(String inSourceFile, String inTargetFile) throws SmartFrogException { vmComm.copyFileFromHostToGuestOS(this, inSourceFile, inTargetFile); }
1
c03e24b1622db8a0221d693f1ea1e421
9ad80bdc04bd80fa7ac98d06359fbd0f
-------------------------------------------------------------------------------- ガンマ関数(負の引数についても)
{ return ((1.0 - Math.Exp(-x)) / (1.0 + Math.Exp(-x))); }
0
b33156128bddd1a6df88b6409695857d
fe07c45b7781d4a631df9095913a11b4
Standardize VNIR metadata (same format as VNIR)
if detector == "FUV": outhdr["dethvla"] = inhdr.get("dethvla", -999.) outhdr["dethvlb"] = inhdr.get("dethvlb", -999.) outhdr["dethvca"] = inhdr.get("dethvca", -999.) outhdr["dethvcb"] = inhdr.get("dethvcb", -999.) outhdr["dethvna"] = inhdr.get("dethvna", -999.) outhdr...
0
fb6d17d18e0f37c45b3b5e7facd5f1f6
1fae7db1dc91dc8c67c52b8247610cf1
Extract the faces from each cat image.
def JAFFE_catch_faces(): faceIdentifer = FaceIdentifier() images = os.listdir(JAFFE_DIR) for image in images: print(image) cv2.imwrite(os.path.join(JAFFE_DIR, image), faceIdentifer.get_face(cv2.imread(os.path.join(JAFFE_DIR, image))))
0
43a5984d4425999c09b0686cede7ef8c
ee3d6be1aeedecdf3c44a5e1e8c659c4
Create an instance of {@link GetMessageAuthorLengthResponse }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SupportCaseSearchBasic", propOrder = { "assigned", "awaitingReply", "caseNumber", "category", "closedDate", "company", "contact", "createdDate", "email", "escalateTo", "externalId", "externalIdString", "helpDesk",...
0
4e01bee7ad2ed0f0d6e5ea03e6c10bf1
c9098ea92a9479ed7bf136193c58ecd6
Instanciranje novog menija na temelju tipa korisnika.
class tx_t3socials_models_Message extends tx_t3socials_models_Base implements tx_t3socials_models_IMessage public static function getInstance($messageType = 'manually') { return tx_rnbase::makeInstance('tx_t3socials_models_Message', $messageType); }
0
43bc4b7046646e83355c55617d6948c1
1449ff57d2d0b84da76923a0300fcacf
Action handler for Skip Backward button.
class MQTTController: def skip_backward(self) -> None: self.keyboard.press(Key.left) self.keyboard.release(Key.left)
1
8f3dd3623a62d20ddd91b21c3bf8eadb
9a7574323e570017cfb9ebe27fc5dfc8
# a set of "words" to exclude from cleaned up text fields
skipWords <- function(x) removeWords(x,profanities)
1
2666afc02399186c67f7ceb4180d47eb
e89dac75b3cd71ec5b2d234b9c322835
Periodic task running every hour to fetch data from alphavantage website api.
url = 'https://www.alphavantage.co/query' data = requests.get(url, params=dict(symbol=symbol, function=self.timequery, datatype='json', apikey=os.environ['ALPHA_KEY']) ...
0
9ee29def17e7e4d47c43e1ea43de34c5
5484d3259bffd4d61a7447817ffa734e
用数据库账号登录,登录成功则进入主界面
public class LoginAndExit : MonoBehaviour public void Login() { Logger.Instance.WriteLog("开始登录"); UserBasicDao ubdao = new UserBasicDao(); try { ubdao.Select001(UserName.value, Password.value); } catch (Exception ex) { Logger.Instance.W...
1
19d3c75fbed554100d6c958b9b38dc45
a7008b22b035457d7c43989719b8301b
converts sRGB to CIEXYZ
double *L, double *U, double *V) { double x, y, z, L0, u_prime, v_prime, constant; double r = sRGBConvert((double) R); double g = sRGBConvert((double) G); double b = sRGBConvert((double) B); x = XYZ[0][0] * r + XYZ[0][1] * g + XYZ[0][2] * b; y = XYZ[1][0] * r + XYZ[1][1] * g + XYZ[1][2] * ...
0
ffa3513519dbf0d0050656b3ab3ae3ab
7de385801b98ef0f25f3abc01c24140b
Add a response object, and an optional status, to the list of responses to be returned via _simpleRequest.
if proto is None: proto = self._response_proto if status is None: status = proto.OK self._response.append(proto(status=status, **response_data))
1
24c6d83645853cdb0cc750f790e00608
1480b4933e740f7703f8559058c35d71
l2-table add ip-mcast sip <IPV4ADDR:sip> dip <IPV4ADDR:dip> port ( <PORT_LIST:port> | all | none ) fwdpri ( disable | enable ) priority <UINT:pri>
paReturn_t Pa_addPort ( Pa_Handle iHandle, int portSize, uint32_t destPort, paHandleL2L3_t linkHandle, uint16_t fReplace, uint16_t divertQ, ...
0
13ea456dc9d574eb1a7fc3117ad46b38
f16e7a1f920fed78d3b0023eb3caf0e7
関数を呼び出す
void call(void) { char *loc, *temp; int lvartemp; loc = find_func(token); if (loc == NULL) sntx_err(FUNC_UNDEF); else { lvartemp = lvartos; get_args(); temp = prog; func_push(lvartemp); prog = loc; get_params(); interp_block(); prog = temp; lvartos = func_pop(); } }
1