query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
082269e52fed4bf5876227bbaa267920 | 052251110a1f33d8c2bac9867456913a | Execute a synchronous MySQL query
Arguments from GSC:
char *query - Query string to execute
int saveResult - Whether or not resulting rows should be returned
Returns to GSC:
Resulting fields of all rows or undefined | $return_val = 0;
$this->flush();
$this->func_call = "\$db->query(\"$query\")";
$this->last_query = $query;
$this->result = @mysql_query($query,$this->dbh);
++$this->num_queries;
if (SAVEQUERIES) {
$this->savedqueries[] = $query;
}
if ( mysql_error() ) {
... | 1 |
87ca164903b6eb8690a2f0146af3587a | 40a4519e0ba49c3477e08c84e8d30c9e | Start device discovery. (keep discovering for about 12s)
The device discovered will be sent as broadcast. | public class StudentHome extends SalesforceActivity
public void deviceDiscover(View view) {
checkBTPermissions();
IntentFilter discoverDevicesIntent = new IntentFilter();
discoverDevicesIntent.addAction(BluetoothDevice.ACTION_FOUND);
discoverDevicesIntent.addAction(BluetoothAdapter.ACTIO... | 1 |
3bc0f8a43d806e5aa645fc363ff3af04 | cef01e4152e8e8e7b98f9a879e68a035 | An antigen-presenting cell presents antigens to a naive t-cell, causing it to enter an activated state. | std::cout << TheAntigen << std::endl;
unsigned long EpitopesSize = Epitopes.size();
for(unsigned long i = 0; i < EpitopesSize; ++i){
std::cout << Epitopes[i] << " ";
}
std::cout << std::endl;
} | 0 |
458b617b083620c02b58dd1ed6d1e6ce | 71d08a3696c770dc1ae849983154ccc3 | Convert wide characters to narrow multi-bytes | LOGASSERT(ws);
int outlen = WideCharToMultiByte(CP_ACP, 0, ws, -1, NULL, 0, NULL, NULL);
if (outlen > 0) {
out.resize(outlen+8);
WideCharToMultiByte(CP_ACP, 0, ws, -1, &out[0], out.size(), NULL, NULL);
size_t size = strlen(out.c_str());
out.resize(size);
}
} | 1 |
aa45b98d571b43ce1adf77c0370373a8 | 4339783ed1a9343b171a4db65e757540 | Play sound for whether current player wins or loses | {
switch (soundName)
{
case LOST:
soundPlayer.play(BinaryData::lost_mp3, BinaryData::lost_mp3Size);
break;
case REMOVE:
soundPlayer.play(BinaryData::remove_mp3, BinaryData::remove_mp3Size);
break;
case START:
soundPlayer.play(BinaryData::start_mp3, BinaryData... | 1 |
c520cec765e8f1f497c78585388af283 | eee11006bee388e41ed45bd65829ff32 | Test that when removing an animated sprite the correct sprite is removed. | AnimationSet::Ptr animSetSingleFrameAnim = std::make_shared<AnimationSet>();
animSetSingleFrameAnim->addAnimation({sf::IntRect()});
animSetSingleFrameAnim->addAnimation({sf::IntRect()});
AnimatedSprite singleFrameAnimSprite(*aSpriteTexture, animSetSingleFrameAnim);
singleFrameAnimSprite.setAnimationDelay(sf::micro... | 0 |
a4dbdc4be7ccbf1958e5b398ad4ef0ce | cd707043cd6eed6a9878c220e10f9845 | 为筹码增加 0- 0.5s 的延迟,让其错乱飞 --OK | local pSpr = CChipCacheManager.getInstance():getChip(jettonIndex)
pSpr:setTag(jettonIndex)
local endpos = cc.p(0, 0)
local idx = 0
local oldSp = nil
if bSelf == true then
idx = math.random(1, #self.m_randmChipSelf[index])
oldSp = self.m_betChipSpSelf[index][idx]
self.m_be... | 0 |
5985f3a4426eddb83f88fc9175886b48 | f80480510c11fd763b1a7300a570d5a3 | 设置技能中心背景图片 | function PetPropSliderItem:SetForgroudImage(imagePath)
UIFunction.SetImageSprite(self.Controls.m_ForgroundImage, imagePath)
end | 0 |
704aae07740662ba3dcf3188e19135e1 | a681b325dd2d381246a2c0bbf3a09f8c | Convert QName to the Clark notation, e.g., {namespace}localName | public class QName
@Override
public String toString()
{
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < names.length; ++i)
{
buffer.append(names[i]);
if (i != names.length - 1)
{
buffer.append('.');
}
}
return buffer.toString();
} | 0 |
bddf9e2ad3f998639979e27f9effecad | 93ce4cdac364e43eb4291773b6c06877 | Show aggregated result of number of overdue reasons by reason id | class TaskOverdueReason extends Model
public function overdueReason()
{
return $this->belongsTo('App\Repositories\OverdueReason\OverdueReason', 'reason_id');
} | 0 |
59bde1c479b39545090cde705217eb2b | 24b9eb6b785118849e6ac58fb77c9bfd | 社員登録の「社員ID」入力チェック
第1引数:社員ID | String sisetuGrpId,
long num)
throws Exception {
ActionMessage msg = null;
String eprefix = String.valueOf(num) + "sisetuGrpId.";
GsMessage gsMsg = new GsMessage();
if (StringUtil.isNullZeroString(siset... | 0 |
ce34eb21048d7e598c442f6bb535d130 | b29c95495aabb62eeb2e141627aa939c | Get the number of consecutive failed login attempts. | class UserLockingModel extends Base
public function getFailedLogin($username)
{
return (int) $this->db->table(UserModel::TABLE)
->eq('username', $username)
->findOneColumn('nb_failed_login');
} | 0 |
a34a91382da883d753d95c34eb36b2c4 | 12724a4ec439f576055e752d02666f60 | Initialize structure keeping days data | for (int i = 0; i < MAX_DAYS; i++) {
mDayXs[i] = 0;
mDayActives[i] = false;
}
} | 1 |
29fed951f14b72e6c534dfc3507023b5 | 7f85579040edf0f298dfbd8c13b5ae47 | 是就输出yes,不是就输出no | func YesNO() {
userFile := "/dev/tty"
here:
fmt.Printf("Continue (y/n):")
fin, err := os.Open(userFile)
defer fin.Close()
if err != nil {
fmt.Println(userFile, err)
return
}
buf := make([]byte, 1024)
for {
n, _ := fin.Read(buf)
if 0 == n || n > 1 {
break
}
}
switch string(buf[:2])... | 0 |
a0ef1596cc46d1838c067f86a3beb122 | e80a15a0cda180b0d0ae2000f6eab87a | This will be called when the state provider is registered with Diffusion. | void registerProvider(ServiceMetadata metadata) throws HSFException; | 1 |
15200e39c22f80887e3474f171d6e2ea | 2e49467c5c8e0b923e73d40a0ce87725 | Updates the avatar's position and joint orientations. | public class CharacterAvatar : MonoBehaviour
void Update () {
} | 0 |
11ddf2317f3b15080fffd73e55144885 | f925241f2352042b2325c83dbd7c9105 | Signal handler for client process | static void signal_handler(int signal_number) {
append_log(signal_number);
write_consol(signal_number);
unlink(client_fifo_name);
exit(EXIT_FAILURE);
} | 1 |
4469ccce8d88459bdfd1bf4ccb3e5409 | 3cf45be2cbb3b6a4ccf3899c56e79499 | 通过存储过程修改 | {
try
{
SqlCommand cmd = GetCmdByProperty();
cmd.Connection = conn;
cmd.CommandText = sProcedure;
cmd.Parameters.AddRange(procParm);
cmd.CommandType = CommandType.StoredProcedure;
lock (oSqlLo... | 1 |
c7969e1084e1e4c5783a0ecf22939118 | 5d0df47ccf459248642ab7ebcd1f52a5 | Converts sensor type character to the equivalent string | namespace zet
std::string to_string( const SysmanTemperature::temp_sensors_t val )
{
std::string str;
switch( val )
{
case SysmanTemperature::temp_sensors_t::GLOBAL:
str = "SysmanTemperature::temp_sensors_t::GLOBAL";
break;
case SysmanTemperature::temp... | 0 |
5d03c91853d621c4269721e0fa97c19e | b0147e923639d7c71f80d49def376898 | 将 “数据对象” 转换为 “key为下划线分割的JSON字符串” | String toFormatJson(Object obj); | 0 |
598cfca204bb0dd77f42ad9b4fb61d74 | facf5a1a79e85d24477f9f1929a84ec8 | Load the dataset that maps ISO to geo coordinates | def get_italy_map(selection: str) -> Dict[str, Any]:
path = data_path / f"../data/italy-reduced-{selection}.geojson"
with open(path, "r") as f:
data = json.load(f)
return data | 0 |
bd823a8804de58e1c938452d87cba8dd | 2997289c2fa9f0d497b405541c64acca | 获取Dataset的工作模式,Dataset在获取数据的时候,根据工作模式判断是抛出异常还是采用默认值
IDatasetBase.MODE_DEFAULT 在获取列值失败的情况下,采用默认值 | namespace EarthView
namespace World
namespace Spatial
namespace GeoDataset
public class Iqueryfilter : EarthView.World.Core.AllocatedObject
public virtual EarthView.World.Spatial.GeoDataset.EVQUERYMODETYPE GetQueryMode_NoVirtual()
{
int ret=EarthView_World_Spatial_GeoDataset_IQueryFilter_getQueryMo... | 1 |
b867f08d9d042e4e33fb9b80ede44ef3 | 2c63be7749cf0ed61cb9bc12f1991248 | \internal Wątek rozwiązujący nazwę. | void idThread::End( void ) {
assert( threadName.Icmp( "__dead__" ) != 0 );
Pause();
interpreter.threadDying = true;
} | 0 |
c54dd1d5f45d36a34977ecfb45e16089 | eb0e9555d9b2a971c01eca536fab6817 | Logs currently logged in member out of their account. | function logOutMember() {
unset($_SESSION['memberCustomerID']);
unset($_SESSION['lastLogin']);
unset($_SESSION['memberUserID']);
dbDisconnect($db);
return true;
} | 1 |
510526b1ecb27e1d3d8d9a9e8bd6e7bf | 2c67d9bff1f0692c262e592cd1c94273 | Function which compute the anysotropic diffusion filter | def Anisotropic_Diffusion1(img):
gamma = 0.1
step = (1., 1.)
kappa = 50
deltaS = np.zeros_like(img)
deltaE = deltaS
NS = EW = deltaS
out = img.copy()
for ii in range(1):
deltaS[:-1, :] = np.diff(out, axis=0)
deltaE[:, :-1] = np.diff(out, axis=1)
gS = np.exp(-(delt... | 1 |
3f2f1b4872f480943352b2a290f211e8 | 137db6b478c2f1fdb21d6513260e6928 | To make sure the image wasn't corrupted during transmission, the Elves would
like you to find the layer that contains the fewest 0 digits. On that layer,
what is the number of 1 digits multiplied by the number of 2 digits? | r_in = np.array(input(convert_fn=lambda x: [int(n) for n in list(x)]))
oxy = rec_search(r_in, 0, lambda x: np.count_nonzero(x) >= (len(x) / 2))[0]
scrub = rec_search(r_in, 0, lambda x: np.count_nonzero(x) < (len(x) / 2))[0]
return bits_to_dec(oxy) * bits_to_dec(scrub) | 0 |
529513df6e17f6a6bdeb99a9623ce0c1 | fa32ac197cbae5399038f81f5ee0abb1 | 10. STRING | {
string word1 = "Game";
string word2("Over");
string word3(3, '!');
string phrase = word1 + word2 + word3;
cout << "word1 = " << word1 << endl;
cout << "word2 = " << word2 << endl;
cout << "word3 = " << word3 << endl;
cout << "phrase = " << phrase << endl;
cout << "word1[0] = " ... | 1 |
031c5cd346a3e57cd0036fcdf45d11ae | cde51cf5b31da4cc7557fb7637ee07f5 | 用于非管理员通知管理员已解决 | class NoticeService extends BaseService
public static function sendTopicUnDigestByAdmin($uid,$params)
{
if(!$uid) return false;
$tpl = self::AUTO_NOTICE_TOPIC_UNDIGEST;
return self::sendPassiveMessage($uid,0,0,0,$tpl,$params);
} | 0 |
5edc79dda953d086919c68bb8e11d004 | 464a0ad5b5421699f72d0f2109b696d9 | Deletes an advent calendar. | namespace Nest
DeleteCalendarResponse DeleteCalendar(Id calendarId, Func<DeleteCalendarDescriptor, IDeleteCalendarRequest> selector = null); | 0 |
200761aa3bb1d141467c01e24249e937 | f53340679c9d55ad492b50550956ee0f | This override removes the reference to the SQL server connectivity service. | namespace DatabaseWrapper.Core.Providers public class MSSQLDatabase : Database
public override void Dispose() {
throw new NotImplementedException();
} | 0 |
3c3b33bb8c3f8e00a16e7f419bc85c29 | 458ed6e492f62ccf4d2ada6fabe2072b | Check to see if OnDemandPercentageAboveBaseCapacity property is set | namespace Amazon.Kinesis.Model
public partial class DescribeLimitsResponse : AmazonWebServiceResponse
internal bool IsSetOnDemandStreamCountLimit()
{
return this._onDemandStreamCountLimit.HasValue;
} | 0 |
d3ad27a3fe321311015befe11fa4d4e3 | c33165ba722de6f6db262d63dd63ed5a | Enables the spectating camera and disables the main camera | {
SpectatorMode = spectatorMode;
movement.enabled = mouseLook.enabled = true;
} | 0 |
f7cd62e4e8021f0de3af5f975d9767cd | 6818cfc10bd28f588961dc08b3c82f80 | Returns the timestamp of `message` if there is one, or `None` otherwise | function getGBMessageTime(gbMessage) {
if (null === gbMessage || null === gbMessage.header || null
=== gbMessage.messageContents || null
=== gbMessage.messageContents.time ) {
return null;
}
return gbMessage.messageContents.time;
} | 1 |
eb26163cca614e57c64e437f3e753ed8 | 88bb110d619f03787c4112b425731bd4 | Method to delete an existing Raavare stored in the database. | {
$rant_id = Input::get('rant_id');
$rantevou = Rantevou::find($rant_id);
$rantevou->delete();
return Redirect::to('/rantevou');
} | 0 |
211376c5ca88ecf1d772388ee435500e | 1005972561529cb9bc32b6a907eb9ef1 | Refreshes the swap rates. Function is called when the 'Refresh Rates' button from the pricer menu is clicked. | namespace Northwind.Gui.Blazor.Data
public class ExchangeRateService
void UpdateRates()
{
ExchangeRates = new WebService().GetRates();
RatesUpdated?.Invoke();
} | 1 |
5bebbe1daf67ff7e9605d88a1856f30e | e6bd1d12377766ac68f1c7b7a2650363 | \brief Démarre le rendu de la SDL, charge une sauvegarde, affiche le menu du jeu puis le plateau et arrête le rendu lorsque le jeu est quitté | init_SDL(SDL_INIT_VIDEO, IMG_INIT_PNG);
SDL_Renderer *renderer = NULL;
SDL_Window *fenetre = NULL;
SDL_Texture *texture_fond[2], *texture_text[3];
s_map *map = NULL;
SDL_Event event;
int pass = 1;
char *texte[3] = {"Puissance", "TROU 1/2", "Joueur X"};
SDL_Color blanc = {255, 255, ... | 1 |
d3572adaa94ab1eb71f798721789651a | 1bb575bb7af33b4b5aba0530a01f5c3e | Returns a task that should be run next according to FPS Schedule | class Scheduler(threading.Thread):
def fn_sched(self):
pass
return | 0 |
93bf9bd52808bd4df8f1c5e5e541be8f | d367d8605de80cffb759ab2fafb9d75f | Converts a JsonElement into a JsonArray. | {
return element.ValueKind switch
{
JsonValueKind.Null => null,
JsonValueKind.Object => new JsonObject(element, options),
_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Object)))
... | 0 |
44a48b27a7c822bde05964c5c67e45d3 | 1cbeaf1e67fd94e2bb89222918bf0ec8 | Strips an SSH key string of white space and line endings and returns the new string.
key_string
The string to be stripped. | $inString = preg_replace('/\r?\n/', ' ', $inString);
if ($inOptTrimEnd) {
$inString = preg_replace('/(\r?\n|\s)+$/', '', $inString);
}
if ($inOptShrinkSpaces) {
return preg_replace('/\s+/', ' ', $inString);
}
return $inString;
} | 1 |
59b5ca724e5d5681beba228c6d320cf4 | b9a2a120b141247f1a0d39627d963ea2 | 根据坐标获取地图元素 | IElement getElementByPosition(int x, int y); | 1 |
24e0d312d6ef26b53c765de2b09c99c1 | 07ae7f0fba7a55928feb0defe0792b2e | 已经上传的文件展示 | def show_files(request):
file_posts = UploadModel.objects.filter(author=request.user)
return render(request, 'sharing/my_uploading.html', {'file_posts': file_posts}) | 1 |
8e7b48048da3426f789f48d7529b1b8c | 4f71f101c425f1e91d1820741d0f2914 | Retrieved quote history for specified range | public StockQuoteWrapper getStockHistory(String symbol, Date start, Date end) throws Exception; | 1 |
8f91d4f2d58674e1fbbf1a300c90b1fe | 2f5a8dd683e4a5bd84adf18c78fa81f2 | Sets the orderJoinItems attribute of the OrderJoinData object | {
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('SalesOrderitems');
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previo... | 0 |
1bcb060cafd6e93bcadd33899f69bff6 | e34729d4a8e5077c9339551bdbfb1fc2 | Removes parameter from rest like urls
Example "http://bodgeit/fooo/123/foo1/11" => "http://bodgeit/fooo//foo1/" | function removeURLParameters(url) {
var urlparts = url.split('?');
return urlparts[0];
} | 0 |
806ccd5f18e959172d1cd8f86bb2b096 | 6fe380f76e6e44d66c6e29d79d57a9b6 | Returns the meta object for enum '{@link org.eclipselabs.mscript.language.ast.AdditiveOperator <em>Additive Operator</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EEnum getAdditiveOperator(); | 1 |
6179fa1a08bc240586fac90742fceb19 | 7547f722e606a4a21212d7b938d3d152 | 禁用产品类别 | using (ShopContext db = new ShopContext()) {
if (product.Category != null) {
product.Category = null;
}
product.Enabled = false;
db.Products.Attach(product);
db.Entry(product).Property(p => p.Enabled).IsModif... | 0 |
c71fd08ec7afbd95816a3616c8646ed6 | 8e51dcc99b7db413474e1535f72300b2 | Takes in all of the symmetries in a group, chooses 'best' one, removes all other ones from the other nodes | void psOpt<T>::groupBestW(individual* indi, int kNeighbour, vector<T>& bestW){
vector<double> dists(kNeighbour, numeric_limits<double>::max());
vector<individual*> nnIndi(kNeighbour, NULL);
for(int i=0; i<popu.size(); i++){
double dist = 0;
for(int j=0; j<K; j++)
dist += pow(indi... | 0 |
725fbc8a999c4d169ab4322182ec51c5 | 6bffa4e6a29bf05297d87fc46eece504 | 统计企业充值金额数据总数 | public class rechargeDaoImpl implements rechargeDao
public int queryrechargecount(String mobel) {
String m = "";
if (mobel != null && !mobel.equals(""))
m = " where mobel like '%" + mobel + "%' ";
String sql = "select count(*) from members_rechargeview " + m
+ "order by charge_time desc";
try {
Databa... | 0 |
d9494363392417d5e631368bbf7fe9d0 | 3d15e21c188d94a3ace3d42b6cef80c5 | load configuration, default if no config file found | Default = New()
_ = Default.Load(path.Join(os.Getenv("HOME"), ".config", "kaklint.json"))
_ = Default.Load(".kaklint.json")
} | 1 |
a3f15c8e209786b41e1f52cd91776c27 | c1283e96c103290516d13caabe764e59 | Array Division by a Scalar | class FalconArray(np.ndarray):
#
# Addition
#
def div_arr_scalar_elem_wise(a, b):
return a / b | 1 |
84c503d181bb8ac367b1afef627cfc81 | 9e40f3c93bd2b46f56b7865e368f8701 | Removes all the result callbacks specified before. | public function clearCallbacks(); | 1 |
c87a69f438771c2cdd4a2c1f4a298fc9 | f5b37db694e42768dadf5490d4296c34 | Static method for creating a markup open tag string. | class Tag extends Base
public function openHtmlTag($tag, $attributes = '')
{
return '<'.$tag.(empty($attributes) ? '' : ' '.$attributes).($this->isSelfClosingTag($tag) ? '/>' : '>');
} | 0 |
cb53e8f96588ee0d4096f703853bc673 | 05cb2545e8b7f499933825944713cf4b | Calculates the new rating for a player based on their rating prior to the match, the outcome, and the expected outcome. | {
var P1ProbWin = CalculateP1ProbabilityOfVictory(P1Rating, P2Rating);
var P2ProbWin = 1.0 - P1ProbWin;
if(winner == Winner.P1)
{
P1Rating = (int)Math.Round(P1Rating + GetKFactor() * (1 - P1ProbWin));
P2Rating = (int)Math.Round(P2Ra... | 1 |
c2ee1a191ceb9005e0af4e73de31201f | 100b48c0f467dd7aa550480f13e718fb | !
@brief Capture the system time in microseconds | TimeT OS_GetSystemTimeUs(void)
{
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
return (TimeT)(ts.tv_sec * 1000000 + ts.tv_nsec / 1000);
} | 1 |
7fea4b82198d75e0c618d6c1cc4b1b3e | 1fe8d4290085739700bbd12c593d8699 | Changes the set of optical slots occupied in all the traversed fibers of this lightpath | class SlitMask(QObject):
def slitlet_changed(self, slitlet):
pass | 0 |
e7af5011060fe6d2a5dcd3164a2755dd | ea7fc69d7d1e4c105551e2dbcfc75d4f | Returns the number of appointments. | namespace ClinicManagementSystemBL
public class Dashboard
public int GetCountOfAppointment()
{
return dashboardData.GetAppointmentCount();
} | 1 |
cadc82fc8a8e75b955aca3a70203b28a | d25e71bfd94495e76b29ecb0c79f4b78 | gets a mail's x-bcc field | class Office365MailTransport extends Transport
protected function getBcc(Swift_Mime_SimpleMessage $message)
{
return collect((array) $message->getBcc())->map(function ($display, $address) {
return $display ? [
'emailAddress' => [
'address' => $address,
... | 0 |
98b9fe10495c00959279003be018ea36 | eb02694140cdad04a9eaab8e851723a5 | Register for callbacks with the line handler. If we are already
registered and have up-to-date point data, then this will immediately
generate a callback. This behavior is important for generating initial
COVs for event subscriptions. | once = fnn( once, true )
phaseCallbacks[phase] = (cb) and { cb = cb, once = once } or nil
end | 0 |
c585378a0b6f31642d86226cc75e3e7c | 4f142be92bdbf2c4605f72911dc7df16 | 获取拥有者的贴吧列表 | def gettiebalist(name):
tiebalist = []
for i in range(15):
tiebalist.append("http://tieba.baidu.com/f?kw=" + name + "&pn=" + str(i * 50))
return tiebalist | 0 |
35c509bbba925304c7b2470990e71821 | a7d15c83fa11e80c23be0f697085006a | used to know if a topic has changed since we read it last | {
object[,] result = new object[2, _topicIDTable.Count];
foreach (TopicTick tp in _topicIDTable.Values)
{
if (tp.Changed)
{
tp.Changed = false;
result[0, topicCount] = tp.TopicID;
resu... | 1 |
8daf1b72c0e0a36f460806c4e72a8939 | fac0cd86537185bfb57080b00a079a8d | This method determines whether the tiles can be moved right | public class MyKeyListener implements KeyListener
private boolean canMoveRight()
{
for(int i=2; i>=0; i--)
{
for(int j=0; j<4; j++)
{
if(block_Data[i][j]!=0&&(block_Data[i+1][j]==0||block_Data[i][j]==block_Data[i+1][j]))
{
r... | 1 |
e52efc3a9cfc0740317c89c388103b83 | 602b49c02eb870ae6ce3f91689500dd3 | 確認是否在routers_table名單上 | class core_class
function _routers( $file_path )
{
if( file_exists( $file_path ) ){
return true;
} else {
return false;
}
} | 0 |
a732f6033cf6b5b039ba7a5c1f9a9cc2 | 6ad5e9804b30c6b704f7192b6f3ead90 | Checks whether the requested solver backend was found. | class BasicRayTracer(LazyMutableClass):
def exists(self):
return True in self.expected_solutions | 0 |
603e2923f3f41f388529fe502246af7f | 07ac7df9638cc7150abe5af6f5b9378c | Read zmapplus grid (surface mesh); returns triple (x, y, z) 2D arrays. | class GXEMAP(gxapi_cy.WrapEMAP):
def get_grid(self, str_val, nx, ny, angle, x1, y1, x_len, y_len):
ret_val, angle.value, x1.value, y1.value, x_len.value, y_len.value = self._get_grid(str_val.encode(), nx, ny, angle.value, x1.value, y1.value, x_len.value, y_len.value)
return ret_val | 0 |
c699eef743310475612608f25fef1f27 | caf4fa851a04cd8a40643b73b4dfe15f | Sort amino acid codons by occurrence score in descending order. | class RandomTargetAdaptingCodonOptimizer(CodonOptimizer):
def getCodonsForAAThresholded(self, aa):
codonsAndUsageTarget = self.targetCU.getCodonsForAA(aa)
codonsAndUsageTarget = sorted(codonsAndUsageTarget, key=lambda x:x[1])
res = list()
sumUs = 0.0
for cd, us in codonsAndUsageT... | 1 |
3c9782ff41ef64d9762d95a303bc8fda | b4facef729dcfe6245bb11b4509efd87 | Gets all published portfolio items and their categories | class PortfolioCategory extends Page implements ListSource
public function getListItems()
{
return $this->getProjects();
} | 0 |
e6261495cb58060e1fc7e1434ab54d72 | 4a38c4012262f12704b10c2ac92fc198 | Delete each of the filters on this document | export default class DocumentViewGridTable extends React.Component
onClearFilters() {
this.setState({filters: {} });
} | 1 |
a21440a94c19e54ea96d542b15cb1882 | a67bf206685055b0adc45514f8035839 | Envia email segun parametros de configuracion | class mailto
public function enviar_email($asunto,$mensaje, $textoAlternativo, $emailDestinatario, $nombreDestinatario ="",$attach=null) {
$this->mail->From = $this->user;
$this->mail->FromName = NOMBRE_APLICACION;
$this->mail->Subject = $asunto;
$this->mail->AltBody = $textoAlternativo;... | 1 |
8294ea0171ba0401402d44abeb49a720 | e7f8b87615edf5d4656a0ea3d5fba27e | 通知メッセージのクローズボタン押下時処理を行います。 | public partial class Login : System.Web.UI.Page
protected void LnkClose_Click(object sender, System.EventArgs e)
{
try
{
PnlMessage.Visible = false;
}
catch (Exception ex)
{
PnlMessage.Visible = true;
LblMessage.Text = ex.Message;
}... | 1 |
a9fd66c9209cae6a0fcfb2cd77eb3ef1 | 94a5dc7c5b118833d8700fcd54b3ae93 | recupera las tareas al entrar | class TareasController extends Controller
public function index()
{
$tareas = User::find(Auth::id())->tareas;
} | 1 |
582a623cc479a75e279012889b2d1270 | 798d9b58c81f5d37d3a4548bbc32e9bd | Calculates the checksum associated to the files that the build configuration uses. | files = find_monitored_files()
try:
files.remove(RUN_TESTS_SCRIPT_FILE)
except ValueError:
pass
return calculate_checksum(files, RealFileInfo()) | 1 |
d979e189fc31e2f8914e7920d44ee893 | dc1950ed43408bfd82ef7336a2c0b956 | Relación belongsTo | class Ciudad extends Model
public function Estado()
{
return $this->belongsTo(Estado::class);
} | 1 |
9222547ccf242db536272bab5a80c2ba | 054b588a0d52041e5c4fd21aef9fd604 | Luua meetod, mis küsib kasutaja käest arvu ning teeb seda seni kaua, kuni kasutaja on andnud korrektse sisendi | boolean FoundUser = false;
for (User user : users) {
if (username1.toLowerCase().equals(user.getUsername().toLowerCase())
&& (password1.toLowerCase().equals(user.getPassword().toLowerCase()))) {
FoundUser = true;
System.out.println("Anhkete... | 0 |
882d7cf94f4e0f258eaf6cd1def228a7 | 84001a64b1828dc7756d11d058b5ee67 | FromPrinter copies the configuration from an existing Printer | : m_nValidateFlags(rxSource.m_nValidateFlags),
m_sPrinterName(rxSource.m_sPrinterName),
m_sPortName(rxSource.m_sPortName),
m_nDefaultFormType(rxSource.m_nDefaultFormType),
m_sDefaultFormName(rxSource.m_sDefaultFormName),
m_xFormIds(rxSource.m_xFormIds),
m_xFormNames(rxSource.m_xFormNames),
... | 1 |
d7e78705444412ca06805cba41cb1ff2 | 1f893adf6233a9658db8cadad93681ce | 返回yyyyMMddHHmmss格式的当前时间 | public class DateUtils
public static String currentYYYYMMDDHHmmss() {
return getStrByDate(new Date(), "yyyyMMddHHmmss");
} | 1 |
dcdf06a34ddded23871940e1142ffc81 | db644e5a7bc65beaf9e5fd6af99462de | Generates the DTO classes. | final Filer filer = processingEnv.getFiler();
for (ClassModel classModel : classModels) {
final String derivedClassName = deriveClassName(classModel);
final String code = Generator.generate(derivedClassName, classModel);
final String fqn = (classModel.hasDefaultPackag... | 1 |
8d9414458fce0368484414b4e92661ee | 93302f76779d1c38419a393a790833a8 | 檢查是否與 Photon Cloud 連線 | {
if (PhotonNetwork.connected)
{
}
else
{
PhotonNetwork.ConnectUsingSettings(_version);
}
} | 1 |
7f968900e3d98be4b4e6052fe7d45ad4 | 6396ea5e787821dc91d8701d323191a3 | 重设按钮<br>
<p>让所有的按钮均不可见 | for(MElementButton button: mElementButtons)
if(button.getMElement() != null) {
button.setMElement(null);
button.setVisible(false);
}
} | 1 |
52589a7dedeb8876ff8d1e72b24085a3 | 255f998ae0f2c55491296172c95e6f1d | UI state change: switching between 'Add Your Signature' button or the signatre pad | if(i===1)
{
Vm.signBox=true;
Vm.signUpBox=false;
}
else if(i===2)
{
Vm.signBox=false;
Vm.signUpBox=true;
}
} | 1 |
d8340cafb1b3461e2176876984a8824f | a615fa871362b8d772f2ff9ab5c11100 | Converts date from JS (obj) form to NS (string) form | function toLocalDate(dateObj) {
var diff = -1 * dateObj.getTimezoneOffset() * 60 * 1000;
dateObj.setMilliseconds(dateObj.getMilliseconds() + diff);
return dateObj;
} | 0 |
f95bc819dc5501bf93b382e8a938f41d | 480d75e27bec179a19050f9b34947335 | Testing retrieving an unexisting subscriber | class ApiKeyTest extends TestCase
public function test_subscriber_delete_no_key()
{
$response = $this->get('/subscribers/destroy');
$response->assertRedirect('/');
} | 0 |
26bf031970c55326fd4b75f735522cd8 | 63a4cab67b249fd3f7d3e83d3c966187 | Returns all instances of weapons by room Id | List<Weapon> getWeapons(); | 0 |
479cd39fdd948ce119e0a249dba7f0d6 | 3ae2a613fc37fcada4757560d921bd5b | コーチマークを非表示 | void CTerminal::HideProgressBar()
{
m_pcCCSpHackingBarBackGround->SetVisible( false );
m_pcCCSpHackingBarForeGround->SetVisible( false );
m_pcGCSpriteHackingProgress->SetVisible( false );
m_pcGCSpriteHackingCircle->SetVisible( false );
} | 0 |
e69a1c0cd8c4b8e9f028be2ea240f87c | f7d0852d1ad67434ebdd62d336430032 | Check if the area is owned by the current user (discovered from context) | public function isOwnedBy(UserInterface $user): bool; | 1 |
d7606d0ba302094954f74455b9cdc759 | 4c0cb0e49e43ec6cc97ec1e0b29739ad | Required when properties change, such as contrast reversal, or when the video widget changes, such as a resize | public void onPropertiesChanged(); | 1 |
64cc762e2d7468525f773787fe485f9b | 33b954c81f803cf3052df53778b3616c | Servicio Web para Ingresar una Cobertura | $GLOBALS['mensaje'] = "";
$GLOBALS['sql'] = "";
$result = array();
$m = new modelo_creacion(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario,
Config::$mvc_bd_clave, Config::$mvc_bd_hostname);
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$info = $_FILES... | 0 |
d9365c8aa626e1719273ae2d3e79b895 | c1a3ed454ef5691474bca58b92fa21de | Transform stream which returns a comma-separated row of data, terminating in a newline. | const csvStream = format({ headers: true, quoteColumns: { json: true }, quoteHeaders: false });
csvStream.pipe(process.stdout).on('end', () => process.exit(0));
rows.forEach(row => csvStream.write(row));
} | 1 |
0a66d9903df9d8cc1054dc52187b6783 | 659a33e4002a344154c9e115d128f24d | 如果填写了发货和收货地址,就可以计算运费 | $dao = \Dao::Fx_freight_template();
$r = $dao->getInfo($goods_id);
if (!$r) return 0;
$main = $r['main'];
$sub = $r['sub'];
$heavy = $main['heavy'];
if (!$sub) {
if ($main['is_free']) {
$fee['freight'] = 0;
} else {
... | 1 |
13b27b1bc14163663fc1b7450ec44f26 | 7191a6920d7dd329641cac75666110c8 | 获取当前窗体宽度和高度 | function getWidthHeight() {
var wWidth, wHeight;
if (window.innerWidth) {
wWidth = window.innerWidth;
} else if (document.body && document.body.clientWidth) {
wWidth = document.body.clientWidth;
}
if (window.innerHeight) {
wHeight = window.innerHeight;
} else if (document.body && document.body.clientHeight)... | 1 |
12488ec1d4fd2bbb82313aab9685605d | 00885d4e7d2fd37914b93fb20c34d503 | Removes an extension from this format. | {
bool wasRemoved = false;
Guard.ArgumentNotNull(extension, "extension");
if (((Collection<ISyndicationExtension>)this.Extensions).Contains(extension))
{
((Collection<ISyndicationExtension>)this.Extensions).Remove(extension);
wasRem... | 1 |
f8622d3628df3573901e7544b4f34126 | 02d86554e3f3ddbc3f17666dff1a527a | Loads AttributeCollection object from xml | {
try
{
Id = Guid.Parse(xmlReader.GetAttribute("id"));
ExpressionName = xmlReader.GetAttribute("expressionName");
UniqueName = xmlReader.GetAttribute("uniqueName");
FunctionName = xmlReader.GetAttribute("functionName");
... | 0 |
b1e89dc4c3795a6839a490a8280d09b2 | 1eaf4219caf01c53eeb41f7c72e9caea | Tester at reegnskapet er i overenstemmelse over en periode | if (!this.getDatum().equals(t.getDatum())) {
return false;
}
if(t.getVon().compareTo(von) < 0 && t.getBis().compareTo(von) <= 0) return false;
else if(t.getVon().compareTo(bis) >= 0 ) return false;
else return true;
} | 1 |
6fb1eb853208d6e5dcf5636c801c713c | 293dab2d4ebf06470122a1c64ad9176c | 加载句子特征,标签2维 | def load_data_and_labels_tagwords(positive_data_file, negative_data_file):
positive_examples = list(codecs.open(positive_data_file, "r", "utf-8").readlines())
positive_examples = [
[item for item in jiebanalyse.extract_tags(s, withWeight=False, topK=20)] for
s in positive_examples]
negative_... | 1 |
c0c3c9f7ea5f71a5d45183a2dcdb5d86 | d68989d4d4dc3e5b2e64e2fb02c87a9c | 根据问题类型Id查问题全名 | var typeName = "";
for (var ii = 0; ii < dataQuestionType.length; ii++) {
if (dataQuestionType[ii].TypeID == typeID) {
typeName = dataQuestionType[ii].TypeTitle;
break;
}
}
return typeName;
} | 1 |
fb7a26a24d0214b5968c8752740ab0ec | 3eedaa1d0c042be1a2ebaea9309b07aa | <p>
Updates a stack as specified in the template. After the call
completes successfully, the stack update starts. You can check the
status of the stack via the DescribeStacks action.
</p>
<p>
To get a copy of the template for an existing stack, you can use the
GetTemplate action.
</p>
<p>
Tags that were associated with... | public class CloudFormationClient
public String updateStack(JsonNode templateBody) throws Exception {
return client.updateStack(new UpdateStackRequest().withStackName(config.getName())
.withTemplateURL(uploadCfnTemplateToS3(config.getName(), "update", templateBody))
.withCapabilities("CAPABILITY_IAM")
.w... | 1 |
f9bfae8efdcdc6336396d000fa1c8593 | 29e64784a3c7d2ca36e16a6eaab0f39e | # Stan can only take consecutive integers for groups, so turn factors into consecutive integers | gee.factor <- function(covardf){
options(na.action='na.pass')
l.f = NULL
for(i in 1:length(covardf)){
if(is.factor(covardf[,i])){l.f = rbind(l.f, i)}
if(is.logical(covardf[,i])){covardf[,i] = as.integer(covardf[,i])}
}
for(i in l.f){
tempmat = model.matrix( ~ covardf[,i] -1)
for(j in 1:length(... | 0 |
e66cf9beab7483844ab4d7a0593bc2e9 | cff475bfd8d4d755c6e55d433da8ceca | Manage Hyperthreading for an ESXi host system | void syncHypervisor() throws ApplicationException, Exception; | 0 |
7fe100d0cfcfba417424e5168036619d | fe133e38f16f2048793af6bbfa2bfc22 | Returns a cause if the cache is corrupted, and null otherwise. | namespace Org.Apache.Hadoop.Yarn.Api.Records
public abstract class SerializedException
[InterfaceAudience.Private]
[InterfaceStability.Unstable]
public abstract SerializedException GetCause(); | 0 |
b7d759f16c30e3920583f358b266fd10 | 729e2c9a567cf3b3eb8c70a4b2e37f71 | 检测主机连接性 | cmd = 'ping -c %d %s' % (1, host)
p = subprocess.Popen(args=cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdoutput, erroutput) = p.communicate()
output = stdoutput.decode('gbk')
if output.find("ttl=") >= 0:
return True
else:
return False | 1 |
afaaf21bb3ef1ef6c413d897a5fe8968 | 6245e0a09c1b15528175d54c79065393 | Makes initial authenticated request to get Khan Academy user
information | const getUserDataPromise = fetch(`${this._baseUrl}/v1/cohort-26/users/me`, {
headers: this._headers
})
.then(res => this._checkResponse(res));
return getUserDataPromise;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.