query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e55595145b53cfaeb62df34d41cf387f | 1d3ad988d04e962f2aa75734c43052aa | Loads the prices from the database. | self.df = pd.read_sql(self.config['sql'], self.engine, index_col='id')
self.df = self.df.replace([None, np.NaN], 0)
self.df['price'] = self.df['price1'] + self.df['logistics_cost'] | 1 |
ed97d9a57671111b67792fd6ee1ca9bd | 439bd338d0412b6ffe1c11d3b0c75d72 | 确认兑换弹窗确定按钮 | Confirmation(number,ids){
_http.request({
url:"/api/exchange/confirm",
method:"GET",
data:{
quantity: number,
goods_id:ids
}
}).then(res=>{
console.log(res)
if(res.code == 200){
this.setData({
isShow: true,
status: "Exchange",
... | 1 |
616675f8cde977daaa48f60107526f03 | 100c9e29c58bc43ce3644718dbbd8593 | Get Active Directory Client for User. | {
var token = GetToken();
if (string.IsNullOrEmpty(token))
throw new LostAuthorizationTokenException(Constants.LostTokenErrorMsg);
Uri baseServiceUri = new Uri(Constants.GraphResourceUrl);
ActiveDirectoryClient activeDirectoryClient =
... | 1 |
c460dcb0e76e961ae970eb6ada52f74b | 10b4db233f1f90e7d37c7b545a4675c7 | 获得分词结果所包含的词的集合 | public class WordsHandler extends DefaultHandler
public Words getWords() {
return words;
} | 1 |
17016f4d332afde78df5e995e7917b0e | 911cf40b6dd7a1237c3d46ebf8f445cd | Gets the Sord object with the given numeric object ID.
The Sord must exist. | namespace EloixClient.IndexServerFW.Content
public class FWContentInterface : ICleanupEvent
public virtual FWSord LockSord(int objId, DocAction docAction)
{
return LockSord(Convert.ToString(objId), docAction);
} | 0 |
feaee79766c5b6fc99dfcfb7c64092d0 | f7c876fe4cb1b396be93373ab01ac639 | Test repeatedly the number of maximum incrementations in a clock edge.
This gives indication of both resolution (average number of incrementations)
and jitter (variance of the number of ticks).
It also allows to plot the histogram of the distribution of the number of incrementations.
Writes the result in the folder div... | {
double time = 0;
ofstream fout;
fout.open(file, ios::out);
fout.setf(ios::fixed);
while (size <= limit)
{
time = test(size, n, mult);
fout << "(" << size << ", " << time << ") " << endl;
size += 100;
}
fout.close();
cout << "file " << file << " operation com... | 0 |
849097d1cbf4ae3bd1a38d4a3ef12cde | b438122d5a45b3abf024cb8d74043329 | les mouvements de la dame = ceux de la tour + ceux du fou | @Override
public int getBonus() {
if(this.couleur == Couleur.BLANC) {
return Fou.TABLE[this.x][this.y];
}
else {
return Fou.TABLE[this.x][7-this.y];
}
} | 0 |
c31090458e84e4078e45d35fb754b212 | 950d12c11b87e60971938f68c4d6806b | Adds the supplied instance of <code>JInternalFrame</code> to the desktop
for display to the user. | public class JFormFrame extends JFrame
public void addToInternalPanel(Component component) {
internalPanel.add(component);
internalPanel.setVisible(true);
repaint();
} | 0 |
370cf07ab627bf7fb03471d3aee37575 | 85a4db7253929f48bdeef2d775fdee5f | Wrapper for PHP's "mysqli_ping" function. | class PDO_pgSQL
public function ping ()
{
return \pg_ping($this->_connection);
} | 0 |
90b3c8d5a02a337f7fc9759961c57b29 | 6c933caa046a179372e145216e609223 | # prediction function for a generalized fitted object
#
# Args:
# obj: a gfo object
# newdata: either a data.frame or a mids (multiply imputed data set) object
# type: TODO: this is not hooked up yet
#
# Returns: numerical vector of fitted response values | predict.qdarob <- function(object, newdata = NULL, type = c("probs", "posterior", "class")){
type <- match.arg(type)
if (is.null(newdata)){
newdata <- object$predictors
}
attr(object, "class") <- "qda"
preds <- MASS:::predict.qda(object, newdata, method = "predictive")
if (type == "class"){
return(p... | 0 |
714dca893d48f7f324c67c2cd73e2327 | c9cf494e8259996c29382d34313be2ec | useEnv overrides `process.env` before each tests and restores to the original value after each test. | class AppTest extends TestCase
protected function setUp(): void {
foreach (getenv() as $key => $value) {
if (preg_match('/^(DB|ENVIRONMENT_NAME|PROJECT_NAME|S+MTP|VARNISH|WARDEN)/', $key)) {
putenv($key);
}
}
putenv("PING_TOKEN");
unset($_GET['debug']);
} | 0 |
48c114e5f3f3c38359f0107ed1696b8e | ad7352c5ba612693986e7197af11c203 | Decrease the indentation of a region of code by a certain number
of levels.
**INPUTS**
*STR* levels=1 -- Number of levels to unindent
*(INT, INT)* range=None -- Start and end position of code to be indent.
If *None*, use current selection
**OUTPUTS**
*none* -- | class Wrapper(metaclass=abc.ABCMeta):
def _indent_level_down(self, levels: int = 1) -> None:
self.__indent_level -= int(levels) | 1 |
71c06ff091c11b5cdf72ff8b3fc2b6a4 | f5291c31a17e9669cfdd0d28da3dc15e | Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all | let events = this._events;
if (events) {
if (callback) {
let es = events[event];
if (es) {
let index = es.indexOf(callback);
if (index > -1) {
es.splice(index, 1);
}
}
} else if (event) {
delete events[event];
} else {
... | 1 |
a1905fef839bf17a0b836b1e230323a1 | fa001e3129de0ece4fa6703a94284a7c | Сохранение массива байтов в файл. С помощью этого метода можно сохранять во
внешний файл ключ симметричного шифрования или вектор инициализации. | public class Wallet
public void writeToFile(String path, byte[] key) throws IOException {
File f = new File(path);
f.getParentFile().mkdirs();
FileOutputStream fos = new FileOutputStream(f);
fos.write(key);
fos.flush();
fos.close();
} | 1 |
c964f2a11f65a234bbedf95153f7ba5c | e3c415898daa28fee8b343315a3d3f95 | 画面の更新を行う | function update() {
ojisan.update();
updateObj(block);
updateObj(item);
updateObj(bowserfire);
updateObj(bowserfire1);
updateObj(fire);
if(!music.start) return;
updateObj(goomba);
updateObj(piranha);
updateObj(bowser);
updateObj(bulletbill);
updateObj(koopa);
if(ojisa... | 1 |
7fb68bc7fdb4f99ca182fc2cc0e37a12 | b7f8f3e2401d7c51a716029b04bd9cf7 | Books an OpenBox offer so that it cannot be bought by several customers simultaneously. | namespace FindYourNumber
int OpenBox(int index); | 0 |
f56a16010726f9642730a6cb3a73e4fd | 62cff7c83cba3ccbd983bab65a59df63 | Deletes all rows from the pengguna table. | class penggunacontroller extends Controller
public function destroy($id)
{
} | 0 |
45063fe47145329fe8c79d3afb1a75e6 | 2a4d334836bcf764654bb620e1b82e9f | Generates a new MD5 hashed signature | QString MusicEventPlugin::generateSignature(const QString aBaseString)
{
writeLog("MusicEventPlugin::generateSignature");
QByteArray byteArray;
byteArray.insert(0, aBaseString.toAscii());
QByteArray md5Hash = QCryptographicHash::hash(byteArray,QCryptographicHash::Md5 ).toHex();
QString returnString (m... | 1 |
ce647e8907be663407a17698640d8769 | d300bbdbcd9a5def630b1eb36a740796 | Converting English digits to Kurdish digits | {
return englishOrArabicDigit
.Replace("\u0030", "\u06f0")
.Replace("\u0031", "\u06f1")
.Replace("\u0032", "\u06f2")
.Replace("\u0033", "\u06f3")
.Replace("\u0034", "\u06f4")
.Replace("\u0035", "\u06... | 1 |
78ba5aec9240d58a0f7c8242bcdbb8b3 | ceb95b17fcfd2edf37efb7d63f8bbcf2 | 予備金額5を取得する | class ProperOrderInfo
public function getItemAmount5() {
return $this->itemAmount5;
} | 1 |
8d66cb85ccf71f43428af7026c0e833d | d1c34c4d7e11b466302ff84d37764a28 | 生成某个渠道某天的对账文件 | $strtime=I('post.strtime');
$endtime=I('post.endtime');
$jfidarr=I('post.cl_id');
$superid=I('post.superid');
$ztid=I('post.sb_id');
if(!empty($superid))$w=" && superid in ($superid)";
else $w='';
if(!empty($ztid))$w2=" && sbid in ($ztid)";
else $w... | 1 |
477024c4927cadae0239e04cbab0e3b4 | 3ee144bd99ff1c7150ca756906487206 | 변량들의 제곱의 합을 구한다. | int sum = 0;
for (int v : vector) sum += v*v;
return sum;
} | 1 |
2eda9cfff8e8c76d095e26d3f1b798be | 960888a49efc8bca9cf4a965b08a1264 | Affiche les infos du tournoi | class TournamentController extends AbstractController
#[Route('/tournament/{id}', name: 'tournament_show')]
public function show(Tournament $tournament): Response
{
return $this->render('tournament/show.html.twig', [
'tournament' => $tournament
]);
} | 1 |
118b65be1c03f62dfb76454dbd2f859a | 5255317dbed6f55a81fddf652f7bf040 | Update the write circular queue indicating data has been written, freeing space for more data to write. | void UpdateQueueRead(uint16_t SendSize)
{
uint32_t s;
s = os_lock();
pRead = (pRead + SendSize) & (MAX_BUFFER_SIZE - 1);
os_unlock(s);
} | 0 |
f53a511d6ab1277d664bd92d7019de3b | c6d8242d064d235c9d0c0523ff6fb245 | 检查企业是否进行了资质认证 | queryEnterpriseCertificationStatus({ commit, state }) {
return new Promise((resolve, reject) => {
const data = {
userId: state.userId,
roleId: state.roleId,
currId: state.currId
}
queryEnterpriseCertificationStatus(data).then(response => {
const { data } = respons... | 1 |
5256307ae1b3194cbfb2e5cf29030228 | 746a8a10f3e2bbdadf10335dbb167c56 | The maximum height the resizable should be allowed to resize to. | @JSProperty("maxHeight")
void setMaxHeight(double value); | 1 |
afc23bc70ea8121f57f5fdfc399f17e5 | a67ab64d16827388d03554133c52b353 | 获取当前选定对象的下钻对象集合 | where T : DependencyObject
{
return items.DrillDown<T>(i => i.Ancestors());
} | 1 |
6d5b6a689ea8158a1881b13fcc365e4d | b81b9c78de8a38aa6bd25bc6dcf3ad40 | 當使用者填妥資料按下Submit按鈕後,本方法接收將瀏覽器送來的會員資料,新進行資料的檢查,
若資料有誤,轉向寫入錯誤訊息的網頁,若資料無誤,則呼叫Service元件寫入資料庫 | public class MemberregistAction
@Execute(validator = false)
public String submit () {
if (TokenProcessor.getInstance().isTokenValid(request, true)) {
TMember emp = Beans.createAndCopy(TMember.class, memberlistForm).execute();
tMemberService.insert(emp);
}
return "memberconform.jsp";
} | 0 |
e6d83b9869d1087c1f36d385a6c9a8cf | 7ac39e17caf4ce776a32d25fbda75c09 | Starts MapActivity with property information from list bundled as extras | void startMapsActivity(); | 0 |
4af304dfc0144191bcd476425053158e | 70eaf2e69225f9804089fcd600783d4a | Adds the JPEG image represented by the input bytes at the specified location. | namespace nanoFramework.M5Stack
public class Lcd
[MethodImpl(MethodImplOptions.InternalCall)]
public extern static void DrawJpg(byte[] jpg_data, uint jpg_len, uint x = 0, uint y = 0, uint maxWidth = 0, uint maxHeight = 0, uint offX = 0, uint offY = 0, JpegDivider scale = JpegDivider.JPEG_DIV_NONE); | 1 |
97133c1e7f53dc9b07eadc17f2593ab5 | 6b427a7edd8f22f530c24168d8bed90f | Test of findRange method, of class ServiceFacade. | public void testFindRange() throws SQLException, Exception {
System.out.println("findRange");
int from = 0;
int to = 1;
ServiceFacade<ObjectInterface, ObjectInterface.ObjectDataInterfacePK, String> instance
= getInstance();
List expResult = null;
List ... | 1 |
7ac9614e1aadb4b3125181d0e1fd323c | 23a39212590e80171bcc07533640f737 | Tests that we can transfer weights from one network to another that has a potentially different size. | class TestLayers(unittest.TestCase):
def test_conv_resize_both(self):
conv = layers.ActConv2D(20, 10, (1, 1), (1, 1))
w_cp = conv.co.weight.clone()
b_cp = conv.co.bias.clone()
conv.resize(25, (1, 5, 6, 7, 9))
self.assertTrue(w_cp[(0, 2, 3, 4, 8), :].eq(conv.co.weight[:5, :]).all(... | 1 |
1882405604ad22dbfd73d0b453e626ed | 9e83c144c91f55f505554121a6bfb02a | 根据指定key对对象数组排序(默认为升序) | function sort(order: 1 | -1, key?: string): any {
return arr => arr.sort((a, b) => key ? a[key] - order * b[key] : a - order * b);
} | 1 |
fa8659e4df813c9b8e87999babed4584 | 06e73a41e2fb128f963c5c7159f847a5 | Decodes and processes a incoming packet from the ICCommLib channel | void decodePacketAndRespond(){
RXBufferCurrentPosition = (unsigned char*)&RXBuffer;
TXBufferCurrentPositionHandler = (unsigned char*)&TXBuffer;
TXBufferCurrentPositionSCI0 = (unsigned char*)&TXBuffer;
TXBufferCurrentPositionCAN0 = (unsigned char*)&TXBuffer;
RXCalculatedPayloadLength = RXPacketLengthReceived;
RXHe... | 1 |
02ff9ad4533a0ca1c810846d267684eb | fc2bbe95563611d717d0f070d51228cb | Default destructor for Battle class | BattleAISearchNode::~BattleAISearchNode() {} | 0 |
cb177d0bc1989af884a93fd2b1557de9 | 4f6a2fd5f93adb4097d0f427d247f12d | Function: List available job templates | namespace Microsoft.Hpc.Scheduler
IStringCollection GetJobTemplateList(); | 1 |
d2195dcb885cbf55c6e908585ef125a5 | 82f32c71d72003bdc127dd53a436e181 | Check that a supplied string is an element and if not, warn user and allow them to correct it. | if self.link(:title=>text).exists? == false
puts "\nCategory...\n#{text}\n...not found in list!\n\nPlease check for typos in your test data.\n"
end
if self.link(:title=>text).visible? == false
self.link(:title=>text).parent.parent.parent.ins.click
end
if self.link(:title=>text).parent.cl... | 1 |
c1316228a00fe8421a540485de092ace | cf16a681349701c0220fc89c7f270371 | Deletes the specified resource share.
<important>
<para>
This doesn't delete any of the resources that were associated with the resource share;
it only stops the sharing of those resources through this resource share.
</para>
</important> | {
var fileShare = this.fileClient.GetShareReference(fileShareName);
try
{
await fileShare.DeleteAsync();
}
catch (RequestFailedException e)
{
Console.WriteLine("HTTP error code {0}: {1}", e.Status, e.ErrorCod... | 1 |
5e4ac58be476e7903d03828383f2dbaa | 1989db52efef08689ff98586269c0269 | gives less velocity change the further the square is from the center | function influenceFunction(dist, boardSize){
return 16 / Math.pow(4,dist);
} | 1 |
b3a50513195ed945d9fa64a0fa1bbcac | c77393ece84969a4bb5aab6751f97298 | Called by InvalidateMeasure | namespace Microsoft.Maui.Controls
public partial class VisualElement : NavigableElement, IAnimatable, IVisualElementController, IResourcesProvider, IStyleElement, IFlowDirectionController, IPropertyPropagationController, IVisualController, IWindowController, IView, IControlsVisualElement
protected virtual void Invalid... | 1 |
7766e7e33decf6d839832d0b4bb608c9 | 25a7506376f7e4bf76c9ce0f1cc6cd94 | Esta función es una implementación de: https://doc.rust-lang.org/std/primitive.i32.html#method.rem_euclid,
donde r = euclidian_modulo(a, b) ===> 0 <= r < b. | def rem_euclid(lhs: int, rhs: int) -> int:
r = lhs % rhs
if r < 0:
if rhs < 0:
return r - rhs
else:
return r + rhs
else:
return r | 1 |
da5674e92da1a567023b194a98ce59ea | 1ab2730377aa1271a18424e764b25a22 | Constructor to create a new directed multi-graph. | class OrderedMultiDiGraph(OrderedDiGraph[NodeT, EdgeT], Generic[NodeT, EdgeT]):
def __init__(self):
self._nx = nx.MultiDiGraph()
self._nodes = OrderedDict()
self._edges = OrderedDict() | 1 |
f65db7b06841e4b22ab6f96689d9989a | 95d7b4cdb3e84cd5af650ec42a59301b | 获取距今日前N天的日期 | public class DateUtils
public static String getDate(Integer n) {
Date d = new Date();
d = DateUtils.getDateAfterDay(d, n);
SimpleDateFormat sdf = new SimpleDateFormat(SystemContext.YMD);
String dateNowStr = sdf.format(d);
return dateNowStr;
} | 0 |
26365712218ca6a93fb2613136580237 | 559e114dc743a49de49a7a04351064ab | Destroys an {@code ovrTextureSwapChain} and frees all the resources associated with it. | public class OVR
public static native void novr_DestroyTextureSwapChain(long session, long chain); | 1 |
f0d1dd29f25b2d32621f24015798b49b | 108655b3ad70ecbf7744156bdc421e30 | Fx0A | void CTsipParser::Parse0x8F (unsigned char ucData[], int nLen)
{
switch (ucData[0])
{
case 0x20: Parse0x8F20 (ucData, nLen); break;
case 0xAB: Parse0x8FAB (ucData, nLen); break;
case 0xAC: Parse0x8FAC (ucData, nLen); break;
default: break;
}
} | 0 |
59596df0e7daf779eceb3352f1d4fae6 | fe569f6b3331e10036c4a753fa6bebff | StartButton
A class to control the start button on the waiting room page. The master of the
game selects this to transition from the waiting room to gameplay. | class StartFrame(WindowFrame):
def __init__(self, master, controller):
super().__init__(master, controller) | 0 |
c159a951dd4b7560502429313d120e33 | 9a161dc1a1ee2c83ef7c5a40694ccd43 | 新增一条桃叭监控配置 | namespace HaikanRefuseClassification.Api.Controllers.Api.V1.Monitoring
[Route("api/v1/Monitoring/[controller]/[action]")]
[ApiController]
public class GMonitoringController : ControllerBase
[HttpPost]
[ProducesResponseType(200)]
public IActionResult AddGrabageMonit(dynamic model)
{
... | 1 |
2c5b8b83931ce6efe11324c0cbf1b3d2 | de384f6bfa91d99131b52faa812ffc73 | Test gate cover discovery. | class TestGateController(CoverTest):
async def test_open(self, aioclient_mock):
entity = await self.updated(aioclient_mock, self.STATE_CLOSED)
self.assert_state(entity, STATE_CLOSED)
self.allow_get(aioclient_mock, "/s/o", self.STATE_OPENING)
await entity.async_open_cover()
self.a... | 0 |
49a30390c12bbb5a1ff4f10016901526 | 61d3e6386d465788a80035149ea464e1 | Return lookup value description. | abstract class tx_caretaker_AbstractNode
abstract public function getValueDescription(); | 1 |
23a071e659323e2daa8054347fda7e94 | e5406be352f19dde2cee0fe5471a0ac7 | Returns the surfaces adjacent to the environment and ground | class BimNode(Node):
def external_surfaces(self):
l=[]
for surface in self.surfaces:
if surface.environments or surface.grounds:
l.append(surface)
return l | 1 |
3cb2ac06186e797b4ae6500dad59f4cc | 61c1220b747eb6d25e09ad9abb093db7 | Fires the actual request for the access token. This was isolated so it can be stubbed in unit tests. | public class AzureOAuthTokenProvider implements AzureAuthTokenProvider
private synchronized AuthenticationResult requestNewToken() throws ExecutionException, InterruptedException {
return authContext.acquireToken(RESOURCE, credential, null).get();
} | 1 |
25e4fb0d048b87a268d76ccc628907fc | 00b14b6d369c3523599897021209b49e | @brief Set the address length for S2LP Basic packets.
This parameter can be: S_ENABLE or S_DISABLE. | {
uint8_t tmp;
g_xStatus = S2LPSpiReadRegisters(PCKTCTRL4_ADDR, 1, &tmp);
if(tmp & ADDRESS_LEN_REGMASK) {
return S_ENABLE;
}
else {
return S_DISABLE;
}
} | 0 |
6d7f0f5a5c9b0647362232c7faaa5f3f | b0315fc3ceb82f57d60ee332028ec366 | Überprüft ob die Nummer in dem Block schon vorhanden ist. | {
if ($line > $this->getLineLenght() - 1) {
throw new OutOfBoardBoundsExceptionException();
}
for ($j = 0; $j < ($this->blockLength * $this->blockNumber); $j++) {
if ($number === $this->board[$line][$j]) {
return true;
}
}
r... | 1 |
87ed537abda1d57223062af0c2f56c82 | 015efdd23aa108800a67d3692fa2faf0 | Визначає назву моделі та id примірника u | {
foreach (DataRow row in model.GetModel(series.SerChoice()).Rows)
{
string tablename4 = (string)row[1];
if (Form2.selectedState2 == tablename4)
{
ModN = (string)row[1];
}
}
return... | 0 |
84895001ce9fd7d1136a2b7f0f4e620d | 4358c604adc84097b8615303ea9f08e2 | gets all leave applications | namespace ESSV2.Models
public class ServicesDTO
public static List<LeaveApplicationList> GetLeaveApplications(string userID)
{
List<LeaveApplicationList_Filter> filters = new List<LeaveApplicationList_Filter>();
LeaveApplicationList_Filter filter = new LeaveApplicationList_Filter();
... | 0 |
2334a081c57999aeecbf79377faa2e01 | 0b728cd453d11c0fa76bb5181b342e52 | Time elapsed since this entity's creation | public class Customer implements Runnable
public double timeSinceCreation() {
float elapsed_time;
long current_time = System.currentTimeMillis();
elapsed_time = (current_time - this.time_at_creation) / 1000f;
return elapsed_time;
} | 1 |
b00054dd362c0b5ee8ee3ac0830f307b | 808b05284dc3db04e4bce624396f17ab | Returns the device terminals that the wire is connected to. | public class WrappedDevice extends GroovyObjectSupport implements IDevice, GroovyObject
@Override
public Client[] getClients() {
return device.getClients();
} | 0 |
553b33d33c24e2f224742cd57d86c603 | e6276c9242e1b37c3f86b68313f1f0e6 | Get a np.ndarray representation of the point cloud.
Returns:
np.ndarray: the point cloud's points | class PointCloud:
def __array__(self, *_):
return self.__points | 1 |
802de58d605573d0b7fc3c814f73dcfa | ead5599b39f56776d85ae0952aaab853 | Creates an OTA Update tool with the given properties. | parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->toolkit = $toolkit;
$this->logger = $logger;
} | 0 |
1c8efa176657bff2a8a1008f1f9936d5 | d34318dd7e9908903b4c0dbaae1f725b | Abstract method returning the unit of this period. | ETimeUnit getUnit(); | 1 |
c2f4a77b721369b76006071d36f499bf | 6e4a4b449761a3379b3a994e3cb1ec06 | Calculates the day of the year on which a specified date occurs. | int GregConverter::DayOfYear(int year, int month, int day)
{
double rfirst = FixedFromYMD(year, 1, 1);
double rd = FixedFromYMD(year, month, day);
return rd - rfirst;
} | 1 |
a156951a4c2ae8a3949cf5b2915b4b31 | 9f75281328b28118a8b6a59d7d5896aa | 获取渠道商信息根据渠道商ID | @Remote
@Stateless
public class CMSServiceBean extends BaseBean implements CMSService
@Override
public com.creditcloud.cms.model.Channel getChannelById(String clientCode, String id) {
appBean.checkClientCode(clientCode);
return DTOUtils.getChannelDTO(channelDAO.find(id));
} | 1 |
39edac4032867f850ebb11116f5b0181 | 2f9c321d157c3803cbd249a5f0b70de6 | 一定時間経過後消滅する | public class SunbaControl : MonoBehaviour
void Sunba_Destroy()
{
destroyTime += Time.deltaTime;
if (destroyTime >= 3)
{
Destroy(this.gameObject);
}
} | 1 |
bd857c3221bcf20f7f820df2fb19a915 | ecbb8aef76831f962cb4cd346c07c311 | Project egovehicle coordinate to image. | def project_to_image(point, undist=True):
if undist:
point = project_from_pc_to_image_undist(point)
else:
point = project_from_pc_to_image_dist(point)
return point | 1 |
a1e986428e5d602bf81b33a8d6873ad8 | 5db8a10819c12b2590071bc4be44da7f | Devuelve el siguiente estado de la transición. | {
if ($this->active) {
if (count($this->transitionLog) == 0) {
return $this->getState(StateInterface::STATE_INITIAL);
}
} else {
if (!$this->isEnded()) {
return null;
}
}
return $this->transitionLog[count... | 1 |
193dde433e34532460ed65c6df5e0b05 | eb1c060fa415f32c029b392d1f8b548b | # function to plot the passaging data in ANP_passage_experiment.csv alongside best estimates (see estimating_virus_production_rates.R) and CI (see CIbootstrap.Rmd) | plotbf <- function(data, sims.df = NULL, sims.df.col = "bf", color = "black", coordy = NULL, label.x = "N"){
if(inherits(data,"seqbf") == TRUE){
subtitle <- paste("BF =",round(tail(data$BF,n=1),3),"// N =", sum(data$`sample size`))
caption <- paste0(data$prior[[1]],"(",data$prior[[2]],", ",data$prior[[3]],")"... | 0 |
832de673bc2a6f80a1a28442172a2bd0 | 0930b43e88aebd84359df2f5a981d098 | Set Shipping Protection base price | private function setFixedShippingPrice($fixedShippingPrice)
{
if(\Cart2Quote\License\Model\License::getInstance()->isValid()) {
return $this->setData(self::FIXED_SHIPPING_PRICE, $fixedShippingPrice);
}
} | 0 |
e4954f4f2db3c69437bfbcd84091aac4 | 0f0d5c4a6479f62223f86f738ad16fd9 | 判断代理数量是否超过代理池设定值 | class Gettet():
def is_over_proxy(self):
if self.redis.count() >= max_proxy:
return True
else:
return False | 1 |
b5cc8f45d89eb6fba59754db1fca9a37 | 13a2c0ff581d3342657e2323fd6d6ff2 | Sets up and runs the RandomColor GUI program. | public class ColorPalette extends JFrame implements ActionListener
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
ColorPalette frame = new ColorPalette();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
... | 1 |
483cf14c9c26a224116858ca574e0133 | 8a5fd5b9791c2d5de72655005719ac8e | Determine if there is an obstacle between two vectors | {
const FVector CrossA = Vec ^ A;
const FVector CrossB = Vec ^ B;
return !FMath::IsNegativeFloat(CrossA | CrossB);
} | 0 |
b07448b2500717ccb76a1f42b06985b6 | b088460e0fb590b79ff8b6cc53ff98da | 將DataSet的資料一次寫回XML文件 | namespace Nokia.Fast.ComUtility
public class XMLUtil
public static bool SaveXMLSetting(DataSet dsSetting, string XMLPath)
{
try
{
dsSetting.WriteXml(XMLPath);
return true;
}
catch (Exception er)
{
str... | 1 |
238284e729718e46a45c366bdede65b6 | c9afd876fe8ac318e570a7cce7c8fffc | Simple number palindrome check | namespace ConsoleApp.Exercises
public class Exercise6 : IExercise
private static bool CheckPL(decimal number)
=> number == Reverse(number); | 1 |
36c6f98f6062079b749eb653bdc18578 | bce894973dc3adbe3ed0d8fa4a9e647d | Masks all emitter systems | batch.begin();
for (Entity en: EntityHandler.getEntities()){
if (en instanceof Emitter){
handleEmitter((Emitter)en);
}
}
batch.setColor(DEFAULT_COLOR);
batch.end();
} | 0 |
4bcbacb919da8bcbda56636aa43ea247 | c3956a81dafb96421b7e481fcf120b4b | Poistaa valitun tapahtuman tietokannasta. | public class Tili
public boolean poistaTilitapahtuma(YksittainenTilitapahtuma tapahtuma){
if (this.tapahtumat.contains(tapahtuma)){
this.tapahtumat.remove(tapahtuma);
return true;
}
return false;
} | 0 |
5171a81aa1714eac1deadf1bc69ae4b3 | 1fe6cf0d66c7b344f49ba655255136af | 搜索规则设置 | var $groups=$("#search_form").find(".form-group");
for(var i=0;i<$groups.length;i++){
var $group=$($groups[i]);
if($group.hasClass("hidden")){
$group.removeClass("hidden");
$group.prepend("<input class='settting-checkbox' type='checkbox' ></input>");
}else{
$group.prepend("<input class='settting-check... | 1 |
141ce41235f4786b7c4b2f9989d9387c | 615844d2768c3575055057cab3bb34f6 | going from login activity to main activity | public class SignUpActivity extends AppCompatActivity public void onCreate(Bundle bundle){
@Override
public void onClick(View v) {
Intent intent = new Intent(SignUpActivity.this,MainActivity.class);
startActivity(intent);
} | 0 |
6cb115d847df485b49c7c8267c9b8cb5 | 027f77d8badf3183bdfce72e38deac47 | Toggles hide/show for the punchline and new joke buttons | function toggleButtons() {
punchlineBtn.classList.toggle('hidden');
newJokeBtn.classList.toggle('hidden');
} | 1 |
303d8542395a5056c9d34f746c9513e8 | 804edbea094fe0fd954043dc05eb2ef7 | Check if at least one day of the week is selected. | namespace WebVella.Erp.Jobs
[Serializable]
public class SchedulePlanDaysOfWeek
public bool HasOneSelectedDay()
{
return ScheduledOnSunday || ScheduledOnMonday || ScheduledOnTuesday || ScheduledOnWednesday ||
ScheduledOnThursday || ScheduledOnFriday || ScheduledOnSaturday;
} | 1 |
df9bdfa9b8acdb46f97c6f9269d7235c | 4db98221439a393501385e916e769366 | Checks if one of the players has scored more than the max # of points.
If there is a winner the scoreboard displays the winner. | def max_score?(scrs)
scrs[PLAYER_STR] == GAMES_TO_WIN || scrs[COMPUTER_STR] == GAMES_TO_WIN
end | 1 |
6d0afc358335200b163ecdf7387eb26d | 2fa7b04f1d1b90ce418c0e82b50b035f | Generate Relation. | class RelationController extends AdminController
public function create()
{
$arrCategoryParent = CategoryParent::orderBy('id', 'desc')->get();
$arrCategory = Game::where('parent_id', null)->get();
return View::make('admin.relation.create')->with(compact('arrCategoryParent'),compact('arrCategory'));
} | 0 |
ee3aec25aacd1929d38297f1d10f0463 | c0026808dafac53e4e31c917859f04f5 | authority sets must be non-empty and all weights must be greater than 0 | namespace
TEST_F(WeightsTest, ExceptionTest) {
EXPECT_THROW(new Weights(0), EmptyVectorException);
} | 1 |
4d2b2cdb8005a4d53100d8903ab2dbc4 | d978a3ffd35260d3f392ed25ce3fbff5 | Current Energy Produced in Svalin | class Nodes(Thread):
def get_s_energy(self):
return(self.s_energy) | 0 |
2f83cefb968c3031e40cf44d875f3fad | 69b86402260f432c64e568385b7e0bbe | 设置自动推流状态 | this.isAutoStart = isStartAuto;
if (isAutoStart) {
imageButtonCtrlCloudAuto.setImageResource(R.drawable.main_live_ctrl_cloud_stop);
} else {
imageButtonCtrlCloudAuto.setImageResource(R.drawable.main_live_ctrl_cloud_auto);
}
} | 1 |
d093e04fe95e1c5c61afe094cd26edde | 6103cf7395d8be695db43e5a6a7d46f0 | 将对话置为已读 | @Update(value = {"update ", TABLE_NAME, " set has_read=1 where conversation_id=#{conversationId}"})
void updateHasRead(String conversationId); | 1 |
26a08588e4c90208fd810ea44d243148 | c7d7be1afc0d7742f256b5f359b7e951 | When player click on warrior icon will play a sound effect | {
Stream str = Properties.Resources.click1;
System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str);
snd.Play();
} | 1 |
0fda537fc480aeb0eff7406560df7ce2 | cb1c7173c066341e58092b03f8ce46fa | 更新店铺快捷方式表 | class microshopControl extends SystemControl{
public function store_sort_updateOp() {
$this->update_microshop_sort('micro_store','shop_store_id');
} | 0 |
8117d61f068e3faf007eb32d62191383 | cc951668652bacd877c17008b566f232 | 获取与我相关的话题列表,包括赞 和评论 | public ApiPageResultModel GetMyTopicReplyList([FromUri]TopicDetailsModel model)
{
ApiPageResultModel resultModel = new ApiPageResultModel();
try
{
IUserBLL ownerBll = BLLFactory<IUserBLL>.GetBLL("UserBLL");
T_User owner = ownerBll.GetEn... | 0 |
2c37ce008bb0447cb19bd4a4257076eb | 857cfc4edb89bae7e9340e933ecb58d6 | 遍历计算部件材料用量(涉及材料开数和部件总印张) | {
foreach (DataRow dr in this.POList.Rows)
{
if (dr.RowState != DataRowState.Deleted)
{
try
{
if (!string.IsNullOrEmpty(dr["Unit_Per_Plt"].ToString()))
{
... | 0 |
e3c2e813cf0a231866edc266b15e6f19 | 6e5a4618220b797ff80e9fb10fd9d83f | updates values from the gui | namespace atrias namespace controller
void ATCSlipHopping::updateGui() {
controllerState = guiIn.main_controller;
hoppingType = guiIn.hop_type;
stanceControlType = guiIn.stance_controller;
forceControlType = guiIn.force_type;
springType = guiIn.spring_type;
forceThresholdTO = guiIn.force_thresho... | 1 |
627b4af3790fd9ef5ce16f47f03ea7c0 | f4d2082b77e504eac9c2ecb074d47d4f | Get all unpaid invoices. | namespace Timesheets.Domain.Managers.Interfaces
Task<IEnumerable<Invoice>> GetInvoices(); | 0 |
496c1befc63414ab473d5207fdcb106d | f42e5696c801578bc689e90d813dcc56 | Strat aléatoire: On commence avec 1 grille alea et chaque tour on joue un coup random | numero_grille = 0
for grille_initiale in convertir("data_initiale"):
print(numero_grille)
numero_grille += 1
arbre = init_arbre(2, grille_initiale)
partie_terminee = False
while not partie_terminee:
inverser_grille(grille_initiale)
coup = faire_j... | 0 |
19894b52bf79661839a433e9fb1d40f1 | 7075d76dd2938b1d9d848cd11663bd88 | Runs all stress tests. | kill_stress_procs(shells)
for shell in shells:
cmd = "cat /proc/cpuinfo | grep processor | wc -l"
cores = int(shell.run(cmd).output)
shell.spawn("stress --cpu %d" % int(load*cores)) | 1 |
4e871acb888335415460db09549bff34 | 7951a9253447c9aca7119653cccfdca5 | estimate normals using SVD around local neighbourhood of point | class SurfaceNormalLayer(object):
def _compute_normal_eig(self, pts):
cov = self._compute_covariance(pts)
_, v = tf.self_adjoint_eig(cov)
n = v[:, :, :, 0, :]
n = tf.nn.lrn(n, depth_radius=3, bias=1e-4)
return n | 0 |
1dfdb89e4324597bd34e0e8af11529e6 | b1eeb042b4a18201e4779bce9be8ca02 | \brief 设定视频亮度(0~100) | MMP_ERR MMPS_TV_SetBrightLevel(MMP_UBYTE ubLevel)
{
return MMPD_TV_SetBrightLevel(ubLevel);
} | 1 |
178d0b198836b628266308aa4e59d310 | a4323599f53f7f942fb42ca8f80e8bee | MySQL: | def my_insert_sql(db_name, table_name, header):
template = """INSERT INTO `{db}`.`{tab}` ( {cols} ) VALUES ({val});"""
return template.format(
db = db_name,
tab = table_name,
cols = ', '.join( "`{}`".format(c) for c in header ),
val = ', '.join( __placeholder['mysql'] * len(head... | 1 |
05735b8eca308c6f86c36d2b59b90ba6 | a44a981ad67fd0f333d0810faa7f6c74 | metoda resetujaca symulacje | public class VaporPressure extends LabFrame
private void resetSimulation() {
running = false;
for (GraphDataSet set : molaritySet)
set.clearPoints();
for (GraphDataSet set : vaporPressureSet)
set.clearPoints();
vaporPressureTemperature.clearPoints();
time = 0;
vaporPressureTimeTable.setAll(null);
va... | 1 |
6ece066bb7acc9b8124346fc83da5900 | 217a4b9e46577bc043370ce3bfa65ee2 | Returns an array of permissions that are not yet in the
database | {
$permissions = UserPermission::query();
$permissions->whereNotIn('slug',
[
]);
return response()->json($permissions->get());
} | 0 |
0c5aa2eb5ac1b7dc698936615058cd64 | c7f322c12270ae7244f639e32c73a332 | 翻訳結果の英文をクリップボードにコピーする関数 | function copyResult()
{
let dest = document.getElementById( "destination" );
dest.select();
document.execCommand( "copy" );
} | 1 |
52e2338ee4abe7c141d4485256545b7c | 750405afc16c182834645ae0dcf9da78 | convert dec to bin with leading zeros | function dec2bin(dec) {
const raw = (dec >>> 0).toString(2);
const padding = "000000";
const withPadding = padding + raw;
return withPadding.substring(withPadding.length - padding.length);
} | 1 |
35f5142af4e8972b8d59592208111a40 | c08ceac02c30a969bfe2ac4844c4b239 | 创建产品列表的按钮 | Button(root, text='生产者1', width=10, height=1,
command=lambda: shengchan(1)).grid(row=4, column=1)
Button(root, text='生产者2', width=10, height=1,
command=lambda: shengchan(2)).grid(row=4, column=2)
Button(root, text='生产者3', width=10, height=1,
command=lambda: shengchan(3)).gri... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.