query_id
string
corpus_id
string
query
string
code
string
label
int64
287ea806b458748b3bd6dc91d06564de
9ffc6aa3b94f2b8753f4e5366ce53835
Adds a unique delayed FX using its config ID
let effectConf: EffectConfig = EffectConfig.GetConfig(id); if (effectConf == null) return; this.AddEffect(id, point, effectPosType, callback); }
1
bfbebacc197624881c57f76b612b7d64
0864e48b984d06333e81112a178e30b4
向房间内角色广播开始战斗消息
function KingMap:BroadcastBeginAct() self:Broadcast("sc_king_begin_act", {}) end
1
6eef594b3fa2600b5e25060ffc670c54
33d2a35fca41920177b4384a27519fe1
设置击杀类型图标,爆头和击倒
{ string bundleName = AssetBundleConstant.Icon_Killinfo; String deathIconName = null; UIUtils.SetActive(cell.KillerName.transform, true); var deathType = item.deathType; cell.DeathTypeIcon.rectTransform.sizeDelta = new Vector2(0, _cellViewHeight); if (deathT...
1
916cfd89dee2befded71f174107c48ff
7e9f4b018bb8359a602c346ac575c9e2
查找竞技场的挑战按钮
function searchBattle() { function checkBattle(url) { var result = false; $.ajax({ url: url, async : false, success: function(data) { if ( $(".time", data).length !== 2) { console.log(citizenId, "抓取错误,重新抓取"); ...
1
b3c08e2d2aaf4f003b99ecbfbfea48d2
715d63f2997e2bc408e36bdf28c75826
Return the index of the first occurrence of value in lst, or return -1 if value is not in lst.
class Enhanced_List(Linked_List): def index_of(self, value): current = self._head n_nodes = 0 while current is not None: if current._value == value: return n_nodes else: n_nodes += 1 current = current._next return -1
1
31c34b17467c5cb08aa56174639e0bdb
273ce7b9a9338a92f47661687e585273
新たな食材情報を登録する関数
{ $data = $request->all(); $result = IngredientController::addIngredientOfFood((int) $request->food_id, $data); return $result; }
1
b5852eed002ccb3d72ff55b486898cda
5b522233ffb036c9ac7ff10d7884fa35
https://developer.github.com/v3/repos/#list-contributors
@GET @Produces("application/json") Response repos_list_contributors(@PathParam("owner") String owner, @PathParam("repo") String repo, @QueryParam("anon") String anon, @QueryParam("per_page") Integer perPage, @QueryParam("page") Integer page);
1
f601682e30172ad234689f043804644e
b91862570f81730cfc614651172796e1
The time when production will begin for this Work Order in the designated work area.
public class StockInParameter extends InParameter public java.util.Date getFromWorkDate() { return _FromWorkDate; }
0
38eda05c52266bd6a98bc17554c611a0
0fc007d42d707389e0a10635959d0044
Set the matrix to the concatenation of the two specified matrices and return true. <p> Either of the two matrices may also be the target matrix, that is <code>matrixA.setConcat(matrixA, matrixB);</code> is valid. </p> <p class="note"> In {@link android.os.Build.VERSION_CODES#GINGERBREAD_MR1} and below, this function re...
public class Matrix public static Matrix concatenate(Boolean horizontal, Matrix M1, Matrix M2){ Matrix M; if(horizontal) { try { M = new Matrix(M1.nRows, M1.nCols + M2.nCols); } catch (java.lang.InstantiationException e) { return null; ...
0
f42de4e9fe50fbd8c84ce98104e9ae4b
95870dd495a009dd75dade3583a0ffa7
Create a new line, using the provided parameters.
_layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt) { c->ln = calloc(1, sizeof(Evas_Object_Textblock_Line)); c->align = fmt->halign; c->align_auto = fmt->halign_auto; c->marginl = fmt->margin.l; c->marginr = fmt->margin.r; c->par->lines = (Evas_Object_Textblock_Line *)eina_inlist_append(EINA_...
1
47078c8e5fbc949a3ab763773e6b7a27
1ff05ccd7cacf91d37cb43bdfa88a6d8
Ввести с клавиатуры четыре числа, и вывести максимальное из них.
namespace task_0014 class Program static void Main(string[] args) { Console.Write("Введите первое число: "); int n1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Введите второе число: "); int n2 = Convert.ToInt32(Console.ReadLine()); Consol...
0
c496c1ba7a5e012a196c4b142a506649
c2e9f95dccefe979b2bcdcd7426e3fb6
Map from a Google document to a Search Document
{ $moduleId = str_replace('.models.Model', '', $data->__model); $moduleService = pinax_ObjectFactory::createObject('metafad.common.services.ModuleService'); $elements = $moduleService->getElements($moduleId); $values = $this->processElements($elements, $data); $doc = new stdClass(); ...
1
9c2ba711c71db0928da57c07c50d6c7c
bb0c8f0a755c1e4b5febb95ef2814c18
checks if the specified character is already selected (in the list)
namespace SuperSmashPolls class MenuController private bool IsSelected(List<SelectableItem> workList, string find) { int currentlySelected = FindSelected(workList); return find == workList[currentlySelected].Text; }
0
ece5643eb88f0f89611c56af1e3bb2a7
af35ac96d41333f629b40f799095ee5f
POST /huns POST /huns.json
@hand = Hand.new(hand_params) if @hand.save render json: @hand, status: :created, location: @hand else render json: @hand.errors, status: :unprocessable_entity end end
1
cd3f791fcce4c7437c2a9064be22cc15
ab253f5cebab6916328b58202bd0b591
Chains two Dual Quaternions
{ Quaternion result; Add(ref left, ref right, out result); return result; }
0
43d0639bbab5ca2d763d4bd83cd12ec8
08895bbb9a383a22df051ee2f2b863c2
This method carries out the uthentication of the user based on his/her X509 certificate. X509 certificate
throws SQLException { String userHospId = null; String clientCn = null; X509Certificate[] certs = (X509Certificate[]) request .getAttribute("javax.servlet.request.X509Certificate"); if (certs != null) { String dn = certs[0].getSubjectX500Principal().getName(); StringTokenizer s...
1
8bd9c7a0547df6a0938dddcc4909a2d1
8f9dcb0e9f1e9990fd04ebbd8a4cac37
Méthode pour recharger la liste des ingrédients du plat
$('#ingredient_list').html('<div class="text-center"><i class="fa fa-spinner fa-4x fa-spin"></i></div>'); jQuery.ajax({ url: "/backend/modules/catering/products/"+product_id+"/product_ingredient_list", type: "GET", success: function (data) { $('#ingred...
1
4c5421f3f1b08752f856a4b55f1550bb
f0db4c0a0405a999b04c636825ec2146
获取活动组人数
{ $tj_source_modle = new \Admin\Model\Tj_sourceModel(); $where = array( 'action' => 'run_group_activity', 'a.create_time' => array( 'between', $opts['from_date'] . ',' . $opts['to_date'] ), 'a.user_id' => array( 'not in'...
1
9eb66681dcf3a15f0b4190c4f1e7d828
ddccd6764e5bfcfe816a65b62a167eca
设置已选择的帮助应用
curSelected = -1; mainDesktop = desktop; helpPanel = Panel(desktop:GetLogicChild('helpPanel')); helpPanel:IncRefCount(); helpPanel.Visibility = Visibility.Hidden; touchScrollPanel = helpPanel:GetLogicChild('touchScrollPanel'); stackPanel = touchScrollPanel:GetLogicChild(0); end
0
721173ad7a7d699fd849a7ea2a7aa273
4257e134f5529975849cfc26d233104b
creates lobby with id and initial player
playerLobby = this.server.getFirstAvailableLobby(gameType); if (!playerLobby.isFull()){ playerLobby.addPlayer(playerId,view); if (playerLobby.isFull()){ playerLobby.setInGame(); server.startLobby(playerLobby); } } }
0
7a3e494f70b0fd9bbaf7b37f16065e39
40fa6465f33aab7b3c6a33cad52caad0
POST /city_temperatures
class CitiesController def create @city = City.create(city_params) create_or_update_response end
0
7ea3e5f063cbadb76662ddd7387ee37c
7096fb4c5de5fae85fb2a674a47c9664
Gets or sets a value indicating whether TLS 1.1 is enabled.
class GetGatewayHostnameConfigurationResult: def tls10_enabled(self) -> Optional[bool]: return pulumi.get(self, "tls10_enabled")
0
6e9a6ab613e4f0130e1eba3f1dbe1722
10914705daec1eb6f31e646c20be0002
Return the completed HTML tag and its contents.
result = "<" + tag_name if options != "": result += " " + options result += ">\n" + text + "\n</" + tag_name + ">\n" if not spacing: return result.replace("\n", " ")[:-1] + "\n" return result
1
9baa487412555f9534afaf4d556fdb35
3595c1e94e6ee488579414ff2892469d
设置房卡数值
public class CardView_2 extends FrameLayout public void setNum(int num) { this.num = num; label.setText(num+""); }
1
6be5aa2f85900bc0f55cd93a5c12f522
0513d4e1182502d861d94b9a0155c622
Function to score the 'acceleration' category
def acceleration_aug(friction_coefficient,gravity): return friction_coefficient * gravity
0
9b37da645c161873e1cf9d7ce05c84a0
bbbd09a85398f63870aced634bf3f409
Speichert die Spielergebnisse
public class CbrTask public void saveCases() { ArrayList<Case> playerarray = DataStorage.getSharedDataStorage().getCases(); for(Case element : DataStorage.getSharedDataStorage().getCases()){ System.out.println("Spieler: " + element); } Concept soccerplayer = DataStorage.getSharedDataStorage().getProj...
1
01b4051449b611c85a7fd4efcffde389
b3c026b7995ff9e90c44f20e84c70dbe
Clears all conversations
public class ConversationAdapter extends CursorAdapter public void canceleddAllConversation() { selectedConversation.clear(); }
0
2ccca04584034128de88b23e196b7d9b
d3f23d7aa4c5b6feff2fa63e7d845d15
Function to assign DB values to form
for name, value in DBTYPES: if value == config.get('database'): self.currentdb.set(name) self.input_dbuser.insert(0, config.get('dbuser')) self.input_dbpass.insert(0, config.get('dbpass')) self.input_dbhost.insert(0, config.get('dbhost')) self.input_dbname.insert(0, config.get('dbname')) self.input_i...
1
897fa627af4e284129d418a2a1bf7bef
8a83f557054d1ef0fb7bf97ddf9f5b57
更新就绪队列,选择firsttaskqueue和nexttaskqueue中的任务
def update_readyqueue(): global readyqueue global firsttaskqueue global nexttaskqueue while(len(readyqueue) < MAX_READY_NUM and len(firsttaskqueue) > 0): t = firsttaskqueue.pop() readyqueue.push(t) while(len(readyqueue) < MAX_READY_NUM and len(nexttaskqueue) > 0): t = nexttas...
1
7c31608ce9cd10dc897dd0b1c74b2917
eb35cae904a9e293076cf1c51a2dd91b
Utility to convert from byte arrays to word arrays
local function bytes_to_w32 (a,b,c,d) return a*0x1000000+b*0x10000+c*0x100+d end
0
d0850f269209270456128380a1ec34a5
40bd02b18b82c55e9ed914dff852cdec
Resolve a hostname to a stringified IP address
int resolve_address(const char* hostname, char* addr, size_t addrmaxlen) { int result = NEB_OK; struct hostent* hostent = gethostbyname(hostname); if (!hostent || (inet_ntop(AF_INET, hostent->h_addr_list[0], addr, addrmaxlen) == NULL)) { result = NEB_ERROR; } return result; }
1
8acbf18311bcc4ba6694ad48e5c4682e
03cfbb0f71b151b44512f2f21f1384ef
删除单条PlansBatch
const options = ParamCreater().batchDeleteQueuePlans(batchDeleteQueuePlansRequest); options['responseHeaders'] = ['']; return this.hcClient.sendRequest(options); }
0
465bb4f89b4f8fe669ca8d5fa323ee2a
a88d74e149ab3ed3f877e4c6f9fe8450
終了ボタンが押された時の処理。エディタ上であれば再生停止とする。
public class ButtonScript : MonoBehaviour public void Exit(){ #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #endif Application.Quit(); }
1
adff68ef2039dc9912b25a38403af08b
d442d0dd3839fbf970a92955626aae0a
Rule for checking whether a piece will be placed next to an opponent
for occupied in self.ownOccupied: if self.point == occupied: return True elif occupied == self.ownOccupied[len(self.ownOccupied) - 1]: return False else: continue
0
11fed783b44e26b6e9302140781816b0
a44a18347cb97764bbda2ea36c7317a3
#Método para derivar un polinomio
def deriv(p): return poly([n*c for (n, c) in enumerate(p.coefs) if n > 0])
1
3498f36b340fdaefb7426964102bbb29
815b791228861173d952576fc85c467b
Kiểm tra tài sản đã nhập chưa
namespace QUANLY.BLL class DichVu_BLL public bool KiemTra(string madv) { if (connData.KiemTraTonTai("SANPHAM", "MaDV", madv)) return true; return false; }
0
64399c73e7706327b99e41f172917b19
b99df82fc60263196b0e06d603d0c0d3
新增药库管理
@Controller @RequestMapping("/medicineStock") public class MedicineStockController extends BaseController @RequestMapping(value = "/add") @Permission @ResponseBody public Object add(MedicineStock medicineStock) { medicineStockService.insert(medicineStock); return SUCCESS_TIP; }
1
72535938b34d0738ea299a17c6463bfc
b344105cb161ac7021a042b36ae2cb72
16進数2桁のバイトデータを読み込む
{ if( rb_GetByteCount() < 2 ) return false; if( media.ctrl.ob_flag_r ) { if( media.ctrl.read == media.ctrl.write ) { *data_16 = media.ctrl.odd_byte_r | ((uint16)media.ctrl.odd_byte_w << 8); media.ctrl.ob_flag_r = false; media.ctrl.ob_flag_w = false; re...
1
00a35ebf9ad5409a50ba3cb812625163
dc629e98fd3ba5f05822ec473b54987b
Inverse operation of N-dimensional spatial pooling. .. warning:: This feature is experimental. The interface can change in the future. This function acts similarly to :class:`~functions.DeconvolutionND`, but it spreads input N-dimensional array's value without any parameter instead of computing the inner products.
def unpooling_2d(x, ksize, stride=None, pad=0, outsize=None, cover_all=True): return Unpooling2D(ksize, stride, pad, outsize, cover_all).apply((x,))[0]
1
2508a5861c9a754f95205d31cd52bff7
ec18fa831feb20cd62bf95227fd14f47
场景书签切换
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.show(bookmarksfragment); fragmentTransaction.hide(mainFragment); fragmentTransaction.hide(meiziFragment); fragmentTransaction.commit(); toolbar.setTitle(getResour...
1
854080c7580dd1975515850a794a318b
48ce3d6132c3cdb04ef675ecca98d3a4
Return integer count of items currently in queue
class queue extends Base public function count() { return count(self::$queue); }
1
6d93c7a6d1dc083b4786a7378f2628e1
5ac46f51e27070b44a7793308d942222
Check a information to determine if a location device information has a speed.
, @NonNull UUID serviceUUID , @NonNull Integer serviceInstanceId , @NonNull UUID characteristicUUID , @NonNull Integer characteristicInstanceId , @NonNull LocationAndSpeedAndroid locationAndSpeedAndroid);
0
e4d8c7dc62e32f3de1a3b9cb6424490c
e51f1d05fc88895c0aea56e0214b8bc4
Tests that compilation accepts computations containing loops.
code = ( "module test\n" "contains\n" "subroutine tmp(a, n)\n" " integer, intent(in) :: n\n" " real, intent(out) :: a(n)\n" " a = sin(1.0)\n" "end subroutine tmp\n" "end module test") schedule = fortran_reader.psyir_from_source(code) resul...
0
47cdf4f568f9b5a5718958befbc5eb22
0b3b3c639e5c5c61b06874ed27a3a131
fatfs_init - Register the FAT file system with the virtual file system This method will store the FAT filesystem in a list that will allow mounting at a later time.
void fs_init(void) { g_bFatFsEnabled = false; fresult = f_mount(0, &g_sFatFs); if(fresult != FR_OK) { return; } fresult = f_opendir(&g_sDirObject, "/"); if(fresult == FR_OK) { g_bFatFsEnabled = true; } else { g_bFatFsEnabled = false; } }
0
ce9b332298340b9e286be664bda33bb2
75a9ccfe5ff2f28344e94c3ee95208b7
若發射後的冷卻期間伸縮砲管
public abstract class Gun : MonoBehaviour protected void Cooling_Down() { if (disable_fire_seconds > 0) { disable_fire_seconds -= Time.deltaTime; } else { disable_fire_seconds = 0; } }
0
c2baeed4d988971b734a5fe43dc2bacc
212aed08afef40330b77d4f5c5946e7b
截取战绩图片.
if(dataList.size() < 8){ return; } for (int i = 0; i < 8; i++) { shotCut1Data.add(dataList.get(i)); } }
0
1180c58854f4aec5d32c3fb5cad4940f
7fff016fa187710c0456a2c103dee679
クロール完了時の処理
class Observer implements CrawlObserver public function finishedCrawling() { if(!$this->onComplete){ return; } call_user_func($this->onComplete); }
1
445346d509be7ae01acdee2339b99a66
ff4534812903b6e0267c96a2a68dd44f
This example sender just logs messages
@JvmStatic fun mainFunction(args: Array<String>) { for (i in 0 until NUM_MESSAGES) { val message = String.format("This is message #%d", i) Utility.publish(Config.properties!!["pubsub"].toString(), Config.properties!!["topic"].toString(), message) } }
0
8f7c2e28e1cd9b7034c225e1405ad883
e858685682325f993a2f5413525c4ac5
Resets timezone to initial PHP timezone setting - just to be a good neighbor
class Default_Helpers_Date public static function resetTimezone() { date_default_timezone_set('Europe/Berlin'); }
0
3a688638217079e85e647da9efc59814
f81deed787ba29bbe386b20ad33a37cf
并发下载大文件
ExecutorService service = Executors.newFixedThreadPool(TCOUNT); URL url = new URL(address); URLConnection cn = url.openConnection(); fileLength = cn.getContentLength(); long packageLength = fileLength/TCOUNT; long leftLength = fileLength%TCOUNT; RandomAccessFile file = new RandomAccessFile(path,"rw"); l...
1
907e3d8e4ed652d7a247338cc597a5d9
4a4b3c0630fff9c939b4fe2d134e1cbb
Проверка блока с сертефикатом, чеком и комментариями
{ bool result = false; int index = 2; IWebElement tmp = driver.FindElement(By.XPath("//*[@id='pass_block']/div[1]/div/div[2]/div")); result = divErrorPassForm.FindElement(By.TagName("p")).Text == message[0]; result = tmp.FindElement(By.TagName("h4")).T...
0
8f5d8c93a28c05bbafc056dc43d8e34b
5172a5c8e861480ef7a0deaf3bc2db94
判斷是否為文字型別
class Compiler isText(el) { return el.nodeType === 3 }
1
e187ecb3f1a580b1a9793c610d8df7f0
ffb95a01709c4a871a51f72de6b21124
Test that the updated models are different after one step of SGD
image = np.ones((1, 1, 48, 64)) target = np.random.random((1, 1, 48, 64)) weight_tensors = self.model.trainable_weights sess = K.get_session() weight_arrays_b4 = sess.run(weight_tensors) self.model.compile(loss='mse', optimizer='adam', metrics=['mse']) self.model....
1
3fcc444a7b48cde65a71eb53b3eb8867
07a47b8674ae685b99f9e074531c74a7
Constructor. Assigns default values to object attributes.
class Dokeos185Tool extends Dokeos185CourseDataMigrationDataClass public function __construct($defaultProperties = array()) { $this->defaultProperties = $defaultProperties; }
1
c67e7a3479f6a76a679c82148d612671
95e9e354c7314f5f9363e1944ee99a4b
This method changes the current tile that is to be placed by the user
public class Controller implements Serializable public void setCurrentFloorTile(FloorTile drawnTile) { currentFloorTile = drawnTile; }
1
7b93d84fe7193b2971c903c73baa8577
b5ca423023cea548e7f213676c5957a7
função para limpar o tabuleiro
function limpaTabuleiro(){ let x = document.querySelectorAll('img') let cavalo = document.querySelectorAll('p') x.forEach(element => { element.style.display = 'none'; }); cavalo.forEach(element => { element.style.display = 'none'; }); }
1
8607d05d84880700714abac7501e820a
3b1213e6cb1e1540c26c52909dbdf51b
gradient of cross entropy error to the input of softmax layer
loss_grad = 0 for idx, _ in enumerate(x_data): xn_data = x_data[:, idx] yn_data = y_data[0, idx] phi_xn = phi(xn_data) loss_grad += (ssp.expit(weights @ phi_xn) - yn_data) * phi_xn return loss_grad
0
b36454af5d8767f2efa9724aaeb01fd3
f09d6e6656c77e81037dca97d0c034b7
反禁用用户
class UserBll extends BaseBll{ public static function disableUser($Id){ $Params = [ "status" => UsersDao::STATUS_DISABLE, ]; return UsersDao::UpUserInfo($Id,$Params); }
0
9bb4acc490d23480a9be2ca130d740ca
dbb8dc9f50f42c45aad88453d47fea07
\brief update position on x,z plane.
int rts_cam_c::updatePosition (void) { constrain (); mPosition.x = mDistanceFromTarget * cos (mElevation); mPosition.y = mDistanceFromTarget * sin (mElevation); mPosition.z = 0.0; v3d_t temp = mPosition; mPosition.x = (temp.x * cos (mFacing)) - (temp.z * sin (mFacing)); mPosition.z = (temp.x * sin (mFacin...
1
c9c3194e3737fe2a9e2dee5daebaa20b
5677470ed094151c0d9f2e301ddcf37e
Push an element to the start of the queue.
if ($this->is_available()) { return $this->_getConForKey($name)->qpush_front($name, $item); } return false; }
1
f9601d36502a6014cbf8fcd09b179e3b
e76fd0e25412269e5cb4da8c6eeb36eb
Returns a limited amount of group resources with specified offset Asynchronously.
{ return Task.Factory.StartNew(s => ((IIotHubResourceOperations)s).ListEventHubConsumerGroupsNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
0
a7727df55930f465e131cc7fa0532ca6
071cb429ce0f071f0966fcfab648064b
Deletes duplicate records
class ScheduleScraper(object): def remove_redundancy(self, data): cleaned = [] for record in data: if record not in cleaned: cleaned.append(record) return cleaned
1
0b7c27e5066585fed3aa3dcbf3bf95c2
18272eccc4d562bb2613b3dbbfcfacbd
刪除有興趣的書籍
class UserController extends Controller public function DeleteInteresteds(Request $request) { $userInfo = auth('api')->user(); if ($userInfo !== null) { $user = User::find($userInfo->id); $user->interesteds()->delete(); return "interesteds is deleted for social id...
0
eac06483e3ae288ddf8061d5ee62fb1e
1898653d45411e61630df58eefede9f1
Draw a wireframe 3D cone.
[SuppressUnmanagedCodeSecurity] public static unsafe partial class Raylib [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, ...
0
5c40f238f0e99363d6e108d159fda197
8c134040118084cfcc8425759833d01c
ドメイン整合性検証 <pre> 画面入力ミスによる不整合ではなく、ドメインの設定ミス(プログラムミス)がないか検証する。 </pre>
$this->errors["error_soycms_site_dir"] = ( !file_exists(SOYCMS_TARGET_DIRECTORY) || !is_dir(SOYCMS_TARGET_DIRECTORY) || !is_writable(SOYCMS_TARGET_DIRECTORY) ); $soyshopConfDir = dirname(CMS_COMMON) . "/soyshop/webapp/conf/shop"; $this->errors["error_soyshop_shop_conf_dir"] = ( !file_exists($soyshopConfDir) || !i...
0
ee6cbc4088a18ebeeadb76a6c71eb66b
9f091cacdcf5dbb3005c44ee2b05bb40
Creates a pair of connected, indistinguishable socket streams
int tcp_pair(int fds[2]) { int fd; if ((fd = tcp_server(0, 0, 0)) == -1) { perror("tcp_server"); fds[0] = fds[1] = -1; return (-1); } fds[0] = fd; if ((fd = tcp_connect("127.0.0.1", sockport(fds[0]))) == -1) { perror("tcp_connect"); closesocket(fd); fds[0] = fds[1] = -1; return (-1); } fds[1] = fd;...
1
6f530700788ef515196cae2d22ca7c37
fb67bcbe17e8f67d16193e173e08f73a
Returns a pretty string ready for STDOUT pp - pretty print, default true verbose - shows modifier, default false
function ppvd() { return pretty_print(func_get_args(), false, true); }
1
9b08ef10441b680e1183f9836bfc0753
8d59d3f18169d09f7bb3074a7bef6895
テンプレートのアンカー点の三次元座標値を返します. Returns
class ShapeBase(ABC): def anchor_position(self): return self._anchor_x, self._anchor_y
0
049c47bf79056a9084a658ecb734deb7
f095f21a9847deb8766927575ba4fd7f
# taken from https://themockup.blog/posts/2020-09-26-functions-and-themes-for-gt-tables
get_themes <- function() { themes <- data.frame(index = numeric(), group = character(), stringsAsFactors = FALSE) themes[1,] <- c(0, "alt.atheism") themes[2,] <- c(1, 'comp.graphics') themes[3,] <- c(2, 'comp.os.ms-windows.misc') themes[4,] <- c(3, 'comp.sys.ibm.pc.hardware') themes[5,] <- c(4, 'comp.sys.ma...
1
0b3e060f0d0acdf8a75165c2b0d54584
3427aee6007952bfeb4fcd67485cea07
Allocates enough for the formatted text desired. Returns maximum storable length of a string in the allocated buffer on success, or 0 on failure.
bool cTextFmt::resize (int len) { if (m_format) { delete[] m_format; m_format = 0; } if (len > 0) { m_format = new unsigned char[len]; if (!m_format) return false; } return true; }
0
dc9f635a9ce6f61c80e9456bce3610cf
127249d521cef0947892b00f07cc95c5
Accepter ami
class User extends Authenticatable public function acceptFriend(User $userFriend) { DB::table('invitation') ->where('emetteur_id', $userFriend->id) ->where('recepteur_id', $this->id) ->update(['status' => 1]); }
1
cbdf76ffafe570033c22fa17b791559e
ee9758b8f291e883e1e47943e23250b8
Input field cleared and ready for next number
num1 = ''; num2 = ''; inputOperator = ''; clearHighlight(); enableDecimal(); isFirstNumSet = false; }
1
7daa0757ec3b5b92412eba18226d9b14
f9fc94c948018a8ec868550c32ed563d
获取司机待领取线路
class DriverController extends Controller public function getOrder() { $driver = Auth::guard('motorman')->user(); $res = TripRecord::where(['did' => $driver->did, 'status' => 0])->get()->toArray(); return $res; }
1
9d7cf3f975dd06d0344295715bac0675
e4ab686bd64afae9ee76a0d1f61ff88f
Get the installed version and check it matches the requirements Returns (is_good, msg). is_good is true if we matched the requirements and false otherwise. msg describes what happened (an error message on failure, or extra information on success).
class IConstraint(six.with_metaclass(abc.ABCMeta)): def matches(self, version):
0
80e26931a2adb8b99f88d8722e6939a6
58d46afb822c540bb4c9761a24c9a858
获取短信发送记录的收信人信息
public String getDeptSenders(String summaryIdStr) throws BusinessException;
0
ee0633551150a16b6f546ed52a7325bd
0b4d3dcf34c64aab04134ec2e161f400
Get font and paragraph styles.
class Paragraph(Parented): def style(self): style_id = self._p.style return self.part.get_style(style_id, WD_STYLE_TYPE.PARAGRAPH)
1
2c4c90a2e6329941ecd4e9680b5967c4
413440bbd8b8f45fe957361c3c9fc067
Returns the scroll lock state of the currently active console.
bool kb_get_scroll_lock() { return scroll_lock; }
1
0962ae995ff5551071d6b4c3645545fe
20e4d256aacdc958d9e7233a80690adc
Tests Restriction::isApplicable
node = URIRef('http://purl.obolibrary.org/obo/PATO_0000380') edges = {'type': URIRef('http://www.w3.org/2002/07/owl#Restriction'), 'onProperty': URIRef( 'http://purl.obolibrary.org/obo/pato#increased_in_magnitude_relative_to'), 'someValuesFrom': URI...
0
a342901c3e2263219eeec55bac2e403a
1bca577e3330624c0123488835e9d38f
Getter for <code>BAS_PASSPORTS_HIS.SERIES</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class BasPassportsHisRecord extends TableRecordImpl<BasPassportsHisRecord> implements Record10<Long, Long, Long, Lo...
0
4dd08e06d5becf17420cb4052d36d849
6667c3db3f11ca78224d02c1a52d0364
安装koa相关插件
function initialize(opts) { this.emit('ibird:app:initialize:pre', this, opts); if (opts.uploadDir) { opts.bodyOpts = opts.bodyOpts || {}; opts.bodyOpts.multipart = true; opts.bodyOpts.formidable = utility.assign({ keepExtensions: true, uploadDir: opts.uploadDir, ...
1
350fe92595baf53f38353e88d487efe8
9b77c23729b63be19ebcb19f91606aa3
Returns proper velocities accordingly to the current status.
l = 0.05 K = 2 * radius / l C = (K-1) / (K+1) L_vel = R_vel * C if abs(L_vel) > MAX_RPM: L_vel = R_vel R_vel = L_vel / C if direction == 1: return L_vel, R_vel elif direction == -1: return R_vel, L_vel
1
7fecd20722330f1b27bdbde323e47c8d
0bdf8b70c1846c9a275d1e491a110786
Create the probablity distribution of the doc for a given topic
probabilities = [] if self.prior_alpha and self.prior_beta: probabilities = self.alpha[doc] * self.beta[:,word_id] elif not self.prior_alpha and self.prior_beta: probabilities = self.beta[:,word_id] elif self.prior_alpha and not self.prior_beta: probab...
1
51cb32fe3b7a2d3d90a0a27aa91bee3e
926d093803005a909993a4103fb32f5f
TLSListener creates a Listener for TLS proxy server.
if config == nil { if network != "unix" && !strings.HasSuffix(address, ":0") { log.Warningf("listening via %s to %s without TLS", network, address) } return net.Listen(network, address) } return tls.Listen(network, address, config) }
1
99ff665663f5a44f6b97c674d4a309ae
9ef60ad558051acedf8bcb707bd3e761
Getter for the in_vars
class IntPS(ProblemInstance): def getVars(self): return self.__vars
0
78006448d633e65a04d448d83b0e6ffd
32a24e730c44e8941c635bba742d92c7
勝利数を更新
export class StaticsInfoStruct public updateSum(oData):void{ this.setData( "TotalWinCnt" , oData ); }
1
5269050f56d11733e1238ead9c617743
ea932eba9044c5ba1e230b4591f0a30e
Block constructor Creates block from previous block hash and transaction data
class Blockchain constructor(coinbase, version) { this.blocks = []; this.deserialize(); this.coinbase = coinbase; this.version = version; let data = { constructorVersion: 1, coinbase: this.coinbase, parentHash: this.getLatestBlock().header.bloc...
0
c113453626458b3aee21d2664913aa12
bded8d886b0b15ea2234d5a3065e74ff
Constructs a PTResNet-18 model.
defaults = { "input_dim": 17, "board": 19, "filters_per_layer": 256, "layers": 19, "filter_width": 3 } params = defaults params.update(kwargs) model_input = L.Input(shape=(params["input_dim"], params["board"], params["bo...
0
699a40d59d8425830e3a8718e0b76cb5
9391e8a9abaaabc9c8558a79b3f1eb40
根据权限id获取关联表的id
List<String> getPermissionRelation(Integer permissionId);
1
9b57ef3cde85297b3cf686ccf1d0fef0
ffb62ea0ac7ab024caa116bafe3ee9b7
Test the user update method for an account. (Without the validation errors)
test_account = AccountFactory() resp = self.app.post('/accounts', json=test_account.serialize(), content_type='application/json') self.assertEqual(resp.status_code, status.HTTP_201_CREATED) new_account = resp.get_json() ne...
1
090afe1c47cd3eba92e7d29c4f7b4172
529b96df21a8b038a83493f1872569b7
Load the Options from the Registry (which will subsequently be converted to the XML Settings File format). Registry keys are deleted once they are read since they will no longer be used.
{ try { _blnConfirmDelete = Convert.ToBoolean(Registry.CurrentUser.CreateSubKey("Software\\Chummer").GetValue("confirmdelete").ToString()); Registry.CurrentUser.CreateSubKey("Software\\Chummer").DeleteValue("confirmdelete"); } catch { } try { _blnConfirmKarmaExpense = Convert.ToBoo...
1
a6053085d88293467e739f2626208b13
1212ab8e982111d1d42bd0cfb4270f95
取群公告列表
$group_id = $data['group_id']; $sql = 'SELECT A.id as announce_id, A.group_id,A.leader_id,B.user_name,A.title,A.content,A.create_time FROM `yd_group_announce` AS A LEFT JOIN `yd_user` AS B ON A.leader_id = B.leader_id WHERE A.is_valid = 1 AND A.group_id = '.$group_id.' ORDER BY A.create_ti...
1
27d5f280a86be515154d4e8dc73c4236
485d49a98a8a2263b48191001a9c20ce
update toolbar button state when user selects a new cell range
if( countryBrowserView.SelectedItems.Count == 1 ) { addZipcodeToolstripButton.Enabled = true; editZipcodeToolstripButton.Enabled = false; deleteZipcodeToolstripButton.Enabled = false; importToolStripButton.Enabled = true; } else { addZipcodeToolstripButton.Enabled = false; editZipcodeTools...
1
0f4317dd2e843a50846920b800e74d28
5be2a49ae0b0dc4e92be33026875a500
Number of frames in explosion's spritesheet.
class Sprite(object): def getNumFrames(self): return len(self._spriteset[self.direction])
1
d26a91c9765eba68dc55b5762d4e9862
7c071202ff5a34bb0d15a6d081bc5d5e
Enables the script for movement in the direction of the specified target.
if(trTarget != null) return; trTarget = trWaypoints[0]; if(movementScript != null) { int nDirection = CheckDirectionToTheTarget(); movementScript.SetNPCMovementDirection(nDirection); } }
1
75f832bc94cd4079e41830264377bd64
0a11915952eba4af6790935d01584431
Método que comprueba qué productos deben actualizar su definición
this.products = JSON.parse(fs.readFileSync(this.productsDefinition, `utf8`)) this.products.forEach(prod => { prod.providers = prod.providers.map(e => { var b = clone(e) b.shouldNotContain = RegExp(b.shouldNotContain) return b }) }) }
0
aedcea8133ab428203b92ac9dc1fc0de
4ec100f203bbec50446c3b50692813a7
Get a URI reference to a document defining the scripting language's grammar.
def get_grammar(): return GR
0
0bf2f22f6fe8e21365dc990f2423a878
b97b4a26a02185109865720743c38491
Convert polar to rectangular coordinates.
public class Colorizer public static void polar(double abs, double arg, double[] w) { w[0] = abs*Math.cos(arg); w[1] = abs*Math.sin(arg); }
1
623f225692426a5f4088713063de83c7
188b3ba6dbcb077b9fade3be52019576
Insert Thửa đất vào lịch sử theo Mã thửa đất
public void Insert(int OrderFrom,int OrderTo,DateTime DateInput,string ObjectX,string Sex,string Address) { TblLot item = new TblLot(); item.OrderFrom = OrderFrom; item.OrderTo = OrderTo; item.DateInput = DateInput; item.ObjectX = ObjectX; item...
0
4257719222f5cd75d039055f820c62fe
757d460b004bd593963b695841294788
effectue un tri des faces de l'objet dans l'ordre des z decroissants => cf algorithme du peintre
sorted_faces = [] sorted_coords = [] for face in self.objects: face.update_pos() x = [] y = [] z = [] for i in face.coords_cache: x.append(i[0]) y.append(i[1]) z.append(i[2]) x...
0
a11446c9e4ea09b9d18542e28f4e4d65
46661635e5bda3ad31dfd951ef126d3e
remove stray title boxes from the screen
function fe_tmm_move_metabox_after_title() { global $post, $wp_meta_boxes; $group_ids = apply_filters( 'fe_tmm_move_metabox_after_title_ids', array() ); $post_type = get_post_type( $post ); $context = 'normal'; $priority = 'high'; foreach ( $wp_meta_boxes[ $post_type ][ $context ][ $priority ] as $key => $meta...
0