query_id
string
corpus_id
string
query
string
code
string
label
int64
4b7f817c6997dd376e0d877a2f2d692e
55f04e80eb514c8257d42ae7dec6835d
Searches for friends and returns them.
namespace SocialNetwork.Controllers public class OperationsController : Controller [HttpPost] public ActionResult SearchFriends(string searchstring) { Debug.WriteLine(searchstring); if (!Request.IsAuthenticated) { return RedirectToAction("Login", "...
1
4c6f069dae1e49c795b9e35165f7d0d9
48c448026fed7a0825bc850f78148162
Unschedule renewal payment
class PMProGateway_cointopay extends PMProGateway static function pmpro_deactivation() { wp_clear_scheduled_hook('pmpro_cron_cointopay_subscription_updates'); }
1
5de0274c502edd8946206f4d0b72e174
d2985fef444e4b4a8d1ce64dae0571d0
下载video的中英字幕并保存到video model中
File trackFile = new File(configService.getUploadFileSaveDir(), configService.getUploadVideoDir() + File.separator + v.getId() + ".srt"); if (!trackFile.exists() || trackFile.length() == 0) { String trackContent = trackService.make(v, TrackService.SRT_NAME); try { ...
0
30a314aaf6284e54a8efc5f5ccb783dd
d446e38173e3a9bf5967c4b25da18056
<br>[機 能] メッセージからラベルを削除する <br>[解 説] <br>[備 考]
{ string rs = ""; SqlParameter[] parms = new SqlParameter[]{ new SqlParameter("@IdString", SqlDbType.VarChar, 1000), new SqlParameter("@UserName", SqlDbType.VarChar, 20) }; parms[0].Value = idString; parms[1].Value = use...
1
5695dd3c0d71605b08c57c1a8bdefba6
8ee44709340c19c1d6e105030e4b7921
Creates a new Keen client based on the given auth keys
class Client public static function make(string $base_uri, string $key, string $secret, Config $config = null): self { return new self($base_uri, $key, $secret, $config); }
1
fa2b49a7fbc5c7e9d9860fbdfcff7901
ceea5c382835408cf17875fe3b913b17
hent navnet på transportmidlets ejer
abstract class Legemiddel public String hentNavn() { return navn; }
0
51c479b9884634c79f33968ef8662946
ff312224da57af5ffb20a95098b1d4ad
No processing requried
class NullProcessor implements ProcessorInterface public function process() { }
1
09327905f46b9ee04bbcb34e91de9d7a
0eca8589d15a2597d601a4d9b4cd768c
[`GlobalFlags`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globalflags) function.
let flags = 0x00_0001 | 0x00_0002 | 0x00_0004; Some(flags) }
0
af7e8556e95d4fdb2f8b675a96b94646
053f9842f685dbff4b161094c93c4677
The Y combinator.
fun <A, B, C> jalt(): ((A) -> C) -> (A) -> (B) -> C = { f -> { x -> { _ -> f(x) } } }
0
3fe1371062661d97b8df77109b310aeb
25e4366050bf8c717c4edfb82ae99d0a
Calculates the Eulidean Distance b/w Two Points on an n-Dimensional Plane
namespace AreaCalculatorApp class AreaCalculator float eucledianDist(Points p1, Points p2) { return pow(pow((p1.x - p2.x),2) + pow((p1.y - p2.y),2), 0.5); }
0
cb68e3d4724a15079a07df4f66e135e8
938f9e7ef936c821b18fcdbf6cdebdb9
ピラルクAIの処理を行う
$ret = false; $curOp = $BD['CurOp']; if (isset($BD['Id']) && $BD[$curOp]['IsAI'] && $BD[$curOp]['CalcAI'] == 0 ) { $ret = self::_calcAI($BD); } return $ret; }
1
62e0ea21c62f32442d2c6390bbb5315b
4d7684974571773a9f70705e4a6a2cf5
*mysounds A command that displays all sounds uploaded by the author.
class SoundController extends Controller public function index() { $sounds = Sound::all(); return view('soundboard.index', compact('sounds')); }
0
5073e3b0e3d5a2ed1dd7e5b3e0a5c38d
e5a68e0a860ac327bd7b74bcc3ea25c8
자소설 오브젝트들 중에서 author 값이 현재 유저인 값만 전부 가져오기
author_br_sis_ids = [] author_br_sis_ids << Tree.where(user_id: user_id ).where("relation_id = 6 OR relation_id = 5").select(:profile_id).pluck(:profile_id) author_br_sis_ids = author_br_sis_ids.flatten if !author_br_sis_ids.blank? end
0
6e6ae1421e87685094f6be1b36da7f57
134509477f43b13b329e2e4492ef1659
检查商户编号是否存在
public Integer checkCNum(String CNum);
1
2d52b661a89104acc51af223c3636204
fa81327e90d1caee168245c6f336d461
Test that the canonization service tries again when the first transaction hasn't been attested.
auto tx1 = complete(addSignatory(kUppercasedPublicKeyView, kNow)); auto tx2 = complete(addSignatory(kLowercasedPublicKeyView, kNow + 1)); auto hash1 = tx1.hash(); auto hash2 = tx2.hash(); itf.sendTx(tx1) .checkStatus(hash1, CHECK_STATELESS_VALID) .checkStatus(hash1, CHECK_ENOUGH_SIGNATURES) ...
0
ddf3ec54b730498d77fb4765de1087c6
1b72b65eb7fd0a3ee65e2a0ce9e353e4
https://atcoder.jp/contests/abc146/tasks/abc146_a
func main() { var n int fmt.Scanf("%d", &n) fmt.Println(abc168A(n)) }
0
8c1a6f0dba52514632f31a7dba8ea4cb
6b818b18e696f667297aa14641e9be4e
Return the zone_id. Should match the zone_id used in sequences
class ResourceRecord(Record): def get_zone_id(self): return self._zone_id
1
424408992952d1424660035972e7b479
b0890ac6dc6a347b17f7a83e31cde79f
Gets the first visual descendent that matches the requested type.
namespace Catel.Windows public static class DependencyObjectExtensions public static T FindLogicalOrVisualAncestorByType<T>(this DependencyObject startElement) { return (T)FindLogicalOrVisualAncestor(startElement, o => (o is T)); }
0
3f55128fa12bcfa251a7062d52fc690e
efddbb3f5107b46727ea963ba8da5192
Returns the host component of the authority.
class ParseResultBytes(namedtuple('ParseResultBytes', PARSED_COMPONENTS), ParseResultMixin): def authority(self): return self.reference.authority.encode(self.encoding)
0
7ba776e2b6e8b8c2b10ce5fc4d693579
2ac7ee35aa2437761c0e6cba214a7484
decorator for handlers to save every handler call to database
@wraps(func) def wrapper(*args, **kwargs): name = func.__name__ try: user = args[0].from_user.id except: try: user = args[0].message.from_user.id except: try: user = str(args[0]) a...
0
b1856f96acd425e4dab2010c126ccc44
31c42b553e71abe078176e52ace163bc
Generates a data file consisting of a list of random integers between 10 and 30 (inclusive), separated by a newline.
{ srand(time(NULL)); FILE *numFile; numFile = fopen(FILENAME, "w"); int i; for(i=0; i < length; i++) { fprintf(numFile, "%d", rand() % 21 + 10); if(i < (length - 1)) fprintf(numFile, "\n"); } fclose(numFile); }
1
5e763896f21813082366885d8db56bb9
3c3284e85752f541e2e8ec2b53d9f2b1
Update Employee's genderId which has specified idEmployee
$.rest.update({ url: Urls.API_USER_GENDERS, pathVariables: { userId }, data: { gender }, success: (result) => { if (result.success) { callback(); } else { Utils.warning(result.message); } }}); }
1
5981f3328df7c9b3491138aa0c775ddf
099b0c4c198d60fef6e2a26e0a887c7c
ABRIR ARQUIVO
function Abre(caminho) { var idOpn = charIDToTypeID("Opn "); var desc140 = new ActionDescriptor(); var iddontRecord = stringIDToTypeID("dontRecord"); desc140.putBoolean(iddontRecord, false); var idforceNotify = stringIDToTypeID("forceNotify"); desc140.putBoolean(idforceNotify, true); var idnull = charIDTo...
1
ba21a6a3d126aeb4e43a719f54272650
73fbc2a57954375eacd30d6740dd94aa
Попытка обновления с пустыми данными
{ $university = University::where('id', 1)->first(); $input = ['name' => 'Нафти і газу', 'city_id' => 1]; $res = $this->logic->update($input, $university); $this->assertLessThan($res, 0); }
0
8ece158a1a4db02fe6df93b95e5df486
10fa2704608ff3cec5f8e175356c9f28
获取redis 缓存数据,生成sql语句,写入统计表
List<Shop> shopList=shopDao.findAllShop(); for(Shop shop:shopList){ StatisShop s=new StatisShop(); s.setStatisdate(DateUtils.convertStrTODate(d,java.util.Date.class, "yyyy-MM-dd")); s.setShopid(shop.getShopid()); s.setPvnum(1L); MysqlShopPvDao msd=new MysqlShopPvDao(); s.setPvnum(Long.parseL...
0
b3bc9b1a0570f0be962f7926832893c3
68ae9731a32f5818141b0f370dce55e5
Añade campos a ocultar
class Paginator public function addHiddenFields( $field ) { if(is_array($field)) { $this->hiddenFields = array_merge($this->hiddenFields,$field); } else { $this->hiddenFields[] = $field; } }
1
70c473cb80af45ec375bfaf0df4b7565
ba953b44fb1219fbe648065a8406a997
___________________________________________________________________________________________________ main
{ int spaceDimention; long particleQuantity; Particle *particleSpace; float runtime; if ( GetUserInput(argc,argv,spaceDimention,particleQuantity) == false ) return 1; displayInitialConfiguration(spaceDimention,particleQuantity); runtime = clock()/(float)CLOCKS_PER_SEC; updateRobotMovements(); particleSpace...
1
07b3d3282b56a654145fe9c3ba2ff236
55c7dff2454bd009b34340351482a934
根据讲师ids查询讲师
@Service("teacherService") public class TeacherServiceImpl implements TeacherService public List<Teacher> getTeachersByCourse(List<Long> courseIds, Long teacherId){ return teacherDao.getTeachersByCourse(courseIds, teacherId); }
0
a67985658b8b9ed532493c224d1687ca
c0031509e19a9fe1bf09e7a939e679a4
检查date 是否在时间 startDate endDate之间 <br/>
if (date == null || start == null || end == null || start.after(end)) { throw new IllegalArgumentException("some date parameters is null or dateBein after dateEnd"); } return !date.before(start) && !date.after(end); }
1
368c54598c2732dd4c51fc504537906b
fd0652bfea4332094bed336aa453862e
Adds the transaction fee to contract product.
BigInteger calculateFee(MintTransaction mintTransaction, TransactionDetailsParams detailsParams, Metadata metadata, ProtocolParams protocolParams) throws ApiException, CborSerializationException, AddressExcepion;
0
9b13b92e5ff3090597f5a07bb891a621
dfa8b37120a0999b1ce8d09a247edcf1
Get the upper-data's info from the superblock.
void read_super() { lseek(fd, 1 * block_size, SEEK_SET); read(fd, &isize, sizeof(isize)); read(fd, &fsize, sizeof(fsize)); read(fd, &nfree, sizeof(nfree)); read(fd, &ninode, sizeof(ninode)); read(fd, &avail_blocks, sizeof(avail_blocks)); read(fd, free_blocks, sizeof(free_blocks)); read(fd, free_inodes, sizeof(...
1
290c35db0f76de29aaa71ff31a5471a8
7b17cdab7f596c1d03920acd0b9c67c0
Gets scroll location to update appended content and make it always visible on screen.
const containerNativeElement = this.scrollableContainer.elementRef.nativeElement; return {left: containerNativeElement.scrollLeft, top: containerNativeElement.scrollTop}; }
1
7758784e2bcb171c95871f45a7b21317
3dd2bf238d1eef50666eb18300763719
Returns the tileset index of the specified character
{ BlockLookup::const_iterator endIter = blockLookup->end(); for(BlockLookup::const_iterator iter = blockLookup->begin(); iter != endIter; ++iter ) { if( blockIndex == (*iter).second ) { unsigned int charCode; FontId fontId; GlyphStatus::GetDecodedValue( (*iter).first , charCode, fontId)...
0
5a18a5bde1a075ba7d99d48fe8b18df1
810d44a35d0993ed3de2e3a7136a0e3d
retorna uma lista com todas as propriedades de classes e habilidades
{ Dictionary<PropertyInfo, AtributoPropriedade> propriedadeAtributoClasse = new Dictionary<PropertyInfo, AtributoPropriedade>(); foreach (var prop in typeof(tPe).GetProperties()) { AtributoPropriedade atrProp = null; foreach (var attr in prop.GetCustomAttributes(false...
0
5b92a37d9390bdc110412fedf0f2b78f
2b495b68858694cfed4c5854f2411138
Adds the current user's CSRF token (see User.GetCSRFToken()) to the URL for purposes of preventing CSRF attacks. This method should be used on all URLs to be put into all links and forms the application generates.
{ ArgumentNullException.ThrowIfNull(httpContext); CheckSSLConfig(httpContext); var antiforgeryFeature = GetTokensInternal(httpContext); return Serialize(antiforgeryFeature); }
0
05b31bcedf01d8c435e02473097ccf18
8ba81e783b0ee7a6a99005a1860e431f
method to apply ScheduleFavorite Settings of the query window
{ try { #region Add/Edit Favorite #region Favorite Type - Internal Item if (Datacontext.GetInstance().IsFavoriteItem) { #region Internal Favorite List is Set if (Datacontext.GetInstanc...
0
3e9a76efeedd529bd41c026dba68c83d
76da0b1167767753a00fe4821d6fc261
Set external trigger level in Volts
void setVolume(uint8 volumeLevel) { IfxGtm_Tom_Timer_setTrigger(&g_buzzer, (volumeLevel * (g_buzzer.base.period)) / 100); }
0
7000368b10ab028a20dc59b44c171698
7bcdf6b922e53c01f640a2cccc27d914
Creates and returns a random maze.
{ Maze* aMaze = factory.MakeMaze(); Room* r1 = factory.MakeRoom(1); Room* r2 = factory.MakeRoom(2); Door* aDoor = factory.MakeDoor(r1, r2); aMaze->AddRoom(r1); aMaze->AddRoom(r2); r1->SetSide(North, factory.MakeWall()); r1->SetSide(East, aDoor); ...
0
330cd573777b1913eebd66e0665ff6af
f0bdb77c34400cbbba67968616a9cc6a
Returns whether the mock client is active and can support API calls with no errors.
namespace Lesula.Cassandra.Client.Fake public class FakeClient : AbstractClient public override bool IsOpen() { return this.isOpen; }
1
06dc0b1d400ab10bdb6f12ca3986298e
29fbdf80ff82b8fd0ca8062aef288a1a
获取美甲作品列表
$city = I('post.city'); $order = I('post.order'); $city = ($city=="")?"成都":$city; $order = ($order=="")?"default":$order; $Work = M('work'); $limit['type'] = "居家花艺"; $limit['city'] = $city; $count = $Work->where($limit)->count(); $pagecount = 9; $Page = new \Thin...
0
aa620a4ec516e1c785dc435c77f9a299
b9162f9fbf0072120c969f39976f4723
WRITE PDB TRAJECTORY (TAKES restart.pdb and appends to trajectory file
void record_trajectories(int reset, struct Parameters *p_parameters, struct Vectors *p_vectors, double time) { size_t i; FILE* fp_traj; char filename[1024]; snprintf(filename, 1024, "%s%s", p_parameters->pdb_filename, ".pdb"); if (reset == 1) { fp_traj = fopen( filename, "w" ); } else { ...
1
029b76d8b8adf703e0584be6f1ad92e0
452dd0367d99cfb70a5708e6debdadfa
Crea el menú inferior.
menu_superior = Menu(ventana) menu_superior.add_command(label = 'Ventas', command=venta) menu_superior.add_command(label = 'Productos', command=producto) menu_superior.add_command(label = 'Proveedores', command=proveedores) ventana.config(menu = menu_superior)
0
06c522af2c0150ea9ba5ffeeea850e1e
9009c4f2b01ad9e908bbc2a9c149f629
Removes all additional supporting documents
{ Schema::table('entry_documents', function (Blueprint $table) { $table->dropColumn('verified_at'); $table->dropColumn('verified_by_id'); }); }
0
905c0bd652e94e8eda0bcfb649535c17
c131e023b0a19f1f12d96062a672fb35
Return a still image response from the camera.
def takeimage(): retval, im = currCamera.read() return im
1
8641b2a98c0a7daecd39510f1199b35c
bf1d767da576547f95d5a5e64aa4549c
fonction qui retourne les données de stagiaires
function debordeur($idstage,$tab_affect) { $k=0; for($i=0 ;$i<sizeof($tab_affect); $i++) { if($tab_affect[$i]->getIdstage() == $idstage ) { $stagiaire[$k] = new Look(); $stagiaire[$k]->node['idb'] = $tab_affect[$i]->getIdb(); $stagiaire[$k]->node['No...
1
2b0a203d32465d1669c0722e6273c3d5
945850c1bf49000dfd556edd9c7c8343
打开天游戏服务条款
Intent intent = new Intent(chargeActivity, WebViewActivity.class); intent.putExtra("title", "缴费服务条款"); intent.putExtra("url", "http://ecard.gdei.edu.edu/CardManage/CardInfo/TransferClause"); chargeActivity.startActivity(intent); }
0
0654471ff461e41b538c4b5bc2a6f744
ac536f9fdce5f7ad077e23e8884cbcc4
haversine formula @ http://www.movable-type.co.uk/scripts/latlong.html
func GPSDistance(lat1, lon1, lat2, lon2 float64) float64 { radlat1 := lat1 * PI / 180.0 radlon1 := lon1 * PI / 180.0 radlat2 := lat2 * PI / 180.0 radlon2 := lon2 * PI / 180.0 if radlat1 < 0 { radlat1 = PI/2 + math.Abs(radlat1) } if radlat1 > 0 { radlat1 = PI/2 - math.Abs(radlat1) } if radlon1 < 0 { rad...
0
bb45da91a043b4dee332415e43d82deb
9b4e79c42ae5632e64d50c1722aed24a
JDK RSA 签名
try { PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(dsaPrivateKey.getEncoded()); KeyFactory keyFactory = KeyFactory.getInstance("DSA"); PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec); Signature signature = Signature.get...
0
55b3ad75c631dfb39a33a2a065b7aefe
f0233959e40a8f6a6ceeb1e096bdd556
setting the subnet mask fields for a /15 network
if '/' in mask: mask = mask.strip('/') mask = int(mask) if mask > 32: print 'Bad mask (greater than 32)' return 'invalid' octet1 = '0b0' octet2 = '0b0' octet3 = '0b0' octet4 = '0b0' tmpmask = [] for i in range(0, mask): tmpmask.append(1) for i in range(0, 8): try: if tmpmask[i] == 1: octet1 =...
1
3d1314c2743ba433c078ead9e861e7de
340c43845f5e95cbb62103854cfafbd9
根据UUID获取text
namespace Crocodoc Task<string> DownloadTextAsync(string uuid);
1
6627d5107b4e38170bfa547373f09258
7081a66eb05b0842f016e8ca2eeb9c87
Calculate the pseudo-Voigt function.
def pvoigt(x, area, cen, fwhm, frac): return frac * lorentzian(x, area, cen, fwhm) + (1 - frac) * gaussian(x, area, cen, fwhm)
1
6a36719d3da66fd9dc65030ea3f5d772
41a5e435cbcb63d2fac2b2a9e9e7de25
pop head node from queue
QueueValue queue_pop_head(Queue *queue){ void *result; int i; if (queue->len == 0) Error("Dequeue of empty queue"); result = queue->array[0]; for (i = 1; i < queue->len; i++) queue->array[i - 1] = queue->array[i]; queue->len--; return result; }
1
4b526a0dec00bfb49a6221fdc462b271
b69e645a806aceb335cfcb23e7919fa1
convert x tile position and zoom to wgs84 longitude
def get_x(zoom, lon, tile_size): lon = clamp(lon, MIN_LONGITUDE, MAX_LONGITUDE) return ((lon + 180.) / 360. * pow(2., zoom)) * tile_size
0
69cd608e4b10e9e4c96583c40e0d9a3e
8d52870cddfbb34f756f658ac7a6c371
writes failures and errors into the reporting database
def reportFailure(name, message): config = ClientConfig() config.writeMethodError(name, message)
1
e4cbdf7340de441948bf076a66e13281
04ecca674e89ee6d0a61cd41fef5b27c
采购退单明细查询
@FormUrlEncoded @POST("api/services/wpda/PurReturn/GetPurReturnDetail") Observable<CommonResult<List<OrderDetailData>>> getPurReturnDetail(@FieldMap Map<String, Object> params);
1
05b2c7e17fca1f009a0f622f7bda2555
79e4c89d03019601422d561a96e76828
Convert a global ban into local ones.
class TS3Commands(object): def bandel(self, *, banid): cparams = OrderedDict() uparams = list() options = list() cparams["banid"] = banid return self._return_proxy("bandel", cparams, uparams, options)
0
61321f74b4c3392cb615a08e0eaf14a5
02743423f307ff6460da2105e93a4b24
Ermittelt alle Fotos, die eingegangen sind, aber nach einem bestimmten Zeitraum noch nicht bestätigt wurden.
Iterator<String> iterate = albums.keySet().iterator(); Set<Photo> results = new HashSet<Photo>(); while (iterate.hasNext()) { Album current = albums.get(iterate.next()); Photo[] currentPhotos = current.getPhotos(startDate, endDate); for (Photo photo : currentPhotos) results.add(photo); } Photo[] resu...
0
d66045184eae748c8fbbd3c9da7b3e45
21c3edfb58ba6aa0e9e66ee2ba631b2b
Creation of a desktop delegate based on a supplied persistent identifier.
public static extern IntPtr OpenDesktop(string lpszDesktop , OpenDesktopFlag dwFlags , bool fInherit , DesktopAccessRight dwDesiredAccess );
0
303c29adcbc0d7cf4fafc7a991d74d6e
eca6b37813c8c8744ff916561ed5d8ee
Hook to reset notification protocol to properly reset function with TPM.
TEE_Param pParams[4], void **ppSessionContext) { (void)nParamTypes; (void)pParams; (void)ppSessionContext; return TEE_SUCCESS; }
0
35689ec8d5ec3d1201f74fc57ae3f744
ab37e2a33dd8ef19f2dda7f6b8c64efd
Пересортировка слов в словаре после первого и последующих кругов повторения
{ var table = GetTableItems(tablename); for (int i = 0; i < table.Count; i++) { for (int j = 0; j < table.Count - 1; j++) { if (NeedToReOrder(table[j].Word.ToString().ToLower(), table[j + 1].Word.ToString().ToLower())) ...
1
5abbf4ff66ff25bd815c43cc950cd3eb
caceb7d26df2b8de2755aaf2b09f7008
Stellt sicher, dass beim nächsten Aufruf von <see cref="SourceInformationReader"/> eine neue Hintergrundaufgabe gestartet wird.
{ if (!_started) { _started = true; Thread thr = new Thread(new ThreadStart(Start)); thr.Start(); } while (_current_source == null) { Thread.Sleep(50); } if (!_curr...
1
ce85593b785761839e40b34134c1a865
7c3d27d3095a6f9134c6b690ad4fd13f
! This method returns the global position of the opponent goal.
double PlayerBase::DistToOppGoal()const { return fabs(Pos().x - Team()->OpponentsGoal()->getCenter().x); }
0
75e3d824f7d29ff2d26969639ce521e6
2e55cd1b9a52e18e07697e3d4e0ad164
1) Create the affinity scheduler policy 2) Update the cluster with the affinity scheduler policy
self.dm = super(self.__class__, self).setUp() LogPrint().info("Pre-Test-1: Create affinitygroups '%s' for this TC" % self.dm.group_name) self.assertTrue(smart_create_affinitygroups(ModuleData.cluster_name, self.dm.group_info, self.dm.group_name))
0
f9df4afbcec9d30707ff8451a38ca5a0
c457a6c212932003776c2a7870b9dd6b
Block players from eating This is also pointless but might be useful.
public void onPlace(BlockPlaceEvent e) { if (e.getPlayer().getGameMode() != GameMode.CREATIVE) { if (e.getBlock().getType() != Material.CROPS) { e.setCancelled(true); } } }
0
c146dc381e4346bdbdbab3252e9c1355
f8f33386e74dadb6f0140a78b537466a
Marks all bundles as selected / deselected.
class NodesTable extends React.Component setSelectedToAll(selected) { var nodes = this.state.nodes; Object.keys(nodes).forEach(function (node) { nodes[node].markAsSelected = selected; }); }
1
36798951cb43668ecb4e9a0d9fb62e54
dbc59463bac4aeef509ee8f43b94b493
Gets the undelete of this DdboostStorageUnitModify. # noqa: E501 If true, undeletes a previously deleted Storage Unit in the delete state. Default is false. # noqa: E501
class MFPackageDIS(MFPackage): def disu(self): return self._disu
0
def8c29c084ee11b173db508d41e6d6c
1e19620f725443617f08f612c3a33010
resets chop colors
{ _chopUrl = _baseUrl + '?p=' + _pColor + '&b=' + _bColor + '&f=' + _fColor + '&i=' + _iColor + '&x=' + encodeURIComponent(_chopText); }
0
384d285a6295b7748e704e722473cf97
8407fba168345497b7b2bfd91d0c6dcf
2階層dropdown(ラベル選択可)の処理 表示形式:dropdown、かつカテゴリ選択:可の場合
function categoryParentSelect() { const parentCategoryBox = document.getElementById('category-select-box'); const secondCategoryArea = document.getElementById('second-category'); if (parentCategoryBox.getAttribute('data-load') != null) { return null; } parentCategoryBox.setAttribute('data-load...
1
f07786e64596a508deccf244d1d7bc7c
9801b66c51f1e8634c4348ac83dc822f
Compares two Elements and determines which is "first". This is for use with usort (and similar) functions, for sorting a list of NodeElements by their coordinates. The typical use case is to determine the order of elements on a page as a viewer would perceive them.
{ float v1 = getFirstNumber(elem1->getAttributes()->scanOptions); float v2 = getFirstNumber(elem2->getAttributes()->scanOptions); if (v1 < v2) { return true; } else if (v1 > v2) { return false; } return (elem1->getAttributes()->objectPositionZ < elem2->getAttributes()->objectPositionZ); }
1
6d79f8021e34aaad3fec26df1f8c938f
9898db3a6fa4868f9d8344cccb54497a
Sets the danh sach job persistence.
public abstract class JobDocumentServiceBaseImpl extends BaseServiceImpl implements JobDocumentService, IdentifiableBean public void setUserPersistence(UserPersistence userPersistence) { this.userPersistence = userPersistence; }
0
9f6e8a749f1feaf525ee26ee6f981d14
ac338384e2ff5973472391683e77a6c3
Initialize the list of named bits.
void CInputScript::InitBits(void) { m_bitPos = 0; m_bitBuf = 0; }
0
4466e33cb5d87bf167755d577f7cf48a
63de9d578f0d412d8727e0e56f35e903
Convert Data into CSV
let csv = "\ufeff"; let arrRow = []; let arrNames = []; let arrData = []; let c = 0; for (let row in table) { arrRow = []; c++; v = table[row]["dataValues"]; for (let field in v) { value = v[field]; if (typeof value === "object") { ...
1
a24b7375e9d235dacd8ffcca3f27b15d
89401d80d3a1a1447d0654487e4a925e
fonction pour rediriger vers la page de connexion
function connexion() { require 'Administration/connexion.php'; }
0
9239fb029671fc4ced1c4ff0a0994fdf
6ffb3f1d906d77e9b695970b19873842
Выбор номера студента
if (event.target.checked) { $("#student-number").prop("disabled", true); } else { $("#student-number").prop("disabled", false); } }
0
9cd34dd0b977f9916ae1c53ed08e2e5f
7ad951091eac199cd5d04629d9016735
Return tile key at a given position
public class Level public int[] tileAtPosition(Vector3 point) { Vector3 From = GameObject.Find ("field_tile_0_0").transform.position - AbstractRenderer.TileSizeVector()/2; Vector3 To = GameObject.Find ("field_tile_" + (numRows-1) + "_" + (numColumns-1)).transform.position + AbstractRenderer.TileSizeVector()/2; if...
1
12561a95e06a3185ace99119640bd04b
b09392fa191880ae2d6f56a1b294eaa8
Compares two abstract paths lexicographically. <p> This implementation checks if the given path is an instance of the same class, then compares the actual paths of the two abstract paths.
public abstract class SimpleAbstractPath extends AbstractPath @Override public int compareTo(Path other) { Objects.requireNonNull(other); final SimpleAbstractPath that = getClass().cast(other); return path.compareTo(that.path); }
1
a3663ac150d61f838fccef6f0cb9d7a3
5867d01c36fd30e423847a7b0e644c4a
Удаление лишних пробелов из строк массива
function ArrayTrim(&$a) { foreach($a as $k => $v) if ($v=='') unset($a[$k]); return $a; }
0
c2266a6e50f7c9efcdef7341096dbfba
bb649c77dffc29403dd12addcf81e957
Destroy the command pools / command buffers and fences maps
{ if (m_CmdQueue != nullptr) { Fence fence; fence.Initialize(true); InsertFence(&fence); fence.Sync(); fence.Finalize(); } m_CmdQueue.Release(); m_d3dFence.Release(); delete m_pCmdAllocatorPool; m_pCmdAllocatorPool = nullptr; delete m_pAdhocGpuBuffer; m_pAdhocGpuBuffer = nullptr; for (auto &ptr : m_p...
1
1d93f10714bc881d8ed92a2dff866d63
29ab16342fb64bf8c8682c006aa7e651
Открытие базы из текстового файла десериализируя JSON формат
{ if(!QFile(file_name).exists()){ qDebug()<<"БД не существует"; } else { this->openDataBase(file_name); } }
0
1d2a91487a32ca15cc68d77bf018d2cd
fa3c020c57f20f725eb9f753f367db4a
获取歌词文件,如果本地没有,则从网络下载
public class LyricFragment extends Fragment implements LRC.PositionProvider, LoaderLyricCallBack, OnClickListener private void searchAndDownloadLyric(String trackName, String artistName) { if (ApolloUtils.isOnline(getActivity()) && PreferenceUtils.getInstance(getActivity()) ...
1
efb9a5981e9a478bda9b3775af80398a
2e8e5529ec3a8971f22f8f34a802172f
切换查询空气情况
var selectAfter = new Array(); $(":checkbox.weatherBook:checked").each(function() { var station = $(this).val(); selectAfter.push(station); }); if (selectAfter.length == 2 || selectAfter.length == 0) { for (var i = yuding.length - 1; i >= 0; i--) { $(yuding[i]).show(...
0
616ca45c8b1152c5cd33f80a3104ceed
0a0693b0e77dcffe7499980d0a5665e6
@brief テキスト設定ボタンを押したときのスロット
void MainWindow::onBtnCustomTextClicked(bool ) { if (ui->txtCustomText->text().size()) m_client.sendTextMessage(ui->txtCustomText->text()); }
1
0bbc944f14ec4442fcee33a2d302fb74
0446e5db427696842acca4401c4d8a79
@brief Gate that'reads' from a ROM table. i.e. table index is a witness not precomputed
Ram &ram __attribute__((unused)), Alu &alu __attribute__((unused))) { return 0; }
0
8763439f94e989521328134bd85a77fd
1dc0e93fb2816295b630f48fb9815026
创建chunk缓存
String chunkFolderPath = getChunkFolderPath(fileMd5); File file1 = new File(chunkFolderPath); if (!file1.exists()) { file1.mkdirs(); } OutputStream outputStream = null; InputStream inputStream = null; try { outputStream = new FileOutputStre...
1
4549c53d620f3a86e5ecf11c3bc393d1
5241fd217084acd0b398de56988c8218
Creates an AST out of the tokenized template
{ std::unique_ptr<ExprAST> firstexpr; SourcePos pos(tokenizer.source_idx,0, 0); while (true) { vector<string> anno; while (tokenizer.CurTok == tok_annotation) { anno.push_back(tokenizer.IdentifierStr); tokenizer.GetNextToken(); while (tokenizer.CurTok == tok_newline) tokenizer.GetNextToken(); }...
1
e55e22a965c7746a0a8a695d47b6e31d
ad3ed2281715c626cc609b579ccd35c4
============ idBrushList::Remove ============
{ int index = -1; AUASSERT(NULL != bstrItemID); AUASSERT(L'\0' != *bstrItemID); if (0 == SysStringLen(bstrItemID)) { return ; } for (UINT u = 0; u < uNum; u++) { if (0 == StrCmpI(W2T(bstrItemID), W2T(pList[u]->bstrID()))) { index = u; ...
1
00713ca7c291133b9130bff3a206e653
ee1193baf4fee457bed1abce5bb02189
Hàm kiểm tra bàn phím khi đang chơi
{ for (int i = 0; i < 10; i++) for (int j = 0; j < 9; j++) if(BanCo[i,j] != null) if(BanCo[i,j].TypePiece != Type.TUONG && BanCo[i,j].TypePiece != Type.SY && BanCo[i, j].TypePiece != Type.TINH) return; EndGa...
0
7263927577eb9ea465f58e8f68b64727
2c9f3ae2b5f6e5ed5be204fe03b4125d
Decrypts email id for verification
fp = re.findall(r'email-protection#[A-Za-z0-9]+', s) fp = fp[0].replace('email-protection#', '') r = int(fp[:2], 16) email = ''.join([chr(int(fp[i:i + 2], 16) ^ r) for i in range(2, len(fp), 2)]) return email
1
dc28c89a9d670e2e26b0d940b536ed5a
a7d78efa78dfca763d51ee46fe62895a
checks that there are no pieces in between the piece's old and new positions it also checks that the piece is moving horizontally, vertically or diagonally
class Board(object): def check_board(self,old_space, new_space): if new_space.col < 0 or new_space.row < 0: return False elif new_space.col > 5 or new_space.col > 5: return False elif abs(new_space.row - old_space.row) != 1 and (new_space.row - old_space.row) != 0: ...
0
c5a5a6ff6fb1b0583d377c7f048af637
ec7e0c9cfbbac83e749d824f406666ee
LLamar al controlador para que rechace la transferencia.
public class CancelarTransferenciaActionListener implements ActionListener{ @Override public void actionPerformed(ActionEvent e) { tfc.cancelarTransferencia(idTransferencia); vgt.eliminarTransferencia(idTransferencia); }
1
7f76c2ba97e98173e7ffe56d2e5b5519
51ba772ed62f14c219b03eeba5851e56
Create virtual host from a doctrine virtual host
{ $virtualHosts = array(); foreach ($this->getVirtualHosts() as $virtualHost) { $virtualHostNames = explode(' ', $virtualHost->getName()); if ($virtualHost->hasInjector()) { $virtualHostNames = array_merge($virtualHostNames, explode(' ', $virtualHost->getInjec...
0
1c32bcc2914c80626852ad9223b59b98
34ccf3661e265a95239f1e3da5a6e933
更新对象在数据库中用某一字段取值为筛选条件
{ bool result = false; if (value != null) { string sql = "update "; T t = Activator.CreateInstance<T>(); string table = t.GetType().Name; sql = sql + table + " set " + column + "='" + FilterSQL(value.ToString()) ...
1
e3972afeaf40dfd530ce78d6eb1dd203
f66b0e88935d8d8efa81c99f790b4f54
Convert all fields to SI units
units_old = [unit_assign(x)[0] for x in units] data_types = [unit_assign(x)[1] for x in units] units_koef = [(x.value * (x.si).value / x.value) for x in units_old] units_koef = set_data_types(units_koef, data_types, par='koef') data_SI = list(map(list, zip(*data))) data_SI = set_data_types(data_...
1
eebb2202dc8516405fff79b4b48c77c3
0b6b0a5c899e9db1fc4703caafca488b
! Embeds \a widget into this proxy widget. The embedded widget must reside exclusively either inside or outside of Graphics View. You cannot embed a widget as long as it is is visible elsewhere in the UI, at the same time. \a widget must be a top-level widget whose parent is \nullptr. When the widget is embedded, its s...
pc = self w = self.qwev if pc.must_change_widget(has_webengineview): pc.embed_widget(w) assert w == pc.w return pc.w
1
5fef334f9917ba62e18cb1df3fbc8a40
34126e46dadb735be0ddf714147f8028
List中的数据按照插入顺序存放
public class TestJedis @Test public void testList() { jedis.lpush("list", "a", "b"); jedis.rpush("list", "y", "z"); System.out.println(jedis.lpop("list")); System.out.println(jedis.rpop("list")); jedis.lset("list", 0, "123"); System.out.println(jedis.llen("l...
1
b764d76d2a2b43be23e6d8c446f69836
6db35c3d30c200eb60d24a6fbc6f8403
1. 根据bid查出车的状态, 要报修的车不能是行驶状态 2
@Service @Transactional public class BikeServiceImpl implements BikeService @Override public void reportMantinant(Bike bike) { Query q=new Query(); q.addCriteria(Criteria.where("id").is(bike.getBid())); Bike torepair=mongoTemplate.findById(bike.getBid(), Bike.class,"bike"); if(torepair==null){ throw new Run...
1
d130f8ceee759e053a7c7115d9e5dc8b
278c60f55f7c4796ec5857765e5c2086
Using Angulars Drag&Drop method to move items in the list.
export class CardsListComponent implements OnInit drop(event: CdkDragDrop<string[]>): void { moveItemInArray(this.data.results, event.previousIndex, event.currentIndex); }
1
e7a4be6f23f1a2f9ced18a7d9bc5bdf8
3f1e72675cc41bb72874bac34482d34f
Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present.
public function setRequires(array $requires): void;
1
528773ab3200c96059ccdfbd096e9458
8c38fe8fed82f12dc0fe3a947b4d8ff4
Retorna true ou false quando alguma ação CRUD for executada no banco de dados
class TblCrud public function getRes() { return $this->res; }
0
36e81c57cf7899c04f048eaad1c42443
dc549a7d977173f76b278bbc808e884d
need to put a hyphen where there is a space or before an uppercase letter
function accum(s) { let i = 1; let outPut = s[0].toUpperCase(); while(i<s.length){ outPut = outPut + "-" + s[i].toUpperCase(); for (let j = 0; j < i; j++) { outPut = outPut + s[i].toLowerCase(); } i++; } return outPut; }
0