query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
67a873d42a87c7901f76b2f51bb9b923 | fe69759416e3d19c45820bb35377072f | Metodo per estrarre il contenuto del file sorgente. | public class printAST
private static String getContent(String FilePath) throws IOException {
StringBuilder fileData = new StringBuilder(1000);
BufferedReader reader = new BufferedReader(new FileReader(FilePath));
char[] buf = new char[10];
int numRead = 0;
while ((numRead = reader.read(buf)) != -1) ... | 1 |
ca2ecf801270db6994de942c62b3c450 | c61da93ce98c5be76646aa36984d2ae5 | Update all relevant timescales for the model based on the current
model parameters | self.electrolyte_concentration_scale = self.c_e_typ
self.negative_particle_concentration_scale = self.c_n_max
self.positive_particle_concentration_scale = self.c_n_max
self.potential_scale = self.R * self.T_ref / self.F
self.current_scale = self.i_typ
self.j_scale_n = sel... | 1 |
6144fb6808fe6a4e139b3d092efb9ec8 | 9c52f63824dc3fa27a4fe82462e0d222 | 同盟全部声望排名 | class AlliancereportController extends BaseController
public function actionAlliancewordview()
{
return $this->render();
} | 0 |
34ba777cd4f173893c28b339fb166c3e | fff16cdfbcc1a48ee41b66e57f73e467 | Determines the state of the slot in 'this' particular instance. | public boolean isSlot(); | 1 |
fbe856954af965c3ebf36475ee45adc7 | 4af934f7e7260a20a138abd9df50134e | Servicio para crear CentroCosto | class ctb_cat_centros_costoController extends Controller
public function create() {
} | 1 |
8eaec7d2d759dda2470662606dac35e9 | 0854529c6b5f7cf0eb5df45d938ee483 | Spawns the object in a circle with a distance of 360/amount degree between each
instantiated object. | float angle = 0;
while (true) {
angle++;
transform.localPosition = new Vector3(radius * Mathf.Sin (Mathf.Deg2Rad *(angle)), radius * Mathf.Cos (Mathf.Deg2Rad *(angle)), 0);
transform.Rotate(new Vector3(0,0, -1));
yield return null;
}
} | 0 |
9a5f608fb47c9f50d56988cde69d1ca4 | 8652a42e9d481029806fe255e7abde09 | Friends update event. | switch (notification.type) {
case 'reaction': {
const friend = new Friend(this, { user: notification.user });
friend.incLove(0.1);
break;
}
default:
break;
}
} | 1 |
900846068e5c13b3236f1221bc16e6da | ee8d450a1ecdf9a21a9bcbab5d17d1ed | determine which squares on play board is empty ( == 0 ) | function emptySquares () {
return origBoard.filter((s) => typeof s === 'number');
} | 0 |
5172b51d848fd9768d181b04814fbe2b | 3badd18eeb9d60647be8684cd11e49ab | Calculate seasonal means and standard deviations for multiple years. | def get_series_mean_stderr(words_time_series, words, one_minus=False, start_year=1900, end_year=2000, exclude_partial_missing=False):
i_year_words = {year:words for year in range(start_year, end_year+1)}
return get_series_mean_stderr_peryear(words_time_series, i_year_words, one_minus, start_year, end_year, excl... | 0 |
e5a8abf3c0d75c24138980df53b35367 | 96ac02d2b1c9e21f3afe51b0b90780e4 | 这个例子用来显示一个计数器。当你点击按钮,计数器的值就会增加: | const [count,setCount] = useState(1)
return <div>
<h1>哈喽 {props.title} ! {count}</h1>
<button onClick={()=>setCount(count+1)}>累加</button>
</div>
} | 1 |
1e5543155c80fee67aab2a5755d5b14c | 3cb9cf659615858db052ad55b64f4f52 | Get the seed from the file. | try {
return findSeed(new URL(url));
} catch (MalformedURLException e) {
e.printStackTrace();
}
return null;
} | 0 |
20428827e33669f7eb220d0d15d1245f | 325156f9e34d7e6eb07ff42492d9fa68 | 连接服务器协程版 | bool isConnect = true;
if (sock != null)
sock.Close();
sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try {
IPAddress svrIp = IPAddress.Parse("127.0.0.1");
IPEndPoint ipep = new IPEndPoint(svrIp, 50000);
... | 1 |
1f653c9a000f8de5507e25b239213194 | 27e5862565f899ec31bd76e8c713a773 | 绘制注视点 | val canvas = texture_view!!.lockCanvas() ?: return
if (faceInfos == null || faceInfos.size == 0) {
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR)
texture_view!!.unlockCanvasAndPost(canvas)
return
}
canvas.drawColor(Color.TRANSPARENT, Porter... | 0 |
d9e6b271e3b3db46cc037ddbef653f1d | af135825d36a3ddae6e3c43ab05c9441 | Try to access an unprotected resource in a webapp that
does not have a login method defined.
This should be permitted. | class ControlPanelTestCase(unittest.TestCase):
def test_controlpanel_view_is_protected(self):
from AccessControl import Unauthorized
logout()
with self.assertRaises(Unauthorized):
self.portal.restrictedTraverse('@@glossary-settings') | 0 |
23748612e39f6e50d9778508d143cec3 | bb46d15c7b689164c30a1f30a395ec58 | Return a l_in by l_out matrix of small random variables. | {
int i,j;
double epsilon = sqrt(6.0/(lIn + lOut + 1));
MatrixXd result(lIn,lOut);
srand((unsigned int)time(NULL));
for(i = 0;i < lOut;i++)
{
for(j = 0;j < lIn;j++)
{
result(j,i) = ((double)rand() / (double)RAND_MAX) * 2 * epsilon - epsilon;
}
}
return... | 1 |
0d00273fe71c3ac95bfc319a688a8fbb | 86f6224e45179895e21f4e3d742b1fe3 | Identifies whether we're holding any dice yet. | public class GambleTrickyCupItem : BaseMonoBehaviour
public bool CheckHasDice()
{
return hasDice;
} | 1 |
e61ea1bbb37d04dcb84fd3f37772d7e6 | 8ea8f58458b560866c7eb7d738c1b4d3 | 根据type查询focus | public class AIMonAttentionPanelDAOImpl implements IAIMonAttentionPanelDAO
public IBOAIMonAttentionPanelValue[] getPanelByType(String type, long typeId) throws Exception{
StringBuilder sb =new StringBuilder("");
sb.append(IBOAIMonAttentionPanelValue.S_State).append("= :pState").append(" and ");
sb.append(IBOAIMon... | 1 |
34e17c74b44c0e36f832756364e2d47f | 293602ab0526a1892d1ab5a79232b81f | returns the i-th combination of k numbers chosen from 1,2,...,n | if n == 0:
return []
else:
data =[i for i in range(1,n+1)]
res = []
self.combineHelper(data, n, k, 0, 0, [], res)
return res | 0 |
292a4bff11ed41648be7c950fddd7068 | 1570fcb73eea382e8f1e445d94d93d94 | Automatically set GNEB image types.
Minima along the path will be set to falling, maxima to climbing and the rest to regular. | obstacle_spacing=None):
stump_height = None
self.climbing_surface_size = climbing_surface_size
self.creepers = True
self.creepers_width = TERRAIN_STEP*0.8
assert(10 >= gap_pos >= 2.5)
self.creepers_height = [max(0,ROOF_HEIGHT - gap_pos - (gap_size/... | 0 |
3c0ab229163be9cac854a8305d60407b | 8f9da2a0c85a6fc32bae851db0bec2b4 | Create random symmetric matrix | def randMat(n):
T = np.matrix(np.zeros((n, n)));
for i in range(n):
for j in range(i, n):
T[i,j] = rd.uniform(-10, 10);
T[j,i] = T[i,j];
return T; | 1 |
c271766e252b2078805a68075fefed1e | cc11b119939fbf55976663a1d8d6f797 | 将数据库实体对象信息拷贝到业务对象UserCompanyDTO上。
plugin author ylfjm. | UserExtraInfoDO userExtraInfoDO, UserExtraInfoDTO userExtraInfo) {
userExtraInfo.setUserExtraInfoIndustry(userExtraInfoDO.getIndustry());
userExtraInfo.setUserExtraInfoCompany(userExtraInfoDO.getCompany());
userExtraInfo.setUserExtraInfoCompanySize(userExtraInfoDO.getCompanySize());
userExtraInfo.setUserExtr... | 0 |
2e746451cdd1a36d21ab0e529a8c68c4 | ed17dc58657f4204bc1b58de09d202cd | finding length of linkedlist by iterative method | int LL_length(Node * head)
{
if(head==NULL) return 0;
Node * temp = new Node();
temp = head;
int count = 0;
while(temp->next)
{
temp = temp->next;
count++;
}
count++;
return count;
} | 1 |
6477fdf5b82146ee115529c3a3cf427d | 957ec2fcec068b06806776df2debc026 | This method goes to the data source and reads the known device file versions. | {
ArrayList VersionList = new ArrayList();
if (File.Exists(filepath))
{
FileStream fs = new FileStream(filepath, FileMode.Open);
StreamReader sr = new StreamReader(fs, Encoding.Default);
string VersionInfo;
Versi... | 1 |
c28875b63a1995290d9555b7337d6355 | ba3ae14f72402ec788c84f436e7d8aaa | Run train ops a certain number of times. | steps_per_epoch = train_ds["images"].shape[0] / self.total_batch_size
total_train_steps = int(steps_per_epoch * FLAGS.num_train_epochs)
eval_every_n_steps = FLAGS.eval_every_n_steps
checkpoint = objax.io.Checkpoint(FLAGS.model_dir, keep_ckpts=10)
start_step, _ = checkpoint.restor... | 1 |
c944ca53771b43ec2f34888b073fde99 | affc6ca802ff87e081d3577a224dc8ee | 索引整站 | $toadyModel = new Today();
$today = $toadyModel->getIndexTag();
$this->assign('today',$today);
$newsModel = new News();
$news = $newsModel->getIndexList();
$this->assign('news',$news);
$branchModel = new Branch();
$branch = $branchModel->getIndexList();
... | 1 |
b0bff896959ff226e100dc7214f68d23 | 3da1622cf2521ac03ecbec4449ec28bf | Deaktiviere den Befehlscache | void FCache_Disable()
{
switch (fcache_mode) {
case 0:
FCache_Writel(SYS_FCACHE_CCR, FCACHE_STATISTIC_EN);
while ((FCache_Readl(SYS_FCACHE_SR) & FCACHE_CS) != FCACHE_CS_DISABLED);
enabled = 0;
break;
case 1:
FCache_Writel(SYS_FCACHE_CCR, (F... | 1 |
8a11bb964744de84ac6b90c26a4c8565 | fcc9e4f1c67731c1fd03ad476f70007b | checks col for duplicates similarly as in checkrow | class Solution(object):
def checkcol(self, col, ch):
for row in range(9):
if self.board[row][col] == ch:
return False
return True | 1 |
ebb4daf90b852d5a7f8bff75055f9762 | 46ca85b5e0870d4f828fa38378b1fb5b | 发送房间临时公告 | $http.post(app.url + '/Rooms/getRoomNotice',
{
rid: roomId,
type: 1
}).then(
function (response) {
var data = response.data;
if (data.sign != 1) {
alert(data.data);
retur... | 0 |
c76b71250b023a91b2270881f7a1bdfa | 1192d08885e7b3aaecbd74eb8fb11abb | Функция, которая будет возвращать правильный индекс, если шаг слишком большой/маленький | if N + 0.5 < (N // 1) + 1:
return float(N // 1)
elif N + 0.5 >= (N // 1) + 1:
return float((N // 1) + 1)
else: return None | 0 |
716689b41384bdedcdce5332a79e3bc0 | 5ebbc8e009c42a304cceb6cbf7aa3af2 | Deletes a Profile from its email | public boolean delete(String email) throws Exception; | 1 |
eb7d4433a52a3adf117701a190d20187 | 0a4eb1f031f5f3a47486fb909f942294 | Auxiliary function for extracting the latent evolution model that the
Generative Model should use. | features = self.extract_features(obs)
latent_pi, latent_vf = self.mlp_extractor(features)
latent_pi = self.mlp_extractor(features)[0]
latent_sde = latent_pi
if self.sde_features_extractor is not None:
latent_sde = self.sde_features_extractor(features)
return l... | 1 |
c2689c8ee0037927cfde36b0b2ae0d67 | 77c9b85563bf2ba4a1a1d88be4c53e7e | 把多个字符串结构用指定的字符串连接起来组成新的字符串结构,
必须为zcString类型,最后一个必须为NULL | String char_join(str_list s, uint8 sp, uint32 size, Boolean is_remove_empty) {
String out = "";
for (uint32 i = 0; i < size; i++) {
if (is_remove_empty && s[i][0] == 0)
continue;
if (i > 0)
out = char_append(out, sp);
out = str_append(out, s[i]);
}
return out;
} | 0 |
03259d91638cb8eaec000b09472e934e | 91d41ec7353e0ce86c521d1566305d22 | it should trim unnecessary spaces | namespace FormulaTester
[TestClass]
public class FormulaTester
[TestMethod]
public void public_toString_spaces()
{
Formula formula = new Formula("5 / 4 +51+ 8");
Assert.AreEqual("5/4+51+8", formula.ToString());
} | 1 |
59fb1dbad4a05210254097333bebe1bf | d6a023537ef553d492a568e98ee982e8 | llena los atributos del formulario con los atributos del objeto | frm.iEjercicioSol.value = aDato[2];
frm.iNumSolicitud.value = aDato[3];
fAsignaSelect(frm.iCveEmbarcacion,aDato[4],aDato[29]);
fAsignaSelect(frm.iCvePuertoProced,aDato[5],aDato[30]);
fAsignaTimeStamp(frm.dtArriboProgramado,frm.hArriboProgramado,aDato[6]);
fAsignaTimeStamp(frm.dtZarpeProgramad... | 1 |
fc1017eec74f09c6d7291f625eac0091 | 9e90a187c0c78c25da1e93217cc60512 | Deletion-based MUS extraction.
(Try to delete clauses in the given approximation one by one.) | pick='maxvar', transform='indep', lmbda=0.5, tau=0.25, rng=None):
rng = check_random_state(rng)
num_users = len(group)
_LOG.info('running musm, {num_users} users, k={set_size}, T={max_iters}',
**locals())
uid_to_w1 = {uid: None for uid in range(num_users)}
w, x = problem.selec... | 0 |
a502d7ca38fd628e9933e2a533f15058 | e27ed4ff0ca5fde11b82b0bde48546f5 | Interpreter that communicates with a Galil Controller. | void CMD_INTERPRETER(char *data) {
if ((data[0] == 'G') && (data[1] == 'O')) {
UART1_WRITE("START\r\n");
activeFlag = true;
}
else if ((data[0] == 'S') && (data[1] == 'T')) {
UART1_WRITE("STOP\r\n");
activeFlag = false;
MOTOR_STOP('r');
MOTOR_STOP('l');
}
else if (data[0] == '\r' && data[1] ... | 0 |
7ef42e5485b4b571c044f5488eba65af | a1713aaa2d9d2234c0cdfa413dc89720 | Returns twitch url. | class Twitch extends AbstractProvider
public function urlAuthorize()
{
return "https://api.twitch.tv/kraken/oauth2/authorize";
} | 1 |
ba4ea0260b5a721a8fdf9037063d79a8 | cfbc91f81e9778c589bd964e311fb45a | Returns an array of book names | class JsonLibraryMapper
public function getBookTitles()
{
return array_keys($this->library);
} | 1 |
a64a81eb205e4ba8ce2d2a47b4fbf94b | ade51d2069db17e75f4d7ef88393ed6d | Tests the getPicture method. | ItemPictureActivity activity = (ItemPictureActivity) getActivity();
ItemPictureController ipc = new ItemPictureController();
GiftCard gcard = new GiftCard();
assertTrue(gcard.getSize() == 0);
ArrayList<ItemImage> itemImagesList = new ArrayList<ItemImage>();
assertTrue(it... | 0 |
b86c6eb1e4cbd14dbacc411a166c87fa | edf73036db3a6761074d67434512d711 | Tests the student details view when student is found. | response = self.client.get(reverse(self.view_name, args=[self.instructor_2.id]))
response_body = json.loads(response.content.decode('utf-8'))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response_body['pk'], self.instructor_2.id)
self.assertTrue('ww... | 0 |
b7f8eb1fb9b7538055cd3a3126d7e935 | 4d70a02ea1da7b9ab0e689da40550151 | 当知道部署环境后,初始化hostName和hostIp,方便其他地方用到 | {
string hostName = Dns.GetHostName();
this.servername.Content = "主控设备" + hostName;
IPHostEntry hostEntry = Dns.GetHostEntry(hostName);
foreach (IPAddress ipaddress in hostEntry.AddressList)
{
if (ipaddress.AddressFamily.Equals(AddressF... | 1 |
954db0c8f6db3f3990f6c12ea0639a91 | de792eaa3902a1c10bc5bfbcbfa188bd | ALS enabled, no interrupts | alsInit(void)
{
GPIOPinTypeGPIOOutput(BSP_ALS_PWR_BASE, BSP_ALS_PWR);
GPIOPinWrite(BSP_ALS_PWR_BASE, BSP_ALS_PWR, BSP_ALS_PWR);
GPIOPinTypeTimer(BSP_ALS_OUT_BASE, BSP_ALS_OUT);
SOCADCSingleConfigure(SOCADC_12_BIT, SOCADC_REF_INTERNAL);
} | 1 |
73092709d372ff0b9face89ac7f0e125 | 6f68d8bde935bb283e1b010168a9db37 | 将DFA的当前path用蓝线标明 | class Node:
def make_path(self):
self.color = PATH_GREEN | 0 |
8291f1e44cbb72b4aa5d491f90030dd4 | ed379dbd8b8eb8b3925d321aa399cad9 | 根据Ip获得主机名 | InetAddress inet;
try {
inet = InetAddress.getByName(ip);
return inet.getHostName();
} catch (UnknownHostException e) {
e.printStackTrace();
}
return "";
} | 1 |
dac0220faa1adfcca611eca14ef912bf | 91d31d0e16ce34cb336e879f45bd29ab | Ensure the event is completely unsubscribed when the explosion is destroyed. | if(event.phase == "ended") then
local explosion = event.target
explosion:removeSelf()
explosion = nil
end
end | 0 |
e86a1d8df46bc6baa10d51dc2cee3a9d | 71eb461acf3d88c2edac4dbd7c78b52c | Quadratic bezier - one handle | {
float s = 1.0f - t;
Vector3 Q0 = s * GetBezierPoint(iFirst) + t * GetBezierPoint(iFirst + 1);
Vector3 Q1 = s * GetBezierPoint(iFirst + 1) + t * GetBezierPoint(iFirst + 2);
Vector3 Q2 = s * GetBezierPoint(iFirst + 2) + t * GetBezierPoint(iFirst + 3);
... | 0 |
ce4ad3fbe20455b932d65ee33140f7da | 3719bc3e52b3128d3b4a795ae1ad3473 | Returns the mean and standard deviation of the sample as a tuple. | class MomentTracker:
def get_moments(self):
means = self.m1 / self.counter
variances = np.maximum(self.m2 / self.counter - (means)**2, 0)
stds = np.sqrt(variances)
return (means, stds) | 1 |
e6e83e49ee07dcaa38cf3b9ea4548bc3 | 60c69dba9aa8ab16e031292d12d04381 | Test generation of DataFrame from management file. | df = self.f.as_dataframe()
assert isinstance(df, pd.DataFrame)
assert len(df.ix[0]) == len(self.check_fields)
assert list(df["total"]) == [16, 30, 0] | 1 |
8ec9496cf6409a2f0f06c2ce47531b77 | a77ec43594cfcecb58b94f96349e08c7 | 创建手动备份。
Please refer to HUAWEI cloud API Explorer for details. | export class GaussDBforopenGaussClient
public createManualBackup(createManualBackupRequest?: CreateManualBackupRequest): Promise<CreateManualBackupResponse> {
const options = ParamCreater().createManualBackup(createManualBackupRequest);
options['responseHeaders'] = [''];
return this.hcClient.sen... | 1 |
fe9b53fd43512b22ac1b2a564c69195f | 2171f97aba52e7562d5de9441162076a | セッションキーを解除して暗号化をOFFにする | {
$storage = new MrClay_CookieStorage(array(
'secret' => UserConfig::$SESSION_SECRET,
'mode' => MrClay_CookieStorage::MODE_ENCRYPT,
'path' => UserConfig::$SITEROOTURL
));
$storage->delete(UserConfig::$impersonation_userid_key);
} | 0 |
9115ebac35e3420514ba98c3ef5306da | b0446b96d537aee85d2db5f385bdef27 | Returns the duration of the MIDI event in seconds | namespace CWDX class MorseSymbol
public double getDuration() { return _row.Item2; } | 0 |
5f8acc82d79fe65c3edc381b917b2121 | 653df21c8a2d9d9ce9b869bf25996247 | Fetches entry from log file at provided cluster-wide index in shared log. | assertSegmentOpen();
checkRange(index);
long offset = relativeOffset(index);
long position = offsetIndex.position(offset);
if(position == -1)
return null;
int length = buffer.getInt(position);
try(Buffer slice = buffer.slice(position + INTEGER, length)... | 1 |
99f6ed16985059d9b324f89da383cef0 | ae677392718d50bd2de07b0d7db2feab | Setter for <code>WETRN.DLY_BILNG_OSL_TEMP.OFFR_SKU_LINE_ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DlyBilngOffrSkuLineRecord extends UpdatableRecordImpl<DlyBilngOffrSkuLineRecord> implements Record13<BigDecimal, BigDecimal, BigDe... | 0 |
4d9b38ba4b101259b96057490f7deaca | d0c8cf61e6c43768e3e5ee1eb354ba35 | Locks the buttons if necessary. | {
throw new BadMethodCallException('Buttons do not support data locking.');
} | 0 |
49c7d666c917f1d2b91da5ddcedb4c3f | 88d397b74b78a21d1ccb7c62c6283acf | Returns the dimensions associated with this feature
structured into groups by section title. | class ICatalog(IOLAPSchemaElement):
def getDimensions(unique_name=None): | 0 |
7de5cce9522d766d1d10c6d010824ab9 | 287d20da9c935153f9ef4b78dfb60783 | okToFill | int fillCount = 0;
foreach(TileBlock tb in slot) {
if(tb != null)
fillCount++;
}
return (fillCount < 2);
} | 1 |
8b1d43008beb637990d0dfd9484cf866 | e93d743c560d101285fb00d21b55b66d | This is called from the IO thread, and dispatches the callback to the main thread. | namespace mozilla namespace image class NotifyDecodeCompleteWorker : public nsRunnable
static void Dispatch(Decoder* aDecoder)
{
MOZ_ASSERT(aDecoder);
nsCOMPtr<nsIRunnable> worker = new NotifyDecodeCompleteWorker(aDecoder);
NS_DispatchToMainThread(worker);
} | 1 |
80ee71caf51dc527bf36fb6808e52b1a | c111727e234b116823ba55d7c58aaa59 | Verify error on case where nothing is available to scan. | def test_get_scans_notfounderror(api):
with pytest.raises(NotFoundError):
api.scanners.get_scans(1) | 1 |
6d3961ad04767a8b6b0e89ad99c641c9 | 4a78d65abc09b45472257d62f997b2ca | GetPhotoByID returns a saved photo by its ID | func DeletePhoto(context *gin.Context) {
} | 0 |
78bd59c52760cf28f60af30fea8b34b2 | b5ff054713e88531854a964b589a5f96 | La instancia del objeto ODS es este control | class EstucheControl
function EstucheControl(){
$this->acceso=new AccesoDatos();
} | 0 |
47044bba88f464b107ca59fb8ed086c3 | ca313eca81cb702099520f872659b2dd | Fire off any deferred garbage collection | namespace Schlix
public static class Util
public static void forceGarbageCollection()
{
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
GC.WaitForPendingFinalizers();
} | 1 |
4d4a7384c3af158319fa6c266ba1ecf1 | f2758454eb4b8fa0e36605ac38176f09 | Create the stage element id data SQLite table. | c = conn.cursor()
sql = 'CREATE TABLE IF NOT EXISTS ' + TABLE_NAME + \
' (id INTEGER PRIMARY KEY AUTOINCREMENT, pid TEXT UNIQUE, pid_metadata TEXT UNIQUE,pid_package TEXT UNIQUE,' \
' file_loc TEXT,file_name TEXT UNIQUE, md5_hash TEXT,' \
' version integer DEFAULT 1, date_created D... | 1 |
79d31a3dcc80471346b7cdff5057df7b | ca49e44b0ca875ad57a9ee9b8705c670 | 设置用户的答案描述(备用) | @Table(name = "t_user")
public class TUser implements Serializable
public void setUserQuestion(String userQuestion) {
this.userQuestion = userQuestion == null ? null : userQuestion.trim();
} | 0 |
1db50109312c7acf32ee218e53fb4ecb | 8c43e9a27db39ddc295565490c1eb79c | Puebla los campos del formulario del asistente con la informaci�n que se
pueda obtener de la refactorizaci�n existente que se est� editando. | txbImpactDate.type(event.getImpactDate());
txbAffectedEmployees.type(event.getNumberOfPotentiallyAffectedEmployees());
txbServedEmployees.type(event.getNumberOfEmployeesServed());
if (event.isTradeAffected()) {
rbTradeAffectesYes.click();
} else {
rbTradeA... | 1 |
a429a5aa534a546b3287fed4026ec3f3 | efedb35d7cb02d5cb4f9d602fda5c472 | 判断字符串是否全为双字节字符 | public class StringValidation
public static boolean isDoubleByteCharOnly(String str) {
String regex = "^[\\u0100-\\uffff]*$";
if (isNullOrEmpty(str)) {
return false;
}
return str.matches(regex);
} | 1 |
1b9e829857f5a17731655dbe54cf12f8 | b0220a8e835e49923f31c435697455aa | Ao confirmar pedido, deve gerar um número | namespace BaltaStore.Domain.StoreContext.Entities
public class Order
public void Place()
{
Number = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 8).ToUpper();
} | 1 |
10fb5f5976507de8b98c1d111ae974a4 | 7231463984f06b4993522e5853f654c0 | The command line interface to the tool. Parses the command line arguments,
computes the dependency graph, and generates the preferred list. | def main(argv: List[str]) -> None:
args = parse_arguments(argv)
mg = make_graph(args)
format_graph(args, mg) | 1 |
a7f0d6f51dac5e2b6a559d36a4b722f2 | ffd849afd16d8c125f48c82d14445bae | Genereert javascript-code.
Maakt een "collector" aan van alle velden die er in alle formulieren staan.
De waarden van elk veld komt zo in een object te staan met de naam van het veld.
Je moet ofwel 1 enkel form doorgeven ofwel een array van forms. | class Form
collectData() {
let params = {};
app.$.forEach( this.fields, field => {
let key = field.getAttribute( 'name' );
let val = '';
let tag = field.tagName.toLowerCase();
let type = field.type ? field.type.toLowerCase() : '';
if ( type === 'checkbox' ) {
val = field.checked;
}
... | 1 |
f4d4af65e57df95851f6e8d4ed7cdf9c | 428373f0bca8532468607e539fa315fb | 冻结优惠券 | class ReduceTicketService extends BaseService{
public function unFreezeBonus($uid, $requestId){
try {
$data = D("Financing/ReduceTicket")->unFreezeReduceTicket($uid, $requestId);
return $data;
} catch (Exception $e) {
throw_exception($e->getMessage());
}
} | 0 |
d5e5bb29654eca0a499ed5258c2dbcd9 | ca1c9089e10f235c8b2d7e972854843e | called when the player collides with the platform | public class PlayerController : MonoBehaviour
void OnCollisionStart2D(Collision2D coll)
{
if(coll.gameObject.tag == "Platform")
{
rigidBody.velocity = new Vector2(rigidBody.velocity.x, 0);
}
} | 1 |
ee1ad2b00314751d830d2caf2f1fd105 | a057c8febd45f4da2aa4558934006cb8 | the square of one of the sides is equal to the sum of the squares of the other two sides (You should check all three combinations) | if (a ** 2) + (b ** 2) == (c **2):
return True
else:
return False | 0 |
fc7549f02a02cdcc571835e6f205d85f | 29f95aaa8144816025b2a727770cdf16 | Returns the value of the '<em><b>Inverse Of</b></em>' reference.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Inverse Of</em>' reference isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | boolean isInvert(); | 0 |
1a30e586da31ec6062cf09668080af1c | d48baf42e76ccde4cb4bf9231d2c34a5 | Reconnects to OPC Server if the disconnection flag is set. | namespace KuCoin.NET.Services
Task<bool> Reconnect(bool flushSubscriptions); | 0 |
e108672e0737b28b3fba56cddf8c4476 | fa92000eca7f0233cbce2ff08541511a | 重置sw_db_select对象 | class DataBaseInstanceModel extends DataBase
public function _reset_select() {
$vars = array(
'_select' => array(),
'_join' => array(),
'_where' => array(),
'_like' => array(),
'_instr' => array(),
'_group' => array(),
'_having' => array(),
'_order' => array(),
'_distinct' => false,
'_li... | 1 |
6252b712a5a62bee5cb2027c3c1dbd7d | c3040db01af7b2e30b5d795595d13eca | Load dropped filepaths | {
int count = DragQueryFile(hDropInfo, 0xFFFFFFFF, NULL, 0);
for (int i = 0; i < count; ++i) {
wchar_t filepath[MAX_PATH] = { 0 };
if (DragQueryFile(hDropInfo, i, filepath, MAX_PATH) > 0) {
m_EditControl_FilePath.SetWindowTextW(filepath);
}
}
CDialogEx::OnDropFiles(hDropInfo);
} | 1 |
080ab885f352b00a72137f55b33b8007 | 8ad5a37c2af2637024af8c1ec38c3471 | Get OAI-PMH data based on the aggregation. | _aggregate = {}
for key, value in self._build_aggregate_items(req, aggregate):
if isinstance(value, datetime.datetime):
value = value.replace(tzinfo=None)
_aggregate[key] = value
return {"aggregate": _aggregate} | 0 |
46db172701db536e1b0fb61b7e120e58 | 1ffd59d9456df453af0ac550f78527fb | get number of testimonials | class TestimonialController extends Controller
public function index() {
$testimonials=Testimonial::orderBy('id', 'DESC')->get();
$num=1;
return view('admin.testimonials.index', compact('testimonials', 'num'));
} | 0 |
d1e991f6e05e5ad5a3874454cd90175c | 0711bb2ed8695a568b5ab010cd53fa53 | GET: GameITModels/Create | {
ViewBag.PlayerId = new SelectList(db.Players, "PlayerId", "Name");
ViewBag.TeamId = new SelectList(db.Teams, "TeamId", "Name");
return View();
} | 1 |
d8cce931e1053f23601448422ceaa1d8 | 7210919a9892997ccd982f1b4225c3a1 | \test returns true for state == leaf | class GenericT(object):
def testLeaf(self, curr):
if (curr.n_depth == Params.maxHeightAdaptiveGrid) or \
(curr.n_data is None or curr.n_data.shape[1] == 0) or \
(curr.n_count <= self.param.minPartSize):
return True
return False | 1 |
e73d4e12322396df11518fd6b2d53873 | 5161580bf64fd825bc19196527c0e89c | GenMessageChangePlayer 更换出派人消息 | void CGensSystem::CGGensSystemMemberRecv(PMSG_GENS_SYSTEM_MEMBER_RECV* lpMsg,int aIndex)
{
#if(GAMESERVER_UPDATE>=501)
if(gServerInfo.m_GensSystemSwitch == 0)
{
return;
}
LPOBJ lpObj = &gObj[aIndex];
if(gObjIsConnectedGP(aIndex) == 0)
{
return;
}
this->GCGensSystemMemberSend(aIndex);
#endif
} | 0 |
2044ec5342e41a87065fa299a2701d66 | 196a4d0fa5c2329b929323a5fdee918d | Averages normals of adjacent polygons. | void calcAverageNormals(unsigned int * indices, unsigned int indiceCount, GLfloat * vertices, unsigned int verticeCount,
unsigned int vLength, unsigned int normalOffset)
{
for (size_t i = 0; i < indiceCount; i += 3)
{
unsigned int in0 = indices[i] * vLength;
unsigned int in1 = indices[i + 1] * vLength;
unsigne... | 1 |
3309c04d4e7c38331a41d13be18c4f40 | 4ed9bb1b702717bbf2effc21ccf89267 | GET: Admin/DynamicFeatures | namespace Forum.Controllers
public class FeaturesController : Controller
public ActionResult Index()
{
return View();
} | 0 |
3a3302b4ccd8dd6a67aabe5155138bed | 6e7d36654155fad243a3d94cefdd5ecd | KM算法。 | class Matrix(object):
def KM(self,default_score=None):
n_usable = self.get_usable_n_num()
m_usable = self.get_usable_m_num()
if m_usable <= n_usable:
matches, _sum = self._km_one_round()
else:
self._reset()
matches, _sum = self._km_multiple_round(defau... | 1 |
7573f31e00d7ea8f980bfec837909b8c | ac14b882bf645119119974f4925acbcc | Retorna JSON com os feeds de um determinado personagem | persons = User.objects(ownID=userid).first().persons
results = []
for person in persons:
results.append(person.to_json())
return results, 200 | 0 |
6b646c635ce20e8023a84675e57a2aff | 942a2bb1e50fd93d555f716e9bc753eb | 顯示所有行程內容(依出發時間排序DESC) | class TripsController
def index
@trips = Trip.order(:sdate => "DESC").all
end | 1 |
7f8c0c67ddc37b5ea5f2442e242727fa | 744afd3c2dec205465fd8d4c8feedc94 | |--------------------------------------------------------------------------
| サインアップ画面
|-------------------------------------------------------------------------- | class SingInController extends Controller
public function index(Request $request)
{
} | 0 |
3aa582ce58365df4e5aff82d7f409720 | 1151977049456b7dfd77ceeed22467af | Emits true, if the user has access to the hunt, false otherwise. | namespace MyJobLeads.DomainModel.Queries.JobSearches
public class IsUserAuthorizedForJobSearchQuery
public bool Execute()
{
return _unitOfWork.JobSearches.Fetch().Any(x => x.Id == _searchId && x.User.Id == _userId);
} | 1 |
b239ed22b5605f29831747035e3a9c2b | 808d9848655b95c2be7e0e89a9963b26 | Checks whether HashTable has a record of the word being
already recorded
Return the WordNode in the HashTable slot for easy appending | {
unsigned int checkHash = hash(word);
if (table[checkHash] != NULL)
{
node *checkPointer = table[checkHash];
while (checkPointer != NULL)
{
if (strcasecmp(checkPointer->word, word) == 0)
{
return true;
}
checkPointer = ... | 0 |
0cd1a7dd92aa685cb1822bd0aad96b5f | b043cecfd8135ce1ee67ed30f290cef5 | 当前总体上执行到的步骤 | public class MasterData extends QueryResult implements Cloneable
public Integer getCurStep() {
return curStep;
} | 1 |
9e829029015f0f14af03b004b86adaac | 6321796b07205dced44cabecfb2c11df | Adauga incident pe harta pornind de la coordonate geografice (latitudine, longitudine).
Intoarce id-ul unic (dpdv al layer-ului grafic) al punctului adaugat. | Point pointProj = (Point) GeometryEngine.project(point, wgs84, map.getSpatialReference());
Graphic pointGraphic = new Graphic(pointProj, symbol);
return graphicsLayer.addGraphic(pointGraphic);
} | 0 |
a748d07f6993988ae7c04e995eb578ad | c626fc943cc139d5a786e21f6828060d | Input:
npimage - 2D numpy array containing the image pixels
raw_file_name - if no `npimage` is provided, the image can be loaded from this file
Output:
(wavelength, intensity) - two tuples describing the resulting spectrum | hdu = fits.open(filename, mode='readonly')
header = hdu[0].header
data = hdu[0].data
if len(hdu[0].data.shape) == 2:
data = hdu[0].data[0]
if len(hdu[0].data.shape) == 3:
data = hdu[0].data[0][0]
data = data.flatten()
flux = data
dnu = float(header["CDELT1"]) if 'CDELT1' ... | 1 |
d0725cba520e9fbd2e8b280b50c5d45c | 24eaa9dbe5ea02bbf90bff34e9bec845 | 当结转的时候,授信明细中的申请日期和到期日期自动加当前授信品种的授信期限 add 卢士宏 | @Service
@org.springframework.transaction.annotation.Transactional
public class CrtBizApplyServiceImpl
public Integer retDateTerm(String qxdw, String qsrq, String dqrq) {
Integer a = 0;
if ("Y".equals(qxdw)) {
a = (Integer)accountDateYear(qsrq, dqrq);
} else if ("M".equals(qxdw)) {
a = (Integer)accountDateM... | 0 |
0aa6a0d85d69161b21206e95c495aa94 | 269979c6546c57ba219603245fb8e25e | Set the nature menu10. | public final class Resource extends ProjectEntity implements Comparable<Resource>, FieldContainer
public void setText10(String string)
{
set(ResourceField.TEXT10, string);
} | 0 |
036d12af76f80d88a8447c973f493a5f | e933846d72f0944c5b05329e894caee4 | 通过用户组id查询用户组名称 | SqlSession sqlSession=MoreDbTools.getSession(MoreDbTools.DataSourceEnvironment.slave);
DgnaMapper mapper=sqlSession.getMapper(DgnaMapper.class);
String result="";
try {
result=mapper.groupNameById(id);
sqlSession.close();
} catch (Exception e) {
e.printStackTrace();
}
return result;
} | 1 |
2e78c7c1ce59a875a30e95d33322f901 | e2918fa88028c800328e25669cb8a0b1 | Function to set the name of the elemental property used to define
radii.
By default uses the "MiracleRadius" property which is from an
assessment by Miracle et al. [2]. | class MERLINReduction(ReductionWrapper):
#------------------------------------------------------------------------------------#
def set_custom_output_filename(self):
def custom_name(prop_man):
ei = PropertyManager.incident_energy.get_current()
run_num = PropertyManager.sample_run.run_number()... | 0 |
788946508fe000d0b6c7433815f4ab34 | 49a5c77493c9f3e09c62eeb3a0927208 | Return a list of all of the rationale reasoning steps that the store
knows about. | public Collection getAllRationales(); | 1 |
c0733c6712d2bbeab9de5df97498a58b | 8d453913cb56b58ebd9a80adf9a6b0c4 | 检查groupName是否重复 by ycj 20171007 | public int checkGroupForinsert(@Param(value="groupName")String groupName); | 1 |
423d0d65a2f7965c3f0d42696e11c0e3 | 03dcd0962b3776a12a46bee4abb91a92 | ADAPT HERE | def no_adapt_baseline(source, target):
base_path = "../work/%s-%s/" % (source, target)
pivots = set(load_pivots(base_path + "/pivots", "P"))
src_nonpivots = set(load_pivots(base_path + "/nonpivots", "S"))
tgt_nonpivots = set(load_pivots(base_path + "/nonpivots", "T"))
vocab = set()
vocab = vocab... | 0 |
135f4b052017aeb26abb861dc280af9d | 810dac27027db133c166f35ee56c8c72 | 设置本地播放源 | class AVEditorView : GLSurfaceView, IYUVDataListener, Runnable
public fun setEditSource(source: String?) {
mDataSource = source
mIPlayer?.setDataSource(source)
} | 1 |
30d7e3509d7dc6d08870b99d56199018 | c715755ea8a568d864177e42538e5d61 | Calculates the number of tiles for the specified zoom level. | namespace TreeGecko.Library.Geospatial.Helpers
public static class TileHelper
public static uint MapSize(int _levelOfDetail)
{
return (uint)256 << _levelOfDetail;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.