query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cd96d1702ca8719cbad273dcf1ffe7ca | 2801755840ddd9fb28bf694b91e19a00 | handles deletion of assigned vert links on key press | function svgKeyDown() {
if (state.lastKeyDown !== -1) return;
state.lastKeyDown = d3.event.keyCode;
var selectedNode = state.selectedNode,
selectedEdge = state.selectedLink;
switch (d3.event.keyCode) {
case consts.BACKSPACE_KEY:
case consts.DELETE_KEY:... | 1 |
fac26f1a65552f5e48d8c0f216e2512a | 879ae93f7a8cd79d75bc72c31b5656d8 | GLTFリソースを解放する | export default class CubeTextureLoader extends ResourceLoader<ICubeTextureResourceEntity>
public release(entity: ICubeTextureResourceEntity) {
entity.result.destroy();
} | 0 |
b8e9c660687944e56cb2de8b63dc5861 | cf385ee1e170aea9fcedfcbea2bb60a4 | 获取全部场次 | public List<HenghuaExhibition> getExhibitionAll() {
List<HenghuaExhibition> list = this.restHenghua.restHenghuaExhibitionAll();
return list;
} | 1 |
b8a37e1297841b72eb9fa3ddfae39c49 | 7377d99382d567f0a4f94b03486a8264 | Initiates the asynchronous execution of the DeleteLabel operation. | java.util.concurrent.Future<DeleteLabelResult> deleteLabelAsync(DeleteLabelRequest deleteLabelRequest); | 1 |
d3ce05cda81f57837d350ae4c4b1a427 | 8b20956a6ee5db85de06e6d755a4da3a | 启动异步任务,失败情况下会重试3次 | {
AppDomain ad = null;
try
{
ad = AssemblyHelper.LoadAppDomain(task.AssemblyName);
for (int i = 0; i < 3; i++)
{
try
{
Start(task, ad);
retu... | 1 |
bb7342f28bf82238e109f3476b1ae50a | 32b4cf6aa79a396e799184d1cacbe68f | Should be called by the children classes when it wants to subscribe to pairing events | void setOnIncomingPairingRequest(Handler handler, int what, Object object); | 1 |
f8345cbe37500584f091e87f1a7cad2d | 5bc792455a3f6361d7654e7f3ae83bbe | あるプロジェクトにジョインしているかどうか? | $project = $this->repository->find($project_id)->users()->find(['user_id' => $user_id]);
if(count($project)){
return true;
}
return false;
} | 1 |
24b24948a0dff6357e1c251e2b700d3e | 08993ca19fc69b8f7edfd9871bf1323e | reads freight details page common details and stores it on pickupRequest object | var inputFields = {};
inputFields.ruNo = currentRec.getValue({
fieldId : 'custpage_receipt_no'
});
inputFields.statisticians = currentRec.getValue({
fieldId : 'custpage_statisticians'
});
inputFields.center = currentRec.getValue({
fieldId : 'custpage_manufacturing_center'
});
... | 0 |
822e25dff765f7446338806089bd78db | 7e9f97e33df0d1d7e007b03724c231ff | 根据文件名得到JSON名,比如 Monster 注意没有后缀 | class Pp_AdminAssetbundleManager extends Pp_AssetbundleManager
function getMonsterId($file_name)
{
return substr($file_name, strlen('monster_atlas_'));
} | 0 |
01560c473d59d57348c740b348e182f3 | 626afe0078a0f94276918c97694eabad | SENTSINCE <date>
Messages whose [RFC-2822] Date: header (disregarding time and
timezone) is within or later than the specified date. | IDomainEventQuery<TId> Since(DateTime when); | 0 |
2cee81e8df6dec23b4891bfd0ae084c0 | c346227316fff5efb8526a2b1cb6a8cc | 同意申请加入群 | public class JoinHarem implements IApplyJoinGroup, IJoinGroup, IQuitGroup
public void agreeJoinGroup(Activity activity, int groupid, int uid, BAHandler mHandler, ChatDatabaseEntity chatEntity) {
RequestJoinGroup req = new RequestJoinGroup();
GoGirlUserInfo info = UserUtils.getUserEntity(activity);
if (info == nul... | 1 |
379b084ef536cdab57956ac071dc4222 | 48e6c0f24be3b06238c960e66a043c61 | 在页面上把AP恢复出厂设置 | tmp = ConfigUpdateBusiness(self.driver)
tmp.restore_AP_factory()
tmp1 = WirelessSettingsBusiness(self.driver)
result1 = tmp1.get_first_ssid(data_basic['DUT_ip'], data_basic['ssh_user'],
data_basic['ssh_pwd'])
tmp2 = WanSettingsBusiness(self.driver)
result2 = t... | 1 |
6de1b06f432fc65f3eda25696e260dc9 | c4c498fa083d3a5114d0458900af534a | Take current sequence of clusters, and sequence the points within each
one, leaving the first and last points unchanged | for i in range(TOTAL_DATA):
newPoint = DataPoint(SAMPLES[i][0], SAMPLES[i][1],SAMPLES[i][2])
if(i == LOWEST_SAMPLE_POINT):
newPoint.set_cluster(0)
elif(i == HIGHEST_SAMPLE_POINT):
newPoint.set_cluster(1)
else:
newPoint.set_cluster(None)
dat... | 0 |
bcb7c3e6cb3f605445927f148f7021ff | 3816a1a429a078dc3f692c406d6b9b4b | Returns the last track index. | int returnIndex = 0;
long globalTrackId = Settings.get(mAppContext).retrieveGlobalTrackId();
int trackListSize = mTracks.size();
for (int i = 0; i < trackListSize; i++) {
if (globalTrackId == mTracks.get(i).getId()) {
returnIndex = i;
break;
... | 0 |
9677e79ace9b8d2e1e33cdb75d9679c0 | f917f89412558b3681d12ba742256174 | Metoda on Create z wszystkimi button listenerami oraz definicjami elementów ekranu | public class MapScreen implements Screen public class Interface public class Listeners
public void addListeners() {
addListnerBtnExit();
addListnerBtnKoniecTury();
addListnerBtnKupBohatera();
addListnerBtnSpellExit();
addListner... | 0 |
63956736b35e574216150991501e905d | 35b33c452a36cee77cae14b2f1d5a84f | Calculate and set comments grid size on layout resize becouse lcgMain size was changed | export class CommentWidget extends ZoneViewWidget
_refresh() {
const dimensions = {
width: this._bodyElement.clientWidth,
height: this._bodyElement.clientHeight,
};
const headHeight =
Math.ceil(this.overlayEditor.getConfiguration().lineHeight * 1.2);
const lineHeight = this.overlayEd... | 1 |
cb3e8208adb4c3e7100c9c40a476f8d2 | e506b805adfd729b2e0fe2108182ff9a | Pobiera userow z bazy i zwraca ich loginy w formie listy | {
try
{
SqlDataAdapter adapt = new SqlDataAdapter("SELECT Login FROM Users ORDER BY Login",Connection);
DataTable users = new DataTable();
adapt.Fill(users);
string[] Result = new string[users.Rows.Count];
fo... | 1 |
3e934513dd73b826f0c5cd588bb54848 | 4e11be3326a43226749eee834db8b4b1 | Adds a transition from one state to another given a set of trigger
characters to initiate the transition. | class FSMBehaviour(CyclicBehaviour):
def add_transition(self, source: str, dest: str) -> None:
self._transitions[source].append(dest) | 0 |
4d00c0c0df720bdba8ebc9eea50bd8b9 | 3efb7bc601cba9e41b0685f773f460b5 | Rotates a point on the shape 180 degrees around the center of its rectangular bounds. | {
PointF refPoint = new PointF(
_shape.Location.X + _shape.Dimension.Width / 2f,
_shape.Location.Y + _shape.Dimension.Height / 2f);
Rotate(degree, refPoint);
} | 1 |
a18a0b391542f7c5cd0ed9fd9bdd15d4 | 9003080bde74a64fe0e82c6fb60ddaf7 | Run snakemake with extra verbosity. | def test(c):
c.run('green3 -vv') | 0 |
e84e85915bac5eb65685fca53b9cc1f8 | 10a949d298949e7a202cf0da8dd85c3e | *****Matching Product | s = name.get()
requestProducts()
matches=[]
for i in products:
try:
if int(i.id) == int(s) or s in i.name:
matches.append([str(i.id),i.name,i.description,str(i.price),str(i.qty)])
except ValueError as e:
if s in i.name:
matches.appe... | 1 |
3d7bcee0820ade1cb037cbf0507d0354 | 0ecc8f9033bac83149492b445ea8a941 | Transformation between CameraFrame and TelescopeFrame | if _observers_are_equal(from_coo.observer, to_frame.observer, string_ok=True):
return to_frame.realize_frame(from_coo.data)
hgscoord = from_coo.transform_to(HeliographicStonyhurst(obstime=to_frame.obstime))
hgscoord.observer = to_frame.observer
return hgscoord.transform_to(to_frame) | 0 |
b598961e5d306d002a4aa1814e9873ec | b04f3c55d487fa47ec27b06b9609a769 | Removes all service workers and kindof but not really cleares cache (only actually clears after reload). | clear() {
wsCache.clear()
} | 0 |
b47f4f857f4b1a6338a2633abd14835d | ae7bed6f58d9350c0d6640c50a6ca1ca | Add found navigation case parameters to a current query parameters map. | let result = new Map<string, CoreCommonTypeNumberStringBoolean>();
const currentPage = this.getCurrentPage();
let currentPageSearch: Map<string, CoreCommonTypeNumberStringBoolean> | undefined;
if (currentPage) {
currentPageSearch = currentPage.search;
}
params... | 1 |
303c0ccb51c5f492611d1a5774bc75d1 | f3b0b59fefa3a6137024eb41907b1776 | **********removeFromMemory**********
This method accepts a jobs start address in memory and size.
Then we loop through memory set the bit to 0 (removing it from memory). | public class RAM
public void removeJob(PCB p){
try{
int address = p.getAddress();
for(int i = 0; i < p.length; i++){
storage.remove(address);
}
int index = 0;
while(p.ID != pcbStorage.get(index).ID){
index++;
}
pcbStorage.get(index).setAddress(-1);
pcbStorage.remove(index);
while(index < pcbSt... | 0 |
2fe63eb50080e4917cfb90050d8e967d | 5aa1430cb736c6bf154e3e8f08f156d9 | 执行新增insert或者update的sql | self::$sql_str = $sql;
try {
$ex = self::$connect_rw->exec ( $sql );
} catch ( PDOException $e ) {
return false;
}
if ($insert) {
$ex = self::$connect_rw->lastInsertId ();
}
return $ex;
} | 1 |
47775fc64dde4174ce161c57b81eed17 | f9706ad6ace35b3508bcbaf0c486282c | Records the center of the player sprite. Used for the sword bounds setting | {
fMinX = m_Sprite.getLocalBounds().left + (m_Sprite.getLocalBounds().width / 2.0f);
fMaxX = m_Sprite.getLocalBounds().left + m_Sprite.getLocalBounds().width;
fMinY = m_Sprite.getLocalBounds().top + (m_Sprite.getLocalBounds().height / 2.0f);
fMaxY = m_Sprite.getLocalBounds().top + m_Sprite.getLocalBounds().height;
... | 0 |
10ebc9955f7909f47b7f6725304241c6 | 4debe28d219c468c2b18df57d1b1d683 | SellerCommandHandler constructor. | class DestroyVendorCommandHandler
public function __construct()
{
} | 0 |
200efd90e7cc6552c6a1a0589defec1d | 22936188b4231ceb5818d224ba45b3df | <pre>
将List<SellerInfo>对象转换为List<SellerInfoDTO>对象
</pre> | public class CustomerParseUtil{
public static void parseToDtoList(List<Customer> customerList, List<CustomerDto> customerDtoList ){
parseToDtoList(customerList, customerDtoList, false);
} | 0 |
b7aa0f72556343ce20ca4ebcdf764d69 | ed69adc931bbce756c9adfbf5c7c419c | Internal callback function that is called when Show in Folder action is clicked | {
folderTree.CustomClickForMoreFunction = "SetAction('clickformore##TYPE##', '##NODEVALUE##'); SetLastViewAction('list'); RaiseHiddenPostBack();";
folderTree.CustomSelectFunction = "SetAction('folderselect', '##NODEVALUE##'); RaiseHiddenPostBack();";
folderTree.RootFolderPath = LibraryRootFo... | 0 |
7a43fbabb22a170bef26462bb5579aea | 715e2adb344ff2f6499508058658ad11 | Devolve o status HTTP obtido na comunicação com o Moip. | public HttpStatus getHttpStatus(); | 1 |
a75a5cc05b588d7c61a26c61a8ee8371 | 343cb6d46172ad9626db933cf32b7063 | We only change the button icon if the chart is updated successfully. | if (indicatorData.length === selectedInds.length && this._isMounted) {
this.setState({ loading: false }, () =>
this.props.dispatch(
actions.storeChartDataRequest({
refetch: false
})
)
);
const updateIndIndex =
refetchOne || this.props.paneDat... | 0 |
5b71fc8bdfb390651a461397b61c3f44 | df12a2831e766fc131f37d3c2e2c923a | Async function to send a websocket message. The value can
be ``bytes``, ``str`` or ``dict``. In the latter case, the message is
encoded with JSON (and UTF-8). | class AsyncWebsocketClient(AsyncClient, WebsocketBase):
async def send(self: AsyncWebsocketClient, request: Request) -> None:
if not self.is_open():
raise XRPLWebsocketException("Websocket is not open")
await self._do_send(request) | 0 |
2e0f2d5baa8f9a60e01fb916cf1d0a7d | 81bde413aeaf38bd47b7ea67df00559e | 随机获得模式 | function getRandomMode(mode) {
if (mode !== 'undefined' && mode) return mode;
const randomMode = ((Date.now() % 2) === 0) ? MODE_A : MODE_B;
return randomMode;
} | 1 |
402bf28717007257191abceb53cfeb5e | e0bdcf442ebbba8ad26fe588be9798d0 | 判断给定的路径是否有效。
如果路径不存在时根据第二个参数判断是否需要进行创建。 | function is_valid_path(string $path)
{
return (bool) file_exists($path);
} | 0 |
9e3f3de5207a8129c5b8833c9b3861d0 | 7f6f57d4bcf19198115e9076efae83c2 | Ensures that the model is not valid if the given attribute is not
present.
* <tt>with_message</tt> - value the test expects to find in
<tt>errors.on(:attribute)</tt>. <tt>Regexp</tt> or <tt>String</tt>.
Defaults to the translation for <tt>:blank</tt>.
with_message(/is not optional/) } | def validate_acceptance_of attr
ValidateAcceptanceMatcher.new attr
end | 0 |
527be2f0a592e12b29f8a99b0e986835 | 49b15ba80e1744c2378a25dd245ade61 | Testing the GET default-reviewers/<id>/ API
with Not Modified response | self.set_token()
client_id = self.company.pk
response = self.client.get(
client_review_url(client_id), format="json")
self.assertEqual(response.status_code, status.HTTP_200_OK) | 0 |
1ed1b5abd240e08232383a78252560d2 | 940976ed5bdfec6c21a4b9736648cbf3 | Uppdatera listan med tigrar som tillhör medlemmen
som är markerad i medlemslistan | void updateList(ObservableList<Member> e); | 0 |
7ba18a016bc9aeaafb55b7dad5d39425 | 804deedbb507ab8beacc3404a96860f7 | @brief Function disables flash interrupts and marks driver as closed. | {
memdrv_err_t ret_drv = MEMDRV_SUCCESS;
st_memdrv_info_t memdrv_info;
memdrv_info.cnt = 0;
memdrv_info.p_data = NULL;
memdrv_info.io_mode = MEMDRV_MODE_SINGLE;
ret_drv = R_MEMDRV_Close(devno,&memdrv_info);
if (MEMDRV_SUCCESS > ret_drv)
{
return FLASH_SPI_ERR_OTHER;
}
r... | 0 |
a8f9e3180c6eb0c73b9eb7b20700f2f1 | 7ff90f3ca3070a5fa96478aa67764ae0 | Printing vertexes on screen, printing control output on cmd | void GTPFunctions::gtp_print_vertices(int n, int movej[], int movei[], int gtp_boardsize)
{
int k;
string res;
sort_moves(n, movei, movej);
for (k = 0; k < n; k++) {
if (k > 0)
gtp_printf(" ");
if (movei[k] == -1 && movej[k] == -1)
gtp_printf("PASS");
else if (movei[k] < 0 || movei[k] >= g... | 1 |
720ed315e0a03cfcca6886793f4d108a | 7096b786e3e507b741768023332cc1ca | 从SharedPreferences对象中读收藏状态 | final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean value = prefs.getBoolean(name, isCheck);
return value;
} | 1 |
b0661a621f9c7cba0f3c151766cd6038 | 2202b6d01b2e1973186371009547585a | Test updating non existing site fails | class TestUpdateSitesFromCartoDB(BaseTenantTestCase):
def test_not_exist(self):
self.assertFalse(CartoDBTable.objects.filter(pk=404).exists())
self.assertIsNone(tasks.update_sites_from_cartodb(404)) | 1 |
234f7a236f7656501c864a6fe69eca68 | a059467feb4325d4183b5b1a911599e7 | Try to create product with invalid params | class TestProduct(BaseTestCase):
def test_update_product_no_id_params(self):
response = self.client.put('/api/v1/products', data=json.dumps(
create_product_valid_data), content_type='application/json', headers={'Authorization': 'Bearer {}'.format(self.admin_token)})
self.assert_404(response) | 0 |
880d90617ca41d4b53620f625b9da9a8 | 01a9ec1a1d0f28d69f8e0fd846d06424 | Function that finds the closest prime nubmer after n | int money(int n)
{
int i=n+1;
while(isprime[i]!=true)i++;
return i;
} | 1 |
d1c8a3b040c4e40abc6eb169b6ace558 | 0f171d597c05c1ba5c12b0b739d3dec0 | POST /streams | @stream_item = StreamItem.new(params[:stream_item])
respond_to do |format|
if @stream_item.save
format.html { redirect_to([:scaffold, @stream_item], :notice => 'Stream item was successfully created.') }
format.xml { render :xml => @stream_item, :status => :created, :location => @stream_it... | 1 |
9afa8962129e60e6d2e41e3f282a807e | a9da42beadae9e4f5351359e0a406f67 | Parse received Protocol IamUpstream Packet from binary format and convert it into ProtocolUpstream object | permit = data["permit"]
src = data["sourceAddress"]["value"]
dst = data["destinationAddress"]["value"]
protocol, icmp_type, icmp_code = RuleICMP._parse_icmp_json(data["destinationService"])
remark = data["remarks"]
active = data["active"]
logging = RuleLogging.fro... | 0 |
a74690c45b881774fc76077168f2c9c2 | 8371d5df595953b9c2476fb4b7ad0b7c | Given an archvive file, build file list of corresponding items,
given a list of offsets to all items | {
char *tmp;
u64 size;
int ret;
int count;
struct dirent *dp;
DIR *dir;
ret = 0;
count = thisItem;
dir = opendir( dir_path );
while ( ( dp = readdir( dir ) ) != NULL ) {
if( !strcmp( dp->d_name, "." ) || !strcmp( dp->d_name, ".." ) || !strcmp( dp->d_name, "boot.bin" )
|| !strcmp( dp->... | 1 |
b4b245ed4da2e7ec765697421c972506 | 952b3b48f0d0be85a4d2f9728e01b25e | Returns the amount currently in-store | export class StoreService
public GetStoreAmount(id: number): ng.IHttpPromise<number> {
const url = "/webapi/GetStoreAmount/";
return this.$http.get(url + id);
} | 1 |
93dc9e1d68ddcd3c4f0eaf73b96e8f76 | 9296714d3b06747e5974248bcabdd563 | Returns the package binaries | binaries = self.path.glob("bin/*")
binaries = [x for x in binaries if x.is_dir() is False]
return [x for x in binaries] | 1 |
5a754cecee01cea46970d8e5f5a81e20 | e387f89eb69110079e7e5dbb2bfcfff2 | Подсчет колличества ненулевых элементов массива | public class AtributeTester
public int nonZeroQ(double[] arr) {
int q = 0;
for (int i = 0; i < arr.length; i++) {
if (arr[i] != 0) {
q++;
}
}
return q;
} | 1 |
1e0cc77a9b06a3bde4e54d05718bf9e9 | 1159c9b1c5073bc54aa5af2cdb149d1a | 头结点数据是链表长度 | int len=0;
Node* it_node=head;
while(it_node!=NULL){
len++;
it_node=it_node->next;
}
cout<<len;
} | 0 |
2b3fc7d22d8afa375c6dff2c22da076b | abbe7b3e1351e39063b71cce546889fd | KOLEJKA - DODAJ | {
$us = \App\Urzadskarbowy::all();
$typkas = \App\Typykas::all();
$serwisanci = \App\Serwisant::all();
$nazwafirmy = \App\Firma::find($id_firma);
return view('kasy.dodaj',['firma'=>$id_firma,'nazwa'=>$nazwafirmy,'us'=>$us,
'serwisanci'=>$serwisanci,
'typkas'=>... | 1 |
78d2df138b9622197c0719f5370597a6 | c450505f196daf57cf93c7016340f6f3 | Gets the reason the player was jailed for. | public class LandUntrustPlayerEvent extends LandEditMemberCancellableEvent
@NotNull
public UntrustReason getReason() {
return reason;
} | 0 |
20fdafe540b0cc0a907b7ce0b0db1fbb | 246fb84a6f4e38849adc1872d2f25994 | Weights of the second convolutional neural network as initial weights of the ternary neural network's second convolutional layer weights | class AdditiveGaussianNoiseAutoEncoder(object):
def getWeights(self):
return self.sess.run(self.weights['w1']) | 0 |
a3650815204675319f33d510cc541cd7 | 291ad578eb195cb5c0da7fa12665ceee | Creates the connections array for the opens constraint.
Looks at the arguments of effects and operator to see if they should have an equal constraint. | Constraint_List csl;
Constraint_System::const_iterator i;
for (i = cs.begin(); i != cs.end(); i++) {
if (!(i->is_equality())) {
csl.push_back(*i);
}
}
return csl;
} | 0 |
8c2fe525d603fa3698e34f4d7c7691ad | 2da33a88aab192ee5001207660014b95 | Returns all slots for a workday. | List<WorkerSlot> getAssignableSlots(SupervisorDetails supervisor); | 0 |
8947c756813f82f99e701496378b46de | d6d69685697c636e9c4d7e3f4419aed5 | Set the terrain at the given index to the type specified. | {
if (!InBounds(x, y))
{
return;
}
var tile = this.tiles[x][y];
switch (terrainType)
{
case TerrainTypes.Grass:
if (this.Terrains.Contains(tile.Terrain))
{
... | 1 |
2976febc127f7dd79d45d0502f4dc746 | 97cdab41b1301f471a2178add80aabdf | Shorthand for getting the duration difference between upgrades // | function setDFU(updated_at) {
return milestones.milisecondsToDays(Date.now()-new Date(updated_at).getTime());
} | 1 |
a7276d893ee41b7e3dc465f40f59b2b3 | b89e6e8c0eb1f16525274abd601bf0cd | 在缓存目录创建上报xml文件,并使用xml校验文件内容 | String srHost1 = LeProperties.getString("aladdin.ftp.host1");
int srPort1 = LeProperties.getInt("aladdin.ftp.port1", 0);
String srUserName1 = LeProperties.getString("aladdin.ftp.userName1");
String srPassword1 = LeProperties.getString("aladdin.ftp.password1");
FtpUtil ftpUtil1 = ... | 0 |
6aae597ee5ad3cd6660bd0de7321b156 | a9fae5e88615ff429f1a748319516998 | get iterator for a table given the name of the table | func queryTable(ccAPI shim.ChaincodeStubInterface, tableName string) (shim.StateQueryIteratorInterface, error) {
return ccAPI.GetStateByPartialCompositeKey(TablesCompositeKeyName, []string{tableName})
} | 1 |
764743dfa13964252085bf3a50a02ea2 | 7da8d281a46e8c21d0e711f86999bac4 | 날짜에 마우스를 올렸을 경우 배경색 변경 | namespace MyTool_ListFusen
public partial class Form1 : Form
private void buttonDown_MouseEnter(object sender, EventArgs e)
{
buttonDown.BackgroundImage = Properties.Resources.on_down;
} | 0 |
686d742020c473a2938db6959a3d112e | da581370042917959915aae96f7d9036 | 查看手续费是否足够 | if($feeBalance > 0){
$balances = AmqpClient::rpc('System.Point.getAccount', $uid);
if(empty($balances))
throw new InvalidArgumentException('可用余额不足,下单失败');
if($balances['Balance'] < $feeBalance){
throw new InvalidArgumentException('可用余额不足,下单失败')... | 1 |
cccf6b7cf7140cae28b266c368383640 | 719800ed5f5bf9f80fc7721ec936a496 | <div lang=\"ja\"> 推奨するサーチキーワードのTabletでのリーチ数です。 </div> <div lang=\"en\"> Number of Reach in Tablet with recommended search keyword. </div> | @JsonProperty(JSON_PROPERTY_REACH_DESKTOP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getReachDesktop() {
return reachDesktop;
} | 0 |
d235b7d628932a8d23c675f6712f3b16 | 74738a70d776daf6010ccece7e4664fc | fonction pour construire un batiment une fois en mode "construction" | let scene = this.scene;
console.log(this);
let sprite;
switch (this.type) {
case 'roadTile':
scene.portals.push(new Tile(this.x, this.y));
scene.builder.buildAnimated(this.x, this.y, scene.portalItera % 2 == 0 ? 'enemyPortal' : 'playerPortal... | 1 |
f7398dd83219e75a109093154fc877f9 | 2a1cbd10e7c7b38bb0e4cd787b716ae8 | description : returns the parent index of the given bone | {
auto Iterator = m_BoneNameToIndexMap.find(name);
return Iterator != m_BoneNameToIndexMap.end() ? Iterator->second : INDEX_NONE;
} | 0 |
bca8e56be87c529d5517ef25e0c37292 | 2ae057847818f7268fe104f5fdf74567 | 根据原文件及目标文件扩展名生成新的目标文件对象 | public final class FilePathHelper
public static File generateFile(File srcFile, int generateType, String destParentPath, String destName, String destExtName) throws FileNotFoundException {
return new File(generatePath(srcFile, generateType, destParentPath, destName, destExtName));
} | 1 |
d35dda3e89fa94910fc3161c8421737c | 888977a4b4de7c92803b6a62077f6595 | Maps a system error code to an HRESULT value. | namespace System.IO.Ports
internal static class InternalResources
internal static int MakeHRFromErrorCode(int errorCode)
{
return unchecked(((int)0x80070000) | errorCode);
} | 1 |
8633e0133f3ba0c7773c56eed40b0126 | d70f2b482192bde416b45993bff0a971 | without join: 主进程运行 不必等待 线程运行完成 | func test1() {
go hello()
fmt.Println("main goroutine done!")
time.Sleep(time.Second)
} | 1 |
8a9acf3399c84202507bdf7869888d76 | 69a159afc99bfe98a3a77df2175b9308 | 将服务器返回的所有天气信息存储到SharedPreFerences文件中 | SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
weatherList.clear();
int size = placeNameList.size();
for (int i = 0; i < size; i++){
String cityId = placeNameList.get(i).getCityId();
String weatherString = preferences.getStrin... | 0 |
fd538c5bb4ad935f97dfb82330045e15 | 38ca42cb72b418e8960f77f0886aa6bd | Returns the first temp attachment declaration health in the ordered set where requestCode = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to... | public TempAttachmentDeclarationHealth fetchByPrimaryKey(
Serializable primaryKey) throws SystemException {
return fetchByPrimaryKey(((Long)primaryKey).longValue());
} | 0 |
b34b655256991deca5689703ee450705 | 2b46041c06608ce3a4cbee3add2700b3 | Adjust a clip to change it's volume immediately | function volumeChangeBar() {
let voloffsets = volumefg.getBoundingClientRect();
let volwidth = voloffsets.right-voloffsets.left;
volumefg.style.clip = 'rect(0, '+((video.volume*volwidth)/16)+'rem, '+(volwidth/16)+'rem, 0)';
} | 1 |
f8ee62885f725def90767d005d1c81c8 | 28eeed52208fb06f808bd7c190f281ff | stores all relevant fields of this topic model in a dictionary.
these fields can be used as kwargs for the constructor of this class. | class OptimizationExperiment(Experiment):
def construct_dictionary(self):
return {"optimizer_str": self.optimizer_str,
"optimizer_kwargs": self.optimizer_kwargs,
"log_kwargs": self.log_kwargs} | 1 |
88ef9b93087dbc3a0b7e0eaaa01de992 | 7bf8fc130c138fb437db3454e4a2f872 | The asynchronous equivalent of ``while while_clause(*args):``
Use this function within a :ref:`coroutine <coroutine>` when you need
to wait ``while_clause`` to be satisfied. | class WhileCommand(Command):
def __init__(self, expression, command):
self.expression = expression
self.command = command
self.type=None | 0 |
5ee0fda66de2ae62f6a991b61cf49746 | d89fba4bc7b96cddecf598b6c2b51cb4 | 時家奇門(拆補法) | {
uchar ten, unit;
ten = H / 10;
unit = H % 10;
if (unit == 0)
{
switch (ten)
{
case 0:
NPlay(21);
NPlay(1);
NPlay(13);
NPlay(H_L + 1);
break;
case 1:
NPlay(21);
NPlay(11);
... | 0 |
9fb55fe37d5cb7bc19691f8c0796bef4 | 7302763b65ecd3311a366a064a7b0103 | Lists all Catador entities. | class CoordinadorController extends Controller
public function index()
{
$cats = Coordinador::where('status', 'active')->get();
return view('cat.index', array(
'cats' => $cats
));
} | 0 |
7824c1d7bc88022b7c09f4ea2a557ce1 | 6fccad6bbe9cf7cc94891ec319860540 | Displaying the page not found page to the user | function view() {
echo 'Page not found!';
} | 1 |
72e261301ebf3e79a248a10da4561ea7 | 6b9c5c66ce75f5f869291f7168d5ae44 | Case-sensitive configuration parser; we need to preseve the
case-sensitive names of FQDNs in the option strings. | class CaseSensitiveConfigParser(configparser.ConfigParser):
def optionxform(self, optionstr: str) -> str:
return optionstr | 1 |
6a77d73552d0cd3946e1bec4d17835ad | 6327cdb52d7595eb4865a1e370e5b8d1 | 保存错误图像 | var reportUrl = 'http://xxxx/report';
new Image().src = reportUrl + 'error=' + error;
} | 0 |
d29fa8f6170bff8183046e56a4a5796c | 3483c2bcc9b611787481764fe3fef1a6 | Fire up an event handler for changing tabs. | public class SentCareBeanController extends Controller implements ControllerWithWindow, DTOViewer
public void eventHandlers() {
new TabChangeListener();
new ActionHandler();
} | 1 |
cd6dc858ba5b5f3d5b6c9775e805d922 | 507b5a9792230d2bb0035772d334fc35 | Fonction récupérant le nb de mot a garder pour l'indexation texte dans le fichier de configuration | int set_number_words(void)
{
int result =
getenv("OPASS_WORDS") ? (atoi(getenv("OPASS_WORDS"))) : MAX_WORDS;
if ((isdigit(result) != 0) || (result < 1 || result > 50)) {
result = MAX_WORDS;
}
return result;
} | 1 |
cf70ebfc8051e03c63dd91df783fc186 | 87c34b4172aaafd67a316ec50b238833 | Returns original images (non-windowed) as an array of numpy images | class AnoTwinDet(BaseAnoDet):
def open_image(self, filename):
return np.array(self.ds['test'].load_image(filename)) | 1 |
9c764e0b1330bb7fc6bc5b0f8ad4f296 | fabe98b4de5b1b7ef2b2edaaeb565da8 | Builds a theano shared variable filled with a zeros numpy array | def zeros(shape, dtype=float32, requires_grad=False):
return Tensor(np.zeros(shape=shape), dtype=dtype, requires_grad=requires_grad) | 0 |
fb2ec7fdb1e558dabbfa7dad427ce940 | 8f65c8cae311d954b0ab88ff5a17353c | 获取设备id
必须保证有值
获取不到的时候生成一个UUID | let deviceID = window.localStorage.getItem("deviceID");
if(base.isNull(deviceID)){
let _uuid = base.getUuid();
window.localStorage.setItem("deviceID",_uuid);
}
return deviceID;
} | 1 |
b7c38b638b0358d54e3ce99c3610ea43 | 2c64b8aa36965f852491cac174b10572 | Debug function that allows to change Bowser's actions (most of them) | {
InitActions();
aSeesPlayer = MSeesPlayer;
aDoesnSeePlayer = MDoesntSeePlayer;
aBackOff = MBackOff;
aLooksBack = MLooksBack;
aWalkToHands = MWalkToHand;
aSaysCoastClear = MSaysCoastClear;
aSaysDetected = MSaysDetected;
aSaysSurrender = MSaysSu... | 1 |
f5589b8f867be2fd1db02f0efba68a33 | 58656f616252e6555e5b2dd29e9aa536 | Ensure the user sees a list of their gists when authorized. | List<GitHubGist> getPublicGists(); | 0 |
36caa01209d42d417aade1df0dd60e71 | 92abb55bcf8e708db3d949154685277f | 方法:根据放款日期、借款期限、期限类型得到到期日期 | namespace ZFCTAPI.Services.Interest
public class InterestService:IInterestService
private DateTime GetEndDateByStartDate(string strQxlx, DateTime dateJkksr, int loanPeriod)
{
var dtEndDate = dateJkksr;
switch (strQxlx)
{
case "1":
dtEn... | 1 |
a3f99827aa2557ac6d47f53ceed0b312 | 385bb3e95ce9503dbe9dddf942e2907f | If we don't have a preexisting thread -- i.e. `.go()` hasn't been
called yet -- we should start one running.
Block, and wait for the result of the final callback in the chain;
this can be either an error-callback, or the final success-callback
in the chain. | public class AsyncChainLink implements AsyncChainLifeCycleListener
public AsyncChainLinkGo error(@NonNull AsyncChainErrorCallback errorCallback) {
mErrorCallback = errorCallback;
mErrorCallback.setThread(AsyncChainRunnableWrapper.ORIGINAL);
return new AsyncChainLinkGo(this);
} | 0 |
3c4cc6ed5b1cabd219ca52bd1d9d0c22 | d3cbb1347195942f25d0a21a2680d25f | Fills the angleAtomList and bonded14AtomList fields in the atoms. Also looks for fragments that are 1-3 or 1-4 and sets the closefragments flags | if 'atom14_atom_exists' in protein:
return protein
restype_atom14_to_atom37 = torch.tensor(
rc.restype_atom14_to_atom37,
dtype=torch.int64,
device=protein['aatype'].device,
)
restype_atom37_to_atom14 = torch.tensor(
rc.restype_atom37_to_atom14,
dtype=tor... | 0 |
f3a36248d938cf667837ed482b7d8e32 | 526094c5908fc9563a823c36728d9015 | New returns a new DirectIO writer with default buffer size. | func NewWriter(w io.Writer) *Writer | 0 |
421b8c343f9c62081a1f6aa09b888804 | 67fa589c5fdb653cc94b33e32f14a286 | Function Name: PWM_4_ReadCaptureBuf
Reads the capture buffer register. This API is applicable only for
Timer/Counter with the capture mode and Quadrature Decoder modes.
None
Capture buffer value | {
#if (PWM_Tune_CY_TCPWM_4000)
uint32 currentMode;
#endif
#if (PWM_Tune_CY_TCPWM_4000)
currentMode = ((PWM_Tune_CONTROL_REG & PWM_Tune_UPDOWN_MASK) >> PWM_Tune_UPDOWN_SHIFT);
if (((uint32)PWM_Tune__COUNT_DOWN == currentMode) && (0xFFFFu != compareBuf))
{
compareB... | 0 |
5231702e52521b6ec9a7ff3c90c2ed9d | 7b928c96955badd8f071bff5e7e32937 | Checks base class of Captcha class. | {
$trace = new ClassicBacktrace();
static::assertInstanceOf(Backtrace::class, $trace);
static::assertInstanceOf(ClassicBacktrace::class, $trace);
} | 0 |
5744d4afea7c9e4ac0f1027a5f640a9c | de7ed491659bdcd1b389712d8056ba75 | Crear nueva Institucion | class InstitucionController extends Controller
public function create()
{
return view('dashboard.admin.institutions.create');
} | 1 |
b89bf4e84c7d24f4e7f68a32ca086b5a | 403d98604a0514054b67063e857763f7 | выввод очков и времени игры по окончанию игры с возможностью начать игру сначала | def gameover(screen, game_result):
write_statistics(game_result[1])
global clock
sword = pygame.image.load('sprite/over/sword.png')
swords = pygame.image.load('sprite/over/swords.png')
if game_result[0]:
win = pygame.image.load('sprite/over/win.png')
sound = pygame.mixer.Sound("mus... | 1 |
a705e61451831ec1c68f30b43072516c | 7274501ab97c6a0599f17532fa28867e | returns 1 after a successful delivery, and 0 if the player doesn't deliver anything | {
if(g_msg_cntx.msg_deliver_report[(g_msg_cntx.msg_deliver_ind-1)]->delivered==ST_COMP_MSG_RECV_BY_SME)
{
*status = 1;
*imgID = IMG_MESSAGE_SENT;
*strID = STR_SUCCESS_CAPTION;
}
else
{
*status = 0;
*imgID = IMG_MESSAGE_UNSENT;
*strID = STR_FAILURE_CAPTION;
}
} | 1 |
ecb7bab8a4fe20f374dc763fe2aa7b11 | 8f7c796f2be007ff5a461d3cdab72a7d | Returns Open Graph metadata. | class Result
public function openGraph(): OpenGraph
{
return $this->openGraph;
} | 1 |
d6fa4e77bd5adea118f06fe8e0759987 | f6d1103c1e2f7f77f0f3e016396d8b8c | 获得某条学校与其管理账号的信息 | $sql = "select no,tel,s_name,dt_date,tel_status,school from data_base where school='$school'";
return $this->getResult($sql);
} | 1 |
6f787bf8c144c5e3ba7de26b901f2217 | 2f86cceed506def46e3c4dcae6a3769c | Displays to the screen, the names of all cities served by the airline. | def display_cities(first, second):
print(f"{first} -> {second}") | 0 |
22fe430cc96c941f5045d895d9a06605 | da658e704fe7e5a11f88faf33233db63 | Set the color used to paint the glyph's interior. | {
CBCGPBrush brush;
if (color != CBCGPColor())
{
brush = CBCGPBrush(color);
}
SetFillBrush(brush);
} | 1 |
0ed80f8ddc9b3af80ac6535cbf59efe0 | ffce82eccfc7d5e8c7bffa940a060d88 | primitive method of removing duplicates by going through the list twice using nested loops
Order of complexity is O(n**2) | if not self.head:
return
myhash = []
curr = self.head
prev = None
while curr:
if curr.data not in myhash:
myhash.append(curr.data)
prev = curr
else:
prev.next = curr.next
curr = curr.next | 0 |
4f89ca80c7ef345ba86521a851828f2f | 1df6da80f5dadffc9ae11238e1cc85ce | Gestionar la accion de cuando se haga click en una habitación en el treeview.
Carga en los entrys los datos de la habitación seleccionada. | public class BuscarHabitacion extends javax.swing.JInternalFrame
private void tablahabitacionesMouseClicked(java.awt.event.MouseEvent evt) {
btnmodificarhabitacion.setEnabled(true);
btneliminarhabitacion.setEnabled(true);
int selec = tablahabitaciones.rowAtPoint(evt.getPoint());
id_hab =... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.