query_id
string
corpus_id
string
query
string
code
string
label
int64
a522ae21a4182bc581c5f4dc3a026120
e3e0b62d1c10217cb17373e85dffcd2e
Getter method for the second option.
public class QuestionList public String getOptionTwo (int a){ String option2 = options[a][1]; return option2; }
1
94cde381e3bf68798753c6948b058026
b22d3ac19ac14fab31917847638ff725
Utility fn for getting the longitude of team1
if self.team == -1: return self.layout.xsize - self.x else: return self.x
0
995d98c4e618b8e6058b16374f8c2784
0d3b3479078682224999060cf4ceb724
获取数据访问对象id
public class JQXDataAdapterFeature<A extends JQXDataAdapterSourceData> extends Feature<JQXDataAdapterOptions<A>, JQXDataAdapterFeature> implements JQXDataAdapterFeatures, GlobalFeatures private String getDAID() { return forComponent.getDAID(); }
1
7f1a4a068e0e9aa86e914bbef3176c53
971b319666380a14b67624b204e2ed02
Разбор ответа на команду "Прочитать установленный лимит мощности."
namespace ResursNetwork.Incotex.Models public class Mercury203: DeviceBase private void GetAnswerPowerLimit(NetworkRequest networkRequest) { if (networkRequest.Status == NetworkRequestStatus.Completed) { var command = _activeRequests.FirstOrDefault( p => p.Id == networkRequest.Id); if (command ...
1
050d201ad215947b4ab25d569d0b5b4c
b35285f8beeaba33336b1376ea50ccfe
Returns the <paramref name="contents"/> string to the agent, using <paramref name="contentType"/> and <paramref name="encoding"/> for the <c>Content-Type</c> header.
namespace SmallFry string ContentEncoding(EncodingType encodingType);
0
d4f9569ef83eebc05e694e48e492f5c2
85eac2482c4ee37153510bf9842f29b3
Gibt den Vornamen eines Users zurueck falls eingelogt. Sonst ''.
public class Virtualdb public String getcurrentname(){ String name = "nicht möglich"; if (!(CurrentUser == null)) { name = CurrentUser.name; } return name; }
0
0f364878e77694feb650d7f3ef1ba1a9
e7b46e1ef2a25c75f33787b95d4b9831
General manager wage sheets for approval
{ if(session('success_message')){ toast(session('success_message'),'success'); } $table = DB::table('anfpayroll') ->orderBY('id','DESC') ->where('admin_approvals','=','Pending') ->get(); $tableOne = DB::table('anfpayroll') ->orderBY('id','D...
1
d6829e92deab416ec5dd5348229c5aa7
2cb98d8e0b59cf4d29afe557627ffe43
### function to crop raster #####
multi_crop=function(raster_folder="NDVI/Full",out_dir="NDVI/Trim/",shape=shp){ raster_list=list.files(raster_folder,pattern=".tif$",full.names=TRUE,ignore.case=TRUE) for(i in 1:length(raster_list)){ raster=raster(raster_list[[i]]) trim=S_35_clip_raster_2_extent_shapefile(raster,shape) out_name=paste(out_dir,"TRIM...
1
690d3fb407fadd810234a00ed1767a52
39f780073be9ff47a4c6f29dae49d51c
Returns various accuracy metrics for "test" and "predict" data
class LeNet_5(AModel): def metrics(self): return [tf.keras.metrics.Accuracy()]
0
efd1f28578a270b2d7c35f0febcde6a5
90ff9c2e1dac7a74ccb2744cb347b97d
合并具有相同列值的行
def merge_rows(unique_keys, titles, rows): merged_rows = [] score_map = {} index = 0 for r in rows: d = r['data'] m_key = '' for k in unique_keys: t_index = titles.index(k) if t_index != -1: v = d[t_index] m_key = m_key + st...
1
0827a6376cbef7930ea673bd2784de42
78a1c84e1e7c09b415476ca6973df9d7
RequestSession constructor.
class SessionGate public function __construct(RequestStack $requestStack) { $this->requestStack = $requestStack; }
0
83731ba935d0986530929ddf45c59c82
e60a5d23cf8abfafc2b7d2bc6d84b8e4
Creates a new file map and file key for the dependent file list, this is used to create URLs with CompositeUrlType.MappedId
public Mappeds createChildMappeds();
0
a1f9357d5b002042bbd7795099980deb
73dc99ba39da7251eac711bea1220e9d
Method to get the grass collision hit box.
{ return new Rectangle((int)position.X + MARGIN - COLLISION_MARGIN, (int)position.Y - COLLISION_MARGIN, Width + COLLISION_MARGIN * 2, Height + COLLISION_MARGIN * 2); }
1
a6cad830425d0d310d44239bf330287f
9ba98fb6a68516ded596eb84dacd0b0a
Adding new linked item when file of same name exists (both in the project and on disk)
{ for (int i = 0; i < dFList.iCount; i++) { if (!FSF.LStricmp(dFList.F[i].fi.Dir, Dir)) if (!FSF.LStricmp(dFList.F[i].fi.FileName, pPPI->FileName)) return true; } dupFile* New = (dupFile*) realloc(dFList.F, (dFList.iCount + 1) * sizeof(dupFile)); if (!New) { ErrorMsg(MNoMemTitle, MNoMe...
1
3b5c109686c81aa60a8c1b5c167377da
344ec358da29ecc2766289b1e1269464
display the front layer of UI
void BasicDisplay::displayFront(){ glPushMatrix(); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTranslatef(-2,0,-22); ...
1
caee37b0ae7916a11674cf1745c4a1ee
b59e6af0e9a2b5921b24423ad17e4e3d
恢复商品库存
class GoodsService extends BaseService public static function restoreProductStock($product_id, $stock) { $default_db = new DbBase(); $sql = 'UPDATE ms_product SET stock = stock + :stock WHERE product_id = :product_id'; $params = [ ':stock' => $stock, ':product_id' =>...
1
4e87f83ac5e89cc163d3778033943439
cc3bb7bd87899746692d05f48e233845
Sets a property of type Data Buffer.
namespace Assets.CGF.Systems.Shaders [ExecuteInEditMode] public class CGFShaderBehavior : MonoBehaviour public virtual void SetBuffer(string propertyName, ComputeBuffer propertyValue) { if (_myRenderer) { if (_multipleShader) { ...
1
10a2a1ddb3dfeaba374b8d66cd26da3a
118910913cd4b7667fc44e10c9d8db70
Convert list representation of edges to map
result = {} for edge in edges: result.setdefault(tuple(edge['start']), []).append(edge['end']) return result
1
0696c0c592146342171322f97bb012fc
f4274e5de4cd35efac48115363d3d035
make all portals open
int i; for ( i = 1; i < ( *aasworld ).numareas; i++ ) { if ( ( *aasworld ).areasettings[i].contents & AREACONTENTS_VIEWPORTAL ) { ( *aasworld ).areasettings[i].contents |= AREACONTENTS_CLUSTERPORTAL; } } }
0
2725ac9699624e3278313fbef94c245f
bad89695096a383b02937b2b2bf28df2
Get maximum achievable rotation
public class GimbalConfiguration extends afrl.cmasi.PayloadConfiguration public float getMaxRotation() { return MaxRotation; }
1
d61c72478aca2b58f5701acf59ee42d7
56c05d8bbf38a0e789072912f1c275d7
Delete special characters from the start and end of the string
{ const string whitespace = " \t\f\v\n\r"; int start = str.find_first_not_of(whitespace); int end = str.find_last_not_of(whitespace); if(start == -1 or end == -1) str = ""; else { str.erase(0,start); str.erase((end - start) + 1); } }
1
900180fb3cc017a0861ea7547860d945
29ddbaf9175831d2f8d6dd4b508942cc
cek apakah sudah punya istri/ suami
class User2 extends Authenticatable public function isUserUnitInduk(){ return $this->tunit->isUnitInduk(); }
0
355d5b88a98ec3f7520b0fe2e7e32649
b2623fd5fb5250dd858034c373c5c8e9
A switch is a conditional statement which evaluates an expression and compares it against a list of possible matches and executes blocks of code according to the match. It can be considered as an idiomatic way of writing multiple if else clauses.
let number = 3; if number < 5 { println!("condition was true"); } else { println!("condition was false"); } let number = 3; if number != 0 { println!("number was something other than zero"); } let number = 6; if number % 4 == 0 { println!("number is di...
0
aa107808d67d524122fdf41fd6ccb7b1
f0a920a257c0e1b3ce4f0e1fc1ebc861
Opens dialog with GoogleMaps Store
{ AlertDialog.Builder(this) .setTitle(getString(R.string.install_maps_dialog_title)) .setMessage(getString(R.string.install_maps_dialog_msg)) .setPositiveButton(getString(R.string.install_maps_dialog_yes)) { _, _ -> openMapsStore() } .setNegativeButton(getStri...
1
a385c5d9f8803ced8899902b8b3218bc
685c17f1734606770e35629280a2d337
返回最新一次供应商分级的结果
namespace Lib.SqlIDAL.SupplierPerformaceIDAL String queryNewClassificationResult(String supplierID, String timePeriod);
1
c3681a90a8a35afed9d3bf7091dfcb83
866b45738bcc95947ebcda8fedc0750d
设置EditText数据,并且将光标移动到最后
this.text = value?.let { Editable.Factory.getInstance().newEditable(it) } ?: Editable.Factory.getInstance().newEditable("") this.setSelection(getString().length) }
1
35436b31ef99375a23cad400d700b32a
a34e3460da30abbdb906dc4f64097204
创建用户SAML配置
avd = provider_config.get('advanced', {}) security_config = {'authnRequestsSigned': avd.get('authn_request_signed', False), 'logoutRequestSigned': avd.get('logout_request_signed', False), 'logoutResponseSigned': avd.get('logout_response_signed', False), 'signMetadata': avd.get('metadata_...
1
9e96b0e0da42dba0ef62459aba9bd4cb
4065cb675409639651e7b7db1390231c
Gets the new topic of the channel.
s = 'TOPIC ' + channel if newtopic: s += ' :' + newtopic self.sender.raw_line(s)
0
68f555e3fa5ce701b68f698a41cea89b
50314ad29ae0a28bd8a3dba575013094
Вибір коліра за назвою
function fColorPipe(colorName) { if(!colorName) return false; for(var colorItem in palette) { if(palette[colorItem].name == colorName) return palette[colorItem].code; } return false; }
1
3dc04237ad5733a7ced9f13ce41aa365
5be7a3695ecd34ebb270d0552986e32a
Focus on step event handler.
function handleFocus() { $focusList.click(function () { let index = $(this).index(); stepIndex = index; $wrapper.stop().animate({ left: -1 * stepIndex * 1000 }, 500); changeFocus(); }); }
1
2d012663382664dccf7afd202562be30
45d7fff21793e30321226e6c2593a522
Sets the storage_data_vlan of this HyperflexClusterProfile. The VLAN for the HyperFlex storage data traffic.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "hive-obj", namespace = "http://www.aerohive.com/configuration/hive", propOrder = { "cr", "fragThreshold", "nativeVlan", "rtsThreshold", "password", "manage", "neighbor", "security", "wlanIdp" }) public class HiveObj p...
0
53dec06d4054057224c3040f161d39a8
5a512b8c79382bdddda7fbcbe459a738
create live stream object.
public class LiveStreamsApi public LiveStreamCreateInput createLiveStreamTransport(LiveStreamCreateInput liveStreamCreateInput) throws ApiException { ApiResponse<LiveStreamCreateInput> resp = createLiveStreamWithHttpInfo(liveStreamCreateInput); return resp.getData(); }
1
419767684a285edd4407d331e688cf50
4f366e7bf4ba86c759a58c55ab1ac3a7
Initializes a foreign model with some field values
var inputs = document.getElementById('fieldModel').getElementsByTagName('input'); var i; var value = []; for (i = 0; i < inputs.length; i++) value[i] = inputs[i].value; var el = new Everlive('9PEejRqNBdrhDrjj'); var data = el.data('field'); data.create({ 'fd_name': value[...
1
0c5fc4c21f1878bd4f02f9f54b27bbd4
d08d4a6561e8c4e1e62eb19c7b812212
Initialize the ECT Channel 3 for receiving compass PWM signal
{ uint16_t u16CntValue; uint8_t u8ValidPeriod; stc_bt_mode23_cfg_t stcBtBaseCfg; stc_bt_m23_compare_cfg_t stcBtPortCmpCfg; DDL_ZERO_STRUCT(stcBtBaseCfg); DDL_ZERO_STRUCT(stcBtPortCmpCfg); Sysctrl_SetPeripheralGate(SysctrlPeripheralBaseTim, TRUE);...
0
03edb1753cff84d60eb2328ffb8b3757
d66faf11a2d7d918a12ecddf6ade779c
Sets the block to a skull with the skin found at the provided mojang URL.
$options = array( "http" => array( "method" => "GET", "header" => "User-Agent: Minecraft", ), ); $context = stream_context_create($options); $url = "http://minecraft-skin-viewer.com/face.php?u=".$username."&s=8"; $file = file_get_contents($url, false, $context); file_put_contents($faceIm...
0
6f51d942629fad396ea4d92df972471a
5dd19971653950abb4dc9592c2155597
Busqueda de trámites para el coordinador de un tipo de trámite específico.
{ $texto= $request->get('busqueda'); $tramites = DB::table('tramites') ->select('id','nombre_tramite','descripcion_tramite','descripcion_corta','id_categoria','id_municipio') ->where('nombre_tramite','LIKE','%'.$texto.'%') ->orWhere('id_municipio','LIKE','%'.$texto.'%') ...
0
ca92728099eaaae9d41f6b7674a33069
0bdbdd7958f767da1f96b188820542a5
Returns roots of two new trees, containing all elements of this subtree that are <= x and > x, respectively.
public class Tree public void keepRange(int min, int max) { root = keepRange(min, max, root); }
0
a8ef998a89d4659719f6187384ffe734
22a5b6f448a7dcdce1ada4f6d28b03db
Change database password
namespace Nec.Nebula.Internal.Database public class NbDatabaseImpl : NbDatabase public void ChangePassword(string newPassword) { GetConnection().ChangePassword(newPassword); }
1
f00f9b2b420e567062e20d5ff77ad2f9
c744a78adf83f95ba53a8a09682ab816
Tìm thứ trong tuần và tô màu ngày cuối tuần
if (!isNaN(vm.Model.Week)) { var week = parseInt(vm.Model.Week); if (week > 0 && week < 53) { vm.Model.DateFrom = moment(getDateOfISOWeek(vm.Model.Week, vm.Model.Year)).locale('vi').format('YYYY-MM-DD'); var dateTo = new Date(vm.Model.DateFrom); ...
0
f83dd4642b03bbc01a9269d1695c5f0b
c752667ae066781a51c6a9ce4b7d918a
Conversion d'un Patricia Trie vers un Trie Hybride
T = list(T) vtest = 1 while TestCompatibilite(T): ScoreMax = LargestCS(T) FirstIndexe = ScoreMax[1][0] SecondIndexe = ScoreMax[1][1] partition = [T[FirstIndexe][0],T[SecondIndexe][0]] intersect = IntersectDag(T[FirstIndexe][1][1],T[FirstIndexe][1][0],T[SecondIndexe][...
0
6b5a7b9abb2dd3c365a0617b4e41b815
4b220e7f1e1ddabfd814f3865331dc96
Removes a session ID from the list processed by this thread
(void)ctx; struct shared_session *shsess; unsigned char tmpkey[SSL_MAX_SSL_SESSION_ID_LENGTH]; unsigned char *key = sess->session_id; if ( sess->session_id_length < SSL_MAX_SSL_SESSION_ID_LENGTH ) { memcpy(tmpkey, sess->session_id, sess->session_id_length); memset(tmpkey+sess->session_id_length, 0, SSL_MAX_SSL...
1
7249bf5f3e25b3a46b4a688ce7585478
4a795be3634764196e79f3296971839d
turns off TX
void uart_stop(void){ UCSR0B &= ~_BV(TXEN0); }
1
2291c61c4ff82ecb5262bb2a6ac5f836
24d1ac63cb4f535212207d8291b5bf7b
sorts list of name-value pairs on name
int cmpName(const void *va, const void *vb) { const struct cdnaVal *a = *((struct cdnaVal **)va); const struct cdnaVal *b = *((struct cdnaVal **)vb); return strcmp(a->name, b->name); }
1
b896d574e82636cc74c08da61cf7fc34
ce26d35b14263ab5653d564d8387636b
Toggles unsaved changes modal
var change = document.getElementById("hidechanges"); if (change.style.display === "none") { change.style.display = "block"; } else { change.style.display = "none"; } }
1
96a6926300c3bc07ba60afe1121c0553
050ee21c403874216601455a233fd5e9
GET: MataKuliah
class P_spm extends CI_Controller public function Mata_Kuliah(){ $data['content']='pg_spm/Mata_Kuliah'; $data['data'] = $this->m_spm->Kuesioner_MK(); $data['pagination'] = $this->pagination->create_links(); $this->load->view('pg_spm/content',$data); }
1
ab85be784107d411b273fdb5fce1a33b
82851aeea57ed4a723c7678bdde5dcf3
Moves the character by some delta.
{ transform.position = transform.position + new Vector3( data.delta.x, data.delta.y ); }
1
875ea3d517bfca3e9b4c11de049e7830
cfcc765f3602b81835d7b0026bb1ff52
シーン番号の指定をして再生
public class LevelManager : MonoBehaviour public void LoadScene(int sceneIndex) { Time.timeScale = 1; SceneManager.LoadScene(sceneIndex); }
1
74debd903711a51c282cdfbc82fff8e0
154c1a1f287ede575b95ecb54579a74e
Return control-flow graph nodes in which the value of this induction variable is changed.
public class ClawPragma extends AnalyzedPragma public void setHoistInductionVars(List<String> vars) { _hoistInductionValues = vars; }
0
1c7434d5700daa392542336af0fc8ae0
d9c4884c86b715251c94b25182436cc1
Tests string equals ignoring case.
abstract class Assert final public static function assertEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = ''): void { $constraint = new IsEqualIgnoringCase($expected); static::assertThat($actual, $constraint, $message); }
1
5754cda94f3df8a750de3944f5c47a5f
1b514ecbc7dabd01c5fc30c9ad5eed97
Searches by the given Component and returns all GameObjects that include it
namespace TM.Unity public static class GameObjectUtils public static IEnumerable<T> FindComponentsInScene<T>() { return FindComponentsInScene(typeof (T)).Cast<T>(); }
1
62229cc23619e10a8db0c44afa61328c
511d92891937215b1498dbde0e20175f
入力バッファを切り替える
{ if ( 0 == m_buffer ) { return ; } if ( m_cout ) { std::cout.rdbuf ( m_buffer ) ; } else { std::cerr.rdbuf ( m_buffer ) ; } m_buffer = 0 ; }
1
7cc6679d15624a81f5df0177f89c8684
2aceb9501c354f480aaf9719376495ba
Read data from a system FIFO with status (non-blocking)
result = self.nica.axi_read(self.sigmon_fifo_data, delay=delay) if result: event_id = result >> 24 timestamp = result & ((1 << 24) - 1) return (event_id, timestamp) else: return None, None
1
1356196047e55eef69de5a522dc27b58
012f4ce6f19dceca1b686a803f335a0c
GET: api/Childrens/FromCurrentParent
namespace Babaganoush.Sitefinity.WebApi.Api.Abstracts public abstract class BaseChildController<TContentModel, TContent> : BaseContentController<TContentModel, TContent> where TContentModel : ContentModel, new() where TContent : IDataItem, IDynamicFieldsContainer public virtual HttpResponseMessage G...
1
fbf67465ec38d5bf7087d212bb12a27d
c00bbbfc746357d9e4b5810a57855692
If a DB cannot be opened, you may attempt to call this method to resurrect as much of the contents of the database as possible. Some data may be lost, so be careful when calling this function on a database that contains important information.
void restoreDatabase();
1
c981d869b9409325c0092e0686c9d241
ab705095fe52990f70ccc908f1ede05c
内部开启事务调用的方法 返回是否之前已经打开事务
{ $key = $this->getKey(); if (isset(self::$transactions[$key]) && self::$transactions[$key]['count'] > 0) { self::$transactions[$key]['count']++; return true; } else { $res = $this->dbh()->beginTransaction(); if (true === $res) { ...
1
a806c1588d2c3a95298f8a20264abdb6
84af3475c85666ac9d6db7c43f2e2f66
v1: 从line_from到line_to找出内容包含string的行,返回行号
global file log = open_file(file) search_res = [] if line_from == 0: start = 0 else: start = line_from if line_to == 0: stop = len(log) else: stop = line_to for line_index in range(start, stop): if string in log[line_index]: search_res.append(line_index) if pt: print(line_index, log[line_ind...
1
a7122c6cfc8384172777a4d81cd95f78
7629cce224594ae0a54544040a82a1e4
判断是否是小包UI界面
namespace xys public partial class CameraManager : MonoBehaviour bool IsOverUI() { return App.my.uiSystem.isContain(); }
0
5f6538560b182907b0778f7bf8750d5e
bfa67bfa8cfa1078d82591528d76fcd2
add reference locations to the codemark marker
for (const auto &Ref : ForwardDIEReferences) Ref.second->setValue(Ref.first->getOffset() + getStartOffset()); }
0
490c5a4615ec74796c82fe8ce4983c3c
41a0a2d356ed0f34875dc9db9039b4e3
Transliterate Greek chars
text = text.replace(/&Agrave;/g, "\300"); text = text.replace(/&Aacute;/g, "\301"); text = text.replace(/&Acirc;/g, "\302"); text = text.replace(/&Atilde;/g, "\303"); text = text.replace(/&Auml;/g, "\304"); text = text.replace(/&Aring;/g, "\305"); text = text.replace(/&AElig;/g, "\306"); text = text.replace(/&C...
0
b0b6dfd90d6f2ff9dec4fcf306e33684
f04042b2a7805e51d4462c71c1a8c966
检查几何是否有足够坐标点 每个区至少有四个点,每条线至少有两个点
var doubleTol = 0; for(var i in groupByPoint) { if(groupByPoint[i].length >= 2) { doubleTol ++; } } return doubleTol>=2; }
0
98a816b8961d822d6a31773ca5c84eeb
34e25cf5deba53ecfc8687eba8e9f295
Add the count of the matching HPO terms.
def sum_count(citations, pmid, mesh_term): return neighboring_count(citations, pmid, mesh_term) + citation_count(citations, pmid, mesh_term)
0
a1db88a7c63c58db7aaf32cab7bc7cb6
dcf7d6b9f6725607f385f29568aa6f3e
其宽度为它宽度乘以插件中总展示节点个数的值
function getNodeWidth(total) { total=getDisplayTotal(total); var w =minNodeWidth; var rnum=getRowNum(total); var maxCol=getMaxColumnNum(total,rnum); if (total > 1) { var realNodeW = dashboardW / maxCol; w = realNodeW - 1; } else { w = ...
0
298dbe87ec1e794b38985d4e6125d547
b5cf0c3a8f4fae4086935840f93a4399
Creates a new unlockable from a definition and a gamification interface.
func NewUnlockWithPassphrase(g *libkb.GlobalContext, passphrase string) *Unlock { return &Unlock{ Contextified: libkb.NewContextified(g), passphrase: passphrase, } }
0
f00aef04d077318c999ca0b27faa9c9e
341d40f6ba1caeea8312a97a7d9dec08
Get the id of the corresponding quadcopter module.
UINT8 ModuleContact::GetModuleId() { return MODULE_ID_CONTACT; }
0
6f7949389c5ba6ae660bc37ac6b86e01
c169ce6f7ec0c40206b04f4f3eb5efe2
launch dialog to ask for the type of job to be created
{ if (rbtnNewClient.Checked) { createJobNewClient(); } else { createJobExistingClient(); } }
0
42477c64dc4c77dbaeb42bb58a50ad99
8c984fcb820d798dfedcd064be507671
Position item relative to triggered hand
{ transform.parent = Player.handGameObject.transform; transform.localPosition = Vector3.zero; rigidbody.useGravity = false; transform.rigidbody.velocity = Vector3.zero; }
1
43953f100e4bd626f0db5581e5399fc5
121d7b6b8f16f2c17746ff42223e40fc
Set the name of the timeline cluster index table, which is a SuperColumnFamily.
public void setIndex(String name, BeanTableIndexKeyFactory keyFactory);
0
9d69210deb1ec0a7741e8d5c95bfe71f
948b8b24008592ab3a4ee0a8e93e871e
Parses IMAP optional response from string.
namespace LumiSoft.Net.IMAP public abstract class IMAP_t_orc public static IMAP_t_orc Parse(string value) { if(value == null){ throw new ArgumentNullException("value"); } string responseCode = value.Split(' ')[0]; if(string.Equals("ALERT",respo...
1
6889062283f49bd193f47452afac2e38
5d9bb8e962523478a32539e35dd7ff7f
Write warning of algorithm failure, result was not as expected.
class InconsistentOutput(TunerWarning): def __init__(self, a, b, pfx): self.a=a self.b=b self.pfx=pfx self.debugpause()
1
ab6b15dee86b1aa53c87cb302c2ba9c8
c05e72183886018886c3dd3f98903cae
获取精选房源列表(读master)
val head = java.util.HashMap<String, String>() head["X-Bmob-Application-Id"] = "43199c324d3bcb01bacdbd0914277ef0" head["X-Bmob-REST-API-Key"] = "d4ac4f967651b0a0053a9d3c45c3efa8" val params = "bql=select count(*) from HomeLinkHouse where districtpinying = '$districtpinying' and kv_house_type != 'unsell'...
1
c8cf2efdfe2a1e878f75588588a51bad
9a2ff4f211ce2034c5b3c1a8ca02b41e
Gets the value at `key` of `object`.
return function(object) { return object == null ? undefined : toObject(object)[key]; }; }
1
ba5662ab75654cafccee1fe4d2ea0b26
449a823a784fadb4570362baf6d97a35
Test method for 'gov.nih.nci.security.provisioning.UserProvisioningManagerImpl.removeGroupFromProtectionGroup(String, String)'
public void testRemoveUserFromGroup_4args_2() throws Exception { System.out.println("removeUserFromGroup"); Connection con = DatabaseManager.getConnection(); TestData.clearTestData(); TestData.insertUserData(con); TestData.insertGroupData(con); TestData.insertGroupMemberData(con); User userRemoving = Tes...
0
6b42f0cce9bd056f40dd9e2c45e3087b
fea52dde0ce3a4d259a71d1e535969d6
Read historical price data into a dictionary of dictionaries using the "Date" field values as keys.
import csv import os csvpath = priceHistoryPathFor(identifier) if not os.path.exists(csvpath): print("Warning: No history of prices for", identifier, " [expecting ", csvpath, "]") values = dict() else: csvdate = os.path.getmtime(csvpath) if identifier not in _csv_cache or _csv_dates.get(csvpath) != csvdate...
1
a15094097ba5ce439e04493092f1d60d
859d656d2030944cf11976c05bc0e941
根据系统类型清屏
namespace UIFramework public class UIManager public void ClearByType(UIType uiType) { closingAll = true; UIManager.instance.ClearMask(); foreach (var kv in m_ShowDic) { if ((kv.Key & uiType) != 0) kv.Value.Clear(); ...
1
eaee4ef1b43507e5cec61672656bd406
785cf7c07275a9492fc93616b8baaeb4
Moves whatever is at the "current" position specified, if anything, to the "target" position. If something was moved, returns what was moved. If nothing was moved, eg. there was nothing at the "current" position given, returns nothing.
namespace SE2Game.AI Vector MakeMove(Vector currentPosition, Vector targetPosition);
0
d3f1c0b93d7009a32b6e6f60e4eaba55
68eb6c3190af5fd8054c989a3b9c3bf0
升级版,如果有相同的数,可以找到全部的索引
public class Two_Sum_Unique_Pairs public int twoSum6(int[] nums, int target) { if (nums == null || nums.length == 0) { return 0; } Arrays.sort(nums); int left = 0, right = nums.length - 1; int count = 0; while (left < right) { int v = nums[left] + ...
0
815789845931a6cab9a706ca7b9af4c7
0567d1eca6355d9e765585ea9b051030
Springs the scrollable back to its bounds.
public class BouncyAdapter extends RecyclerView.Adapter implements SpringScroller.SpringScrollerListener private void scrollBack(int headerVisible, int footerVisible) { if (showEntireFooter) { return; } synchronized (lockSpring) { mIsScrollBack = true; isSprin...
1
83dfcd19c96aec533059c1161c2e7a7b
8135bfc51a1bc5d894fc58179d0e8fe2
Changes the visible image representation of this reticle in the GUI
namespace Asteroidians.GameUI public class Indicators : FrameUpdater //TODO refactor this shit omg public static void SetReticleAngle( fint degrees ) { reticleDegrees = degrees; Vector2f lerp = Vector2f.Lerp(Vector2f.zero, reticleAngle * 100, singleton.reticleLerp); singleton.aimReticle.transform.localPosi...
1
87014300b221b5df931840cfdb082a52
df988fbf29d3d24b4796987c88c30c91
The function should return True if item appears in the list more than n times. The function should return False otherwise.
if isinstance(obj, list): return sum([count_above(x, n) for x in obj]) elif obj > n: return 1 else: return 0
0
29b6066be37cb955fb81efac476ed8d4
07a815bc922704027f15e2252a03625f
Set multiple search visibility
class Scaffolding public function setMultipleSearchVisibility($status) { $this->isMultipleSearchable = $status; }
1
b8fd760c33576f92556fc676a055e56e
b9d85244d6781a309207eb8107d46f30
Get Weather Data as string
val temperature = (weatherJSON.getJSONObject("main").getDouble("temp") - 273).toString() val feel_like_temperature = (weatherJSON.getJSONObject("main").getDouble("feels_like") - 273).toString() val wind_speed = (weatherJSON.getJSONObject("wind").getDouble("speed")).toString() + " m/s" va...
1
f85ac501d6356b6840b76e1e0a71d6b0
fff7866efc6b7f00d7e38a4d1703b11f
Remove the specified OrganizationCategory from storage. DELETE /organizationCategories/{id}
class OrganizationController extends Controller public function destroy($id) { }
0
d72cfe1305f29090290688af69506e7a
86d18e82f8026ce0950a4c8b635abcd5
Returns the ngay tao of this yeu cau giai trinh.
public Date getNgayDieuChinh();
0
a4826d42cd6ca3060ce6c2624dc8dd50
231fcd21e96b145b474386083f5f6236
第一次缓动的x位置 多出回弹高度
var tw = egret.Tween.get(sence); egret.Tween.get(sence).to({ horizontalCenter: 0 + shockNum, verticalCenter: 0 + shockNum }, 100, egret.Ease.bounceOut) .to({ horizontalCenter: 0 - shockNum, verticalCenter: 0 - shockNum }, 100, egret.Ease.bounceIn) .to({ horizontalCenter: 0 + shoc...
1
5b47a1157ca43dd852878afccf3d2025
65e75b05c43d12bdbadb34b50e70ca5a
根据account值更新某一个科目的成绩
{ StringBuilder strSql = new StringBuilder(); strSql.Append("update TeacherScoreView set "); strSql.Append("TotalScore=@TotalScore"); strSql.Append(" where Sid=@Sid and Cname=@Cname "); SqlParameter[] parameters = { new SqlParameter("@T...
0
c4a56e438a6b1aa6e47ba6b2ed28672c
9fa3607c2aad06423a430742eabc4f40
Returns a dataframe containing full Simons CMAP catalog of variables.
def KauffmannParent(): dr72_file = ''.join([UT.dir_dat(), 'vagc/', 'VAGCdr72.Kauff2013cut.hdf5']) catalog = {} f = h5py.File(dr72_file, 'r') grp = f['data'] for col in grp.keys(): catalog[col] = grp[col].value f.close() return catalog
0
e0ad6c599c83929a492b92998592665b
4dfdeab5cc55603beba56eb44c801f91
Serializes the given object id.
class ConsoleLogger extends AbstractLogger function objectId ($o) { return $this->write (Debug::objectId ($o)); }
0
0f8b7c2ca7d3670354dbd3c9052cc54c
9d8543b0e75e44f0d9c47a14a4562adf
写入数据到流中 仅支持 byte byte[] boolean boolean[] int int[] long long[] double double[] String String[] Enum枚举 List、Map两种包装类型 以及实现了IDistributedSerilizable接口的类
namespace blqw.Serializable int Write(Stream stream, object value);
1
e74d0279b20ec320a2d520155c6aa8f7
9fc70d76d1ce52fef04d2f4f59524c5c
计算单个店铺的商品总额
@ResponseBody public Map<String,Object> total(HttpServletRequest request,HttpServletResponse response){ Map<String,Object> map = new HashMap<String,Object>(); String ids =request.getParameter("ids"); if(StringUtils.isNoneBlank(ids)){ List<ShopCartItem> list = new ArrayList<ShopCartItem>(); Float total = 0...
1
7eae82ec173cf8d78fd93476260d114e
dbf4d8808a62f33120aa0755cfd5153a
Associe une taille et une couleur proportionnelle a une valeur de neurone
class CountryConverterSecondPartNeuralNetwork extends MultilayerNeuralNetwork function setTarget ($val) { if($val == 1) { for ($i = 1; $i <= self::OUTPUT_NEURONS; $i++) $this->target[self::OUTPUT_NEURONS-$i] = 1 / $i; return; } if($val == 0) { for ($i = 1; $i <= self::OUTPUT_NEURONS; $i++) $...
0
e47118a962d6fc42d32e571c8cba0e68
fd953fefc4d89b78430b0a41ec9e1dc2
Sets the factory out of this device his.
public class DeviceHisWrapper implements DeviceHis, ModelWrapper<DeviceHis> @Override public void setFactoryOut(java.util.Date factoryOut) { _deviceHis.setFactoryOut(factoryOut); }
1
514d572dfed72b666b0158bc991ff059
55c3f03b973d86aed0af5ce843bfb327
根据归档ID获取归档名字
class front_classModel extends Model{ public function getFrontNameById($id) { $data = $this->_getCache(); $data = $data['data']; return $data[$id]['gc_name']; }
1
cb929757a1491e7797fab4e0181794cc
4fb74c9d821a9cab597062c06d7982d0
set count-distinct attribute for group-by queries
public class OWLClassExpressionToSPARQLConverter implements OWLClassExpressionVisitor, OWLDataRangeVisitor{ public void setUseDistinct(boolean useDistinct) { this.useDistinct = useDistinct; }
0
a9c7d276c7bdb4ccd48c386c6e7838b1
58c2aeb2d84d6ab0cc9fe6809f30bc4e
Рендерит список отчетов, включенных в договор сопровождения.
public virtual List<Company.Structures.ResponsibilitiesReport.ResponsibilitiesReportTableLine> GetResponsibilitiesReportData(IEmployee employee) { var moduleGuid = new DocflowModule().Id; var moduleName = Sungero.Metadata.Services.MetadataSearcher.FindModuleMetadata(moduleGuid).GetDisplayName(); ...
0
42ec6505d02235073287da9fc7040adb
42d40ca9ff316ec30188b2f379499727
Tests escaping quotes and ampersands in simple text
html = '<body>This &nbsp; &nbsp; has some extra spaces. and has &#x0022;quotes&#34;</body>' parsed = htmltotext.extract(html) self.assertEqual(u'This \xa0 \xa0 has some extra spaces. and has "quotes"\n', parsed.content)
1
422ae3514586e8d8c183ff90c9e8aadd
55cfc3500c7d413d7ee7f1438f5de0fd
Helper function to move every row above a certain index (row deleted) down one level
for (let rowIndex = 0; rowIndex < this.matrixSaved_.length; rowIndex++) { const rowCompletePrevious = rowCompleteIdx - rowIndex; const isRowOnMatrix = this.matrixSaved_[rowCompletePrevious -1]; const isRowEmpty = this.matrixSaved_[rowCompletePrevious - 1]?.every((elem) => elem === 0); if (is...
0
da346a1378938cb3ec8df2ac2f37a8af
f1a7fc6c642b7bda921ab4e4805cea32
修改库存后检查库存的状态(针对所有操作)
@Service @Transactional public class GoodsImpl implements GoodsService{ @Override public int checkGoodsPutaway(String id, Integer status, String reason,String fixedSale) throws Exception{ int row = 0; Goods goods = mapper.selectByPrimaryKey(Integer.parseInt(id)); if(status==5){ if(goods.getIsJd()==1){ Lis...
0
b35c781a2d4dddd26df36abb1c25cfbc
54ed047cd46df6453989b8365583e9bb
点击向上时候上移一格,,但Y值是减少
{ if (NullPositionY + 1 >= Size) { return false; } else { CellWithTitle cellBuff; cellBuff = cellWhisTitles[NullPositionX, NullPositionY]; cellWhisTitles[NullPositionX, NullPositionY] = ce...
0
a692ee0794789291febe6d8e3cb76da3
4318199573c2970705a6329e88fbcb3b
获取报价拒绝次数
async getForbidNumber() { const that = this; await that.$store.dispatch('_getStatusCount', { im: config.requestInterface.getStatusCount, fps: { 'status': that.articleStatusType.forbidType }, url: config.CONST_FET...
1
89e505407b86807342a8ff71dd9449d6
1735ffb857e7ae39c913358affda6d4e
Stop traffic on ports.
cmd = '{0} {1}'.format(_TRAFFICLINE, '-x') log.debug('running: cmd=%s', cmd) return _subprocess(cmd)
0