query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ba039f9ed4e3a16c22678e94e3daf728 | f47f363205e93436d6b917de86d61ce9 | updates routing table | class LSrouter(Router):
def updateRoutingTable(self):
graph = nx.Graph()
for router in list(self.lsp.keys()):
for link in self.lsp[router].neighbors:
graph.add_weighted_edges_from([(link.e1, link.e2, link.l12)])
for node in graph.nodes():
if node != self.a... | 1 |
c331fd2488523b63244b4aa613433fc3 | 1547f4048b7ee60791f74f9d458adb89 | Cancel the manager override operation. | namespace Holoville.HOTween
public class HOTween : MonoBehaviour
public static void DisableOverwriteManager()
{
if (overwriteManager != null) {
overwriteManager.enabled = false;
}
} | 1 |
07ada3972695f50cd4887424e74328ef | ba1c63b3e11c2fbf3e3a65006d698959 | Seed database with all recipe data from list of urls. | cur = conn.cursor()
cur.execute("""SELECT url from recipe_list where title is null""")
urls = [url[0] for url in cur.fetchall()]
cur.close()
return urls | 0 |
8f2b1636ac421d31d6b2e9c9512fce69 | 0407bb7059952253934dcb3c34aa78dc | Set sourceInvAccount | public class Transaction
public void setSourceAccountId(String sourceAccountId) {
this.sourceAccountId = sourceAccountId;
} | 0 |
f12f1ea5378d88091b03b196e87b8392 | 54eb66459e1e24f2a9c6237d891bd5c9 | Returns the list of reasons for this exception. | Throwable getReason(); | 0 |
f1cff00edcb07a8498874b673d948570 | 2b3da3d4f3d836e832804da4bd2bb2ea | The second derivative of the phi function | class CPotential(galpy.potential.Potential):
def _phi2deriv(self,R,z,phi=0.,t=0.):
coord=R*math.cos(phi), R*math.sin(phi)
force,deriv=self._pot.forceDeriv(coord[0], coord[1], z)
return -(deriv[0]*coord[1]**2 + deriv[1]*coord[0]**2 - 2*deriv[3]*coord[0]*coord[1]
- force[0]*coord[... | 1 |
ee58b5843d8d39e13ee009523f04611e | 8d4807d0a73d86bbc47a7b7a996940d0 | Creates a socket connecting to the given ip adress, performing a DTLS handshake | {
$protocol = (string) ($options['protocol'] ?? (null === $port ? 'unix' : 'tcp'));
$autoClose = (bool) ($options['auto_close'] ?? true);
$allowSelfSigned = (bool) ($options['allow_self_signed'] ?? self::DEFAULT_ALLOW_SELF_SIGNED);
$timeout = (float) ($options['timeout'] ?? self::DEF... | 0 |
6cb30beef2003cb400a7610b6a3ed745 | 98a7eab072c211f48c0ce1033a1e98bc | Deletes all items that have been consumed by the player | namespace Opsive.UltimateCharacterController.Networking.Character
void RemoveAllItems(); | 1 |
c416815a928540f3343dffb274075c31 | ea23340dd5ef4d018e205bb591dee16f | This function simply introduces the labels, it will see how many objects the operator
wants to track, the operator will also get to specify the names of the objects
Returns | class CommandCenter(PyQt4.QtGui.QMainWindow):
def init_labels(self):
LinearLab = PyQt4.QtGui.QLabel('Delta Moves',self)
LinearLab.move(30,220)
LinearLab = PyQt4.QtGui.QLabel(' Linear',self)
LinearLab.move(50,0)
LinearLab.resize(60,20)
JointLab = PyQt4.QtGui.QLabel(' J... | 0 |
9d299c75a874392ec756a819d876138d | 03892ec5237e46e887440b132aa4e7a3 | ボーナスを付与したら、上限数に超えるか | $iUserId = $this->user_id;
$iLotteryId = $this->lottery_id;
$sIssue = $this->issue;
$fPrize = $this->prize;
$fPrizeSum = ProjectPrizeSum::getPrizeSum($iUserId, $iLotteryId, $sIssue);
if ($fPrizeSum === null) {
$aData = [
'lottery_id' => $iLotte... | 1 |
abdb58a0b1138ce56e9b92e2b7c32ae0 | 48c18d79a03c64a170c9cd6d726c9803 | Inicializa las acciones de los botones flotantes | FloatingActionButton fabAccion = (FloatingActionButton) findViewById(R.id.fabAccion);
fabAccion.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
DetalleActivity.start(MainActivity.this);
}
});
} | 1 |
14e6fb9ef04d62f9e8e2729468c7be27 | 7ae5b3f76182dc1b8c92d27e8b664bac | Returns whether nested transactions will be created if
<code>run()</code> is called when a transaction is already active for
the current thread.
By default this property is false.
<p>Note that this method always returns false in the JE product, since
nested transactions are not supported by JE.</p> | public boolean getTransactionPerOperation() throws Exception; | 1 |
f5d0ef95f18f57ad73d8f4faae70a97f | 6161773243c2764c9eaf823c7414bd50 | 设置顶部面板 | {
Panel north = new Panel();
north.ID = "NorthPanel";
north.Height = Unit.Pixel(53);
north.BodyStyle = "padding:0px;";
north.Html = "<div id='northPn'><img src='../data/images/cms_logo.png' style='height:53px' /><span id='loginInfoSp'>用户:" + SysUserAct... | 1 |
5ea274fbc4daa7d2f8fc27bd23c54a0e | 85a0c3513e75773a6018f36bcdba325d | first determine if we should update an existing story
or add a brand-new story by checking the story identifier | class ContentController extends Controller
public function storeStories(Request $request){
Session::put('menu_item_parent', 'editcontent');
Session::put('menu_item_child', '');
Session::put('menu_item_child_child', '');
if($request->input('storyIdx') != null) {
$id = ... | 1 |
335be4fc099e0e4cea3a00741aa054b7 | 441b4c03708addc8ca234c0f8e9ae66c | Проверка получения параметров команды, содержащей
более одной строки. | static void testTooManyArguments(void **state) {
will_return(mock_fgets, "MOVE 2 3 4 5 6\n");
command* com = parseCommand();
assert_null(com);
} | 0 |
3f78893ff1c37467848451788a4e203a | d5a20fa98987225a39baf229985e4a25 | block ui before ajax calls | function showLoading() { Metronic.blockUI({ target: '.page-content', boxed: true }); } | 1 |
f52d3d5613725f3c639db567bd867f69 | 392c056f7d9a3bd2ddeb49cce7592c6d | Convert a string to a where clause hash or raise ValueError. | def fromstr(string, data=None):
return _fromstr(string) | 0 |
53ad64377ad400b79ce7717c0180076d | 452c56539b3f8cead645878949afa79b | Every simulation cycle generate a probability to create a transaction | class UtilityModel:
def simulate_churn(self,event_counts):
u=self.utility_function(event_counts)
churn_prob=1.0-1.0/(1.0+exp(self.kappa*u + self.offset))
return uniform(0, 1) < churn_prob | 0 |
5977406d7c3f8f33407ab57ab01c7513 | b822f49bec92e9a8342dfea27d0a9894 | 强制Seek到播放开始状态,以便重新开始播放 | export default class NativeVideoMedia extends BaseMedia{
_autoSeek(){
if (!this._canSeek()) {
return;
}
if (this._hasAutoSeek) {
this._doPreloadPause();
return;
}
if(this._movieData.start > 0){
this._seek(this._movieData.start);
... | 1 |
d70a37a7592c5d5028255b4dbc15173d | 2b02c70b159d4c292202c7cc0accc943 | Vraca zahtev za trazenje psa. | public class Woman implements IWomen
@Override
public String getRequest() {
return this.request;
} | 0 |
a94adebfd1d457c129b70ee66b71d7d1 | e48114499a0f7c1a23f96f115214f67b | Should return list of directories in current folder. | def dir_current():
return [file_name for file_name in os.listdir(os.getcwd())] | 0 |
041ea28dcfeec4a2656bc86c642aaad9 | 7669bf8526a649112d809fa44434776f | Pulls out the comand line, process name, and process path out of a string, if possible | {
char line[LY_LIM_LINE_FILE];
while(fgets(line, sizeof(line), file))
{
if(!strncmp(LY_XSESSION_NAME, line, (sizeof(LY_XSESSION_NAME) - 1)))
{
*name = strdup(trim(line + (sizeof(LY_XSESSION_NAME) - 1)));
}
else if(!strncmp(LY_XSESSION_EXEC, line,
(sizeof(LY_XSESSION_EXEC) - 1)))
{
*command = strdup... | 0 |
84c268c2a1c367e93547b5b88280bed1 | 1328d52522ea4f545439cc1313e4f4c4 | The prepartitioning representation of a Number Partition Problem solution is
simply a sequence P of values ranging from 0 to (n - 1) where n is the size
of list of numbers ot partition. A random solution can be obtained by generating a
random sequence of n such values. | class NQueensLS(NQueens):
def __init__(self, n):
self.n = n
self.assignment = range(n)
shuffle(self.assignment) | 0 |
a2f9bd3a821204a3d515d672dd83e074 | 14b74b743efff800e96be8ba158b8dec | Изменяет mood у нот с start до end | namespace XP
public partial class Interpreter
public bool command_223()
{
Global.game_screen.start_tone_change((Tone)this.parameters[0], (int)this.parameters[1] * 2);
return true;
} | 0 |
c20fab357c49f1ed7f826dc5a3dbc893 | 7133953ee5d9a3d71050572dfaf2ba23 | Returns the id of the parent page of a page | function getPageParentID() {
global $_zp_current_zenpage_page;
if (is_Pages()) {
return $_zp_current_zenpage_page->getParentid();
}
} | 1 |
e5a00b6edf4318c16838d522d7e05efe | 892cb7a0d05a2b8993f1d13e871d7b84 | Función para el despliegue del cuerpo de la encuesta. | var rotation = 5;
var randomRotate = 0;
var htmlFrame =
'<div style="visibility: hidden ;transform:rotate('+ randomRotate +'deg)" class="row tarjeta" id="tarjeta'+ index +'">' +
'<div class="tContainer'+ index+'">' +
'</div>' +
'<br>'+
'<div class="col... | 1 |
e24b03657fde4bf5dce33f1a651c76f1 | 7757ecd5f90ef26b4079df0e492cc61f | 管理员正常下架广告 | $aids = $_POST['aids'];
if ($aids == "") {
$return['code'] = 0;
$return['msg'] = "参数错误";
echo json_encode($return);
return false;
}
$user = Yii::app()->session['user'];
$arrAid = explode(",", $aids);
$condition = 'id in (';
... | 1 |
0339775de356738b0160ab0b65d14fe7 | 53a4ad3a45cca20b225c255ec3b1edd9 | 如果为新角色解锁,发送系统消息 | if g_i3k_game_context:GetRoleId() == bean.roleID then
g_i3k_ui_mgr:PopupTipMessage(i3k_get_string(661))
else
g_i3k_ui_mgr:PopupTipMessage(i3k_get_string(656, bean.roleName))
end
end | 0 |
94cd51fa586f88bdfec5899803aac827 | 5f9d52292d18426e8ec451aa09dd409b | Unterbindet das Klonen des Objekts (Singleton) | class Connection
private function __clone() {} | 1 |
5e8607c5bb76a9bb444101aa452932f1 | eec707d2b5cb0c533b7c9bfc3a7f3841 | 设置右起倒数第二图片控件是否显示选中效果 | namespace TwinsDay2017_Demo
public partial class MainWindow : Window
private void RightImageSelect_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
RightSelect.IsEnabled = true;
} | 0 |
a91ab48dd2b071be93905cef8bb300af | eb0585001855dc18c756b85fe65b22a3 | sorting the applicants by score using LINQ | {
var Model = db.Applications.Where(x => x.approved == true).OrderByDescending(x => x.rating).ToList();
return View(Model);
} | 1 |
1f53b30bb391db9a5a3368666be65902 | d3c54894cbd69de7237d3e3c5d387fcc | Walk the file tree rooted at `path`. Works like os.walk but returned root value is relative path. | class BaseStorage:
def walk(self, path):
return os.walk(path) | 0 |
f0cf1272d0b628e4a6cb015b1a4298bf | 34472cb1dc148d81c61f9a174200846f | Updates the animation
Returns:
Surface: Returns the image to blit. | if self.isImageUpdate == True:
self.image = pygame.transform.rotozoom(self.originImage, self.angle, self.scale)
self.rect = self.image.get_rect()
self.rect.center = (self.x, self.y)
self.isImageUpdate = False
return (self.image, self.rect) | 1 |
f6c6859b6b0385d895683c16d983e270 | 348d5b0cb40e5c16a9938b7642b5a375 | 获取商品轮播图,pdd.PddGoods.detail.get | @Controller
@RequestMapping("/activity/grab")
public class GrabController
@RequestMapping(value = "/getGoodsUrl/{goodsId}", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
@ResponseBody
public ModelResult getGoodsUrl(@PathVariable Long goodsId) {
return ModelResult.getSuccessRe... | 0 |
5d24c8c9667658e96d6162e8d2057495 | fba930d3e0512def7e0bc1df15acce3e | Clears the div out entirely. | function partialClear() {
$("#questDiv").empty();
$("#answerImg").empty();
$("#buttonDiv").empty();
} | 1 |
dfad1a68abff3616fbbab1d4394e2e4f | 71e7e44260cca4d9627bc5affcef7cfe | ● DungeonRect を作成して追加 | {
PositionComponent newPosition;
newPosition.setComponent(0,x,y,true);
PositionList[0] = newPosition;
dungeonMap.addPresence(0,x,y);
SpriteComponent newSprite;
newSprite.setComponent(0,&globalTextures.charaTextures[0],0,0,0,0);
SpriteList[0] = newSprite;
StatusComponent newStatus;
ne... | 0 |
ba5a3ace6e46799ba3a7a0d6979e99fb | 52826c62cce5dd8dae3ce863959c65c8 | Check if Program/Erase completed. | uint8_t status = flash_readStatusReg(W25N_STAT_REG);
if (status & 0x01) {
return 1;
}
return 0;
} | 1 |
7271b8e081011a0bb2aa22f46b85d7c6 | ec9aca1dc6835bfbf94771610cafe03b | 读取文件中数据内容(查看好友专用) | public class FileActivity extends AppCompatActivity
public String readFile() {
String content = "";
FileInputStream fis = null;
try {
fis = openFileInput("user.txt");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] bytes = new byte[1024];
... | 1 |
10aea9399539e96dad212b3522b4caf7 | b3d3c1620867bd578ef8c726b9b91e26 | Undo/Redo an include | namespace Zero
void ManipulatorTool::SetIncludeMode(IncludeMode::Enum mode)
{
mIncludeMode = mode;
UpdateRectAndBasis();
} | 0 |
35d8f7a86a0fe50590d5d94138c7becc | daa78193cacbadb42a2b90df0910a455 | 清空Quadlist | namespace battle public class HBattleQuadMgr : PureSingleton<HBattleQuadMgr>,HIBattleMgr
public void ClearAttackQuad() {
foreach(GameObject go in attackQuadList) {
go.SetActive(false);
}
attackRangeList.Clear();
} | 1 |
85d3195a7de2ecbcdf49a6f830f63c37 | 19ee691776435a593f4a5379c0ff6541 | Delete OrdersDetails by IdOrder and IdProduct | namespace Webapp.Library.Repository
public class WebappRepository
public void DeleteOrderDetails(int id)
{
var orderDetails = _db.OrderDetails.Find(id);
if (orderDetails == null)
{
throw new ArgumentException("No such OrderDetails ID", nameof(id));
... | 0 |
b356fc4895062488f6c461f4983973f4 | ecc483f151ae67a2ffb52cffbd0710e2 | Implements QAbstractNativeEventFilter interface for processing WM_DEVICECHANGE messages (Windows) | switch(message) {
case WM_NCCREATE:
return TRUE;
case WM_DEVICECHANGE:
return ShinobiOnDeviceChange(wParam, lParam);
default:
return 0;
}
} | 1 |
819c4d881e35339428c6638488a37d8d | 06c3df0ea13a8587763c6621ff31b4fe | Dual quaternion multiplication with self-assignment: dq1 *= dq2
See __mul__ | m1_0, m1_1, m1_2, m1_3, \
m1_4, m1_5, m1_6, m1_7, \
m1_8, m1_9, m1_10, m1_11, \
m1_12, m1_13, m1_14, m1_15 = self.values
m2_0, m2_1, m2_2, m2_3, \
m2_4, m2_5, m2_6, m2_7, \
m2_8, m2_9, m2_10, m2_11, \
m2_12, m2_13, m2_14, m2_15 = other.valu... | 1 |
4b21efdf8887add63d6a6a48af606fc6 | b57d94bbca1f2b3de95bb2d8ce9fe6ee | Sets the maximum number of instances in a leaf. | public class CollisionTreeManager
public void setMaxTrisPerLeaf(int maxTrisPerLeaf) {
this.maxTrisPerLeaf = maxTrisPerLeaf;
} | 0 |
24e78ad46b19e4ac8af9e2839a79762c | 1e28c06048e953bde1c5688175f8b86f | This method is called when {@link PlaybackGlueHost} is started. Subclass may override. | public void onPlaybackStart(); | 1 |
a41ef75dfc15ac21f00182217a87ccc7 | 0e2306e051ef95d9dece342fe54202eb | check that we can provide the positive label and display the proper
statistics | if not self.__class__.label1:
self.testCreateLabels()
action = {'type': 'ActivateLabels'}
filter_statement = {'query': 'WHERE id = \'%s\''
% self.__class__.label1['id']}
self.assert_(isinstance(
self.__class__.service.PerformLabelAction(action, filter_statement),
... | 0 |
b5aa387afafe19519bdea2bddfb42ca3 | fa2384d2894fd2587d30d5d7567cb699 | Subtracts the given floats from the current Vector3 coordinates and set the given vector "result" with this result | {
result.X = left.X - right;
result.Y = left.Y - right;
result.Z = left.Z - right;
} | 1 |
6656e00314844f78082332e74cd0d733 | 928fc05d092b97a816d9eaa23e4dfe73 | Hides gift card textbox on checkmark | namespace Microsoft.Samples.TabletPC.InkAnalysisScannedPaperForm
public partial class MainWindow : Window
private void Unchecked(object sender, RoutedEventArgs e)
{
this.SetCheckboxVisibility(Visibility.Hidden);
} | 0 |
1689b1b6fea0bcda5bfe825e9bb88297 | c38d50018deb386170792d257435f856 | \brief change HW error type to standard error. | {
if ( (errType == USBH_ERROR_SPEED_UNKNOWN) ||
(errType == USBH_UNRECOVERED_ERROR) )
{
USBH_Machine.usr_cb->UnrecoveredError();
USBH_Machine.gState = HOST_ERROR_STATE;
}
else if(errType == USBH_APPLY_DEINIT)
{
USBH_Machine.gState = HOST_ERROR_STATE;
USBH_Machine.usr_cb->Init();... | 0 |
7a1dd0fd2d554b46a07bf0ce3ac0e5c3 | 58a7a8c7ca23730065e0c63783e0baf6 | loop through each item in the checkboxlist, updating in database as necessary | var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
for (var i = 0; i < $scope.dlm.DataList.length; i++) {
updateSelected(action, $scope.dlm.DataList[i].VersionModelId);
}
} | 1 |
970bf51df6b43ef2a3952fe08c21ada3 | f3e5ae5d30ca2149aad0ec6c5d324043 | 通过SysBasicCampus的id删除SysBasicCampus | SysBasicCampus selectSysBasicCampusByObj(SysBasicCampus obj); | 0 |
ff6e5b138464880f10efd123ac27b14d | 5f4f7ba12be381869d5f7a22ffd46181 | Callback to handle the selection of the Design Doc reference mode.
Sets the value of the corresponding item attribute. | String index = getRequestParameterMap().get(ROWID);
Integer record = Integer.valueOf(index).intValue();
List<UITestSupplierHardware> hwReference = new ArrayList<UITestSupplierHardware>(wsrdModelLists.getNewHwRefType());
if(wsrdUtilController.validateEditableRef(hwReference,"wsrdAdmin:adminNewHw... | 1 |
d0443eab8c8d87d3dc69fdc1f482ee34 | f875d9c54b51779907b80c81b6c3f329 | 解析单个小说 | hxs = HtmlXPathSelector(response)
ul = hxs.select('''//ul[@class="page-route"]/li''')
fiction_name = ul[-1].select('''.//text()''').extract_first()
cassificationc = ul[1].select('''.//a/text()''').extract_first()
author = hxs.select('''//p[@class="sup"]/a/text()''').extract_first... | 1 |
3be273c5f93435c5effb50f79ba38e18 | 36b7d781b3fe508bcdaece7b96e2d73d | 尝试将对象转换为Decimal类型数据。转换失败是返回0 | namespace ETS.Util
public class ParseHelper
public static decimal ToDecimal(object o)
{
return ToDecimal(o, 0);
} | 1 |
f7fb64d7db9b96d6ee0ee8504f274b8d | 5a80f7164949712c2a22617657cffbc6 | convert quadratic curve to cubic bezier | let i;
let l;
const q2List = [];
cubicList.forEach(c => {
const list = bezierCubic2Q2(c[0], c[1], c[2], c[3]);
for (i = 0, l = list.length; i < l; i++) {
q2List.push(list[i]);
}
});
let q2;
let prevq2;
for (i = 0, l = q2List.length; i < l; i++) {
... | 0 |
e05016c48a7ae9499f3bc72886e91325 | bb6d2ef06e9dff6aa2b4d97729cdcca0 | Get Number of attacks defended against | long GetNumAttacks()
{
return NumAttacks;
} | 0 |
8e87ec714291b4968c632251cd3a103d | f1913f9a8345f96704d796c6b8178b7a | Randomly sample an architecture from the search spaces.
Returns:
Sampled architecture. | def mutate_arch(parent_arch: Model):
return mutate_model(parent_arch) | 0 |
f1ba7df261c87d97be6b9b37b7608b8d | c39afbb0cb3109f03bc43344f15d36b7 | формат строки параметров: КОД=ЗНАЧЕНИЕ | IniParser::ErrorCode IniParser::splitRawParamLine(const string& paramLine,
ParamContent& paramContent,
string& paramName) const
{
int equalSymbol = paramLine.find("=");
if( equalSymbol == string::npos )
r... | 1 |
bebd2f2f45aa03fa44ea705934bd5c85 | 9e9c99cc2eeefe3c3a9b36a90a05fb55 | 更新发起工作民主评议表所有信息 | UpDateWorkSubmissionAction({ state, commit, rootState }, keys) {
var data = keys.tableData;
return new Promise((resolve, reject) => {
Vue.http.post(MYURL.WorkSubmissionUp, JSON.stringify(data), { withCredentials: true }).then(response => {
if (response.status ... | 1 |
f1d36492defb056c815097b4fedf61d3 | addfcd675cf1da9834ec8b36cd2bbf6b | Devuelve un array de objetos \PcaeApps
asociados al proyecto en curso. | class project
public static function getProjects() {
} | 0 |
6fa0e9e9ec9fa5e24baabdc115d94799 | 754d7d75bdd01f4f04842adbed5ac10e | Run one zone, zone.
If running as singleZone, end of story. If not, schedule the next
zone after this.
Pass in customRunTime (minutes) or use the configured time.
Returns the number of minutes it will run for so it can be
sent as a response message. | def run_simulation(args):
if args.timedep == "constant":
function = lambda t: args.normalization
elif args.timedep == "exp":
function = lambda t: args.normalization * m.exp(-t / args.timescale)
elif args.timedep == "linexp":
function = lambda t: args.normalization * t * m.exp(-t / args.timescale)
else:
rais... | 0 |
32217f36eaa5461adc6db04b597cae9a | ba9b8d76986d113d037beb43eb639a59 | Set the value of Unique ID of the ssh key | class TemplateRequest(object):
def ssh_key_id(self, ssh_key_id):
self._ssh_key_id = ssh_key_id | 1 |
634dc86db11f63e6e4a82df14d294c6d | e6c57c7ca03fdd3e4ff43cb252bb7afc | Instantiate workers | class Worker
protected static function initWorkers()
{
foreach (self::$_workers as $worker) {
$worker->listen();
}
} | 0 |
21aa9c1fca0675212f8028f39a450c98 | f33aa2cb028aa054568fe6ce3283c1b3 | Based on Gael Varoquaux's implementation:
https://gist.github.com/GaelVaroquaux/ead9898bd3c973c40429. | static unsigned string_hash(const char* str)
{
unsigned hash = 0;
assert(str);
while (*str) {
unsigned x;
hash = (hash << 4) + *str;
if ((x = hash & 0xf0000000) != 0)
hash ^= x >> 24;
hash &= ~x;
++str;
}
return hash;
} | 1 |
b035c70b9235469d60834035e2d361ac | 4e14a529549c7458ad5897786f38a282 | these values are temporal -- if we check later, they may have changed
therefore, save a copy of them as part of this object for posterity's sake | {
IGNORE_RETURN(getCategory(true));
IGNORE_RETURN(getDestroyIngredients(true));
IGNORE_RETURN(getItemsPerContainerMin(true));
IGNORE_RETURN(getItemsPerContainerMax(true));
IGNORE_RETURN(getManufactureTimeMin(true));
IGNORE_RETURN(getManufactureTimeMax(true));
IGNORE_RETURN(getPrototypeTimeMin(true));
IGNORE_RET... | 0 |
437d800f940504515bc88549c78938c5 | e298c17dd4daa9fbd545c0d36873f98a | Returns RGBA color | class Color(AmbrosiaObject):
def getRGBA(self):
return [self._red,self._green,self._blue,self._alpha] | 1 |
7219c57165dca390f06d473d1660fdde | 55b94012e660f32d88ee29de64de731c | Get the information if voters are allowed to receive curation rewards. | public class Configuration
public static boolean getPipelineSignalsCurator() {
return pipelineSignalsCurator.getValue();
} | 0 |
d3c60b48f0936635876a78d6aa6aeb26 | 5bb26681b61d95188e3110cf759c5463 | Resume (un-pause) the <code>{@link org.quartz.Job}</code> with the given key. | for (OperableTrigger trigger : getTriggersForJob(jobKey, jedis)) {
resumeTrigger(trigger.getKey(), jedis);
}
} | 0 |
857f384ab6cf8dbc7cf59de9a30c23b2 | 54c58fbdc601436a1546927e2a1f692e | Удаление Серии задач | {
if (projectsListBox.SelectedIndex == -1)
{
MessageBox.Show("Проект не выбран");
return;
}
DeleteEntity(1);
} | 0 |
ccdbce3a0c0796e8fcdd29a856ce05c6 | e2e505fa50bb91635d31c81cd93edc16 | A method to disable the surrender button | @SuppressWarnings("restriction")
public class ButtonPanel
public ButtonPanel setGiveupDisable(boolean disable) {
giveupButton.setDisable(disable);
return this;
} | 1 |
a5de80da07d43c671cb058f96d71acb2 | 99235acc08227c343d258c5a7a85683a | Returns the sequencing center used for this experiment | public class IntensityBelt
public EpiCenter getEpiCenter() {
return epiCenter;
} | 0 |
57a79cd95f7759403601439ec1b7bb8e | 67c7f24845df2440e1adea9ed6504e8f | 解析留言板标签 | abstract class TagBase
public function parse($content,&$view)
{
$this->content = $content;
$this->view = $view;
$this->left = Config::get('view.tag_left');
$this->right = Config::get('view.tag_right');
foreach($this->tags as $tag=>$param)
{
if($param['block'])
{
$this->block($tag,$param);
}
... | 1 |
fd4d07b437e246e31b3a85e0ff409b91 | 96e4e3508d1dbfd530e4f6534efbf2f2 | 补充方法 收欠款补录押金 | namespace CCN.Modules.Auction.DataAccess
public class AuctionDataAccess : DataAccessBase
public int AddDeposit(AuctionDepositModel model)
{
const string sql = @"INSERT INTO `auction_deposit`
(innerid, auctionid, type, payer, mobile, contacts, dpsamount, dpsserialn... | 0 |
4acc4d98e2931d2b1c021ac940742f3c | a2566b5f5f829e5fb388ba829eb7e422 | metodo encargado de buscar en la lista de paquetes a descartar, si el paramtro de entrada existe en la lista o no | Boolean bool = false;
for (String item : freeList) {
if(barcode.equals(item))
bool = true;
}
return bool;
} | 1 |
c70393a84fb1b60867d572dc531b391e | 047c9e5ec5760b795b47ec9fbe827d59 | hàm đếm số lượng số nguyên tố | {
for(int i=1;i<=1000;i++)
{
if(kiemtra(i)==1)
{
printf("%5d",i);
}
}
} | 0 |
45820d2a7bf4f345d39c1edc1d8a6cbb | a9faacdabada635e80ce6188f9a7f727 | valid day range (1-30 for Apr, June, Sept, Nov)(1-28 for Feb - except during leap year 1-29)(1-31 for all other months) | {
bool valid = false;
if (day > 31)
valid;
else if ((month == 4 || month == 6 || month == 9 || month == 11) && day > 30)
valid;
else if (month == 2 && day == 29 && year % 4 == 0 && year % 100 != 0 || month == 2 && day == 29 && year % 400 == 0)
valid = true;
else if (month == 2 && day > 28)
valid... | 1 |
cedaf08f0ebb32a82b2816bad2ae56b8 | 7436e9843fe5ef5341b444126a45ff1a | Completion on an empty name reference in inner class. | String str = "package p;\n" + "public class X {\n" + " void foo(){\n" + " #\n" + " els\n" + " }\n" + "}\n";
String completeBehind = "els";
int cursorLocation = str.lastIndexOf("els") + completeBehind.length() - 1;
String expectedCompletionNodeToString = "<NONE>";
String e... | 0 |
9c25c2ff76d492ccdc6671536c080662 | 63a8818b238ec25675db0280ee9c0b05 | Fonction destructeur de UAudioRecorder | dispose(this.recorder_);
this.recorder_ = null;
this.scope_ = null;
this.element_ = null;
} | 1 |
cae0bbf3d7efa5145114fa86b4395855 | bc86f270b3e4af19c83095d5fd74ff83 | Customer's details with a graph (Chart).
Here we're getting the data of a particular customer and manipulate the Excel file and pass
the income and the expenses to the front end | def customer_detail(request, slug):
customer = get_object_or_404(Customer, slug=slug)
custom_file = customer.file
work_book = openpyxl.load_workbook(custom_file)
sheets = work_book['Sheet1']
row = sheets.max_row
column = sheets.max_column
income = []
expense = []
for i in range(1, ro... | 1 |
ae2516b27548a9c166c1ec5b4baa288d | 6550d6b407d3d46b332f4d37771adb9b | Send 1 bit of data to teh 1-Wire bus | void ow_write_bit(uint8_t v)
{
gpio_set_direction(ds_gpio, GPIO_MODE_OUTPUT);
gpio_set_level(ds_gpio,0);
if (v & 1) {
ets_delay_us(10);
gpio_set_level(ds_gpio,1);
ets_delay_us(55);
} else {
ets_delay_us(65);
gpio_set_level(ds_gpio,1);
ets_delay_us(5);
}
} | 1 |
838d9119363f1cb7ba8afb3d275c00e2 | d5600b420798d4e5b9132a82b7ddf507 | Funcion que devuelve el timestamp a convertir en formato YYYYMMDDHHmmSS | {
string yyyy, MM, dd, hh, mm, ss;
yyyy = DateTime.Today.Year.ToString();
MM = ponerCeros(DateTime.Today.Month.ToString());
dd = ponerCeros(DateTime.Today.Day.ToString());
hh = ponerCeros(DateTime.Now.Hour.ToString());
mm = ponerCeros(DateT... | 1 |
4fbf4bd851ce1473a97abb970b7c49b5 | d492eba2f1f4827b84712f61c202cf07 | Função que gera o nome de um registrador | void reg_name_to_num(string &rs)
{
if (rs == "$0") rs = "00000";
else if (rs == "$at") rs = "00001";
else if (rs == "$v0") rs = "00010";
else if (rs == "$v1") rs = "00011";
else if (rs == "$a0") rs = "00100";
else if (rs == "$a1") rs = "00101";
else if (rs == "$a2") rs = "00110";
else if (rs == "$a3") rs = "0... | 0 |
384846d02dc2ffcfb18cecd4f8caaa09 | 9aaae6a0b4695f2d0b88f78348691aa0 | Method that returns the listener to communicate result in
an asynchronous way. | public final class AsynchronousOperation<T>
public ResultCallback<T> getCallback() {
return new ResultCallback<>(this);
} | 1 |
c9eee8f082f3737c5f108bc471203202 | 075216bc16c24c9c2785466a9ceff9c6 | Figures out correct axis accounting for current rotation
Starts a coroutine that spins the cube 90 degrees around that axis using lerp
r is 0 for left, 1 for up, 2 for right, 3 for down | if (!rotating) {
sE.clip = rotate[Random.Range (0,1)];
sE.Play ();
if (r == 0) {
rot = transform.rotation;
cAxis = Quaternion.Inverse (rot) * Vector3.down;
rTarget = Quaternion.AngleAxis (90, cAxis);
rTarget = rot * rTarget;
rStartTime = Time.time;
StartCoroutine ("lRotate");
} els... | 1 |
cdbb651fff2d2caf56f34e563fd01029 | 72a508a39a15f1aa1186b46871dfc83d | 获取pType背包解锁的格子数量 | public class KnapsackManager : BaseModuleData, IManager, IGlobalEvent
public int GetUnlockGridByPackageType(GameCmd.PACKAGETYPE pType)
{
KnapsackDefine.LocalUnlockInfo info = GetUnlockInfoByPackageType(pType);
return (null != info) ? (int)info.UnlockNum : 0;
} | 1 |
ee0fbc047160c3e5c52c4b2b8948d118 | 38dd5dceaa5cd710e2f6c40b1698d4a4 | This method creates sample virtual dataset with URISpace literal value | public class CategoryVocabulary
public void create(String vocabularyUri) {
try {
_vocabularyUri = vocabularyUri;
_skosDataset = _skosManager.createSKOSDataset(java.net.URI.create(vocabularyUri));
OWLImportsDeclaration importDeclaration = _skosManager.getOWLManger().getOWLDataFactory()
.getOWLImportsDecl... | 0 |
3a9ca042ef583b8ff9928c0099496bbb | b7e0d6a9881221ee7c9130e1b15d9f83 | 获取顾客360对象 | public class classFactory
public static com.szty.aihao.core.aihao39_1_core getaihao39_1(){
Object objType = CreateObject("com.szty.aihao.impl.aihao39_1_impl",
"AIHAO39_1");
return (com.szty.aihao.impl.aihao39_1_impl) objType;
} | 0 |
cfa846ddfa4a7fe3d5371f99e3d02731 | b70cbae30b003114b649050066eea0fa | returns the value in the map if it exists, otherise 'elze' value is returned | public class LambdaAndCollectionsDemo
public void testMapGetOrDefault() throws Exception {
HashMap<Integer, String> map = new HashMap<>();
map.put(1, "one");
map.put(2, "two");
map.put(3, "three");
if (map.containsKey(4)) {
System.out.println(map.get(4));
} e... | 1 |
991cda093a311ddf70b37544a1424294 | 4782ca7c48251c551de7b799b88caef2 | проверка появления гласной | void zad_2() {
int ascii[6] = {97, 101, 105, 111, 117, 121};
int step = 32;
string str;
cout << "vvedine stroky: " << endl;
cin >> str;
bool glasnoe;
for (int i = 0; i < str.size(); i++) {
glasnoe = false;
for (int j = 0; j < 6; j++) {
if (int(str[i]) == ascii[j]... | 1 |
873853f00452ad9f4a6d09bd3721246b | e4b2810a4d6dffe0e9b14f75700e70d5 | example 3 - ITERATIVE | function findFactorialIterative(number) {
let answer = 1;
while (number >= 1) {
answer = answer * number;
number--;
}
console.log('iterative');
return answer;
} | 1 |
d8b231b8baae698ab5794cf60085aa84 | 5ddadada643fac316d09f7dc709b1fa8 | Method to get the partition key name | public String getPartitionKey() {
return learningWithMyKidsDynamoDBId != null ? learningWithMyKidsDynamoDBId.getPartitionKey() : null;
} | 0 |
4ffb5c85ecd6b5aa118211f84e3e9d95 | 9e17ee414ae88f702d46b9c4a18c0bef | Retrieve gyms around a given lat, lng within the given dist | public JSONArray getSupermarketNearBy(double lat, double lng, double rad); | 0 |
c74951d64a6aba6765438799a1b139ee | fda323381b9691b31b8a49edf107a1d7 | 에러정보 파일 출력 함수 | void err_print(int errno)
{
char *errstr[10] = {
"",
"서버를 생성하는 도중 문제가 발생했습니다.",
"클라이언트의 요청을 받는 도중 문제가 생겼습니다.",
"올바르지 않은 헤더를 읽어왔습니다.",
"서버에 접속하는데 실패했습니다. 서버가 접속 가능한지 확인해주세요.",
"파일을 전송하는 중 오류가 발생핬습니다.",
"문자열을 전송하는 중 오류가 발생핬습니다.",
"파일을 수신하는 중 오류가 발생했습니다."... | 0 |
26651c07c40fd97d2fa0d888a7eb51ea | 749112c51dc3e48f35abfcd263bb7496 | trouve le processus et la fonction d'un GO term | {
printf("Looking for foo's addr\n");
FILE* nm = popen("nm tracee", "r");
int addr;
int addr_foo = 0;
int addr_goo = 0;
char type;
char name[1000];
while(1)
{
while(fgetc(nm) != '0') ;
fscanf(nm,"%x %c %s",&addr,&type ,name);
if(!strcmp(name, "foo"))
addr_f... | 0 |
0c68c907aa46b978a53ca6589b14cc69 | 4bf044ffad1834c0ba67299e937052a2 | Método que consulta todos los pagos hechos por una compañia | namespace DatosTangerine.InterfazDAO.M8
List<Entidad> ContactFacturasPagadasCompania(Entidad parametro); | 1 |
3a0aba952dd11bf206f9351f00036272 | 3fdc017f019d5a63bf00eb36bc46d80e | Accepts an ADC sample rate and converts that rate into the number of ADC
samples that must be skipped in able to achieve that sample rate. | {
long samples = dmaBytes / 4;
return samples * (cpu.one_second / rate);
} | 0 |
956b5b8ffa5bac142b4a8f92b71a6cef | 934c52e91e229257b752663e4754974e | Draws the grenade particles based upon the current nade type | this._determineCurrentPosition();
if (!this.packetCount) {
this.packetCount = this.props.packetCount;
return false;
}
else if (this.props.packetCount > this.packetCount) {
this._processNewPackets(this.props.packetCount - this.packetCount);
}
... | 0 |
42096f6cb2e62f2e06226f16dac91b54 | 70a306ce6ba66bc93796c6e8959ec2f7 | Returns a FieldSet with which to create the CMS editing form. | $uploadField = UploadField::create('Image1', 'Image 1');
$uploadField->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
$uploadField->setFolderName('moneyweek');
$uploadField2 = UploadField::create('Image2', 'Image 2');
$uploadField2->getValidator()->setAllowedExtensions(arr... | 1 |
fd9014156fcff05c5fd8f10452ae1359 | efd9924028896d25bd72cbee8b7537c9 | 设置IMCFLogger 日志头前缀 | func init() {
log.SetPrefix("TRACE: ")
log.SetFlags(log.Ldate | log.Lmicroseconds | log.Lshortfile)
} | 0 |
b50c29255fa5419ee7f3300efaa51525 | 1d0a26fa5abfd8d827a4d956c9df9825 | False Positives | def false_positives():
pass | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.