query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ae30845cdcfe8bf612c51d052ebce945 | 6b15e31c02d19b8bf21a564c58b8bd65 | Gets the bu commitment adjustments by reference no. | namespace Buca.Application.iBigTime2020.BusinessComponents.Facade.Opening
public class OpeningCommitmentFacade
public List<OpeningCommitmentEntity> GetOpeningCommitmentsByRefTypeId(int refTypeId)
{
return OpeningCommitmentDao.GetOpeningCommitmentsByRefTypeId(refTypeId);
} | 0 |
71a55dd0b1cc09daf0335b8e84cd380e | 24d570cb564f658c71feda9c91ed2d1d | 查询一个匿名用户是否存在
返回匿名用户信息 | AnonUserRegist selectUserById(String userId); | 1 |
00479354bca743b5134b90412e91f7cb | 690eb7d51d7646629810546ca5fa65ad | this method should eventually allow you to display the network via networkx | def show_tree(tree):
for place in tree.find("net").iter("place"):
global_vars.G.add_node(place.get("id"))
for tran in tree.find("net").iter("transition"):
global_vars.G.add_node(tran.get("id"))
for arc in tree.find("net").iter("arc"):
global_vars.G.add_edge(arc.get("source"), arc.get("target"), weight... | 1 |
a8aba799c673c98ed3adfebf24025e39 | a8fb36831ec4e497a0b72efd02136592 | Similar to RegistrarTest, but we deliberately give it a dummy local sdm
and first remote sdm that never return bindings. | def test_nonet():
assert not cli_b._registered
bytes_to_send = cli_b.send(ca.RepeaterRegisterRequest('0.0.0.0'))
assert not cli_b._registered
data = bytes(ca.RepeaterConfirmResponse('127.0.0.1'))
commands = cli_b.recv(data, cli_addr)
cli_b.process_commands(commands)
assert cli_b._registered
... | 0 |
56978417147914526dfc176ed7677ed5 | a5d19d17c82e1d1ac739f6a362d0fe46 | Increments the rounds played counter. | void HumanPlayer::incrementRoundsPlayed()
{
roundsPlayed++;
} | 1 |
25f9b2f371bfd71a714bcbe0da9dc00a | b1d3fed0caf1165fd25e8921fec5a0e9 | Get active fleets. | public class EnemyManager
public Array<Falconer> getActiveFalconers()
{
return currentFalconers;
} | 0 |
82bf4501a05a42315034f2e6f3af5bbe | aa9553ab101aad45cd59b81506f86b1a | Concatenate host and port for IPv4 and IPv6. | class Conf
def hostname_port
"#{server_name}:#{server_port}"
end | 0 |
9a34a5639e41254dc9c5a23b25475181 | e33ac0b89acd0de8ab330995bb68e760 | Call this with a message like a server_info response. Will
affect fee calculations. | class ChatReporter(dexbot.report.BaseReporter, logging.Handler):
def cmd_reset(self):
if self.worker.disabled:
return "sorry I'm disabled (use 'kick')"
if "price" not in self.worker:
return "But I haven't got a base price set! (use 'price'}"
self.worker_inf.do_next_tick(l... | 0 |
3c5840c31ce2b8197780b6bc424cf935 | cbeb3fb10938a653eab88d125a3c191f | ○ ズームアウト | public class RastBossController : MonoBehaviour
void OmegaBeam()
{
if (AttackFlag)
{
isDashEffect = false;
himeSkill = new HimeSkill(this.transform.position, this.transform.rotation, this.gameObject);
himeSkill.OmegaLaser();
this.transform.rotation = Q... | 0 |
42d7dbf05b304138175c99239283f539 | 042b8a93c50c907710e2733a3f92b728 | Devuelve la suma de todos los bienes activos que se encuentren en el inventario especificado | public class ZafCom21 extends javax.swing.JInternalFrame
private double getStkBod(int intCodEmp, int intCodBod, int intCodItm)
{
double dblRes=0;
try
{
con=DriverManager.getConnection(objParSis.getStringConexion(), objParSis.getUsuarioBaseDatos(), objParSis.getClaveBaseDatos());
... | 0 |
b06ed3907fdd250f1b3f1fcc2810469b | b53a4a63f1075a52d691fc113224dff9 | Given the wavelength in air, compute the wavelength in vacuum
https://physics.nist.gov/PhysRefData/ASD/Html/lineshelp.html#AIR | def vac2air(wl_vac, copy=True):
if copy:
wl_air = np.copy(wl_vac)
else:
wl_air = wl_vac
ii = wl_vac > 20_000 * units.AA
sigma2 = (1e4 / wl_air[ii].to_value(units.AA)) ** 2
fact = (
1e0
+ 8.34254e-5
+ 2.406147e-2 / (130e0 - sigma2)
+ 1.5998e-4 / (38.9e0... | 0 |
42d7c0da6be1ff455d9aaaa88d4800ee | b3ec2f3ad8eaf2d87e4243aecc122c87 | Indicate to the {@link FASTElementRenderer} that an attribute has been changed. | attributeNames: string | string[],
oldValue: any,
newValue: any,
namespace: string | null
) {
} | 1 |
24d5606d68c1f83f51f1f5f9bfb8acff | 8d56e768b6f304c278e544eb38afe031 | Parse destination register operand.
<register_dst> ::= <register_file_bracket_index> `]' | parse_register_dst(
struct translate_ctx *ctx,
uint *file,
int *index )
{
if (!parse_register_file_bracket_index( ctx, file, index ))
return FALSE;
eat_opt_white( &ctx->cur );
if (*ctx->cur != ']') {
report_error( ctx, "Expected `]'" );
return FALSE;
}
ctx->cur++;
return TRU... | 1 |
1e0bcfdb32ef016412a43e0b6eea2e69 | 6cdda3c7224f5756977d8d7882df97d3 | uses names of rooms to determine interconnections | char *startRoom = malloc(sizeof(char) * 50);
int i, z;
int roomIndx = 0;
int connArr[7];
for (i = 0; i < 7; i++) {
connArr[i] = gameRooms[i]->numConns;
}
for ( i = 0; i < 7; i++) {
for (z = 0; z < connArr[i]; z++) {
strcpy(startRoom, gameRooms[i]->conn[z]);
while(strcmp(startRoom, gameRooms[roomInd... | 1 |
602b19fdb8577ae438712f14f360bd5f | ee93762d467e48ac19fdfd42835e2793 | returns the time this party was created in millis | public Long getTimeCreated(); | 1 |
20221ef3b87f983a688b51dddf50a1ce | 26e6f5458f8641b46aadae91b41a1e6a | 显示柱状图或线形图 | this.type = type;
baseChartManager.destroyRequest();
this.type = type;
if (type == MINUTETYPE) {
baseChartManager = minuteManager;
minuteManager.setVisible(View.VISIBLE);
kLineManager.setVisible(View.GONE);
if (gpInfo != null && status == 2... | 0 |
703a0b54998b31dee31038c185d860f9 | 84c99a5533970a94ef566d320022e9bd | Returns all users in the database which haven't been deleted, i.e. are active | class User extends \Model
public function getAll() {
return $this->find("deleted_date IS NULL AND role != 'group'", array("order" => "name ASC"));
} | 1 |
cd363a5fb01361a1c3bffba3ce34f788 | 5d11e3a0e2b772278855b4c250b916bd | Test for trying to delete user without loging in | url = reverse('user_delete')
data = {
}
self.client.force_authenticate(user=self.test_user_obj)
response = self.client.delete(url, data)
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) | 0 |
ed6a540b60dbaaaf0923b915c7db43ff | 9e58bb785685fabee09bd0929b4a551e | For loops with different increments. | for (i in 1..100) {
print("$i ")
}
println()
for (i in 1 until 100) {
print("$i ")
}
println()
for (x in 2..10 step 2) {
print("$x ")
}
println()
for (x in 10 downTo 1) {
print("$x ")
}
println()
if (y in 1..10) {
println("$y ... | 1 |
453b06c632934a7341d2bca69e9624f6 | d86a9a6951399e8583db0731ff4ec115 | A one-dimensional bottleneck block. | self,
in_channels,
out_channels,
bottleneck_channels,
stride=1,
dilation=1,
norm=nn.BatchNorm2d
):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.stride = 1
self.conv1 = Conv2dWit... | 0 |
d66aef1d83e479081304aaa6f1443b79 | 45294df8aef124b6de71c69e5b557e86 | verify account number with valid checksum | def verify_account_number(value):
try:
return value == make_account_number(value[:-1])
except:
return False | 1 |
573aee90bb4868901e8fcce52b06f2f4 | 37e082a52dade8b2c6e2b119f60b36f4 | 警报注册管理页面 | {
$adname = Config::get("safety.adname");
$upset = Db::name('system_upset')->where('id',1)->find();
$this -> view -> assign(['porch'=>$adname,'upset'=>$upset]);
return $this -> view -> fetch('safety');
} | 0 |
f07bf110b5024d6a55962c3816a54eff | 4c00714b3f91283166d937b648a5ef5e | Make date format (for use in nav bar) properly translatable | return new Intl.DateTimeFormat('en', {year: 'numeric', month: "numeric", day: "numeric"})
.format(d)
} | 1 |
1c785542abd92c3409e95848e93720a1 | 4cca8b75b3548935ca303d3058f067af | Check that getifaddrs sees the same list of interfaces as /sys/class/net. | {
struct ifaddrs addrs = {
NULL,
"if0c1ip6", IFF_UP | IFF_BROADCAST | IFF_MULTICAST,
(struct sockaddr*)&ipv6_global, (struct sockaddr*)&ipv6_FF, NULL, NULL
};
will_return(__wrap_getifaddrs, &addrs);
will_return(__wrap_getifaddrs, 0);
iface_init(NULL);
check_one_iface_one_global_ipv6(addrs.ifa_name);
} | 0 |
3a78a2cf9d3d1f4b2a05eb6aec1f9f4d | 70c88acab0e3df889f27ecf3842330ac | This function creates and sends an error message regarding a line of
sequence data that was expected to be a different length. | {
Console.Out.WriteLine("Sequence Number Error: Expected Seq Nr: {0}, Received Seq Nr: {1}", expected, received);
} | 0 |
a8a20c1744a104f9c336660b10d7f5c3 | 0a1a5da1a3a3a4564d3e06a056ee80fb | Retrieve the Dsc node report data by node id and report id. (see
http://aka.ms/azureautomationsdk/dscnodereportoperations for more
information) | public class NodeReportsInner
public ServiceFuture<Object> getContentAsync(String resourceGroupName, String automationAccountName, String nodeId, String reportId, final ServiceCallback<Object> serviceCallback) {
return ServiceFuture.fromResponse(getContentWithServiceResponseAsync(resourceGroupName, automationAc... | 1 |
a325f1898a1b0268c27d4da954ad12c6 | d18684924bce4bc2ff378f1006a236d4 | @brief 串口阻塞写入数据 | {
int len = 0;
forever
{
int n = m_serialPort->write(&data[len],size-len);
if(n==-1)
{
return -1;
}
else
{
len += n;
if(size==len) break;
}
} | 1 |
984bc0f3dfae8bc6e40905ee7f57c242 | a91e120738745536798c968d7da34ca5 | Obtención de la edad por conversion de mili segundos a años | class Usuario extends CI_Model
function obtenerEdad($fechanacimiento)
{
if($fechanacimiento>"")
{
$intervalo = date_diff(date_create(),
date_create_from_format('Y-m-d',$fechanacimiento));
return $intervalo->y;
}
return 0;
} | 0 |
cde36bfb208ae147e9eb58fb5f728488 | 80d4ef301dbad0fdeca950b2a5a3a0e1 | Prints usage of the implemented ls command | void ls_help ()
{
printf ("Usage: ls [options] [paths...]\r\n");
printf ("Display drive contents.\r\n");
printf ("Paths may contain wildcard and/or drive letter, e.g., ");
printf ("\"C:\", \"*.txt\", \r\n\"o:*.com\". ");
printf ("Paths and options are case-insensitive. Filenames are sorted\r\n");
printf (... | 1 |
975865a7e8744ddd1384b902cc7c4752 | 4764371cb0ba5fcb8c69823a42af6297 | Fonction de retraitement des informations situées dans le fichier.
Elle permet de modifier le format de la date, de remplacer les "," en "."
pour permettre de le mettre dans le format attendu pour effectuer des
opérations. | text = open(ORIGINAL_FILE, "r")
text = ''.join([i for i in text]) \
.replace(",", ".") \
.replace('; ',';')
x = open(FILE_PATH,"w")
x.writelines(text)
x.close() | 1 |
1701baccc1cf6ef32b862aaf8368cce2 | fa13ce82763d3ad8e0b701575967e682 | New constructs a Config based on a given Environment | func New(opts ...Option) (*Envcfg, error) {
var err error
ec := &Envcfg{
envVarName: DefaultVarName,
configFile: DefaultConfigFile,
envKey: DefaultEnvKey,
hostKey: DefaultHostKey,
portKey: DefaultPortKey,
certPathKey: DefaultCertPathKey,
certProviderKey: DefaultCer... | 1 |
61d4438243aaa7c653d4346fa243cea9 | 8a90d6d6c5904ca457228ceb4661bdbb | Returns all blacklisted URLs | with open(config.BLACKLIST, 'rb') as csvfile:
bl_reader = csv.reader(csvfile)
return [row[0] for row in bl_reader] | 1 |
63692fe223a601dae05959f4b3197ad1 | eed120561b9f2c2c2a4021e2557d90a7 | Creates a new Elysium transaction builder to extend a transaction. | func NewTransactionBuilder() *TransactionBuilder {
return &TransactionBuilder{}
} | 1 |
6f57adee58a1aa32ad773cc2b9653d51 | fca204d8579340c79ac679283408910e | Формируем список школьников | auto *students = new HANDLE[studentsCount];
DWORD t;
for (short i = 0; i < studentsCount; i++) {
t = i + 1;
students[i] = CreateThread(NULL, 0, Student, (PVOID) t, NULL, &threadId);
Sleep(rand() % 700 + 300);
}
return students;
} | 0 |
c8a416fa809d2b5631fb65c562eedad5 | b062bceee9af0c12c2da3c8d063283a5 | Получаем последнюю дату, за которую есть курс | if period_rows[LC.SCHEDULE_PAYMENT]:
last_date_payment_sub_period = period_rows[LC.SCHEDULE_PAYMENT][-1].Get('Дата')
if last_date_payment_sub_period <= date_begin:
last_date_payment_sub_period = None
else:
last_date_payment_sub_period = None
re... | 0 |
1209564f4d6e964cd8bf967bc8a21c7f | 257764bebb97288262866da5cd2a58c4 | gets a field list that has the given annotation. | {
ClassObject* clazz = field->clazz;
DexFile* pDexFile = clazz->pDvmDex->pDexFile;
const DexAnnotationsDirectoryItem* pAnnoDir;
const DexFieldAnnotationsItem* pFieldList;
pAnnoDir = getAnnoDirectory(pDexFile, clazz);
if (pAnnoDir == NULL)
return NULL;
pFieldList = dexGetFieldAnnotati... | 0 |
d489ff599b41f9418da093acd6e9f6aa | 453ae1d29933d5fbb1b7f92b81bdbf26 | Get next student for interview | if self.owner:
try:
return NewStudentPage.objects.filter(live=True, owner=self.owner)[0]
except IndexError:
return None | 0 |
d9c71b613d2db3ff2463b2029d7ae41e | d1ac2d980732f7f59ddc623188483806 | add new value to snapshot
if date is not specified, current timestamp is used | export default class TmsSnapshot<S = {}>
push (snapshot: Snapshot): this {
this.snapshots.push(snapshot);
return this;
} | 0 |
872dd6ea3c9ea72f3c3ae5805c7aa63a | 7333e552a3b1e02a9efe881b8a24d475 | Gets a shared, reusable cell style for "pure date" cells (eg. no other
styling applied) | public class ExcelConnectorParams extends FileConnectorParams
public CellStyle getDateCellStyle()
{
return _dateCellStyle;
} | 1 |
e3843ce086b9d5533fb20ac3047570ea | 4c29d2b9653f7082768bf47a65200ecd | Changes the single value or lower limit (DD07V-DOMVALUE_L). | {
DrawArea Area = (DrawArea)sender;
DynEventArgs dynArgs = (DynEventArgs)e;
DrawText CVEULO = (DrawText)dynArgs.sender;
DrawArea L = (DrawArea)Area.GetDrawObj("TDC3000_faceplate_LIMITS");
Area.Variable[2] = "3";
L.Variable[0] = Area.Variable[0];
L.Variable[1] = "CVEULO";
Area.Variable... | 0 |
a542f51174828cc5055d36648fdf5d05 | dc2f65fecca3b5f70a8440e41b11c30e | Goes to the specified frame and starts playing forward. | {
if (params && params.start)
return this.transport.Seek(params.start);
return this.transport.Play();
} | 1 |
c388653f1c9e6c351e478d36d308240a | a984295b15e8c138c71d2776d8d73dcb | 计算数组nums中的每一个元素的下一个更大元素 | def nextGreaterElement(array):
result = [-1] * len(array)
stack = [0]
for i in range(1, 2 * len(array)):
circle_i = i % len(array)
while len(stack) > 0:
if circle_i == stack[-1]:
return result
if array[circle_i] > array[stack[-1]]:
resu... | 1 |
510e7b84533143022dc4778959f325a1 | 0aed6cf40227decab6f808c460c397a8 | 查找平台默认的企业信息 | $.ajax({
type: "get",
url: "/cloudlink-core-framework/user/getDefaultEnterpriseId?token=" + token + "&appCode=" + appCode,
contentType: "application/json",
dataType: "json",
success: function(data) {
var success = data.success;
if (success == 1) {
... | 1 |
eb9315f09f771a1646fe510ae93a41d0 | 3511da6ee9a6ce8c04c1c3c480112804 | Hàm tìm kiếm theo Khối | {
OleDbConnection link = null;
List<KHACHHANG> dsKH = new List<KHACHHANG>();
try
{
link = KetNoi();
string chuoiLenh = "Select MaKH, HoTen, MaLoaiKH, DiaChi, SoGiayTo from KHACHHANG where SoGiayTo like" + "'%" + SoGiayTo + "'"
... | 0 |
8057ff9de4cf03ed7730b3ec0f7d093b | 6869fccc6ef4b74e1f7b2f82d4bb33b8 | This data source provides the Arms Dispatch Rules of the current Alibaba Cloud user.
> **NOTE:** Available in v1.136.0+.
## Example Usage
Basic Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.ArmsFunctions;
i... | name: Optional[str] = None,
tier: Optional[str] = None):
if name is not None:
pulumi.set(__self__, "name", name)
if tier is not None:
pulumi.set(__self__, "tier", tier) | 0 |
d0fb78776d2a23cff3b55a0f25ee2fa4 | e99fccbb1a8e541fcf27d18aa368e253 | Gets the value indicating whether the target element can be closed from UI. | namespace MahApps.Metro.Controls
public static class ValidationHelper
[Category(AppName.MahApps)]
[AttachedPropertyBrowsableForType(typeof(UIElement))]
public static bool GetCloseOnMouseLeftButtonDown(UIElement element)
{
return (bool)element.GetValue(CloseOnMouseLeftButtonDownPr... | 1 |
4d99bd1c1680d6788b311bf38377dcc6 | 4648aab02ae15ca8f5ffbd0d87b10666 | ***************************************************************
event handling method for the "Registered For:" ListBox | {
try
{
if (Convert.ToInt32(this.AccountNameComboBox.SelectedValue) != 0)
{
this.RegisterId = Convert.ToInt32(this.AccountNameComboBox.SelectedValue);
}
else
{
this.Reg... | 0 |
ea56c1cde77ec5d4a0838bcfb76b9f50 | 1c9aea35ee24095c01aa2952516444af | Load saved data for current state machine. The operation can only be done when state machine
status is {@link StateMachineStatus#INITIALIZED} or {@link StateMachineStatus#TERMINATED}. | throws IOException, ParserConfigurationException, SAXException {
if (!persistedState.exists()) {
return;
}
loadFromDocument(XmlUtils.parseUtfXmlFile(persistedState, false));
} | 0 |
d06aae72d26f887268070c0cf34cdfe1 | 545f7a3c76bc54436816effffcb4a963 | 检查是否含有手机号,有就隐藏手机号码中间5位 | public class CheckUtils
public static boolean isMobileIsHide(String mobile){
Pattern pattern = Pattern.compile("^\\d+$");
return pattern.matcher(mobile).matches();
} | 0 |
7f6e588a3227906531a803bb498c85f2 | 32e59bc479438121b6074446f15939bc | Error Message
Provides field to allow administrators to set the error message a user sees
once their access has expired. | class ITSEC_Lockout
public function set_lockout_error() {
global $itsec_globals;
if ( isset( $_GET['itsec'] ) && $_GET['itsec'] == true ) {
return '<div id="login_error">' . $itsec_globals['settings']['user_lockout_message'] . '</div>' . PHP_EOL;
}
} | 1 |
405da510c7c447e9bc3742ba8a665113 | 0aeae2252deeba25a8ffaea900fe914b | Returns the value of the '<em><b>Event Definition</b></em>' containment reference list.
The list contents are of type {@link org.eclipse.mdt.bpmn.EventDefinition}.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Event Definition</em>' containment reference list isn't clear,
there really should be more of a descr... | EReference getEventDefinition_Parameters(); | 0 |
b0faa0eec0f6d62adcd0238c8549c3a8 | aa03b134b2dd11064b7b792c637fa698 | The defender was hit, so remove one of the defenderLivesRectangles to indicate to the player that he
is down one life. | auto firstBossLifeRenderer = (RectangleRenderer*)GetOwner()->
GetComponent("RectangleRenderer");
int actualLife = firstBossLifeRenderer->GetWidth();
if (hit and actualLife > lifeComparer) {
cout << "hit" << endl;
cout << actualLife << endl;
firstBoss... | 0 |
2cf7c023978b9951ced91db64f34fb14 | 2e24e40c162305aff76fdfd6cee8fd15 | Gets held value, is a pointer so do not modify
Returns: pointer to held value | class DataIn(object):
def __get_value(self):
return self.__value | 0 |
b252e31cb21c9ea0d7437e2f70cacffc | 5347fc7adbfd4bb76eb7090cbdfc3a99 | Save the context of this chain run to memory. | class ContextCallbackHandler(BaseCallbackHandler):
def on_chain_start(
self, serialized: Dict[str, Any], inputs: Dict[str, Any], **kwargs: Any
) -> None:
self.chain_run_id = kwargs.get("run_id", None) | 0 |
d3ff5e2285b292285e5fb8cf5a01dd7a | 0d05fcb8e3895a13bf006a237dca6f33 | OPPGAVE A1 - Finner MINSTE verdi i et binært (IKKE nødvendigvis SØKE)tre. | namespace Kontrolstrukturer
public partial class Form1 : Form
private int GetSmallestValue()
{
int smallest = 12;
if (no1 < smallest)
smallest = no1;
if (no2 < smallest)
smallest = no2;
if (no3 < smallest)
smallest = no3;
if (no4 < smallest)
smallest... | 0 |
ef05d68923ad8c8683c82a8c19d9c31f | d7d7f07f3db98bbd7319ab65a0c6bcd8 | returns sum of inputs(UTXOs) | public class Transaction
public float getOutputsValue() {
float total = 0;
for(TransactionOutputs o : outputs) {
total += o.value;
}
return total;
} | 0 |
08b143f1df04de159d0298465ab2b491 | 1decbec27844b87cf08734f5c11ad590 | Given a list of labels, reindex them as integers from 1 to n_labels
Labels are in nonincreasing order of prevalence | label_to_index, index_to_label = search_all_labels()
index_labels = [label_to_index[string_label] for string_label in string_labels]
return index_labels | 0 |
8bf214ef7ab27d017ead151180eb24d7 | d37d66d9ab11ad22a86582cc9a87580e | u"""Reset any checkout session state | class CheckoutSessionData(object):
def flush(self):
self.request.session[self.SESSION_KEY] = {} | 1 |
122022d594fae8015a2977647ec4804c | 8044713b7f526ec56abbb3de845c6dab | byte値からbool値に変換 | namespace Moons.Common20
public static class ByteUtils
public static bool ToBoolean( byte value )
{
return value != False;
} | 1 |
d26b33603f1557d20eeff4d7889da9cc | ed0900af8f7e35eb21db72a1d10544d9 | Get Rate3 value | public class X_I_ProductPriceRate extends PO implements I_I_ProductPriceRate, I_Persistent
public int getM_Product_3_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_3_ID);
if (ii == null)
return 0;
return ii.intValue();
} | 0 |
0b6fa9dbf3755626a2bba14f90c7dd54 | 22bffd02c911d1b1acbb61f588f0f87a | Gets the ID of the category and the ID of the sub-category | if ($id_category > 0)
{
$sql = "SELECT nleft, nright FROM ps_category WHERE id_category = {$id_category}";
$db = new MySQL();
$result = $db->QuerySingleRow($sql);
if ($db->RowCount() > 0)
{
return $result;
}
else
{
return 0;
}
}
} | 0 |
6e45c455528d9a82eb37097d7d1d4848 | e99d1d6191bb4a337b5f8bfa94df41fd | Getter for IntegrationId. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AssetMgmt-Asset-HeaderQuery", propOrder = {
"id",
"created",
"accountLocation",
"accountName",
"adjustedListPrice",
"assetCurrencyCode",
"assetDescription",
"assetNumber",
"billingAccount",
"billingAccountId",
"comments",... | 1 |
43781bbc44672e16eeaed0ab70d92fb4 | b2dde896ea804eccd14e4e474cf27902 | \fn tAST_Node *DoCodeBlock()
\brief Parses a code block, or a single statement | {
if(t.IsSymbol('{'))
{
t.Next();
ParseBlock* block2 = BlockPool.Get();
block2->function = block->function;
block2->parent = block;
block2->max_vars = block->max_vars;
block2->used_vars = block->used_vars;
block->blocks.push_back(block2);
Node* result = parse_block(block2, '}');
t.AssertSymbol('}');... | 1 |
4a57f2b3996b211640a02589be01954c | 492450673405d65cc8da840bfa0c634b | Download image by provided $id | $query = MainPage::select('filename')->where('id', $id)->first();
if (is_object($query)) {
$path = storage_path('files/'.$this->img_src.$query->filename);
if (file_exists($path)) {
return Image::make($path)->response();
}
}
return respo... | 1 |
931a5c53361bc8df1cb2c8a92fe7ff60 | 2bf3da1c3185a9df529b0dd9e7823d4d | corutina para esperar un poco antes de iniciar la animacion de llenar la barra de experiencia | public class AddNewsScreen : MonoBehaviour
public void AddAlchaExpRP()
{
StartCoroutine(AddAlchaExpRoutine());
} | 0 |
58742ccc701599c66d0ae9d520e76636 | f4ae3081aa935d1119bbf0fdf12e5a1b | provides the minimum logSize to safely represent a distribution | def MaxSizeInDistribution(dist):
return max(six.iterkeys(dist)) | 0 |
fde6f9a720dc209c234a45c54252cf47 | b10ba7929df21267ef8ddc3a468a0ae3 | Push back a single character to the stream | {
int rc = so_fwrite(&c, sizeof(unsigned char), 1, stream);
stream->error = 0;
if (rc < 1) {
stream->error = EIO;
return SO_EOF;
}
return c;
} | 0 |
d47f0861b5811da373fceb0581a46e19 | 795d93d514e15aac2ea49a0c3d8b6693 | 获取任意时间上一天的时间 | def get_previous_date(date):
one_day = datetime.timedelta(days=1)
predate=(date - one_day).strftime('%Y-%m-%d')
return predate | 1 |
34026506c48431d036ebea1367ece3ad | 9d667d441703a43c1652e9ef7a50a8c3 | 把 message body 写到 buf | class chat_session :
public std::enable_shared_from_this<chat_session>{
bool fill_protobuf(::google::protobuf::Message *msg) {
string str(read_msg_.body(),
read_msg_.body() + read_msg_.body_length());
return msg->ParseFromString(str);
} | 0 |
d53a4a23e4790c672f10b0ba101ecfd1 | 3b2bfc9cb7fad8ade92144b929ce9f2f | Returns a safe clone of tokenToEndPointMap_. | final int count = m_count;
ArrayMap clone = new ArrayMap(count);
for (int i = 0; i < count; ++i) {
Object key = m_keys[i];
Object keyClone;
if (key instanceof String) {
keyClone = key;
} else {
keyClone = deepCloneOb... | 1 |
401ec98cb297447656f775e50791d7cb | 31bbb15411f41e53c7e4010a9de47b79 | Цена для физического лица | {
if (!empty($this->age) || !empty($this->open) || !empty($this->period) || !empty($this->power) || !empty($this->territory)) {
$k_age = Age::findOne($this->age)->coefficient;
$k_open = Open::findOne($this->open)->coefficient;
$k_period = Period::findOne($this->period)->c... | 0 |
69d7b613d5e32e4ecb1e8fdbd62ac0ba | 503100bb32501ce4a68bc6230f392991 | Método para guardar la información de los locales | namespace Partyme
public partial class MainPage : PhoneApplicationPage
public async void localespincho(double latitude, double longitude)
{
Uri url = new Uri("url");
objetoslistas.getgeograficplacesinput paquete = new objetoslistas.getgeograficplacesinput();
paquete.latit... | 0 |
9f3911c2780ade69cf150ea23b697dc4 | 5f17b902d1cb979c45a15bd192e61693 | Populate table with customer data | custInfoTableView.setItems(DataHandler.readCustomers());
custIdColumn.setCellValueFactory(new PropertyValueFactory<>("id"));
custNameColumn.setCellValueFactory(new PropertyValueFactory<>("name"));
addressColumn.setCellValueFactory(new PropertyValueFactory<>("address"));
postalCod... | 1 |
83f45a0f1a277b0012224674eee5081d | 3dac0dbdf3476e4eb30d8d6be2a6f9fb | Returns the view state for a given editor. | @FRImageViewerState
int getViewState(); | 1 |
91f3bebdc27ae060b4c9f22b9c45d0ed | 7f61448ad6da3ef0f9cb03f40c5be655 | No copying/moving | cases like (1) | 0 |
081342186ab8134268661a15a8cef8ff | 8aefeb7f5c0ad539a80d82039ae48b1e | Generate tuple from data for updates/insertions | def generate_insert_sql(tablename, dict_data):
sql = ' INSERT INTO ' + tablename + " "
keys = dict_data.keys()
sql += '('
for i in keys:
sql += '`'+i+'`' + ','
sql = sql.rstrip(',')
sql += ') '
sql += " VALUES "
args = []
sql += '('
for i in keys:
args.append(dict... | 1 |
5abbc8bcbd4af64853b6f34b0a1d5350 | ad4cc4a94ba3668ee2791ff5cab17eeb | Setter method for isbn field.<br/> | function setIsbn($isbn); | 1 |
e4a6704e1d5619fa25f2e5f435044dc4 | df264ebfb3332943be39c6299388827b | Test blueprint with dynamically added testing endpoints. | app.config['RECORDS_REST_ENDPOINTS'] = OPENAIRE_REST_ENDPOINTS
app.config['RECORDS_REST_DEFAULT_READ_PERMISSION_FACTORY'] = None
InvenioRecordsREST(app)
if 'invenio_records_rest.frdoi_item' not in app.url_map._rules_by_endpoint:
app.register_blueprint(create_blueprint(OPENAIRE_REST_ENDPOINTS))
... | 1 |
d93d7b77139dc2c91868458fbdbbe4d7 | 5f744b364a2c6b8db67a33b6e0cda0d5 | Asigna una categoria a la pelicula, si la categoria ingresada es incorrecta retornara nulo | FilmList setCategory(String category); | 0 |
2e052dd9fb7ed47f67dc4a1966577ba6 | ffc12b8d3a36a08a68a64d4274e34289 | ROI设置相关 | void L_SingleLM_SpecifyROI(short ROI_Mode, LaneInfo *Lane, ITS *iTS)
{
double dBU = 0;
double P = 0;
switch(ROI_Mode)
{
case SL_SCH_DEFAULT_ROI:
P = iTS->F_W_C+ LaneModel(iTS->SL_LaneModel.Vrow, iTS->SL_LaneModel.K, iTS->SL_LaneModel.M, iTS->SL_LaneModel.LaneM.B_i);
dBU = iTS->SL_LaneModel.Vro... | 1 |
d6cd4f418ec0d23a1cd1740a816433e4 | c743de0bbf8b139f777c90240cb84e6a | 由checkbox的选中结果来决定当前条目是否开启 | void CheckBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QStyleOptionViewItem viewOption(option);
initStyleOption(&viewOption, index);
if (option.state.testFlag(QStyle::State_HasFocus))
viewOption.state = viewOption.state ^ QStyle::State_HasFocus;
QStyl... | 1 |
30563aac912a9f5ae054c197dd560409 | 7b9d59bcc0c0268984ece7e4cf1051f3 | 根据命令行参数选择配置 | def configOption():
from optparse import OptionParser
usage = "usage: %prog [-option]"
parser = OptionParser(usage)
parser.add_option("-f", "--file", dest = "option_file",
help = "use this file to set option for the web server")
parser.add_option("-p", "--port", dest = ... | 1 |
200fd6a3f3254bd22d63363b4f1a08cc | 4c77f636638194f5bd4f3ed273661fc3 | Returns true if the user has a master password set and false otherwise. | namespace Amazon.Lightsail.Model
public partial class UpdateRelationalDatabaseRequest : AmazonLightsailRequest
internal bool IsSetMasterUserPassword()
{
return this._masterUserPassword != null;
} | 1 |
2986237e0ea3b2001ce23b22a7957db1 | 75efd985673a32418a70a48f28a3bbdd | Calculate HV rank using calculated historical volatility data
Returns | class VolatilityRankSignal(_PriceBasedRankSignal):
def _calculate_signal(self, eligibility_df: pd.DataFrame):
volatility_df = realized_volatility(self._underlying_price_df, *self.vol_lag)
volatility_df = select_rows_from_dataframe_based_on_sub_calendar(volatility_df,
... | 1 |
a16db452170f0c62434b9cc8cabeffcb | 5e56e010eb0106efded3060e659d5694 | Only add to the plot object if it isn't already in it | def add_plotted_files(name, filepath, echo_dart):
global plotted_files
if echo_dart:
echo_dart_tag(name, filepath)
found = False
for p in plotted_files:
if p[0] == name and p[1] == filepath:
found = True
break
if found is False:
plotted_files.append([ ... | 1 |
a35cde5713a08c9ab31718e0e2e38dad | 0f03482f51d038875a1773337915c819 | Dynamically calculate the required height of the caption area | int CBCGPopupWindow::GetCaptionHeight ()
{
if (m_bSmallCaption)
{
return nSmallCaptionHeight;
}
else
{
CSize sizeBtn = CMenuImages::Size() + CSize (6, 6);
return max (::GetSystemMetrics (SM_CYSMCAPTION), sizeBtn.cy + 2);
}
} | 1 |
9cd23d2b504ad6229c42efda82771615 | 8a6cff4c655274dfd6d26af831027cd5 | Decorator for Button callback function | class ICallbackFunction():
def __init__(self, fun):
self.fun = fun | 0 |
dd364b5709bf0a45fbc10fa3192c9d7a | 182866811e146e6f7cae40c8cda88056 | Mock a real file, without parsing it (allowing other languages, binary, etc) | class ChunkyPNG::Image
def as_fake_file(filename="#{SecureRandom.hex}.png")
thing = StringIO.new(to_blob)
thing.class.class_eval { attr_accessor :original_filename, :content_type }
thing.original_filename = filename
thing.content_type = "image/png"
thing
end | 1 |
700676c5f209db6cb055cdd3a4f65737 | 191795dcbfce8c5f588ca2c852e33fd8 | 删除目录以及子目录中的所有文件 | public class FileHelper
public static void deleteDir(File dir) throws Exception {
if (dir != null && dir.exists()) {
String[] children = dir.list();
if (children != null) {
if (children.length > 0) {
for (int i = 0; i < children.length; i++) {
... | 1 |
0b7002216d6227e01e6aa0c8d58821d6 | 8176a23cee296e47843ac88fa032210c | fungsi untuk menentukan angka terkecil pada array | function timMin($arr){
$min = $arr[0];
for ($i=0; $i < count($arr); $i++) {
if($arr[$i] < $min) $min = $arr[$i];
}
return $min;
} | 1 |
20d95b682f111e38d2964ecc439e1f79 | 4fa7ba0e904966929db0994f077d9c0c | Add the object to the world upon creation | void GWorld::addObject(GObject *o) {
o->addForce("gravity", 0, _gravity);
_objects.push(o);
} | 1 |
491c60aa78ede79c229a87f598d4b2c0 | 752c22e3a7f423bc63a6b428ec42f9e7 | check if a is greater than or equal to b | class Semantic(Transformer):
#! Constructor
def greaterequal(self,valueA,valueB):
valueA,typeA = self.parseToken(valueA)
valueB,typeB = self.parseToken(valueB)
if ((typeA == "float") and (typeB == "float")):
if valueA >= valueB:
return "true"
else:
... | 1 |
a0e8bce45ec174453d1f0454608bbda1 | ddd6949453ae0525a82ae80fd99c39fa | Gets optimization level, set for specific project type. | namespace org.mozilla.javascript public class Context
public int getOptimizationLevel()
{
return optimizationLevel;
} | 1 |
c7b45b7ba480285f36b491994e41bfff | e55a1375d1f146b81a216fc8036672e3 | Get if the window is currently active on the host OS | namespace PaladinsCollectDemGems.tools.native
public static partial class WinWindowInterop
public static bool IsActiveWindow(IntPtr windowHandle) {
return GetForegroundWindow() == windowHandle;
} | 1 |
301a0aa46e617e0aae56d9f5047fa9ba | f1c55e99347dd0a3af50430e53cfe574 | Получение рандомного тайла (кроме пустого) из списка тайлов | function getRandomActive(){
return activeTiles[getRandomNormal(activeTiles.length)];
} | 1 |
86e3657a2374bf4f2f740a5230222be7 | e56c403d06289d3b7323aa87d1ad077d | Converte una valutazione in un dtoValutazione | AvaliacaoResenha avaliacaoResenha = new AvaliacaoResenha();
avaliacaoResenha.setId(avaliacaoResenhaDto.getId());
avaliacaoResenha.setPositiva(avaliacaoResenhaDto.isPositiva());
avaliacaoResenha.setResenha(resenhaService.findEntityById(avaliacaoResenhaDto.getIdResenha()));
avaliac... | 0 |
0a0d32411b5d1dbc4d8f6034402480dd | 70910a216221a65e98547c137daadccf | 初始化消息本地化工具,当前容器中没有时从父容器中获取 | public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.setFallbackToSystemLocale(false);
messageSource.setUseCodeAsDefaultMessage(true);
messageSource.setDefaultEncoding("UTF-8");
... | 0 |
c3234c58d1ee93544352480e73fcbf6e | 7f61448ad6da3ef0f9cb03f40c5be655 | Predefined types/paths | cases like (1) | 0 |
d9ec2673048cf66355bac36c99ccd765 | f66a7ceda79f0af7569e027213cd080d | Create an empty application definition object. | self._AppID = ""
self._Fields = []
self._Options = []
self._SpecialWhere = ""
self._TableName = ""
self._Type = ""
self._Title = ""
self._SignalType = None | 1 |
6a98404284dc3691a326f5a9eb19832d | 30486d17f77dee6674749c984fb13ca9 | Creates garbled circuit of an XOR gate. | void build_and_circuit(garble_circuit *gc)
{
int n = 2;
int m = 1;
int inputs[n];
int outputs[m];
countToN(inputs, n);
garble_context ctxt;
garble_new(gc, n, m, garble_type);
builder_start_building(gc, &ctxt);
outputs[0] = builder_next_wire(&ctxt);
gate_AND(gc, &ctxt, inputs[0],... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.