query_id
string
corpus_id
string
query
string
code
string
label
int64
1eb07371529677c797275fb9eb5357ba
46bbbc6738a116224ffde7c634e80f47
공의 하단 중앙 좌표 반환
def point_bottom_center(dimensions): return Point(dimensions[0] / 2, dimensions[1] - 100)
1
b65144150a8de2b49d9d1d3422c98627
69041fe206d31fd07c3b63567b87f56d
公会成员列表排序逻辑
function GuildMemManageWindow:on_mem_title_up_callback(index) if index == 1 then if self.sortType == 1 then table.sort(self.model.guild_member_list, self.model.lev_sort2) self.sortType = 11 else table.sort(self.model.guild_member_list, self.model.lev_sort) ...
1
5a24298a47fa4b5ee38c30f015671447
b687d85ade9bde540ab684e88558a52c
同样利用递归,但是不用写辅助方法
class Solution: #递归判断对应点的值是否相等 def isSymmetrical(self, pRoot): def isSymmetry(root1,root2): if not root1 and not root2: return True if not root1 or not root2: return False if root1.val != root2.val: ...
0
5413d3bcb77e2de6095c8d57618b6724
a0fb49dcabd451ef628dbb2102f29626
Check whether the given flags are supported by this server, and also verify that the folder allows setting flags.
boolean hasSettingsEnabled(IslandFlag islandFlag);
0
bc4640ecf2bc4677ae1b690e62141f28
11c92a6b5f78de12678035176de3b4c2
删除分面信息
@EBean(scope = Scope.Singleton) public class DeleteLogic public BaseResponse deleteSsclFj(TLayySscl sscl, TLayySsclFj ssclFj) { String url = netUtils.getMainAddress() + "/api/wsla/deleteFj"; delSsclFjResUtils.activity = activity; delSsclFjResUtils.clearParams(); delSsclFjResUtils.addParam("fjId", ssclFj.getCId(...
1
2176d54a21fe9eb6a2d5014f0ecec0ff
0435c92815271e0e908f09e8b73af515
启动一个作业调度,每次调用都将创建新的{@link org.hswebframework.task.Task}. 如果多次调用,并传入相同的jobId,此job将会被多次执行.
void startJob(String jobName, JobParameters jobParameters);
1
982b74b0da6594f67865e99cca34bed2
e3004bdc11680fa0aa160578896b5f89
Returns the coefficients for a model that has been reduced with sklearn's PCA.
if not hasattr(self.model, 'coef_') or not hasattr(self.model, 'intercept_'): raise NotFittedError() return self.model.coef_
0
2a002797b45521362b0a6ebd336f589e
8f1a491b100c887fa050949eeb8ca2d0
Add new gesture and check duplicates
public class KinectManager : MonoBehaviour public void DetectGesture(Int64 UserId, KinectGestures.Gestures gesture) { List<KinectGestures.GestureData> gesturesData = playerGesturesData.ContainsKey(UserId) ? playerGesturesData[UserId] : new List<KinectGestures.GestureData>(); int index = GetGestureIndex(gesture, re...
1
5fe92e543f2f67b868e1c2460f0c5721
83cdf24a0c36ce1a6ae8ee2c139d9e45
returns the number of operands a function takes
{ char *ptr = args; int count = 0; while (*ptr != ')') { if ((*ptr == 'I') || (*ptr == 'C') || (*ptr == 'B') || (*ptr == 'F') || (*ptr == 'S') || (*ptr == 'Z')) { count++; ptr++; } else if ((*ptr == 'J') || (*ptr == 'D')) { count += ...
1
e0cec4796cbed7318ba782aa8f1f2561
1f32d8af26435ec78a690db872a21f5b
This will get a javascript view encapsulated in an anonymous function for embedding in HTML.
{ $ret=<<<EOR <script type="text/javascript"> $AJAX </script> EOR; return $ret; }
0
13bb725e7f9395bd793d39ee7bad0842
9d740bf5b2c05dd47d3948caf33b6526
Stop the preview of a building
var allBuildingsPreview = GameObject.FindGameObjectsWithTag(Phobos.Vars.BUILDING_PREVIEW); foreach (GameObject build in allBuildingsPreview) { GameObject.Destroy(build); } }
1
5cd51259eca52c310dbfbe017c6a0935
fa567b301ed52b013cb690a2947161c0
使用层序排序的方法构造树
TreeNode head = new TreeNode(values[0]); LinkedList<TreeNode> queue = new LinkedList<TreeNode>(); TreeNode node; TreeNode last = head; TreeNode nlast = last; queue.offer(head); int i = 1; while (i + 1 < values.length) { node = queue.poll(); ...
1
dea976010d2e4279d7852de4c9c4024e
2cb66e9750f9317de74ff1f1fee80310
Dispatches notification demands from clients to the notification queue
if P.connected() then local post = NtfNmList[nm.type] if not post then MsgQueue:enqueue({nm = nm, only = only == true}) end if post or MsgQueue:count() == 1 then GameCli:send(nm, post, only == true) else log("Enqueue: {0}", nm) end end end
1
73a9acadfcb3592727c8f112f08ea497
e276f6a198186f62d675047ff1323855
Sets garage_spaces
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Property", namespace = "http://connect.bookt.com/Schemas/Property.xsd", propOrder = { "address1", "address2", "adjLivingSpace", "altID", "amenities", "amenityTypes", "availableOnline", "avgReview", "bathrooms", "bedrooms", ...
0
08c4b7207d8aba0c8511eb7aa87b8bed
24d8e3520bebc76bd7bd80d96435839f
Sort by suit and value
{ usort($this->cards, function($a, $b){ if($a->getValue() == $b->getValue()) return 0; return ($a->getValue() > $b->getValue()) ? -1 : 1; }); return $this; }
0
f2c857f559e46a9c44132b195ff88e45
f486bb1d6c391eb7d7a6baae26472e78
執行"我"在哪裡 1.建立位置改變偵聽器 2.預先顯示上次的已知位置
public class Driver extends AppCompatActivity public void initLocation(){ latestLocationInfo = (TextView) findViewById(R.id.driver_locationInfo); location = new LocationClient(getApplicationContext()); listener = new Driver.MyLocationListener(); location.registerLocationListener(listener...
1
3e7738d3e3b4adafd23d886e894849a3
4165ba701471ead515d8b2f475b8584b
Returns the parents of the variables present in the network
if (!this.contains(name)) { throw new Exception("Vertex doesn't exist in the graph"); } return VertexToTyp(this.getVertex(name).getParents()); }
1
bcfd6cbf33d29e7a22f759556ec31ab5
c042634606188ad3afd68594a95e146c
Function to implement stochastic gradient ascent
if 'cnt' not in stochastic_gradient_descent.__dict__: stochastic_gradient_descent.cnt = 0 if stochastic_gradient_descent.cnt >= X.shape[0]: stochastic_gradient_descent.cnt = 0 if stochastic_gradient_descent.cnt == 0: stochastic_gradient_descent.random_index = np.arange(X.shape[0]) np.random.shuffle(stochasti...
0
a593cd5266abf7d0f35b9d9db33dbd71
37d1e28adb7590ce0906723b52b4a201
Set the Reporting Entity Id property of the event header.
public class RecordingReservationContentsDetailInfo public void setEventId(final String eventId) { mEventId = eventId; }
0
841a8218c2de2d9c5ff85cb79079df73
2a9dfa6d418c5459b1fcb85c9a30cc84
返回压缩格式的公钥 基点运算函数,给定指定的私钥(随机数),计算公钥(Q=kP)
public class AccountUtil private static byte[] publicKeyFromPrivateKey(BigInteger bigIntegerPrivateKey) { byte[] bytePublicKey = CURVE.getG().multiply(bigIntegerPrivateKey).getEncoded(COMPRESSED); return bytePublicKey; }
1
1ed6dea83f9ced6c672ea11349f856b2
76a8e47021367a3cfca245c4021f3ffb
Shifts this drawable's current rotation by the passed value, in degrees.
public class RikkaStickerView void rotate(float degrees) { mMatrix.postRotate(degrees, mCenterPoint.x, mCenterPoint.y); updatePoints(); }
1
2e49529e77fb0ae7d87528d8cc515503
7bf644033110b1058e7925b30758498e
Initialise Thread Network Data cache
interface IInit fun threadInit()
0
b7be7793778a63fea17cf998bfdcf477
5c7fa882eb214d0ed406361b1935ef38
false for original object
class TrackableObject(models.Model): def is_new(self): if self._original_id: return False return True
1
a95bef19481173c81449b6006a7aeb7f
3a3042757feafdfde8e4c2dc9f02db8e
sets the background color of the arrow and popup using the resource color.
public abstract class TransformersTip extends PopupWindow implements PopupWindow.OnDismissListener public TransformersTip setBgColorRes(@ColorRes int resId) { mArrowDrawable.setBgColor(getContentView().getResources().getColor(resId)); return this; }
1
90732146f6070b148b03705c9b012410
fa9ba091fa5e336c207d2c58769a1ae4
Установить актуальные цены для всех позиций определенного заказа
class Management extends PassThrough public function syncPrices(array $prices): void { $currencies = product()->getCurrencies(); foreach ($prices as $currencyId => $price) { if (!$currency = $currencies->where('id', $currencyId)->first()) { continue; } ...
0
6a6faf163ffbb78b261f3b4f2a1cdeff
34a358970265030c1d2d9be396d97af7
Oculta todos elementos do menu Target " Você está aqui" posteriormente será chamado do show dos elementos necessários
[].forEach.call(elem.querySelectorAll('.' + contentClass), function (item) { item.style.display = 'none'; item.style.opacity = '0'; }); [].forEach.call(elem.querySelectorAll('.' + titleClass), function (item) { item.className = removeClass(item.className, activeClass); }); }
1
6032045c20ff3548da7870a09a7607c3
50e030639adf1e39522f2767741982f3
Draws the planes detected.
public class Main_GLEventListener implements GLEventListener private void drawPlanes(GL3 gl) { modelMatrix = Mat4.multiply(Mat4Transform.translate(-5f,15f,-10f), Mat4Transform.rotateAroundX(90)); modelMatrix = Mat4.multiply(modelMatrix, Mat4Transform.scale(50f,1f,30f)); plane1 = new Model(gl, camera, lig...
1
ccb49f4bea10ea759cf688aa9425c68d
e19e68b24156f6cf93b037a993ff1eeb
Functie de verificare daca un numar este magic sau nu
copy=n c=0 while n >= 1: c=c+1 n=n//10 puterea= 10**(c-1) for i in range (1,c+1): prefix = copy // puterea puterea = puterea // 10 if is_prime(prefix)!=True: return False return True
1
a7e88d3d61289d5ce2c3d4f584a8e8cb
f8990129a9d9eff11a7e1a56ef1bc693
Function for generating synthetic multivariate time series which contains NaN's Returns a pandas object with index with date type.
df = create_dataframe([ ( '01/01/2017', '01/02/2017', '01/03/2017', '01/04/2017', '01/05/2017', '01/06/2017', '01/07/2017', '01/08/2017', '01/09/2017', '01/10/2017', '01/11/2017', '01/12/2017', '01/01/2018', '01/02/2018', '01/03/2018', )...
0
93e626e7b67f19dd45326ec93597793f
e11f71d931f6c4a1db0dfeb4e087c83c
при зміні значення у якійсь клітинці оновлює значення у всіх залежних клітинках за допомогою dfs якщо виникає цикл - заповнює клітинки помилками
for (int xoff = -1 ; xoff <= 1 ; xoff++) { for (int yoff = -1 ; yoff <= 1 ; yoff++) { int ioff = i + xoff; int joff = j + yoff; if (ioff > -1 && ioff < this.m && joff > -1 && joff < this.p) { Case newVal = this.board[ioff][joff]; ...
0
87484045ae9f85ee8c4ae98a2b7e3ce2
5b2b35be9dc69ab3cbb66659d05d9a23
Ensure decaf can be properly set and retrieved - Default is false
{ $value = true; self::assertEquals(false, $this->fixture->isDefault()); self::assertEquals($this->fixture, $this->fixture->setDefault($value)); self::assertEquals($value, $this->fixture->isDefault()); }
1
172e1cfd4d08f9b2834fe779c797bc9c
b8b21cb5c04fba1719effa9fec766772
Gets an assembly attribute.
namespace System.Reflection [__DynamicallyInvokable] public static class CustomAttributeExtensions [__DynamicallyInvokable] public static T GetCustomAttribute<T>(this Assembly element) where T : Attribute { return (T) element.GetCustomAttribute(typeof (T)); }
1
1b145cdcf41a57ce5919cf82bccc62f2
dd802beb0715e8221976903545b68d70
管理者トップ画面へリダイレクト
namespace sample01.Form.category07 public partial class tbl01 : System.Web.UI.Page protected void btnEnd_Click(object sender, EventArgs e) { Response.Redirect("./../topPage.aspx"); }
1
5b172592a14ad0adbd38d1234dca0c07
15ef0f7bb17fe7ba68453a8c7cd14812
called to enforce rbt properties once a insert is done.
static void rbt_delete_fixup(rbt_node_ptr &root, rbt_node_ptr delete_node){ }
0
a18f108f395a3473c2e7782c836551b5
bc9910b34fd3838426acb2de94e9a336
wait_queue和runnable_queue共用一把锁 因为协程任务挂起的时候需要操作runnable_queue+wait_queue,时间轮timerloop线程唤醒挂起的协程时也要 操作wait_queue+runnable_queue
@SuppressWarnings("unchecked") public class MultiLinkedBlockingQueue<E extends MultiQueueRunnable> extends AbstractQueue<E> implements BlockingQueue<E>, java.io.Serializable, MultipleQueue void fullyLock() { putLock.lock(); takeLock.lock(); }
1
cad466b0993aca7b205e0a659c0a88cc
73dfb3d184bce9fd6163f86ed9025ec7
Initiates the asynchronous execution of the DescribeRestoreJob operation.
namespace Amazon.GlueDataBrew IAsyncResult BeginDescribeJob(DescribeJobRequest request, AsyncCallback callback, object state);
0
ffeef38d6655cda4397ca787fcc7884e
a84c437d1e2719a1c8975615dee34e39
Returns 0 if connection was successful, -1 otherwise
int connect_to(const char *addr_txt, const char *port_txt) { struct addrinfo hints; bzero((char *)&hints, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; struct addrinfo *addr_p; int err = getaddrinfo(addr_txt, port_txt, &hints, &addr_p); if (err) { fprint...
0
148bc72d315f01bd0e542e8c87b7c7af
1f7a94c6510a1a086bc5e20a32dc525a
facts (given)
var i = 0; var updatedFacts = []; while (i < facts.length) { updatedFacts.push(`${facts[i]}!!!`); console.log(`$updatedFacts[i] !!!`); i++; } return updatedFacts; }
1
e2f2286274b4c4b13d384e401b596f83
83ace625f90b001953af0990705c78dc
Don't validate during play mode
namespace FIMSpace.FTail public abstract class FTail_AnimatorBase : MonoBehaviour public virtual void OnValidate() { if (Application.isPlaying) { } }
1
6c0518c827973a75a34c5249374a7642
7fc2483099e4a8805cceb001916b62a2
Sets the food item name.
public class Item public final void setName(final String nameParam) { this.name = nameParam; }
1
54084f0fecc09a55b3fc9d2e1a828a94
6c61550f647a1d76c4c73f3e13e151f6
renvoie un affichage formate sur 4 digits de l'annee
now = datetime.now() titre='' titre+=str(now.year) if now.month<10: titre+='0' titre+=str(now.month) if now.day<10: titre+='0' titre+=str(now.day) return titre
0
ad03ee6fc8bbdc6b2e5949d119f65f8f
6c2e336946efb9e1bda4e6b71a2785a2
Test :func:`addr.isIPv4` with a :rfc:`1700` reserved IPv4 address.
class InterfaceConfigTest(unittest.TestCase): def test_ipv6_reserved_reject(self): interface_cfg = NetworkInterfaceConfig('dummy0') with self.assertRaises(ValueError): interface_cfg.add_v6_ip(ip_address='dead:beef::', prefix_length=64)
0
d7776c1959eabd2b404ca85c41cd70c4
1b14da356a32d9d5d6eff27d93933fbb
Tests exception notification by raising an uncaught exception.
async def exception_test(q): return await q.q(raise_exception)
1
4145718cc075fd824ec3837d13f1f681
4f29ae97d7f9207a3ce50b4c2db40a99
返回key对应的值的第一个元素
public class MultivaluedMapImpl<K, V> extends HashMap<K, List<V>> implements MultivaluedMap<K, V> @Override public V getFirst(K k) { List<V> list = get(k); return list != null ? list.get(0) : null; }
1
04e2e226a16f2448fd5f969d1271610a
7fb9bbafb3994c859e162c489231d143
This method changes the starting position of the missile.
public class ProjectileLaser : ProjectileBase public override void SetStartPosition(Vector3 start_pos) { _startPos = start_pos; }
1
61a24f84aa1b1e314b7f42ad78e52785
51143cdf7676c0c89fb5997d9aa9b544
print in pre-order sequence
void print_preorder(Node* root){ if(root==NULL) return; printf("%d ",root->data); print_preorder(root->left); print_preorder(root->right); }
1
450995e1904ecf43dbe730680762b4ae
35ae58553e057d28c144a65f287cd0cc
Listens for DOM changes
function observe() { new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { switch(mutation.type) { case 'childList': mutation.addedNodes.forEach(function(node) { resolveNode(node) }) break...
1
68b43eed450f11a8f00e987cbbd0317d
ecfd7b57d89353d570399bb4ebd05626
For each que verifica y asigna la informacion del gasto selecionado a la variable del HTML
{ console.log('precioVenta: '); console.log(data.precioVenta); document.getElementById('sumCI').innerHTML = data.sumCI; document.getElementById('recetaPara').innerHTML = data.porcionpersona; document.getElementById('costounitario').innerHTML = data.costoUnitario; document.getElementById('costoUni').inn...
1
49e79283b277e809f1cf9cd77d50bb1f
5b654e3ccb011e879bd38912e2a42380
Получает информацию о глубине рынка по валютной паре
namespace CryptoCompare_Api.Clients Task<TopExchangesVolumeDataByPair> GetTopExchangesVolumeDataByPair(string fsym, string tsym);
0
277d7b662df6a5431d37baeb1459c2bf
44fe8136e8a4f10f71992d64836213c9
异步自增缓存key的值(整数类型)
class mRedis extends Redis public function incr($key) { $key = $this->getCacheKey($key); return $this->handler->incr($key); }
0
5bf748f9bea332a60cbf64632758a193
7eaa349bc4ba4f52b87662a60c836a64
Test <code>getOptionalPropertyString</code> for invalid namespace. <p> It will throw ConfigurationException. </p> to JUnit.
String value = UserLogicPersistenceHelper.getConfigProperty(DB_CONNECTIONFACTORY_NAMESPACE, "myProperty", false); assertNull("Null should be returned: missing optional property", value); }
0
de0a6463958bd22cabc1637e9137450e
cf67ee59b14b7f4d61ef678a713d98fa
기본정보설정 이메일아이디 변경시 이메일아이디 중복체크
$setting_email=$.trim($("#setting_email").val()); $.ajax({ type:"POST", url:"member/edit_emailCheck", data : {"setting_email":$setting_email}, datatype : "int", success : function(data) { if(data==1) { $("#emailModifyCheck").text("중복된 이메일입니다. 다시 입력해주세요 ! :P"); $("#emailModifyCheck").css("...
1
abc38ade556ec6b7a036d8fd562c89ad
836c9c267ec4cc93899ccf28c1151abd
Gets the {@link org.niobe.world.Mob}'s defense level. damage dealt to the {@link org.niobe.world.Mob}.
public function getDefense();
1
2ff19ebdc9a079f4f5cbd6608a0fdf75
71d03fb2c828cd60a2603fddcb374baa
根据卡号获取银行卡归属地信息
ShopUserBankInfo selectBankInfoByCardNumber(String cardNumber);
0
9534d6b4bdd4a2da11f1c5a0918e142a
4b0033b50b24622e9a186a284faae331
@brief Ordenação por inserção
void InsertionSort(int vetor[], int tam) { int i, j, aux; for (i = 1; i < tam; i++) { aux = vetor[i]; j = i - 1; while ((j >= 0) && (aux < vetor[j])) { vetor[j + 1] = vetor[j]; j = j - 1; } vetor[j + 1] = aux; } }
1
b7bb4e05e50fc8b8767d19ac12a087a3
7ae7efde1a27eb93a14a6339a8f42f6c
Gets all real estate projects.
[ProducesResponseType(typeof(ProjectsVm), StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(StatusCodes.Status404NotFound)] [ProducesDefaultResponseType] public async Task<ProjectsVm> GetAll() { return awai...
1
3084ee249d9c10a5a9dc1ac099ebfd51
992bf146aab926a2f46753f098f312ef
Accesseur de la liste de polygones du Tracé
public final class Map public List<Attributed<Polygon>> polygons(){ return polygons; }
1
fce6d35aa97d54856b56d82fb279c921
1bbf9b42e06cf7c98c063e1cdbb984ae
Tests the DialogValidator for an intent to be elicited
return { sessionAttributes, dialogAction: { type: 'ElicitSlot', intentName, slots, slotToElicit, message: { contentType: 'PlainText', content: message }, }, }; }
0
ede2fe610df0dda9f47c1f63119134f8
b6bb583e324afadd434d598a6007aa2a
Vrací datum do kdy je půjčka
public class SimpleCabParameters public String getPickupDate() { return this.pickupDate; }
0
6a8b1db597029647afae0ffe0665cf7a
a1133de7fc5f23b42bb8c99e493d6702
重置overlap属性
if (!isChain) { js.append(jsBase); isChain = true; } js.append(String.format(Locale.US, ".overlapMode(%s)", wrapQuotes(overlapMode1))); if (isRendered) { onChangeListener.onChange(String.format(Locale.US, ".overlapMode(%s)", wrapQuotes(overlapMode1)));...
0
111b1851433dbe915586724f1b5e1ee0
5c5b5435d424b371cd10929d494c2899
添加用户,可以级联添加用户的角色信息
@Service("sysUserBasisService") public class SysUserBasisService public void addUser(SysUserBasis sysUser, List<String> roleList) { sysUserBasisDao.addUser(sysUser); addOrUpdateUserRole(sysUser, roleList, false); }
1
27260bae7363a2ac5cc5462c0342a09b
2e64dcd91b663e05441f72226802aa98
複数バージョンのモデルデータを出力するためのHTMLを記述し、出力用タグに適用する。
DEBUGLOG("DisplayMultipleVersionData", "start", 0); var appendText = ""; if ( (isEmpty(overviewData)) || (isEmpty(chartData)) ) { return; } appendText += "<div class='slideshow' style='display:flex;'>"; Object.keys(overviewData).forEach(function(version) { appendText += "<div class='stats-sm...
1
a7da7e9d4818358ef3f52ce0dc2030fc
ac20fedb8cd3e5d297023c7fb142ef2c
Класс ошибки, связанной с отсутствием имени проекта, при добавлении в БД
class NoStarError(Exception): def __init__(self, value): self.value = value
0
4ab676832a0b99b2d94acdaf00933fd5
b39e48f83eb6cc86dfebaf87f61930bc
Sets a listener on the producers radio button
public class ApplicationForm extends JDialog public void setProductiveRadio(boolean productiveRadio) { this.productiveRadio.setSelected(productiveRadio); }
0
410af27b3d31a63a499ecf185e44968a
e041a782d3d79ac1d22d36d09a1349d8
Compute size of files that need to be moved.
{ _ValidateParameters(srcDir, destDir, maxFileSizeSum, maxFileCount); var fileCountDictionary = FileCountFileUtil.Load(srcDir); var fileSizeDictionary = FileSizeDictionaryUtil.Create(srcDir); fileSizeDictionary.Remove(FileCountFileUtil.FileCountFileName); ...
1
3b4cdbbe312603b45a3d01265beb3725
af22a277af7d718f21f8cc6a8e95a78e
usar a localização real do Usuário no mapa
getGeoLocation(); if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ var nPos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); userM.setPosition(nPos); userM.setMap(mapi); mapi.setCenter(n...
1
bf4b21ba3e9a987901cece057d5449fc
597045b80741bcdd231ad61615d2a65e
获取绘制的Bitmap 先从缓存中取,如果没有取到可用的Bitmap,则Glide请求
public class AsyncImageLoader private Bitmap getBitmap(String key) { Bitmap bitmap = null; bitmap = memoryCache.getBitmap(key); if (bitmap == null) { File file = fileCache.getFile(key); BitmapFactory.Options options = new BitmapFactory.Options(); boolean inJus...
0
63985d2bfc27365640cf929c4f0bbc39
a64940d645d28b3f1660aa56c90a27eb
De-initializes the display power domain HW state. It also ensures that the device stays powered up so that the driver can be reloaded. It must be called with power domains already disabled (after a call to intel_power_domains_disable()) and must be paired with intel_power_domains_init_hw().
static void i915_free_hws(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; struct intel_ring_buffer *ring = LP_RING(dev_priv); if (dev_priv->status_page_dmah) { drm_pci_free(dev_priv->status_page_dmah); dev_priv->status_page_dmah = NULL; } if (ring->status_page.gfx_addr) { ring->sta...
0
b98ebca0fdf28500172bb75888cf5838
a52b5420a5a2153a7096141f9e75d05e
治愈
local suckValue = (target.phySuck + bullet.phySuck) * bullet.physicalHurt + (target.magicSuck + bullet.magicSuck) * bullet.magicHurt; if suckValue > 0 then local beTreatPromote = (1 + target.robust) * (1 - target[7090] * 0.0005); if bullet.skilltype == 1 then local finalH...
1
ee94c9ac52dd240038b4c1cb8f841b20
8dbf33a832c23a948aefddbb56495846
Set all values of a given channel to a specified value.
def set_channel_value(X, channel_idx, value): assert(value>=0 and value <=255) I = X.copy() if channel_idx < pgc.num_channels(I): I[:-1,:-1,channel_idx] = value return I
1
45f5f7784f3cbfb2b79dd8a8ec81b158
6198bae9926648cd92e2e82e1da2c158
Valida que el text introduit és alfanumeric
function textAlphanumeric(inputtext, alertMsg) { var alphaExp = /^[0-9a-zA-Z]+$/; if (inputtext.value.match(alphaExp)) { document.getElementById('p1').innerText = ""; return true; } else { document.getElementById('p1').innerText = alertMsg; inputtext.focus(); return ...
1
829578f4cfe5525802c4f098e0339b05
6b027663086958ce406d906b4d8b6951
Copies the module to page.
copypagesettings=True): db = self.db settings = self.settings obj_module_to_duplicate = db.pagemodules[pagemoduleid] tpages = db.pages pages = db((tpages.isdeleted == False) | (tpages.isdeleted == None) & ...
1
3278b29da140b7758b72f268e121ebfc
ac288578d88bb30b5058b07de1005c74
根据当前月向前取月份。月份跨度由span指定
Calendar c = Calendar.getInstance(); Date date = null; try { date = new SimpleDateFormat("yy-MM-dd").parse(specifiedDay); } catch (ParseException e) { e.printStackTrace(); } c.setTime(date); int day = c.get(Calendar.DATE); c.set(Cal...
0
e4a6624bf0a5ac59591c7bdd78834129
48791350025b4964b2da3d195330c7e5
Get the data if we haven't already got it
class _: def __getData(self): if not hasattr(self, "result"): temp = self.data else: temp = self.result return temp
1
10ba5eb6a8ebb008668b34702408f6b5
e1299ce47987cd91b02d89bfc6c2fb66
Opens EP0 bidirectional dedicated control endpoint
bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) { (void) rhport; uint16_t reg_val; const unsigned ep_addr = ep_desc->bEndpointAddress; const unsigned epn = tu_edpt_number(ep_addr); const unsigned dir_in = tu_edpt_dir(ep_addr); const unsigned xfer = ep_desc->bmAttributes.xfer...
0
35665fb84ea1acbaa45c7c9aa59470a7
f8ade188e011f7caf66c2cffaa1f0cb6
computeExactMatches takes the computer's list of colors and the player's list of colors as input and returns the number of correct colors in the correct position
def count_exact_matches(str1, str2): checkCount1 = 0 for y in range(4): if str1[y] == str2[y]: checkCount1 += 1 return checkCount1
1
1e1f4485d67be49e3ed86c3850b71c2f
d0eb4e0d033a2b24a95447f229c66db4
验证登录表单录入的用户名和密码是否一致
@Controller @RequestMapping("/users") public class UserController @RequestMapping("valifyUser") @ResponseBody() public Integer loginValifydUser(User user, HttpServletRequest request) { user.setUserPw(RC4Encrypt.getkeyToPWD(user.getUserPw())); User user1 = userService.getUserByUserNameAndUserPwService(user); if ...
1
900b246ee39a3507e670f9684ee94d1f
21edec41c4bb766b457c40fb3e703cee
Displays the splash screen for a set duration.
__stdscr.border(0) __stdscr.refresh() time.sleep(0.5) centreY = (int)(curses.LINES / 2); centreX = (int)(curses.COLS / 2); halfSplashLen = (int)(len(__SPLASH_TEXT__) / 2) win = curses.newwin(5, len(__SPLASH_TEXT__) + 6, centreY - 2, centreX - halfSplashLen - 3) win.border(0) win.refresh...
1
0c7a76b72b4dc8c51b336e6b10145a9f
367a4d8450a35accb5880a4bb9f20a8c
Perform an HTTP POST with progress reporting capabilities.
{ Async(() => { try { var request = (HttpWebRequest)WebRequest.Create(url); using (var sw = new StreamWriter(request.GetRequestStream())) { foreach (var pair in postData) ...
0
7b742e41c5b57d02da4cca2728c3c3ea
9afdf64388403e95a15ebaa3f7f1cf8e
Run the CPU and timers
void CPU::emulateCycle(){ fetchOpcode(); decodeAndExecute(); checkTimers(); }
1
615952588d041a5d736f774a15fb5570
74c85be05becd04e9942fcc0776d0519
对折扣优惠进行独热编码,优惠特征
uniq_item = X.unique() encode_df = pd.DataFrame() for item in uniq_item: encode_df[X.name + '_' + str(item)] = [1 if i==item else 0 for i in X] return encode_df
1
547965f4704fbbb078141142aa8bc24f
718523ff94b65c2aea4617c6180681fb
字符串转换为指定格式的日期类型
namespace Bing.Extensions public static partial class BingExtensions public static DateTime ToDate(this string obj) => Conv.ToDate(obj);
0
e38d0eb72adf900655796339ffc674ee
2a04a390ffa1bfa368e1b88323fface5
用户单个会话的详情,显示会话里面的多条消息
@Headers({ "Content-Type: */*", }) void getSingleConversation(@Param("id") String id, @QueryMap(encoded=true) Map<String, Object> queryParams);
1
25a2b597c81053e1909377bbeefbb234
c76d368bb5dc15f302f4a066c65dcc14
final output of output layer, given input of activation values
def eval(x): activations = forward_propagation(x) return activations[len(activations)-1]
1
109ecbd617adce0fc6b0b61878ab1d1e
a69f2063a4165513c6970efecfba47ac
Returns the object with the settings used for calls to createBucket.
class ObjectStorageBucket(DerivedBase): def access(self, cluster, bucket_name, permissions): return { "cluster": cluster, "bucket_name": bucket_name, "permissions": permissions, }
0
e131007dd131c3f13fc4b748e383b70d
aa1b00acab73a724aec06399dcc0cd1d
Возвращает ключ ссылку на тарифы
{ return (new Query) ->select([ 'tt.title', 't1.value' ]) ->from([ 't1' => 'calc_tariffs' ]) ->innerJoin([ 'tt' => 'calc_tariffs_types' ], 't1.type_id = tt....
0
28dab756a9704736b8cb3c1c15b5e199
98a4089574304015abfed44e88bfcd03
获取人次-时间统计
{ Validator::make($request->all(), [ 'table' => 'required|string', 'timeSize' => 'required|string|in:year,month,day,hour,minute', 'startDate' => 'required|date', 'endDate' => 'required|date', ])->validate(); $model = DB::table($request->...
1
100df3681dfbfda8150e8d6888bcb53c
bcc29ee8987d2e08a3fd6b062dbf08c5
Initialise the peer manager
static ret_code_t peer_manager_init(const m_coms_ble_params_t *p_ble_params, bool delete_bonds) { ret_code_t status; ble_gap_sec_params_t sec_params = { .bond = CONFIG_SEC_BOND, .lesc = CONFIG_SEC_LESC_PAIRING, .io_caps = p_ble_params->sec_params.io_capabil...
1
6e5de08ee3a52ff8dcd60f2b743d8200
885f3dfa202a715f26324b28d20ecf3e
once started, periodically injects random numbers to given ID's StageData -table
class joostina_api public static function optimizetables() { if(mt_rand(1,50)==1) { register_shutdown_function('joostina_api::_optimizetables'); } }
0
8708388de004f13846f0264cd37a1c58
53fe0375ab5c9ed7661604ca482f7f21
<p> Add the given Clients into the database. </p>
void createClients();
0
a5ee84196c052feeef1ebfc591f6223d
5d38cc097df3906149f1ebeb5d9b92b2
@brief change sensor output framerate & isp exposal time
SensorBayer_WriteExposure( SensorBayerContext *pContext, const NvF32 *pNewExposureTime, NvU32 *pFrameLength, NvU32 *pCoarseTime) { #if (BUILD_FOR_AOS == 0) AR0832_Stereo_Info *pStereo_Info = pContext->pStereo_Info; NvF32 Freq = (NvF32)pContext->VtPixClkFreqHz; NvF32 LineLength = (NvF32)pCont...
1
569483e8f51dc72cde839779c662ff33
49c88b0af337ca75dc656953103214ad
Turn all squares the same color
for (var i = 0; i < colors.length; i++) { square[i].style.backgroundColor = colors[i]; } }
0
e91a3a5d1f6cc3e2866de17681017b7b
ed61b0686cfe23a99b361ce2e09cd6f8
get status in associative array that <b>key</b> is status code and <b>value</b> is status message
class Category extends \Phalcon\Mvc\Model public static function getStatusMessages() { return self::$statusMessages; }
1
6437398f09f9f3373c26ff26e1789f05
60c989f6a9a9744d1213ef283ed5dd24
Supprime une requête enregistrée
class RequestController extends Controller public function destroy($requesd) { if(!Auth::check()){ return response()->json([ 'error' => "Vous n'êtes pas connecté" ], 422); } if(!in_array("MRQ",Auth::User()->prv)){ return response()->json([ ...
1
756bb300abc2898ef90eb9b6c9e3a8d1
177138a007168c7a55f51f14b4b88ee9
Autocarga las clases que se usan durante la ejecución interna de la aplicación.
spl_autoload_register(function($className) { $pathCore = ROOT . DS . 'core' . DS . $className . '.php'; $pathControllers = ROOT . DS . 'app' . DS . 'controllers' . DS . $className . '.php'; $pathModels = ROOT . DS . 'app' . DS . 'models' ...
1
fb820eb82d79c56168f2743bf961abe1
c6364aa37f3404793802273ca8268fd8
Opcode $A1: LDA (zp,x)
class ZeroPage(): def zp_lda(self): oper = self.decoder.cont_zp res_8b = self.fh.getActualNum(oper) self.fh.setNegative(res_8b) self.fh.setZero(res_8b) self.cpu.a = res_8b return self.decoder.immediate
0
4264f787ace706dd5ed2e48965e73179
4d2df60f59c798568f1bc17f4bbebabe
Set USB request line coding to UART DCB structure
tBoolean SetLineCoding(tLineCoding *psLineCoding) { unsigned long ulConfig; tBoolean bRetcode; bRetcode = true; switch(psLineCoding->ucDatabits) { case 5: { ulConfig = UART_CONFIG_WLEN_5; break; } case 6: { ulConfig = UART_C...
1
f8cd4cc5af3b325bca1567407a24f7cb
7ca28bfaa6d1ee41361ab6b2df07aab1
! This method steps the simulation until the specified stop time and stop priority have been reached.
private int relax( long stoptime ) { while( step( stoptime ) ) { EnterStopState(); } return( cur_delta - stoptime ); }
1
886732e5ec2298e2e83e53cbf92fe21e
5b36b049d0bd9949a358232949ef386a
Mark selected players as competing in the championship.
final ArrayList<PlayerDto> playerDtosToRemove = new ArrayList<PlayerDto>(); for (PlayerDto selectedPlayer : selectedPlayers) { for (PlayerDto playerDto : playerDtos) { if (selectedPlayer.getId() == playerDto.getId()) { playerDtosToRemove.add(playerDto); break; } } } playerDtos.removeAll(...
0
01134b8aa919c22277b9c0c04e2387da
821252c91d4f9697fd4f86559d782e0b
Reads the parameters from the tags in the given molecule.
logger = Logger() logger.info(' - Initializing molecule from a SMILES tag') self._initialize() logger.info(' - Loading molecule from RDKit') rdkit_toolkit = RDKitToolkitWrapper() self._rdkit_molecule = rdkit_toolkit.from_smiles(smiles) if self.name == '': ...
0