query_id
string
corpus_id
string
query
string
code
string
label
int64
cfdcacf4bfd727050af2b3239aea2b2d
2ef3d5a6b07450441e8b7bc10c4d39a7
根据platPartnerId查询points_log表数据
@Service @Import({ ProfitDataSourceConfig.class }) public class ProfitTestBase public List<ProfitOrderDO> findProfitOrderByPlatPartnerId(String platPartnerId) { if (StringUtils.isBlank(platPartnerId)){ platPartnerId = "test_platPartnerId"; } ProfitOrderDOExample exam = new ProfitOrderDOExample(); exa...
0
145a7fed920663f200bda6bfbb037965
2d11e571a89baa53166be3367bb4221c
消耗缓存数据
public class DataCache public boolean cacheData() { cacheList.clear(); cacheList.put("key", "value"); System.out.println("缓存完毕"); return true; }
0
7c35b52d28bc16f277d4b218fbb86266
893ff97c7184c00d381932ebeb5b1799
Gets the attribute value for Attribute23, using the alias name Attribute23
public class LovBean extends Bean public String getAttribute3() { return this.attribute3; }
0
08ca6a8cd81309e31d2834336c43e15b
a777aee9b6456d7732a428382cca2c66
======================================== Map view manages the list of tiles ========================================
function Tiles() { 'use strict'; this.setup = function(game) { this.game = game; this.tilemap = new jaws.TileMap({size: [this.game.cells_x, this.game.cells_y], cell_size: [this.game.cell_size, this.game.cell_size]}); this.back_tilemap = new jaws.TileMap({size: [this.game.cells_x / 2, thi...
1
72ba838516c1f0e0f9f7ae99ba9a689f
37a8e255a98e8759f502a0ddcea25534
Verificacion de proceso si cabe en segmento.
class main_memory: def process_fit(self,process): if int(process.getMem()) < self.mem_Left: return True else: print("false") return False
1
6dbf2201f2a4c160b30af83aa0a0a1ef
d96f97fa06871aae95ecd153c77c65a1
Return the index for each query item
class ChexIndex(object): def _annoy_index(self): for i, key in enumerate(self.chex_sql): bitboard = key_to_bitboard(key) self.annoy_index.add_item(i, [self.weights[j] * bitboard[j] for j in xrange(_bitboard_length)])
0
4f0b8a8f23ebbc56b89c761d93b12c01
dd548be05619529d4817267e14fe7547
Atualiza uma Clínica existente
class UserController extends Controller public function updateClinic($id) { $this->validate(request(),[ 'type' => 'required', 'name' => 'required', 'address' => 'required', 'province' => 'required', 'canton' => 'required', ...
1
3994b9a9ff63d626b48b8429acb2bd7c
9fa987b828c72a51f7d249357c44e024
output principal
class PrincipalController extends Controller public function index() { return view('index'); }
0
cb3d9fb677bfd508214721c298f45fe1
e0f14a534adc2c307a298a9d055c8e90
metodo que setea la lista de enmigos a seguir
public class Pulpo extends AnimalesMarinos public void setAnimales(Queue<AnimalesMarinos> animales) { this.animales = animales; }
0
addfe73839ef829a108bd1cbfa1a7f51
5e79f8a267f4a47f0aff44f157392568
Initialize raycast line that gets drawn
public class PredictionLine : MonoBehaviour public void Initialize(Vector3 angle, Vector3 position, float distance) { this.angle = angle; this.position = new Vector3(position.x, 0, position.z); maxDistance = distance; transform.rotation = Quaternion.Euler(0, VectorToAngle(-angle), 0)...
1
43b0905654e700b959d3c48539f4abcd
8017dfcdfdb5b89130624dc9c5fe2a97
ListHandlerKeys returns list of registered handler keys
func Handlers() []*ApiHandler { return DefLessgo.apiHandlers }
0
edff5c53e825dc64b41e04755c567b94
2b85ecb08f21efd8f40108a889311d1b
保留4位小数,四舍五入
public class DigitalUtil public static String formatNumberByRounding4(double number) { return formatNumber(number, 2, BigDecimal.ROUND_HALF_DOWN); }
0
1feb5344ae3bb18e6935224170333ae6
831e90bc042a3e88ec00f236030b51b4
Set the UI values based on the image loaded
public class ObstacleButton : DraggableObject void AssignUIValues() { GetComponent<Image>().sprite = Resources.Load<Sprite>("UIButtonImages/Bottone" + obstacleType.ToString()); GetComponent<Image>().SetNativeSize(); obstacleAmountText.text = obstacleAmount.ToString(); }
1
7860ae6c85d4b9405bc9159e4c60e742
7a6399357cc67428bded127655e5bffd
随机分出20%验证集
self.df['is_train'] = np.random.uniform(0, 1, len(self.df)) <= .75 train, test = self.df[self.df['is_train'] == True], self.df[self.df['is_train'] == False] train.to_csv("train_data.csv", encoding="gbk", index=False) test.to_csv("test_data.csv", encoding="gbk", index=False)
0
b55af370515b16db6bf3f52ebf0c298f
c44a0db0c8ab2b5c3e649faab2a41c2c
Updates a repo under a user by checking the last update time in github
repo_slug = repo_slug or self.bitbucket.repo_slug or '' url = self.bitbucket.url('UPDATE_REPO', username=self.bitbucket.username, repo_slug=repo_slug) return self.bitbucket.dispatch('PUT', url, auth=self.bitbucket.auth, **kwargs)
0
d2be1c342539fa02e758434879f8deca
c9fe351dbf3f33c949f618020d77cb04
时间转换为yyyyMMddHHmmss格式的字符串
if (time == null) return null; SimpleDateFormat simpleDateFormat = new SimpleDateFormat( "yyyyMMddHHmmss"); return simpleDateFormat.format(time); }
1
066b9c453779bd5231147f0f4516c309
2214a83c94a5f158a294707437ef323e
per-update feature: Insert 1.0 if the cookie update content includes a javascript/JSON object. Else -1.0. Will also check inside base64 encoded strings.
global $wgFlaggedRevsAutoconfirm, $wgFlaggedRevsAutopromote; $changed = false; if ( $article->getTitle()->isContentPage() ) { $pages = $p['uniqueContentPages']; $maxUniquePages = 50; if ( is_array( $wgFlaggedRevsAutoconfirm ) && $wgFlaggedRevsAutoconfirm['uniqueContentPages'] > $maxUniquePages ) ...
0
d7bea8d62b554c63e0a2eba184217ec4
0acedcea140e751a1190125d376f89f6
根据品类获取对应的优惠券列表
public class OrderSelectCouponActivity extends Activity implements View.OnClickListener private void getCouponByType() { paramsMap_getCouponByType.put("type", type + ""); paramsMap_getCouponByType.put("userId", userId); url_getCouponByType = Constants.baseUrl + Constants.url_getCouponByType; ...
1
d1393aafcc257973115f36403c341425
7a94337d7fec313aad7dd56a0c94e398
点击表情Item时触发的事件
class EmojiLayoutView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : RelativeLayout(context, attrs, defStyleAttr), View.OnClickListener, View.OnTouchListener, TextView.OnEditorActionListener override fun onClick(v: View) { toggle(v, true) }
1
ceb62697d9b40840646e015d7d9e892a
b96072e8a47e59f3e880768423e19b76
Dispersion quantity with mask applied.
if (mask is None) or np.all(mask is False): temp = flux - fluxmod_wbias _ie = ivar else: _m = ~mask.astype(bool) temp = flux[_m] - fluxmod_wbias[:, _m] _ie = ivar[:, _m] return np.einsum("ij,ij,ij->i", temp, temp, _ie)
1
ed94d4dc612cddede0b462399beb34e2
92659f99c13b9cf86712cb856154fa24
Creates an instance of the holds page controller.
function HomeController($state) { this._$state = $state; this._isLoading = false; }
0
f382538f9874bdc5a4034150766de6ed
9864c0755dd4b9422498cbb0f9505c00
==============================set=================================
void info1::setInfo(int num, string nam, string depar, string posit){ name=nam; idNum=num; depart=depar; pos=posit; }
1
57191fe1be1d3a0815e9e4c963b43916
c83ea911424596d3ce2fcb78f616c87f
根据车牌号获取车辆ID
@MapResultAnno(keyType = Long.class, valType = String.class) Map<Long, String> findCarIdsByCarNumbers(String carNumbers);
1
45da086a6ed05c0fad451f4aedad0d05
710527f8d12cafccefa0249eeda89a02
For partially populated beans returns the properties that are loaded on the bean. <p> Accessing another property will cause lazy loading to occur. </p>
public class BeanUtils public Stream<NestedFlattenedProperty> getNestedFlattenedProperties();
0
3133aa4a6a87dfe4e39e70b3a90d7e33
cb0e09a1d3073972021b099a41772f8f
Omnibus function for creating a derived dataframe to feed into regression.
all_df = pd.DataFrame(index = df.index) all_df["LotFrontage"] = df["LotFrontage"] for key, group in lot_frontage_by_neighborhood: idx = (df["Neighborhood"] == key) & (df["LotFrontage"].isnull()) all_df.loc[idx, "LotFrontage"] = group.median() all_df["BsmtFinSF1"] = df["BsmtFinSF1"] ...
1
2a77c20d3d6dd87dcfac6f491aec0108
5c7d446a4d83fbbd0476621145bbf03b
PreviewTextInput handler for the Quantity textbox
namespace UI.ManagerWindows public partial class ManagerOverviewPage private void PreviewTextInputHandler(Object sender, TextCompositionEventArgs e) { e.Handled = !IsNumeric(e.Text); }
1
21c98f76f3ee01b545ad55f8b00e8859
0986cda743cda0d9bbbb1d0f5620d2f2
Returns the minimum time, formatted according to ISO8601
class TimeListView def min_time @splitter.widget(@splitter.count-1).timeItem.start_time end
0
8bbe235316a59ec10ea302a8088d63fa
ed0e118e34d177e51882fd63d58c5c1d
重置商户登录密码
public Map<Object, Object> resetPassword(SellerAccount account) { return resultMap(updateWalletPwd(account.getSellerid() + "", account.getPassword(), 2)); }
1
92f93329b3953d622980cd9aedffc97b
ecd5b7dd2cb7f5cf44032e394fd343a6
A row of the tree was clicked. Show the test results.
var block = g_diagram.findBlockById(e.data.id); if (block) { CodapTest.sendSequence(block.view.yData.data); } }
0
67cfc00fd8cb6f77df10d4e50c8ae522
69668033523c808310fb41afd7519dbb
Spring IoC容器创建之后,在加载SocketIOServiceImpl Bean之后启动
@Slf4j public abstract class BaseSocketIOService @PostConstruct private void autoStartup() { start(); }
1
c2447cb7140d72f4666aa71c3ca10bb0
e1e0d259c481f916f411dbd9aa937423
根据科室代码查询数量
int countByCode(@Param("code") String code);
1
2194e086ae35bb0139512f41b33b26a5
5d910090fda80277bf62feadb528d281
블로그 본문을 탐색하며 이미지가 존재하는지 체크
def find_imgurllist(htmltext): article_body = htmltext.find('div', class_='c-blog-article__text') img_els = article_body.find_all('img') for img_el in img_els: if len(img_el.text) > 0: logger.debug('img要素がバグってる') return find_imgurllist_bug(htmltext) imgurls = [img_el.attr...
1
345c591f866ac1e0132ca9f9f4ab4ed0
ba7869d603ca58dcbc30ec7a621ceed1
Set the volume for the user’s current playback device. Requires** the [SpotifyScope.USER_MODIFY_PLAYBACK_STATE] scope [Api Reference](https://developer.spotify.com/documentation/web-api/reference/player/set-volume-for-users-playback/)
namespace Spotify.NetStandard.Test [TestClass] public class SpotifyClientApiTest [TestMethod] public async Task Test_UserPlaybackSetVolume() { var result = await _client.Api.UserPlaybackSetVolumeAsync(50); Assert.IsTrue(result.Success); }
1
65128c04f920e00fefaffb7a54d31686
cad47ebf485df3db34fb85d4b10f188e
Returns the meta object for class '{@link org.xtext.example.blog.blog.Page <em>Page</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
public class ModelPackageImpl extends EPackageImpl public EReference getObject_Page() { return (EReference) objectEClass.getEStructuralFeatures().get(0); }
0
4b353e6a21a006d02b30469bb32df3c2
f315f6ac3a2ec04b32130bd8f626c0d7
Creates an Example object from a row of a standard ExampleSet DataFrame
class RelationDataProcessor(DataProcessor): def _create_examples(self, lines, set_type): examples = [] for (i, line) in enumerate(lines): guid = "%s-%s" % (set_type, i) if 'id' not in line: line['id'] = guid examples.append(line) return example...
0
c931ad9fbb34149581e453a65fed9fb1
5ce157ee77891e6b7d3f358f19767f64
Get fully qualified attribute URI, given the attribute name
if (entry.isAddedOrModified() && (simsStrict == false)) return BASE_SIMS_FR_URI + "specificationAttribut/" + entry.getNotation(); else return BASE_SIMS_URI + "attributeSpecification/" + entry.getNotation(); }
1
5d9152fac471e39b007f5a7b5023f537
a87b86986c046338b0b3d89b8d366e81
Hide/show output option checkboxes for detector type.
function _toggleOutputs(evt) { $(this).closest('.outputs').toggleClass('collapsed'); }
0
c255a96727a3a882710d97c6c87a005b
682bd8e4584cb4fc9f49415f6f8cf436
SPELLS AND SKILLS. This area defines which spells are assigned to which classes, and the minimum level the character must be to use the spell or skill.
init_spell_levels (void) { spell_level (SKILL_MOUNT, CLASS_MAGIC_USER, 2); spell_level (SKILL_RIDING, CLASS_MAGIC_USER, 3); spell_level (SPELL_DETECT_INVIS, CLASS_MAGIC_USER, 4); spell_level (SPELL_DETECT_MAGIC, CLASS_MAGIC_USER, 5); spell_level (SPELL_INFRAVISION, CLASS_MAGIC_USER, 8); spell_level (SPELL_I...
1
9a101300c0b9b4d008ebbdd882e44b45
35bbeef68e758cd50a470cfb42ea3c42
Строка X состоит из нескольких предложений, каждое из которых кончается точкой, восклицательным или вопросительным знаком. Определить количество предложений в строке X.
{ int count = 0; int i = 0; do { if ((sentence[i+1] == ' ' && (sentence[i] != '.') && (sentence[i] != ' ')) || (sentence[i+1] == '.' && (sentence[i] != '.') && (sentence[i] != ' '))) { count++; } i++; } while (sentence[i] != '.' && sentence[i+1] != '\0' ); return count; }
0
75b4012bcce984580f03492dc440a054
854133920d2dce9e53a6eb8f65ee6e10
Save the specified 'json' to the specified 'outputPath' file.
class JSON(LoaderBase): def save(self, data, outpath): with open(path, "wt") as open_file: json.dump(data, open_file, indent=4)
1
75f901ef799b13c9926d2bd4dbc76ac9
b94876a0c11ca798a43af7fcfa76ee7b
获取smsEnabled属性的值。
@SuppressWarnings("unchecked") public class LocalSettings extends DataObject public boolean isSmsCommandEnabled() { return StringUtils.isNotEmpty(smsChannelName); }
0
58fc2f33e6c6afa3ae235a2c65669610
caea665fe79499ed29992444229e58d0
Pull processor status
byte A1335::getProcessorState(){ return processorState; }
1
a5429656e94abd09ad30bc11f6ee248a
89d700e42831c4357e320c117f3ad546
根据商家id获取店铺id
{ $where['is_disabled'] = 0; $where['is_shopkeeper'] = 1; $where['seller_id'] = $sellerId; return $this->field('id')->where($where)->find(); }
1
e88d40252f3e15dc5ff0f239fc07faca
134feb7fd217012434b8af04cadde305
Calculate the reduced temperature.
class RK_EOS(): def reduced_tempertaure(self, T, Tc): return c2k(T) / Tc
1
254a90820c7568aa9bbbcc68caf207eb
3399688bcac4f3a6244fa8a20ac972d4
Rimuove sé stesso dal modulo padre e propaga il segnale.
public remove() { if(this.disposed) return; if(this._parent && this._parent._children) this._parent._children.remove(this, true); }
1
6ca2e90216f5ec065496e60112eb8b2f
4ad2a59c16d95e0eaff8596e1deaa52a
验证消息是否需要幂等验证
Integer ts = msgMap.get(message); if (ts == null || timestamp - ts >= 10) { synchronized (lock) { Integer ts2 = msgMap.get(message); if (ts == null || timestamp - ts2 >= 10) { msgMap.put(message, timestamp); return true;...
1
412239fc06abcbc1c8798549517efe83
4b6802625cd27ba4279c584a41c00503
Set text appearance of the altitude unit text view
{ try { TextStyle textStyle = new TextStyle(); textStyle.ForeColor = Color.White; textStyle.Outline = true; textStyle.BackColor = Color.Black; textStyle.FontHeight = 10; text.TextStyle = textS...
1
328215717c8b3d618053baea368daa35
aa5ab5d7bb8b21a711d9162cab92abe5
Carregar todos os conjuntos utilizados por uma empresa
{ DB db = DatabaseFactory.Instance.GetDatabase(); IDbDataParameter[] prms; prms = db.GetArrayParameter(1); prms[0] = db.GetParameter(); prms[0].Value = CodEmpresa; prms[0].ParameterName = "@cod_empresa"; IDataReader dr = db.Exec...
1
d9bfb795a84831808296fada80013230
4df05fa15ec1c022a0f66a4448128c07
Gets whether the etablissement already has the picto auditif.
class PiloteAvion public function hasPicture() { return $this->_picture->hasPicture(); }
0
90d8face97b50b02138aa2eafaa7ec48
a8ebbd61ff262baf40291f708f309795
入力の終わりかどうかを調べる
{ if (keyState == KeyCommandState.KeyInput && keyCursor == commandString.Length) { return true; } return false; }
1
73ca9b3123370da5eeaad1f085759479
5109de76d0a0d7bd7218199feaeeec7c
上限値を超えた加算値は上限を引いて上限までの範囲内に収めて返す
$sum = $current + $val; if ($max !==FALSE){ return ($sum > $max)?$max:$sum; } return $sum; }
0
58ffa0a5531b76355ffbc9a6d6286b6c
c180ce76c00732ddbc05b67c440eda9f
function to create maze 2
{ srand(time(NULL)); fillMaze(); vector < CellWall > walls; int x = (rand() % MAZE_X)/cell_size; int y = (rand() % MAZE_Y)/cell_size; while(x==0){ x = (rand() % MAZE_X)/cell_size; } while(y==0){ y = (rand() % MAZE_Y)/cell_size; } Cell currentCell = maze[x][y]; currentCell.setIsInMaze(true); finalMaze.pu...
1
4dd697f9f22ff8cf8ffa2492c417f356
9b3ca268d0b9f091e7153d29b748e871
This will increment the time depending on which buttons are being pressed
static void IncrementTimeA(void){ am1++; if (am1>9){ am1 = 0; am2++; } if (am2>5){ am2 = 0; ah1++; if (ah1==2 && ah2==1){ if (aampm){ aampm = 0; } else { aampm = 1; } } } if (ah1>9){ ah1 = 0; ah2++; } if (ah2>0){ if(ah1>2){ ah1 = 1; ah2 = 0; } } }
0
ffaf05c40ddc2c7a566714c0b880f691
7bccb46375d4677692a8fb830b75e0a8
Set satellite-specific parameters.
public class GPSAlmanac extends AbstractAlmanac implements GNSSClockElements public void setSatConfiguration(final int satConfiguration) { this.config = satConfiguration; }
1
f0f110095aab3a8e305eb4410d6b5387
7e9db9816210aab8667e4dc550c525f7
Gets the player behavior attached to the player
boolean isBehavior();
0
09327d18daececb1ac9934a6dcb654fa
9083d8dbfc86292bf03e2247d29e4f38
Get manual domain list from admin and expolode it to array.
public function getDomainList();
0
c41e08888ab2c0a8eaf2f4288efec266
ef45ec4355b3474e9cba4ff670481461
获取审核记录数
long getAuditNum(@Param("ids")List<String> ids, @Param("auditPass")BISAuditStatus auditPass, @Param("waitEffect")EffectiveStatusEnum waitEffect);
1
12e81fa0c402be4297624067ddd34add
66465ba48c6da43a7385dbce21e66ec6
Remove the old visual queue contents Can't just display.remove() the visualQueue because a reference is needed for the display group on level1 Use a while loop becuase numChildren will be 1 smaller after each element removed
export default class BaseScene extends BaseSprite removeAllView() { while (this.numChildren) { this.getChildAt(0).removeSelf(); } this._views = []; }
1
d5821a01b919cfe19c1560586db6cee3
e047bef1348c472f7b2b1757965b17e2
Hàm xử lý nhấn click yes trên dialog xóa Created by BQLINH (20/5/2019)
public class NotesActivity extends AppCompatActivity implements NoteAdapter.MyCallBack, DeleteDialog.DeleteDialogListener, ExportDialog.ExportDialogListener, SettingDialog.SettingDialogListener, DeleteFilesFragment.onItemChanged @Override public void onDeleteYes() { isDeleteorExport = true; ...
1
982dd9fd24c1a5205fe2ca737be75280
ee1e6701fbe57b802cf9ba8371b4c1e5
Mark a returned item as received.
namespace ConnectTo.Foundation.Business internal class ItemReceiverComponent : IProgressable internal void PutItem(Item item) { item.Completed += (o) => { receiveList.Remove(item.ID); }; if (item is FileItem) { var f...
1
4d78ede9c3d164366d92b17552bf7283
ed21e0b0719e9f57a0b8c8d287b56a6d
Air-Tapのリリース時のコールバック処理
{ if ( nullptr == TTBEvent_Unload ) { return; } TTBEvent_Unload(); }
0
4655628581ef0731f129514727b35436
e124e4d44d84166085ab99c86b3f385b
Returns :code:`True` if any value in a column passes a truth test. The truth test may be omitted when testing :class:`.Boolean` data.
class DNDarray: def any(self, axis=None, out=None, keepdim=False): return logical.any(self, axis=axis, out=out, keepdim=keepdim)
1
a3f19992b2ae7cc160a1aaf5c3686bbb
72404b6d80736bae8c20b07006d01762
run reactor in a thread.
Event_Loop_Thread::svc (void) { this->reactor_.owner (ACE_Thread::self ()); ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) Event_Loop_Thread::svc commencing\n"))); disable_signal (SIGPIPE, SIGPIPE); while (!this->reactor_.reactor_event_loop_done ()) { this->reactor_.handle_events (); } ACE_DEBUG ((LM_...
1
4d545f792ac579fe60a6cdc9c21abda6
705d4ac82f25f36dc5f12100ed43be3e
Shows an interactive plot with two movable cutplanes through a 3d volume
slice_args= {'slice_thickness': 2, 'slice_steps': 1, 'color': 'black'} ): gs1 = gs.subgridspec(6,6) ax0 = fig.add_subplot(gs1[1:,:-1]) map_imdist_vacdist(ax0, plane_points, dist0['values'], dist1['values'], dist0['steps'], dist0['cmap'], dist1['steps'...
0
70601671166f3d2a2b7e24b4d4d14254
7e9c2118cd6851bc6e32e2df7d5a3cce
Activate a Survey
{ $survey =$this->em->getRepository(Survey::class)->find($id); if($survey->getVisibility() == 0){ $survey->setVisibility(1); }else{ $survey->setVisibility(0); } $this->em->persist($survey); $this->em->flush(); return $this->successRespo...
1
8129f0451059748828b78190cace6110
2355211e09687cabc7f378fc899320c5
Updates the shared preferences to indicate the change log have been viewed.
{ mSharedPreference.putString(SEEN_NUM_HIKERS, mNumHikers.getText().toString()); mSharedPreference.putString(SEEN_NUM_EQUESTRIANS, mNumEquestrians.getText().toString()); mSharedPreference.putString(SEEN_NUM_BIKERS, mNumBikers.getText().toString()); mSharedPreferenc...
0
c4ffc8c2668dfcf6d71209caee3249e1
217586629593a78a0bef6c83bbcb33d0
取得受測人員列表
public class Rng061ParamModel extends Rng060ParamModel public List<CmnUsrmInfModel> getRng061ConfirmUserList() { return rng061ConfirmUserList__; }
1
bd46b9a7d3471076b4b6384e7ff7a2a1
a25f0b908c426c8533afad08306d5b00
禁用activity-alias组件
public class IconSelector private void disableComponent(ComponentName componentName) { int state = packageManager.getComponentEnabledSetting(componentName); if (state == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) { return; } packageManager.setComponentEnabledSetting(com...
1
fbfa1bd71dfb3a04317fe2a741e5d771
5ad825c72412628c0372011dfcf83ab3
Pointers to functions have to emitted in a special way because of C syntax.
impl<'a> IrGenerator<'a> fn emit_function(&mut self, _ident: &'a Ident, _function_ref: FunctionRef) -> JsResult<()> { Ok(()) }
0
d8be44775b22a253031c24cdc8f1da98
af3fefd7968cadad883040499f07898b
Adds a rail to left and right.
minx, miny, maxx, maxy = self.panelBBox() thickness -= SHP_EPSILON topRail = box(minx, maxy - SHP_EPSILON, maxx, maxy + thickness) bottomRail = box(minx, miny + SHP_EPSILON, maxx, miny - thickness) self.appendSubstrate(topRail) self.appendSubstrate(bottomRail)
0
a5ff3a44972fdcc8f52a00c97069714c
7c155f66e8b00eb471eea4e15f3cb3e3
Performs a mirror along the Y-Axis
fun List<Vector2D>.mirrorY() = this + this.map { (x, y) -> vector2DOf(+x, -y) }.reversed()
1
754a10dba36b3ae7e870b36fbf29fe2a
70ac308d95ba9a7ce5c22ed9c29a702d
@brief The callback function called when the element node with custom data is released.
void DelightCustonGuiMultiLights::Free(CDialog* i_dlg, void* i_userdata) { if (!i_dlg || !i_userdata) return; iCustomDataTypeMultiLights* sub = static_cast<iCustomDataTypeMultiLights*>(i_userdata); DeleteObj(sub); }
1
c2d7c9e333dbe467f01153540baf4584
81d4ae677fae5e80da263cb7fbdd8db9
赠送猪仔选择
function searchPigSearch(){ var earBrand = $('#earBrand').textbox('getValue'); var pigClassId = $('#pigClassId').combogrid('getValue'); var houseIds = $('#houseId').combogrid('getValue'); var breedIds = $('#breedId').combogrid('getValue'); var sex = $('#sex').combogrid('getValue'); var swineryIds = $('#swineryId...
0
860fa07bec28f7526331cc5c9b0fa721
23134eafd66028860a52f012a9aa527c
Adds extra filter paramters to the reports::fetch_incidents() method. This way we can add 'all_reports=>true and other filters that don't come standard sinc we are on the backend. Works by simply adding in SQL conditions to the params array of the reprots::fetch_incidents() method
class RM_Ssp_Report_Repair extends RM_Ssp_Report_Blank public function getAdditionalParams ($args) { if ($this->restrictByCity()) { $args['restriction']['city_id = ?'] = me()->city_id; $args['no_visible'][] = 'city_id'; $args['no_visible'][] = 'admin_group'; } return $args; }
1
b21f5ca5ac32a9d50d88d3ae76671ac1
6a5d9ccf487a2866e50f2bb0fbdb4959
ステージ情報を JSON ファイルから取得
namespace HKT.Game2D.Puzzle public class Stage : MonoBehaviour private void LoadStageData() { int rowCount = 0; FileInfo fi = new FileInfo(Application.dataPath + "/HKT/Scripts/2D/Puzzle/StageData/" + "Stage01.txt"); try { using (StreamReader sr...
0
d545c1821f8802c9e13dd0d85a655ad4
b42e241f73bd1978b05a54c533489fd3
コントロールの文字入力方向が変更時、ラベル代替表示をしていたらラベルの文字入力方向も変更します。
public class TextBoxEx : TextBox protected override void OnGotFocus(RoutedEventArgs e) { ResetLabel(); base.OnGotFocus(e); }
0
fe6ce5f02250ab9e364cb8d4512c4ffe
6260743eab50d61eaed2b26f58b9bc83
Update routine to perform database cleanup and to ensure that newly introduced settings and defaults are enforced.
{ $allSettings = $this->settingsRepository->findAll(); $removedSettingsCount = $this->removeOldSettings($allSettings); $this->settingsUtils->convertSettingsJson(); $this->defaultInvalidSettings(); $this->upgradeDefaultSettings(); return [ 'changedSettings'...
1
4fc9922fc8c508c8de0103cf68713cbd
6f7168143b3591887206fbf3f3410cc9
Store Accumulator in memory
{ unsigned Addr; D->Cycles = 4; Addr = MemReadWord (D->Regs.PC+1); MemWriteByte (Addr, D->Regs.AC); D->Regs.PC += 3; }
1
5dcb0aa8f10fca4a3aafc2277f4280f2
16c4c81cc6e333c2fb6e1c6dcd5e6694
入库单金额计算
var tbodylist = $('table.mainTable>tbody'); var trlist = $(tbodylist[1]).find('tr'); if (trlist.length == 1) { var tdlist = $(trlist[0]).find('td'); if (tdlist.length < 9) { $('#textAcountCost').val(0); return false } } var mun = 0; for (i = 0; i <...
1
f859156671a50176f0bfb1ab229eb5f4
557f5a33a5e546e0b38f142a0d86a62d
将url对应的数据转化为封装的NewsBean对象
public class MediaPlayerHelper public MediaBean getMediaBean(String url) { return mMediaPlayerImp.getMediaBean(url); }
0
6f68c7fd6cf1254b533dd5e45340982f
54d2230047e15e0e70de87594c6e2fd6
Whether the command has been undone.
boolean isUndoCommand();
0
ab3c84457c41263d20ce3346905122e7
6e56c9f633c525010ec39c3228dfcb23
Returns the cap co quan quan ly persistence.
public abstract class MotCuaKetQuaDienBienServiceBaseImpl extends BaseServiceImpl implements MotCuaKetQuaDienBienService, IdentifiableBean public MotCuaPhanCongXuLyPersistence getMotCuaPhanCongXuLyPersistence() { return motCuaPhanCongXuLyPersistence; }
0
80d1577b0dd2c78d7ca9436a2310c4e2
df048492d0b0f15aa6c4f09fc0171fce
Display a listing of the Sponsor.
class SponsorController extends Controller public function index() { $this->authorize('sponsor-view'); $sponsors = Sponsor::all(); return view('dashboard.sponsor.index', [ 'sponsors' => $sponsors ]); }
1
b50944e76dc5317a05999c26bd9e22f5
3056415d7f78bdb41af98a5b5df0e403
Read a byte array from the parcel at the current position.
int len = parcel.readInt(); if (len > -1) { byte[] resu = new byte[len]; parcel.readByteArray(resu); return resu; } else { return null; } }
1
595a2f2ab4aca8a29ae79d51c670abcc
bc387bfca9e41eef919513f99c94a61a
Checks whether the type parameters of the given <code>Collection</code> match the declared type parameters of this generic declaration object. match the declared type parameters of this Map.
public abstract class TypeToken<T> private static boolean typeEquals(ParameterizedType from, ParameterizedType to, Map<String, Type> typeVarMap) { if (from.getRawType().equals(to.getRawType())) { Type[] fromArgs = from.getActualTypeArguments(); Type[] toArgs = to.getActualTypeArguments(); fo...
1
7940069ba07b1cdd957fbb5382c89754
388661db332f3ca558f773bbc3e16a41
Exports the contents of this command to a simple structure of arrays and serializable values from <code>java.lang</code>.
public void rawDump();
0
a5f847d31bfc6f83cae0cd3aa84a2d26
653fd17dbf3d8d995ca2cbc75d37b5ae
Move a mesh vertex to a point.
def mesh_move_vertex_to(mesh, point, vkey): mesh.vertex[vkey]['x'] = point[0] mesh.vertex[vkey]['y'] = point[1] mesh.vertex[vkey]['z'] = point[2]
1
0c34386214639102f428e50c84a8f17a
3e6cbae5a180dd33c683c9e9e5dd3866
获取虚拟按键高度(Nexus手机的底部虚拟按键的高度)
fun getHasVirtualKeyHeight(context: Context): Int { var dpi = 0 val manager = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager val display = manager.defaultDisplay val dm = DisplayMetrics() val c: Class<*> try { c = Class.forName("android.view...
0
9a1278f950dd278a425aed470547f7d1
b1de5e924def274447c675ebd6e2b544
Fetch given url page by using requests and return response html text if success
def fetch_page(url): try import requests time.sleep(1) target_page = requests.get(url) return target_page.text except: return ""
1
a31d2289569a03fe858b90d04f43fa20
16aead36d8f0bc3c320610ec625f6859
test writing multiple dictionary chunks for a single segment
class TestSegmentation: def test_multi_segments(self): multi_segment_mask = np.zeros( self._ct_image.pixel_array.shape, dtype=np.uint8 ) multi_segment_mask[1:5, 10:15] = 1 multi_segment_mask[5:7, 1:5] = 2 multi_segment_mask_empty = np.zeros( se...
0
be1f7c958485fe354ea44626d476de82
ea9184f25ffb16e693ad4be729ff97b1
提取前k个高频词语
def find_top_k(v, k): counts = {} for word, vo in v.vocab.items(): counts[word] = vo.count counts = sorted(counts.items(), key=operator.itemgetter(1)) words = [c[0] for c in counts[-k:]] vectors = np.matrix([v[w] for w in words]) return words, vectors, [float(c[1]) for c in counts[-k:]]
1
678f3b55406d660825c0234ded663af1
2f8e39587c324e2af8f4204e53103414
This method gets whether or not the login request should be sent with each request. If set to false it will only send it when the server requests it. server requests it.
abstract class Webtrekk protected constructor() abstract fun getVersionInEachRequest(): Boolean
0
c019c892e8eb6d00ffbc9a00ee9a4a01
1cae2ad5c22e7ee3723e57c8b2fe7828
对象键名转换:驼峰命名=》下划线命名
@Component public class LbMap extends LinkedHashMap<String, Object> implements Comparator<LbMap>, Serializable public LbMap camelToUnderline(boolean isUpper){ LbMap map = new LbMap(); for (Entry<String, Object> entry: this.entrySet()){ map.put(camelToUnderline(entry.getKey(), isUpper), entry.getValue()); } r...
1
ccaf0d015a3da5796511f77e28a5ff19
9fafbb73fce20dc21bc138af8d68287a
用户收到房间关闭通知
function M:onEventRoomJoinNotify() self:removeSelf() end
0
119696793521533bc9c667c51b43297b
a388dacf96da7984e4ee1cb6044c8bc8
Associate a actor to a task
String previousActorId, String nowActorId) { List<TaskInstance> taskInstances = jbpmContext .getTaskList(previousActorId); if (taskInstances != null && taskInstances.size() > 0) { Iterator<TaskInstance> iterator = taskInstances.iterator(); while (iterator.hasNext()) { TaskInstance taskInstance = it...
1
47801f0b848f74de6fa64f88004ccb16
1bf093b6cffdf8471b2f53ac0c70725f
依照類型與日期區間取得排行榜資料
class LeaderboardService public function getLeaderboardDataByTypeAndDateRange($type, $range) { $keys = $this->getTotalKey(); $result = []; if ($type == 'anchor') { switch($range) { case 'day': $result = $this->refreshUserDataFromCache(\Cache::get($...
1
f93e1dcbdbbf006dbc06b303a3c9e8ec
9dba23e1523a3c74b5aace1435d80736
设置运费,单位是元
class SessionManager public function SET_FREIGHT_MONRY(array $freight) :void { SessionGet::getInstance(static::FREIGHT_MONEY, $freight)->set(); }
1
647be5090bf83d763e8142289e95f9af
099ea1189c10b8e49a65bde5dd9fa211
Validates the ItemType constraint of '<em>Mirror Type Member4 Base</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BaseAddressType1_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BaseAddressType1_value_feature", "_UI_BaseAd...
0
01261c6da1465457a907302c2d96037d
0005489c5dfaaa4da204017913a9d731
添加分销退款
Class Structure public function AddRefund($data){ $model = new Dostru(); $info=$model->AddRefund($data); return $info; }
1
a62aa2e5666356168febc242f3ef35e2
701064016c8dc8bd90a80d715beb9ba1
Metodo para obtener la direccion del cliente que se va a conectar con el servidor.
public String conecta() throws RemoteException;
0