query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f78591a2a7b036f458dfbb77bffa2425 | c7de26e2f8d5f131ba315233d2a57e06 | Runs the training algorithm with Batch Gradient Descent. | class logistic_regression_batchGD():
def batch_gd(self):
theta = np.zeros(self.X.shape[1])
costs = []
for epoch in range(self.epochs):
theta = theta - self.alpha * logistic_regression_batchGD.cost_function(self.X, self.y, theta)[1]
cost = logistic_regress... | 1 |
6cf8c60429e4228d92489b6a32c056e6 | 66b5dbccc1036f7571e67b6df9793a5e | only play once | void SoundClass::playSoundOnce(ALLEGRO_SAMPLE* thisSample) {
al_play_sample(thisSample,1.0,0,1,ALLEGRO_PLAYMODE_ONCE,0);
} | 1 |
86185775c499134de49e162e94bd92bf | 03155c78fd924d82cb25ea11fb06a75d | 휴가 기본 정보 조회 | @Slf4j
@Service("hRService")
public class HRService
public OvertimeInfo getOvertimeInfo(OvertimeInfo param) {
return hRMapper_Ryhr.selectOvertimeInfo(param);
} | 0 |
d34121fad305cf0059b874170e968416 | ec503cf08316d83401d9a20ada65b0ae | #----------------correct----------------------------------------------------------# | pop<-list()
for(i in 1:length(spa$pop2000)){
hpop<-c(spa$hh.1person[i],spa$hh.2person[i],spa$hh.3person[i], spa$hh.4person[i],spa$hh.5person[i],spa$hh.6person[i])
bpop<-spa$pop2000[i]
if((hpop%*%(1:6))<bpop){
cat("FYI, down by",bpop-hpop%*%(1:6),"people. Correcting.\n")
hpop[1]<-hpop[1]+bpop-hpop... | 1 |
baccab4e5542cf1abf12a683863068c4 | d5de9d099390771cc30c3809178dae2c | Choose the next instruction, bottom-up. For now we use a simple greedy | if op==None:
return None
if op.GetDown():
return op.GetDown()
while not op.GetNext() and op.GetUp():
op = op.GetUp()
return op.GetNext() | 1 |
81cc45ca2e78ca37a58ed3c032a72f15 | b096536447a2de8ce2460389d2cfb19a | Logically EORs two identically-long bitmaps together, generates
a new bitmap and returns the result in it. | {
int c;
int i;
c = 0;
for ( i = 0; i < n; i++ )
{
if ( ( i4_btest ( a, i ) && ! i4_btest ( b, i ) ) ||
( ! i4_btest ( a, i ) && i4_btest ( b, i ) ) )
{
c = i4_bset ( c, i );
}
}
return c;
} | 1 |
6c5a03336dba27424a1f4659a9cb2f85 | 0b98cdbaeb796a578309a4d829a4e1b6 | * determina se l'oggetto è abilitato | public abstract void setAbilitato(boolean flag); | 0 |
f80251fb9614c875286a5d0a4b881725 | 86a1e070e9da8edc50981c52a097a2d8 | Display license expired error notice | ?>
<div class="notice notice-error is-dismissible">
<p><?php _e( 'Woobizz list needs woocommerce to work properly, please install and activate woocommerce or disable this plugin.', 'woobizz-list' ); ?></p>
</div>
<?php
} | 0 |
b4c7e8bbe13e378ab9506cad2de4fc88 | b880844f1914a8c9e8fcc40838cb89cc | Build the page if a user is (potentially) logged in or there is POST data | class UsersController extends AppController
public function index() {
if($this->Auth->loggedIn())
$this->render('loggedin_index');
else
$this->render('loggedout_index');
} | 0 |
6e1ee9f555368e8154eb3a3c7fc00cb5 | 87d0834770c868ad884e39a064c14a4f | Endpoint to create a service.
Example usage:
curl -H "Content-Type: application/json" -d '{"type":"JUPYTER", "cpus":1, "memory":2, runtime: 'python-3.8'}' -X POST http://localhost:8180/dsp/api/v1/service | ok, message, code = _version_ok()
if not ok:
return message, code
else:
if connexion.request.is_json:
service = ServiceType.from_dict(connexion.request.get_json())
else:
return "Supplied body content is not or is mal-formed JSON", 400
STORE.add_service... | 1 |
144e00db9d7564aa295a3ebc4d3e194a | 7d736d4993280f48ca4dc70f9a22ea60 | If to print the order date on the receipt. | public void receiptPrint(T date); | 1 |
bc24b722ebfc8a93f5e7bf85eead1015 | 5bf1f9a6271a386683cab98064004efe | Get the calcul particip. | {
try
{
ParticipationQuery participation = new ParticipationQuery();
participation.participationParagraph1 = this.getInterfaceElement("participationParagraph1").content;
return participation;
}
catch (Exception ex)
... | 0 |
5532c80c14dd15077accb3f68c9558a3 | 6f3e5eadda4454dd636f5044b2a1f9d9 | 根据系统ID、用户ID、部门Id获取权限列表 | @Service
@Transactional
@BaseService
@RequestMapping("api")
@RestController
@ApiIgnore
public class AuthApiServiceImpl implements AuthApiService{
@Override
public List<AuthPermission> getAllPermissionBySystemId(int systemId) {
return authPermissionService.selectList(new EntityWrapper<AuthPermission>().eq("s... | 0 |
b3c14717fe2ac01bdccb4053b39eaa64 | fb62ef46435a36ac0267c5785d00b275 | \brief compare two message ids
\detail compare two message ids by their destination,source and sequence number | {
return aFirst.iMessageId < aSecond.iMessageId ? -1 : ( aFirst.iMessageId == aSecond.iMessageId ) ? 0 : 1;
} | 0 |
a90070da56b595a55e3e534eae7c675a | cca7602a12c09f1534348a2f1f09e2ae | получение информации о самокате | class BikeView(BaseView):
async def get(self, bike: Bike, user):
return {
"status": JSendStatus.SUCCESS,
"data": {
"bike": bike.serialize(
self.bike_connection_manager, self.rental_manager, self.reservation_manager,
include_location... | 1 |
51306d5e4d8a9a4906a372ff80482f4b | a6d8cda5d34745a6423e42c24b583946 | Getter de la date du début de la licence | public class Statistique
public LocalDate getDebut() {
return debut;
} | 1 |
1cac7b8e18066dfe879da2a02f2c6a14 | e1080082c9452e3f523800ddf9d678ac | deprecated, as DI cannot exist without at least one point | namespace IoC
[PublicAPI]
public static class Injections
public static void Inject<T>(this IContainer container, [NotNull] T destination, [CanBeNull] T source)
{
throw new NotImplementedException(JustAMarkerError);
} | 0 |
9e8c82d1afed3cffc206fee3dda5c46f | 6eb61b6952f3755e0f6cc32c6dc72eee | Indicator whether or not the resource backing up the app-service
relationship is a cluster or not | public final class RouteDataSource
public boolean isCluster() {
return cluster;
} | 1 |
e853c9932ab03989570e3a5d61da09ff | 7f3c5decb7b652eb095443d28b43338a | 根据申请单号删除申请报告(需要同时删除和OA申请相关联的所有表) | @Service
public class CheckReportServiceImpl implements CheckReportService
@Override
public JSONObject deleteReportByReportNum(String reportNum) {
JSONObject result = new JSONObject();
int code = 201;
String message = "记录不存在。";
if (checkReportRepo.findOne(reportNum) != null) {
... | 0 |
a09dffaa095c13a44ba4cd48c898162d | 1d0e64d957547fcba31118df6fea179d | 服务-发起请求抓取图片至本地 | res, err := http.Get(vc.Url)
defer res.Body.Close()
if err != nil {
vc.Msg <- (strconv.Itoa(vc.VolumeID) + " HTTP_ERROR")
}
dst, err := os.Create(DataRoot + strconv.Itoa(vc.VolumeID) + ".jpg")
if err != nil {
vc.Msg <- (strconv.Itoa(vc.VolumeID) + " OS_ERROR")
}
io.Copy(dst, res.Body)
vc.Lock.Lock()
vc.Ms... | 1 |
c7f0fc5ca88387ccb314e3ebb3ace124 | fcf3608d1458ccb2249837cd0568bd68 | Set password rule based on our setting value ( Force Strong Password ). | if ( empty( $pass1 ) || $pass1 !== $pass2 ) {
return;
}
$user = get_user_by( 'login', $user_login );
if ( empty( $user ) ) {
return;
}
$extra_data = [
$user->user_login,
$user->first_name,
$user->last_name,
$user->nickname,
$user->display_name,
$user->email,
$user->url,
$user->description,
];... | 1 |
aa4b04842069c07f61fa8ac8a660fa0f | 0042dfdf3190bd5b8a7a779dfe2a45a8 | Container compiler method for setting values stored in the building_config.yaml file. | each_build_settings do |build_settings|
build_settings.keys.each do |setting_name|
if setting_name_to_update == setting_name or setting_name.start_with?("#{setting_name_to_update}[")
build_settings[setting_name] = block.call(build_settings[setting_name])
... | 0 |
4430b5463273fb4afdcd7ebf3a373498 | 9fa46cbcc14a458d9d394e9b177a8042 | callback function to countdown the operation clock | class Timer(tk.Frame):
def counting(self):
if Timer_data["stat"]["timer_started"]:
self.time -= 1
if self.minute == 2 and self.second == 30 and self.color_change_var.get() == 1:
if 90 < self.time <= 120:
self.fg_color.set("green")
elif ... | 1 |
ed7b1f26598fb82cb345e98891c0ded2 | 5a00d4f79b5319c210b4df4d4c7a1389 | 获取两坐标开车路距离 | $.ajax({
url:"http://api.map.baidu.com/routematrix/v2/driving?output=json&ak=UKcw6OUqYS7HrwAbEiinsHKv",
dataType:"jsonp",
data:{
origins:fromLocation,
destinations:toLocation
},
success:function(msg){
console.log(msg.result[0].distance);
distance=msg.result[0].distance.text+"";
if(distance.ind... | 1 |
7275ea770bb07c4ee5ff559268bb4a65 | ec58e62c33d07da97d9191ce0faa1686 | Retorna a linha do arquivo que está sendo iterada. | class file_processor():
def lineno(file):
return fileinput.lineno() | 1 |
c562b1423c931b425d95049512d207fa | bb6e5e5124d36984932634c1b1575e82 | Menu do Usuário | class Usuario extends CI_Controller
public function index() {
$this->load->model ( 'empresa_model', 'EmpresaM' );
$data = array ();
$data ['DOCBUSCAR'] = "";
$data ['MOSTRARMENUCADASTRO'] = $this->mostrarMenuCadastro($this->session->userdata ( 'nivelLogado' ));
$data ['URLFORMUSUARIO'] = site_url ( 'pai... | 1 |
2a9898954869c703c703903aadc50f76 | 1bc87b8f6318bb6a4437ca051d678129 | Return which other filters this filter conflicts with. Return either the
filter name or an array of filter names | abstract class AValidator
abstract public function getFilters(); | 0 |
95b8311a839075734dd5d573f3bd1e10 | 5b192a3508c96dad4c704059c2111a26 | Get text extracted from image
Returns:
str: Extracted text. | with io.open(path, 'rb') as image_file:
content = image_file.read()
img_obj = GoogleTypes.Image(content=content)
img_results = self.client.text_detection(image=img_obj)
return img_results.text_annotations[0].description.lower().strip().replace('\n', ' ') | 1 |
a3d9b7d6761d77a55ad466c6b9636016 | bebec10ef3fd7db3bc63dafaa0aaae20 | Returns the number of supported file extensions on a wave importer. | {
InterfacePtr<ISelectionManager> selMgr (Utils<ISelectionUtils>()->QueryActiveSelection());
InterfacePtr<IExportProvider> inCopyExportProvider (selMgr, IID_IINCOPYEXPORTSUITE);
if (inCopyExportProvider)
{
return inCopyExportProvider->CountFormats();
}
return 2L;
} | 0 |
025cf5d1dd44731a20678dd8814f16b0 | 3a411818ca51c1ca6da5c273c3596762 | 生成一个新订单 临时物料添加到订单物料 | namespace Maintenance.Services
public partial class WorkOrderService : IObjectsService
public bool AddTempWorkOrder(bool finished, string shipid, string workOrderName, string principalPost, string confirmPost,
DateTime planExeDate, int isCheckProject, int isRepairProject, string... | 0 |
f3ce4e65c30e77f11d6a2371a1b4d8c0 | 4a41ad9cdfe7f6660e067ba524841e7d | Called to notify a relation is terminated | public class DataModelBaseListener implements DataModelListener
@Override public void exitRelation(DataModelParser.RelationContext ctx) { } | 1 |
70e85af318b6db05047f878ca3c62a71 | b05947d0fcbb3245a8177d3b2e8c0efc | Find and select HTML tag pair | {
$selector = preg_quote( $selector );
$closer = explode(' ', $selector)[0];
preg_match_all("/<$selector.*?>([\s\S]*?)<\/$closer>/", $src, $matches);
foreach( $matches[$tag] as $mat ){
$result[] = trim( $mat );
}
return $result;
} | 1 |
72b3e5c155fa7eae959bfdc007e9b578 | 30c246487ce4ed727e12def64524da96 | Отобразить свойства входного канала | namespace Kwyjibo
public class VideoInput
public void DisplayPropertyPage()
{
var source = ((VideoCaptureDevice)Source);
if (source != null)
source.DisplayPropertyPage(IntPtr.Zero);
} | 1 |
b8ae5a093084d48fba0bb789da56324a | 62e551a9c1c0854d3bb401121b015be4 | it's required to login to get access to secret page | class TestAuditImport(TestCase):
def setUp(self):
super(TestAuditImport, self).setUp()
self.client.get("/login") | 1 |
3289af5e986dfff70ddeb8a70b712dd2 | 4eeca61623e7fb0c93bb3858c24aa678 | Gets the address factory. | IAddressDAO getAddressDAO(); | 0 |
1ca3e51902116de5c1a04b356c17516e | ed96b5a5ec17e01e187a4c50a8b2b3f7 | unregisters all filesystem before removing them | void fs_shutdown(void) {
fs_mount_t *mount;
status_t ret;
fs_node_release(curr_proc->ioctx.root_dir);
curr_proc->ioctx.root_dir = NULL;
fs_node_release(curr_proc->ioctx.curr_dir);
curr_proc->ioctx.curr_dir = NULL;
LIST_FOREACH_REVERSE_SAFE(&mount_list, iter) {
mount = list_entry(iter, fs_mount_t, header);
re... | 1 |
21fe6ca02a034bdccacbb9d3c353c736 | d994ac88e92cf1f2ba948d08ef046f8b | Set 机器人Id列表。 | public class DescribeClusterParamLogsRequest extends AbstractModel{
public void setInstanceIds(String [] InstanceIds) {
this.InstanceIds = InstanceIds;
} | 0 |
7edef4ccb3f1d394dc56db37c929d7c6 | 2517c771c24a3e4a5c1c65d18f1bb0e1 | Issue SPEAK EXTERNAL command on TMS5220. | des = DESTINATION["commander"]
cmd = commands.STOP_SPEAK
data = {}
serial, error = self._inter_comm.send_command(
des, cmd, data, sync, timeout)
return serial, error | 0 |
32e0de6e7d63b85d0ea0f4635288256c | 310f08334d2b7f7aff4994aaa600cd8f | Test reading a version 2 AxoGraph file | def test_read_version_0_1_0():
file_path = get_current_module_path(__file__, "../../test_data/simple_simulation_v0.1.0.hdf5")
if not os.path.isfile(file_path):
pytest.skip("File does not exist: {}".format(file_path))
simulation = Simulation(file_path, None)
simulation.version = ""
simulati... | 0 |
b75a1bb6cc6bfdfe19648b4bf950f95f | b069947428703e363ae583207104a251 | Listens to events from the tab pane, displays different
categories of data accordingly. | public class LibraryViewer extends JFrame
public void stateChanged(ChangeEvent e) {
if (tp_Tabs.getSelectedIndex() == tabs.LIST) {
setupList();
cb_PrepSQL.setSelectedIndex(0);
} else if (tp_Tabs.getSelectedIndex() == tabs.ADDBOOK) {
setupAddBook();
} else if (tp_Tabs.getSelectedIndex() == tab... | 1 |
3b2ad8413ebb82360d44e55eb3dd01af | bd237c6159bfca0e0530db6186c952b5 | Gets the computed value of the border-bottom-width property, expressed in
a previously specified unit (see the documentation for the class that
returned this object). | @JsxClass(value = {FF, FF_ESR}, className = "CSS2Properties")
public class ComputedCSSStyleDeclaration extends CSSStyleDeclaration
@Override
public String getBottom() {
return defaultIfEmpty(super.getBottom(), AUTO, null);
} | 0 |
00d98890d09f45f0d95ee42a4819f672 | 8dfbfdcfed4feb6b49ef5afd830d2691 | ProfoundIdからInventoryを取得 | namespace SagaMap.Scripting
public abstract partial class Event
protected List<SagaDB.Item.Item> GetItem(ActorPC pc, uint ID)
{
List<SagaDB.Item.Item> result = new List<SagaDB.Item.Item>();
for (int i = 2; i < 6; i++)
{
List<SagaDB.Item.Item> list = pc.Inv... | 0 |
8cf57c7d7ee70eb12b8d253c444257f9 | f12f2a7ac2b0351b071727e8d09de632 | Se limpia la fecha hasta. | class Turno
public function setFecha_hasta($fecha_hasta)
{
$this->fecha_hasta = $fecha_hasta;
return $this;
} | 0 |
ba2874b7ecd6930a942357399b137961 | 62e5ba9a002083a6e415a7e2b9e6a412 | Calculates the f1 for a set of predicted labels give the gold (ground truth) labels. | def calcF1(y_star, y_hat):
var = np.sum(np.abs(y_hat))
precision = (np.sum(y_hat == y_star) / var) if var != 0 else 0
recall = np.sum(y_hat == y_star) / len(y_hat)
if recall + precision == 0:
return 0
return 2 * (precision * recall) / (precision + recall) | 1 |
aad8ce7c69f70c4e43cd1f4154b34dca | a625daecfecda5fe7b182332c9ea7362 | New global Custom Attributes for assessments created via REST API.
Teardown - remove created gCAs. | {
SetGlobalAttributeValue( "GoogleAPIKey", string.Empty );
SetGlobalAttributeValue( "core_GoogleReCaptchaSiteKey", string.Empty );
} | 0 |
f86b210f027f5454a1c2a6f8c79fccc8 | cb77053224707323dc26a5c4261d1003 | Returns to main menu when the device back button is pushed. | public class activity_Inventories extends ActionBarActivity
public void backToMainMenu(View view) {
activity_Inventories.this.finish();
} | 0 |
83f35093cc962c3807087f56bdc05b93 | 89b4f44efa7bc808addb129450ff05fc | DFP算法近似计算Hessian阵的逆 | gm = tf.gradients(f, params)
g = tf.concat([tf.reshape(x, (-1, )) for x in gm], axis=0)
x = tf.placeholder(dtype=tf.float32, shape=g.shape)
gm_fxx = tf.gradients(tf.reduce_sum(g * x), params)
H_fxx = tf.concat([tf.reshape(i, (-1, )) for i in gm_fxx], axis=0)
... | 0 |
20a43e246fcb458a28f892be53ebf7f1 | 5133eae8fe3f53a0110fa595c3c78e63 | If it is the first turn just spawn the enemies | {
if(spawnerData.spawnerSize != 0 && spawnerData.spawnerSize == enemies.Count)
return;
float xOffset = Random.Range(-spawnerData.randomOffsetRange.x, spawnerData.randomOffsetRange.x);
float yOffset = Random.Range(-spawnerData.randomOffsetRange.y, spawnerData.randomOffsetRange.y);... | 0 |
884066e11e23d5474b4c26dec475f72f | 431bf0bf1f9691aaf8eed09faa40b290 | define regex type guard only allowing positive ints | function strictParseInt(intString: string): number {
if (/^[-+]?(\d+|Infinity)$/.test(intString)) {
return Number(intString);
} else {
return NaN;
}
} | 0 |
d4471fbcecbdbf309233a97dcc566d05 | 3084ca23c43be6952d1a198d7de66891 | @brief 计算频点号对应的频率 | {
int i = 0;
Nat32 result = 0;
Nat32 Multiplier = 1;
for(i=0; i<8; i++)
{
result += ((*freq >> (i*4)) & 0xf) * Multiplier;
Multiplier *= 10;
}
result = ((result/10) * 16)/ 1000;
*freq = result;
return result;
} | 1 |
2d9822774dd098e245205f022cb6e43b | 1346ae51716f205ea67656cd741b141b | L’opérateur << (remplace la méthode d’affichage) qui affiche les informations qui concernent un Livre, tel que présenté dans l’exemple à la fin du document. | {
const short PRECISION_PRIX = 2;
os << std::fixed << std::setprecision(PRECISION_PRIX);
return os << "(" << rhs.no << ", \"" << rhs.libelle << "\", " << rhs.prix << ")";
} | 1 |
2209ef0cb6dd51cfed575be09aa3552a | f69fe7c6dee667f3e96e17a8d94ddd31 | Set the channel to which late arriving trigger messages are sent. | class FluentMessage implements FluentMessageContract
public function to(ChannelContract $channel)
{
$this->channel = $channel;
return $this;
} | 1 |
8e84d83d6a0bb87a90efeba99223fd76 | 1c8bd0e02cbf53477423a3b6a3d62473 | 判断两个节点是否处于连接状态 | boolean isConnected(int p, int q); | 1 |
74815958afb7b3710a53cf7eabde878b | f47124b2ae43ecbe00b103f080cd7107 | Install all packages available to Argos Translate. | check_call('python -m spacy download en'.split())
check_call('python -m spacy download es'.split())
install.run(self) | 0 |
f6b3d8a650a7ee0765c2ba44ce7f9008 | cb7188fbad4e83560e5fa1df2c194376 | Gets the value of the valueSource property.
possible object is
{@link JAXBElement }{@code <}{@link String }{@code >} | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Line", namespace = "http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/orderInformationService/", propOrder = {
"sourceTransactionLineIdentifier",
"sourceTransactionScheduleIdentifier",
"sourceTransactionLineNumber",
"sourceTrans... | 0 |
7b9d32a7580a8ca8d08c734a04ab2d35 | e4154eadfc4a75c1ce6f3a44038b1d61 | 根据 策略累计收益率 基准累计收益率 计算 信息比率IR | def calculate_information_ratio(target,benchmark,freq):
ex = np.subtract(target , benchmark)
return calculate_annualized_return(ex,freq)/calculate_annualized_stdev(ex,freq) | 1 |
4b91d1457598fcb226f1c02687ed7b60 | fc1fd7fea090510e33992d355b89a9da | 站点配置 验证 | class BaseController extends Controller
protected function _initialize(){
$config = api('Config/lists');
C($config);
if(!C('WEB_SITE_CLOSE')){
$this->error('站点已经关闭,请稍后访问~');
}
} | 1 |
ecc9bc3fcb2a9f06e5612de20487e0d4 | bdd56a5dba9880c31a6932b8dd2ab080 | 获取梁的支座(左右) | {
FamilyInstance fi = beam as FamilyInstance;
var numName = fi.LookupParameter("梁编号").AsString();
var topBar = fi.LookupParameter("梁上部通长筋").AsString();
var leftBar = fi.LookupParameter("梁左(下)支座筋").AsString();
var rigthBar = fi.LookupParameter("梁右(上)支座筋... | 1 |
d267242f99d88a301e269b978c0ecf14 | 8c75dc96466a264d4cca539e541e5fd9 | Este método obtiene asignatura/s relacionados por
su profesor | function getAsignaturasProfesor(){
$asignaturaProf = array();
$nombre = $_SESSION['usuNom'];
$sql = "SELECT * FROM vasipro WHERE nombre=$nombre";
$result = mysqli_query($enlace, $sql);
if ($result){
while($row = mysqli_fetch_assoc($result)){
$asignaturaProf[] = $row;
}
}
return $asignaturaProf;
... | 1 |
0ef34ea8110f468ba81175058fec1161 | 434104486049dd37a8ebb7ae02dec5f6 | IMPORTE EXENTO | class AcuerdoPagos
public function tipoImpuestopredial()
{
return 3;
} | 0 |
9cbd71147bad917f6aa91a13575dee6a | e80a2b362d4df33a9b8e111338ba643c | 解压缩推送收到的数据 | {
if(mEncrypt != null)
mEncrypt.RecvDecode(body, len);
int decompress_size = 0;
byte[] decompress_date = null;
if (compress)
{
if (mDecompress == null)
mDecompress = LZ4Sharp.LZ4DecompressorFactory.CreateNe... | 1 |
850f56869cda6a5508404a876eefd001 | a1f72f53729205268b9c0ab890309d7a | Convert the contents of the console window from ascii to hexadecimal. | int charToHex()
{
unsigned char c;
do
{
c = getchar();
printf("%02x", c);
} while (c != '\n');
printf("\n");
return 0;
} | 1 |
889367d4f98e123bfc7d99b76121c680 | bdeab3d9ad2c873d10c0e67c800b3591 | List the default dcos cli subcommands | def default_subcommands():
return ["auth", "config", "help", "marathon",
"node", "package", "service", "task"] | 1 |
fa84106d3f6b1297ec68bb6f307fec2a | ecd501d6ff529ba6959692daa8ba1060 | Calculates the distance between two sphere-swept rectangles and also calculates closest points | double RcsShape_closestSSLToBox(const RcsShape* s1,
const RcsShape* s2,
const HTr* A_S1I,
const HTr* A_S2I,
double I_cp1[3],
double I_cp2[3],
... | 0 |
05956a635e2628675546e98a77c71082 | 1480e7ddd59aad8941e684c65e183c4f | Function to Write a Specific Sentence to LCD | void Write_to_LCD_text(char *ptr)
{
LCD_GLASS_DisplayString(ptr);
} | 1 |
d35bda3aa1b72e30b93bc73883f58ba8 | bc29413646d3bb6ce5bc4fb8206c4342 | function that trigers when object dies | if(objectID == BORDER) {
TakeLife();
}
if(objectID != ENEMY)
SetAlive(false);
} | 0 |
c322e9021b85988ecfd16ef600c3e169 | fb4b84f32eb9d0f80d0c8084bd8eeba1 | Compute the distance to move the x-axis | class StateMgr:
def get_x_diff(self):
oldest_index = (self._x_hist_index + 1) % StateMgr.HYSTERESIS_DUR
return (max(self._x_hist) - self._x_hist[oldest_index]) / looseBound[2] | 1 |
fc25fcf707ab7b4c807120eb1b372160 | 055c7b269c323415dfc8da19b39b0138 | Returns the machine code of the line | if self.line.startswith('@'):
return 'A_COMMAND'
if '(' in self.line and ')' in self.line:
return 'L_COMMAND'
return 'C_COMMAND' | 0 |
238a97e8554cc415a7e34c9248ca84af | 74be692ca7a878a3854a641b6b09954a | validate that when another unit allocation is added to the list of allocations
that the ratio is calculated correctly using both allocations | breakdown_allocations = []
start_queue = deque([[0, 10], [1, 10]])
carryover_queue = deque()
breakdown_2 = types.TimeUnitBreakdown(2)
breakdown_2.add(1, 10)
breakdown_2.add(0, 10)
breakdown_allocations.append(breakdown_2)
breakdown_3 = types.TimeUnitBreakdown(3)
breakdown_3.add(3, 10... | 1 |
9faabdb5524488d0ccb895a13c83c4b2 | 8a1f8a4d11249666529fb3b56669d79f | 为新角色创建卡包 | @Service
public class BackpackServiceImpl implements BackpackService
@Override
public void createBackpack(String acountId) {
backPackManager.createBackpack(acountId);
} | 1 |
1b1e9f74a6cc7852981b76ba88aff6b2 | 3c7ec96bef9c4e81d4062ce25be41549 | Process a list of `seqs` with multiprocessing. | def multiprocess(size, iters, pE=0, pX=0, pZ=0, seeds=None, processes=None, config=None, **kwargs):
if config is None:
config = decoder_config()
if processes is None:
processes = mp.cpu_count()
process_iters = iters // processes
rest_iters = iters - process_iters * processes
if seeds... | 0 |
d92d0109080923000927766ae8268d40 | 1c8ed16d5195340b0953f9c2b0e54b26 | Error returns error response with 500 code and error message | func New500Response(msg string) error {
return NewResponse(500, msg, 500)
} | 1 |
b5de3858dfea1ea3f807520a15925ded | a1a72952bd3c09b0929235698e18b0f6 | API endpoint to get breakdown percentages of portfolio | @cash_balance = retrieve_balance(account_id("Cash"))/100
@cash_account_id = account_id("Cash")
@active_investments_balance = retrieve_balance(account_id("Active investments"))/100
@active_investments_acocunt_id = account_id("Active investments")
@pending_investments_balance = retrieve_balance(accoun... | 0 |
8af8609278d8f0ee6f09a82e7d185995 | 716708bfea174cea86825c39bcc0bc9d | 分页条件查询实名认证对象 | Object queryPageCredentials(String certificateCode, String certificateType,
String companyCode, String status, String approveUser,
String start, String limit, String province, String city, String area); | 1 |
46fe0aaf2a524db7032d97cbc5e402e8 | 095f921f58025b61f15db02eba916599 | 完全背包问题,一个物品可以拿无限次 | def bag():
num, capacity = 4, 10
value = [42, 12, 40, 25]
weight = [7, 3, 4, 5]
num, capacity = 3, 10
value = [20, 10, 12]
weight = [5, 4, 3]
dp = np.zeros((num + 1, capacity + 1))
for i in range(1, num + 1):
for j in range(1, capacity + 1):
if j - we... | 0 |
72c51938c12d06e2218794525ceab368 | 471d2a9d7167a8a9fb3d1b30e09f808a | Calculates the points for each of the two teams on a given match. | if match_row["FTHG"] > match_row["FTAG"]:
return {"home_pts": WINNING_PTS, "away_pts": LOOSING_PTS}
elif match_row["FTHG"] == match_row["FTAG"]:
return {"home_pts": DRAWING_PTS, "away_pts": DRAWING_PTS}
else:
return {"home_pts": LOOSING_PTS, "away_pts": WINNING_PTS} | 1 |
b001b11763f29114f43c2fefc22486c4 | 7ce6bb8a8596fbe395c0c401da3310d8 | 设置审查标记-摘要清晰1-正确 0-错误 | public class Pojo_GZZF implements Serializable
public void setGZZF_SCBZ(String GZZF_SCBZ){
this.GZZF_SCBZ=GZZF_SCBZ;
} | 1 |
c0b2752e42df57ae4ed72fe7cd25c8d3 | 185907a5baa5df6003093a357f5e296e | 문제.
자연수 N이 주어졌을 때, 1부터 N까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.
입력.
첫째 줄에 100,000보다 작거나 같은 자연수 N이 주어진다.
출력.
첫째 줄부터 N번째 줄 까지 차례대로 출력한다. | {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(System.out));
String input = br.readLine();
int N = Integer.parseInt(input);
int cnt = (int)(Math.pow(2,N)-1);
wr.write(Integer.to... | 0 |
d5fdc4cc16b9ae262491814ee2ae223b | f8c563e36d970d3df0d22d602ca7d84a | function to execute when user finds the right word,
sends to next level | this.props.unlockNextLVL(this.state.thisLevel, this.props.level_caught);
this.setState({
begining: true, refresh: true, chosenTiles: [], clickedTile: [],
nowClicked: null, nextToClick: [], gameComplete: false, thisLevel: this.state.thisLevel + 1
}... | 1 |
f2e6132416accb0b4eb6604c261a60de | 0aaf4e56ea68726ff041d960a7bbcba1 | 堆并排序 输入数组,返回有序数组 | public class SortRelatedProblem
public static int[] heapSort(int[] arr) {
for (int i = 0; i < arr.length; i++) {
heapInsert(arr, i);
}
for (int i = arr.length - 1; i > 0; i--) {
ArrayUtil.swap(arr, 0, i);
heapify(arr, 0, i);
}
return arr;
} | 1 |
f9d9070e654c13980f7c58041324ef72 | 0656efbb73e2b56b0078e8914c0913f1 | #' @return Hyper parameters which optimize the log marginal likelihood | fun <- function(mu) {
loglik(c(alpha, mu), x)
}
pmle <- optim(100, fn = fun, lower = 0, method = "L-BFGS-B",
control = list(fnscale = -1))
return(c(pmle$par, pmle$val))
} | 1 |
106371657c963c4762c2cd4141111811 | 7143f3fcf06ed51a61a35031125fed46 | Este método permite que no se dejen campos obligatorios del gasto en
blanco | {
if (PagoGasto.SelectedIndex == 0)
{
if (monto.Text.Equals(""))
{
MessageBox mens = new MessageBox("Complete el formulario", 2);
mens.ShowDialog();
return false;
}
}
if (PagoGasto.SelectedIndex == 1)
{
if (monto.Text.Equals("") || textConcepto.Text.Equals(""))
{
... | 1 |
2fefd6e7e6b9836e1884f682b29d03f9 | 1e8349d5970aa5d4f2f0bce71b7c60e6 | hide links between lanes when either lane is collapsed | function editLanes()
{
for (let i = 0; i < laneArray.length; i++) {
if (i == 0)
{
laneArray[i].x = 0;
} else {
laneArray[i].x = laneArray[i - 1].x + laneArray[i - 1].width;
}
}
for (let i = 0; i < laneArray.length; i++)
{
laneArray[i].show();
}
for (let i = 1; i < laneArray.length; i++)
{
... | 0 |
709985c5ffbd074d6aaaf8b3db4f6828 | 33796573ccb2a5cf552cc9cc05494b25 | bowser_puzzle_piece | self.Screen = Screen
self.X = int(X)
self.Y = int(Y)
self.Width = int(Width)
self.Height = int(Height)
self.NormalColor = NormalColor
self.HighlightColor = HighlightColor
self.Selected = SelectedPuzzle | 0 |
f7cab213db2fd3ee8bb4a62fc2b8a112 | 9f88a61071ea23867c869609f296f5de | <summary>
Sets player calibration length to its default value.
</summary> | export class DifficultyAdapterElo extends BaseAdapter
public setDefaultCalLength(): void {
this.PlayerCalLength = DifficultyAdapterElo.DEF_PLAYER_CAL_LENGTH;
this.ScenarioCalLength = DifficultyAdapterElo.DEF_SCENARIO_CAL_LENGTH;
} | 1 |
57a6853e6ed7c336ae4b5d0698a6d67c | 96c13de5cf73d5aa984c7c9cac0807ac | Calculate how many elements non zero are on the diagonal | static oski_index_t
CountDiagElems (const oski_index_t * ptr, const oski_index_t * ind,
oski_index_t m, oski_index_t b)
{
oski_index_t i, count;
count = 0;
for (i = 0; i < m; i++)
{
oski_index_t k;
for (k = (ptr[i] - b); k < (ptr[i + 1] - b); k++)
{
oski_index_t j0 = ind[k] - b;
if (i ==... | 1 |
2df2f2082c37f8fbb9e8f6297ff2dd34 | ac15ac0ebd918ee5bbf0d9583e005142 | Start a measurement for a request. | void startMeasurement(int frequency); | 1 |
75fbf517567e61d11404a306847e1fbf | a8bd7b8f2a536a600b8052f7de121c5d | \brief Get the first household_consumption3 message in the household_consumption3 message list. | m_intermediate_c32 * get_first_intermediate_c32_message()
{
return getInternalMessage_intermediate_c32();
} | 0 |
292187116a838bc902df6c9e5af3bb8b | 58ec60e034ba73de75308bc74c10df67 | Handles the Click event of the cmdIncreaseQuota control. | {
try
{
await LoadLimits();
}
catch (InvalidClientIDException)
{
return;
}
} | 0 |
47e810cd0025f2da98aa8539ab8aba49 | 4a7e099d67fef17ae32d246cfa1f5a8e | Report contains table headers for ResultComparisons and changed
PerformanceTestResults. | $percent_complete_sql = $this->get_report_sql('COUNT(ccg.id) / COUNT(cc.id) * 100');
$num_complete_sql = $this->get_report_sql('COUNT(ccg.id)');
$avg_score_sql = $this->get_report_sql('AVG(stu.grade)');
return array(new table_report_column('stu.completestatusid AS completestatus',
... | 0 |
06d57e8e7f49bba633275dfb22017e18 | c2fc23ea183d8d2d4ce5af898a91fef2 | 根据id获取商家买单打折 | public List<MaroDishesDiscountEntity> getDiscount(String shopId); | 1 |
c4b46da3d9698c014dec9e8bee7b4a3f | 71e27ff1cd437945b33a5db7c36ebf13 | Get body of InstanceManagementResponse. | class CnamLookup(BaseResource):
def body(self):
return self._body | 0 |
45089a7107e6d9abd8395d081d909b59 | 38993a0ddfbbcf3346a39e7c108d09c9 | List all artists | class AdminController extends Zend_Controller_Action
public function artistsAction()
{
$request = $this->getRequest();
$artistsmapper = new Art_Model_ArtistsMapper();
$artists = $artistsmapper->fetchAllSorted();
$artistspaginator = Zend_Paginator::factory($artists);
$artistspaginator->se... | 1 |
48379507a76720adff740021a4d0f21a | a3ed5367267ec52b9b4c3d3d626b7e71 | Mängulaua joonistamine | class Mäng:
def tuli_nupp(self, nupp, koht):
nupp_2_koopia = self.laud[koht[0]][koht[1]]
koht_koopia = nupp.koht
self.laud[nupp.koht[0]][nupp.koht[1]] = None
if self.laud[koht[0]][koht[1]] in self.nupud:
self.nupud.remove(mäng.laud[koht[0]][koht[1]])
self.laud[koht[0]... | 0 |
b44a8dda9f26eb82c6b6217a2415e5de | ab8949fcd1b0e9e007ea79b5b8073c95 | @brief Box 'in evidenza' | void PainterEntityList::drawBox( const Box2F& box, const Color& color, int transparency, double width)
{
Box2F boxShifted = box;
boxShifted.moveBy(delta_);
Style* stylea = new Style("");
stylea->sfeats().add( new SfeatArea(color, transparency));
EntityArea* area = new EntityArea( *stylea, true, NULL... | 1 |
9f8d28fe106bac500ab790c4002ba80a | a610a2a05ae1f3a3594f27feadce58c4 | Aes encryption method, does all of the stages for the aes algorithm by iterations | byte r;
byte i;
short keysOffset = 0;
for (i = 0; i < STATELEN; i++) data[(short) (i + dataOffset)] ^= aesRoundKeys[i];
for(r = 1; r < N_ROUNDS; r++) {
keysOffset += STATELEN;
for (i = 0; i < STATELEN; i++) data[(short) (i + dataOffset)] = SBox[((data[(sho... | 1 |
98ef3f3dd5b27488028944d2fe5bbda6 | 5800a4f501a34d632ec5ab4c3afe9dab | Creates a new C# instruction. | class CJMPInstruction(Instruction):
def __init__(self, trigger: Trigger, target: InstructionPointer) -> None:
super().__init__()
self.trigger = trigger
self.target = target | 0 |
62b4d181363ea86f7ce897f552d63d61 | f007ad883a5c62b8ebbd12de395454e0 | 書き込み用関数を返す | void gfc_set_writefunc(gfcrequest_t **gfr, void (*writefunc)(void*, size_t, void *)){
(*gfr)->writefunc = writefunc;
} | 0 |
62dff09a9eab904ad9b4955500fa8153 | 314c9244acf3bf1dcb171e51180ad675 | Removes the ith "Blast4-seq-part-data" element | void removeBlast4Mask(int i); | 1 |
d66ae7df994e12775a573bec5da503b3 | 3045b8682efbae142a0bbbf39015c783 | 检查UserIp是否发生变化. | {
$ips = $this->getIpsByUserId($user_id);
if (count($ips) == 0) {
return false;
}
return $this->db->select($this->config->item('database_table_users') . '.*')
->from($this->getTable())
->join($this->config->item('database_table_users'),
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.