query_id
string
corpus_id
string
query
string
code
string
label
int64
4639f5377e1d61d0d490fc579bd3ae3c
2d2eac2ff26afd26d687700fcec7d8f5
將 PDF 加上 浮水印
public class PdfUtil public static void waterMark(InputStream inputStream, OutputStream outputStream, String text ) { try { PdfReader reader = new PdfReader(inputStream); Field f = PdfReader.class.getDeclaredField("ownerPasswordUsed"); f.setAccessible(true); ...
1
fd75e80263cdd780ad5028bfe619ccea
0002219fa1b436ba039b97654f13863b
二分法确定轮盘位置
public class Calculate private static int rouletteWheelIndex(Population pop) { int sum = getSumofPop(pop); Random random = new Random(); int randaf = random.nextInt((sum - 0) + 1) + 0; int partialSum = 0; for (int i = pop.popsize - 1; i >= 0; i--) { partialSum += getS...
0
b1f906810b399c7b66064e7a77e530b9
6a9961a71e6d6ebb2521412abb3c537a
Helper function to process the process SACK command.
static inline int ip_nat_sack_adjust(struct sk_buff *skb, struct ip_conntrack *ct, enum ip_conntrack_info ctinfo) { struct iphdr *iph; struct tcphdr *tcph; unsigned char *ptr; int length, dir, sack_adjusted = 0; iph = skb->nh.iph; tcph = (void *)iph + iph->ihl*4; length = (tcph->doff*4)-sizeof(struct tcphd...
1
62b7d5e882dc5d7e5915818f86993856
db0cec15fb37d9a4745a78b67c7506b2
Given its data, display the next launch
link = 'https://ll.thespacedevs.com/2.0.0/launch/upcoming/?format=json&limit=10&offset=10' async with self.session.get(link) as response: info = json.loads(await response.read()) info = info['results'] index = 0 launch_msg = await ctx.send(embed=discord.Embed(title='🚀')) def check(r...
1
1d71b3faabdd2e58a1f36669bd6d063a
5f1ad88851a47b8f7910a5f70c22844f
Called when Beers collide with each other
if other.name == "Boulder" then World.SpawnAsset(GOLEM_GO_BOOM, {position = GOLEM:GetWorldPosition()}) GOLEM:Destroy() end end
0
973a26fea782e6361451d7e7b256d2ba
61e0b9303761319d0043c84ba859d87b
Enqueue the admin scripts.
class Plugin extends AbstractPlugin public function enqueue_scripts() { add_action( 'admin_enqueue_scripts', array( &$this, 'enqueue_admin_scripts' ) ); }
1
8a5da5d85ab5b8528b7ffd8cb3202bb9
0998afcd6f188fdb9ded000389a68895
Test method for {@link Library#checkOutBook(Book)}.
try { Book::checkout(); } catch (BadMethodCallException $exception) { Logging::Log($exception); } catch (BadFunctionCallException $exception) { Logging::Log($exception, false); } catch (Exception $exception) { Logging::Log($exception, false); } }
0
5b1ffef1c1f1b58362fd4e2f5b3985ef
4a4d3584c8baee0eb4d4f23cb59966b6
Lists places safe to eat for the whole team.
namespace NearestNeighbors class Program public static List<List<int>> NearestVegetarianRestaurant(int totalRestaurants, int[,] allLocations, int numRestaurants) { var nearestRest = new List<List<int>>(); var distanceList = new List<List<int>>(); int bound0 = allLocations...
0
fd57b6e992f01e3a80737f70b51b8058
f2126d6415c4053ca08354ca4d9b76c6
Calculates values of the cover by user variables.
{ if (!$this->areRequiredValuesDefined()) { return; } $this->getStitchingWay()->setEditionSize($this->getOriginalNumberOfProducts()); $this->getStitchingWay()->setUserValues( $this->getHeightOfProduct(), $this->getWidthOfProduct(), $thi...
0
4ec5c1b3e7f2c62fb15680a3fe96df1c
651e6bb7592c8d15d833871e1cb97bfc
Returns the document's editor
UserReference getEditor();
1
c1d235dcea359cb8c6bbbea3706624b4
24141099e236396cb8bf4c155cc2bd1f
获取指定路径下的虚拟机UUID列表;
public List<String> getUuidsByFullPath(String fullPath);
1
90a172b9330db130ae8f949f9e999916
b83d284b8904a597c65911aa8f525e25
Function to get the details of creditnote based on the parameters for print
String strcustomerId = request.getParameter("creditCustomer"); Long customerId = Long.parseLong(strcustomerId); System.out.println("in controller customerId : " + customerId); CustomerDetailsHelper helper = new CustomerDetailsHelper(); Map map = helper.getCreditCustomerDetailsForEdit(customerId); Map<String...
0
1d8cf25ae9f59ad2a3e862aa50c4c70f
0a15b402ded89dcca1b6dc846602c25b
Gets a reference to a block blob with the given unique blob name
namespace Microsoft.WindowsAzure.Storage.Pileus public class CapCloudBlobContainerOld public CloudPageBlob GetPageBlobReference(string blobName) { return mainPrimaryContainer.GetPageBlobReference(blobName); }
0
596b1fb51f1663cb81dc5f301c2c6f4d
8150cfb6c9937dae1ef05f8e2b3597dd
Copia superficial.
{ if (origen == null) throw new ArgumentNullException("origen", "Objeto de origen de copia no puede ser null."); if (destino == null) throw new ArgumentNullException("destino", "Objeto de destino de copia no puede ser null."); var tOri = origen...
1
0b1790daa15670c47a09cdd5833692d5
d1a8ce22a59e6638d43aed48b599beef
<para>指定した画面データの最上位にある「画面に直接紐づく画面データ」を取得します。</para>
{ var 画面マスタList = new List<Mst画面マスタ>() { 画面マスタ }; this.SetMenu(画面マスタList); }
0
6ebc539c093f46142df9db29e358a5bb
889cd98fb9653f061f8f9d5c29d7edef
Get planning default close time value
class Event extends Model public function getCloseTimeAttribute($value) { return (new Carbon($value))->format('Y-m-d\TH:i:s'); }
0
2aaefdf2df6fabbad9be289ececb0cbd
3145d471e2e6ab5cad4672c0206fedda
Selects the current menu item calculated by the current url.
export class NavItemComponent implements OnInit setCurrentMenu() { this.targetUrl = this._router.url; this.targetUrl = this.targetUrl.substr(1, this.targetUrl.length); this.setExpand(this.source); }
1
80c613526817a73bc11debb359bd3b4f
097a4bda4f64ad99f716cf5878258ce8
新增或修改日报规则
var _this4 = this; var id = _ref2.id, start = _ref2.start, end = _ref2.end, daysOfWeek = _ref2.daysOfWeek, _ref2$frequency = _ref2.frequency, frequency = _ref2$frequency === undefined ? 5 : _ref2$frequency, _ref2$name = _ref2.name, name = _ref2$name === un...
1
1eabc718e26cd2ad40fd5b68bd465720
1c44d9aa28b3fd1e049610a8992069b8
{@link com.internousdev.leprintemps.dto.CartDTO#getNote()} のためのテスト・メソッド。
public void testGetNote7() { CartDTO test = new CartDTO(); String expected = "abc123あいう123"; test.setNote(expected); String actual = test.getNote(); assertEquals(expected, actual); }
1
c952e9bfc372c21da4ca304c791eddb0
ace1b3ce4a747dd66c6d518d0c620999
得到两点之间的弧度
public class SMGPSUtil static double arcInRadians(Location A, Location B) { double latitudeArc = (A.getLatitude() - B.getLatitude()) * DEG_TO_RAD; double longitudeArc = (A.getLongitude() - B.getLongitude()) * DEG_TO_RAD; double latitudeH = Math.sin(latitudeArc * 0.5); latitudeH *= latitudeH; double lontitudeH...
1
96c2f2e327128d2fc52b499c38315a92
46509a7db7309ea33212ff97a5490ab5
Exit a parse tree produced by the {@code inlineTableDefault2} labeled alternative in {@link sparkParser#relationPrimary}.
public class SparkPlSqlBaseListener implements SparkPlSqlListener @Override public void exitRelation(SparkPlSqlParser.RelationContext ctx) { }
0
c39164ba0ac3caadd460d867f80a23e9
8bb74585ceb352959aeec280ca91a046
Obtiene una lista de las movidas poribles a realizar en un diálogo
$_ret = new MovidaCorregida(); $x_id_usuario = $usuario->nombreUsuario; $conexion = ConnectionManager::ObtenerConexion(); try { $_exito = $conexion->abrirConexion(); if ($_exito) { $_q = new Query($conexion, "correccion_movida"); $_...
0
60fdc02eed385f01f7c42ec5a63946dd
c79555080e608275b6a5a2684a56f84f
痩せます。引数に指定された値だけ体重が減少します。
if (isWeightToLow()) throw new IllegalStateException("Weight to low to sleep"); this.weight -= MINWEIGHT; this.height += 0.1; }
0
9c2c9644a4aa16ed4204ff6fa6175897
50ccbeb5f94cf14b5e73355fadb65dba
A control stick based on touch events.
var _this = _super !== null && _super.apply(this, arguments) || this; _this.touchEvent = (function (evt) { _this.updateState(_this.getPressedButtons(evt.touches)); }).bind(_this); return _this; }
1
1107bb813555f950d25ea979c49ddfcd
1f376a6053fa8498d57f5812f46b4924
Список всех ноутбуков и ПК
{ string strServiceName = string.Empty; string location = System.Reflection.Assembly.GetExecutingAssembly().Location; ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_USBHub"); ManagementObjectCollection collection = mos.Get(); ...
0
50470a414c399dc3aeb8a8608c366c08
28f3ef7f4bf18a887fcb44132dd47851
赤外線信号 の取得
public class EntityTaskInfo extends AbstractEntity public int getSignalLamp() { return signalLamp; }
0
66fa372af1f462d4c972d5e9d452b1f5
c033b3dbec87675e72aa6ef6252b4ff9
Returns available sort orders
{ $service = $this->get('shopware_storefront.custom_sorting_service'); $sortingIds = $this->container->get('config')->get('searchSortings'); $sortingIds = array_filter(explode('|', $sortingIds)); return $service->getList($sortingIds, $this->getContext()); }
1
93b7476cd51adb38dce23015dec53fe0
88ba8cf652d7b4ff11de531a0c02273e
<p>购买云硬盘备份并提交<p>
void doBackup(Backup backup);
0
efc48e6e2624bc3afebef70dfbada9e5
ed5b9fcf63b24f56a78b1311a1d4fb26
Generates a voicing waveform ala Klatt 1980. Passes an impulse train with time-varying F0 through a series of filters to generate both normal and quasi-sinusoidal voicing waveforms. Then, amplifies and mixes the two waveforms. Passes the mixed output onward through a time-varying binary switch.
boolean isVoiced, float f0, float maxFreqOfVoicing, boolean bEstimateHNMVoicing, SinusoidalAnalysisParams params, float[] ini...
0
10caf7a6e9e7de3f9d0aa3eb5a7e318c
362b92a236ee723cf8dff23247e7181d
Looks for user's account and retrieves uid/gid. user - user name uid [out] user ID gid [out] group ID 0 if operation was successful; -1 otherwise
if(strlen(uname) <= 0){ return -1; } struct passwd *pd = getpwnam(uname); if(NULL == pd){ perror("get passwd failed"); return -3; } uid[0] = pd->pw_uid; gid[0] = pd->pw_gid; return 0; }
1
7536fbf2af215d70dd476d664ced2ba2
b31c6dd0742d26b75e18d007ef5201e3
判断是否有效的Excel文件,如果有效则返回True,无效则返回False
def checkExcel(file_path): if not os.path.isfile(file_path): raise FileNotFoundError('PathToColumnarDataDNE') else: if re.search('\.xlsx', file_path): return True else: return False
1
02d533486f61f6dfdd8bb6b3bb3c1f7e
44071b1861c379329419f331bd8c4cc8
是否同一组操作,假如返回true则新的DbOperation对象会替换旧的DbOperation对象
namespace OperationSystem.Operation bool CanMerge(IOperationMergeJudge operation);
1
1be88f30334a866dcde88d01dca67b3d
f0c3615c7420866e7fdbe8d611a653fd
Searches a folder recursively upwards the hierarchy.
local function FindFileUp(filename) local path = props['FileDir'] repeat path = path:gsub('\\[^\\]+$', '') filepath = path..'\\'..filename if shell.fileexists(filepath) then return filepath end until #path < 3 end
0
2e1ff9041d0dcd9034622dd5bf42c8d4
bea08ca2231f7ff4b7f7cd2c81039e1f
Devuelve la suma de los gastos actuales
class importaciones public function TotalizarGastos() { $query = "SELECT SUM(valor) FROM cp_gastos_importaciones WHERE punto_venta_id = '" . $this->punto_venta_id . "' AND naturaleza = '" . $this->naturaleza . "' AND tipo_documento = '" . $this->tipo_documento . "' AND importacion_no = '" . $this->importacion_n...
1
62ce88803dab7f8e451d209a7ed9fb65
c51f7252223269bc300e58f45764738e
An array containing the cell IDs of all neurons in the Population (all MPI nodes).
if self.dim < 2: return None sc = self.shape_cells sn = self.shape_nodes return (sc[0], sn[1]) + sc[2:]
0
10b3078e8021eda489a915ec53305664
5028bc761e937c76c0ced37fbd6a43f0
Function for updating the score of this square as well as the scores around this one.
self.all_sprites.update() if self.square.pressed: if self.square.rect.x > 500: self.scores.append(self.square.rightCount * 2) else: self.scores.append(self.square.rect.x * 2) self.playing = False
0
d5a2d94960a330f218f10abd4c8272a4
53cb9f46b8feb2a9cabc426ede7f8964
获取当前时间的string类型值"yyyy-MM-dd"
public class TimeUtil public static String getCurrentTimeStr(){ Date d = new Date(); SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); return sdf.format(d); }
1
5625d75da9a3cbbd7731cf45ef905b9e
38c361705117c8037269b6abed897f4a
Parsing a line and if an error is found reporting it and returning isERROR=True in instructionLine
int labelFound = FALSE, returnFlag, tokenLength; char labelName[MAX_LABEL_LENGTH + 1]; char *token; if (!line) return FATAL_ERROR; line = skipWhiteSpace(line); token = line; if (!isalpha(*line) && *line != '.'){ printError(FIRST_CHAR_STATEMENT_NOT_ALDOT, lineNumber); ...
1
3c6ca0159cb023eb1b26fafa0b7ebfb8
f0c05d9c9d6aefbb2d79e18e0d91a64e
Returns the wrapped formal parameter instance.
TemplateParameter getFormal();
1
f43076e7d9afff20ea6a4ac60f16d21a
97636725352bc488eb725844785205bd
This function prints the states of the bfsQ
for s in self._Q: for a in self._Q[s]: if self.getQ(s, a) != 0: print(s, '\t', a, '\t', self.getQ(s, a))
0
d4acc43564bc8026fd115522164e941e
fc58230e9c6762d0d2f2d5b6e6b74991
Fonction qui gère l'évènement lors de la remise des boutons par défaut
void mniti::set_default() { blockSignals(true); pushButton->setChecked(false); pushButton_4->setChecked(true); pushButton_6->setChecked(false); pushButton_7->setChecked(false); pushButton_8->setChecked(false); blockSignals(false); }
1
64d2969ac8ca4bf07a77b5515a60d239
8568fb2fc9ece232c3f6a2501c461827
A method that returns the number of cows (the number of elements that were correctly guessed but in the wrong spot).
public class Tracker public int getnCorrect() { return nCorrect; }
0
ffd313de4ba1afa6a2e96675642716e1
763ea4f2418a5ea8b81dc3c83796af1a
获取演讲嘉宾信息列表【允许在前台显示】
public class InvitedExpertsSpeechDAO extends BaseHibernateDAO @SuppressWarnings("unchecked") public List<InvitedExpertsSpeech> getAllRecordsWithCondition(int pageIndex, int pageSize, String foredate, String afterdate, ResearchLab researchLab, String checkOut, boolean isDivided){ StringBuffer hql=new StringB...
1
37c6e05f35183170e52b7ad89cff56a6
8e8c41b764822cbe759dafc85ffa71b5
设置海图操作方式
function setMapType(mapType) { if (mapType == 'h') { map.setMapType(BMAP_HYBRID_MAP); } else if (mapType == 'r') { map.setMapType(BMAP_NORMAL_MAP); } else { map.setMapType(BMAP_NORMAL_MAP); } }
0
96cbb04731a84140f5c62b97bfe34cdf
340c0156bb69a8b9cc1e9ad7fedebaee
CONFIGURATION -> HORAIRES
{ $horaires = Horaire::all(); $arguments = [ "horaires" => $horaires, "selected_item" => "horaires", "selected_sub_item" => "all" ]; return view("pages.admin.horaires.index")->with($arguments); }
1
0bf58fed26bf26c354a365c09e3309fe
4316b9349fa7a69ceedcf44e3ff0aa0f
Metodo che restituisce il path del file Excel di CONFIGURAZIONE
public class Connection public String getFILE_XML() { return FILE_PATH_XML; }
0
e5365092ab783824af06fb6520206d80
bea0b121022d8497956ec9075ccd62e8
Quantizes the current DCT representation
{ for (int i = 0; i < 64; i++) { output_block[i] = (int8_t)roundf(input_block[i] / quant_matrix[i]); } }
1
fcb54a29ef586617c74b6e493087da2f
b98bec7e0d85f0df8eb990d88bb5ed0c
找出新聞標籤在HTML碼裡面的上界與下界
public class ControlBinder : System.Web.UI.Page public static int[] GetIndex(string st) { string str=st; int[] index =new int[2]; index[0] = 0; index[1] = 0; string char3 = "!,%,-,},],?,), ,(,[,{"; string[] chars3 = char3.Split(','); bool flag = false; ...
0
a533d22f664bf38554d92235654bf4a5
7335b22e517dcce00148c68dda16a67b
如果现有的字段和需要的target字段有重复,但其实并不想映射进目的字段(因为可能数据是不同含义),先要删掉原始表的重复字段
Map<String, FieldkUnit> differnt = new HashMap<>(); sourceData.forEach((k, v) -> { if (targetData.containsKey(k) && v.equals(targetData.get(k))) { return; } differnt.put(k, FieldkUnit.builder().fieldName(k).source(v).target(targetData.get(k)).build());...
0
4c56e26ffa5d77fd111b377f544db522
8d776016d80483be237a8d37f4f32114
Converts a string to a UInt16.
namespace FallDave.Trifles public static class ConvertOpt public static Opt<UInt16> ToUInt16Opt(String value, IFormatProvider provider) { return Optify(() => Convert.ToUInt16(value, provider)); }
1
aafd45fdf613dbb0dafa8169ab630073
12dc199666d22ede73d125243e894e74
FUNCTION Function Name : LINFLEXD_UART_DRV_AbortReceivingData Description : Terminates a non-blocking receive early. Implements : LINFLEXD_UART_DRV_AbortReceivingData_Activity END
{ if (UART_stream == NULL) { return HAL_ERROR; } UART_stream->state = INACTIVE; return HAL_UART_Abort(UART_stream->huart); }
1
942bb349f58709662f36478ee3c8771f
1324200afc8954225aaaf5d5374b437b
Einfaches Setzen eines Pixels (x,y) mit zBuffer Pixel wird nur gezeichnet, wenn er VOR den bereits gezeichneten liegt (abh. von z)
float zp; d3_readZbuffer (px, py, &zp); if (point[2] < zp) { d3_putColPixel (px, py); d3_writeZbuffer (px, py, point[2]); } }
1
89696dd5a5780ee06d8b32cc1d1424cf
aa93b5dcaf6414506f2a6b1f46b8dae3
Not applicable for vaults
export default class PartnerVaultWallet extends BaseSigner signTransaction(transaction) { return null; }
1
f0977880dae3d71203fe4bc201f5fae9
6d5e823d7dba58bb2fed01c2001d04d1
Validamos si el tamaño del campo es mayor a 0, osea que han escrito algun caracter
{ if (texto.Trim() == string.Empty) { MessageBox.Show("¡Por favor ingrese dato!", campo); return false; } return true; }
1
d469137bf8eabaa90d02f5c04ed01ed8
636c4bdfa930d7e8343d78e7891c87d7
Get current widget table number
QString Customer::showTableNum(){ return pTable->showNum(); }
1
3bceed4afd0257dd2ef118c1e833936e
969a64fb150b98459ff06469675cdbed
判定是否是财务人员
ProjectMemberEntity managerEntity = this.projectMemberService.getOperatorManager(projectId, companyId); if (managerEntity != null && managerEntity.getCompanyUserId().equals(companyUserId)) { return 1; } if (managerEntity != null && managerEntity.getAccountId().equals(accountId)) { return 1; } if(this....
1
d8a30fa57d95555126820bf37721e668
29d3693b835b8e259018bed0299527cc
F PushBinaryOp( <type> ) . . . . . . . . . . . . . . push binary operator 'PushBinaryOp' pushes a binary operator expression onto the expression stack. <type> is the type of the operator.
if len(p) == 4: p[0] = BinaryOperation(p[1], p[2], p[3]) else: p[0] = p[1]
0
d2cf9bfc768d0f9159333e063cd37ac9
303f7906be03c34951922d7b464ba586
交换节点值
public class BinaryTree public void swapVal(TreeNode a,TreeNode b) { int tmp=a.Val; a.Val=b.Val; b.Val=tmp; }
1
009aa8f8072dc674965a8033817f6e9b
bcc8cc4a55d39dc397f4dc985d428877
read next frame return number of frames read.
int read_frame() { struct v4l2_buffer buf; unsigned int i; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; if(xioctl(fd, VIDIOC_DQBUF, &buf) == -1) { switch(errno) { case EAGAIN: return 0; case EIO: default: errno_exit("mmap"); } } assert(buf.index <...
0
70cc76cd38ec6a3f768e4ad56c8ba811
d3329e3bd77b415e4c261e1466314957
currentversionがversionhint以下であればTrueを返す。
IVersionType versionType) { if (versionType == null) { return true; } return versionType.Comparator.Compare(currentVersion, newVersion) <= 0; }
1
2cf127d4d67b36fcdb6dbc0aa7c8f2c4
2baa2c0119a80899547f975ae1611e33
Builds HTML version of the book
$str = '<div class="content_header_main">'; $str.= html::getHeadline($toggle_link . " (" . $book['author'] . ")"); $str.= self::headerAbstract($book); $str.= self::headerExports($book); $str.= "<hr />"; $str.='</div>'; return $str; }
1
c12463f631cf62f122e128ea37f7db92
255025bee3a971c2e43bbd65525e9321
获取行程亮点列表(用于打印单)
{ string msg = string.Empty; EyouSoft.Model.EnumType.SysStructure.LngType LngType = EyouSoft.Model.EnumType.SysStructure.LngType.中文; int strLngType = Utils.GetInt(Utils.GetQueryStringValue("LngType")); if (strLngType == 0) { LngType = E...
0
6d32da4ddd7a3654646422cd02be49ff
93d454ccf6e554822e87fac0fe5848af
Own implementation of malloc
static T_pVOID md_malloc(T_U32 size, T_pSTR filename, T_U32 line) { return malloc(size); }
0
df63244d7c451aa19f1140df52203e29
1fc6d9856ca63eb6e9a1e33ec9a951b5
Sort json object keys alphabetically recursively
flatJObject = {} def flatten(x, key = ''): if type(x) is dict: for c in x: flatten(x[c], key + c + '.') else: flatJObject[key[:-1]] = x flatten(jsonObject) return flatJObject
0
445253f2ab01dd858a50f02e5af3ddd6
95450c9031a5aa53e4722316b2971db7
Запускаем отправку очереди в отдельном потоке
namespace MessageBroker.Core.Clients public class Client : IClient public void StartSendProcess() { ThrowIfDisposed(); Task.Factory.StartNew(async () => { while (!IsClosed) await SendNextMessageInQueue(); }); }
1
18823187ce7d8799cf4110d0b9b7c126
741aac18a4d23cd8ec5d55a99ec8c7ba
Test that an exception is thrown if the constructor invocation throws exception.
class Gaps_FormTest extends Unittest_TestCase public function test_construct_exception($method, $object_name) { $this->_model->object_name($object_name); $form = new Gaps_Form($this->_model, $method); }
0
6eb889184bfaf1b30e882183802008e1
c275078cc0c93ea473ea3fd15e89070d
Test MIME header decoding.
class MimeTestCases(unittest.TestCase): def testDecode1(self): self.assertEqual(self.cipher.decode("dGhpcyBpcyBhIHRlc3Q="), "this is a test")
1
956d3e44ca7dd2368acb102f123dd709
bfeabb8644ac665fc8ed5ae349e88125
Renvoie le offset du grand Roque, utilisé dans les methodes qui effectuent le Roque sur la tour
int ligne = (blanc)? 7:0; if(grand){ deplacerPiecePlateau(this.getTabCases()[ligne][4],ligne,2); deplacerPiecePlateau(this.getTabCases()[ligne][0],ligne,3); }else{ deplacerPiecePlateau(this.getTabCases()[ligne][4],ligne,6); deplacerPiecePlateau(...
0
d96ffd0f905746eba5cc3b3d57d3f166
89dc815e1947ad638cfd89fa5f439269
透過 FOV 與視野高度取得鏡頭距離
float FCameraDistanceParams::CalculateDistanceToFitViewToFOV(const FVector2D& ViewSizeUU, float CameraFOV) { const float NewFOV = FMath::Tan(FMath::DegreesToRadians(CameraFOV / 2.f)); const bool bIsWideScreen = UUtilsLibrary::GetViewportAspectRatioAxisConstraint() == AspectRatio_MaintainYFOV; const float HorizontalD...
1
de94d17ec7698a7e17cd14119d133d59
28a34c843f1215121f72a0913d52febf
カードが存在する最小のrankの値を返す
{ int j; int iMinCard = -1; for (j = 0; j <= 11; j++) { if (aCards[j] != 64) { iMinCard = aCards[j]; break; } } return iMinCard; }
1
047f474168d30541f168b72cbe97496b
b57796502e01e54ed172978bae8ce1ee
判断父节点否等于节点本身
var targetParentNode = targetNode.getParentNode(); var currentNode = nodes[0]; var currentParentNode = currentNode.getParentNode(); if (targetParentNode == currentParentNode) return true; else ...
0
132a78c0b356b9a8f1fd990aa0b47a7f
f191c2771256351e7cd6fc53464c4291
Получение всех переменных, содержащихся в сессии. Returns: Список кортежей, состоящих из двух строк - имени и значения переменной.
class DataBaseManager(object): def get_sessions(self): self.__cur.execute('SELECT * FROM {}'.format(TABLE_SESSION_NAME)) return self.__cur.fetchall()
0
ca8c9e245a811d6edc54068ad153e879
b53ab79d9f04e7df8b92dbcdb668ee8b
Metodo para retorno do tipo do Medicamento
class Medio(models.Model): def get_model_type(self): return "Medio"
0
cc16e9c6913373346c4964f70f082508
65b2bd8f7bdc159654020ad890b0901b
should raise an exception for an immutable sequence
class TestTable: def test_table_immutable(self): with raises(TypeError): self.table[0] = self.table[1]
1
4f9d78afbee22d83c079a2348113ba97
4fb4ae299b1a1efe28e6fa51eba761fa
Provjerava ispravnost podataka prilikom promjene podataka o osobama(korisnicima ili zaposlenicima).
public class SOKreirajNoviTiket extends OpstaSO{ @Override protected void proveriPreduslove(Object obj) throws Exception { }
0
c34ecccde5754ef03a5d11578c7d3e7d
67522ad8aa9d6d2a78cb64adb0b23357
Ensure to run this operation in transactional mode. On File system, which does not support DB-Like Transaktions (like StdFileSystem), at least protect concurent writing with locking.
interface Transaction fun doCommitWriteIn2PC(dbName: String)
0
34e4a15e2c3f84222cebb6a02d17ad59
b80db7a48e3a2ee01faf57cecb10524a
Returns the meta object for class '{@link views.ViewGroup <em>View Group</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getViewDef();
0
355a9b10c8598a0bfdcbc839ccd6d224
39a0f0134df1883a999b0f87bc2e4f4f
Rayleigh number
def CriticalPressureRatioRayleigh(gam,M): return (gam+1)/(1+gam*M*M)
0
c5395fdad88616f572f516a2df7261db
0033db8ecc864f666404099032587c0a
Sets an modifier action for the message properties (headers) on the bus level. The content type, message id, and other RabbitMQ message properties can be set that way.
class Message implements SingleMessageInterface public function setFlags($flags = AMQP_NOPARAM) { $this->flags = $flags; return $this; }
0
ef718cfbd14b3136c81f782a10b00058
1aa37aaa3b7d42b73bd622712f58b51c
Dismiss the properties panel
namespace DarkHelmet.BuildVision2 public sealed partial class PropertiesMenu : BvComponentBase public static void Hide() { Open = false; }
1
40e045459c2e82c4c28cb5a293486910
8eb9d5b03edecb31854fa2a574e7898d
获取到矩形最左下角的坐标;
namespace LabelTool_YoloV3 public partial class Form1 : Form private Rectangle GetRect() { Rectangle rect = new Rectangle() { X = Math.Min(p1.X, p2.X), Y = Math.Min(p1.Y, p2.Y), Width = Math.Abs(p1.X - p2.X), Height = Ma...
0
ecad6595ed1306b11ad6c69c9e8f8e22
0365b5a798d74f3177b357f240e36a26
Convenience method for obtaining a logger object, named after the class calling this method. Internally the class name is determined and then used in call to {@link #getLogger(String)}.
public final class ICustomLoggerFactory public static ICustomLogger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); }
1
2bae9eb53890515b3d78afc5d9ec6d2f
501e2b6afc54121b7f3d6010f2d74905
Expands or collapses the set of rows displaying all entries of a serializable array.
const expandOpts = computeExpandOpts.value return tableMethods.setRowExpand(expandOpts.lazy ? reactData.tableData : internalData.tableFullData, expanded) }
1
015d58f153af8a82ff1264bc2422bea6
57f157720654484e99331fcd31f0c978
Test that attribute accesses and method calls are recorded.
class TestTracer(unittest.TestCase): def test_setattr(self): env = self.trace(""" container = objects.FooContainer() container.foo = objects.Foo() """) events = self.function_events self.assertEqual(len(events), 6) self.assertEqual(events[0].qual_name, 'Fo...
1
c702a5ab0ae87df1eb39b349d371a6ac
531f3bd6b207329c42e5c2d055e929a4
Создание строки из массива символов.
public class mainClass static char[] getArray(String str){ char[] arrChar = null; try { arrChar = str.toCharArray(); }catch (Exception e){ JOptionPane.showMessageDialog(null,"Ошибка создания массива из String\n" + e); } return arrChar; }
0
c5242323430679a09ec1f4d0ed9785c3
cb9398d258cfb009e143d818a328c23a
Sets a text color of the hint of the input views.
public class PayPassView extends RelativeLayout public void setTvHintColor(int textColor) { mTvHint.setTextColor(textColor); }
1
108c13c5418eac8261c1681894d08123
2b12a7bf20868042f8fdae4ab255156c
获取思科CDP信息
class CvpApi(object): def get_cvp_info(self): if not self.clnt.is_cvaas: data = self.clnt.get('/cvpInfo/getCvpInfo.do', timeout=self.request_timeout) else: data = {'version': 'cvaas'} if 'version' in data and self.clnt.apiversion is None: ...
0
d73e625ae97d85f168dd232a2ce7c1b8
ca81911a579b523eb71005c04ddaf841
преобразование даты в формат строки с учетом часового пояса
{ $offset = $date->getTimezone()->getOffset($date); if ($offset == 0) { return gmstrftime($fmt, $date->getTimestamp()); } $current_tz = date_default_timezone_get(); $tz = $date->getTimezone()->getName(); if ($current_tz != $tz) { date_default_t...
1
b83452a297741cecf91cd79be6376650
ff481db306bc493e5f6fc1baff89c481
List router interfaces of a specific router.
export class VpcClient public neutronListRouters(neutronListRoutersRequest?: NeutronListRoutersRequest): Promise<NeutronListRoutersResponse> { const options = ParamCreater().neutronListRouters(neutronListRoutersRequest); options['responseHeaders'] = ['']; return this.hcClient.sendRequest(options...
0
1c0648965dd0cb2f3bfd5cd7cbe347e7
0a7c1b034cd0786179d5c416facb2a47
Metodo para setear segundos al timer
public class TimerManager : MonoBehaviour public void setTime(float _value) { seconds = _value; }
1
ae0a6e7a4c8639859ec2b4c11ee21bc5
0d7db3899588cc154baeb41dbd96ff91
Получить автора по его индексу в каталоге
public class DependencyData public TextLink getAuthor(Integer index) { return getOrDefault(index, authors); }
1
107dd6dc72f91cf9c9850a5a2cbc3763
fe19a03eb24d86765bf4bb5cb05c2515
断开之前发起的广播
public class BaseActivity extends Activity implements RunBeforeExit @Override public void beforeExit() { Log.v("test", "接收到广播"); finish(); }
0
efec1d71d1cbfa2d8cba0464f08a623f
c9c2313d065b090fa2b90e7a2f22656d
POST /contrats POST /contrats.json
class ContratController extends Controller public function index() { }
0
6c770c16a1bbb403d8a5ab2b75605178
479111c8bc7b9ae0901ae773f0783771
Execute `stocks` with the provided arguments
class StockViewSet(viewsets.ModelViewSet): def get_stocks(self, request, *args, **kwargs): stocks = StockService().get_stocks(**kwargs['command']) response_message['data'] = StockSerializer(stocks, many=True).data return Response(response_message)
1
0e10f4c50f233bf4a48966ec6768394f
a0c58bf0dc0d3bf67fc22bb4c415400b
Downloads all comics or chapters.
chapters = [] if not aliases: chapters = db.Chapter.find_new() for alias in aliases: chapters += db.Chapter.find_new(alias=alias) output.chapter('Downloading {} chapters'.format(len(chapters))) for chapter in chapters: chapter.get()
1
501910a4d47c124bc312285db286fa7e
3440027ae2e811d6a33aab33d62722ae
Altera o id do objeto
class TransacaoAcessoParent function setId($nId){ $this->nId = $nId; }
1
33255c0715077bdc05fe13921536d162
d53d2ceffc0f5da1503c6bfadb7d9aae
联合表查询(左联)
fmt.Println("linkopSelect3:") r, err := db.Table("user u").LeftJoin("user_detail ud", "u.uid=ud.uid").Fields("ud.site").Where("u.uid=?", 1).Value() if err == nil { fmt.Println(r.String()) } else { fmt.Println(err) } fmt.Println() }
1
cbd870f08b5c4d0423939432c67af18a
cc93d7f2080e61f973c0f06caa36c774
Импортирует версию из файла.
func FromVersionFile(path string) (Verzion, error) { content, err := ioutil.ReadFile(path) if err != nil { return Verzion{}, err } ver, err := FromString(strings.TrimSpace(string(content))) if err != nil { return Verzion{}, err } ver.Minor = 0 ver.Patch = 0 return ver, nil }
1
637cdf99c4ea0b9587f8e1da0cf29aa4
bfe2e78e52fa7d083fd141f27a395e5e
Funkcija konstruktor za pravljenje komentara
class comment public function __construct($db) { $this->db = $db; $this->http = new http(); }
1
c805daceaab7a68ba2468d7d1093d24a
70c62fa33bd36e987d95d40147e24b81
generate a pydot graph of codec
d = Digraph() for name, node in self.nodes.items(): if node.output: d.node(name, node.value, {"color": "lightblue2", "style": "filled"}) else: d.node(name, node.value) for child in node.children: d.edge(name, child.name) if node.suffix_node: d.edge(name, n...
1