query_id
string
corpus_id
string
query
string
code
string
label
int64
b68c7961fb96e4ea7eb52563530873ed
497bfae70fe80cd0c8867f6da7fef43c
Sets the unit points.
for (int n = 0; n < _XPoints.length; n++) { _XPoints[n] = xpt; } _Xmax = xpt; _Xmin = xpt; }
0
17004915d14874da6bf5a2c3670adcd5
3350ad71688a43003bca65a6045b8771
Reorder hosts in the decreasing order of free capacity.
static HostStrategy ordered(List<URI> hosts) { return List.copyOf(hosts)::iterator; }
0
154fa60a03a54ca7526c5347e270886a
623131c05f80e4c692e77869fc9ad481
砲台のセット通信
public class GUIManager : PS_SingletonBehaviour<GUIManager> public void SetShipControll(shipControl shipControll){ Camera.main.gameObject.GetComponent<cameraLookAt>().target=shipControll.gameObject.transform; this.shipControll=shipControll; shipControll.gameObject.AddComponent<AudioListener>(); GameObject go=Ga...
0
6dde2bf1869961e4c1a2102b1416dbfa
b74ed3069d90e00a8bc8ff0865a68a11
Residualizes the given system.
def residual(ctx): Nspace = ctx.atmos.Nspace atom = ctx.activeAtoms[0] Nlevel = atom.Nlevel resid = np.zeros((Nlevel, Nspace)) for k in range(Nspace): iEliminate = -1 Gamma = np.copy(atom.Gamma[:, :, k]) Gamma[iEliminate, :] = 1.0 f = np.zeros(Nlevel) f[iElimi...
1
8b2d60c37f6c23e52a8ceb4aff57f683
36c5f687e94e7ab66e1960e4e40440a0
显示本窗体的一个模态窗体实例
namespace Zynas.Framework.Core.Base.Boundary public partial class BaseForm : Form new public void ShowDialog(IWin32Window owner) { ModalFlg = true; Show(owner); }
1
6c90b1102a7743ae8bb257e88283fc8e
a4dfa2ca178687b4cd2bcfcdda590934
录入清算指令.
namespace YuanTu.ISO8583.深圳 public class POS : ISO8583.POS public override Result<Output> DoReverseIC(Input input, List<CPUTlv> list) { var encoder = ContainerWrapper.CreateEncoder(); encoder.MessageType = "0400"; encoder.CalcMacFunc = CalcMacFunc; encoder.Val...
1
b4c2b235ceb16204acb19de93988c470
b909e84077c7e30801b3ec5802d89be3
retrieve list of item ids for a given association
class CollectionGroupsComponent extends Component public function _readItemIds ( $collectionId, $groupFieldId, $collectionGroupId ) { $collectionItemFieldModel = ClassRegistry::init('CollectionItemField'); $conditions = [ "CollectionItemField.collection_field_id" => $groupFieldId, "CollectionItemField.s...
1
622e6870282e658b45058e8ad2ee9a18
e40c1851ae3cb8f8acbc668bf3e792f4
Cette m�thode calcule et renvoie le prochain joueur qui doit jouer
{ int j=0; while(lesJoueurs_.at(j).getEtat()!=lesJoueurs_.at(j).getEnJeu()) { j++; } int mise=lesJoueurs_.at(j).getMiseEnCours(); for (unsigned int i=j+1;i<lesJoueurs_.size();i++) { if (lesJoueurs_.at(i).getEtat()==lesJoueurs_.at(i).get...
0
6b7f5cc1c47cea4af3f66d6a2a9ef3a3
658a097ee487df8be19ee3275bdad953
通过反射改变分割线颜色,
public abstract class BaseBrokenLineConfig implements IBrokenLineConfig @Override public int onGetDividerColor() { return Color.parseColor("#B7B7B7"); }
0
b81697348471faf1c7de9ff2dd0b529a
dce5422f0a7b41421b8798d8d5386c5c
Set alicuota
public class Valora implements Serializable public void setVlotas(Double vlotas) { this.vlotas = vlotas; }
0
83334bad69da358b77bdb4995dfdb452
3e3a724b276cef0909be0ffaaa6f96ed
回复鉴黄检测
class ContentAction extends AdministratorAction public function denounce($map) { $_GET['id'] && $map['id'] = array('in', explode(',', t($_GET['id']))); $_GET['uid'] && $map['uid'] = array('in', explode(',', t($_GET['uid']))); $_GET['fuid'] && $map['fuid'] = array('in', explode(',', t($_GET['...
0
71ef5fe8fe6c7546780c6cd83a904b45
926400db706f07aedc7938d18648d669
메뉴 추가 페이지에서 필요한 파라미터
class Admin::MenusController def menu_params params.require(:menu).permit(:name, :name_it, :name_en, :url, :position, :page_id) end
1
9c3be06ef0bba12f17e5ee2db54c676e
bd407542039be81abda8e8acbd45aa12
Convert from 0-based array index to physical coords
int life::getCoord(size_t i){ return (int) i * cell_sz; }
1
df266000286708c14580875587ec313c
9576cca07259ca8c46411d8f5d633bde
Ignore button chords with the left, right, and middle buttons
PointerEventArgs args) { var properties = args.CurrentPoint.Properties; if (properties.IsLeftButtonPressed || properties.IsRightButtonPressed || properties.IsMiddleButtonPressed) return; bool backPressed = properties.IsXButton1Pressed; ...
1
b7a73af805f95f121ab49580160686f9
751159ef2f5f4bf1d1b1528d1d44cddc
gridの指定の座標のtextを検査する
if (convertColumn(coordinate) > countColumns() - 1 || convertRow(coordinate) > countRows() - 1){ return false; } return GRID[convertRow(coordinate)][convertColumn(coordinate)]; }
1
b78f0a751a2899d38a84412eeeded047
feeb439d5092ae457125f98a02dd8216
デバッグ用ユーザーか否か
namespace EBSComponent.Persistence public partial class PersistenceEBS protected bool IsDebugMode() { return this.ParseHttpContext(HttpContext.Current, "IsTestUser").Equals("1"); }
1
0f64f228520cc6076efb71fccc283a2f
1c427650e07664ad3f3baf0c0f23311d
Get the ID of the MIDI message.
public class Message final int getMessageID() { return m_messageID; }
1
b719a5e7733d9cab72bb40eacce1bf13
3eef4c9c6773761a67f9571fff14b6c2
Devolve a lista de todas as avaliações deste registo
@Entity public class LearningGroup extends ElipseModel public List<Rating> getRatings() { return ratings; }
1
0b560a3ad3751c73ab13cd4d9393083b
4bb0f8e7eea25ec4f2885935eb9cccb1
获取 GSE2.0 灰度列表
$http({ method: 'post', data: { ticket: $location.$$search.ticket, domain: $location.$$search.domain }, url: serverUrl + '/plateSetManager/getGrayscaleList' }).then(function successCallback(response) { showError.hideLoading(); if (response.data.errorCode == 0) { $scope.grays...
1
c175961f006d3ab9fb3c642820d69ed6
5d3dbfc72bb794d85e90dbd5a3977d8e
Extract contents of a cube into a Pandas `DataFrame`.
def read_from_cube(filepath): with open(filepath) as f: lines = f.readlines() natom = (int)(lines[2].split()[0]) originx, originy, originz = numpy.asanyarray(lines[2].split()[1:], dtype=float) ngridx, spacingx = numpy.asanyarray(lines[3].split(), dtype=float)[[0, 1]] ngridy, ...
0
b573e25e4c4098f3779988c229bf93a9
f0f4ac7d9d773159bb475898d08094d7
ContentImport constructor.
class ImportFast extends Import public function __construct() { parent::__construct(); }
0
b3862e96f2f8f962b9b4bab0879b1745
fdfe6dbfeffeb548c64fa376b744cd9c
Send a RING signal to the SIP call leg
{ string Request = ""; Request += "SIP/2.0 1"; switch (_XX) { case "80": Request += _XX + " Ringing\n"; break; default: return; } Request += "From: " + this.MyName + " <sip:" + this.MyName + "@" + this.myIP.T...
1
dc920931daee558719652f03fee924ee
a5ac32403266e001a76d282b13b62e81
Verifica se o ponto é intero à figura
namespace WCAE.WGeos2D.Entities public class WRim2D : WEntity2D public bool Check_PointInside(double x, double y) { int polySides = Shape.Count; int j = polySides - 1; bool oddNodes = false; for (int i = 0; i < polySides; i++) { if ...
1
34c2d437ce7d1e74a88100cda0d89c88
598da2527af73a5bc44b9ec0c410b9ea
该函数通过不断调节参考电平,期望测得准确的数值 改进部分:可以用0Span的方式加快测量速度
float Estimate_ReferenceLight_original(float* I1, float* I2, float step) { float Rtest; float Rmin = 1.0; float Rmax = 2.5; float* I0 = new float[N*M]; float* Hr1 = new float[N*M]; float* Hr2 = new float[N*M]; float* Ht1 = new float[N*M]; float* Ht2 = new float[N*M]; float* y = new float[1000]; int ysize = (i...
1
4d16b11237813308becdcc1b6f69bf8b
3bfa6aaaadc7ab78c65525e5ac941ee6
Returns true if the given player is a Floodgate player, false otherwise.
boolean isPlayer();
0
a9e0362435edc87c124c265423f1214e
865b520cbb25db57408392299242201b
This class connects to the database and get all the columns stored in the database. With all the column information, it instantiate new BBCItem and add to the ArrayList.
ArrayList<NewsItem> result = null; URL url = NetworkUtils.buildURL(); SQLiteDatabase db = new DatabaseHelper(context).getWritableDatabase(); try{ DatabaseUtilities.deleteAll(db); String json = NetworkUtils.getResponseFromHttpURL(url); result = NetworkU...
0
b047eb443d9c8d2ea6dd5c4b87f47542
dd715b778c798a20bf3523a95a7ef3f2
Outputs a label and a password input, nothing fancy.
class Form extends BreadcrumbsModule{ public function password($name, $label = "", $defValue = ""){ $this->addInput($name, "password", $label, "", $defValue); }
1
8c5e6809c89ad222b6f3421c586aed74
8e12800dbf57593992b31e479b4dd50e
Generate a watcher for the GlobalMetricsProviders in the namespace.
self.connection = connection self.namespace = namespace self._metrics = {} self.last_time = 0
0
83504b8fd01c199fa25355ae0e136667
429a2878170dc0c6d8c1fcb20f1a9b9d
This appends the room descriptions to each location
public class Room public void setDesc(String desc) { this.desc += desc; }
1
0716933aa16052f86a1ee0bfe0a4e744
6980368136b9c302049c9c9a4992282a
Retrieve the rotation matrix from the global to local coordinates
mat4 Transform::GetLocalMatrix() { return m_globalTranslationMatrix * m_globalRotationMatrix * m_globalScaleMatrix; }
0
49e7e6f93f611a7533f716522f7a6d2e
4fa15f02cd0978d3d072276520db4962
Kalder endpoint som retunere summen af items i customer cart
return axios .get(sumEndpoint) .then(res => { return res.data }) .catch(error => console.log(error)) }
1
cbc401a4dc6dcdf35d83f7bc30c752d9
51604054d79244ada398c7333bdc780f
Sets the Activator Transform values
int i, iTrans; if( nSensors < m_nActiveSensors ){ CP_printf("\nWarning: wrong input number of sensors: %d", nSensors); CP_printf(" Should be: %d\n", m_nActiveSensors); return 1; } if( nSensors > m_nActiveSensors ){ CP_printf("\nWarning: wrong input number of sensors: %d", nSensors); CP_...
1
a2bba19c185f82e0b36750f4439643cc
c8ce644c6bd3902936dac6dac8f29fc0
串口2 IO口初始化 PA2 PA3
{ GPIO_InitTypeDef GPIO_InitStruct; __GPIOA_CLK_ENABLE(); GPIO_InitStruct.Pin = GPIO_PIN_2 ; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Alternate = GPIO_AF1_USART2; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(GPIOA, &GPIO_InitSt...
1
62144cc29da9accf2170d4a8465fcca9
95a7f561f0182a80df50c2ebeb0a8779
Returns c or an empty collection if c is null.
namespace Quantum.DMS.Utilities public static class CollectionExtensions [return: NotNull] public static IEnumerable<T> OrEmptyIfNull<T>([AllowNull] this IEnumerable<T> items) => items ?? new List<T>(capacity: 0);
1
16cb2007360c59c0374a147080a2484a
7345e7bcb3cfa0fd20f9acd37a85648e
定稿 insert 一筆到ProjectInfo_Check
namespace Pkurg.PWorldBPM.Business.BIZ.JC public class JC_FinalistApproval public static void InsertJC_FinalistApprovalInfo(JC_FinalistApprovalInfo info) { SqlParameter[] parameters ={ new SqlParameter("@FormID",SqlDbType.NVarChar,100), ...
0
2dee31dd9e0fbf0c4ac642c02cec5482
365def472289d27052cea3aee24f5922
Checks URL to identify the supported Database.
public boolean acceptsURL(String url) { LOGGER.info(String.format("acceptsURL: url='%s'", url)); boolean b = url.startsWith("jdbc:gd:"); LOGGER.info(String.format("acceptsURL: returning='%b'", b)); return b; }
1
9ebe65fecb40d69a1d4320a1e4298bf1
55cab7ef16f7504f11d313cd0bdb6822
Replace None with 0 for numeric fields.
class API(object): def _munge_dict(self, row): tmp = {} for k, v in row.items(): try: tmp[k] = int(v) except ValueError: try: tmp[k] = float(v) except ValueError: tmp[k] = v if v =...
0
e15f41a1af3d49955f931c22d1b2f0e0
290f6d831e119811fc044ce11077c1bd
Fsync a directory.
fd = os.open(str(path), os.O_DIRECTORY | os.O_RDONLY) try: os.fsync(fd) finally: os.close(fd)
1
88eed125e7499a014f4291bc0d6b9433
46778cb8a98c39b090b4bef304ff4cd2
Enables the Google Sitemap Generator and registers the WordPress hooks
if ( ! function_exists( 'surbma_yoast_seo_sitemap_to_robotstxt_init' ) ) { add_filter( 'robots_txt', function ( $output ) { $options = get_option( 'wpseo_xml' ); if ( class_exists( 'WPSEO_Sitemaps' ) && true === $options['enablexmlsitemap'] ) { $home_url = get_home_url(); $output .= ...
1
8716b48510f6c06e3adb477e56835097
a9adcd39aa456f771c7f01cbea876ebe
退票订单保存
class SaleRejectOrder extends Controller public function saveRejectOrders(Request $request) { $data = $request->post(); $saleVilidate = new SaleRejectOrdersValidate(); if (!$saleVilidate->scene('add')->check($data)) { return $this->renderError($saleVilidate->getError()); ...
1
f9a790625d091fe788f548a5829b1050
448e7713c2156107eb9e86b0e3c17086
目前只提供了 BinaryMetaSerializer
class SerializationHandler(meta.MetaMixin): def __init__(self, **kw): super(SerializationHandler, self).__init__(**kw)
0
4dab64031287ac4380567356b762d30c
edaf185572ceb7eadfe7dff2531fc952
渡した文字列の日付が含まれる週の最終日を返す
$dateTimeZone = new DateTimeZone('PST'); $theDateObj=new DateTime($theDate,$dateTimeZone); $passAry['thedate']=$theDate; $theDateAry = $this->getDateInfo($passAry,$base); $dayOfMonth=$theDateAry['mday']; $monthNo=$theDateAry['mon']; $noDaysInMonth=substr("312831303130313130313031",(($monthNo-1)*2),2); $...
1
8d70d75f467ba231a7f8bb34cfd6501e
725f5a574d5e914ec2a2d5d623b372b5
Returns an integer value for the small blind
class GameInfo: def getBigBlindSize(): pass
0
379ed0f471d247a15a0a137ab82a8e78
049cd9c7c67f09678c55d0c67eaa40e8
BanNotification notifies user of ban event
public class IrcControl extends PircBot private void onBanMsg(String nick, String host, String login, String hostname, String sender) { z0rControl.sendBan(nick, host, login, hostname, sender); }
0
aee8579069647392287392e94d0150b4
e96d53b9e541c20d8670bd1f1dc13b3a
根据 wkt string 得到 proj info
class OgrBase(object): def get_proj(proj_str="WGS84"): osrobj = osr.SpatialReference() osrobj.SetWellKnownGeogCS(proj_str) return osrobj
0
d08851a0a9381faf2970c48833fe53d2
7e5be782ae6391b5da95868f882d1e05
Test that we can create a simple CloudFormation stack that imports values from an existing CloudFormation stack
class TestCloudFormation(unittest.TestCase): def test_get_dev_stack_resources(self): pass
0
97fb02e5baca9af157403e74f5427506
ce722c2fdfc5f721fb43744f881474cc
설문지 삭제
def survey_delete(request, sid): survey = Survey.objects.get(id=sid) survey.is_deleted = True survey.save() return redirect('/show/')
1
bb050049862dc02890b8899817deb36d
5bdc476ca7182e9824c688499b28e2d1
逆卷积层
with tf.variable_scope(name): weight = tf.get_variable('w', w_shape, initializer=tf.truncated_normal_initializer(stddev=0.02)) biases = tf.get_variable('b', w_shape[-1], initializer=tf.constant_initializer(0)) conve = tf.nn.conv2d(inputdata, weight, strides=strides_shape, padding=padding) ...
0
21798e0b639c858ab3f1dee056bef473
76c1c90343b862d1816285a20ae0a966
Liste alle Bücher, die mehr als einen Autor haben
namespace WebbShopApi public class API public List<Book> GetAuthors(string input) { using (var db = new WebShopContext()) { List<Book> books = db.Books.Where(b => b.Author.Contains(input)).ToList(); return books; } }
0
669fed8010fdccfd324eff11ba6dc383
a3e5ef55044cec151d1bd0540ff7e317
Assesses the spectra's similarity using the normalized dot-product
def dotProductSpectra(foundSpectra,b,mz1=-1,mz2=-1,polarity=-1): if type(foundSpectra) == type(dict()): mzs = set(foundSpectra.keys()).intersection(set(b.keys())) num = np.sum([foundSpectra[x]*b[x] for x in mzs]) denom = np.sqrt(np.sum([x**2 for x in foundSpectra.values()])*sum([x**2 for x...
1
25b85b5f5ba7db45946f2e02d7f2fb6e
67d2d8826c1a1690315d7dd968c00076
키워드 배열에 추가
{ StringBuilder stringBuilder = new StringBuilder(); foreach(var temp in keyWords) { stringBuilder.Append(temp); stringBuilder.Append(","); } PlayerPrefs.SetString(Consts.KeyWord, stringBuilder.ToString()); Pl...
0
e252df96d9fd0851053480609bb086c8
4e1f36b5013f81a7c7c9b86708b465e3
Gets an array of day objects by trip id
$sql = "select startTime, endTime from `data` where tripUserId in (select tripUserId from `tripuser` where tripId = {$tripId}) "; $result = db_fetch(DB_ALL, $sql); return $result; }
0
a6a27492f5133cf5fcae268f5a8e761b
2832f61f3f57e138edfc6fb9d9ce7137
设定是否打开所有字符串字段的模糊查询。
public abstract class AbstractProcessQueryBuilder public AbstractProcessQueryBuilder setFuzzy(boolean isFuzzy) { this.isFuzzy = isFuzzy; return this; }
1
5e1be54ca1daaf07c6bcabf6fe18c54c
6265fb72cc3900f0233f2231b388dc40
Enable all registered modules in this controller.
class Module public function enable() { $this->register(); $this->boot(); $this->dispatch('enabling'); $this->activator->enable($this); $this->dispatch('enabled'); }
0
478c41b5b5206d886f001da87432b3c8
fde125c77f5243878f708bde845d4f8b
Calculates exact time of flight in seconds without farfield assumption.
d = (((PING_GetTimeofFlight())*(340))/1000) >> 1; d = (1.01*d) - 395; return d; }
0
43bb2e7a3bb6f3487c46657c5565221f
d573544701dbac54b3613bb4544f695b
Recibe una cadena de caracteres y Convierte la primera letra de cada palabra en mayuscula
int i; char texto_modificado[TAM_MAX]; strcpy(texto_modificado, texto); for (i = 0; i<strlen(texto); i++) { if(i == 0) texto_modificado[i] = toupper(texto[i]); else if( texto[i-1] == ' ') texto_modificado[i] = toupper(texto[i]); else texto_modificado[i] = tolower(texto[i]); ...
1
ef5bdd6942d85a84134c7911115dd646
84345658b4747b5cafa08b820ea25ab9
Function that represents taking forks
public void takeForks(int pNumber);
1
4340e5bbdbd8fd530842753c7cb0b316
65feac51aaba23b7e9f8954340299526
вибір варіанту виведення результатів
namespace DEV_7 class ChooseVariantAction : ICommand public void Execute() { receiver.ChooseVariant(options); }
1
d57d1db7b535a866d19c8748aa398c98
9e156ec53822a4ac1472255d7e153e91
A function that removes an asteroid object from the game
public class AsteroidController : MonoBehaviour void AsteroidDestroy() { Destroy(gameObject); }
1
de0a885ae5382288884aa2da817b8dc3
d3ebaf970de8dc9292e3db759a0222ef
Returns whether the ant is currently carrying food
public class AntCell extends Cell public boolean hasFood () { return myFood; }
0
9f2bddfc17e6019460fa6c5f1aa28c0f
f2d723cfc105244face82953adf60a18
Makes the finishing touches to the voltage-curves plot
def SVsA(ax, n): ax.tick_params(axis='both', direction='out') ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.yaxis.set_ticks_position('left') ax.set_ylabel(self.data.meta['ylabel'][n]) if ax.is_last_row():...
1
1310679e21a4bb27824241be1f3b28e1
5fab41b86953659d740f57a3be99f891
Stop the stopwatch when the stop button is pressed
class MainFrame(wx.Frame): def OnStop(self, event): self.t_stop.set()
1
46158239c65e6e850db75bdeeeaa2b5c
4d5415785173c170eb71840962c658c5
просмотр существующих заданий для определённого квеста
{ $quests = Quest::where('status', 0)->where('user_id', '!=', Auth::id()); if ($request->has('q')) { $quests = $quests->where('name', 'LIKE', '%' . $request->input('q') . '%')->get(); } else { $quests = $quests->get(); } return $quests; }
0
ce78cabeb38c8e99795f2859a44986db
bee0d05b266e6cb4d9e3f3bfb816ad54
获取昨日发送数量
namespace BLL public class PostsManager public int GetYesterdayPostNum() { return iposts.GetYesterdayPostNum(); }
1
18b89e325429d68e532ccd23e8b2f0b1
2b15577760c93cf2ad6cfccbba4c6f65
Permite ao instrutor gerenciar os projetos do curso
{ $cursos = Curso::pluck('nome', 'id'); $tutoria = TutorCurso::where('user_id', Auth::user()->id)->get(); return view('admin.cursos.tutor.index', compact('cursos', 'tutoria')); }
0
636f9434acb14042ced969474a83a8a4
72c9faa512a7a9d3a4ac18606339d218
make a friend request
class AddFriendButton extends React.Component handleSendRequest() { let cm = new ClientManager(); let client = cm.createFriendsClient(); let req = new AddAwaitingFriendRequest(); req.setFirstuserid(this.props.myUserid); req.setSeconduserid(this.props.userid); return clien...
1
9441b81710c8ef11ae497b3daedb2871
0d51996a8713d781dfd935c7d686d413
创建Http驱动
class HttpFactory public function createHttp() { switch ($this->_type) { case self::VERBOSE: return $this->_createVerbosingHttp(); } return $this->_createDefaultHttp(); }
1
a2cc59f02a1f76ce510226a9af2d4fb1
0ab84835114175e632b10a208715a4b0
如果是报价单位 或者是项目截止后 本竞价项目的上级单位 才可以显示报价
if(empty($id)) return self::showJsonReturnCode(1003); config(['default_ajax_return' => 'html',]); $count=Loader::model("base/BudgetDefaultBook")->where(['project_id'=>$id,'status'=>1])->count(); if($count>0){ $url=url("design/addbudget",["id"=>$id]); $str= "<scrip...
0
bc82ae3afd0540c0b0844a7a9403ebfa
8a02ff879483051aba686b312c356877
returns filename to xml log file.
class CashReconReportCreator(DataToXMLReportCreator): def get_filename(self): return '.'.join([self.file_name, 'xls'])
0
ccbbb45f4570f5cf6929076e82b6855c
97cc8b9695b1e79825416545f0526222
Retrieve all forms that belong to a user.
class ManyToManyFormsController extends Controller public function index() { $userInformation = auth('api')->user(); $user_id = $userInformation->id; return User::findOrFail($user_id)->usersHaveManyToManyForms; }
1
f69d480619ecc4910d44b2e2ef1efad7
bbc5b2a3b1ae920c0b5524d6b3770b39
Attempt to register into the application. Will set invalid warnings accordingly if there are invalid inputs or register fails.
public class RegisterActivity extends AppCompatActivity private void registerAttempt(String email, String password, String confirmPassword){ if(!password.equals(confirmPassword)) Toast.makeText(this, "Passwords Do Not Match", Toast.LENGTH_SHORT).show(); if(!Validations.isValidEmail(email)) Toast.makeTex...
1
293569e9901d8da17a74ae8b37f9f82b
a395effdb865bc736449ae30bef58a0e
Internal add method to add to the storage arrays.
public class IntegerArrayList extends IntegerStorageImplementation @Override public boolean add(int o) { int length = size(); if(length < capacity) { arr[length] = o; }else { capacity = capacity*2; int new_arr[] = new int[capacity]; for(int i =...
1
63ac3f32cef685ee1aca609ba610236a
03384483d449f9ac8c21052d6275c31d
Método que permite instalar uma aplicação no telemóvel
function installApp(bundleId, appPath, complete) { driver.installApp(bundleId, appPath, complete); }
1
90ba2280afbbc5fef6c1a41c5a8344c4
2cc756429e6f5f04651ec7462c7a5cd2
@brief - This function calculate peripheral clock speed for APB1
{ uint32 sysClock = Mcu_Arc_GetSystemClock(); vuint32_t prescaler; switch (type) { case PERIPHERAL_CLOCK_FLEXPWM_0: uint32 eprediv = CGM.FMPLL[1].CR.B.IDF; uint32 emfd = CGM.FMPLL[1].CR.B.NDIV; uint32 erfd = CGM.FMPLL[1].CR.B.ODF; uint32 f_sys; uint32 extal = Mcu_Global.config->McuClockS...
0
6bf80985a0c7d09cc251f1999881b551
c7c9f08058e291bbd92cb83d63db4032
Determine the class of the missing angle.
function ambiguousCaseRule({ angles = {}, sides = {}, error } = {}) { if (error) { return { error }; } if (Object.keys(angles).length !== 1 || Object.keys(sides).length !== 2) { return { error: 'ambiguousCaseRule expects 1 angle and 2 sides' }; } const angleKey = Object.keys(angles).join(); const pa...
1
94e59f7d09d999cd0d99b84b84579788
e59726f12f55325b6019f0478b9c63c2
Retorna se há ou não uma imagem para esta palavra
namespace easy_control_c_sharp public partial class PresentationModel public bool IsImageExist(string name) { return _imageList.ContainsKey(name); }
1
3bdcbe8e4a32be6fbbfd7965a505a85d
81a2b3e8902a536c46cff1cf3efec3cd
查询全部订单数量
@Service @Transactional public class OrderServiceImpl implements OrderService @Override public Integer findOrderTotal() { return orderDao.countByExample(null); }
1
23c509d725dcc5d54ce81a426f997e82
db4aacae3686fc449cfba1f6ed5194a5
Returns dictionary of letters(keys) with occurances(values).
global data data = {} file = askopenfile(mode='r', filetypes=[('Python Files', '*.txt')]) if file is not None: content = file.read() for letter in content: if letter.isalpha(): lowerletter = lowerCase(letter) if lowerletter in data.keys(): ...
1
d5c603f0a013ac1c5743eca728c18cff
b0f2f5acf0d0770ce718a558fa2e6ba1
自定义起始点的寻路,寻路成功时把路径保存到传入的数组里
{ Astar.mStartPos = null; Astar.mEndPos = null; Astar.mRoadPointArr = null; Astar.mStartPos = new APoint(startPos); Astar.mEndPos = new APoint(endPos); Astar.mRoadPointArr = roadMap; List<APoint> _ret = Astar.Search(); List<APoint> _ret_new = new List<...
0
08394822fcd8627f10f9b31420d2db47
b1ae81bfba348ee453d84f52261fa8fd
CSS用のデフォルトのIDを取得
function cssStyleID($str) { $output = "" ; $str = preg_replace("/\s{2,}/i", " ", trim($str) ); $arr = explode(" ", $str); $output = implode("-", $arr); return $output; }
0
afc2c503a6bf52fa313f2ef564e11b2a
b744b6c5cbad943d94e0f1ffe6793eb5
从指定url路径中读取txt文件到String中返回
StringBuffer sb = null; try { URL url = new URL(urlPath); URLConnection conn = url.openConnection(); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; sb = new StringBuffer(); while ...
1
8f57c344f2aaa7a7d809998a9253eb4f
fdef61b628939febaf343a9f0753e117
Builds "create retention policy" query.
return String.format("name=%s&prefix=%s&delete_after_days=%d&to_line_after_days=%d&to_archive_after_days=%d&to_deep_archive_after_days=%d", null == name ? "" : name, null == prefix ? "" : prefix, deleteAfterDays, toLineAfterDays, to...
1
677e2185062d9a9a9e65880d7864b96e
df818025ce7e941dbe521ee2ff148858
execute a new program, replacing the current process
runprogram(char *progname) { struct addrspace *as; struct vnode *v; vaddr_t entrypoint, stackptr; int result; result = vfs_open(progname, O_RDONLY, 0, &v); if (result) { return result; } KASSERT(proc_getas() == NULL); as = as_create(); if (as == NULL) { vfs_close(v); return ENOMEM; } proc_setas(as); ...
1
d17cdcc209c189b4d11b88ae32e80820
8615bb2236297ee76e9b7e939f11eec9
This function creates a temporary file in the guest operating system. <ul><li>You must call VixVM_LoginInGuest(). before calling this function. <li>The result of the call is in the property VIX_PROPERTY_JOB_RESULT_ITEM_NAME on the returning jobHandle. </ul>
DWORD CQuarItem::CreateTempFile(LPSTR* lpTempFile) { auto char szTempPath[MAX_PATH] = {0}; auto char szTempFileName[MAX_PATH] = {0}; auto LPSTR lpOrigExt = NULL; auto DWORD dwTicks = 0; auto UINT uError = 0; auto DWORD dwReturn = DWH_OK; GetTempPath(MAX_PATH,...
0
b45db186288c4f494cef29175bad0386
c9bf09355b6dbc4ab7067212fb5759f7
判断一个字符是否属于空格,包括回车,\t等。
bool PropertyFile::isSpace(char c) { return (c == ' ') || (c == '\t'); }
0
266134db72711fb29331657e299b5d41
7f61448ad6da3ef0f9cb03f40c5be655
Currently not used, do not use this for any reason.
cases like (1)
0
9ac148f30839d9acf7626b25755cba28
273eae82a5f5580bf36789face4a5a52
Checks if any of the listed errors exists int he errors array
function hasAnyValidationErrors(validations){ const errorValues = Object.values(validations) for (let index = 0; index < errorValues.length; index++) { if(errorValues[index].error){ return true } } return false }
1
dc2f9881e29288a6a09fdcdbe10fb8d1
c0a36b12a6c21d7dc49da07a6fa9efee
Persiste su DB i risultati dell'estrazione
void saveResults(URL coneQuery, URI saveLocation) throws SecurityException, ServiceException, InvalidArgumentException;
0
a2761088b4083f60fe0cbfc5c3d9ce36
66c485ad3711c990a84f9a8fbba96906
添加印章管理程序Servlet(可选)
@WebServlet(name = "StampEdit", urlPatterns = {"/StampEdit"}) public class StampEdit extends HttpServlet @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
1
452ce65610afbfbb369822acad411b90
337958a7640353bfb265525a3de6a642
Calculates the index for a word based on the number of consonants in that word
public static class TasteCollection public static float lotsOfConsonants(string word) { int numConsonants = GetConsonantCount(word); int numVowels = GetVowelCount(word); if (numConsonants > numVowels) return 1 + numConsonants - numVowels; else return 0; }
1
7b2719db000c3276426514aa75a84cce
d2f22b05493b3c66690b96fe916e6d05
funcion que incrementa en uno los contestados correctos
function respuestaCorrecta(){ puntaje++; console.log(puntaje); }
1
29450b7999d5667b34f19b749d188fda
63e211a9c731bc486cd478d4b92948c1
Função para adequar e formatar as colunas e valores da TCC CONTRAC (arquivo CONTRAC.cnv)
for i, item in enumerate(xline): if i in [5, 6, 11, 17, 18 ,21]: xline[i] = item.upper() elif i in [8, 12, 20, 23]: xline[i] = item.replace(',', '').replace('.', ',').replace('-', '') elif i in [7, 9, 10, 19, 22]: if dtf == 'DDMMYYYY': xlin...
1
43d62445b610c8429b3da3eb11d6a824
99f21c6af134cf77798f79e14a6325ea
Handle redirect to QuickPay
class PaymentController extends Controller public function redirectToGateway() { $paystack = new Paystack; return $paystack->getAuthorizationUrl()->redirectNow(); }
0
4bc6885afa66e0c56f72885f02a524b1
cf5b56c9673099e98d5b56077714f20f
Resets score,lives and bricks with a short and simple animation.
self._last = self._touch if self._game.getWall().getBricks() == []: m = 'Congratulations!\nYou Won\n\nClick to play again' f = 30 h = GAME_HEIGHT*(2.0/3.0) self._playAgain() elif self._game.getPlayerLives() == 0: m = 'Game Over\nClick t...
0
b2e25a23b34eb04ee91a3e3a47e56924
79b9d1ab8776cd9e9044ae887dfa9da5
删除元素,可删除多个,并返回索引列表
class core_Redis_List extends core_Redis_Object #implements IteratorAggregate public function remove($element, $num = 0) { return $this->_redis->lRem($this->_name, $element, $num); }
0
5c56cc06cdbfe5a7547c0d8eb1381a38
67bae02e4348340e05c4eb3e2614cd3d
Retrieve the existing code category and initialise the form controls
this.codesService.getRuleCodes(boTypeDeal).subscribe( data => { if (data) { this.codes = data; this.resetForm(data); this.stopProcessing(message); } }, (err: any) => { this.stopProcessingWithError(err, 'initializeUI'); }); }
1
e180d5a23c02dde857478918f47abab0
084188ae9b6bc756c1b6d7424d3ada5c
Gets mentions occurring after last_seen_id
class TwitterBot(): def getmentions(self): return self.twitter.statuses.mentions_timeline()
0
54b380c807768ec7ef3e5d91c7d52a9f
096ad53e8a3f090979c9f7ea9befcf38
绘制敌人爆炸过程图片
void GamePlayScene::explosionEfect(Vec2 vec, int tag) { float timeDelay = 0.1; Vector<SpriteFrame*> animationframe; if (tag == 104) { for (int i = 1; i < 5; i++) { auto string = cocos2d::__String::createWithFormat("enemy1_down%d.png", i); SpriteFrame * sf=SpriteFrame::create(...
1
1bddffec140cfca55db388683de07ad6
0b5838c6cd9e63478c5152f3a0e8592d
A container for a one or more app.geolocator.LocationHits objects
try : return self._hits except Exception as e: raise e
0
e2422f081f3301f848fbf83eeb72e5bf
03de9adae955bdb0c9b746828f0869ef
Returns part of the shape as new shape; new points are created
namespace ObjectSecondVersion [Serializable] public class TrianglePartData protected virtual TrianglePointData[] GetNewTrianglePointData(FeaturePointRecipe Recipe) { int Index = FeaturePointCount; TrianglePointData[] ReturnTriangle; TrianglePointData TrianglePointData...
1