query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ed195b3dd95b0ab6e7cecf72a6d5ca0e | 99863dbe21202c3be58cabcdbb86cb78 | Sets GameObject's rotation to match that of specified GameObject with the same parent transform. | public class WorldSphereModel : MonoBehaviour
public void rotateToObject(GameObject o) {
StartCoroutine (rotateToSphereZero (o));
} | 0 |
54555ebfdb5bfcb8c42e46ffb5e83a0a | b1a92bf84702d27354f9444d394810a8 | Creates a request validation entry. | if (null == tableLayout) {
throw new IllegalArgumentException("Cannot create a validator for a null table layout.");
}
return new FijiDataRequestValidator(tableLayout);
} | 1 |
8f9c5797b1fb9d7b9c03a6e0fd20b375 | ad0d76639705ef0bc42c85cbcd6d4a23 | Map temperature to one of TEMPERATURE_CHOICES intervals. | def temperature_from_object(hass, temp_obj, interval=False):
to_unit = hass.config.units.temperature_unit
from_unit = TEMP_CELSIUS
temp = float(temp_obj['value'])
if temp_obj['scale'] == 'FAHRENHEIT':
from_unit = TEMP_FAHRENHEIT
elif temp_obj['scale'] == 'KELVIN':
if not interval:
... | 0 |
28461fc3ae53ba7ef9ab38aea0073b83 | 11101b8cb77af8632f0d75625f6d4dcd | 检测英雄飞机是否击中敌机,检测碰撞 | class HeroPlane(Object):
def bo_test(self,enemy_plane):
for bo in enemy_plane.bullet_list:
if bo.x>self.x+12 and bo.x<self.x+64 and bo.y+17>self.y:
return True | 0 |
d02b6b8d458e58202fed7dac3adbb473 | 6953a9d7f30e42345c730c14daeb7992 | Returns a determiner that is of the right form for the noun that will succeed it. | class DetPronounManager(object):
def say(self, selector, is_pro):
is_plur = True if selector.guess_n(N2) == N2.PLUR else False
key = (selector.correlative, is_pro, is_plur, selector.guess_of_n(N5))
s = self.cor_pro_plur_of2s.get(key)
if not s:
return None
n2 = selecto... | 1 |
6e8332f62c146c2f6865ed3c23134dfb | 036c4f7880846be3b2b8d87ee55046d6 | Creates the data for bulk insert | {
$rows = [];
foreach ($data as $item) {
$rows[] = [
'sku' => $item['sku'],
'names.default.value' => $item['name'],
'inventory_status.id' => $item['inventory_status'],
'featured' => (int) $item['is_featured'],
... | 1 |
a289b8becc35365290c9624e9b3b9141 | 8d1015ef79beb239de3e37f63b13919d | Returns the value of the '<em><b>List Source</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>List Source</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
extendedMetaData="kind='attribute' name='list-source' namespace='##targetNames... | boolean isSetSource(); | 0 |
8c82eef87b7b6bda04f9bf6ef9d62c43 | 29d5b4617bc519051027a15b402a1063 | Converts all windows-style slashes to unix-style slashes | {
#if PLATFORM_WINDOWS
InPath.ReplaceInline(TEXT("/"), TEXT("\\"), ESearchCase::CaseSensitive);
#else
InPath.ReplaceInline(TEXT("\\"), TEXT("/"), ESearchCase::CaseSensitive);
#endif
} | 0 |
0fd397e52ecc503769797677c23da94d | dc90e9c501125d85d20277e40c6b6cd9 | 当市场价格发生变化, 更新持仓盈亏 | public void updateProfitAndLoss(String stockCode, Long date, BigDecimal close); | 1 |
8ebcc3ab22f40c46f49088fd144a7710 | e48644dd1f2256b43280a0d0d5e39c3d | @brief Clear Rx FIFO. | {
uint32_t tmpVal;
tmpVal = BL_RD_REG(IR_BASE,IRTX_FIFO_CONFIG_0);
BL_WR_REG(IR_BASE,IRTX_FIFO_CONFIG_0,BL_SET_REG_BIT(tmpVal,IR_TX_FIFO_CLR));
return SUCCESS;
} | 0 |
325536331418e11433df6479b8cb92c2 | 072aee64b3c3e545a4dc364944261e12 | Set up projectile to be thrown. (script called in: Player_Movement) | public class ProjectileScript : MonoBehaviour
void Start(){
} | 0 |
d9f4ae4672b6b5900590c04ae39bb83b | 902a77f96c0700d49f900f494f143571 | Validates that the package name is correct | packageNames.forEach((name) => {
if (name.match(/^[a-zA-Z0-9-._~]+$/) === null)
throw new Error(
`Invalid package name "${name}". Package names can only contain alphanumeric characters and the symbols - . _ ~`
);
});
} | 1 |
1d7d2f7b423afe53e51bf58d37592ad0 | 050077f0ecb40b1ab25cd9e76c90e9cc | Команда отписки | try:
user = self.db_session.query(VkUser).filter_by(vk_user_id=user_id).first()
if user:
for relation in user.news:
self.db_session.delete(relation)
self.db_session.delete(user)
self.db_session.commit()
s... | 1 |
c77f6fc12cb1b0b87a59d1e96d7f7eb0 | 31a1c50b915d5d48c9841d225109ee2f | Given the app never pulled before, but consent was given to pull EU keys. | tracker = get_consent_tracker()
tracker.record_consent_data(
self.user,
self.consent_requirement_1.build_consent_data(granted=True))
tracker.record_consent_data(
self.user,
self.consent_requirement_2.build_consent_data(granted=False))
self.... | 0 |
140effbee15dcdd18927522a3e239c39 | fd622ccece20f0bdb611b7a487340c04 | (re)write the onionskin specific values
to the video info file | {
QEInteger *qca;
qca = (QEInteger*)getQcaItem( PROFILE_V4_VARIABLE );
if( qca ) qca->writeInteger( vSlice4X );
qca = (QEInteger*)getQcaItem( PROFILE_V4_THICKNESS_VARIABLE );
if( qca ) qca->writeInteger( vSlice4Thickness );
return;
} | 1 |
1e7cdc8fe2b0805605214b58cc0783ca | 3e405d1aec90e4f02e4a833448ab74e7 | Passes if object is not a kind of class.
assert_not_kind_of(Object, 'foo') | def assert_kind_of(cls, obj, msg=nil)
KindFailure.assert(obj, cls, :message=>msg, :backtrace=>caller)
end | 0 |
4159c556703eddc604b9883e5189a10e | a3b3f63ba572e902913bede9256c2180 | Liefert die orthogonale Beschreibung zu den Erweiterungen zurück. | namespace Arachnode.DataAccess
public class ArachnodeDAO : IArachnodeDAO
public virtual ArachnodeDataSet.ExtensionsDataTable GetExtensions()
{
try
{
return _extensionsTableAdapter.GetData();
}
catch (Exception exception)
{
... | 0 |
a52e9cf05be623aceed29cbb14cedf15 | 39242ab4bad63f2ef3b97bafb0064e3d | Revises the emergency indicator. | View emergencyModeView = findViewById(R.id.emergencyMode);
emergencyModeView.setVisibility(emergencyMode ? View.VISIBLE : View.GONE);
if (emergencyMode) {
Logger.trace(TAG, "Move to emergency mode!");
LogEvent logEventEmergency = Dagger.appComponent().logEventBuilder()
... | 1 |
2fa2466fb501394eeb43e3c7c0fc8a2b | c8a40eac68245967cec740ea79234a57 | Perform a linear search for the given element. Return the index of the
element's node if found, -1 otherwise. | int searchLinear(const ArrayList* list, Element elem){
for(int i = 0; i < list->size; i++){
if(list->buf[i] == elem) return i;
}
return -1;
} | 1 |
6288d020e34f76b4547138e1ad9a55b6 | ac80f55ffc54e0f164fe01ac4255d759 | 根据前序和中序遍历,反向构造树 | if (pre.length == 0) {
return null;
}
for (int i = 0; i < in.length; i++) {
map.put(in[i], i);
}
return buildByPreIn(in, 0, in.length - 1, pre, 0, pre.length - 1);
} | 1 |
784b7d674f088604429dd41756307dd9 | ee67b1815be2e5cc20ad85b162f74c4a | Write the pointer to an undo header. Instead of writing the pointer itself
we use the sequence number of the header. This is converted back to
pointers when reading. | tx := transaction.NewUndoTx()
tx.Begin()
tx.Log(rptr)
rptr.magic = magic
rptr.head = nil
rptr.tail = nil
tx.End()
transaction.Release(tx)
} | 0 |
b483092aca00bdcf60232f375ede94b2 | 3e89fd97cabd66f7eedf8cf210c5d655 | Path to client's public key (PEM) used for authentication. | class Body106(object):
def client_key_pem(self):
return self._client_key_pem | 0 |
686b3666ab5e7917a1439be3e4130ed4 | 0cb08003d529053b6c36e39ca7eaf278 | Busca mensagem de sucesso armazenada em sessão | if(!session_id()) {
session_start();
}
if(isset($_SESSION['message'])) {
$message = $_SESSION['message'];
unset($_SESSION['message']);
return $message;
} else {
return FALSE;
}
... | 1 |
825308c20309fb0379fb6d873dcd88ea | 7d335f3f4915850d1097380e8e13bc38 | 获取一天的毫秒数 | function dayToMilliseconds(day) {
return day * 24 * 60 * 60 * 1000
} | 1 |
6895361055c5f9d6c1c8f618c5e8e1e6 | 5f5a214bf96652853afb288cdfa17fdc | Загружает данные о количестве ресурсов у игрока | self.inventory = self.client.get_inventory()
self.count = self.get_inventory_total_count()
pokeballs = self.get_inventory_item_count(PlayerEnums_pb2.ITEM_POKE_BALL)
great_pokeballs = self.get_inventory_item_count(PlayerEnums_pb2.ITEM_GREAT_BALL)
ultra_pokeballs = self.get_inventory_item_count(PlayerEnums_pb2.... | 1 |
73710e5bac5f566da4ce1d263ef34a67 | ca79fc51a086ad70825b9c51468eb1af | Makes a private copy of the proxy for the specified interface. | public static IAbstractElementProxy<TInterface> ProxyFor<TInterface>(this IAbstractElement element)
where TInterface : class
{
Guard.NotNull(() => element, element);
return (element as IAbstractElementProxy<TInterface>) ?? new AbstractElementProxy<TInterface>(element)... | 0 |
966e26cab2aba87199b87f417e4b1ade | cb48d3db48b9ff9bbc7012758c38162d | ペット購入 | void UI::UI_Purchase(Wh_Chain *p)
{
using namespace std;
int id;
std::string name;
UI_wh->Wh_C.lock();
id=p->WhC_REID();
name=p->WhC_ReName();
UI_wh->Wh_C.unlock();
UI_LightLine=-1;
UI_view[3]="--------------------------------";
UI_view[4]="Purcharse";
UI_view[5]=" ID:"+to_string(id);
UI_view[6]=" Name:"+... | 0 |
678416046eb32b49e20adb0b415c3464 | 15c3f4d229fb24f461fef438d76cf91e | Hide overlay panel, used for avoiding user inputs while async function is running | {
highlighter.gameObject.SetActive(false);
overlayShade.DOFade(0f, backgroundFadeDuration);
overlayShade.raycastTarget = false;
primaryOverlay.gameObject.SetActive(false);
closeOverlayFlag = true;
} | 1 |
f55a245ce8019305725152332119fa2a | 7fa6a3b21436e170f682ff626ba44829 | Returns the resolved PrivacyPreferences entity. | class PrivacyConfigFactory
build() {
return null;
} | 0 |
78416ded9231d4634220780ce222ee1f | 3787200be692d47afa0f0be2fffbef7c | funkcija za otkazivanje rezervacije | string linija;
ofstream izlaz("rezervacije.txt");
if(izlaz.is_open()){
izlaz<<"Kod\tBroj sobe\tUsername\tDatum prijave\tDatum odjave\tStanje"<<endl;
for(int i = 0; i<br_rezervacija; i++){
if(i == pozicija){
izlaz << "obrisano" << endl;
}
else{
izlaz<<niz[i].kod<<"\t"<<niz[i].broj_sobe<<"\t\t"... | 1 |
57ca011e9ec52a5ded8b654dca9b6902 | 947be6fcd1d3a31bc2d18266346c2648 | Gets the total of static pages. If static pages are not loaded, this function will load them. | class DataProvider
public function getStaticPages()
{
$static = [];
$static[] = $this->getPage('home', 'daily', '1.0');
$static[] = $this->getPage('wiki', 'monthly', '0.7');
$static[] = $this->getPage('users.index', 'weekly', '0.8');
$static[] = $this->getPage('about', 'month... | 0 |
c4d2b73a808ab6f6f2dab98e2484619c | dc211618d44be1d9a75d32f814a6e590 | Two-line element set | class LineElem(Elem):
def __init__(self, name):
self.name = name
self._elems = []
self._maxelems = 2
self.res = 0.005
self.reac = 0.02
self.charg = 0.1
self.tap = 1
self.phase = 0
self.pqflow = None | 0 |
b83001f3fc49df352a7c910e18dd7b8f | d205873a796630d310ba4da2d0235812 | Print a chastisement for an invalid guess. | wrongMessage = random.randint(1, 4)
if wrongMessage == 1:
print("Nope. Tries: ", numberOfTries)
elif wrongMessage == 2:
print("No dice. Tries: ", numberOfTries)
elif wrongMessage == 3:
print("You seem to be bad at this. Tries: ", numberOfTries)
elif wrongMessage == 4:
... | 1 |
e1ee00dbd9a2cce2a80c05810627ec33 | 35adf15820a8aca5e38d48b564a883d4 | 删除裁剪和luban压缩的文件 | public class ImageUtils
public static void deleteCacheDirImgFile() {
File compressDir = new File(getCacheDir() + File.separator + "picture_cache");
File lubanDir = new File(getCacheDir() + File.separator + "luban_disk_cache");
if (compressDir.exists()) {
File[] files = compressDir.li... | 1 |
0818640267c6027bb37a0a51ef620804 | 32b4db3e8ceed9d5f4c7d04b0a6fc6a8 | ========================================= USER ========================================= | twitter_user = api.get_user(search_terms)
if twitter_user:
st.write("twitter_user id: ", twitter_user.id)
st.write(twitter_user.name)
st.write("twitter_user name: ", twitter_user.name)
st.write("twitter_user screen name: ", twitter_user.screen_name)
... | 1 |
3556529d26e66d90cfb5345fd8e7925a | 632b64565bd9000aa5f5821f8be7eadd | Функция возвращает список брендов отсортированый по алфавиту из конкретной категории | $query = "(SELECT goods_id, name, img, anons, price, hits, new, sale
FROM goods
WHERE goods_brandid = $category AND visible='1')
UNION
(SELECT goods_id, name, img, anons, price, hits, new, sale
FROM goods
... | 0 |
81f86068cc0d910164bb5a6fb85142a6 | 96e34cf9b99ea739c1e40c9fad5362ce | Apply filter to dictionary keys maintaining correspondence. | def filter_dicts_keys(dicts: list[dict], keys: list[str]) -> list[dict]:
if keys:
return [filter_dict_keys(adict, keys) for adict in dicts]
return dicts | 1 |
8626cf13184a774673dbb566a6a51cbe | 270df6b6c7b30c3004d1c974bc078945 | Generate the set of HTML options tag for the select list containing the
set of selected dimensions. | public class SelectHtmlFieldTag extends AbstractHtmlTag
public String generateFieldHTML() throws BaseException {
return getHtmlInput(getOptionHtml());
} | 0 |
4ac856722cad6c231f983c93f2b51ffd | a1b03699714dd48e79b531c7477753d7 | 根据uid 获得在线session | public String getActiveSessions(String uid); | 1 |
2f28bc73db67eab7910bb56f8d2bbdd9 | 8dc83a53e9d8758aa4150e06209dafc7 | 去激活Active Directory用户 | namespace ActiveDirectory
public class ActiveDirectory
public bool DisableUserAccount(string distinguishedName)
{
try
{
using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain, _domainName))
{
using (UserPrincipal up =... | 1 |
7850aace435244c1c6cc177a51f61037 | b0595191032152a591f3a474db6ecec5 | 当页面加载完毕时 给H5的加入购物车按钮添加点击事件 | var _this = this;
this.oCart.click(function(){
if(document.cookie){
location.href = "cart.html?userName=" + _this.userName;
}else{
alert("登录后才可以进入购物车");
location.href="login.html";
}
});
} | 0 |
5a9243a11c511c1fb8fc51a94e2a57b2 | 30acbab414352eadbc280b2432efbe45 | Convert all span labels to uppercase to normalize | Map<String, Set<String>> labelSpanList = new HashMap<>();
for (String label : this.labelList) {
if (! inputTuple.getSchema().containsAttribute(label)) {
throw new DataflowException("label " + label + " does not exist");
}
ListField<Span> spanListField ... | 0 |
9cc93de308076bcf0ec8d8f78fda2cfe | 200ac1d105057bb52bf27947e25e6fd2 | 棋譜ファイルの読み込みを行います。 | {
try
{
this.reader = reader;
this.currentLines = null;
this.currentLineIndex = 0;
this.lineNumber = 0;
this.header = new KifuHeader();
this.startBoard = null;
this.board = nul... | 1 |
d3f7c5e2f9c50f83ed8ac43b0feeca8a | 960dcb11d3d04c126d37017ff3e28f06 | 重置RadioButton的图片的大小 | public class MainActivity extends BaseAppCompatActivity implements RadioGroup.OnCheckedChangeListener,View.OnClickListener{
private void initRadioButtonSize() {
Drawable drawable_1 = getResources().getDrawable(R.drawable.bg_rb1);
drawable_1.setBounds(0, 0, MyTools.dip2px(this, 25), MyTools.dip2px(this, ... | 1 |
c92a40602b6e6baace6bb79aef4630cd | 740282da4196e3190ef9b39e8ae998b7 | Returns the meta object for the attribute '{@link org.abchip.mimo.context.MessageDescription#getSeverity <em>Severity</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fieldError")
public class FieldError
public Severity getSeverity() {
return severity;
} | 0 |
9db9e2597b1a7d369a2c96085c85deae | 0373420c8820fcb5b5f541309f511018 | second pass,返回频繁2项集 | freq_items_classify = classify_freq_items(freq_items)
max_freq_items_list = []
close_freq_items_list = []
for k in range(1,len(freq_items_classify)):
for k_itemset in freq_items_classify[k].keys():
check_max = 0
check_close = 0
for k_plus1_itemset in f... | 0 |
b08455fc2e7206ecfebbb6a4767e74bd | 6fb2991be8450f5ae42bba6067ef8f62 | 获取患者签名 | public class HouseKeeperService
@RpcService
public Map<String, Object> getPatientSignInfo(String mpiId) {
Assert.hasLength(mpiId,"getPatientSignInfo mpiId is null");
Map<String, Object> backMap = new HashMap<>();
boolean isSign = false;
List<Map<String, Object>> signInfo = getDoctors... | 1 |
9182d637ea113c92bd861b95fa598478 | 852ef3fbf562a749d869ffe750246de7 | Render an OpenId response to my response, or bail and render an HTML
error message if we can't. | if not response:
logging.warning("Missing OpenID response.")
callback(None)
return
elif response.error or "is_value:true" not in response.body:
logging.warning("Invalid OpenID response (%s): %r",
str(response.status) + response.... | 0 |
3a202fa11867c83ae7bcb6517bfd021d | 95f5ec31603b1fbcc698ce08ce709919 | Realiza la búsqueda avanzada de personas mediante varios campos. | class personaDAOExt extends nuevapersonaDAO{
public function search($text){
$sql = 'SELECT per_id, per_cedula, per_nombres, per_apellidos, '
. 'per_genero, per_fenacimiento, per_edad, per_lugarnacimiento,per_nacionalidad,per_lugarresidencia,per_notelefono, '
. 'per_direccionresidencia, p... | 0 |
117436b1b3421056200773b44d110f59 | ea9285f1e4943c6f629a443df9e4d018 | 5.문자열을 숫자로 변환하기 | int solution(const char* s) {
return atoi(s);
} | 1 |
c7e428cc699cacd1898a9e5c3ee46e04 | c24700442d66192f86dfb2ac9f2cf477 | 页面刷新代码 | function myRefresh()
{
window.location.reload();
} | 1 |
9262fcae73b946a14606dfe1f670a065 | f87c2b06c7e90841bdbfac0b376ba4b8 | The method here takes the dictionary produced in
the other method "search_query" and adds each
entry to a priority queue. | class WebpagePriorityQueue:
#contsructor that takes in query and a webPageIndexList
def calculatePriority(self):
for webPage in self.maxHeap:
webPage.priority = calculate(self.query, webPage) | 0 |
66fc47ea7f72994f18bab3963cd2da48 | edef3a43a8fd511260d55eb0d9dfa5a8 | <p>
Este método contatena o protocolo e o host do webservice do controle de acesso. <br/>
</p> | private String appendProtocolIfNotExists(ServerObject serverObject) {
String serverUrl = serverObject.getUrl();
if (serverUrl.indexOf("://") > 0) {
serverUrl = serverUrl.substring(serverUrl.indexOf("://") + 3);
}
if (!(serverUrl.startsWith(PROTOCOL_HTTP) || serverUrl.star... | 1 |
7267c08032093204bd81e95d63f51b11 | 58e88abd0cbd3587814c427eaf716b0e | Get the maximum value that can be passed to setPlaybackSpeed | {
double _Speed_Slow0_5_To_Normal1_To_Fast8 = 1.0;
if (p_WindowsMediaPlayer != null)
{
_Speed_Slow0_5_To_Normal1_To_Fast8 = p_WindowsMediaPlayer.settings.rate;
}
return _Speed_Slow0_5_To_Normal1_To_Fast8;
} | 0 |
9a7de9ec262e456fdd1546d72870c59a | 1bdb28afd7513731234c30f4e7a1e701 | 根据表达式数组 获取列名数组 | $result = '';
if(is_array($columns)){
foreach($columns as $table => $cols){
$cols = is_string($cols) ? explode(',',$cols) : $cols ;
if(!is_array($cols)){
throw new \InvalidArgumentException('$columns参数类型或格式错误');
}
... | 1 |
ac35920a8a55786edbddeef6a33f58af | badee5f86bc649c87ed83e5ce838beca | Function to perform IP function and return pointer to the result. | int get_ip(const state_t *state) {
return state->ip;
} | 0 |
170de58ebbe6c182212d7e161ac1a1af | 46eba7b1917db150267c673d64021048 | 主管部门区域列表 | @GET("superadmin/listarea")
Observable<HttpResult<JsonArray>> getListArea(); | 1 |
7fe6b7c97855bc8a451d9f9ec57c0034 | 6c4359dfc9d0ec176e2b65032461c0a9 | 在指定目录下生成文件名,并自动生成一个空文件用于占位 | function makeFile($fileName)
{
$fileName = createFile($fileName);
$dir = dirname($fileName);
if (!makeDir($dir)){
return false;
}
touch($fileName);
return $fileName;
} | 1 |
b4b8ceaf9bf5e565fd87058d7c5f2939 | ac725c10179f0d7229e1cc78340f23a2 | Returns vcards that match the criteria (key/value pairs)
sent in JSON format. | class IVCard(Interface):
def get_vcard(self): | 0 |
87bcc7952ac700478b9896fc764bf8e5 | 56c12c69215269a97eac6738a75c9231 | 立方根を求める | x = ToNumber(x);
return sign(x) * $$Pow(abs(x), 1 / 3);
} | 1 |
31a09ffac2e69f1ef0fe1aaaf419ebab | 1be5c25fc7acf5e40498ed0b14e6084b | Set Prefetch progress in percentage | public function setProgress($progress); | 1 |
cb790285cce071a423ad5743898fc36a | 575f84a48fb4ab2ddcab7c3475eb994c | No-op for leave timer; can add a print statement for diagnostics | namespace CK.Monitoring.Handlers
public class Console : IGrandOutputHandler
public void OnTimer( IActivityMonitor m, TimeSpan timerSpan )
{
} | 1 |
42ef9906395d7366a397043d52d61f1d | 938ee13bdbf3a7f4555b33c230d085d9 | Добавляет заданое количество часов | namespace UniTimetable
public class TimeLength : IComparable<TimeLength>
public void AddHours(int hours)
{
Hours_ += hours;
} | 1 |
16e44591449c38435c95695d4c115261 | 62411bbce80df11c8d4a942f2aec38bc | called internally to update info about the stream from the server | class StreamParser:
def update_status(self):
if self.twitch_chans:
for chan in self.twitch_chans:
self.channel = chan[1:]
self.get_stream_info()
self.set_topic()
else:
pass | 1 |
ab2d702d043a044fb4d5d4aa795fecdc | ed3a6c59e0c3add46f393bb8ffed90f1 | read cross section from GROUPR format file | GrpIndex g;
int cnt=0, lyr;
char *p;
FILE *fp;
MyFileName = SXW.f_roots;
fp = OpenFile(MyFileName,"r");
while( GetALine(fp, inbuf) ) {
p = strtok(inbuf," \t");
if ( (g=RGroup_Name2Index(p)) <0 ) {
LogError(logfp, LOGFATAL, "%s: Invalid group name (%s) found.",
MyFileName, p);
... | 1 |
3fbfe6919b200d6071bc1d0f72a5468e | 4dbd26608e4da20b4a91bff203fe478a | 如果没有传入goods_id,只有sku_id,要先查询出来goods_id | class shop_goods_sku extends main
public function get_data($data = array())
{
$sku_ids = array();
foreach ($data as $v) {
if (!in_array($v['shop_goods_sku_id'], $sku_ids) && $v['shop_goods_sku_id']) {
$sku_ids[] = $v['shop_goods_sku_id'];
}
}
i... | 0 |
beece291e9d65015079a86dc0ee0bec3 | f8766fceb413802fd4b08f7b75fa1790 | 网点供氧模板列表 | namespace YiQiWorkFlow.Web.Client.Controllers
public class PcController : Controller
public ActionResult PcPutoutDetailList()
{
return View();
} | 0 |
c46d4682e406e651ab19999a2c7c8d02 | dcc75a01a25fd336ee5983593f6b3613 | Compute encryption key when AES is negotiated | unsigned char *nonce_R, unsigned short nonce_R_len,
unsigned char *val, sa_list *node)
{
hmac_CTX context;
unsigned char digest[SHA_LENGTH];
int hashlen;
if(sa->hash_alg == HASH_MD5){
hashlen = MD5_LEN;
} else {
hashlen = SHA_LENGTH;
}
sa->Inithmac(&context, sa->skeyid_e, sa->skeyid_... | 0 |
a871bf637dbe39343ec24cd0626231ba | 25465bcf7dd499f47164b481469069ed | 合并类型声明的分发函数 | if self.current_token.tokentype == token.STRUCTTYPE:
self.__sdecl()
elif self.current_token.tokentype == token.FUN:
self.__fdecl()
else:
self.__bstmt() | 1 |
218bb9889dee40bb92dead0ec43c8966 | 5755da623a082a3daa1cd700e29e8bcf | Empty Shopping Cart and reset session. | class Mp3music_Api_Shop extends Core_Api_Abstract
public function clearCart()
{
Mp3music_Api_Shop::initCartShopSession();
} | 1 |
e316fca351460e43050aa8d30415dda1 | 0ce6412086efc60dbe940e5ca705776d | Returns the actual value (a copy) as bytes. | impl BytesId
pub fn as_bytes(self) -> &'static [u8] {
&*self.get()
} | 0 |
fbde04dfff7e9dae9227d7e152ace536 | bf74d0496a2d04c852c4d3f52dabb5a0 | Testataan levyn nimen muokkausta | public class UpdateLevelNameController implements DocumentListener
@Override
public void insertUpdate(DocumentEvent arg0) {
changeLvlNameTitle();
} | 1 |
cbf65a7715a628fd0d3cfaf5eb43432a | 65168d21eb2896aa9aad68b5f5a96f17 | {EV_WIDGET_IMP}.on_set_focus | void F1928_22567 (EIF_REFERENCE Current, EIF_TYPED_VALUE arg1x, EIF_TYPED_VALUE arg2x)
{
GTCX
char *l_feature_name = "on_wm_command";
RTEX;
EIF_INTEGER_32 loc1 = (EIF_INTEGER_32) 0;
EIF_POINTER loc2 = (EIF_POINTER) 0;
EIF_INTEGER_32 loc3 = (EIF_INTEGER_32) 0;
EIF_REFERENCE loc4 = (EIF_REFERENCE) 0;
#define arg1 ... | 0 |
257163b583d5ac529d990240f35fa259 | 14f8b1fcf122453060c9ec3d5a53bade | Check if the user already has an incomplete data request of the same type. | def check_existing_adoption_request(usr_id: str):
existing_request = db_op.get_adoption_request(usr_id)
return existing_request | 0 |
e4ae837fd4e9b487fad90f8a5dbd089b | f9bbd73b8347d54e50023e45a9b4040b | generates or updates the docset for this crate. | class ApiDoc(HunabkuPluginBase):
def update(self):
if self.valid_apikey():
self.hunabku.generate_doc()
response = self.app.response_class(
response=self.json.dumps({'status': 'apidoc updated'}),
status=200,
mimetype='application/json'
... | 1 |
8be004d12d6c75a0efd176f8388cda0b | 220b43cd94b15dc538e056569db61c01 | Get forward matching keys in a remote database object. | class aafwEntityStoreBase extends aafwObject
public function getKeys ( $obj ) {
$old_keys = array ();
foreach ( $this->_Catalog as $column => $column_info ){
if ( in_array ( $column, $this->_KeyList ) ) {
if ( is_array ( $obj ) ) $value = $obj[$column];
elseif ( $obj instanceOf... | 0 |
e1922aaf2e1e3bb6a385a971a03ed930 | 42f9d81566084f3e9c2698d2334f6562 | Test checking bearer token when token is not provided. | {
$this->session->expects($this->any())->method('get')->willReturn('foo');
$this->request->expects($this->any())->method('getInput')->willReturn(null);
$mockHeaders = $this->createMock(RequestHeaders::class);
$mockHeaders->expects($this->exactly(2))->method('get')->willReturnOnConsec... | 1 |
a2f3f6437e5beb4fca25741ff5500dc9 | 04e2487e935276a8d8459f05b1fde630 | 求最长公共子序列(可以不连续) | let la = stra.length;
let lb = strb.length;
let arr = new Array(la+1);
for(let i=0; i<arr.length; i++){
arr[i] = new Array(lb+1).fill(0);
}
let flag = new Array(la+1);
for(let i=0; i<flag.length; i++){
flag[i] = new Array(lb+1).fill(0);
}
for(let i=1; i<=la; i++){
... | 1 |
2a496c6e09f0c36a1d1f04fd4214953f | 497a9f3568896507fc2cb8682ff36250 | Initializes the state manager, loads game states, and sets the initial state | namespace Pandemic
public class Game1 : Microsoft.Xna.Framework.Game
protected override void Initialize()
{
state = GameState.init;
BindKeyboardEventListener(Keys.Escape, new keyboardEventListener(this.Exit));
mainMenu = new MainMenu(this);
gameOver = new Game... | 1 |
9df873d002de5164b099db96e7d429d5 | e10f73f895025ec492cc5374d6d16d45 | 生成GridView中的查询条件 | {
StringBuilder sb = new StringBuilder();
List<SqlParam> IList_param = new List<SqlParam>();
if (!string.IsNullOrEmpty(txtTel.Value))
{
sb.Append(" and b.BindPhone like @BindPhone ");
IList_param.Add(new SqlParam("@BindPhone", '%' +... | 1 |
e4e36c24be8dea179a9495a48e735812 | 607d8e79ec56df41f0aa636d19ad45da | Проверяет что файл резервной копии с таким именем уже существует | {
if (!empty($oldNameFile) && $oldNameFile != null) {
return file_exists($this->getFolder() . $oldNameFile);
}
} | 1 |
44c5c8cc25ef20679c07cb9b14baf0a5 | 94336efdff51595af8872fc2c3524267 | 添加该商铺中需同步白名单的盒子 | String catalogId = GenerateCodeFactory.getShopCatalogId();
JSONObject businessShopCatalog = data.getJSONObject("businessShopCatalog");
businessShopCatalog.put("catalogId",catalogId);
} | 0 |
c3c16f993214eab0497bde76b81b0d1f | 5e0f2eef6e3917994f873f4581acd867 | adjust relative base offset | void CMemLoadDll::DoRelocation( void *NewBase)
{
DWORD Delta = (DWORD)NewBase - pNTHeader->OptionalHeader.ImageBase;
PIMAGE_BASE_RELOCATION pLoc = (PIMAGE_BASE_RELOCATION)((unsigned long)NewBase
+ pNTHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress);
while((p... | 1 |
7eba1857548721b7c7906feafbe188de | 50f0f8d1b5a6f4bf5ec3d46837ab25be | source: https://github.com/andyzeng/tsdf-fusion-python
compute a mesh from the voxel volume using marching cubes | def voxel2mesh(voxels, surface_view):
cube_verts = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0],
[1, 1, 1]]
cube_faces = [[0, 1, 2], [1, 3, 2], [2, 3, 6], [3, 7, 6], [0, 2, 6], [0, 6, 4], [0, 5, 1],
[0, 4, 5], [6, 7, 5], [6, 5, 4], [1, 7, 3],... | 0 |
0469bc1ed472d944baf1a14bb1bf2cbb | 48a825c1499eb0f48e31306f22720d7f | Ein neuer nebenläufiger Prozess (Job) wird registiert. Wenn erfolgreich, dann liefert die
Funktion eine eindeutige ID für den Job zurück | {
int id = jobId++;
jobs.Add(id, item);
return id;
} | 1 |
f83db782f7f0fa9cf177ee96fe88bde7 | e226ea2da2e760364cf5650430662f70 | ========================== interpretation ======================== | class beautifulGuide{
private function interpretLine( $line, $i ){
try{
if( startsWith( $line, "next" ) ){
$this->interpretNEXT();
} else if( ($l=trim( $line )) == "***" || $l == "---" || $l == "___" ){
$this->verticalSep();
} else if( startsWith( $line, ">" ) ){
$this->interpretBlockQuote( subst... | 1 |
363a09dd15577921500a897a7d3104bc | fb22742a93a38c28d6f3796af805cd41 | splits example between two cards | self.first_half = []
self.second_half = []
for i in 0..5
if list.include?(i.to_s)
self.first_half << self.dealt_hands[i]
else
self.second_half << self.dealt_hands[i]
end
end
end | 0 |
96f2b3c6ac32ec6f4fccd6dd96304bbf | 6201b4a192d027dce7289db2cc75ad22 | POST pass-through for get action | public class ActionManager extends HttpServlet
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
this.doPost(request, response);
} | 1 |
7485c7d0c3051807bcfb15616b22f1c9 | dd4a672af614e05ed513b5c450fdab96 | ATUALIZA A ORDEM DE UMA FASE DO SERVICO | void atualizarFaseDoador(Long idDoador); | 0 |
c5ac78fc225f64d6e4ced333c442d038 | 622bbb86a20464c2aacca28a925290fb | Sets the value of the expanded property.
{@link Boolean } | if (this._$expanded === expanded) {
return;
}
this._$expanded = expanded;
if (!silent) {
this._notifyItemChangeToOwner('expanded');
}
} | 1 |
fc9ef3fc0e8408e527ca9842c1eac74e | 44f47cba7d1f32274287d34b767e2b5d | Tries to use external storage, if not available then fallback to intenal. | public void create() {
Gdx.files.isExternalStorageAvailable();
Gdx.files.isLocalStorageAvailable();
texture = new Texture(Gdx.files.internal("texture/player.png"));
FileHandle fileHandle = Gdx.files.local("texture/player.png");
fileHandle = Gdx.files.external("texture/player.... | 0 |
ed7a5a27d43eac694e2c6e0cfadd306b | 8706cdf3d239e71ddb6024c878181c33 | Sets the pressure of water pump | void WaterSource::SetPressureMeter(byte PressureMeter)
{
m_PressureMeter = PressureMeter;
} | 0 |
47558ebf3e51a77fcc44111587527b42 | ec6e49cbbeefc9f639e817e3b1c30ec4 | 難易度と最低文字数から適当な文字列を生み出す関数 | public static class WordsResource{
public static string GetWord(Difficulty difficulty) {
int min = 0;
int max = 0;
switch (difficulty) {
case Difficulty.Easy: min = 2; max = 6; break;
case Difficulty.Medium: min = 7; max = 11; break;
case Difficulty.Hard: min ... | 1 |
60c32ac20e9709bf367a7ac9d00554aa | c93a52e6435fe764e4009625e5feecfa | Scroll to the user's current location upon successfully receiving a valid fix | namespace ActueelNS.Views
public partial class MapPage : ViewBase
private async void OnMe(object sender, EventArgs e)
{
await this.ShowUserLocation();
if (this.UserLocationMarker?.GeoCoordinate != null)
this.Map.SetView(this.UserLocationMarker.GeoCoordinate, 16);
} | 1 |
7223d982c96a57d28653de5c79d7a0d9 | 629899ceccb0698322296ba75a7c511c | Returns the instance of the object implementing this interface. | class EnclosingSimplexAlgorithmImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
def getImplementation(self, *args):
return _geom.EnclosingSimplexAlgorithmImplementationTypedInterfaceObject_getImplementation(self, *args) | 1 |
c64b3b827c3ab3bf1d09e7336981b26f | c03c2435884285c10f8284f1a0daa3d6 | 生成不重复的数 | function noRepeat(max, min, n) {
var arrE = [];
while(arrE.length != n) {
var num = Math.floor(Math.random() * (max - min + 1) + min);
var result = true;
for(var i = 0; i < arrE.length; i++) {
if(arrE[i] == num) {
result = false;
break;
}
}
if(result) {
arrE[i] = num;
}
}
return arrE;
} | 1 |
04121e80c36eb857558c5291212e39bc | 49a7267c6d869ec6f501d9791d45f12b | 회원과 팀을 조회하면서 , 팀 이름이 teamA인 팀만 조인, 회원은 모두 조회 | public void theta_join() {
em.persist(new Member("teamA"));
em.persist(new Member("teamB"));
List<Member> result = queryFactory
.select(member)
.from(member, team)
.where(member.username.eq(team.name))
.fetch();
} | 0 |
34109acc1881c65ea04aee0271c37c39 | 98c07ff61945a26cadd2e116f21c96ba | 待审核家政人员总数 | public ResponseResult<Integer> countByDdshys() {
Integer all = htinfoService.count(EnumProcess.WAIT_ACCEPT_YS.getMessage());
return new ResponseResult<Integer>(SUCCESS, all);
} | 1 |
809e7677a2aa8f824c2b992055782ee1 | fa025ac9928349968e83749d1b93f5ae | @brief read a register in MPU6500 | {
uint8_t data;
sensor_i2c_master_send(MPU_I2C_PORT, MPU_ADDR, ®, 1, 1000);
aos_msleep(2);
sensor_i2c_master_recv(MPU_I2C_PORT, MPU_ADDR, &data, 1, 1000);
return data;
} | 1 |
2b53c1eef61073585144242949f59432 | 1f3d1cb43b0094b475f4f505901ea726 | Récupération des scripts du pied de page du site. | {
using (var writer = new HtmlTextWriter(helper.ViewContext.Writer))
{
var list = Get(helper, PORTAL_SCRIPT_KEY);
foreach (var item in list)
{
writer.Write(item);
}
}
return null;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.