query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7b5b6e3fff275cd3aa8b285d3f46640b | 1203c2cd5fd69d3a320531207c39d108 | crunch_feed() will generate an rss feed for the site. | entries = list(entries)
if len(entries) == 0:
return None
updated = entries[0]['created']
with contextlib.closing(stringio.StringIO()) as out:
builder = utils.XMLBuilder(out)
build_feed(
builder,
web.config.app.site_name,
updated,
w... | 1 |
cd5b730c76801b02f09ade37edb7f4ff | 0177082572854f7d3b001135e7ef2b82 | 将新建的社团内容存到本地 | {
try
{
siteContent.CommitteeBirthdays = Local_SiteContent.CommitteeBirthdays;
siteContent.CommitteeCare = Local_SiteContent.CommitteeCare;
siteContent.CommitteeCarpentry = Local_SiteContent.CommitteeCarpentry;
siteContent.C... | 0 |
852be2e15f8b4548a67da3a648aa74ad | 843f4a36ab910ee852bf69eaf340a2d1 | 同步下载(使用了文件锁) | func downloadFile(fullFi *app.FileVO) {
addDownloadingFile(fullFi.Id, false)
increaseActiveDownload(1)
defer increaseActiveDownload(-1)
defer addDownloadingFile(fullFi.Id, true)
common.Try(func() {
logger.Debug("sync file from other storage server, current download jobs:", increaseActiveDownload(0))
dirty := 0... | 0 |
a54bdd6732251d7469b348ba3ac7380c | fd73e369f445f3d0ccad26d52107df4c | Returns a Number or null. | class MarcCslVariables extends MarcGrok implements JsonSerializable
public function getNumber(): string {
return "";
} | 0 |
04ea3d83e6418fdc809004e9caa94abb | 93cac6951bbe680fb49deea8617d407e | 将图片地址转换为与.net上传控件兼容的格式 | {
if (string.IsNullOrEmpty(imgUrl)) return string.Empty;
string[] arr = imgUrl.Split(new[] { @"\", @"/" }, StringSplitOptions.RemoveEmptyEntries);
int len = arr.Length;
string fn = arr[len - 1];
arr[len - 1] = string.Format("T_W{0}H{1}_{2}", width, hei... | 1 |
43b5c141524fad633e040ba0a9149341 | 54c25f74f3b140bc3e8b17e9e128bd08 | Returns the contents of the clusters file
Returns | cluster_fname = ('./results/%s_results/%s/clusters_go/clusters_go_clean'
'_%s.txt' % (data_type, objective_function, run_num))
cluster_dct = file_operations.get_cluster_dictionary(cluster_fname)
return cluster_dct | 1 |
fbe9118f9d90a168abd77c3a8267d1bc | 6582d8c989c9fdc1f156f744f75a8856 | Converts byte to decimal representation | x = 0
count = 7
for i in byte:
x += int(i)*(2**count)
count -= 1
return x | 1 |
1dd1ab8986f698a729bf3e480a3465da | be15e84e5337edd975f035fcbee11177 | 检测用户是否收藏过当前资源 | @RestController
@RequestMapping("/r")
public class ResourceController
@RequestMapping(path = "/{folder}/{id}", method = RequestMethod.POST)
public Result<ResourceVO> collectByFavorite(@PathVariable("folder") Long folder, @PathVariable("id") Long id,
@SessionAttribute(... | 0 |
a7d191ed263035722392e7762809be43 | c1a3812faf2482cb127f15b82d43000a | Возвращает объект с конфигурацией модуля магазин | class Store
public final static function getConfiguration()
{
return self::$configuration;
} | 1 |
43c43bc666b206c561dfb63c55fb1961 | 40a183b420bc7fe403f9149daaacc4fd | Проверяет в базе корректность таблиц моделей объекта (все модули) | namespace DataBaseIO
public partial class frmMain : Form
private void CheckTablesDB(ref bool ready)
{
string tabName = "";
string tabKey = "";
bool flgContinue = true;
mdlData.glConn.Open();
while (flgContinue & ready)
{
... | 1 |
72758f7d53744c8f87d8942795118f43 | d02ba4654e909590b920036c27040dc2 | generate a network graph representing the connections between the features | def create_network_graph(net):
graph = nx.DiGraph()
places = list(net.places)
transitions = list(net.transitions)
nodes=set(places) | set(transitions)
bookkeeping={}
for index,el in enumerate(nodes):
bookkeeping[el]=index*2
for node in nodes:
graph.add_node(bookkeeping[node])... | 1 |
292feab2d427d7fb0b7990572675546b | f30c20de4b86788b4bb0155abd91b00a | Function copies the input list into a new list that has the order reversed. | def reverseList(originalList):
newList = []
for member in range(len(originalList)-1, -1, -1):
newList.append(originalList[member])
return newList | 1 |
29badde179d30f7409dfa467f5ce2789 | 5694821ad69e9900fbf7f5b719f97d70 | Currently configured notebook server ContentsManager. | class UpdateBookmarksHandler(APIHandler):
def contents_manager(self):
return self.settings['contents_manager'] | 1 |
93026372ac4f520f3ca01e7866c204dd | 71600fc7c7b0a7fd58d81edebb9145ab | Set a list of fields that will be included during object serialization. | abstract class Result
public function setSerializedFields(array $serializedFields)
{
$this->serializedFields = $serializedFields;
} | 1 |
1a9f1731df574e0089b449b9914892a1 | 0de87bc7f216c8785a0c081992fbd91b | Metode for å sende en pakke med UDP socket | DatagramPacket DpSend =
new DatagramPacket(a, a.length, ip, serverPort);
ds.send(DpSend);
} | 1 |
7b574c8dba1b04d1fc7f4c6f049b0f63 | 5176b3eb52df852ae5550c521c279471 | splitting up the url to get data that was sent from parkingInfo | Bundle bundle = this.getIntent().getExtras();
parkingLotUid = bundle.getString("parkingLotUid");
parkingLotName = bundle.getString("parkingLotName");
parkingLotAddress = bundle.getString("parkingLotAddress");
totalSpaces = bundle.getString("totalSpaces");
totalAvailable =... | 0 |
edce76db977b955b3946b0672da24233 | c2a84981944cf3cb0dfba88e8ba04b51 | Checks if element is select and is select multiple | namespace FluentAutomation.API.Interfaces
bool IsSelect(); | 0 |
6824c863e97551c3473edf3ed2f8b92b | a918f6a401e78d814c87e1bc0976a573 | Start the data analysis tasks for all the players. | public class Analysis : MonoBehaviour
void Awake () {
UserAnalysis();
GoodsAnalysis();
EquipAnalysis();
CompoundAnalysis();
TaskAnalysis();
CurrentTaskAnalysis();
} | 1 |
35c6f6bba8edb5c7e0e820f9b64c143c | e8e8a73113a5fc308535bb9538c572ab | Enter a parse tree produced by the {@code Ternery}
labeled alternative in {@link poeticaParser#expr}. | public class MiniJavaBaseListener implements MiniJavaListener
@Override public void enterExpressionTernary(@NotNull MiniJavaParser.ExpressionTernaryContext ctx) { } | 1 |
8590843b5c9439a144360442f4ddc83c | 82b82d63f0d4f9fb87077dcc16e01d52 | ویرایش بیوگرافی فروشنده | @Path("/sup")
@RestController
public class SupplierApi
@PUT
@Path("/{idsp}")
@Produces("application/json;charset=UTF-8")
public boolean editSup(@PathParam("idsp") String idsp,
@FormParam("publisher") String publisher,
@FormParam("supplier") String suppli... | 0 |
b39c6d5ed5d6c20f3f1cb179421a934d | c4c3a0542275ca528a1eb7be128a7a28 | this method is responsible for calculating the current investment value on a given evaluation date by specifying the
investment date and invested amount.
If he sells it on an evaluation date. (Consider closing prices of stocks and assume investor can buy fractional number of stocks also) | {
TimeSpan totalCustodyTime = this.DueDate.Subtract(this.PurchaseDate);
TimeSpan currentCustoryTime = DateTime.Now.Date.Subtract(this.PurchaseDate);
double monthsToExpire = this.DueDate.Subtract(DateTime.Now.Date).Days / (365.25 / 12);
double totalMont... | 0 |
47135f37bb65e6c6195588d189fdddb6 | 562ad803702dfda9d4f52f9ca1305ea1 | Checks to see if this is pointing to an array or contains a schema | function isSchema(obj){
return !!( obj && obj.isSchema );
} | 0 |
8ed2027ece50afb51ea0c9403c8b92bb | 346010ff172284d6d3324a39cf0a17f8 | Tell us uplink audio signal is being sent. | class NUMonitoringPort(NURESTObject):
def uplink(self):
return self._uplink | 0 |
4674bb06a9be59d92fd1095e48b2882b | dd884ec3841ab1aeaa037b0ccc7d473e | Modify a department of an enterprise.
The response is either a SuccessResponse or an ErrorResponse. | namespace EdFi.Roster.Sdk.Api.Resources
System.Threading.Tasks.Task<ApiResponse<Object>> PutOrganizationDepartmentWithHttpInfoAsync(string id, EdFiOrganizationDepartment organizationDepartment, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.Cancellation... | 1 |
dc2bef9e22c3da2d512cd0707fc83103 | e65958b60313cab044a995995f74b15f | Given an application file, returns the absolute path. | class Application(object):
def get_application_dir(self):
return os.path.dirname(self._file_path) | 0 |
73f94ed95c31170295f37b3c89fe4e08 | 5b4da8a34a5172dc81b9d7926776644d | update task indices based on task position dragged by user | function moveTask(index, newIndex) {
return {
type: MOVE_TASK,
index,
newIndex,
};
} | 1 |
6f5470aced8904ca1a683aff7fdbc52a | a816e11b807c7ebdc7dc5391e0d37aaa | Coroutine to control crystalise duration | int i= 0;
boolean goOn = false;
do {
goOn = crystallizeOneIon();
i++;
} while (i < steps && goOn);
return goOn;
} | 0 |
7a3edebca404777efb4b0943c7f47b89 | d2cd32f258229254c93576798cdcb8d2 | Get factions
Get a list of factions --- Alternate route: `/v1/universe/factions/` Alternate route: `/legacy/universe/factions/` Alternate route: `/latest/universe/factions/` --- This route is cached for up to 3600 seconds | {
var url = new ApiRequestUrl(Constants.MapFactionWarSystems);
return HandleRequest(url, new MapFacWarSystemsParser(), ignoreCacheUntil);
} | 0 |
b998bb6c556ba3553524624872366df1 | 42ca9efda720fae38234df05f652d9ea | Switch the type to letter | function switchLetter (word) {
var letter;
switch (word) {
case 'ownertable_TimeDay':
letter = 'D';
break ;
case 'ownertable_TimeWeekly':
letter = 'W';
break ;
case 'ow... | 1 |
80349d01a21aedf299fb0117cdace196 | efa0a05f1af96fe5359ee8a9bb76ce44 | Execute a ADO.NET operation on a command object using a delegate callback. | {
return SetCommand<T, object>(self, ref command, execute, canExecute, null);
} | 0 |
a1ff08fbcc9c3e7c7948ef7fb27de4ce | 1224ca1052b17a12b78e7f2c73bbcc5f | https://developer.zendesk.com/api-reference/ticketing/dynamic_content_item_variants#create-many-variants | {
if (identifier == null)
{
throw new ArgumentNullException(nameof(identifier));
}
if (contentItemVariant == null)
{
throw new ArgumentNullException(nameof(contentItemVariant));
}
var contentItemV... | 0 |
8dd504a23b6a2d0dac390063cb56c962 | 509d96c840fb1bf77d34539159470c21 | 重启回调 | void GameScene2_1::restartCallback(Ref * pSender) {
unschedule(schedule_selector(GameScene2_1::update));
this->getEventDispatcher()->removeAllEventListeners();
Director::getInstance()->replaceScene(GameScene2_1::createScene());
} | 1 |
b942fac0dac2e7a445ba772119bd6aa0 | e661dd9b7a0ea735304bda869b6694d9 | 判断子串是否是回文 | int n = s.size();
for (int i = 0; 2 * (i + 1) <= n; i++) {
if (s[i] != s[n - i - 1]) {
return false;
}
}
return true;
} | 0 |
80c7c45627f8b3127b59b47a2360f69d | a449f62c482c0da9d2661a725f131b73 | Generates random messages for log entries | namespace LogViewExample
public partial class MainWindow
private LogEntry GetRandomEntry()
{
if (_random.Next(1, 10) > 1)
{
return new LogEntry()
{
Index = _index++,
DateTime = DateTime.Now,
M... | 1 |
21e794c1dfef0b6128154001ed3a54fa | 9858fa4d08e75f73a4310b508918cffe | Returns the tag values that are assigned to a behavior graph. | {
JsonResponseModel<GetTagValuesResponse> rsp = null;
try
{
var strResp = await this.InternalRequest(req, "GetTagValues");
rsp = JsonConvert.DeserializeObject<JsonResponseModel<GetTagValuesResponse>>(strResp);
}
c... | 1 |
8d5110ae9307768a3b99e953b318bf68 | 69f4106129949939ccbea7b6e02a2d86 | This function sets two callback functions.
One for creating a channel and
the other for destroying a channel | void touch_setcallbacks(void (*press)(unsigned int), void (*release)(unsigned int)) {
press_cb = press;
release_cb = release;
} | 0 |
199da70eaedff4d4b0cff2d7e42eb0ed | f0d3a59ff1a1022c55db6d93d5e69f48 | Remove an iSCSI target and logical unit. | cmd = "iscsiadm -m node -T %s --portal %s:3260 --logout" % (target_iqn, target_ip)
cmdOut = run_ssh_cmd(Host_info[0], Host_info[1], Host_info[2], cmd)
cmd = "iscsiadm -m node -T %s --portal %s:3260 --login" % (target_iqn, target_ip)
cmdOut = run_ssh_cmd(Host_info[0], Host_info[1], Host_info[2], cmd)
... | 0 |
c3908f326f6f78030a0fef5b924a119d | 2f29735f10951a4050dfad44789e3aa1 | Lista os posts mais lidos | {
$title = 'Listagem de Posts';
$posts = Post::orderBy('id', 'desc')->paginate($this->totalPage);
return view('painel.posts.index', compact('title', 'posts'));
} | 0 |
d36b25b96ce90e3f15c2504ac26050bc | f8d56e8b1ba9e5dbdd1686421c872128 | Use custom projection matrix to align portal camera's near clip plane with the surface of the portal
See http://www.terathon.com/code/oblique.html
See www.terathon.com/lengyel/Lengyel-Oblique.pdf | public static class CameraExtension
private static Matrix4x4 CalculateObliqueMatrix(Camera camera, Camera.StereoscopicEye eye, Transform clipPlaneTransform) {
Matrix4x4 baseViewMatrix = camera.GetStereoViewMatrix(eye);
Matrix4x4 baseProjMatrix = camera.GetStereoProjectionMatrix(eye);
Vector3 cli... | 1 |
715826daa1cdd290c23332f7062bc5b5 | 8c4c70827df0f92c9d7e2369d9854391 | Override this method to handle a N-GET-RQ message. | public abstract class ServerHandler implements HttpHandler{
protected void onGet(HttpExchange ex) throws Exception
{
} | 1 |
9d0c166601dd09ada7fc5f39014c8951 | 726e8e68544bf1da3c085d2f6d5cd05a | xref-ci report mode:
add links to external url (github) or to web address of current installation of xref,
whichever is configured | if self.mode == 'pytest':
return 'pytest ' + self.node
elif self.mode == 'native':
ALLOW_MODNAME_CMDLINE = False
if ALLOW_MODNAME_CMDLINE:
in_path = static.is_modname_importable(self.modname)
if in_path:
return 'pyth... | 0 |
1fbed46cd3d1dfbbc48e6d19b97411dc | 7973e4deccdbd3ca5946c5a778b5aee2 | Use this check to determine whether BLE is supported on the device. Then you can selectively disable BLE-related features. | public class MainActivity extends Activity
private void checkBle()
{
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
finish();
}
final BluetoothManager bluetoothManager =
(BluetoothManager) ge... | 1 |
f12db70339712182db7c6f7667dfae84 | 23133d7066e5046cd8f793c83fdc5ca9 | NewFault returns a new Fault error | func New(text string) Error {
return Error(text)
} | 0 |
61081ff8e4047b9e5937cdea2cd0841b | e0cf1736477832de5d6aff254720b80d | Упаковка файла в архив нужного формата. | is_dir($path) OR File::mkdir($path);
if ($this->check()) {
if ($this->extractTo($path, $entries)) {
return TRUE;
}
}
$this->error(t('Вы загружаете архив неверного формата!'));
return FALSE;
} | 0 |
199f5d8ed6994b0df9ad18b4db7ab772 | 7f61448ad6da3ef0f9cb03f40c5be655 | 4. CHIA | cases like (1) | 0 |
fcc1c05e2e22ec4f223fde1bf4074bf6 | b3d0c99af60b103bae7dda5adc765328 | Get the public key with the specified name. | class PrivateKeys:
def get_key(self, key_name: str) -> Union[None, PrivateKey]:
return (
self.session.query(PrivateKey).filter(PrivateKey.name == key_name).first()
) | 0 |
df3ad5893b039a8f4ba23b8ae610f327 | 3f812129a4eb0bb622de9407132b087f | User similarity | int var=0;
int count=0;
auto m=users[i].movies.begin();
auto n=users[j].movies.begin();
while(m!=users[i].movies.end() && n!=users[j].movies.end()){
if(m->first == n->first){
var += (m->second - n->second)*(m->second - n->second);
count+=1;
m++;n++;
}
else if(m->first > n->first){
n++;
}
else... | 1 |
551a358e63fdf975eb9f0466a284b4a0 | a5851ad16fce975bd92e5cfa4ff35be4 | This function gets a user's profile. If it's a public profile
then it's visible or it must be user's own profile if it's private. | class UserModel
public static function getPublicProfileOfUser($user_id)
{
$database = DatabaseFactory::getFactory()->getConnection();
$sql = "SELECT user_id, user_name, user_email, user_active, user_sentence ,user_has_avatar, user_deleted, first_name, last_name
FROM users WHERE user_... | 0 |
af5c85a8c9e0eb2837710e39ad993461 | ba23274812d7577c0304c2ede7e1f5dd | Get list formatter for admin. | class FormAdmin extends AbstractAdmin
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('title')
->add('results', 'string', ['label' => 'form.admin.form.list.results', 'template' => 'EndroidFormBundle:Admin:results.html.twig'])
;
... | 1 |
ed5afd3a281723422837bccd8932a3ee | 398facc2f68698c9d1c83d2ab7e3fedd | Fetches a list of all ipams for a tenant | {
$listUrl = $this->getEndpointsByServiceType("identity") . "/tenants";
$requestData = array("uri" => $listUrl, "method" => "GET");
$response = $this->send($requestData);
return $response;
} | 0 |
1df9ec9325c3039305ff70b85f57a68f | efdf04713577f38aa70eedde89afbaf8 | Gets the value of the uuid property.
{@link String } | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-04-18T09:43:56.622Z")
public class System
@ApiModelProperty(value = "The uuid of this system.")
public String getUuid() {
return uuid;
} | 1 |
84a295982d0fa8a4ff5d00526d91b693 | 63d2955abe5b54ed9741964a6a30a4ca | Rename commercial plan | {
if(FAILED(this->RemoveCommercial(pCommercial->guid, pLog)))
{
return E_FAIL;
}
if(FAILED(this->_AddCommercial(pCommercial, pLog)))
{
return E_FAIL;
}
return S_OK;
} | 0 |
19a908e6087e69bff79969035da2f01a | 5bed33b813300f28035d79988da82a78 | Returns true iff YEAR corresponds to a leap year in the Gregorian calendar. | func isGregorianLeap(year int32) bool {
return (year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0))
} | 1 |
417d42fca2041f0ccdf8b049c1a4992c | 6b8e8271212b35e11e8f76c473c5a52e | AudioNameスクリプトを作成します | public class NameScript : MonoBehaviour
void Start () {
} | 0 |
6fe7b0f66e8de2ae779bfc045812791a | 90f80792ba9fb00ac73d47ebe53a312e | Sets the slack channel. | public class ChannelNotification
public void setSlackIdTable(MemberSlackIdTable stable){
this.stable = stable;
} | 0 |
e8a1839c0beb282d15c9e8013a3717fb | 93a929680fe987f3484ce4490d1af5f8 | 涉密人员统计 | namespace ERCHTMS.Web.Areas.PersonManage.Controllers
public class PersonController : MvcControllerBase
[HttpGet]
[HandlerAuthorize(PermissionMode.Ignore)]
public ActionResult Stat()
{
return View();
} | 0 |
0c244016b51e9c3138b78630088d8cbc | ca1e8b0f036730a535ee6f6736d3fa30 | Deletes outputs of the experiment run that we don't want to save with the artifacts. | class TestHarness:
def _cleanup(self):
output = glob.glob('statepoint.*.h5')
output += ['tallies.out', 'results_test.dat', 'summary.h5']
output += glob.glob('volume_*.h5')
for f in output:
if os.path.exists(f):
os.remove(f) | 1 |
0603f9e3006c3f2a65e202103f533da9 | 89a6e16183deb2ee62059401b5d6c413 | Raises the poll failed event. | namespace Guflow.Worker
public class ActivityHost : IDisposable, IHost, IHostedActivities
public void OnPollingError(HandleError handleError)
{
Ensure.NotNull(handleError, "handleError");
_pollingErrorHandler = ErrorHandler.Default(handleError).WithFallback(_genericErrorHandler);
... | 0 |
17ca1b60e99082d63f04af8b7c1cf2ef | e95808334dc166e9c195031ec9d60c31 | Applies hierarchical clustering based on the given dissimilarity function and distance cutoff. | def hclust(D, ctype, K=None):
D = +D
if (D.shape[0] != D.shape[1]):
raise ValueError('Hclust expects a square distance matrix.')
N = D.shape[0]
for i in range(N):
D[i,i] = numpy.inf
I = [[i] for i in range(N)]
if K is None:
K = 0
else:
lab = numpy.zeros((N,1)... | 1 |
0b4b28865599cc4d219fa73abd28cda3 | abe78e2b7cb82fa1dc4965c1fa80e95b | Visibility of the scalar bar. | class ScalarBar:
def VisibilityOn(self):
if not self.is_shown:
self.scalar_bar.VisibilityOn()
self.scalar_bar.Modified()
self.is_shown = True | 1 |
445998f3fc7f9e35884ada6c8e408636 | 2412208c09f0fc8fa08c01b8abb09926 | Returns the global max file upload size, which is dynamically derived from the Rice parameter service.
This technically breaks the implicit contract in ControllerConfig that the config is frozen after startup. | public class BootConfig
public static long getMaxUploadFileSize() {
return maxUploadFileSize;
} | 0 |
3386d7001ddc967897f0356e7b106453 | 37fc149d973b31bfef626be6920cbe65 | Obtiene los goles del equipo visitante | class Partido:
def get_goles_locales(self):
return self.golesLocales | 0 |
de107f68c455d09a81f224f4aada54c9 | 00cc0c6e928aa6569ff8dd2fe6b58122 | token失效返回登录页面 | function logoutToLogin(message) {
store.dispatch('user/resetToken')
errorMessage(message)
const { $router, $route } = app
if (hasDevelopment) {
$router.push(`/login?redirect=${$route.fullPath}`)
} else {
global.location = logoutApi
}
} | 1 |
f2f4ec86bdffc2129638e0fd3f80ca57 | 9afc2a53ebd81084c1fc9608b0592439 | Add the two ideals. | class PrimeIdeal(IntegerPowerable):
def __mul__(self, other):
return self.as_submodule() * other | 0 |
b812e1f7aa84c2701ebd6434712df944 | f5f04c6c89b9e6eabd24f500927cf6d0 | takes as arguments the char array to put the line in, the max length of the line, and the socket to get characters from | int get_line(int sock, char *buf, int size)
{
int i = 0;
char c = '\0';
int n;
while ((i < size - 1) && (c != '\n'))
{
n = recv(sock, &c, 1, 0);
if (n > 0)
{
if (c == '\r')
{
n = recv(sock, &c, 1, MSG_PEEK);
if ((n > 0) && (c == '\n'))
recv(sock, &c, 1, 0);
else
c = '\n';
}
... | 1 |
b4840332ccec0761bb6e58982b78ea0f | d0e43ca2d10c78e65bb3b1c08b6d6714 | Will allocate destinations based on person type | {
if( !m_pTransiting )
m_pTransiting = new ConstantDistribution( 10 );
if( !m_pTransferring )
m_pTransferring = new ConstantDistribution( 20 );
if( !m_pTransferDest )
m_pTransferDest = new FlightTypeDistribution;
} | 0 |
dc0d2133e218c2200f075597583f2e17 | 44352e48774e06e3e4f3b975c79ab694 | Provides writing apartments to file | class CSVFormat
def write(apartments)
CSV.open(@path, 'w') do |f|
apartments.each { |apartment| apartment.description.to_a.each { |element| f << element } }
end
end | 1 |
ca5006144a84edfe31dc35007d102746 | ffec091f4735539a9bd19de15ac51e08 | Returns the stress-strain matrix for plate bending. | def bar(E, A, L, phi):
c = cos(phi)
s = sin(phi)
k0 = np.array([[c ** 2, c * s], [c * s, s ** 2]])
k1 = np.hstack([k0, -k0])
K = E * A / L * np.vstack([k1, -k1])
S = E / L * np.array([[-c, -s, c, s]])
return K, S | 0 |
369f08a097d13b5a8398820ae6d759c3 | a54d0cc875a9a8095a505bb7a795ef48 | 默认通过所有授权 | class AuthConfig
static getAuthorizer(): Authorizer {
return { authorize: p => p };
} | 1 |
8e8ae15b819e61f16baee1cbbc061325 | e6d6f1ebb5e6562f63ee3e9479329c50 | Selects the current watermark value
Only items greater than or equal to this value will be requested from the event feed | void setLowWaterMark(long lowWaterMark) throws StorageRpcException; | 0 |
67309c4c719e599272cc85d8b2612c09 | 3db34f2d68c9621815b40c2f230c0e8e | 更新社会属性 | namespace Com.Game.Module.Role
public class RoleMode : BaseMode<RoleMode>
public void UpdateAttr()
{
DataUpdate (UPDATE_ROLE_ATTR);
} | 0 |
b6a6785408bec88709f1ac0ba882af22 | 35866b2abe7becf30ef643bc04b40c17 | returns true if this pixel is active | public boolean isTurnedOn(int x, int y) {
if (rasterMemory[y][x])
return true;
return false;
} | 1 |
a354b0c44817bf71e343224ff82d9ae4 | d3be2ee37a4c3a75d1e27efbb70712e7 | Find Floor below player | void checkFloor(UINT8 newPlayerX, UINT8 newPlayerY){
UINT16 indexTLx, indexTLy, tileIndexTL;
indexTLx = (newPlayerX - 8 + bkg_position_offset)/ 8;
indexTLy = (newPlayerY - 16)/ 8;
tileIndexTL = Background1Width * indexTLy + indexTLx;
if (Background1[tileIndexTL] == floorTile[0]){
onFloor = 1... | 1 |
8d0252051aa69f80527ed46a1a4af039 | dab2bbb5d9505c3396df5aacda90b975 | Groupのオブジェクトの入った配列をGroupのスコアが高い順に並べる。 | zipped = (0..@scores.length-1).to_a.zip @scores
zipped.sort! { |a, b| b[1] <=> a[1] }
zipped.map { |pair| pair[0] }
end | 1 |
a29b372857034acda30c1e7cd33e5171 | f8b70ce2de90a4c52a3eec36ebeaa89b | Returns a 3*3 matrix with quadrupole moment | class CCSD_Helper(object):
def dipole_moment(self, t1, t2, lam1, lam2, F):
pai = self.Dai(t1, t2, lam1, lam2)
pia = lam1
pab = self.Dab(t1, t2, lam1, lam2)
pij = self.Dij(t1, t2, lam1, lam2)
dipolexyz = self.Defd_dipole()
left_p = np.vstack((pij, pai))
right_p = ... | 0 |
fac7fc37ec5e5cc0f5b301e289db559b | 2899a29e354c87d2ffebe05aa98225fd | 09 自动登录 后,用户名能否从当前游戏配置信息获取,取得最后一次登录的用户名 | func Loginuser() Term {
ret := Term{"null", N}
for _, line := range CfgData {
if strings.Contains(line, "DontDisplayLastUserName") {
s := strings.Split(line, ",")
if s[1][0] == '0' {
ret = Term{"已禁用", N}
} else {
ret = Term{"已启用", Y}
}
return ret
}
}
return ret
} | 0 |
25f552f7b62df812655cddb7d655d796 | cc6ccb6400a2821eeb3b1f98066235be | in base alle condizine imposte dai sensori attua le opportune correzioni della traiettoria | if ((targetPoint.Z() - carZ) > Constant::LIMIT_VISIBILITY_TARGET) {
generate = true;
if (isGoal)
punteggio -= 1;
} else if (isInTarget() && isGoal) {
goalChecked += 1;
punteggio += 1;
if (nebbia) { punteggio += 1; goalCheckedNebbia +=1; }
generate = t... | 0 |
5e187d798905f57790dc3add72a1b309 | d88b20f897fe4f7e125c5b2340727543 | Arrange StarItems in a spiral shape | namespace Lit.Ui.CircularMenu
public abstract class CircularMenuRing : CircularMenuObjectModel
internal void ArrangeItems()
{
if (Menu.SortByCategory)
{
}
CalcItemsLayout();
CalcLayout();
CreateCategories();
} | 0 |
11023892fde9d1b4e58557018b7478aa | 1b215e71528789ae37f5a64f02f8f774 | 上传学生作业图片 | HttpServletRequest request = ServletActionContext.getRequest();
String courseid=request.getParameter("co_id");
String userid=request.getParameter("us_id");
String assignId=request.getParameter("assignID");
logger.debug(courseid);
logger.debug(userid);
logger.debug... | 1 |
85e859d98e083e9a83140c49e73c4985 | d25d7d1f8f1aa6ede69b1f7c8d9bd1a2 | don't add / at the end! | class API:
def __init__(self, base_url):
self.base_url = re.sub('\/*$', '', base_url) | 1 |
514b7a39f35009d8c397cf09317655a8 | 4aaae29252d72f555fd64352b68f9309 | Resize the image to the specified width and height, using
the specified filter type with the specified blur / sharpness
factor.
blur_factor values greater than 1 create blurriness, while values
less than 1 create sharpness. | $image = wp_load_image($resized_file);
if(!is_resource($image))
return new WP_Error('error_loading_image', $image, $file);
$size = @getimagesize($resized_file);
if(!$size)
return new WP_Error('invalid_image', __('Could not read image size'), $file);
list($orig_w, $orig_h, $orig_type) = $size;
sw... | 0 |
946d9559807df34343183097fb77fecb | f23f65d10c98ca8f5cef185f468b637a | Lists each WebApp associated with the specified FirebaseProject. The elements
are returned in no particular order, but will be a consistent view of the
Apps when additional requests are made with a `pageToken`.
(webApps.listProjectsWebApps)
which to list each associated WebApp, in the format:
projects/PROJECT_IDENTIFIE... | namespace Google.Apis.Firebaseappcheck.v1
public class ProjectsResource
public class AppsResource
public class DebugTokensResource
public virtual ListRequest List(string parent)
{
return new ListRequest(service, parent);
} | 0 |
b5261ffd45f33232b0e361fe66e64c4d | 92ada5c5d9111396761fb6aee55879a2 | Write a boolean value to string formatted for "generic" set operations.
Subclasses should overload this as needed for instrument-specific
formatting. | namespace Reclamation.Core
public abstract class BasicDBServer
public virtual string PortableWhereBool(bool p)
{
return p.ToString();
} | 1 |
f3208009856341436d74d2e772097e28 | 394a82f2624acfd6aee988ec21466041 | 根据id获取movedivobj对象 | function getfromid(obj) {
return document.getElementById(obj);
} | 1 |
9f8b26570276f8d1ff7c2b2fe88f2e00 | 65f820d846213523edf6603cc257ca25 | Refresh the twitter stream. | class TwitterBot:
def run(self):
try:
self._stream_api.userstream()
except KeyboardInterrupt:
pass | 0 |
2915b9510639abda025056ab4748b257 | f72ab03203db1178c57d6ae266f101f5 | Display a total consumed caffeine. | class MainActivity : AppCompatActivity()
private fun displayQuantity(numberOfCoffees: Int) {
} | 0 |
d8109ada46abef10458c74a49da89b14 | bbe4f2bb434fdd8f7653f064f526bf49 | Only logged in users can access any room. | class RoomController extends Controller
public function __construct()
{
$this->middleware('auth', ['except' => []]);
} | 1 |
fd99815d9c64f855114d2526c95b9ad2 | 08e96b50edd96c9d6132667dcf268d50 | 获取行程信息(通过线路编号、日期) | namespace EyouSoft.BLL.TourStructure
public class Tour : EyouSoft.BLL.BLLBase
public IList<EyouSoft.Model.TourStructure.MRiLiTourInfo> GetToursRiLi(int companyId, string tourId, DateTime sLDate, DateTime eLDate)
{
if (companyId == 0 || string.IsNullOrEmpty(tourId)) return null;
if (s... | 1 |
225c283121f461f4b81a2c1f195111f9 | ce624a4a13ab60b07df461bb72ebc045 | Push input IQ sample buffer counter into circular buffer. | size_t out_count)
{
struct crypto_vq_buffer *buf;
unsigned long flags;
debug("Entering\n");
if (!out_count || !device_has_data(crdev))
return 0;
buf = crdev->inbuf;
out_count = min(out_count, buf->len - buf->offset);
memcpy(out_buf, buf->buf + buf->offset, out_count);
buf->offset += out_c... | 0 |
c69b1997979355dc426b3b906852103b | 0c1fb2226f64172c82ea63df83f01251 | Animate the signal trajectory in 3D. | def traj_plot_psi(psi_traj, d_type='real', xlim=None, ylim=None, skip=1,
gif=None, mp4=None, show=False):
psi = psi_traj.psi
x = psi.x
t = psi_traj.time
dt = psi_traj.dt
if xlim is None:
xlim = (x[0], x[-1])
if ylim is None:
ylim = (-1.0, 1.0)
fig = plt.figu... | 0 |
aa0dd6d72924343b742724b81be0b548 | 96e072dc09a731c83a3874f7c1fa2bda | Used to determine if this recipe can fit in a grid of the given width/height | public class RecipesBanners
public static class RecipeDuplicatePattern extends net.minecraftforge.registries.IForgeRegistryEntry.Impl<IRecipe> implements IRecipe
public boolean canFit(int width, int height)
{
return width * height >= 2;
} | 1 |
575dd2887de8208ae681ab9fe29957dc | ef6cb81a5ba29bd34fdfbc88bd99635d | Fonction permettant d'attendre que le joueur clique sur un bouton, et de retourner la valeur choisie | buttons = self.buttons
for b in buttons:
if b.getLabel() in choices:
b.activate()
else:
b.deactivate()
while True:
p = self.win.getMouse()
for b in buttons:
if b.clicked(p):
return b.getLabel() | 1 |
af66dd25cdc6b6b3aaf2fc7701dbc521 | 608ea4e30826443ceeedc32af77c75e4 | Width of a full screen canvas. | class ROOTCanvas(CanvasBase):
def default_width(cls):
return 700 | 0 |
f77cacf570ee10c0d9d2e415343c88d0 | ee3d1058fa8787551a36fba0d0f002ae | 是否具有删除Microblog的权限 | public boolean authorize() {
if (Permission.COMMODITY_DELETE.isGranted(getLoginInfo())) {
return true;
}
return false;
} | 0 |
eba413d8ece366f837ac47c55fcb00b4 | 6c245dc018529c6d9c99466817886f90 | Clears and replaces all the regions of interest. | void clearAllRegions() throws IOException; | 1 |
bb085af4674a2106c1f913fa00eb56da | 82237dbd97873a87c024447ff68c83c7 | 指定したインデックス値にトゥーンファイル名を設定する。 | public class ToonMap
public void resetIndexedToon(int idx){
String toonFile = DEF_TOONMAP.get(idx);
this.toonMap.put(idx, toonFile);
return;
} | 1 |
83299ea2c2f5cf0832eed865aa6e6f8c | 298e7bc4bc61d27329279b758c3bb056 | A secure pseudo random number generator, used to get secure random values | try {
return SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException e) {
return new SecureRandom();
}
} | 1 |
cfeabe0cde23ff3e82bf4846442214f4 | 2f97af398d0b4602bd9ca6a6a53be1b0 | Función que recorre el array de Notas y muestra el título. | {
while ($fila= mysql_fetch_array($result))
{
$nota = $fila['idnota'];
echo "<div class='busq-resul'>";
echo "<p>";
echo "<h3>"."<a href='notas.php?nota=$nota' >".htmlentities($fila['titulo'])."</a>"."</h3>";
echo htmlentities($fila['resena']);
echo "</p>";
echo "</div>";
... | 1 |
216ff6229d69027ec15dbfb715d73171 | 994bf5b9c330a100d36a14e32a8e9211 | 添加循环模式的Form Put请求任务 | public final class RequestQueueWorker
public void putFormInCyclesMode(String url, String data) {
putFormInSpecificTimes(url, data, -1);
} | 1 |
40813344bb1b70de1d56c78a9d15bfa0 | 165486eabe2c3c3df93e7503fd34a0b6 | Gets the sandbox of this Team. # noqa: E501
Indicates whether team is in Sandbox mode # noqa: E501 | class GetDomainsDomainResult(dict):
def sand_box(self) -> str:
return pulumi.get(self, "sand_box") | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.