query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bfea0edd827d3b40c5f72aca29174752 | 91349daeb729a19fccbfc1c44633fb80 | 2x2 linear equation solver. Components may be scalars or numpy arrays. | def solver(a,b):
val = np.linalg.solve(a,b)
return val | 1 |
a49cf378ea140654d95c029d75ac9844 | bd0115051b75f88e585e160bd3363d25 | Emits once the discovery document has been loaded and the id token has been
processed, or immediately if subscribed to after the aforementioned has
already occurred. | return new Promise((resolve, reject) => {
this.mqrEvents.once('selfSubscribed', ({ error }) => {
if (error) {
return reject(error);
}
return resolve(true);
});
});
} | 0 |
0852fc68909210e3189bd5789a65bc26 | 741f5e02ac25cd7950ec0bd202c0d39f | Remove nodes around the border of a motif | void C2DMesh3::FillBorderNodes()
{
size_t elem_size = m_elements().size();
if (elem_size == 0)
return;
std::unordered_set<CEdge> edges_hash;
for (size_t i = 0; i < elem_size; i++)
{
C2DElement3& el = m_elements()[i];
for (int j = 0; j < 3; j++) {
CEdge edge_from_element(el.n[j], el.n[FemLibrary::Utils::N... | 0 |
ecd9ec031b3d164ae8590afa62aa11e4 | 6f9e8d1ddc055ba6a76d71e53ddf4277 | Print out cdwVcfFile. Separate fields with sep. Follow last field with lastSep. | void chromGraphOutput(struct chromGraph *el, FILE *f, char sep, char lastSep)
{
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->chrom);
if (sep == ',') fputc('"',f);
fputc(sep,f);
fprintf(f, "%d", el->chromStart);
fputc(sep,f);
fprintf(f, "%g", el->val);
fputc(lastSep,f);
} | 1 |
dac93edbe7c5dd2569e13ce8cefb4034 | 91367c58a20a710eec03388b50170d75 | Переход к торговым точкам | namespace Bot.Forms
public partial class MainForm : Form
private void BotButton_NextTownTrading_Click(object sender, EventArgs e)
{
try
{
if (BotComboBox_TownListTrading.Items.Count < 1)
return;
if (BotComboBox_TownListTrading.Selec... | 1 |
1c8797f56db310b5ce83b6d7725b88a2 | d7efe631e37305208b40c7529284823d | This method sets the ports used to send and recieve messages
and must be called prior to calling Send(). | namespace StealFocus.Core.BizTalk2009
void StartSendPorts(string[] sendPortNames); | 1 |
b6e3d3c994a0f8b7214f9a902ee41904 | 7797f266b0967f09f64604ba621e8d67 | @brief Internal function to initialize feature state. | {
uint32 nv_index = 0;
gstk_nv_items_data_type read_data;
for (nv_index = 0; nv_index < gstk_shared_data.gstk_num_of_instances; nv_index++)
{
gstk_nv_cache.me_items.me_feature_bmask.value |=
gstk_nv_cache.slot_items_ptr[nv_index]->feature_bmask.value;
}
if(!(gstk_nv_cache.me_items... | 1 |
3efe2ea7abf9857031090cee026cd0ee | 4617622da0dc577d4602cf3214332ead | This method solves the problem using a Greedy Destructive Algorithm. | namespace TSP
class ProblemAndSolver
public void greedySolution(bool usingForBssf = false)
{
Random r = new Random();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
for (int total = 0; total < 10; total++)
{
bool valid = ... | 1 |
44b4898d510222c06c0ef06bc5f724ca | c73c3b2f70d490916eb53964e98611c6 | Cette méthode s'occupe d'afficher le plateau du jeu en passant le tableau des états des cases en paramètre. | public class Plateau
public void affichagePlateau() {
for (int l = 0; l < ligne; l++) {
List<String> chain = new ArrayList<String>();
chain.add("[");
for (int c = 0; c < colonne; c++) {
Case ca = getCase(l,c);
int valeur = ca.getValeur();
... | 0 |
5fca1043c7621d4a6075354e9028dcfa | 8c0287a5b374c696b5bbc96570a4d866 | Returns the distance between to tiles | namespace VH
public static class GridUtility
public static int GetDistanceBetweenTiles(Tile tileA, Tile tileB)
{
return GridUtility.GetDistance(Mathf.Abs(tileA.x - tileB.x), Mathf.Abs(tileA.y - tileB.y));
} | 1 |
f4d6d0046e2168ac8739db94610c84ee | 80424a21c55170cdad8dae39e5dcb14b | https://stackoverflow.com/a/45587730 | function copyTextToClipboard(text) {
var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
... | 1 |
1b029a2f4f8ae9e1908d78588bf7fd1f | 70f8482f6386c1f56a05e4f7d29b0fef | 把每个人每天的状态都设置进去 | public class UserManager
private void changeAllDataStatus() {
BaseActivity.updateActivityData(1);
BaseActivity.updateActivityData(5);
BaseActivity.updateActivityData(20);
BaseActivity.updateActivityData(21);
BaseActivity.updateActivityData(22);
} | 0 |
d1429e2d0a90c9a027a449004dd20cff | 9271c0faaff462f93cbf249bb362f271 | 不輸入帳號、密碼登入 | public void testCase12() {
driver.get("http://localhost:8080/admin");
WebElement loginId = driver.findElement(By.id("loginId"));
WebElement loginPasswd = driver.findElement(By.id("loginPasswd"));
WebElement loginBtn = driver.findElement(By.id("loginBtn"));
loginId.sendKeys("notadmin");
loginPa... | 0 |
7ccecd59b384c487f1bd652bc9bd222d | d4c68497f6e08637840569ae855e9749 | Determines if the {@link PingHistoryPanel} should show labels on selected points. | public void setShowLabels( Boolean isShowLabels ); | 1 |
554f83ed7b80d1a2952034284d8ab63d | 9ed33e47710bb19dceb542b10a9cea25 | 子页面点击旋转导航切换 | public class ArcMenu1 extends ViewGroup implements OnClickListener{
public void onClick(View v) {
RotateAnimation rAnimation = new RotateAnimation(0f, 720f, Animation.RELATIVE_TO_SELF, 0.5f,
Animation.RELATIVE_TO_SELF, 0.5f);
rAnimation.setDuration(300);
rAnimation.setFillAfter(t... | 1 |
fb4fb17467e552ad30011b30eb5a32cb | eff4cc30f2a8519ac361bcc0b4bc303f | This function is called every time the World is destroyed or restarted. It
is mandatory to destroy here everything you have created. If you do not do
it, the stability of Webots cannot be guaranteed. | {
if (elasticPlasticPlate){
delete elasticPlasticPlate->getMaterial();
delete elasticPlasticPlate->getShape();
delete elasticPlasticPlate;
elasticPlasticPlate = 0;
}
int i;
for (i=m_dynamicsWorld->getNumCollisionObjects()-1; i>=0 ;i--)
{
btCollisionObject* obj = m_dynamicsWorld->getCollisionObjectArray()... | 1 |
0fee315b1e2aafe587c68aa19c7d2e6e | 51fa484262cc48c2b389866f674b0399 | Reads a saved game grid, and assign them to the current grid. | filepath = self.get_open_path()
if not filepath:
return
save_dict = pickle.load( open( filepath, "rb" ))
try:
save_dict["is_board_save"]
except:
popupmsg("Invalid save file chosen")
return
board_shape = save_dict["grid_size"... | 1 |
86f226c3333a8bd760dd1c95e7a3386e | 5f1f3ff9bd021ce3a6504a53f885b340 | 审核设置学校的申请 | if(successed) return true;
$.myajax({
url:'schoolApplyAction/addSchool',
async:false,
data:map,
datatype:'json',
type: 'POST',
success:function(data){
successed = true;
$('#successTips').empty().append('<img src="application/images/icon-success.jpg">'+
'<p>学校APP审核中,我们将在2个工作日内完成审核。<br>审核结果将以短信的形式... | 1 |
fac0863f6ed85f490a60c5fe59c28c13 | 04a639250dc5e26f893d7e378dce29dc | 玉に対し移動すべきかを指示します。 | namespace Noroshi.BattleScene
public abstract class Character : ViewModel<ICharacterView>, IActionExecutor, IActionTarget, IGridContent, CharacterActionEventHandler.ICharacter
bool _shouldTransitToProceed()
{
return _getField().ShouldMoveForward(this, _direction.Value, (ushort)GetBaseActionRange... | 1 |
8aae3f8b272e9708db9fe1b167a8b4d6 | 91bf27a3d8ad04f7d67bab9909ffc70b | Return the game information from the point of the given player.
This identifies the player's information set of this state. | public IGameInfo getGameInfo() throws RemoteException; | 0 |
0a3b9e6aab426728aff39be02763b372 | 18f456b750ea4207528d9e67e9431672 | Add a resource to a job. Check whether there are clashes in resource names. | class RetirableResourceManager(_ResourceManagerBase):
def add_resource(self, resource: str) -> Literal["ok", "already exists"]:
try:
self._resource_docref(resource).create(self._new_resource_data())
return "ok"
except Conflict:
return "already exists" | 1 |
1da7b7815c7e79de04e4eb4f8c6235a4 | 6babb6423b069a46e1da19facdaf2dd1 | Load values from environment variables.
The "Env var" documentation comment for each property's type indicates which environment variable will be read for the value. | function loadConfigFromEnv(): ConfigValue {
return {};
} | 0 |
0187fa7ecfe13ef3e2dbb0636398856e | ee4e1696c871c4012d37a094073f7fad | Search zones by filter
Returns the list of zones that match the given filter. | namespace BesAsm.MasterData.Services
[DataObject]
[CLSCompliant(true)]
public partial class AsmZoningServiceBase : ServiceBase<AsmZoning, AsmZoningKey>
public virtual TList<AsmZoning> Find(IFilterParameterCollection parameters, ISortColumnCollection sortColumns)
{
return Find(parameters, sortCo... | 1 |
f5a4a2bd2fbc881440827b640de659a3 | e1503116822214eb11fa896533992caf | The help text is a concatenation of the available options, surrounded
by brackets. | if pref:
dpref = pref + "."
else:
dpref = ""
opts_help = []
if self._optionsInOrder is not None:
for i in self._optionsInOrder:
oc_name = i[0]
name = oc_name.lower()
n = pref and "%s%s" % (dpref, oc_name)... | 0 |
df4f2dab35de6cff4ff7d0d02a172605 | 73f0195306f5963657085df83a9efa81 | Returns the array with pinned spins in the sample:
sites with 0 are unpinned and sites with 1 are pinned. The order
of the array follows the same order than the mesh coordinates | class SOMatrixBase(_base.SOMatrixBase):
def is_pinned(self):
return self.mat.is_pinned() | 0 |
f502ae22a9545671be50801792520022 | 75f6625f111a5f46ac9ac5f8966c1eda | generic function to return user's major when it's the user meta field | global $post;
if( !is_numeric( $post ) )
$post = $post->ID;
return (string) get_post_meta( $post, '_hmp_byline', true );
} | 0 |
bc4f80ca5eca59d60ef972c90f9ee02f | c9ceed5567cbd9d0a0e0b411280b1797 | !
\brief Send data to the decoder.
A carriage return character will be automatically appended
to any linefeed. | unsigned count)
{
struct mac_serial *info = zs_soft + co->index;
int i;
write_zsreg(info->zs_channel, R1, info->curregs[1] & ~TxINT_ENAB);
write_zsreg(info->zs_channel, R5, info->curregs[5] | TxENAB | RTS | DTR);
for (i=0; i<count; i++) {
while ((read_zsreg(info->zs_channel, 0) & Tx_BUF_EMP) == 0) {
eiei... | 1 |
ff93617a39a9a8f32b4dfe463638d280 | 1a5efc37484da491bfafdf61505bf444 | Set flag criteria, grade and levelpoint using in evaluation template. | gradingPIC10C = false;
gradingMath132 = false;
gradingMath180 = false;
gradingPoliSci30 = true;
gradingAA10 = false;
} | 0 |
5dc40c462d41dce32363c7ac15434cf1 | b7babc4d593bb7a5ce14ad261d2f1ccb | Update the keyspace in cassandra. Only the keyspace and no column family definitions will be
updated here | public class DefaultCassandraDriver implements CassandraDriver
@Override
public void initializeKeyspace()
throws ConnectionException {
createKeyspace(getConfiguration());
} | 0 |
f5c20b44e9d645f68d030151babc5101 | 78fc34b79f59a87c1cfe4b0d0209323b | функция обновления информации в БД о воинском статусе сотрудника | class Database:
async def im_at_work_seller(self, user_id, status):
await self.pool.execute(
f"""UPDATE sellers SET seller_status={status} WHERE seller_telegram_id = {user_id}""") | 0 |
5308260203e9cde6058d280a877948dc | e778e85e9576763b078333bce61257e5 | 清理用户之前的VIP记录,使数据库中始终只保存一条用户VIP记录 | vipdata.vipScore = 0
vipdata.vipItems = {}
vipDailyItems = {}
vipdata.firstCashAward1 = {}
vipdata.firstCashAward2 = {}
end | 0 |
9a7ea84002f36d82d47627d5bac518af | 5a7226efed901d7f5f401861ffa2cfc3 | 根据条件查询(社区商家临时)信息,分页查询 | List<BusinessTemp> selectPageListInTemp(Map map); | 1 |
bbffff1fb5539cccc2e2caa8e268c0c9 | 9358f081f7d6e95c348d346cd9be8ad3 | Converts value for saving to cvs file. | class BaseWidgetContainer extends Core
function convertToEscapedCsv($src)
{
if (is_numeric($src)){
return $src;
} else {
return '"' . $src . '"';
}
} | 1 |
7a334e79bb2ecde518e79e56270f4ed8 | 32bd13b6e036a6f8c231000c59f479d5 | Returns the number of decimals in the number.
Only works for numbers with 18 digits or less. | namespace SugzTools.Controls
[TemplatePart(Name = "PART_Textbox", Type = typeof(TextBox))]
[TemplatePart(Name = "PART_UpDown", Type = typeof(Grid))]
[TemplatePart(Name = "PART_Increase", Type = typeof(Border))]
[TemplatePart(Name = "PART_Decrease", Type = typeof(Border))]
public class SgzNumericUpDo... | 1 |
f2c7291418241674ed2e9636167b8e5b | b5a596c2b181487f513bcc3d8e17f780 | 返回具体用户的操作缓存,因为缓存现在和具体的用户以及表相关,所以需要传递$gameuid和$table参数 | $tbl = $this->get_game_short_name($client_id);
if(!$tbl) return array();
$query = DB::query(Database::SELECT, "SELECT * FROM o_game_user_".$tbl." WHERE suid=:suid");
$query->param(':suid', $suid);
$game_user = $query->execute('otg')->current();
return $game_user ? $game_user : array();
} | 0 |
ebf0d6bdd41e9f23c98e49bd574025d0 | f0b165c3bdc9715bcbe6cfb0a249297a | turn the table to the set angle, if success return True, if operate time | uint8_t turnTableStart(uint16_t rpm)
{
return NO_ERR;
} | 0 |
4d70f9a910aabdd1788b043b89b5b398 | 9b9f6730982b85ab5d36377ccf129e8a | <p>
Set last invoice number.
</p> | public class CalloutInvoiceBatch extends CalloutEngine
private void setDocumentNo (Properties ctx, int WindowNo, GridTab mTab)
{
int C_InvoiceBatch_ID = Env.getContextAsInt(ctx, WindowNo, "C_InvoiceBatch_ID");
String sql = "SELECT COALESCE(MAX(C_InvoiceBatchLine_ID),0) FROM C_InvoiceBatchLine WHERE C_InvoiceBatch_... | 1 |
7bdeeb74365d4e78d9d7f291337b8da5 | f258d839efedeb9b6ab97fefb3de92b7 | @brief json数据格式编码,支持中文原文转换 | class BaseControllers extends \Yaf\Controller_Abstract
protected final function jsonEncode($data)
{
return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
} | 1 |
ae59da16e692e5b07587469cedc4ca75 | 3da10a27405ddcf4a15a514ff4511727 | Metodo para que cuando seleccione un elemento en el combobox se cambien
los label de la derecha | namespace FrbaHotel.AbmRol
public partial class RolForm
private void listBox2_SelectedIndexChanged(object sender, EventArgs e)
{
CleanSelection(listBox2, listBox1);
} | 0 |
6ba8b9382b3a097abe1881c980b19f1a | c6227f116511660ec6fbc2aa72a33cbb | Download report template. | namespace IO.Swagger.Api
System.Threading.Tasks.Task<ApiResponse<string>> ReportGetReportTemplateAsyncWithHttpInfo (string id, bool? editMode = null); | 1 |
a9a9a6f4e712b74a701c062e6aeb1260 | 9610a4ecfe853f62cd0356b373ea610a | NAND回路 | def NAND(x1, x2):
x = np.array([x1, x2])
w = np.array([-0.5, -0.5])
b = 0.7
tmp = np.sum(w*x) + b
if tmp <= 0:
return 0
else:
return 1 | 1 |
e4c8e559fc17c64be346a4c904abaf58 | 2e7c24b02f0de592787db9502c2f17e3 | Updates a ContactPhoneNumber. | public JsonResult UpdateContactPhoneNumber(int contactId, short phoneType, string phoneNumber, string countryCode, string extension)
{
List<Phone> phones = new List<Phone>();
Phone phone = new Phone()
{
ContactPhoneNumberID = 0,
PhoneTy... | 1 |
29d550d82a8300993e46ebb6f221295d | 8297c8e6ac6e1b28c58a2aaee3959218 | Predicts the closest 10 matching image tag vectors given an article tag vector
Returns a list of image ids | class KNN():
# @param k: number of neighbors to return
def predict_articles(self, test_tags, true_id=None, k=4):
ranks = {}
train = self.train_article.copy()
train_ids, train_tags_all = train['id'].values, train['tags'].values
test_tags = [t.lower().replace('"',"") for t in test_tags... | 0 |
2b5e94b60b247eb6cedb56bc4fe466c3 | 7318f8a897d8e13c5c9f8de18aac2393 | 注释:此方法抓取网站链接存入MySQL | class MsgwxqSpider(scrapy.Spider):
def __init__(self):
try:
self.conn = pymysql.Connect(host='localhost', user='root', password='13567651173', database='python',
charset='utf8')
cur = self.conn.cursor()
sql = 'select detail_link from xq... | 0 |
50c22a701e93dd901254f487e7613773 | 4367c3bd855b33c1f31844d7f69e25fd | public setter
Specifies an item ID for which detailed notification information will be
retrieved. ItemID is optional. If no ItemID is specified, the response
will not include any individual notification details. | public class MapiMessageItemBaseDtoBuilder
public MapiMessageItemBaseDtoBuilder itemId(String itemId) {
this.model.itemId(itemId);
return this;
} | 1 |
66d1941a39a2abd21744e5b169a8f246 | ea991cc5f4c5cc1bc8c988e66a27a2b9 | Obtiene el selector de jefes de unidad | {
$ue="";
$uej=UePartidaEntidad::find()
->select(['unidad_ejecutora.nombre as name'])
->innerjoin('unidad_ejecutora', 'ue_partida_entidad.id_ue=unidad_ejecutora.id')
->where(['ue_partida_entidad.cuenta' => $cuenta])
->andWhere(['ue_partida_entidad.partida' => $partid... | 0 |
c1a25919ae9a1d41f11b9e1f676606f2 | 70d8640cc157235579aaac7f5eba12f8 | Make the layoutgrid tree.
(Sub)Figures get a layoutgrid so we can have figure margins.
Gridspecs that are attached to axes get a layoutgrid so axes
can have margins. | N = n_joint + n_marg
gs = GridSpec(N,N,**kwargs)
fig = plt.gcf()
ax_s = fig.add_subplot(gs[n_marg:N ,0 :n_joint])
ax_x = fig.add_subplot(gs[0 :n_marg,0 :n_joint],sharex=ax_s)
ax_y = fig.add_subplot(gs[n_marg:N ,n_joint:N ],sharey=ax_s)
plt.setp(ax_x.get_xticklabels(), visible... | 1 |
da1b961a4682712ed29bad167e50fb69 | f1314995af5e7c8155c2d7e8f60fdbbe | 进行单词字典序的链表排序 | {
struct node *p, *q, *t, *h1, *h2;
h1 = h;
h2 = h1->next;
h1->next = NULL;
while (h2 != NULL)
{
q = h1;
p = q->next;
t = h2;
h2 = h2->next;
t->next = NULL;
... | 0 |
7479204f1c869c4eb7a3aafd822d5a4c | 0459597158d5dd8078b2c642ee0e9aea | @param time (Uncorrected GPS time)
@return GPS time accounting for beginning or end of week crossover | {
const uint64_t ms_per_week = 7000ULL*86400ULL;
const uint64_t unix_offset = 17000ULL*86400ULL + 52*10*7000ULL*86400ULL - 15000ULL;
uint64_t fix_time_ms = unix_offset + gps_week*ms_per_week + gps_ms;
return fix_time_ms;
} | 1 |
e31d43b1e8bd44e84bfd3458d1571108 | 84142a811bae67fb2ebd7124d84fb229 | 用户登录,返回用户绑定的设备SN | namespace Server.Controllers
public class HomeController : ControllerEx
public ActionResult Login2(string signature, string position, string deviceId)
{
try
{
var db = new Context();
var user = db.Users.Include(x => x.AuthorityRs).SingleOrDefault(x => ... | 0 |
489a6e6317b17d1fd326a04bb3d39839 | 5729d8fa1305683282347c0dad53aee6 | Получаем список всех опубликованных товаров для конкретного узла компании в конкретном разделе | {
$products = Base::getList([
'filter' => ['SECTION_ID' => $this->getID()]
]);
return $products;
} | 1 |
b227009f185cdefef5758ee811ac1010 | 94c72643a1d5e14a9f5297bd152b41a2 | Set byte at RAM address pointed to by 16-bit register to byte value | void Memory::set_from_pointer(Register16Bit reg_id, u8 byte_value)
{
write_byte(reg_get16(reg_id), byte_value);
} | 1 |
21cdc654ec0f836035c325ab1beaa292 | 7e289a474bc035c0e6a301af30acbc58 | Space and tab | func reWithSpace(r rune) rune {
switch {
case r == '\t':
return ' '
case r == '\n':
return ' '
case r == '\r':
return ' '
}
return r
} | 1 |
6875dae428f1efba53f8da5d913219e1 | 7d8de3ce4df1a338b0a267b1175b9a1e | Getting the line where the node starts. | public abstract class ConditionalNode extends ConditionNode
public int getLineTo() {
return lineTo;
} | 0 |
46eb9905f5c7b2867b238232a0fcf889 | 55688d2cf3c25fef839de4107f6043ef | removes non-alphanumeric characters from a string | class Blacklite():
def __alpha_num_sanitize(self, string_to_sanitize):
return ''.join(chr for chr in string_to_sanitize if chr.isalnum()) | 1 |
3c7970907c0f80051f2719b94c2207d7 | d43cdb3b89ebf90706c98e5f3ffb8294 | 获取所有专利分类数据 | getPatentAllList(index, size) {
return get("/Fruit/分页获取专利", {
index,
size
})
} | 0 |
3d1c393ae6825966a9c496b4a294a625 | 53d91dd7f9a143d9c14b556a8cceac22 | 隐藏或显示法式轮盘中部某个区数字区域的高亮 | export class WelfareLottery3D extends Digit
HighLightBetNumber(selected, result) {
const hightColor = "#e23a3a";
let FomulaMap = {
[WelfareLottery3DTypeEnum.DirectlySingle]: Directly,
[WelfareLottery3DTypeEnum.Directly]: Directly,
[WelfareLottery3DTypeEnum.Combination... | 0 |
a79632b5c2d04262b16426c21ce051bb | e48e7dc007176ac1ea7237c2638151b2 | Clean release files | $file['php'] = $this->get_php_file();
$file['html'] = $this->get_html_file();
foreach($file as $key => $value){
unlink($value);
}
} | 1 |
1b7fb861c9c9c19f042750c253f21d1f | a326eb7dc96757f5a01c127febcf9818 | Initializes the environment to execute a Scalyr script.
This should be invoked by any Scalyr module that has a main (i.e., can invoked by the commandline to
perform some action).
It performs such tasks as ensures PYTHONPATH include the Scalyr package and fixing some third-party import issues. | def env_init(): | 1 |
44acacce9ced8bc15d36ef3fd9f5c3f9 | c3637ae9c33c1d4684894630423b8cac | 現在の Language List を元に文字列テーブルファイルを吐き出す | {
char *dictionaries_filename = dictionary_lang_file_name(DICTIONARIES_FILENAME);
unlink(dictionaries_filename);
FILE *dst = fopen(dictionaries_filename, "w");
if(!dst)
return false;
if(fprintf(dst, "%d\n", dictionary_list_size(list, list_len)) <= 0)
return false;
for(int i = 0; i < (int)list_len; i++)
if(f... | 1 |
f7f2b9458116479a9d82a543dab55298 | c07b229cfd9a3a78222b4bbb0c8bf2c9 | 接口请求失败提示 | if (requestOptions._showFailTip !== false) {
var message = this.getFailTipMessage(requestOptions, requestResult);
var toastOptions = {
icon: 'none',
title: message
};
if (typeof requestOptions._showFailTipDuration !== 'undefined') {... | 1 |
d03ceaefd77c5c9108fcb57b89ba9c80 | ff7a744816016ebd9fe85a912f752b96 | get a list of neighbour face ids to the give u and v coords | face_mat = self.face_mat[id_face]
u_vel = val_vec[1:4]
vec_loc = np.copy(val_vec)
vec_loc[1:4] = face_mat @ u_vel
return vec_loc | 0 |
6ccb2c04427a20808c69471353ac9888 | feac2e4ccafd19345a0767607302dba7 | Creates a configuration based on grpc. | var configs = make(map[string]string)
configs[grpcPoolSize] = cfg.GrpcPoolSize
configs[grpcPoolInitialSize] = cfg.GrpcPoolInitialSize
configs[requestStream] = cfg.RequestStreamAppUrl
configs[faultStream] = cfg.FaultStreamAppUrl
configs[throttleStream] = cfg.ThrottleStreamAppUrl
return configs
} | 1 |
2206b8f2e86e58963e2b280503af8573 | 8891b1e26ae1ed30fcba41ae0a848d15 | create an object with a new ships starting properties | float startX = (rand() % 20) +35.0f;
float startY = (rand() % 80) /100.0f;
float startZ = (rand() %25) + 15.0f;
float velX = ((rand() % 80) / 20.0f) + 0.5f;
float velZ = ((rand() % 200) / 100.0f) - 1.0f;
Ship *ship = new Ship( this );
ship->addController(new ShipController(vec3(-startX,startY,-startZ), ... | 1 |
5a31188ec66be691bb48424b134b33b7 | ea2a3f77379bc1ff9212896b0c2bacd5 | Convert microseconds to milliseconds. | def mc2us(x):
return cw2us(x) | 0 |
943fe02b63e49f17350edae772acc1bf | 0027c43b3569e51a580f6fdc10d34f96 | Altera o provider de criptografia a ser utilizado. | public class SecurityContext
public void setSecurityProvider(SecurityProvider securityProvider) {
this.securityProvider = securityProvider;
} | 1 |
aebc8c38fe77dec84a39d5d32e0b5cd2 | b9551861f366180cad49c9960032383a | 簡単なSFINAE | namespace tut
void callback_test::object::test<1>()
{
} | 0 |
3fc1cf554a089f1a538a7bed71987ffb | ac9ae44a5e2002f87a8c68e8564a612d | 将微信用户信息和nuonuo用户平台的信息整合返回 | {
$accountInfoType = null;
$source = null;
switch ($WEConnectAccountInfo['channel']) {
case 'WEIBO':
$source = ChatConversation::TYPE_WEIBO;
$accountInfoType = 'WEIBO';
break;
case 'ALIPAY':
$source = Cha... | 1 |
fed096054afa1eb24d938efa8d72fd46 | 2aecbe00b6519c024a72972fc05e732e | Returns the Quality Description. | public class QualityLineGraph
public String getQualityTypeDescription(){return qualityType.toLongString();} | 1 |
05fd59ed54b96fe6cf8da78e1449e376 | 1355c3d4030d7416a6993bedf6a5eb04 | 根据协议号调用相对函数 | {
List<object> list = null;
protocolPackMemberDict.TryGetValue(protocolNo, out list);
return list;
} | 0 |
230d8c108fba76bb897ad623d0afd052 | eff74097ddc8ddba7f41ec615786aefa | Shows the correct combination. | def show_correct(res):
lb_Result.setText(res)
show_result() | 1 |
eecb9166b75dc045cdf92dfb8a4456c3 | 4de75b4b703baf5439fbe8ec4953debc | GET: api/Rankings | namespace tennisCapstone.Controllers
[Route("[controller]")]
[ApiController]
public class RankingsController : ControllerBase
[HttpGet("api")]
public RankingRootObject GetRankingsFromApi()
{
return _apiRankingRepo.GetRankings();
} | 1 |
3773deb6f42f5f3ef39746c2e26a94e1 | 48514d456a3bfc1611c45bf5ebdb1d9e | Euler angles to quaternion | function euler2quat(e) {
if(!e) return;
var roll = .5 * e[0] * to_radians,
pitch = .5 * e[1] * to_radians,
yaw = .5 * e[2] * to_radians,
sr = Math.sin(roll),
cr = Math.cos(roll),
sp = Math.sin(pitch),
cp = Math.cos(pitch),
sy = Math.sin(yaw),
cy = ... | 1 |
bbc4af0efff3cd14fa75a3210f22f5b6 | 483146536f361309f9518ca439b8e0d5 | Converts a position vector to a transform with
that position as the translation for the transform. | {
Matrix result;
CreateTranslation(xPosition, yPosition, zPosition, out result);
return result;
} | 1 |
d96b0334833ae2e22c19664e7ee3ad11 | a97ec217c0cf8e8e69ba709a0e38f8da | 测试委托方法指向对象是否有效 | public class TestEJBRef
@Test
public void test00() throws Exception{
instance.check();
} | 0 |
14ab3b129a06e1217ef570293660ee62 | 5e10d7bf738f8e56eb4d7aaf9b2258bc | Extract the value of the Retry-After HTTP response header | static pjsip_hdr* parse_hdr_retry_after(pjsip_parse_ctx *ctx)
{
pjsip_retry_after_hdr *hdr;
pj_scanner *scanner = ctx->scanner;
pj_str_t tmp;
hdr = pjsip_retry_after_hdr_create(ctx->pool, 0);
pj_scan_get(scanner, &pconst.pjsip_DIGIT_SPEC, &tmp);
strtoi_validate(&tmp, PJSIP_MIN_RETRY_AFTER, PJSIP... | 1 |
36627998eb921b9d649738a60f21321d | 7f00db8f2953b34bb9d07078fb76cf35 | Тест правильности получения имени модуля | namespace InterpreterNUnitTester
class ModuleStatements
[Test]
public void ModuleNameParsedCorrectlyTest()
{
Assert.AreEqual("CorrectTestModule1", InterpreterCorrect.Root.Argument);
} | 1 |
78df3518cc4b35cba4b2a4811fc072c0 | 91afd65d214b0c280404c720acf22db2 | Sets the child node file address in a node pointer. | void GraphEdge::SetChildNode(GraphNode *childNode) {
_childNode = childNode;
} | 0 |
b01b213d75b00bad81c7eec693bed8af | 370b034fad4684752513b373da8200cd | Send user list to a give user. | {
map<int, user_info>::iterator it;
for (it = user_map.begin(); it != user_map.end(); ++it) {
string to_send;
to_send = it->second.name + " " +
it->second.host + " " +
it->second.port;
int rc = writeln(sfd, to_send);
if (rc == -1) {
perros("writeln in send_user_list()");
close_conn... | 1 |
c14390abfda7885737e8776c3b3d900e | c5ee7fa4830fdddba7a27a9012102ce6 | Авторизация в инстаграм | {
var json = "";
try
{
NameValueCollection parameters = new NameValueCollection();
parameters.Add("client_id", ConfigurationManager.AppSettings["instagram.clientid"].ToString());
parameters.Add("client_secret", ConfigurationMana... | 1 |
0c19ea55f1abdb1ffe9520b122ff3b81 | d8ad881eee83706e6db0f2147571cafc | Rellena el cero de los minutos. | if (minutes.length() == 1) {
return "0" + minutes;
}
return minutes;
} | 1 |
a6feaf74919de74a6ec2970007988666 | d87585291d1197ca14011ffe47e8de1b | Sets whether face is lost. | @Deprecated
void setFace(@NotNull Face face); | 0 |
29d5d0218d139d446479de2f5fcc4e9f | 611cc9540a2038d5bfa40f20abd00834 | Returns true if the polygon refernce is in the current closed list. | for (int i = 0; i < closed.size(); ++i) {
if (closed[i] == p) return true;
}
return false;
} | 1 |
c1d3e05f7f413ed63e0540600d6dd184 | 7932014a3dda013f0045d509a6ff4bdc | metod untuk memasukkan ORDER BY
default adalah descending | global $acc_jurnal;
$sOrderBy = $acc_jurnal->getSessionOrderBy();
if ($sOrderBy == "") {
if ($acc_jurnal->SqlOrderBy() <> "") {
$sOrderBy = $acc_jurnal->SqlOrderBy();
$acc_jurnal->setSessionOrderBy($sOrderBy);
$acc_jurnal->tanggal->setSort("DESC");
$acc_jurnal->kodejurnal->setSort("DESC");
... | 1 |
a092f81972a6be5fdeb34014abc951f7 | 308efbe6beaad1f2bc9b85f78669968f | Renders the toolbar for managing a group | abstract class THM_GroupsViewEdit extends JViewLegacy
protected abstract function addToolBar(); | 1 |
7493d877c74e7f806ebbbe2058f6f8b4 | 04cc4b55409bd78f87fcb8e389f3f368 | Запись месяца в файл | {
if (m > 0 && m <= 12)
myMonth = m;
else
cout << "Month = " << setfill('0') << setw(2) << m << " is incorrect" << endl << endl;
} | 0 |
4f40238f0376be28f2078c6f7fd26aa0 | 7ff931e0f819294a3f802940d75488bb | Check that actuator coeff files have no duplicate coeffs. # | (bCntrOn) = _check_settings(dSysSettings)
if not bCntrOn:
return
dUniqTotData = dEvalData['dUniqTotData']
nFil = dUniqTotData['iFil']
strUniqPattsDirName = dSysSettings['strUniqPattsDirName']
inxPS = dSysSettings['inxPS']
for inxFil in range(1, nFil+1):
strFile = ('%s/pattern... | 0 |
c9d81b3f8a0a06859265bab70fd369fb | f411af5fde51fce829ae5718466e3374 | Calculate dew pressure given temperature and composition | gamma = np.log(humid / 100.0) + 17.67 * temp / (243.5 + temp)
dp = 243.5 * gamma / (17.67 - gamma)
return dp | 1 |
4d41ec7f2c3bf952ffdfc4cdf8699dd2 | 901174373d06f3e7aaa770376d14c9a1 | Be sure that the release and disable files don't exist | def setup():
shelltools.unlink("usbdux/*dux")
shelltools.unlink("*/*.asm")
for fw in ("ess", "korg", "sb16", "yamaha"):
shelltools.unlinkDir(fw)
shelltools.unlink("dvb-fe-xc5000-1.6.114.fw") | 1 |
2a7075e5f5343b05f9802f3927ec44bf | 0b65638c4824c91dea2cf9ce7aa7c2c2 | The action to get the cross loyalty card discount. | class ListDiscountsAction extends DiscountsAction
protected function action(): Response {
$postData = $this->getFormData();
$validateRequest = $this->validateRequest($postData);
if($validateRequest) {
$this->logger->info("Request Data");
$this->logg... | 0 |
e1ef7a6047bff94b618de8202ba72bba | e47ddd50c8da11c53ec2c73c14bf5f41 | Removes the rightmost segment from the constant expression in the string:
See also +demodulize+. | class OriginalAlignment
def rstrip
na = self.dup
na.isolate
na.alignment_rstrip!
na
end | 0 |
3f8f940f93e361f844f432813ae27eb4 | 8022b557e9a48a4d822d54fc0c267614 | Group the dishes by their caloric level. | public class StreamTest08
private static void test05() {
Map<Dish.Type, Optional<Dish>> collect = menu.stream().collect(Collectors.groupingBy(Dish::getType, Collectors.maxBy(Comparator.comparing(Dish::getCalories))));
System.out.println(collect);
} | 0 |
b83d94aa8e7691e79e2621e981a4095a | 356485fea2d2b64412124e2a04db3ada | Do Nothing default dtor | NonCopyable() = default; | 0 |
9eda109ffec931fba9d8488fc9dac195 | 15b23f7655dd7ac29a4df6b1c09fb24d | Initialize the parameters of the LSTM layer. | class LSTM_Model(Abstract_Model):
def __init__(self, kwargs):
super().__init__(kwargs) | 0 |
75d6e9ceb782deb8c119fcc5fb125804 | a994bfda05ca38d2d7c0bac59eec8477 | ===========================================================================
将选择的模型从MESHES中移除
=========================================================================== | {
if (modelList.SelectedIndex == -1) return;
for (int i = 0; i < ModelsFile.GetFiles().Count; i++)
{
if (ModelsFile.GetFiles()[i].modelName == modelList.Items[modelList.SelectedIndex].ToString())
{
ModelsFile.RemoveFile(Mode... | 1 |
a9038d3ff71e68d781282831c975d3ee | d2deb5ba667fe76fd6f5fa90f9a67d13 | 当某个按钮被点击时,如果当前进度条上的数字小于当前被选择的条目的数量,就让进度条加1 | var result=currentPlay();
if(result==len){
result=1;
}else{
result++;
};
var no="no"+result;
var target=document.getElementById(no);
currentLi(target);
} | 0 |
0d20d3760e376ff7734ca43154c66856 | dc31fa27f554ac09e3ce579f796ddf89 | Create points for the up and down movement. | self.__point = [
start_point,
DisplayMode.Point(start_point.x + 1, start_point.y),
DisplayMode.Point(start_point.x + 2, start_point.y)
] | 0 |
fdfdc401b395fd9835595c41ad3c4f0e | 895cbdafb9bd9ca1ae15a1479591f947 | Remove the top element according to the comparer used. | public Comparable remove(); | 1 |
8fdf03c1e25e2fb90200fb5b6c6e54f3 | 698bbe611836e4e6faa203d73ed3be3d | Clears just the description that the user has entered | public class NewTagViewController
@FXML
private void clearNewTagButton() {
descriptionTextField.clear();
} | 1 |
eec54f5eaa028ef42ca9ba1db4f12c58 | ae7ba18e37df802dc4a89918dd5f3458 | Factory method to create a new set based on the expression passed in. | class Database
public function expression($expression = '', $parameters = null, array $types = array())
{
$expression = new Expression($expression, $parameters, $types);
return $expression;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.