query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0a6c12b0df915f8cecd427bfaf64801a | 78e2a5c2bb9dfd3a26e13f2a7606804b | 【后台管理】的通过cou_id查找章节个数 | Integer findRowCountByCid(Integer cid); | 1 |
b6d44406201ecc28c6f5851ee6b60ca7 | 1a66f99f5786a9522447432f40dc86ea | Validate password using django auth validate function | class UserLoginSerializer(Serializer[Dict[str, Any]]): # pylint: disable=abstract-method
def validate(self, attrs: dict[str, Any]) -> dict[str, Any]:
user = attrs.get('email')
password = attrs.get('password')
if not user.check_password(password):
raise ValidationError({'email': ['... | 1 |
df002602576bf085c56a123e960810e6 | c2462c552a57d57f82fc61f0295ac882 | 次の記事文字列 | public class CMTree implements Serializable
public String getAftertext() {
return this.aftertext;
} | 0 |
382a3f8b6c1f00564551c82cb7ba30db | 8d62993121d4912ac5095fbb0af66a9e | Open our public domain website | class PyLNP(object):
def open_df_web():
webbrowser.open('http://www.bay12games.com/dwarves/') | 1 |
3f97b3b89274adc06e23c4fdaefcd769 | 865cce456ba91422ca7e9c411ff32c04 | 获取这个部件的例字。 | WSHandle = self.__WSHandleVernacular(languageTagOrHandle)
ex = ITsString(example.Example.get_String(WSHandle)).Text
if ex == None: return u""
else: return ex | 1 |
774bd89f9f31099c90492c80c6960e9f | 2fde6c235faf90af0bf052a37e7b0a97 | Get RefNum value | class Article
public function getRefNumber()
{
return $this->refNumber;
} | 1 |
5772889e74e553b932ed33326e82fcfd | fae71ee20c1b26339a44220284b4ecd0 | 生成数据流数量矩阵,每个元素代表源TOR到目的TOR的数据流个数 | packetUse = 18
writeTxt = open(writefileName, 'w')
flowCount = 0
import os
fileList = os.listdir(readfilepath)
for readfileName in fileList:
dappNameTem = readfileName.split('-')[0]
print(dappNameTem)
if not dappNameTem in dappName:
mapped = len(dappName)
... | 0 |
297f7f9893aedc64a66f216a62433219 | d946c8c2db84477fb74399dd30d57043 | Player bumps into Halph, signaling him to either follow or wait. | {
if (other.gameObject.tag == headRobotTag)
{
PlayerEnterHill(headRobotTag);
}
else if (other.gameObject.tag == headZombieTag)
{
PlayerEnterHill(headZombieTag);
}
} | 0 |
7c709e92279bfc4f13f67041c4f19318 | 56a95c8ead469ecf51c9e0a459c0c05e | Get the affected SOP class data set | def __get_classification_dataset():
train = SOPDataset(configs.sop.path, configs.sop.list_train)
test = SOPDataset(configs.sop.path, configs.sop.list_test)
return (train, test) | 1 |
2e3ec37bd2d46c34b1307743c4683161 | fd2973493872b342071bbd9aca64f054 | ユーザIDに紐づくMAccountの検索 | namespace Macss.Repositories
public class UserStore :
IUserStore<MAccount>,
IUserStore<MAccount, string>,
IUserPasswordStore<MAccount, string>
public Task<MAccount> FindByIdAsync(string userId)
{
Debug.WriteLine(nameof(FindByIdAsync));
return dbContext.MAccoun... | 1 |
822763c100298ce1faceb7479bc79a59 | 6f27e1de4c1f62b78051dcbf2ef8b35f | Initialize character lcd in 4 bit mode. | void lcdinit4(){
LL_mDelay(1000000);
PORT_CHAR->MODER&=~(0b11<<(2*DB4));
PORT_CHAR->MODER|=(0b01<<(2*DB4));
PORT_CHAR->MODER&=~(0b11<<(2*DB5));
PORT_CHAR->MODER|=(0b01<<(2*DB5));
PORT_CHAR->MODER&=~(0b11<<(2*DB6));
PORT_CHAR->MODER|=(0b01<<(2*DB6));
PORT_CHAR->MODER&=~(0b11<<(2*DB7));
PORT_CHAR->MODER|=(0b01... | 1 |
4a4ccefd5d5129a3c8230c10a7822840 | 37e92bb7bb3b70d8dce9cef3c3bb5501 | Test Transfer all to cart View | public void test9_8ClickOnTheTransferItemInNavigationDrawer() {
mockLaunchActivity();
ViewAction.clickonView(R.id.img_berger_menu);
Matcher.isVisible(R.id.list_drawer);
ViewAction.clickOnRecylerViewItemText("Transfer");
Matcher.check(R.id.txt_header, R.string.label_nav_transf... | 0 |
e889f09279712dffdb0de47e6a0d5a2c | 1320617d7311f059cf5b5857c58b0a05 | 读取该时间段内的 XML 历史记录文件,并将里面的信息显示到 DataGrid 中 | {
DataSet myds = new DataSet();
myds.ReadXml(strPath);
dataGridView1.DataSource = myds.Tables[0];
} | 1 |
2b078fdb38e31a9fc8e0b792d5ce6b84 | 0352c5dc09151e164835c268e97fac9a | Gets the audio files stats. | long filesSizeInQueue = 0;
for (FileEntity fileEntity : this.filesInQueue) {
File file = new File(fileEntity.getFileNameInput());
if (file.exists()) {
filesSizeInQueue += file.length() / 1024;
}
}
long filesSizeInProgress = 0;
f... | 0 |
58317ddaba79afd62c2a5069f7a4df50 | 254279967c29138e3b37a9a31d649c8d | 初始化CalcuMediaLinkLoss的参数设置 | bool CIntelWeightCalculator::init()
{
CDefaultChannelWeightCalculator::init();
std::vector<UInt32>& channelGroupWeightRatio = m_pRouterThread->GetChannelGroupWeightRatio();
if (channelGroupWeightRatio.size() < 2)
{
LogError("%s Invalid Sys-Param 'CHANNELGTOUP_WEIGHT_RATIO'.", m_szLogPrefix);
... | 0 |
2062d63f12adc7ee627657e9dfc40a0b | dd925465401dbba8a204a7dcb66cd31a | Returns more detailed information about a Post than GetPost. | namespace UniqueStudio.ComContent.BLL
public class PostManager
public PostInfo GetPost(long uri)
{
return GetPost(null, uri);
} | 0 |
c0ac47d3eff5b0883ba54bec2da3c627 | 2ddf11d9fa8b8fefab95c372db48e053 | check equality of pascal strings (case insensitive) | {
for ( ;*a != 0 && *b != 0; a++, b++) {
if (toupper(*a) != toupper(*b)) return 0;
}
return (*a == *b);
} | 1 |
11c801f2ed8364ec51c810b7c6539607 | cdb93245c31e296fe251027bf65149b2 | getAltitude (void) - gets the altitude from the GPS
forces getLocation and responds the current value of the altitude
variable (in meters) as a string
return altitude if ok, 0 if timeout or no gps signal. | int getAlt(void)
{
return g_altitude;
} | 0 |
04175f7bdefc6b4d7ff04563e6085a89 | a8925e96b4c84878daa7f9b19d44df63 | Function that draws a voltage source | scheme.draw_rectangle((RESISTOR_RATIO, 1.0), style='contour')
scheme.draw_line(((0.4, 0.4), (-0.4, -0.4), (-0.7, -0.4)), style='aux')
scheme.draw_text('$\\vartheta$', offset=(-0.55, -0.4), position='n') | 0 |
be808002100253d5f91505ad7d1c9437 | d87e1b7338d660bab2e6db8209889f1f | Bidirectional search from node1 and node2
return the frist node that has been reached from both node with BFS
if there is no node meet the requirement, return null | if (root == null || n1 == null || n2 == null) {
return null;
}
ArrayList<TreeNode> p1 = new ArrayList<>();
boolean res1 = getNodePath(root, n1, p1);
ArrayList<TreeNode> p2 = new ArrayList<>();
boolean res2 = getNodePath(root, n2, p2);
if (!res1 || !res... | 0 |
db549b9a2779c80eed1339d4a29a175f | c14bbb195623934f51acca55851d965c | Visit a parse tree produced by STIXPatternParser#comparisonExpressionAnd. | public function visitAndExpression(Context\AndExpressionContext $context); | 1 |
393c37ff0dec40caa5a35031da1843b3 | 35aa990b6646c773b4b64d7399587345 | Sets the recommendation which should be updated.
This method has to be called before showPopup() | export class MotionDetailComponent extends BaseViewComponent implements OnInit
public set motion(value: ViewMotion) {
this._motion = value;
this.setupRecommender();
} | 0 |
10f09a627d215be8a26a641b843fb5a8 | 5796736b80c3f9c9504cb10fdf31211e | Logical Shift Right (Memory location as target) | {
int Rd = (int)(Opcode & 7);
int Rn = (int)((Opcode >> 3) & 7);
Registers[Rd] = ((Registers[Rn] >> 8) & 0xff0000) |
((Registers[Rn] & 0xff0000) << 8) |
((Registers[Rn] >> 8) & 0xff) |
((Registers[Rn] & 0xff) << 8);
} | 0 |
6ba32e2a585d300b2a97cd7a7ba4d2ed | 323251368c030b940761d9dd7b244fa3 | Méthode permettant d'ajouter une billet. | {
$missingFields = missingRequiredFields([
'titre' => TRUE,
'contenu' => TRUE
], $post);
if (!empty($missingFields))
{
return ['error' => $missingFields];
}
$billet = new Billet;
if ($post['id'] == '')
{
unset($post['id']);
}
else
{
$billetMgr = new BilletMgr;
$billet = $billet... | 1 |
fe8414fbee276ded81880f78f09f971d | 9060e4053d0c80b494280372bb9b45f3 | 切换回上级iframe | class BrowserInit():
def switch_to_parent_iframe(self):
self.driver.switch_to.parent_frame() | 1 |
3a80d973043bb4929be0be0b2a6bd414 | f8dd93354884d8f2bf00ad756c809562 | select which cache line to evict and do eviction(no need to free and delete. just use it.)
algorithm is second-chance algorithm | int opt_evict() {
int i = 0, counter = 0, max = 0;
int ret_frame = 0;
for(i = 0; i < memsize; i++){
counter = 0;
if(frame_map[i] != 0){
struct node *iter = head;
while(iter) {
counter++;
if(iter -> vaddr == frame_map[i]) {
if(counter >= max){
max = counter;
ret_frame = i;
}
... | 0 |
1affc778b2a73a4b7de1a82b1e2d9f1f | 3e73aab7f560d8042628bd71926e11fb | Returns a list of all bug reports | public class BugManager implements IBugCRUD
@Override
public ObservableList<Bug> getAllBugs() {
return bugsList;
} | 1 |
c13954a225a2833ef0b54f9b88fcec6a | 1bb7220170d56023bcfb5767aaac5c60 | Validate that all fields are persisted when saving mapping info | {
return this._fieldMappings != null && this._fieldMappings.Count > 0;
} | 0 |
bfb48182a2497a2ba936c33c214ea63f | ba777c9195297b518955fc8b487bcea0 | 設定した座標をもとに頂点のグループを設定し,そのグループごとに<see cref="PolygonNode"/>と同様の方式でインデックスバッファーを設定します。 | {
vertexNum_ = 6;
if ((vertexAttr_ & (uint)Shader.VertexAttr.TEXCOORD0) != 0) {
int vertex_stride = 20;
int data_size = vertex_stride * vertexNum_;
var vtx_ary = new[] {
new { p = rect.leftTop, uv = new Vector2(0, 0) },
new { p = rect.rightBottom, uv = new Vector2(1, 1) },
new { p = n... | 0 |
a5d568022cb34b225c2b7b9d4f2dc680 | 523450a55d86c74816fc017bc91ab930 | Возвращает все одетые вещи в виде строки | fun getAllOutfits(language: ApiLanguage? = null): List<Outfit> {
return outfitsClient.getAllOutfits(language)
} | 0 |
f5790bfe1846a10bc3a7b8d859856f8f | 87e0a9e59f0b2f39b1b97089bc11d444 | Check the queue is exclusive queue. | public boolean isExclusive(); | 1 |
348270682f1445fd208f804a8933fcb7 | 3e6919eda2ae5a2222d72ab530793d90 | Warn on short elapsed times.
Override this method to customize the warning mechanism. | class myMdSpiResponse(MdSpiResponse):
def OnHeartBeatWarning(self, nTimeLapse):
print('OnHeartBeatWarning / ', nTimeLapse) | 1 |
e5e978fa4a954c1bc0cdb7e1c2332626 | a38f0edac0a101fe66e7e332eb7dae7d | returns empty Array if no children found or an array of Primitive/Merklet object with matching name and value | class BeetsonicWebTestCase(unittest.TestCase):
def children(obj, name):
if isinstance(obj, Struct):
if not BeetsonicWebTestCase.contains(obj, name):
return []
return getattr(obj, name)
return [item.value for item in obj.orderedContent()] | 1 |
44b2ad91e7af62ba86665db76d254d4e | 20280208a5c37309232b91bc171e293f | Funkcija koja crta trkaca. | void draw_road(GLuint names, float z_koordinata) {
glPushMatrix();
glBindTexture(GL_TEXTURE_2D, names);
glEnable(GL_TEXTURE_2D);
glBegin(GL_POLYGON);
glTranslatef(0 , 0, z_koordinata);
glTexCoord2f(0, 0);
glVertex3f(-40, 0.1, -3);
glTexCoord2f(1, 0);
glVertex3f(40, 0.1, -3);
... | 1 |
cbacacc1eba0260e1646c293d3fb2b48 | b92b2ca49aefaa3c83e76b8785cdd77f | 回述权值,从子节点一直回述到根结点,返回权值为计算权值的相反数,因为估值网络的判断要求和计算出来的相反 | if len(vlist) == 0:
return 1
memory_name = ""
for v in vlist:
memory_name += v.name
parents_vlist = Parents_vlist_dic[memory_name]
memory_name = ":" + memory_name
for i in range(len(vlist)-1, -1, -1):
if evdic.has_key(vlist[i].name):
memory_name = vlis... | 0 |
78ce4d8c62501183f4c383d37cdf5de4 | 205c305e49ebab71a7b0152c53491ff3 | 評価対象となるレベル("0+2+3")のパース | public class Domartin
public static String getTestLevel(String test_file)
{
String level = new String();
String test_file_w_o_ext = Domartin.getFileWithoutExtension(test_file);
int space = test_file_w_o_ext.indexOf(" ");
int len = test_file_w_o_ext.length();
if (len == -1)
{
level = null;
}
else
... | 0 |
2c74c1e2ca6e9b6ea7dda6539deca34d | 114d6f7e7190991e234f83b83d339c9e | 若是同一会话,则增量更新,解决进入chat页面只有conversationID的问题 | String conversationName = mDbName.endsWith(messageModel.getFrom_user()) ? messageModel.getTo_user() : messageModel.getFrom_user();
conversationIsExist(conversationName, new SearchExistCallBack() {
@Override
public void findResult(boolean isExist) {
if (isExist) { ... | 1 |
7bc2f4c49c513d6cb88bbde711de1023 | 99f3c72c29a827efc45862aca086fc22 | Metodo para bajar la intensidad de las luces del techo de los alumnos | class ControladorCamara
public function tiltUpCamaraAlumnos1() {
self::$alumnos1->moverArriba();
} | 0 |
2eeab442d8b8c68900492f02b1992cff | e0330cb511b76b94d26b4c21066db41e | 以测试模式向第三方支付渠道发起请求 | String pay_orderid = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
String pay_applydate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
String pay_bankcode = "919";
String pay_notifyurl = "http://127.0.0.1/";
String pay_callbackurl = "http://127.0.0.1/";
String pay_amount... | 1 |
ba8f77cdbe7298d3c188459725509c0e | e8ac7792175af91072d5d214ed39aac4 | Basic messaging with msgpack packing | class RpcObject(object):
def useMsgpack(self):
self.pack = self.__msgpackPack
self.unpack = self.__msgpackUnpack | 1 |
eae5e7b5a09f070a18a4378fe12516a1 | 170e898a5494f6fea70646ba2c0ffbe5 | 是否orgId的管理员 | def is_org_admin(self, user, org_id):
admin_objects = Membership.objects.filter(user=user, is_admin=True)
for admin_object in admin_objects:
organization_id = admin_object.serializable_value('organization_id')
if organization_id and org_id == organization_id:
return True
... | 1 |
e23682d4187838c43bf491775ef0b563 | 22b23497b96e6d768a43f471084c78e7 | fourier transform image and shift lowest frequencies to center (where gaussian is 1) | def spatialtofreq(img):
ftimg = fftn(img)
ftimg = fftshift(ftimg)
return ftimg | 1 |
c70474ee6fc7d4ea909de6bf92c36672 | 6256e0094fbee28592d9a60b42cbf706 | !< Sets the texture to Death. | if (deathAnimation.getId() == 9055 || deathAnimation.getId() == 7197) {
deathAnimation = Animation.create(836);
}
this.deathAnimation = deathAnimation;
} | 0 |
ebf17647a231aee973836d11a2caf2aa | 607eeaa673b371a1444ad50dea3f8126 | Internal function that returns all posts that related to the board from Elasticsearch cache. | {
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->addSelect('post');
$qb->from('ThreadAndMirrorMoodBoardBundle:Post', 'post');
$qb->leftJoin('post.feed', 'owner');
$qb->where('post.deleted = :deleted');
$qb->andWhere('owner.category = :category');
$qb->setParameter('deleted', '0');
$qb->s... | 0 |
040e2496b0d730baf0c52d1e00e62e8a | 0359e5b486a0bdc188ee49100a3bf231 | Gets the "internal-rar" element | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "resourceType", propOrder = {
"externalRar",
"internalRar",
"connector"
})
public class Resource
implements Serializable
public String getInternalRar() {
return internalRar;
} | 1 |
ae1970cae9761424297ad1a24dd6b8f5 | 773c460a6a9f217acff20fc6bb13500d | Enregistrer au format lilypond | if moyenne == "elevé":
volume = range(90, 127)
elif moyenne == "moyenne":
volume = range(45, 90)
else:
volume = range(1, 45) + range(100, 127)
if ecart_type == "elevé":
gamme = [60, 62, 64, 65, 67, 69, 71]
elif ecart_type == "ecart_type":
gamme = [60, 62, 63, 65, 67, 68, 70]
else:
gamme = [60, 61... | 0 |
10026331169dbb56c3ba14e1f5b9972a | fbc94d492002399d97aba336409b7b15 | fail if given converter not in registry. | public class ConversionUtils
protected <T> Converter<T> getConverterOrFail(Class<T> type)
{
Converter<T> converter = this.getConverter(type);
if (converter == null) throw new UnsupportedOperationException("Conversion failure: No converter available to handle conversions to type ("+type+")");
... | 1 |
539c77aa4bd46874ad9be364ef0d696a | e9e7559a851dd27fee7e312f272dd496 | Checks the created time of a file | class Manager implements Backend\_Interface
public function filectime($path){
return $this->backend->filectime($this->fixPath($path));
} | 1 |
d282ef633ad96e1b42b8caa21012336d | e8113beccdbff050ddaf111ec7686419 | 选择商铺后, 进入页面则重新获取购物车数量 | var index = e.currentTarget.dataset.index;
var that = this;
var storage_key = 'goods_info_'+this.data.show_all[index].container_id;
this.data.show_all[index].shop_num = this.data.show_all[index].shop_num+1;
that.setData({
show_all: this.data.show_all,
shows_all: this.data.show_all
}... | 0 |
d7a2b0f922e0bfc844dd0e5b1b6d9f1e | cd78f51ebcd4a0f9de6a33855d965fa5 | Funzione di callback per l'oscillatore | static void
myCallback(void)
{
if(audioNewNote==TRUE)
{
audioNoteTime=_audio[audioIterator];
audioRepeat=_audio[audioIterator+1]/2*audioNoteTime;
audioRepeat=audioRepeat*2;
audioNewNote=FALSE;
}
if(audioRepeat>0)
{
if(audioRepeat%2==0)
{
IOCLR... | 1 |
e79db4d9237572a53b105b8b9a2a7b5b | baeb71a569af4ed5ebedc22ea52f852d | Returns the meta object for the reference '{@link Model.Event#getValue <em>Value</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getEvent_Value(); | 1 |
881828ce71552c4c60f8a5a85e8fa496 | c87753d1780bca7b0c338afcf2d9f054 | 根据Section的名字, 获取Key-Value所在的Hashtable | namespace ControlINI
public partial class MainWindow : Window
public static int GetAllKeyValues(string section, out string[] keys, out string[] values, string iniFilePath)
{
byte[] b = new byte[65535];
GetPrivateProfileSection(section, b, b.Length, iniFilePath);
string s ... | 0 |
6b041939d4c6ddd1f82247ccfddab854 | f8ffd471ac545826125de4ab9ffebaaa | Returns the elapsed time in milliseconds | int Timer::getElapsedTimeInMilliseconds()
{
std::chrono::duration<double> diff = stop - start;
return diff.count() * 1000;
} | 1 |
f8b025346100dbb2be24fed0d8b8f69e | 58ca430156a8d908d3823b1ea2291b5a | refer to Q1 | def q1(onTime, absent):
if onTime:
return('Hello!')
elif absent:
return('Is anyone there?')
else:
return('Better late than never.') | 1 |
a9069994d0ca7146d044b66aceecb4c7 | a3ac9c1930c78a526c70015b2a0916c2 | Xóa tất cả product cùng category | class CategoryController extends Controller
public function destroy($id)
{
$category=Categories::find($id);
$productType=ProductTypes::where('idCategory',$id)->get();
$product=Products::where('idCategory',$id)->get();
if(count($category->productType)===0){
$category-... | 0 |
8eb09c95c5e6a0a34f791f31af010f36 | 5872c1e4b7fc7841b92328c0fe3a6669 | FileSettings constructor. | class ApplicationSettings
private function __construct(array $data, string $file)
{
$this->file = $file;
$this->data = $data;
} | 0 |
365b191cf1dd8f6ee1a5fb47a0b5400d | 7d753c2eddfd2c03f72f8995ec2b65fb | Creates a new Google Cloud Pub/Sub topic. | try:
params = request._serialize()
headers = request.headers
body = self.call("CreateTopic", params, headers=headers)
response = json.loads(body)
model = models.CreateTopicResponse()
model._deserialize(response["Response"])
retu... | 0 |
362673a320b8c2176eff26eb782ede72 | c9056aad306271ec71edbd9fb2c81f35 | This will disable app-wide color harmonization, to not have conflicts with the harmonization
logic within this demo. | func init() {
core.DisableColor = true
} | 1 |
7a7f43513eae8eab909da85efa6908e8 | a6b2aca828c7a1c9ff903e220d0a505e | Transforms each value into an `UploadedFile` instance, and ensures that nested
arrays are normalized. | class FilesFactory implements FilesFactoryInterface
private function parseUploadedFiles(array $uploadedFiles)
{
$parsed = [];
foreach ($uploadedFiles as $field => $uploadedFile) {
if (!isset($uploadedFile['error'])) {
if (is_array($uploadedFile)) {
$pa... | 1 |
2b3013346f3cd25b8a4c48a98cf2b5d4 | 1dc712e4cf9e0cdedc45d292328b395e | Saves the tag association for the game for this device | public class Drill extends Fragment implements View.OnTouchListener, ConfettoGenerator
public void saveSelectedOperation(String fluencyTag) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
SharedPreferences.Editor editor = prefs.edit();
editor.putString("... | 1 |
1a99305f989e20dc07e42749f0102215 | 5b70da2e52080fcc3810fffaabc1f505 | ask(screen, question) -> answer | assert question, "'ask' requires a question"
if help:
print self._clean_text(help)
for c in choices:
print ' %s' % c.lstrip()
question_str = self._clean_text('%s%s: ' % (
question, self._format_hints_text(hints, default)))
while True:
... | 1 |
8e7877c855c63d338873c9ebd60c906b | f943461729100b990b2fd0b68453ad82 | Returns the norm number of the articles norm, e. g. 931 or 933. | public class Article
public String getNormNo() {
return normNo;
} | 1 |
6a57a45faa37e7bf9aa6f4f9328a39ab | ff8ef547d960210a4aa53e242aa80e79 | I2S Transmit MCLK rate denominator. | {
static const UCHAR S_DIVID[] = {4, 6, 8, 12, 16, 20, 24};
return (DdTopone_1200_PLL_OUT / S_DIVID[DdTopone_Get_CLKSEL6_R2Y2CLK()]);
} | 1 |
1ff3eb60772792b652776e0ba0b1d61e | 528d434828f731fdf6f8471767f37706 | Does key match issue pattern | issue = Issue.objects.get(id=issue_id)
cvid = ''
if issue.cvid and issue.cvid != '':
cvid = issue.cvid
else:
if self.api_key != '':
cvid = self._find_issue_match(issue.file)
else:
cvid = ''
if cvid != '':
self._process_issue(issue.file, cvid)
else:
self._reprocess_issue_without_cvid(i... | 0 |
7b8b7b944321ab4e18eecf564ce1d89a | 4640853d8ac1b3d1ed604fdbaa0a1a67 | Returns names of stocks displayed currently in the panel. | {
ArrayList<String> stockNames = new ArrayList<>();
@SuppressWarnings("unchecked")
List<TimeSeries> series = dataset.getSeries();
for (TimeSeries data : series) {
stockNames.add((String) data.getKey());
}
return stockNames;
} | 1 |
f91849b0fa099f4559d983cbda1cd8fa | b394c50b4cf461a8cc3f084f5754b6d1 | Transport stream bits per second. | double PacketReceiverStats::bitsPerSecond() const
{
return numBytesReceived_.getRateOfChange() * 8;
} | 1 |
61ed8d662f1045b2ea3cc53935895146 | 25132b16808832332d04cdac536d85a9 | Funcion para encontrar el mayor salario anual: | def numero_mayor():
d_mayor=0
for x in range (len(equipo)):
index_d= df_archivoExcel.loc[x,'local']
if index_d==index_d:
d_mayor=d_mayor+index_d
return d_mayor | 0 |
c608db39cb46c383527599bbc75bf9fe | 8a519e4c4c6db20f1c81e302897c0a10 | T Pentomino generieren | Random random = new Random();
switch (random.nextInt(NUM)) {
case 0: return new ITetrimino(ground);
case 1: return new JTetrimino(ground);
case 2: return new LTetrimino(ground);
case 3: return new OTetrimino(ground);
case 4: return new STetrimino(gro... | 0 |
d551de229812ee7ad45335bbcf03f977 | dd810a470554fe74e4a67a9e649fab83 | 追加字符串集合。 | fun SpannableStringBuilder.plus(vararg text: CharSequence): SpannableStringBuilder {
text.forEach {
this.append(it)
}
return this
} | 1 |
d9ac48f95e720aae1837cccc7ce0dae5 | a648557f0e2548e05e6ad6d17c18ea19 | 通过网页授权登录 | self.brower.get(pUrl, headers = self._headers)
self.ptwebqq = self.brower.cookies['ptwebqq']
vUrl = "http://s.web2.qq.com/api/getvfwebqq?ptwebqq=%s&clientid=%s" %(self.ptwebqq, self.clientid)
response = self.brower.get(vUrl, headers = self._headers)
result = json.loads(response.t... | 1 |
1fe685063802c30e6a8851a3f6727e6a | ae0f46aaa22518e4536c19311dff6705 | 分页获取WProductsBuyEmp集合 | namespace Edge.SVA.BLL
public partial class BUY_PRODUCT_PIC
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
} | 0 |
647ddabe3d2d2f34fcbdc4e43030e29a | 777cab8364320ddb4a606aed25a76e26 | Buscar todos os Tweets do DB | class data_cleaner
public function run()
{
while (true) {
$query = 'SELECT cache_id, raw_tweet FROM json_cache LIMIT 0, 300';
$result = $this->model->select($query,$this->banco);
if($result->num_rows > 0)
{
while($row = mysqli_fetch_assoc($result))
{
$cache_id = $row['cache_id'];
$t... | 0 |
00af829a28bbc4e6dc8c9e9f877a3fa3 | 650f669af9e36f706e241d62bc641b9c | Получаем ссылки на все фильмы | sel = Selector(response)
url_list = sel.xpath('//div[@class="movies-list"]/div[@class="media movie-item"]/div[@class="media-body"]/h2/a/@href').extract()
for movie_url in url_list:
yield Request(movie_url, callback=self.parse_movies) | 1 |
26283af94189f5d89b4f85a604784835 | d1c04c9ce9fdcaa58ef716d7b5d7208a | Método para testar a lista de eventos de documentos recebidos ou enviados. | if (listaCandidaturas.isEmpty()) {
System.out.println("Lista de Candidaturaes vazia.\nEvento não registado!");
return false;
} else {
return true;
}
} | 0 |
795ddfdbe8fe803ac75d4995304ab53d | 6f365364307037df9d96bc540c972d62 | only show this on the taxonomy page | $custom_tax_has_contents = ($custom_tax->count > 0)? true:false;
echo "<span class='nochildimage-".odm_country_manager()->get_current_country()." ".$custom_tax->slug."'>";
if ($custom_tax_has_contents):
echo '<h5><a href="/'.$custom_tax->taxonomy.'/' . $custom_tax->slug . '">';
endif;
echo $custom_tax->n... | 0 |
169fd77ac2d390208dbbe31dca9a292a | 4bff3ad8f642c70b519e78d007a76688 | Gets all the volunteer time punch records with no punch out time / date | final class CsvDownloader
private function getTimestamps(): Collection
{
$user_id = request('id');
return Timestamp::where('user_id', $user_id)->orderBy('punchIn', 'asc')->get();
} | 0 |
775d7f9e2fa7aace45b039dfbc2b9ac7 | a922d5ae659dd0fc3d37bab7605a7d75 | 返回当前面试的打分规则 | class MajiangTableLogic(object):
def tingRule(self):
return self.__ting_rule_mgr | 0 |
1c489aa553e40088b8bd902da362e44c | 2196d336f66f8cf34d347344e31b1f80 | Mark failed hook as pending. | class FrontMessage extends Model
public function markAsFailed()
{
$this->update(['failed_at' => now()]);
return $this;
} | 0 |
bfcdce064dfef486be0753012d940f7e | 72f415ab1a6f03a2772ae55b9a8abf7e | Oversample the minority class using the specified algorithm | def cluster_based_over_under_sampling(X,y,n_majority=4,n_minority=2,ratio=0.5):
from resampling_data_techniques import cluster_based_oversampling
return cluster_based_oversampling.cluster_based_oversampling(X,y,n_majority,n_minority,ratio=ratio) | 1 |
e6558668fdaedbe64d6e0f611ba3b4a3 | cb0daf8c243a4f648b8879f47bbf21e0 | Prints a line of ascii characters on the serial port with the global serial port. | void SerialPrintLine(volatile char *s)
{
SerialPrint(s);
SerialPrint("\n\r");
} | 1 |
0dd3d14898f4255e5ed6892f81173aa3 | 14a28547b7a701390c86e6d76504b015 | Calculates a score gain from some data structure containing information about the game state necessary to calculate score.
For example, this method would need a different data structure if it were able to calculate T-spin points than if it only
calculated score based on level and lines cleared. | {
int scoreEarned = tilesCleared * _tilePointScoreValue;
if(comboCount > 1)
{
scoreEarned *= comboCount;
if(noMovementCount > 0)
{
scoreEarned *= (noMovementCount + 1);
}
}
return scoreEarned;
} | 1 |
b8c042db88ff2680d3dd00875b035bdf | 10ce79541fbe087a825353a6534b3f9a | Calculate required values for hsv-rgb conversion | unsigned short inblue,
float& inhue, float& insat, float& invalue)
{
float mymin, mymax, delta;
mymin = MIN(MIN(inred, ingreen), inblue);
mymax = MAX(MAX(inred, ingreen), inblue);
invalue = mymax;
delta = mymax - mymin;
if (mymax != 0.0)
insat = delta / mymax;
else
{
... | 1 |
8b9b44731d9577f11ba5102c89605edf | f4fe178e0ecc42ccfa8659c38585849f | Asynchronously Writes a Debug Log to a Text File | namespace InverGrove.Domain.Interfaces
Task WriteToDebugLogAsync(string message, [CallerMemberName] string callerMemberName = null,
[CallerLineNumber] int callerLineNumber = 0); | 0 |
c89c2ac381d27d963c89a280af999a3a | 34ef741e6ab3a58bedea15cac88c105b | Generate the captcha and save the word in session with md5 crypt | class Member extends CI_Controller
function get_captcha()
{
$vals=array( 'img_path'=> '/data/captcha/',
'img_url'=> '/data/captcha/',
'img_width'=>'82',
'img_height'=>'36',
'expiration'=>60
);
$ca... | 0 |
e5a20ca06cd28a2ba9ad4b11ec708f36 | 36d2d934b73306aeb1723207fe14039a | Removes the object when it leaves the collider. | public class PushObject : MonoBehaviour
public void OnTriggerExit(Collider other)
{
objectsBeingPushed.Remove(other.gameObject);
} | 1 |
378871965707e4b9d6603edbae0c79b7 | e12e061cce1b4ad4186d3e8b69b12318 | 创建特殊打切时,获取特殊打切品物料数据 | {
StringBuilder sqlBuilder = new StringBuilder();
sqlBuilder.Append("SELECT * FROM ( SELECT [new_objekidName] ,new_ATINN ,[new_ATWRT]");
sqlBuilder.Append(" FROM (select new_objekidName, new_ATINN , new_ATWRT ");
sqlBuilder.AppendFormat(" from Product as p inn... | 1 |
dbc5a1a42411d8a032d744ab4daae277 | 09a244708a305b7ea9f6d06f794e03e8 | Shows constrainted MEF manually resolved instance sample | {
var model = GetById<ICompiledModel>(1121);
Console.WriteLine(model.Name);
var make = GetMake(model);
Console.WriteLine(make.Name);
var makeById = GetById<ICompiledMake>(25545);
Console.WriteLine(makeById.Name);
Console.ReadLin... | 0 |
2ec5fe5fb971924cf97c2aeaeb135fa7 | c0cc665beca30ebce90e1ec9bbebba1e | Used to populate rows of libraries/samples to be entered for singleplex libraries | fields=None,relpath=None):
first_line = True
for cellranger_count in self.cellranger_count:
if cellranger_count.pipeline_name != package:
continue
metrics = cellranger_count.metrics
web_summary = cellranger_count.web... | 1 |
6a86e6bd3be2a063f62599910d1c6449 | 6483c19489f6c75227a757da270596ab | Data accessor callback you provide to allow others to write the dataref.
The callback semantics is the same as the XPLMSetDatavi (that routine just
forwards the request to your callback). | public static extern void SetSaveFileDataCallback(
delegate* unmanaged[Cdecl]<sbyte*, void*, uint, CBool> callback
); | 1 |
3e4ca4f98721a731462ff4b37e232971 | 93668b9fbac01dec4bb142b1cf3c74b1 | Provides current configuration of navigation keys. | public static String navigationKeysConfiguration() {
return Arrays.deepToString(Arrays.stream(values()).map(Move::toString).toArray());
} | 1 |
111ab67a06d1ae8f958f594a9252d775 | 957ef6a64bc37935e1431f4a15913c4e | Called when we have hit a registered function entry breakpoint | printf("\nHit breakpoint at eip = 0x%08x\n", cpu.eip);
nemu_state = STOP;
} | 1 |
ac9c3c7c2fddcd4239f8962c05728499 | bfe27d59d4bc3ea1dc6051dad469f82d | Function to get Header Breakpoint | add_breakpoint_header(par)
objid_t par;
{
new_object(BPHEAD_OBJCODE, OT_BPHEAD, par, OBJ_CHILD);
Breakpoint_header_exists = TRUE;
} | 0 |
1795458a7f275d0904fe490d8ee8a6de | cf821697e914070072b74058c68e1d34 | 摄影师更新信息 | if(request()->isPost()){
$post = $this->request->post();
if(!isset($post['uid']) || !isset($post['type'])){
$this->ret['msg'] = '缺少参数';
return json($this->ret);
}
$upd['update_time'] = date('Y-m-d H:i:s');
if($post['type... | 0 |
1e4f64304e3a6eaa59aa88acd83d8198 | 0bbf2db32266493ba75c08c921d866ee | 获取集合中具有指定键的项的DateTime类型值
注意,此方法为兼容老版本数据库DateTime(MSSQL2005-,MySql等)类型 默认DateTime.MinValue为1900-01-01 若需设置0000-01-01 请将minValue参数设置为true | {
string sql = "select value from EtlStates where [key]=@key";
SqlParameter[] param = new SqlParameter[]
{
new SqlParameter()
{
ParameterName = "@key",
SqlDbType = System.D... | 1 |
6c1a5bd1d57484838d297de1cc12f641 | aec1f612df58479d8a99304eec396714 | Returns the meta object for the attribute '{@link ovgu.pave.model.input.RequestActivity#getId <em>Id</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getActivityType_ActivityId(); | 0 |
49000b6ef147e661dd022a79b5946ea4 | 13bdaad2dd2f2bdfbec57e70ecf2b798 | 创建 GDA_TASK_INPUT_WP的数据对象 | return Object.assign(
{},
{
latitude: wp.latitude,
longitude: wp.longitude,
timestamp: new Date(wp.arrivalDate).getTime(),
}
)
} | 1 |
c13f5e68540d067ab435a9572e807ac2 | bf88b16c096870c86ec27483cb664a58 | Returns a formated JSON response for an object $object | class EfiGeneralBundle extends Bundle
public function efiGetJsonResponse($object){
$response = new JsonResponse();
$response->setContent($this->getSerialize($object));
return $response;
} | 1 |
9d99b6d6e9ecdb541403ff9ffa051db5 | 57149436c7f8e85f6f44967acf3d55ad | 删除目录及目录下的所有文件
删除文件 | public class FileUtil
public static void delete(String dirPath) {
if (CommonUtil.isEmpty(dirPath)) {
return;
}
File dir = new File(dirPath);
if (dir.isDirectory()) {
for (String filePath : dir.list()) {
delete(filePath);
}
} else {
dir.delete();
}
} | 1 |
2736673e251a776a249b13d267e11eaa | 28c94df11fe6ff52fd4aeaf650de63ff | возвращаем активна ли форма | public class FormTemplate
public boolean isActive(){
return isActive;
} | 1 |
3708b40bf444ac5b1e45489e50f84ad3 | 9f85f06f9219ee5e1962636948f3a897 | 存在しないタクソノミーを削除する | public class SqliteAccess
public void deletePartsData(String tanaName) {
try {
String sql = "UPDATE SET_PARTSLIST SET PARTS_NAME=NULL,TANA=NULL WHERE TANA=?";
PreparedStatement pstmt = con.prepareStatement(sql);
pstmt.setString(1, tanaName);
pstmt.executeUpdate();
pstmt.close();
}catch(SQLException e... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.