query_id
string
corpus_id
string
query
string
code
string
label
int64
3e1a88a45403cb8720745005d3020180
1c6f111f2f7fc2db3e5ddaffbf4e6d65
Build an opaque "qual" object.
static inline char qual_to_char(unsigned q) { return (char)(q + (unsigned)'!'); }
0
d22302f5f2739a19f86ecdb83d2aa359
cb14ee7570baa0ed4732887e9dad8d63
Tells if there is a directory selected.
public class ChoiceDialog extends LightDialog implements ActionListener public boolean isDirectoriesOnly() { return fileSelectionMode == DialogOption.DIRECTORIES_ONLY; }
0
57ed8d063e261edc8f52f4184c8876e3
3df4e7682cea223886280d461d090ac9
Which customers come from London? Get a collection of those which do.
{ var customers = DataLoader.LoadCustomers(); var waCustomers = from customer in customers where customer.Region == "WA" select customer; PrintCustomerInformation(waCustomers); }
0
c2103c8f2dc1aecf391b4538384093d5
1875662369162507d2ffbdcb041de9f8
审核后,更新个人申请明细和名院申请表
public int updateTransaction1(Mtb29PersonalApply updatetb29Info, Mtb86FamousSectionApplyDetail mtb86UpdateInfo) throws Exception;
1
0fc6bf845221d28dd696c22a581261af
f2915b699394c9a958df98727d88c562
Initializes the vertex by settings its parent to itself and its rank to zero
def make_set(v): parent[v] = v rank[v] = 0
1
3d6607eab5d3248937b4607584af981a
bfda82a6f9a72b3d742050d1a7704df5
Mock everything so we have one target, and one rule to run, and make sure the values in the rule and blackbox data are set so that the rule will always fail and result in no winner being picked.
{ $data = $this->getMock('Blackbox_Data', array()); $data->expects($this->never())->method('__set'); $data->expects($this->never())->method('__unset'); $target_collection = $this->getMock('Blackbox_TargetCollection', array('isValid')); $target_collection->expects($this->once()) ->method('isValid') ->wi...
1
689df8768fbf2fa80c352880e3f4976b
b037d6c2c96f3fe49cd75e483ec35c9c
Razveljavimo zadnjo potezo in vrnemo igro na zadnje shranjeno stanje.
class Minimax(): def izracunaj_potezo(self, igra): self.igra = igra self.jaz = self.igra.na_potezi self.prekinitev = False self.poteza = None (poteza, vrednost) = self.minimax(self.globina, True) self.jaz = None self.igra = None if not self.prekinitev: time.sleep(2) self.poteza = poteza
0
36390b1d05e62c01b7cade8195e9f677
aaa028a7266d4c3ac9a56d705d380844
This function allows the player to attack the monster.
if self._armure is not None: if self._armure.defense < monster.strength: self.hp -= monster.strength - self._armure.defense self._armure.breakArmure(self) else: self.hp -= monster.strength
0
dc6b182aa17c2b7f0a21a31646c6739c
779b34562f31700706aa1fb10c91fc04
set data polling rate for sleepy end device
{ if ( argCnt >= 1 ) { int intervalSecs = atoi( argPtrs[ 0 ] ); if ( intervalSecs > 0 ) exchData->sIntervalSecs = intervalSecs; } }
1
daf42bef2c237615f4260574d0074b2c
1eb7ed334bad043cc734b631e86d9608
Find the name for a node that does not exist under the supplied parent.
$nodes = $this->findByParentAndNodeType($parentPath, $nodeTypeFilter, $workspace, $dimensions, $removedNodes); if ($nodes !== array()) { return reset($nodes); } return NULL; }
0
5077cbcd83552888db7ec3c8a6ce5a51
d62e6933cef0904c4b00df6f340253fb
Смена знака элементов массива
for (int i = 0; i < size(); i++) { array[i] = -array[i]; } }
1
cb5d430b00c0353fdd43aa3c60203a7a
5cab3f9ca4198531f78e656d5edafaa0
get probabilites of choosing each model
tot = 0.0 for word in model: tot += model[word] for word in model: prob_model[word] = model[word]/tot
1
27c0a5e0e287da72db17b0223c28f569
f810abc06a30e6c1aea5ec3acd4546ad
向上跳跃
public class AvatarBehaviour : MonoBehaviour, IAvatarBehaviour public void Up() { if (!jumping) { rigidbody.velocity = transform.TransformDirection(new Vector3(0, 12, 0)); jumping = true; } }
1
0c472e10932aadd6e8c2a5e49aa90e41
f3c834763c6576470517dafb45eeb381
Configures the casing behavior of JSON serialization to use camel case for property names, and optionally for dynamic types and dictionary keys.
namespace Memento.Shared.Extensions [UsedImplicitly] public static class Extensions [UsedImplicitly] public static void ConfigureDefaultOptions(this JsonSerializerOptions options) { options.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase)); options.DictionaryKeyPolicy = null; option...
1
993f59b00fc6d9afecd32c79ec0852cb
04f4e0bc3b2a097b6ee1996973535f2d
Convert an EPICS char waveform to a str.
def wfdbAnnotation(e): import wfdb mark = wfdb.annstr(int(e)) if mark in "NLRBAaJSVrFejnE/fQ?": if mark == 'N': mark = u'\u2022' return (mark, wfdb.anndesc(int(e))) return ('', '')
0
da36d07c15ac3bf977a9263ddd7992e8
4525ef347cc31143919da3539bf8aa6a
Sets Retrain Link register of root port device.
{ uint32_t tmpVal = 0; tmpVal = BL_RD_REG(HBN_BASE, HBN_SRAM); tmpVal = BL_CLR_REG_BIT(tmpVal, HBN_RETRAM_SLP); tmpVal = BL_SET_REG_BIT(tmpVal, HBN_RETRAM_RET); BL_WR_REG(HBN_BASE, HBN_SRAM, tmpVal); return SUCCESS; }
0
4bcdee147bea9c6aaab4aa3487ecf7a9
cf1c4709dea2d2481c5786804153a9ad
Returns the recurrence dates.
{ $this->eventAPI->schedule(); if (eventStore::$Recurring) { if ($this->repeatNoDays) return null; $dates = $this->eventAPI->makeRecurringSchedule(); } else { $dates[] = array('start' => eventStore::$startDateUTC, 'end' => eventStore::$endDateUTC); ...
1
37ef5903bbd8ab9aa1807e5df518987f
3f4205ec2c5ab722495efce0c42de45e
This adds a property descriptor for the Font Italic feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_JZUIElem_fontName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_JZUIElem_fontName_feature", "_UI_JZUIElem_type"),...
0
7713d309e170a6c697f12308bb3ad926
92a62fc0fe3f0fda7f5f6fcde6107ac8
Snippet Name: Add bootstrap classes for WP tables
function ssid_add() { add_action('admin_head', 'ssid_css'); add_filter('manage_posts_columns', 'ssid_column'); add_action('manage_posts_custom_column', 'ssid_value', 10, 2); add_filter('manage_pages_columns', 'ssid_column'); add_action('manage_pages_custom_column', 'ssid_value', 10, 2); add_filter('manage_media_c...
0
fa51afdef1bb7c13884d16acdd1f2bad
e66c55558c40aaaa3a0bc11b82331faa
Processes a command completion message from a SPU. Finishes any waiting PPU data transfers and runs all callbacks.
::csndrCheckIfCmdOutstanding(SQRecord *pSQRecord) { rowID cmdRowId; pCmdCompletionCallback_t cb; char *pResultData; void *pCmdData; cmdRowId = pSQRecord->cmdRowId; OUTSTANDING_CMD *pOutstandingCmd = NULL; csndrGetOutstandingCmd(&cmdRowId, &pOutstandingCmd); if (pOutstandingCmd) { cb = pOutstan...
1
7ee32f4dbbe8f2ea6d3cc6e6ce4dfefb
f85d7b32b3355ccd2944ebe6fcb745e4
! Returns true if object has a transformation that is different from the identity.
public class GameObj extends PoolItem implements IPositionable3D, IRotatable3D, IScalable3D, IMimic<GameObj> public boolean isDirty() { return mMoved || mRotated || mScaled; }
1
55d4c600a59d89d77fd518478ac9fe3d
3b86f06cb2288aee4adc83b1425c0e82
Add the Oracle contract address to the params' body before sending the job spec to Chainlink
class AcceptStakeByWorker extends StakeAndMintBase get _customSubmitTxParams() { const oThis = this; return { tokenId: oThis.tokenId, pendingTransactionKind: pendingTransactionConstants.acceptStakeKind }; }
0
64759e57f5569a192ccd2b2fc711e97d
94f269b31afdf77282b9e57443c24f9e
keep trying to suspend threads, until no new threads are discovered.
void VG_(reap_threads)(ThreadId self) { while (!i_am_the_only_thread()) { VG_(vg_yield)(); VG_(poll_signals)(self); } vg_assert(i_am_the_only_thread()); }
1
038d5c88dc7c1f8bfbe746535c84ac3e
cca669847ece08f3328b06968292be4e
Check if item already exists in Alma, based on barcode This is a little superfluous - Alma won't let us create two items with the same barcode.
def isBarcodeUsed(barcode): connection = sqlite3.connect(DATABASE) c = connection.cursor() c.execute('SELECT 1 FROM items WHERE BARCODE = ? LIMIT 1', (barcode,)) tempBarcode = c.fetchall() return len(tempBarcode) != 0
1
2053aa3e6789b9fda473ce6bf0e8d311
0b77d6ee186349b8f899401877bddc4c
function that prints the doubly linked list both forward and backward
Node *temp = head; if (temp != NULL) { while(temp->next != NULL) temp = temp->next; while(temp->prev != NULL) temp = temp->prev; } while(temp != NULL) { cout << temp->data << ' '; temp = temp->next; } cout << endl; }
0
d05c4976b99b94c5ecb72233ca931865
e5df03380673803c49a21247fc0a5eaa
前序遍历以node为根的二分搜索树,递归算法;
public class BSTree<T extends Comparable<T>> private void preOrder(BSTNode<T> node){ if (node ==null){ return; } preOrder(node.left); preOrder(node.right); System.out.println(node); }
0
49cc20602d2f8188c6ec581dbbe361b3
8328d7b9ef05a073c97eeb0cd446bcb9
查询物业公司信息
return request({ url: '/company/query/findTenantCompany', method: 'get', params: data }) }
1
70ff857c1f837fbbc9f3f1fe00e5f0de
f6baa86397e64857f311cf3e81331236
销毁所有子页面
public class HorizontalPageView extends HorizontalScrollView public void removeAllPages() { if (mPageCount > 0) { mContainer.removeAllViews(); } }
1
f1052aa7ef893db7b75ceeb8a60009ba
75f5a30784a4c085f0343017e849bc1a
Called when the Contextual Action Bar is destroyed.
public class ActionBarAdvisor public void dispose() { disposeActions(); }
1
cd54a9600acf2fc0d6510d1395930cd0
f67e02dfb83f078dcb53b7c4d803ff97
Test Multiple Relationship import for Individuals.
http, citizen_ivan_sample, citizen_sergei_sample ): citizen_ivan_sample["relatives"][:] = [citizen_sergei_sample["citizen_id"]] citizen_sergei_sample["relatives"][:] = [] data = {"citizens": [citizen_ivan_sample, citizen_sergei_sample]} rv = await http.post("/imports", json=data) assert rv.statu...
1
dc300c2c06d82bd9db90cf0eea3c8ae2
0fb81e23ee451c2d326dc4e3056bf76e
Check if a cursor is a statement
abstract class Base public function isCursor($connection, $result) { return ($result !== true); }
0
f8d2dc3002caebc0551f4badbfd113fd
ebf4192f2d796f5d919d38494aa919ee
Declare button with sandard hight and width
void ButtonComponent::resized() { _label->setBounds(0,0,150,24); }
0
f8b0cd0e9839a4e859edbb864a553292
025b4d36c1392b48d1ea84ff90be98f4
移除主题关联商品
class lepai_admin_goodsModel extends Model public function upGoodsTwo($id){ $data['G_Tid'] = "0"; $this->table('lepai_admin_goods')->where(array('G_Id'=>$id))->update($data); $this->table('lepai_admin_theme_do')->where(array('T_Gid'=>$id))->delete(); }
1
3347a9b9ab9e089328801ce80869d40a
0a26c6f7a7d30a8847302fb7b100b90b
Checks that the given NMEA sentence has a valid checksum.
def checksum(s): ss = s.find('$') if ss < 0: raise FormatError("Start of sentence ($) not found") se = s.find('*') if se < 0: verify = False sc = s[ss+1:] else: verify = s[se:] sc = s[ss+1:se] checksum = 0 for c in sc: checksum ^= ord(c) ch...
1
927c4aeaed43eb40c5211a78fd0c03a9
47014814d085ec6b98798423d491eb5d
Formats the inline block according to type (script/style) indentation, and inline the asset file.
if (!fs.existsSync(asset)) { throw new Error(util.format('processhtml: File "%s" does not exists.', asset)); } var fileContent = fs.readFileSync(asset, 'utf8').toString(), template = 'INDENT<TYPE>\n' + 'INDENT' + fileContent + '\n' + 'INDEN...
1
670475fae8a54f02cfb9bce2389aabbb
63a9498bb579100f1d000b9c041354a3
Use the compile-time `CARGO_MANIFEST_DIR`
fn get_cargo_and_rustc_paths() -> (PathBuf, PathBuf) { (PathBuf::from("cargo"), PathBuf::from("rustc")) }
0
e6da010271c472da745da8c5e9397d92
6980ccecfdafe1765eb109865b4cf044
Tanimoto係数を用いた類似性スコア
s = s.split(' ') t = t.split(' ') union = len(set(s).union(set(t))) intersection = len(set(s).intersection(set(t))) score = float(intersection)/union if score<alpha: score=0.0 return score
1
d2ef0192848de70502dfaa541f739f8e
3430ae00ec39e7b01c8c4efb2a4f0200
Il metodo permette di eliminare tutte le stringhe della lista
StringNode* curr = head; StringNode* next = head; while(curr != NULL) { next = curr->getNext(); delete curr; curr = next; } }
1
9a48d90e19468c45e7e02c626521ed01
cb69e6ec5189666f0477257d6b10f744
Set the value of the TYPE_NAME column.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ColumnsRecord extends TableRecordImpl<ColumnsRecord> public void setTypeName(String value) { setValue(15, value); }
1
baee76fd81c37a9f1706abd0778a06f0
3d51be3ad81f3f279e78553e89351b1c
Update a conda recipe to a given version.
root = get_root() new_version = version_string_to_int(new_version) old_version = version_string_to_int(old_version) if old_version else new_version - 1 tox_pattern = re.compile(br'\s+py[{,\d]*(?P<old_version>%d)' % old_version, re.MULTILINE) replacer = get_replacer(new_version) files_changed = 0...
0
a28f480133f2f9e39155cff3c521c439
48a64154287c5ae78c567eb94343b429
Sets the price of a certain beer.
public void setBeanBagPrice(String id, int priceInPence) throws InvalidPriceException, BeanBagIDNotRecognisedException, IllegalIDException { boolean recognised = false; ObjectArrayList[] objects = { available, reserved }; Checks.validId(id); if (priceInPence < 0) { ...
0
ebb4a2e030b5d35152775d7fe414c3b1
965403e2147b46cf25b1ac5651a34a40
弹出一个新窗口,展示商品详情,即商品详情页预览
public class ListDelegate extends SmartbroDelegate implements BaseQuickAdapter.RequestLoadMoreListener, ITimerListener, OnItemClickListener{ public void showProductDetail(long productId){ startWithPop(DetailDelegate.newInstance(productId)); }
1
83d9b2acbaabab3c623e6ea5ba37e23a
d019d331b046178c8f953c7b7c4145cd
功能:Jquery插件弹框并跳转,从XML中得到提示信息
{ if (empty($_GET['inajax'])) { if ($url == 'reload') $url = ''; showMessage($message . $extrajs, $url, 'html', $alert_type, 1, $time * 1000); } $message = str_replace("'", "\\'", strip_tags($message)); $paramjs = null; if ($url == 'reload') { $paramjs = 'window.location.relo...
1
abe47f5e0fdc7e16df36845867e10273
5179abb0b685bdce736851aeddce2568
Parses specified <code>boolean</code> parameter <code>"true"</code>; otherwise <code>false</code>
public final class Convert public static boolean parseBool(Object param) { return toBoolean(param); }
0
b4f905491b31d38be71680771f9113ba
deaef043f13308db2a66ec57c3cae46d
Obtain id of the last student to arrive
{ int result =0; String sql = "SELECT MAX( "+ Schedules.ID_LESSON+ ") AS x FROM " + Schedules.TABLE + ";"; try { preStatement = connection.prepareStatement(sql); ResultSet rs = preStatement.executeQuery(); if(rs.next()) { ...
0
a43251f75c01c499ea8259daae378c62
5cb3a2f5510ec87bb740a405d6b5f5b1
default case: unicolour
void Basic::icolor() { int32_t fc, bgc = 0; if (getParam(fc, 0, 255, I_NONE)) return; if (*cip == I_COMMA) { cip++; if (getParam(bgc, 0, 255, I_NONE)) return; if (*cip == I_COMMA) { ++cip; int32_t cc; if (getParam(cc, 0, 255, I_NONE)) return; sc0.setCursorColo...
1
aea159cc0cc33f3d28d4aad35fce1afe
87bd99f58dd1a98720fa48a82995c623
Creates a new Ant single result query manager.
defaultIndex, errorDescription, results, comments, images) { this._searchString = searchString; this._searchResult = searchResult; this._defaultIndex = defaultIndex; this._errorDescription = errorDescription; this._results = results; this._...
0
e4cd7df5425255611dea8f0215c6a2a0
3c4d63238538c4a8859bb10d0bd57db3
Adds money to bank
self.bank_capital = self.bank_capital + value_to_add if self.bank_capital < 0 : self.bank_capital = 0
1
5dfb45e498c27c46cf97237c624f0d9b
4724f486c300c973aec3d3f97ebddabb
****************CODICE RICHIESTA******************
class ricerca extends street function __construct() { parent::__construct(); $dbconn = $this->dammiConnessioneDB(); $this->aggiungiElemento($this->dammiArticoli($dbconn), "articoli", "XML"); $this->aggiungiElemento($this->dammiArgomenti($dbconn), "argomenti", "XML"); $this->aggiungiElemento($this->dammiComm...
1
2e34c7440e1451a79ccd4b0b0a692533
075c35f11b0acae7f7263954a23fa9b4
Remove the study linked to the trait, but add another study so that taggable_studies is not empty.
class TaggedTraitTagCountsByStudyTest(UserLoginTestCase): def test_count_does_not_include_archived_taggedtraits(self): self.tag = factories.TagFactory.create() study = StudyFactory.create() archived_tagged_trait = factories.TaggedTraitFactory.create( tag=self.tag, trait__source_datas...
0
93c38ef607a52bdc098e49fb7a0df7dd
92c8f8e3dce4ae85a198f73a23b8d082
根据PC_LEAVEID修改pc状态
static async upLeaveState(req, res) { let query = req.query; let result = await this.upLeaveStateMod(query.l_id, query.upState) res.send(result); }
1
69bfe804063f61289d3bc4c5498efcb7
49503dca619904be9b01f1791174febf
Calcular o produto de matrizes
class Matrix4 static multiply(m1, m2) { let aux = new Array(4); aux[0] = [0, 0, 0, 0]; aux[1] = [0, 0, 0, 0]; aux[2] = [0, 0, 0, 0]; aux[3] = [0, 0, 0, 0]; for (var i = 0; i < 4; i++) { for (var j = 0; j < 4; j++) { for (var k = 0; k < 4; k++) { aux[i][j] += m1.matriz[i][k] * m2.matriz[...
1
4406832b7d50c78570c7d07c29b392cd
12487571132b6ab04fb76eba96ae9019
Returns the result of interpreting the object as an instance of '<em>Referenceable By Xmadsl Variable</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public class BehaviourMMSwitch<T> extends Switch<T> public T caseVariable(Variable object) { return null; }
1
f227f9c03b51f696767ae01f3966f708
9aead5b9bf76448b88cd6b596d487e61
Set name of the redirect configuration that is unique within an Application Gateway.
Update withRedirectConfiguration(String name);
1
926edf045a3a4c452856c1dbddcd36d9
4a303d91c44edb05999ea33b9d2d1e9d
Return 0 if there are no changes
int GenericCopy::update() { return 0; }
1
519604e68b8f676b575b9d5569117fe2
800498f1e704b646491bd7f7a0e92930
判断int32数组内容是否一样
func IsSameUint32(data ...[]uint32) bool { count := len(data) if count < 2 { return false } length := len(data[0]) for i := 1; i < count; i++ { if len(data[i]) != length { return false } } for i := 0; i < length; i++ { first := data[0][i] for j := 1; j < count; j++ { if first != data[j][i] { ...
0
689f58f168d64f4649a76c8243d77ba0
5ac2806760650a9d3351e4312a9ed4a4
Converting packet string to numeric object - time_str: Packet string in iperf format (1M, 1m, 2K, 5T, 1000b, 12B, etc) - return: Packet object
coeficient = 0 try: if capString[-1] == "T": coeficient = 10**12 elif capString[-1] == "B": coeficient = 10**9 elif capString[-1] == "M": coeficient = 10**6 if capString[0].isdigit(): return int(float(capString[:-1]) * coeficient) ...
1
f2cc1a5b93035cf6d1f9399829304474
7166e5873ea9bd63d8823fdd7db15a50
网站登录页面
namespace Disappearwind.PortalSolution.PortalWeb.Controllers public class WebController : Controller public ActionResult Login() { return View(); }
1
76c2508bb63893d08208d618ac82796f
9c0cd644cfab7f59b500a61894f96169
Get hypervisor type.
@Nullable String getVimType();
0
2118ed881bf143a7309af96d5fcae2aa
c7a9ffedfd74b04d54b238bd2e3e5087
Test that we are redirected to the OIDC issuer if we lack auth data in the session
class TestAuthenticateWithCookie(TestCase): def test_no_auth_data(self): response = self.client.get('/auth') self.assertEqual(response.status_code, status.HTTP_200_OK)
0
fac8f30973e54cba041dfe9dbadab9bb
5b829169df190960d838ec73ccfe06c2
We must wrap around the array using a modulus because the 4th philosopher's fork to his right is the 0th philosopher's fork to his left
void state_pickup(void *state, int id){ forks_t *f = state; mutex_lock_perror(f->lock[id]); mutex_lock_perror(f->lock[(id + 1) % f->num_phil]); }
1
c4b1148c69b8e80a02737a341465c4e8
92374ba6cab410d27606f5f91714efdb
Convert datetime to string formatted as YYYY-MM-DD, per JSON Schema specs.
def d2str(dt): if dt is None: return None else: return dt.strftime("%Y-%m-%d")
1
a4639c7968ba06e1507b238aca0287c8
20ed9c9785151ea13ce8a3e3394ba56d
Model a DropDown Box web element
this.plugin = plugin; this.id = plugin.newDropDown(); this.text = ""; if(!x) { this.x = 0; } else { this.x = x; } if(!y) { this.y = 0; } else { this.y = y; } if(!width) { this.width = 0; } else { this.width = width; } if(!height) { this.height = 0; } else { this.height = height; } this.i...
1
fd4f63fcf1852ccc50dee5876b8e0e7d
98e593039f4943237ae5251c40ebfa2a
Create shared memory object and set its size to the size of our structure
int Laser::setupSharedMemory() { return 1; }
0
0e973acba5adf82c8e7f2b29b3138028
5b91f82c1dd4c6795f604d8986b16a27
获取当前年月,返回格式为:YYYY-mm
public class DateUtil public static String getCurrentYearMonth() { return getCurrentDate(YEAR_MONTH_FORMATTER); }
1
019e5e3e975cfa9b5e06ab7c497a5a9e
0970f0c551ffa5946f9af707455f4ae8
Returns the a pointer to the first voxel in a VoxelChunk
vector<PointNode*>* World::getChunk() const { return this->chunk; }
0
305d47145c44226955aa7b8d48efda36
25fbff4829e173f4e13fe07cce4e161a
문자열 반환 연습
{ char a = 'A'; printf("문자형 변수 a의 값과 저장되어 있는 문자는? \n아스키코드 : %d, 문자 : %c \n", a, a); return 0; }
0
b93adb95f1d482f6cbc2195ff31eb504
326abd698d4524c742abd2822c88e5b2
NAME DESCRIPTION Helper function to Get the Discovery state timer. RETURNS The Discovery state timer read from the corresponding config block section .
BYTE *pTlvData, BYTE *pResp ) { struct TmrTfTlv *lResp = &((struct QmiCbkImsSIPConfigInd *)pResp)->TTfTlv; enum eQCWWANError eRCode = eQCWWAN_ERR_NONE; ULONG lTemp = 0; eRCode = GetLong( pTlvData, &lTemp ); if( eRCode != eQCWWAN_ERR_NONE ) { return eRCode; ...
1
4d215301dddbc6775445353d1516a439
cbe316f188c7b6fa5155582537e2e561
Handles the Click event of the RotateRightToolStripButton control.
namespace ImageTools_GDI public partial class FrmTool : MetroFramework.Forms.MetroForm private void btnAdd_Click(object sender, EventArgs e) { if (tbRotate.Value >= 1800) return; tbRotate.Value++; }
0
d26caf22996a62cf4bb5b2ce53012554
feb71f3c0a960c1ee29517ce59d4193c
GetByDataUUID returns a pointer to labelmap data given a data UUID. Returns error if not found.
for key, val := range data { if key.Ptr.(Sdshdr).Buf == userKey.Ptr.(Sdshdr).Buf { return val } } return nil }
0
95924136d453b7d08c6aca6af1f02034
7d99e232393bd6328a52f9fdbbaedc76
Gets the customerId value for this ExtLetterRequestEntAttributesWrapper.
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CUSTOMERID$4, 0); if (target == null) { return null; ...
1
7591e8122349e7e7052c68bbca80017c
2b761821b28bd4df54c8767ee78ae633
Generates a resource name of ad group customizer type.
class BatchJobServiceGapicClient public static function campaignCustomizerName($customerId, $campaignId, $customizerAttributeId) { return self::getCampaignCustomizerNameTemplate()->render([ 'customer_id' => $customerId, 'campaign_id' => $campaignId, 'customizer_attribute_...
0
c7e7059032b1fd7c2493c4f62680ba7d
46828aae37922e1ed66257d81e54b78f
Najechanie kursorem myszy na kolumnę planszy.
wid = self.pile.get_focus().get_body() if wid == self.columns: self.active_tab.set_attr('body') self._w.mouse_event(size, event, button, x, y, focus) if wid == self.columns: self.active_tab.set_attr('body') self.columns.get_focus().set_attr('tab active...
1
a318cf0b3ad3d2ea2dc9240724066b19
32485121a7fc7c859c2de15c6c33d0f7
Return True iff config matches the expected format for a columnar table When exploring a new dataset, this function can be very useful for ensuring Use it as a kind of TDD: 1. As you begin a new notebook or script, write a line calling validate_columnar_table_config at the end. 2. When you run it, you'll get a list of ...
def valid_config(): return False
0
beca4d2c36acbac2052f9c0fc84b0008
bfbd1f3b1f78d04ab2ec3032e6ee64f1
@brief Returns the current 32 bit value of the us counter.
uint16_t TIM3_GetCounter(void) { uint16_t tmpcntr = 0; uint8_t tmpcntrl = 0, tmpcntrh = 0; tmpcntrh = TH3; tmpcntrl = TL3; tmpcntr = (uint16_t)(tmpcntrl); tmpcntr |= (uint16_t)((uint16_t)tmpcntrh << 8); return (uint16_t)tmpcntr; }
0
66f6ffa46c41af61da0ff699a0cb7e46
5c39379ac74f2250590df17cdbfa4a6e
Sets the driver implementation that is used to retrieve mapping metadata.
class EntityMap public function setDriver($driver) { $this->driver = $driver; }
1
f9065bb99dcb6c3e0e48985b66faab35
6c053251844e46b53da4fd6066964c3c
https://gist.github.com/demonixis/5188326
function array_merge_recursive_new() { $arrays = func_get_args(); $base = array_shift($arrays); foreach($arrays as $array) { reset($base); while(list($key, $value) = @each($array)) { if(is_array($value) && @is_array($base[$key])) { $base[$key] = array_merge_recursive_new($base[$key], $value)...
1
7e95c497fba9ab52dbe834e647cf57ec
7e6ab6f8a59a50b2926796813dfc9b64
Build an nRow x nCol matrix, in pointer-style. Allocate one contiguous array of floats with nRow*nCol elements. Then create a set of nRow pointers, each of which points to the next nCol elements.
float* allocate_matrix(float*** arr, int n, int m) { *arr = (float**) malloc(n * sizeof(float*)); float *arr_data; posix_memalign((void **) &arr_data, ALIGNMENT, n * m * sizeof(float)); for(int i=0; i<n; i++) (*arr)[i] = arr_data + i * m ; return arr_data; }
1
95ec4382d618d2fe99ea594f30080cd0
ca6a24634399aae38cb3cf4558601195
将值为x的新节点插入到带头结点的双向链表中指定节点*p之前
{ DListNode* cur = DLinkListSearchByLocation((*phead), x); DListNode* newNode = CreateByListNode(y); if (cur) { newNode->next = cur->next; newNode->prev = cur; cur->next->prev = newNode; cur->next = newNode; } else { printf("插入失败\n"); } }
0
c542c552f2049cc34e1a56d156028d5e
4d59194d8a25893d5097623984fd39e0
Test Circular references when a cell circular reference is multiple "steps" or cells away.
[ExpectedException(typeof(CircularException))] public void TestCircularDependency() { AbstractSpreadsheet spreadsheet = new Spreadsheet(); spreadsheet.SetContentsOfCell("A1", "1.2"); spreadsheet.SetContentsOfCell("A4", "=A1 + 2"); spreadsheet.SetCo...
1
5e8a278d299945fb269b56460e29be07
4f7cb46c28edb515ca056d2cf5f38cee
添加其他查询控件的方法
namespace CvnMrp.Publice.WinForm.UsrControls public partial class ChooseCtlTemplate : ButtonEdit public void AddOtherQueryControl(TextEdit txtEdit, string field) { if (this.Parm_dicOtherQuery.ContainsKey(txtEdit)) { return; } txtEdit.KeyDown +=...
1
2d5ce241afc9e1ea25a1cbb6719ca3ca
6bdd428febdbee49f4fabf584a1f05f2
Returns a new <see cref="LoadFileResult"/> with specified detailed error.
namespace RD_AAOW public class DiagramData public static string GetDataLoadError (DiagramDataInitResults Result, string FilePath) { if (Result == DiagramDataInitResults.Ok) return ""; string msg = Localization.GetText ("DataFileLoadError"); switch (Result) { case DiagramDataInitResults.NotInite...
0
394f32faf90c2e112688ce5f34f18677
f55e2a99a5e8286d261353096c15fa46
safely retrieve gtkobject from GUI
def maya_to_qt(maya_object): ptr = ( apiUI.MQtUtil.findControl(maya_object) or apiUI.MQtUtil.findLayout(maya_object) or apiUI.MQtUtil.findMenuItem(maya_object) ) if ptr is not None: return wrapinstance(long(ptr), QtCore.QObject)
0
d84b6f46da2e2dfa5f9e9f60e5907f79
87cb9db4d1abf63a2656aea4657119f1
排序快捷方式
class LimitPurchaseController extends BaseController public function sort(){ $this->validateWithAttribute([ 'id' => 'required|alpha_dash|size:12', 'order' => 'required|numeric', ], [ 'id' => '限时购id', 'order' => '排序位置', ]); $order_id =...
1
6cb00aed53d186d5620073a94c6c5503
0ec971966877b2664a44330cdac4e24b
Illustration of memory allocation and deallocation
printf("Hello, World!\n"); Mem_Init(80); printAll(freeList() -> first); void* ptr1 = Mem_Alloc(28); printf("\nptr 1= %p\n", ptr1); printf("############## Free list #############\n"); printAll(freeList() -> first); void* ptr2 = Mem_Alloc(7); printf("ptr 2= %p\n", ptr2); printf("##...
1
14e8c25770cac2d80a9280e739ea4f29
b6637a8f75122763d4be84a631163406
If and only if.
def iff(left, right): return (left.negate() | right) & (right.negate() | left)
1
d95de6be9f043eece112935b3685e78b
0bb565b772f84c8961d7020cb39dc568
调起系统拍照
public class FeedbackActivity extends BaseMvpAppCompatActivity<FeedbackPresenter> implements FeedbackView<BaseResponse> private void openSysCamera() { Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { file = createOriImageFile(); } catch (IOException e) { ...
1
b91cb614a545acc57d37a330a02c98a0
0621a9f0f241e2448c465efcd3b6cbd9
Converts list of decimal octets represeting mac address to string.
public class ARPAttack public static String macToS(byte[] mac) { StringBuilder s = new StringBuilder(); for (byte b : mac) { s.append(String.format("%02x", b & 0xff) + "-"); } return s.deleteCharAt(s.length() - 1).toString(); }
1
c81ef9a304e92d1c0f47ff6f253c7bc5
c9a3230c029d66a1f5d3e8776a8c9027
Returns the adjacency matrix of the graph (with float datatype). Each entry (i, j) is 1. if i and j are connected and 0. otherwise. The matrix is allocated and calculated by the first call to this function. In the following ones, the stored result is returned. A new allocation/calculation is done if recalc == True. The...
class WeightedGraph(weighted_digraph.WeightedDigraph, graph.Graph): def adjacency_matrix(self): return self.adjacency_matrix
0
45b8cb8ab386e9f243f85a6c51df5ccb
f25cb07e908b075b964a1e25491f92ed
当且仅当二者都为空才跳过验证
class RegisterForm(Form): def clean(self): p1 = self.cleaned_data.get('password') p2 = self.cleaned_data.get('password2') if p1 == p2: return None self.add_error('password2', ValidationError('密码不一致'))
0
d0d4b02807e0d57f340312061e112e82
35b5bf2549881c2ff369bc8956e029c1
This adds a property descriptor for the Modo Uso feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_owner_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Element_owner_feature", "_UI_Element_type"), UML...
0
52b37d97b226b814622c4e92307cd27c
7b1054051a9686edaf0184d9f308f2a2
Return the chord's name.
var parser = (this.parser === SmoLyric.parsers.lyric ? 'lyric' : 'chord'); return 'g.' + parser + '-' + this.verse; }
0
304e8389d1ceff133faa7f09ce9e60a2
22546781178606cebb096ea6dc4aa4ab
Returns the x coordinate for the given segment index.
public class Path public int getX(int index) { return getStep(index).x; }
1
f3594ede801e8e4c47dbef8031f2c2bd
4e8767f569ab11a9e918b5ae795ac2d6
A factory method that returns a descriptor for a global variable with name VARNAME and type VARTYPE, whose initial value is specified by INITIALVALUE (if non-null). <p>Sub-classes of CodeGenBase can override this method if they wish to use a sub-class of GlobalVarInfo with more functionality.
<T> spoon.reflect.code.CtLocalVariable<T> createLocalVariable();
0
838210ca1d0c0dde4c3b07f28f2e2e57
99da65ea0b49a683645706154fa576d3
开立方运算
{ BigNum t,ret(1); int i; if(n<0) exit(-1); if(n==0) return 1; if(n==1) return *this; int m=n; while(m>1) { t=*this; for( i=1;i<<1<=m;i<<=1) { t=t*t; } m-=i; ret=ret*t; if(m==1) ret=re...
0
66ed898fbef2dc5a16fbb28b9ce3376e
3eaf05be93a4d5b1af0e7a33d021c56c
Throws error if description`s value`s second quotation mark is missing
class CheatValidatorTest @Test fun validateRequestCheatDataWithNullDescription() { val cheatData = CheatDataUtils.newRequest() .copy(description = null) val request = CheatUtils.newRequest() .copy(data = listOf(cheatData)) assertThatThrownBy { validator.validateReques...
0
c755d439c8ab3dad32b74dc11601b6d6
13ce8913e0006ebf914b116a99212772
Verilen videoda ve işaretli alana göre takip işlemini gerçekleştirir.
{ $kimlik = $this->getUser(); $em = $this->getDoctrine()->getManager(); $guvercin = $this->container->get('bildirim_gonder'); $sablon = $em -> getRepository( 'BlobCoreLibraryBundle:BildirimSablon' ) -> find(5); $id = $request->request->get('id'); $fotograf = $em -> ge...
0
bc8f9cd07f280c7b504ae8e6fd555cf7
16bbfddb293b5087f1c2900da81ff51f
(from https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html)
def get_upsampling_weight(in_channels, out_channels, kernel_size): factor = (kernel_size + 1) // 2 if kernel_size % 2 == 1: center = factor - 1 else: center = factor - 0.5 og = np.ogrid[:kernel_size, :kernel_size] filt = (1 - abs(og[0] - center) / factor) * \ (1 - abs(og[1...
1
419a5a1c5f3292c787b015aba10bd872
1760d86ae77f26a94b800f401f583329
Store Email Group.
{ Schema::create('email_groups', function (Blueprint $table) { $table->increments('id'); $table->integer('organization_id')->unsigned(); $table->string('name'); $table->string('details'); $table->enum('status', ['Active', 'InActive'])->default('Act...
1
d894146d7f6b7f55f3c308bfda435849
62c379107ea12c323c8d34a477c04a76
check what couses to change for a student by compering the old courses in businessLogic to the new couses sent from client
{ string selectedStudent = listBox1.SelectedItem.ToString(); string selectedCourse = listBox2.SelectedItem.ToString(); string[] studentTokens = selectedStudent.Split(' '); studentTokens[0] = studentTokens[0].Remove(0, 1); string[] tokens = selectedCour...
0