query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5fd08f5b57fde4d74cba752da13db437 | 4196b780aa8ced054ea8979d38d82feb | Register an instance as singleton (if no other <see cref="Lifetime{T}"/> style specified) and
use its concrete type, the base type from which it derives, or one of the interfaces it implements as
the retrieval key. | namespace GSoft.Dynamite.ServiceLocator.Internal
internal class RegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> : IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle>, IHideObjectMembers
public IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> InstancePerOwned(object servi... | 0 |
9f0ae93520349bc88e33519c626eeb19 | 0867852094d821d6dc092bf53751705a | Sólo conservamos el estado si está marcada la opción. | namespace FrbaCommerce.Comprar_Ofertar
public partial class Buscar_Publicacion : Form
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
cmbEstado.Items.Add("Borrador");
cmbEstado.Items.Add("Pausada");
... | 1 |
8ab5674a70b263f76bffcc46886a5851 | ac12f8e4381d2980c047b50865c0df6f | 需要一个加载引用我的对象的enhance方法:UserProject的user的UserProjectList | function userInfoCallback(myUserInfo) {
coolcalc.MJ8.projectList(myConfig, myUserInfo, funFactory, funFactory.startupCallback());
} | 0 |
0fbac8817980094a74250299b1772f40 | e50b3f056b62ac51318456b8ab809115 | 判断该Session是否是需要检验的,是-> 校验Session,否则-> 重新缓存Session信息 | public class ShiroSessionDao extends CachingSessionDAO
@Override
protected void doUpdate(Session session) {
try {
if (session instanceof ValidatingSession && !((ValidatingSession) session).isValid()) {
return;
}
String redisSessionKey = getRedisSessionKey(... | 1 |
ac3b002a7a7de029b9224eb012d0de1f | 4b022232e4eec3efdd38e1a062c7b81e | 切换处理后数据显示界面至源代码查看 | function contentToSourceCode(element) {
var showSourceCode = element.getAttribute('data-show-source-code');
if(!showSourceCode) {
showSourceCode = 'on';
element.setAttribute('data-show-source-code', showSourceCode);
}
var newHTML = _contentArea.innerHTML;
if(showSourceCode === 'on')... | 1 |
e5cdb203ba379555ed2a8fcb4560fca9 | cac75cba02d794cf3448c22c5f410ac0 | Prepare our array to be of the right length (index 0 will be ignored, thus 1 more than required length)
the index is the value of the cup and the value is the clockwise next cup in the circle | 14.times do |idx|
if idx != 6 && idx != 13
@cups[idx] = [:stone, :stone, :stone, :stone]
else
@cups[idx] = []
end
end
@cups
end | 0 |
2c0c838845ff0e340e25f51c4793b2fc | 4a7a549b2f129d81619dafd29d4e707c | Create new tweepy streaming instance | class DailyDevTalk(tweepy.StreamListener):
# Connects to Twitter API
def start(self):
print("Streaming")
stream = tweepy.Stream(auth = self.api.auth, listener=DailyDevTalk())
stream.filter(track=self.searches, async="true") | 1 |
234eb9da1115a97e2cfb19685e6f706b | e68d385ea02a817ee29daaa909ec0589 | 连接rtmp, url为推流地址 | void *start(void *args) {
char *url = static_cast<char *>(args);
RTMP *rtmp = 0;
rtmp = RTMP_Alloc();
if (!rtmp) {
LOGE("alloc rtmp失败");
return NULL;
}
RTMP_Init(rtmp);
int ret = RTMP_SetupURL(rtmp, url);
if (!ret) {
LOGE("设置地址失败:%s", url);
return NULL;
... | 1 |
99fc67298b7b9278d7d8e28ce3704384 | 486a4506b17096f6dadcebdab918503d | It's a wrapper around https://github.com/teris-io/shortid | function simple() {
const s4 = () =>
Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
return `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;
} | 0 |
83fe191b4018d0987f327057c040ffc1 | dba5266576b18183dff1dec9d48bd946 | 判断是否为空的数组 | public class ValueUtils
public static boolean isEmptyOfArray(Object[] array) {
if (array == null) {
return true;
}
if (array.length == 0) {
return true;
}
return false;
} | 1 |
ed38fb146fc50eddeaefc81275fa0ac1 | 8d11b108ba8f5c4366fa55109ced6c28 | Drop the materialized view from the database.
SEE:
docs.aws.amazon.com/redshift/latest/dg/materialized-view-drop-sql-command
This undoes the create command, as expected: | try:
cursor.execute("DROP VIEW {0}".format(view_name))
except DatabaseError:
print("DatabaseError: VIEW {0} does not exist.".format(view_name)) | 1 |
9011542b288c8f149aa9f6098f925ce7 | 5df634211a9d6d7828b34b850723db7e | Returns a {@link List} of {@link SportEvent}s that are a part of the scenario | public class SearchResults
public List<SherdogBaseObject> getEvents() {
return dryEvents;
} | 0 |
5e5e8f29b674010bf6df40a6f96db960 | b0d9ef35efc6a6432f93dce1200af9ca | Waits for events for specified amount of time. | namespace AsimovClient.Create
void WaitEvent(WaitEvent waitEvent); | 0 |
2199a24d96acce466db58d5e0a7d517b | bf24024953e728fe2b7c204c62413055 | This function displays the most important
terminal settings and control characters | static void
showsetup() {
int i;
fprintf(stderr, "Port: %s\n", device);
fprintf(stderr, "Communications parameters: ");
for(i = 0; speeds[i].s && speeds[i].c != ispeed; )
i++;
fprintf(stderr, "%d", speeds[i].s);
if(ospeed != ispeed) {
for(i = 0; speeds[i].s && speeds[i].c != ospeed; )
i++;
fprintf(stderr... | 1 |
af0bef1032b95bf215d81bc71c40b65c | 4523f7080de8d11b37e31de146a01265 | Get configs from all modules | class Module
public function getConfigs()
{
if (is_null($this->configs)) {
$this->fetchConfigs();
}
return $this->configs;
} | 0 |
007e85c76142971d709184a7f6791bc2 | 7f2031e10bc995df4636ae7d16ad1579 | Sets the value of the '{@link org.eclipse.rcpl.model_2_0_0.rcpl.AbstractTool#getGridY <em>Grid Y</em>}' attribute.
<!-- begin-user-doc --> <!-- end-user-doc --> | EOperation getGridRectangle__SetValues__int_int(); | 0 |
22140e726b7c3fa88276ed2fe6263125 | b952459ebe2db625f74c0d5fe6b19142 | Endpoint que eliminar una nacionalidad por su nombre | class nationalityController extends Controller
public function destroy($id)
{
DB::table('nationalities')->where('id',$id)->delete();
} | 0 |
83f0aabe6263beec6f5578f45eececa7 | 0cb55849ac42f7309f904549243db0f6 | 入住日期选择线程 | void fenAdmin::choiceDateSlot()
{
choiceDate();
} | 0 |
262495635bb5b1b07b1bf894be881b2a | 605105aa4baa1866171b3449414d02a2 | Find the best n_components by comparing silhouette coefficient | an = self.degree_of_aggregation(X)
bn = self.degree_of_divergence(X)
an_bn = np.concatenate([an.reshape(an.shape[0],1), bn.reshape(bn.shape[0],1)], axis=1)
silhouette_vals = (bn - an) / np.max(an_bn, axis=1)
silhouette_avg = np.mean(silhouette_vals)
y_km = self.cluster
... | 0 |
32546a3138df90a048ffc37594af8a7d | e3bc31739db9c2a98da9688a9a39a6dd | Fill missing engagement data with 0s | def preprocess_data(df):
df.fillna(0, inplace = True) | 1 |
d003d02397d93b365328a3ec32eaab43 | bed5a7f40c4963dcecd8dacf922b6da4 | Reads the content of the file and loads it as an EntityMetadata instance. | abstract class AbstractXmlDriver extends AbstractFileDriver
protected function loadMetadataFromFile($className, $file)
{
$xmlRoot = $this->getElement($className, $file);
$xmlRoot->registerXPathNamespace('cubiche', 'cubiche');
try {
$classMetadata = new ClassMetadata($className);
... | 1 |
4dc396944f8f1268150ac2242916669f | ed7d0274e1d3cc73211254ffd261b42c | Sets the operator to append rather than replace a value for the command
line tool, i.e. "+=". | def operator_c(buf, input_line, pos1, pos2, overwrite=False):
operator_d(buf, input_line, pos1, pos2, overwrite)
set_mode("INSERT") | 0 |
ef605c62f6367a0e149e62108204384c | d612ee936440308ea2e090c255934db4 | Expands an n-byte array into a len*n byte array using the `prf` function | expanded = make([]byte, params.wotsSignLen)
ctr := make([]byte, 32)
var idx int
for i := 0; i < int(params.wlen); i++ {
ctr = toByte(i, 32)
idx = i * params.n
hashPRF(params, expanded[idx:idx+params.n], inseed, ctr)
}
return
} | 1 |
e8f8d83f7d98002f443356bf12adea66 | 59b262f88bc8b7da2d3953393bf4bdad | Parse les dossiers à la recherche de fichier d'extension précisé et renvoi un tableau de ces fichiers
recursif | class File
function find_all_files($extension=null){
if (!$this->is_dir()) {exit($this->fullpath() . ' is not a directory.');}
$files = scandir($this->fullpath());
$file_paths = array();
foreach ($files as $file){
if (preg_match("/^\.{1,2}/", $file)) {
continu... | 1 |
eca0d6b4298b926eff15db451b0953c8 | 6640c51a22b50e611af4c3b4fec9cc50 | This function handles flagging, what happens when we right click on the PC version. | function rightClicker(obj) {
if (obj.innerHTML == "" && gameover == false) {
obj.innerHTML = "<img src='img/flag.png' style='height: 80%; width: 80%; margin: 0;'>";
}
else if (obj.innerHTML.indexOf("img") != -1 && gameover == false) {
obj.innerHTML = "";
}
else {
}
return false;
} | 1 |
9c16b2781575cafa62050babae1c0242 | 60549dd98d88563500afc91493dd5778 | Validates that the value of the <see cref="PKEY_Devices_AepContainer_Manufacturer" /> property is correct. | {
if (iPropertyManufacturerUrl == null)
throw new PropertyDisabledError();
return SetPropertyString(iPropertyManufacturerUrl, aValue);
} | 0 |
70ff7afbe52ff786656fd5ac94f2c73b | 15f29368c66735231b1efb788519d9ad | This function draws the battery status bar on the bottom of the screen
It takes a battery percentage as the input | void RemoteDisplay::DisplayBatStatus(byte iBat, byte iPercent) {
byte bx;
byte bxFill;
bx = iBat*38 + 14 + 8;
if (_abBatPercent[iBat] != iPercent) {
OLEDSetPenSize(1);
OLEDDrawRect(bx, 0, bx + 29, 9, DCLR_WHITE);
OLEDSetPenSize(0);
OLEDDrawRect(bx+30... | 1 |
0a66d083d408bdd16a198b2eaad4fb77 | ad04e3f54f3df1514fabb8046482e5f3 | calculate the selection probability of each solution | public class PopulationEvolution
public static void evaluation(Population pop){
pop.calculateProbability();
} | 1 |
58a1831cd583e2e7cf19acd1a9e0a726 | 24f1803a0a8cc2e2770875448b997ff5 | 定时读取CAN1通道报文数据,并转化为有效信息,此函数是一个定时回调函数 | if (CAN_GetITStatus(CAN1, CAN_IT_FOV1)) {
CAN_ClearITPendingBit(CAN1, CAN_IT_FOV1);
}
if (CAN_GetITStatus(CAN1, CAN_IT_FF1)) {
CAN_ClearITPendingBit(CAN1, CAN_IT_FF1);
}
if (CAN_GetITStatus(CAN1, CAN_IT_FMP0)) {
CAN_ClearITPendingBit(CAN1, CAN_IT_FMP0);
}
{
RxMessage.IDE = (uint8_t)0x04 & CAN1->sFIFOMail... | 1 |
7c5b51faf5f8adcb2ce495bfdf83ad6f | 144a02a7f50179564e7013cdd311bca2 | Adjoint of the operator. | class LinearOperator(BaseLinearOperator):
def T(self):
return self.__H | 1 |
027986a0ec6d242f052613c83567afd2 | e64b4ce9442b713b179185ca1c8f5a83 | Activate or deactivate the user’s track. Deactivating a track will hide it from public ride overviews. | class Trackobot:
def toggle_tracking(self, enabled: bool=True):
logger.info('Called toggle_tracking()')
endpoint = '/profile/settings/decks/toggle'
url = self._url + endpoint
val = 'true' if enabled else 'false'
data = {'user[deck_tracking]': val, '_method': 'put'}
logger... | 1 |
af65134e6f1ccb4d4ffe19cf07cd7111 | c96432dfe0f32480a116a76fcf65e094 | 设置[WX_INTRODUCE_ACTIVITY]的属性创建者 | @Table(name = "cl_weituo")
public class ClWeituo
public void setCreator(String creator) {
this.creator = creator;
} | 0 |
4885770b830aba8153ce74d695e2ae35 | 38b0e5cf9e307b9b306fab0a1b8f77c1 | Changes the puzzle number in the model and resets the guess table | public class JottoModel
public void setNewPuzzle(Integer puzz) {
puzzleNumber = puzz;
} | 0 |
1dcf80140f32f93cca66810d1bd8a711 | de22ee6072270e74653783f773d982e1 | * ---[ */ | if (!midiOut) return
const channel = globalChannel > 0 ? globalChannel : chan
checkValue(note, 'note')
checkValue(velo, 'velocity')
checkChannel(channel)
if (DEBUG) console.debug(`MIDI note on - note:${note}, velo:${velo}, channel:${channel}`)
midiOut.send([0x90 + (channel - 1), note, velo])
} | 0 |
394ef4a007f95d12aee5612618c4f1f8 | 721a1b56957ee7c365351b6be1b96c04 | 根据id更新剧目 | public class FavTvShowHelper
public int update(String id, ContentValues values) {
return database.update(DATABASE_TABLE, values, TVSHOW_ID + " = ?", new String[]{id});
} | 1 |
d39358e9e54baf5a2f227d717012e5b8 | 84a013e05f9a1bbf4db10e9ac2ad2589 | This will delete the item from the list when it is deleted from the data model. | class DataModelListObserver(object):
def listItemRemoved(self, listItem):
pass | 0 |
b7a8d78af98442ce15d2b93404409524 | 2a6267c4d4f35ea733901f401a8e668f | Saves a record to the ListaDeseos table. | public void Insert(string DescripcionRecibe)
{
PnRecibe item = new PnRecibe();
item.DescripcionRecibe = DescripcionRecibe;
item.Save(UserName);
} | 0 |
430a99d75396dadea5a736e1e085845e | b65927d0fed7847f4f3362c06726e9a1 | transforms MongoDb cursor into json array, applies field mapping | namespace Stormancer.Server.Plugins.Queries
public static class DefaultMapper
public static IEnumerable<Lucene.Net.Index.IIndexableField> JsonMapper(JObject document)
{
return JsonMapper(null, document);
} | 0 |
6f606bd9cc542a327a0f3fc5e8efed30 | 02a9bbcce48fd912e781edb39bbfd415 | Calcula el precio total de las peliculas | double value = 0;
for(String s:cart){
String[] aux = s.split(";");
value += (Double.parseDouble(aux[6])*Integer.parseInt(aux[5]));
}
return value;
} | 1 |
ee468f452c64c06761ae47c463c8ab71 | 21d6ee2a0a0a2617ba4e1d502a0f0683 | Show checkout modal | updateCartCost();
resetTimer();
var modalContent = '<table style="width:100%">' +
'<tr>\n' +
'<th>Product</th>\n' +
'<th>Quantity</th> \n' +
'<th>Unit Price</th>\n' +
'<th>Amount</th>\n' +
'</tr>';
var cartLength = Object.keys(cart).length;
if (cartLen... | 1 |
d938ec843738cfbe92adc093d4513d42 | f39b7533443f9fd2c5b42bcc5cb430e9 | Returns the MapLayer currently selected by the user. | int getSelectedLayer(); | 1 |
af5908f3ab52083f068400108bc4c4e2 | 4ecb59b2236a4f562921d1af0aaf4a34 | Sets telefono1 | class Order
public function setClientTelephone1($clientTelephone1)
{
$this->clientTelephone1 = $clientTelephone1;
return $this;
} | 1 |
a68381d89deba4a104bb7648ce37060b | c2b2aface95023f8c5bf051a8a7fbec0 | # Obtain the notebook page number given its tab's label's text
# (already translated using Rtxt when it is passed in. Return NULL
# if the label is not found. | GetLabel <- function(m) {
if (m %in% names(Labels)) {
Labels[[m]]
} else
{
m
} | 0 |
760c4d399f25a8f0c5525d43b427c002 | 2fb5a0c8bcc029b3dcab9b63c5539c21 | 指定されたユーザーの応援コメントを表示する | {
$comments = Comment::join('users', 'comments.user_id', '=', 'users.id')
->select('comments.*','users.username')
->get();
return view ('emotion.show', compact('comments'));
} | 0 |
e5dc582ed313c29b3bbb31df1a29c804 | b0a41627706ccc95184b1d35dd4455c8 | overrides the rotation method for an O block so no movement happens | {
if ( current.getType () == Tetromino.OBLOCK )
{
return;
}
current.rotateLeft ();
} | 1 |
924ef6140ae88ab9ec61750e06968ca1 | 91baed650b78ddad8bd96df46a46d40a | 实例化方法,实例化一个创建订单对象 | @Component
public class OrderFactory
public OrderModel createOrder(){
return new OrderSelfImpl();
} | 1 |
987e59dcff3a52845856c034fb90f633 | 59f64dd59d8beef288a74ee433e07d15 | Returns all of the items back to the pool in one shot | if (!this.items)
return;
var items = this.items;
for (let i = 0, len = items.length; i < len; i++) {
this.Pool.put(items[i]);
}
this.items = null;
items = null;
} | 1 |
2d23992e72b4efbe02441ab6b6d78a30 | 63a102cb0c4296f6f9ffe56304437296 | Trả về từ điển dùng để chuyển đổi số sang chữ số. | {
string s = number.ToString("#");
string[] so = new string[] { "không", "một", "hai", "ba", "bốn", "năm", "sáu", "bảy", "tám", "chín" };
string[] hang = new string[] { "", "nghìn", "triệu", "tỷ" };
int i, j, donvi, chuc, tram;
string str = " ";
... | 0 |
f362f1362bc0b94922c86a1b22b71f63 | 9aa1ee8f08c7e78ee40c8956c5f75110 | 定位成功后:根据经纬度请求接口,获取city属性 | let res1 = await http.jsonp({
url: 'http://api.map.baidu.com/location/ip',
data: {
ak: 'D5hd1GmrjX9itCaMYRrhG1tTQGr4vQw0'
},
callback: 'callback'
})
let address = res1.... | 0 |
dcfbb8f1f20be9eced5aa0bd88948a7d | 6a675e78b650ffd3e440a66819020a89 | 摂氏を華氏に変換 | def farh(c):
res = c * 9 / 5 + 32
return res | 1 |
15c310597779f7f16007b9df9ca361df | 1d4418a7e90b4544446ed919ba4777be | 按键防抖(通过监听设置) | debounceTime: Long = CLICK_DEBOUNCE_DURATION,
action: () -> Unit
) {
this.setOnClickListener(object : View.OnClickListener {
private var lastClickTime: Long = 0
override fun onClick(v: View) {
if (SystemClock.elapsedRealtime() - lastClickTime < debounceTime) return
el... | 1 |
202fb888e1da4decddf73950fee6f57e | ebd8dbaa99f59c829e88ab46ec684b36 | Return ship state vector for time t.
t is time in seconds since the start of the maneuver.
Returns a StateVec containing (phase, distTraveled, currVelocity, fuelRemaining, tEnd) | vector<double> Car::computeStateAtTime(double t) {
vector<double> state;
state.push_back(this->s + (this->s_dot * t) + (this->s_dot_dot * pow(t,2) / 2.0));
state.push_back(this->s_dot + this->s_dot_dot * t);
state.push_back(this->s_dot_dot);
state.push_back(this->d + (this->d_dot * t) + (this->d_dot_dot * pow... | 0 |
308d57a0273afc3e29df08f9e9c0aa0b | d57606386c3165989bf4f145d4ef6f07 | Muestra la información en un panel de control | class ControladorPrueba extends Controller
public function show($id)
{
} | 0 |
d043334bb2814bfc1e159e21fec5a62e | 486d3ace47d48d77417ad875daf80570 | Конструктор: | Bit_Stroka::Bit_Stroka()
{
str = NULL;
len = 0;
} | 1 |
709e2a711456dba795f224b732bc03d4 | ea29b3d7339a5d71f173b582020bc370 | Find the set of unique edges in cells intersected by segment | {
Point[] ret = new Point[0];
var v = withSegment.Start;
var u = withSegment.End;
var bl = this.Intercept;
var ml = this.Slope;
if (withSegment.Slope == null) {
if (ml == null) {
if (Math.Abs(this.Start.X - v.X) < Float.EPSILON) {
ret = new Point[]... | 0 |
5254b1c6fbba38c5676d4df94e2c062a | 70fe90344ecf77530956e792e8446400 | Draw gradient sectors for directions. | class Sunpath(LBSunpath):
def __drawDirectionLines(self):
startVector = Vector.Scale(Vector.YAxis(), self.scale * self.__radius)
startPt = Point.Add(self.basePoint, startVector)
endVector = Vector.Scale(Vector.YAxis(), 1.12 * self.scale * self.__radius)
endPt = Point.Add(self.basePoint, ... | 0 |
5ab1e0f39acef1bbde66ca9cb4cfc54e | 3a0ce46624aa27b1836aa810bbb3015d | 根据公众号appid获取无限极分类信息 | {
$module = 'lingqian';
$action = 'getAppinfo';
$params = [
'action' => $action,
'appid' => $appid,
];
$results = $this->request($module, $params);
return $results;
} | 0 |
23fe1874b7829a35b298bc2a12a13000 | d39859fefbc702cd1225e80ec93f4f9d | Compute market cap value | class Capital(object):
def get_market_cap(self,date):
return (self.__position.iloc[-1] * self.__data.loc[date]).sum() | 1 |
f97ae7029268b5268bd6f59293e81334 | ec6557ae42ac05269206a872d9148326 | Função para instalar o sistema de arquivos | namespace DehaxOS
public class DehaxOS : IDisposable
private void Install()
{
FileSystem.CreateDirectory(SYSTEM_DIRECTORY_PATH);
FileSystem.SetAttributes(SYSTEM_DIRECTORY_PATH, new Attributes()
{
system = true
});
FileSystem.CreateF... | 1 |
e9e9b830a1936c6122bb5e8cd420ba5c | 6a42f166a5dee8941edcf13728168398 | Обновляем координаты звезд | def stars_update(stars, ai_settings, screen):
check_stars(ai_settings, screen, stars)
stars.update()
for star in stars.copy():
if star.rect.y >= ai_settings.screen_height:
stars.remove(star) | 1 |
98f91ac124f8762a8d9bb526d0d086fb | c6d8fa4bfec59dcf2375092a18bc3b1b | парсинг листа из базы данных -> привидение к листу класса MyJob | class ProjectsParser:
def get_tasks_list(self, resp):
task_list = TaskList()
for value in resp['task']:
task = Task()
task.set_project_id(value['project_id'])
task.set_task_id(value['task_id'])
task.set_currency_id(value['currency_id'])
task.... | 0 |
95dbe733c739c7786f127ae4f3c4fad7 | c15d2904cbaa36fa75843aefde87988f | Build a PyTorch Geometric convolution layer given specified input and output dimension. | in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
dilation=1,
output_padding=0,
groups=1,
bias=None,
padding_mode="zeros"):
super()... | 0 |
d43af8743840afcc6da4bd68ecb3fceb | f1bc9aefb07703deff19511b84cb5be4 | Получить номера выбранных для импорта элементов. | var lst = new List<int>();
Invoke( new Action( () => {
if( listViewItemSelection.Count > 0 ) {
foreach( int index in listViewItemSelection ) {
lst.Add( _item[ index ].SubItems[ 0 ].Text.ToInt32() );
}
}
} ) );
return lst.ToArray();
} | 1 |
e9b4c4192adbc93bf3ff493c10c41a22 | 8d40ba58031ee838356c0683db3e0b36 | This method sets the session and DB Connection timeouts | {
try
{
ApplicationDataContext.Instance.SetConnections(SessionCompany.ConnectionString, true);
ApplicationDataContext.Instance.SqlCommandTimeOut = Convert.ToInt32(SessionCompany.ConnectionTimeout);
return true;
}
cat... | 1 |
e0761dd50ca6746612d008cf6293f32e | e80a506d45b4f6363b549765ac38c292 | Initiates the asynchronous execution of the GetDashboardForJobRun operation. | namespace Amazon.GlueDataBrew
IAsyncResult BeginDescribeJobRun(DescribeJobRunRequest request, AsyncCallback callback, object state); | 0 |
b349e0e395255a9c3c3a2445ef38f3f5 | dfcf31cc83baa05aeed9993dad937c16 | 如果tm为空,即使usec不为空,也不去获取时间 | struct tm *getostime_format(struct tm *tm)
{
if (!tm) { return NULL; }
time_t sec;
if ((sec = time(NULL)) < 0) {
return NULL;
}
tm = localtime(&sec);
return tm;
} | 1 |
d7c955c1b981ee29ea92ca0dbbadf955 | 8279f387a4911f40aa536d8a4d4fd07e | Returns true if this instance is a model unit. | {
SceneObject* so = GetIPtr(_self, SceneObject, IMap3DItemPtr);
if(!so)return false;
return (so->GetType()==MeshData::MeshType_SceneUnit);
} | 1 |
1baeb10be4a90cbd601829af0b59ac1b | ceba2a1c1b26b8c1e60c8b1cebcabc87 | 建立模块间的父子关系 | {
Schema::create('component_module', function (Blueprint $table) {
$table->unsignedBigInteger('component_id');
$table->foreign('component_id')->references('id')->on('components')->onDelete('restrict');
$table->unsignedBigInteger('module_id');
$table->foreign('... | 0 |
550f81b0446081dbc4bcc9e808c5450d | 2f8a740079a730be1c7e036cff5f8472 | Выделение ячеек со скидкой | self.connection_objects = sqlite3.connect("shop.db")
self.cur_objects = self.connection_objects.cursor()
objects = self.cur_objects.execute("""SELECT id FROM objects ORDER BY important""").fetchall()
object_list = []
for k in range(int(self.comboBox_sale_number.currentText())):
... | 0 |
54e6b2d1759f5ef88d04d0b9be144133 | 16a8d8f45924ba96040df544f74e75d2 | Ustaw opis imprezy. | class Company implements CompanyInterface
public function setDescription($description)
{
$this->description = $description;
return $this;
} | 1 |
4c7184ea95c321b7f17925c264922446 | e19d11890a82f5073e32e93337766a99 | FUNCTION
DESCRIPTION
Register external interrupt handler
PARAMETERS
None.
RETURNS
None.
GLOBALS AFFECTED
None. | ext->int_no = int_no;
ext->int_mode = RISING_EDGE;
ext->enabled = FALSE;
} | 0 |
7c624631f44e7fcbc43f521dbd661d7d | 77a1f775078ccfb45c12eaad130356ed | Method untuk mendapatkan jumlah batu | public class PlayerShoot : MonoBehaviour
public int GetBombCount() {
return bombCount;
} | 0 |
1310b9d69d5607b8ab9a071a6e978239 | f34d3a7f5e828c2ad65bb14a7ca14307 | Test sending a video protune white balance command | class TestSetResponseCallback(unittest.TestCase):
def testVideoProtuneColorResponse(self):
message = (mavutil.mavlink.GOPRO_COMMAND_PROTUNE_COLOUR, mavutil.mavlink.GOPRO_REQUEST_SUCCESS)
self.mgr.set_response_callback('vehicle','name', message)
self.mgr.processMsgQueue.assert_called_with() | 0 |
ccf50c17a29f38314e4c2f4685cc3c70 | dc7a1b2c577d0accccbc46c1cdeff0a2 | Returns all statement blocks that contain a function operator
calling the given function.
null indicates the main program and returns an empty list | public class SymbolTable
public List<Symbol> getFunctionCalls() {
return simpleTypeSearch(Symbol.FUNC_CALL);
} | 0 |
ba0ea65f71b3301cae2fadc62677e97c | 59fc35c355dbcdfd11a1ccb3b3ced22f | Store state signature for comparison during next time step | {
double deltaX = history[99][0] - history[98][0];
double deltaY = history[99][1] - history[98][1];
switch(stateX)
{
case WAIT:
signatureX = signatures.UNKNOWN;
if(deltaX >= THRESH_RIGHT[0])
stateX = states.RISE_A;
... | 1 |
fa354d611ceef3962d5dc99e0d2d4fb5 | c1d6e66b8b8cd22ed8a1ed0710d7b226 | Sends data down a conn, returning zero to indicate
success or non-zero if an error occurs. | {
ULONG BytesSent, TotalBytesSent;
if(Len <= 0)
return (0);
TotalBytesSent = 0;
while(TotalBytesSent < (ULONG) Len)
{
pConn->InSend = TRUE;
if ((BytesSent = send(pConn->Sock, (char *) Buff + TotalBytesSent, Len - TotalBytesSent, 0)) == SOCKET_ERROR)
{
if(g_fNonBlocking && (WSAGetLastError() == WSAEWOUL... | 1 |
77130dc396c9a87b4638e957f94d7a7b | 973ec6d3ee509772ad7a32c30b89fdd9 | 获取商品最小起订数量 | @Table("st_stock")
public class Stock extends IdEntity{
public float getNumberMin() {
return numberMin;
} | 1 |
382eaa2ff9c2c5c52b0982b153272056 | 199a33750f2589dd0ad3c7f792dac755 | 姓にふりがなをふるための Grocery CRUD コールバック関数 | function getRecipeCallback(){
$("ingredient-title").attr("アクアパッツア");
setIngredient();
changeNameContent();
} | 0 |
dfad0ad15616dcef2c1a75e6d28f25c5 | d4aa4b81f0bf32372ea51ece8f287bd7 | analyze how many images per radiologist has annotated. | labels = self.get_labels()
in_files = self.xml_path_parse()
count_labels_res = {}
for l in labels:
count_labels_res[l] = 0
for i, infile in enumerate(in_files):
in_file = open(infile)
tree = ET.parse(in_file)
root = tree.getroot()
... | 0 |
b4b6090cbff465f056ecd504c4efe6fe | 62dc14a1b6616b5b284dc5917dadf8ff | Creates a new ingredient entity. | {
$this->id = $parameters['id'];
$this->name = $parameters['name'];
$this->ingredients = $parameters['ingredients'];
} | 0 |
38bea37fc2952b0cd82a12c3d753bd28 | 023739b246773df244347cd6fd48ed3f | Function for general CV to PIL conversion | def cv_to_PIL(cv2_image):
img = cv2.cvtColor(cv2_image, cv2.COLOR_BGR2RGB)
im_pil = Image.fromarray(img)
return im_pil | 1 |
65e5ab8c6d53a18a398bc324456e8da3 | 5051eab6686fe7dc6f863dfc49fc9da2 | Show list of networks for selection | client = MongoClient('mongo', 27017)
db = client.pov2
try:
network_sets = db.netset.find()
except:
error = "Failed to read the net-set database"
return render_template('init/dberror.html', error=error)
return render_template('init/show_network_sets.html', network_sets=network... | 1 |
850ce1676d93e51dae5694b4a0b6fe71 | 81aa19f143031c4d5d6a666a49bd7aff | Установить класс-маркер, относительно которого делать поиск | public IAnchor setClass(ClassKind ck); | 1 |
a26ef7ad9b52198d38ca56a3b85b9078 | 96d150af7bf540f3ebce5fe4cfcdf9b1 | Gets percentage of text with different labels. | n_events = 0
started = False
for i in labels:
if i:
if not started:
started = True
n_events += 1
else:
started = False
frequency = n_events / len(labels)
return frequency | 0 |
fa4689db050e6fe9af9fd38efa031d4f | 8980259b19bdf6be6dcf47c286d7399a | Gets the part of the buffer that has been written to. | namespace SecureSocketProtocol3.Utils
public class PayloadWriter : IDisposable
public byte[] GetBuffer()
{
return vStream.GetBuffer();
} | 0 |
a7cb3970aa5b7bfa77d8e47be9a8ef0d | 3018d15d898c73cd5f164fdb116b24bb | Transitions the player to the sixth level. | {
Vector3 nextLevelPosition = transform.position + Vector3.down * 50;
LevelController.GetInstance().BeginLevelTransition(nextLevelPosition);
} | 0 |
dbf5df1b0897cda44c45d93e7cb1afae | dd37d9cd828d02eca68981d3b3a03fd2 | Opens connection to OpenOffice.org. Subclasses must implement this method in order to activate
the application and they must supply the constructed connection to the base class. | public class NOAUIPlugin extends AbstractUIPlugin
private static IStatus activateOfficeApplication(IOfficeApplication officeApplication, Map configuration, Shell shell) {
IStatus status = Status.OK_STATUS;
try {
officeApplication.setConfiguration(configuration);
boolean useProgressMonitor = tr... | 0 |
305da877347fb2c92bbe0cdd5ef63865 | e2c351fead60410c240d9629d534425f | Abrir Formulario Bodega Inventario | {
if (Application.OpenForms["Producto"] != null)
{
Application.OpenForms["Producto"].Activate();
}
else
{
Producto P = new Producto();
P.Show();
}
... | 0 |
352e4e1472f1a7c5500b4e21de5f2435 | 814c68d2a4d41640a97f8b2639fab1c7 | Get whether the basic tokenizer currently points to a basic token or not. | static ast_tok_t *ast_tsbasic_last_tok(ast_tsbasic_t *tsbasic)
{
return &tsbasic->tbasic;
} | 0 |
a55c1bd02236f68c69de1ab4c5b9faf5 | afca7ecb906d5226263007c3f9f10223 | Serialize unknown objects to JSON. | class JSONParser(Parser):
def dumps(self, obj):
simple = self.serializer.serialize_obj(obj)
return custom_json.dumps(simple) | 1 |
6c3ff70fbce7c5e8be28405f25fc0f2c | 6a204ca46d77ed54bd5105cdcdf80a65 | 型テスト | function test($in, $result){
$exe = execute($in);
if(output($exe) === $result){
echo "OK\n";
return;
}
echo "NG!!!!!!!!!!!!!!!!\n";
} | 0 |
096a3fdf4a4458670786bea20681d2d9 | 5c7e21512bdd05a6fc998b6633c17bc2 | Method: move the location Over Time Task, calls the callback and clears the task when at destination. | static void MoveCar(xPhysicsTaskParameter_t *taskParam)
{
char buffer[BUFFER_SIZE];
float decel_speed;
accel_up = going_up;
while(cur_loc != dest->feet)
{
vTaskDelay(moveDelay);
if(emerg_stop_enabled)
{
if(going_up)
{
dest = &(request... | 0 |
aceb2d778635177521a4a93f6d30d0f5 | d0b9836abc7cee1305def2107f3aafc5 | Update a node # noqa: E501
Updated the information for a node. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True | kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_node_using_delete_with_http_info(node_id, **kwargs)
else:
(data) = self.delete_node_using_delete_with_http_info(node_id, **kwargs)
return data | 0 |
0d59f2f5d02a004df3f1d43863b93dc8 | 5e6514a18ae7364fd0e1490acf47a071 | 0xFX07: Sets VX to the value of the delay timer.(Vx = get_delay()) | uint8_t Vx = (opcode >> 8) & 0x000Fu;
v[Vx] = delay_timer;
} | 1 |
c24975a27d9a5deb51e90db57d20c5dd | 53f155a225fd788484b6c0d72f809115 | Emits after the `ControlWrapper` was created. | export class SimDialogRef<T, R = any>
afterOpen(): Observable<void> {
return this._afterOpen.asObservable();
} | 0 |
c0297ba1b9c8f865132beed7c7102148 | 9848a2c24b59f3bdf26cc5da816903af | 1.根据材料Id找到对应应用案例 | namespace HanGang.MaterialSystem.MaterialTrials
public class MaterialTrialAppService : MaterialSystemAppService, IMaterialTrialAppService
public async Task<Guid> AddApplicationCase(ApplicationCaseDto input)
{
var applicationCase = new ApplicationCase
{
Remark = input.... | 0 |
47dab2f3e48740da706451cec3f9d833 | 810c885dc8d3505d05b3f28c512f99e1 | Request to add an entity type to the evaluator Model with a random color.
<p/> | public void requestTypeEnter (TypeCheckerNodeComponent node); | 0 |
0c57394d64e0d11eb05b0765e73849f9 | 0eb4800b3f5d65ef9ce32d1ca6b60bf0 | 选择箱号 | public class CommonCSVInfo
public String getBoxNum() {
return boxNum;
} | 0 |
8d34ba3e8adafcb6f1592a2c449b1fe6 | 52d344ff6671e28141f8c2673589ccea | HttpClient fills in the Content-Length,
and complains if add it again, so skip it as well as the Host
header. | header_names = dict.fromkeys([k.lower() for k in headers])
skips = {}
if 'host' in header_names:
skips['skip_host'] = 1
if 'accept-encoding' in header_names:
skips['skip_accept_encoding'] = 1
self.putrequest(method, url, **skips)
for hdr, value in ... | 1 |
016b9ddcbd177468afc214576dbe75be | ba674690ac26108e4024ace7eb4e476b | Generate 2D coordinates of points outlining rectangle clockwise. | centerx = x + width / 2
centery = y + height / 2
x1, y1 = self.xy_rorate(theta, x, y, centerx, centery)
x2, y2 = self.xy_rorate(theta, x+width, y, centerx, centery)
x3, y3 = self.xy_rorate(theta, x, y+height, centerx, centery)
x4, y4 = self.xy_rorate(theta, x+width, y+hei... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.