query_id
string
corpus_id
string
query
string
code
string
label
int64
a1952e1f3ef732e27ec01cdbd745919e
b3c77e22fe96dceb123c0bc987735b11
获取需要开标的定期产品
{ string strReturn = "当前产品存期类型:定期,"; double VarietyCount = 0; double Money_YouHui = 0; StringBuilder strSql = new StringBuilder(); strSql.Append(" SELECT A.StorageDate,A.InterestDate,A.CurrentRate, A.Price_DaoQi, A.Price_ShiChang,B.numStorageDate"); ...
0
93c242f54b3d659b1ea9ac4d2fa7bef3
78be82390e13bec595fca40b4188dd4a
欢迎界面设计——检查欢迎界面设计功能
hy_text = self.driver.find_element_by_xpath("//div[@class='top']/span") login_text = self.driver.find_element_by_css_selector("div.login>a:nth-child(1)") regis_text = self.driver.find_element_by_css_selector("div.login>a:nth-child(3)") shouye_text = self.driver.find_element_by_css_select...
1
c30e5a9c5dea28bd8ce689a9585ab218
8940e2d43c07462261a38eec0f6f3ed4
The Laravel session must be re-loaded before each test, otherwise the session state is retained across multiple tests.
{ $I->checkExtensionIsLoaded('openssl'); $this->setNewFactoryDefault(); $this->setDiSessionFiles(); $_SESSION = []; global $_SESSION; }
1
72b657890670221ae50e113ca1c59be9
585f5e6bdcccdfd0218a792684c51139
! Returns the number of scrolls (frames) per second. This is the frame rate which will be used when the scroller is in the AutoScrolling state. The default value for Maemo 5 is \c 20. \sa setScrollsPerSecond()
double GLAxis::GetPercentScrollback() { return percentScrollback; }
0
3b81f53b91116b13c2af0687753b09fd
80110c665490dba9dfd9f44770b8a9c7
Nim.available_actions(piles) takes a state (`piles` list) as input and returns all of the available actions `(i, j)` in that state. Action `(i, j)` represents the action of removing `j` items from pile `i` (where piles are 0-indexed).
def actions(board): actions = set() i = 0 for row in board: j = 0 for element in row: if board[i][j] == EMPTY: actions.add((i, j)) j += 1 i += 1 return actions
0
26768b6772db924fb63aa1b915667280
dddb4edf73a67997b608e7be66a7777d
回滚已发布的内容
HttpServletRequest request=ServletActionContext.getRequest(); String idsStr[]=request.getParameterValues("ids"); List<Long> list=new ArrayList<Long>(); for(String idStr:idsStr) { list.add(Long.parseLong(idStr)); } contentService.publishBatch(list); return null; }
0
d7a46f6bfae51f16a7b1d08bfbdff77a
bde0d1f62a1046aa03f53ee1e4662ad7
通过缓存获取系统编号清单
@Service public class SysDicServiceImpl extends BaseServiceImpl implements SysDicService{ @Override public List<DicVo> getDicList2Cache() throws Exception { return dbManage.selectListByCondition(SystemConstant.DEFAULT_DICID); }
0
5d7187bada479bce3b3b3af2cd2b4a70
806ced30205938b0132c749b9e03b1c7
Called when a craftr module is being imported before it is executed to initialize its contents.
namespace Damocles.Modules void PreInitialize();
1
9dca3a891b37a552055a130285cff9bd
c12665fbd70c603c663ff98f41aed2bd
Gets the About Us link found in the footer
try: html = requests.get('http://developerexcuses.com', verify=False) except requests.exceptions.RequestException, e: log.err(str(e)) return parsed = soup(html.text, 'html.parser') return parsed.a.text
0
bb84dc92f2155e0b848747b39ffc7a70
ecf03c2cbb9f427df47c17aa55233e4d
ファイルを元にシステム管理情報を作成します。
Result create_system(char *init_file, ChallengeRoomSystem **sys) { if (init_file == NULL || sys == NULL) { return NULL_PARAMETER; } FILE *input = fopen(init_file, "r"); if (input == NULL) { return NULL_PARAMETER; } (*sys) = malloc(sizeof(**sys)); (*sys)->system_last_known_tim...
1
e056b1657feff004bc116180a51bea58
515974118adede99cdc367de04b8324c
@brief Set the high pass filter
status_t LIS3DH_SetHPFMode(LIS3DH_HPFMode_t hpm) { u8_t value; if ( !LIS3DH_ReadReg(LIS3DH_CTRL_REG2, &value) ) return MEMS_ERROR; value &= 0x3F; value |= (hpm << LIS3DH_HPM); if ( !LIS3DH_WriteReg(LIS3DH_CTRL_REG2, value) ) return MEMS_ERROR; return MEMS_SUCCESS; }
1
73198eac977c5a787597535f7b4d548e
e8a691a2613df19750dee33b105ebe75
修改云服务器 修改云服务器信息,目前支持修改云服务器名称及描述和hostname。 Please refer to HUAWEI cloud API Explorer for details.
try: params = request._serialize() body = self.call("ModifyService", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.ModifyServiceResponse() model._deserialize(response["Response"]) ...
0
266d4a95012060dca7f4c6515b53b1ab
b31e59a797abd4034d5779bfde00525f
获取环保标准数据的总页数
var totalRecord = 0; if (!isSearch) { $.ajax({ type: "POST", url: "totalSewageTestRecord", async: false, dataType: "json", success: function (result) { if (result > ...
1
3b496a33b5844754775b26938ff95310
aef51121758d38110b9092c990fcb085
對齊底座
public class Home_Building : MonoBehaviour public void FixPosition () { if (mAnchor == null) return; transform.position = new Vector3(mAnchor.position.x, transform.position.y, mAnchor.position.z); }
1
028262a2e27b268585abc04fb5fdc938
650fc2eeac3097891a30a4e4b96e10aa
Show all fields and fieldsets
class CustomFieldController extends BaseController public function showAllFieldsOfFormAction(Request $request, $id) { $this->checkManagerHasAccessToCustomForm($id); $projectId = $request->get('customform_projectid'); $project = $this->get('aap_bundle.project_manager')->getProject($projectId,...
1
1b0eae538d8d8517d661e275d0f24fcd
13f864c0a7b637d81cdd171e7058ce88
绑定ListView的适配器
public class ZiXunActivity extends AppCompatActivity implements AdapterView.OnItemClickListener private void setAdapter() { ZiXunAdapter adapter = new ZiXunAdapter(); adapter.setData(mList); mLv.setAdapter(adapter); }
1
807ee334e894d9694aa6d85db4926c88
f231594b5d681efe2471d9b6fedcaef9
Gets a string containing the current language initials.
class Agent extends \App\Entities\Agent implements \Doctrine\ORM\Proxy\Proxy public function getInitials() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInitials', []); return parent::getInitials(); }
0
bfde752d3b9416161a87f8d8e181e7bd
7eeec9b982bac37b430ff50be44de7a1
Load image data from disc.
class Image: def load(self, filename=None): if filename is not None: self.filename = filename if not self.filename: raise NoFilenameError() fh = None try: fh = open(self.filename, "rb") data = pickle.load(fh) (self.__width, self...
1
884fe5274d090b7b23467b0995c3b902
fad381293c79c445d3a11abd127c321f
Solve a matrix recovery problem based on the given constraints and an initial guess.
namespace CSparse.Interop.ARPACK public abstract class ArpackContext<T> : IEigenSolver<T> where T : struct, IEquatable<T>, IFormattable public abstract IEigenSolverResult SolveGeneralized(int k, T sigma, Spectrum job = Spectrum.LargestMagnitude);
0
b093d99eebef69fc502aa3f292eeba6f
3a2a87d51094ecc7591327ec2e592446
返回税种,从数据字典中读取
export class EditMaterielNewReturnService implements OnInit getTaxClass(e){ let arr=e.split(' '); this.taxClass=arr[0]; console.log(this.taxClass); }
0
851af9ff3684e0bf0375f991f9cd7749
b299bad23f900c87284365833934fea8
中序遍历-->即按 lChild-->node-->rChild(先“左子节点”,然后“自身节点”,最后“右子节点”)的顺序来递归遍历
func InOrder(node *Node) { if node == nil { return } InOrder(node.Left) Visit(node) InOrder(node.Right) }
1
56717b43e2c8b5226d61e3fa18cc38f4
20a915634d3daac9b1eb0106bbaa1697
Deletes every existing variable by clearing the "vars" folder from "resources".
{ $blackBoxDir = opendir($this->varDir); while (true) { $fileName = readdir($blackBoxDir); if ($fileName === false) { break; } if ($filename == '.' || $filename == '..') { continue; } if (preg_mat...
0
1c592ed3e590e43fb14c80efa96fd2fb
6aec3f948d95b5371bcb6bf1d57508a2
Configure the component so that every dependent component or call to Resolve() gets the same, shared instance.
namespace ampersand.Core.Common public class Container : IContainer public class DependencyManager public DependencyManager AsSingleton() { object value = null; Func<object> service = container.Services[name]; container.Services[name] = () => value...
1
d27b58f95bec815c08c0d451629b4c80
0705e027dbe3e480c7e09c7b7ced9efe
Create from data in a Traversable instance.
{ if (null === $object) { return; } if (!(is_array($object) || $object instanceof \Traversable)) { throw new \InvalidArgumentException(sprintf( 'Traversable element expected, %s given', is_object($object) ? get_class($object) : gettype(...
1
eb9b2dede6526f39793150ab73cfa7c0
b8a01b34a8109e191a869351ef6c8151
Метод вытаскивает из армии одного юнита и удаляет его из армии
public class AIDrunk : AI public override UnitType PickUnit() { return base.battleManager.EnemyBC.Army.GetRandomAvailableUnit(); }
0
042298ebd3e9b44b3f7abc3ace5a9556
5e9405e6ddcf8ed2f8afcb0964b6f311
convert a Panel x coordinate to a raw x value.
public class GraphPane extends JPanel implements EventListener public int getGraphX(int x) { return Math.max(x - leftHeaderWidth, 0); }
1
e3ce5d3415dd3a26a8c5c8fe19d4a386
005927d079dc9d4a607ea5b83f7ebdac
PE3 chip select for accelerometer
static void SELECT (void) { GpioDataRegs.GPECLEAR.bit.GPIO130 = 1; }
0
5357ec98d3b19be9bc85b2ea5f926f6c
ddb911c702367c86bc81bdcc92e4842e
заполняет форму для неавторизованных пользователей
{ $HTML = ""; $HTML .= "<div id='nullAccountUserPhoto' class='userPhoto'>"; $HTML .= "<img src='".base_path()."images/icons/Vhod_photo.PNG' class='bigIcon' \">"; $HTML .= "</div>"; $HTML .= "<form name='addNullAccountForm'>"; $HTML .= "<table><tr><td>Фамилия</td><td><...
1
d0b250aff32e03542e8f19d4b5e8289d
7feff6d5ad6b6f3923428badb5d0c0e1
function to create the randomly generated compliments
prefixrandomizer = random.randint(0, (len(prefix)-1)) complimentsrandomizer = random.randint(0, (len(compliments)-1)) emojirandomizer = random.randint(0, (len(emojis)-1)) update = prefix[prefixrandomizer] + " you are " + compliments[complimentsrandomizer] + " " + emojis[ emojirandomizer] twe...
1
6bdcdfe8a2feeced2a641a9539cf10ed
6e0ee2ae024124c0f4903354aa5935f2
Show Add Item Input Block
{ $branches = ShopBranch::all(); $categoryList = Category::all(); return view('dashboard.item.item_inputs',compact('branches','categoryList')); }
1
19d66c8af2444724e44a109c0b4ad92d
c3e36e7acd2eeb08f638c15beaf7b9b2
Scores for each variable in the given clause how many clauses would be satisfied if the variable value were flipped. Returns a list of variables indices with the highest score.
unitc_i = [] for i, c in enumerate(self.clauses): if self.csat[i] is False and self.cfreelit[i] == 1: c = self.clauses[i] for j, v in enumerate(c): if v != 0 and vs[j].value == 0: unitc_i += [(i, j)] ...
0
24fe6e51460bf449b1dd3d5f97afa8f9
b55b4f1c625057d6df0cb6afb135a2b1
选择排序 时间复杂度:O(n^2)
public class Num628 public void select(int[] nums) { for (int i = 0; i < nums.length; i++) { for (int j = i + 1; j < nums.length; j++) { if (nums[i] < nums[j]) { int tmp = nums[i]; nums[i] = nums[j]; nums[j] = tmp; ...
0
bdcb40c15b92494e495b06d5ab697aa3
c72f422053c5f69e6c9874c1422f0beb
Returns the set of unique words contained in an e-mail message. Excludes any that are in an optionally-provided list. NLTK's 'wordpunct' tokenizer is used, and this will break contractions. For example, don't -> (don, ', t). Therefore, it's advisable to supply a stopwords list that includes contraction parts, like 'don...
all_names = [name] if asciiname is not None: all_names += [asciiname] if altnames is not None: all_names += altnames.split(',') all_words = set() for n in all_names: for word in n.split(): all_words.add(word.lower()) ret...
0
ff9a740d4ee3b4cc2d2488e692b93110
55369d1f317141f5d57ecfef352aa63e
根据id查询adminRole信息
UmsAdminRoleRelation queryById(Long id);
1
35b32e2ca708cacfa786a64195d090a0
cafd194f72a07389e60bc6dc02b499ae
Gets the definitions of scoring in this ladder.
public IScorings scorings();
1
2161fcc302e17292f70d21950ea56d4a
cd4b75bc95ec204ffd3a7fdb04bff1b4
Sort the list of pages in accending order by pgno. Pages are connected by pDirty pointers. The pDirtyPrev pointers are corrupted by this sort.
PgHdr *p; for(p=pCache->pDirty; p; p=p->pNext){ p->pDirty = p->pNext; } return pcacheSortDirtyList(pCache->pDirty); }
1
ab6435731f42f041c910d0ee260d7491
38ea03a0fb40c08017482d1901d85c96
Returns the current source for the LED Feedback
uint8_t TauPPG::getLEDCurrent() const { return R_ledCurrent; }
1
b4d858a2b4c1d1a77b00a99573ff9823
c67b72b55949f1917e3cb3239a91bca2
Sets the disk directory sizes.
class DiskIOPSToCapacity(object): def _PopulateConfigs(self): self._SetSize() self._SetCPUCount() self._SetNumberDisks()
0
117932def203d8cdb5b4d04c1d396e2e
712c7918061eaae737f74eed999cca38
Appends a wire encoded 32 bit integer to the message content.
if not wire_format.INT64_MIN <= value <= wire_format.INT64_MAX: raise message.EncodeError('Value out of range: %d' % value) if value < 0: value += 18446744073709551616 self.AppendVarUInt64(value)
0
f44d9bbfb20c464077cffa31c7ef964c
220a3980f32006f19974ce2d4f48edd8
获取当前时间,秒数
public class DateUtils extends org.apache.commons.lang3.time.DateUtils public static String getSeconds() { return Long.toString(System.currentTimeMillis() / 1000); }
1
d26c471f523c000860e9a0bc57b31723
d58422106dcd7aee342894a9dd3d6db7
Clicks the "Accept invitation" button and waits for any Ajax calls to complete
public class InvMgrSiteDetailPage extends InvMgrSiteDetailsCommonPage public void clickOK() { browser.clickGuiObject(".class", "Html.A", ".text", new RegularExpression("O(K|k)", false)); }
0
863a9e53271b7463e4c120a43a3aa03c
daad63ed9ab0c60facf608c5a492987f
保存用户信息 返回-1表示操作失败 成功返回影响的行数
namespace UI.Web.Controllers public class UserController : Controller public int SaveUser(UserInfoDto dto) { var obj = UserInfoSer.Save(dto); return obj.code == "0" ? 1 : -1; }
0
bbe8377f7debd83fe0448cfc85711504
dd24f7e846207701555ad51f98fc1227
# Implement the RELU function. # # Arguments: # Z -- Output of the linear layer, of any shape # # Returns: # A -- Post-activation parameter, of the same shape as Z # cache -- a R list containing "A" ; stored for computing the backward pass efficiently
relu <- function(Z){ A <- pmax(Z, 0) cache <- Z list(A = A, cache = cache) }
1
8eb1a696a261390320e8a721e7470a50
381956aaa10a674e6999a3a307f23ebc
Проверяет габариты посылки
if (!_.isNumber(delivery_type)) { return false; } if (delivery_provider === '' || !_.isString(delivery_provider)) { return false; } if (!_.isNumber(delivery_tariff) && !_.isNumber(delivery_price)) { return false; } if (delivery_type === deliveryTypeToPoint) { if (delivery_point_out === '' || _...
0
e700a1777d4abadaa51156f2bcad185a
d101dfcdeb9e9fb3c17f78bd13a70e97
今後のために、ユーザーとESが必ず紐づくようにDBを設計しているが、 管理者側で作るESはユーザーではない所から情報を持ってきているためダミーユーザーを作成することで対応している
class DatabaseSeeder extends Seeder public function run() { App\User::create([ 'name' => '管理者', 'email' => 'admin@gmail.com', 'password' => Hash::make('12345678'), 'remember_token' => str_random(10), 'role' => '99' ]); App\User::cr...
0
702ceef896b9a1f5d1e7ee553006d12f
f796f6a5367d4681602b52d303d0d84a
I serialize RDF graphs in NTriples format.
class ResourceAllocation def to_ntriples() buffer = RDF::Writer.for(:ntriples).buffer do |writer| writer << to_rdf end return buffer end
1
c870ba2ed50d9ffdf8f4215c6c9aa1e5
3f4587f46fb51db368ec14a2067f25ba
現在のノードに隣接しているノードへのリンクを取得する。
public class AStarNode : MonoBehaviour public List<AStarNode> GetLinkedNodeList() { return m_lstLinkedNode; }
1
7e13d67b4bbe66c03e5dfed54ef2ef79
95e73cff1b7683c87ea8cc6669fa9195
Buffer is "in use" if ownership transferred to raw connection or TLS until a future event.
class OCI_Lob public function getBuffering(): bool {}
0
2cfd95ffcd0c35e1c503f6620a133fa5
86643010ec4f6a40050ba23361b950c9
r"""Convert from bytes/unicode/str to a bytes object.
def _B(s): return s if isinstance(s, bytes) else s.encode()
1
f7eb4663e03c3d531599af9b279eb3b6
b2053ba8268f08635a7fe1441efb4b60
HTML tag attributes that allow javascript
function settingsGetHTMLTags() { return array('!--', 'a', 'abbr', 'acronym', 'address', 'applet', 'area', 'b', 'base', 'basefont', 'bdo', 'big', 'blockquote', ...
0
42bae696eb8383627bb3daffb55d01de
2a27f84381e7c7f00d8da224dc546dbe
显示按下颜色
void MainWindow::on_pushButton_clicked() { penColor = QColor DEL_COLOR; }
0
219810dccf89121ece0597035b861293
c8d8c79771fecf32a44a0b610874f0a1
Establish as start date the lastest out of the proposed and the joined date
class ProjectStep def handle_scheduled_start_date return unless persisted? raise ArgumentError if scheduled_start_date.blank? && old_start_date.present? return unless actual_end_date && scheduled_start_date.blank? self.scheduled_start_date = actual_end_date end
0
0fcef0e9fb4d45644ae66be9b3d4cabd
2228e81f7d4ae27c25ca377fbe8887b2
Saves the Contents. Invokes Export() if Contents is empty.
{ if ((DataContext?.SaveContentCommand is null) || (!DataContext.SaveContentCommand.CanExecute(SaveReason.UserSave))) { return; } await DataContext.SaveContentCommand.ExecuteAsync(SaveReason.UserSave); ValidateButtons(); }
0
6db1b252ee61d1fab004fb67112ffbe9
c3eb1fd3ed751dc1743eb5925fdc1903
get the base dir free space in MB
global $DB; $fileDir = $DB->get_field_sql('SELECT SUM(filesize) FROM {files}'); return $fileDir . " MB"; }
0
94831db6cd5f5d278f014a92da39f73b
ed33d43e081b0c399e201a17b05e5c0d
# 您或您的配偶是否单独或共同控制艾德证券期货之其他保证金账户35%或以上之表决权?
class Checking(object): def ck002(self): ma_18 = self.data.MA(18) if self.data.MA(3)[0][-1] > self.data.MA(6)[0][-1] > ma_18[0][-1] and \ ma_18[1] > 0: return True return False
0
6fea0f15f54620d23e0d0faf5cd7ab1d
b86eb8bc34f99b25ffaa28f0d0f824e6
親プロセスからのメッセージを受け取ったときのコールバック\n これは、サブプロセス
printf("親プロセス\n"); int fd[2]; if (pipe(fd) == -1) { error("pipe作成失敗"); } pid_t pid = fork(); int status; if (pid == -1) { error("fork失敗"); } if (pid == 0) { fprintf(stderr, "子プロセス設定開始\n"); close(fd[0]); dup2(fd[1], 1); fprintf(stderr, "子プロセス設定完了\n"); printf("hello!\n");...
0
40c9297066b92190aa4a2ff215713ce6
a4d629a12e664e786bc11f52ea576b6a
Start TicTacToe game with RL Agent.
ttt = TicTacToe() while not ttt.check_state()[0]: print(ttt) next_move = np.random.choice(ttt.get_moves()) ttt.play(next_move) print(ttt.board()) final_state = ttt.check_state()[1] if final_state == 1: print('VICTORY') elif final_state == -1: print('DEFEAT...
0
8510e12027b1a09fac94558228d10ecb
c704655e54579ca8e3923ff0c39630c6
Turn the date into a string of the form day month, year
class FanzineDate: def __str__(self) -> str: y=self.Year yt=str(y) if y is not None else "" m=self.Month mt="" if m is not None: mt=MonthName(m, short=not self._LongDates) if m is not None else None self._LongDates=False if self._...
1
d1a32c685f1917c053fda7c42354884b
1f9c46b88e739f68da3a190b593fab6e
Creates PolynomialExpansion object to expand the scaled features in polynomial space
class PolynomialFeatureExpansion(object): def transform(self, X): bias = np.ones([X.shape[0], 1]) Z = [bias, X] if self.__degree < 2: Z = np.concatenate(Z, axis=1) return Z linear_features = np.split(X, indices_or_sections=X.shape[1], axis=1) if self.__deg...
1
6d5bb30733f50b8286a52015a912ee8a
240a9a5d31fb1ee2199a2d4f95932071
Assert the select has an expected option.
{ if($this->isFailed()): return false; endif; return $this->_expectsToBe('isSelected', $by, $attempts); }
0
a0988a8e2b7f53429b8ca89badda8259
b02c6a8701002a4e2afcb9bbad1eee2b
Activación de una tarea suspendida por evento esporádico
class User extends Authenticatable public function cancel($eventId) { $this->scheduledevents()->updateExistingPivot($eventId, ['deleted_flag'=> 1]); }
0
3c06172be50555f0ac6b044e467ca9aa
147772a3ded1495aca49882145bd660c
Data de nascimento&lt;br/&gt;Formato: &#39;yyyy-MM-dd&#39;
abstract class BaseUsuario extends BaseObject implements Persistent public function getNascimento($format = '%x') { if ($this->nascimento === null) { return null; } if ($this->nascimento === '0000-00-00') { return null; } else { try { $dt = new DateTime($this->nascimento); } catch (Exception $...
1
ae4a2b9ac4a3767373f5c0574c69f371
7ee535020e92cea9e21a0c76484a95c4
Set the fonts bounding box.
{ const textMetrics = this.getTextMetrics(); const textSize = util.to_unit( [textMetrics.width, textMetrics.height], "pix", this._win, this._units, ); const anchor = this._getAnchor(); this._boundingBox = new PIXI.Rectangle( this._pos[0] - anchor[0] * textSize[0], this._pos[1] - anchor[1] *...
1
80613b22ddfcca5fe51793a9486b192d
494add8b28b25419eed0a9f9cb7e798f
---------------------------------------------------------------------------- Count Leading Zeros
namespace System.Runtime.Intrinsics.Wasm [Intrinsic] internal abstract class WasmBase public static int LeadingZeroCount(uint value) => LeadingZeroCount(value);
1
6bcba3a8a1e5d002ee6afbbd9cd3486c
420d01f805c67c7dac6f511eb0135bd2
Write out prefs and recent_projects files
void pcache_write (void) { if (pcache_init_maint_initialized) { write_tokens_file (1); write_hash_files (1); write_messages_file (1); } }
0
cbd75e58d791a184782c2e8fb581cef4
6eaefa643afcfcc0759d8bd212c87fd0
Update the number of lives the player has
public class GameManager : MonoBehaviour private void SetLives(int amount) { livesLeft = amount; lifeText.text = livesLeft.ToString(); }
1
9cde660b56a3533e8503264db61a0d0e
34003fd633220c1205004269851af5b5
リソースの記述内容から行の定義辞書を初期化する
namespace KS.PizzaEmpire.Unity public class ResourceManager<T> where T : UnityEngine.Object public void Initialize(string resourceList) { ResourceLocations = new Dictionary<ResourceEnum, string>(); ResourceCounts = new Dictionary<ResourceEnum,int>(); ResourceObjects = new Dict...
1
a1c06896206dab751d5f2a4bd84f5423
1b242060b45445e48109b02b9807ebcf
Clear the current itens when closed.
class EdShelfBook(ed_book.EdBaseBook): def OnItemClose(self, evt): evt.Skip()
0
86be7e8e7d88abe1d40aa90cf287a84a
5163dae21e4d5cf0c292caec8594b4cc
Consulta o backend para saber se há críticas sendo geradas ou não. Consulta Status de Críticas no momento. e retorna as criticas
class HistoricoController extends BaseController public function postListarcriticos() { $telefono = Input::get('telefonoCliente'); try { $reporte=Historico::getListadoCriticosCobre("fono", $telefono); } catch (Exception $exc) { $this->_errorController->saveError($exc)...
1
bd52e00d14f1f0740216a86ac0252574
f9cddc705e57b8896b794a7b6439242b
Find checksum by multiplying the number of codes that have duplicate characters and the number of codes that have triplets of characters
for x, y in pairs: mult = x * y yield (numpy.sum(mult == 1) + numpy.sum(mult == 4))
0
500dc12a95d4ed2282063de318eb2e04
e80f22924ecb744792893797fa6e3039
文件名去后缀
String suffix = getSuffixByFileName(filename); if ("".equals(suffix)) { return filename; } else { return filename.substring(0, filename.length() - suffix.length()); } }
1
7742852122a52d71aeaee1fc9915217e
de8fde7ab1d73c3bf8ad0b93716806a6
Resets the value in the spinbox after each click
def update(): ui.textBrowser.insertPlainText( str(ui.spinBox.value())+"\n") ui.spinBox.setValue(0) ui.buttonBox.button(QDialogButtonBox.Ok).setEnabled( (True))
1
574c00f641eb3a9b2302f74ac460f248
11e648ea221c10dea7ade7ecaf342a53
同步单个设备
public String addSingle(@RequestBody Device device, @PathVariable("varietyString") String varietyString) { int variety = "bluetooth".equals(varietyString) ? 0 : 1; if (NullUtil.isNullObject(device.getSn()) || NullUtil.isNullObject(device.getMacAddress()) || NullUtil.i...
1
bd2396e02a6df848249ada319f5cec27
98dda111a4fa8dd7a31fee464e0b9fe0
Finish logging threads and flush buffers.
static VOID LogpFinalizeBufferInfo( IN PLOG_BUFFER_INFO Info ) { NTSTATUS Status; NT_ASSERT(Info != NULL); if (Info->BufferFlushThreadHandle) { Info->BufferFlushThreadShouldBeAlive = FALSE; Status = ZwWaitForSingleObject(Info->BufferFlushThreadHandle, FALSE, NULL); if (!NT_SUCCES...
1
7f400e2be4edf3d5cfb4b7119bd66baf
81e71445ca6d2ebee0eb5ac9f0c920b6
有密钥时刷新密钥值
{ try { int Rtn = 11; int APPID = Convert.ToInt32("FFFFFFFF", 16); Rtn = NoxPlusAPI.NoxFind((int)APPID, KeyHandle, KeyNumber); string uPin = "12c9d3666676c3456971cea84ec21ad9"; if (NoxPlusAPI.NoxOpen(KeyHandl...
0
4f0a18f82c64a225efd55e7f517be84d
f7c8b7ce272b7abbbe4516c885508015
Animate player sprite
function animator(player, leftInput, rightInput, upInput) { console.log("direction" + player.maxSprite); console.log("facing" + player.facing); player.sprite++; if(player.sprite >= player.maxSprite) { player.sprite = 0; } if(leftInput) { player.dir = 2; player.fa...
1
b88c786247d94a7d0ce76f3c3b1d4ec4
060b89a08677a2fab13b1314b3091b75
功能函数,简单的通过参数true/false来控制成功失败。
isSuccess(flag){ isSuccess.push(flag); }
0
e681e427b5450c8a52eb56f25922981a
2f6fd4f195299ace64d02d866dd63b80
Find all the words that match a string of letters.
all_words = [] for word in words: if letters in word: all_words.append(word) return all_words
1
c3cb9a563a155cbbe846909126553db1
2d35bb2023ca57cfdef312a8d6f59dd4
对 ActivityThread 类中的 mInstrumentation 字段进行 hook.
try { val amClazz = Class.forName("android.app.ActivityManager") val iamsField = amClazz.getDeclaredField("IActivityManagerSingleton") iamsField.isAccessible = true val iamsObj = iamsField.get(null) val insClazz = Class.forName("android.util.Singleton"...
0
0d38d73c1b45784bb6cfe5737c9b3b49
bd1d1bfe1d2104c4273157d6f734734c
Method to retrieve Qual Code when Qual Description in hand
public class qc_rpwar extends cl_rbase private void getWATCOD(String L_strTSTTP) { try { vtrWACOD.removeAllElements(); vtrWADES.removeAllElements(); M_strSQLQRY = "Select CMT_CODCD,CMT_CODDS from co_cdtrn where cmt_cgmtp='SYS'and CMT_CGSTP = 'QCXXWTP'"; M_strSQLQRY = M_strSQLQRY + " and CMT_MODLS like ...
0
a384a39f7f33b72b8506a648268c9f8c
9e38ae2b712e142221d228a88ad7019e
! \brief Returns the line number for the given point.
window_point_to_column (WINDOW *win, long point, long *np) { int i; window_compute_line_map (win); if (!win->line_map.map || point < win->line_map.map[0]) return 0; for (i = 0; i < win->line_map.used; i++) if (win->line_map.map[i] >= point) break; if (np) *np = win->line_map.map[i]; return...
1
11b0a23b5cdbc24c0b3cef0ccfd4e25f
64e6983abfe2fcc331d4b7f1032e8b82
采购订单明细,带出采购主表
public List<PurchaseOrderDetail> selectPurchaseOrderDetailList(PurchaseOrderDetail purchaseOrderDetail);
0
2948f8da4fb2a090a585e276fffe81cd
c0d5b1ea584336e0390828423786d0e0
Clear an employee's direct deposit information
public partial class Reporting_Default : System.Web.UI.Page private void clearEmployeeInfo() { tbxId.Text = String.Empty; tbxFirstName.Text = String.Empty; tbxLastName.Text = String.Empty; ddlPositions.SelectedIndex = 0; tbxPosition.Text = String.Empty; ddlEmployers.S...
0
4f8909370f496d57d112b4e8f42517a9
98ea4e9ef911e66537c123b7d61fe62d
This method returns the active collection name.
public String getCollectionName();
1
dd6f99dfaf475a7ccaa5636422bf3ff7
d0b41ed0addee06f228094a1f775d0ab
添加 「属性-属性选项值」 或者 更新 「属性-属性选项值」 以提交的数据为主,如果数据库中有,提交的数据没有,则删除数据库中的数据 如果数据库中没有,提交的数据有,则新建新数据并且删除数据库中和提交的不一致的数据
propertyValues.forEach(propertyValue -> { if (propertyValue.getId() != null){ propertyValueMapper.updateByPrimaryKey(propertyValue); }else { propertyValueMapper.insert(propertyValue); } }); }
0
dd601b37056887588b4df04669015c91
b5c47b40e72e9963c43ddeec62c4c5d2
重启ha函数
def restart_haproxy(): controls.restart_haproxy()
1
da3200e44e74ad1f1c723d0ffaf23b12
dc54ea057b4176ec30fa0a1eb9367f23
获取主机网络信息
func getHostInfo(){ hInfo, err := host.Info() if err != nil { fmt.Println("host.Info() err : ", err) return } fmt.Printf("host info:%v uptime:%v boottime:%v\n", hInfo, hInfo.Uptime, hInfo.BootTime) }
0
e2bce7f1141b2276e632767006804506
9a3ff69adc647d8a63e6b2a9368ef6b0
Method to be called in onBeforeRebindTable or onBeforeRebindChart to ensure that errors are handled accordingly
namespace ProductTracking.Views public abstract partial class BasePage : Page protected virtual void LayoutRoot_BindingValidationError(object sender, ValidationErrorEventArgs e) { }
0
25fe777d4740148b9e51a666da8f2500
d26f391819863ca006f9e684d53b35fc
获取总时间,以毫秒为单位,比较第一帧和最后一帧的时间得到
if not fps then fps=30 end local frameTime=csbAct:getEndFrame()-csbAct:getStartFrame() if not frameTime or frameTime<0 or frameTime>9999 then frameTime=0 end local time=frameTime/fps return time end
0
bef4d033b7aa2829af2aba1dfcd647d9
98bf515c2991d4c93ea584ea0060752a
Get the Check Fee label.
class Weee extends AbstractTotal public function getLabel() { return ''; }
0
982be4c2df2e185117f55b70d2df9c8d
729eccaf92c88d4cdefbe0c65cc59bfa
! Read the current state of the digital input and set the check box to this value.
void Dial_AsmDaq::on_checkBox_Asm3_clicked() { state[3]= ui->checkBox_Asm3->checkState(); display(); }
0
d7349e5a51ae4513cec8ec68798767ce
cb6d63902aa1febf74d8079e0fbe76b2
修改非网站类转发规则的防护规则
export class WafClient public updateAnticrawlerRule(updateAnticrawlerRuleRequest?: UpdateAnticrawlerRuleRequest): Promise<UpdateAnticrawlerRuleResponse> { const options = ParamCreater().updateAnticrawlerRule(updateAnticrawlerRuleRequest); options['responseHeaders'] = ['']; return this.hcClient.s...
0
3c584b2beceb9a5b7bc56be71d6c7745
749ea34038cb827f28f0487c273bfd16
文本框键盘事件处理
void TBTextField::textFieldEvent(cocos2d::Ref* sender, cocos2d::ui::TextField::EventType type) { }
1
4ae06d69dd906aa271add298b190d138
50c1246935f7cc74aea1762e135578ea
return true if there are app parser decoder events. These are only the ones that are set during protocol detection.
export class Parser extends AQObject public haveEventData():bool { return this._didParseEvents; }
1
79e992d8aa65da1346138f62a4d11ca5
cc218217ec1f1559b4cc62043d815eaf
Depending if the tCase argument is passed we either set the case of the given string or we get it. Those functions can be expanded for other text cases.
if(type == 'lower') { text = text.toLowerCase(); } if(type == 'upper') { text = text.toUpperCase(); } if(type == 'sentence') { text = setCharAt(text.toLowerCase(), 0, text[0].toUpperCase()); } if(type == 'title') { ...
1
3166ee97724726cf93380814f925e31f
99ee4ef1021fec63658b83d00181d1fc
添加用户到标签
class UserController extends BaseController public function labelUser(){ $uid = I('param.uid'); $lid = I('param.lid'); $cid = session('LOGIN_USER')['id']; $data['uid'] = $uid; $data['lid'] = $lid; $data['cid'] = $cid; $data['time'] = date("Y-m-d H:i:s");; ...
1
553596dca71428c29e64ab4b3b1e57bf
36f9b1a8d0334c77a09fb224dc2d8481
生成前端json配置文件函数
global result result['1'] = single result['2'] = multi result['4'] = judge json_result = json.dumps(result, ensure_ascii=False) f = open(output_name, 'w', encoding='utf-8') f.write(json_result) f.flush() f.close()
1
09194e52e1ab30bc09156f8b2aaeeeb4
649aaa9256ec54eb9837a65391e5c3f2
Copy constructor that copies simulation info from _result to self
: K{other.K} , N{other.N} , W{other.W} , bench{other.bench} , arch_file{other.arch_file} { }
0
6072dce9a648459a248aebb07ec784cb
b5ba4c40bc665819b481578af5df2545
Method invoked when the user decides to exit without saving any data.
public class ControlCentral implements ICentralConstants, ISelectionEditingListener, IEditModusListener public void exitProgram() { if (wfnModel.isCurrentWfnSaved()) System.exit(0); Object[] buttons = { "Cancel", "Without Saving", "Save"}; int n = JOptionPane.showOptionDialo...
1
121aa783a4cdcdac9a34d86d2922855c
d1f14e6876b460de57ba4619b140e6c1
Сериализует данные по поледним статусам в бин файл
{ List<string> data = new List<string>(); foreach (Bank b in this) { data.Add(String.Format("Банк: {0}", b.Name)); foreach (Client c in b.ClientsList) { data.Add(String.Format("Клиент: {0} {1} {2}, {3:dd.MM.y...
0