query_id
string
corpus_id
string
query
string
code
string
label
int64
1816083947b270625efc94daeb450fc3
e34cb22d259673df4e5a9f46c0a14364
이 테스트는 JsonNode를 사용하는 방법을 보여줍니다.
String string = "{\"name\":\"Mahesh Kumar\", \"age\":21,\"verified\":false,\"marks\": [100,90,85]}"; JsonNode jsonNode = objectMapper.readTree(string); JsonNode nameNode = jsonNode.path("name"); log.debug("\tnameNode={}", nameNode.textValue()); JsonNode ageNode = jsonNode.path("a...
1
5a7513f95e8b265dddda76fe33370b72
3bc40e7ec8b2e92622c658b566b8fcd2
根据活动时间获取活动配置。一般用于当活动结束后,获取活动配置用
public getActConf(aid: number): ActivityConf { return this._actConf[aid]; }
0
e4a303b190dd1be684514df74d81c472
65486943f0179a54dbf92ed5458c4f3d
получение имени должности по коду
function getPositionName($positions, $position_id) { foreach ( $positions as $position ) { $positionlist[$position['id']] = $position['name']; } return isset($positionlist[$position_id]) ? $positionlist[$position_id] : ''; }
1
45ec309cd9f968747b7944bcee445337
1dafe12565778d00c00a2511c4ffacdb
更新头部信息为登出状态
UserInf userInfo = (UserInf) session.getAttribute(CommonConst.USER_SESSION); UserInfService userInfService = (UserInfService) ContextUtil.getCtx().getBean("userInfService"); userInfo.setStatus(UserConst.STATUS_NOLOGIN); String nowDateTime = DateUtil.getNow(DateUtil.DATE_FORMAT_YYYYMMDDHHMMSS); userInfo.setLog...
1
ec9b397d6c51e3efeddeff5685578a21
39474d2431bee892d39942736e043d3d
Russian Roulette.
{ LIVE_UNIT_LOOP( spUnit ) { float maxHp = (float)spUnit->GetMaxHp(); float damage = maxHp * ratio; BIT bitHit = XGAME::xBHT_HIT; if( bCritical ) bitHit |= XGAME::xBHT_CRITICAL; if( damage == 0 ) bitHit &= ~XGAME::xBHT_HIT; auto pMsg = std::make_shared<xnUnit::XMsgDmg>( nullptr ...
0
5137d468ef5dd37bc661f2fe5231663d
700f3d3c89f563146d32611716d2f5e4
write program counter to address display
public class GUIPCView extends JPanel implements EventObserver public void setPC(int addr) { pcLabel.setText("PC: " + Utilities.intToHexString(addr)); }
1
27b5a7c6a26aa1cc78a25c77038d262b
fd70c963ec8d3d2b003dd4f345cb808a
Get the number of tests vectors (T)
class CRP(object): def T(self): return len(self.m)
1
b39a35896ac41d9f81f12a024bc46054
16c0719e304c352bfc268e997e7fc248
带有免疫意识的传播过程
for (int i = 0; i < (*p.getSusceptibles()).size(); i++) { Fox* currSus = p.getSusceptibles()->at(i); if (backgroundTransmission(p)) { currSus->setNextDiseaseState(Fox::kDiseaseState::infectious); } if (currSus->getInfectionSum()*param >= zeroToOne(generator2)) { ...
0
c2ea4ce493b06241cf88a468b2047847
8f8c257ad84623af27d4d6981996f429
Крутит изображение при обновлении картинки защиты от роботов
{ general.Source = new BitmapImage(new Uri("pack://application:,,,/player_skin/player_walking/player_armored_walking_1.png")); await Task.Delay(20); general.Source = new BitmapImage(new Uri($@"{Directory.GetCurrentDirectory()}/{new IniFile($"{Directory.GetCurrentDirectory()}\...
1
238815af570d32866d4658a374b12f8e
cbe1ba9744b203b735f269283f19fcfa
Handles payment process when the 3-D Secure option is disabled.
class DefaultFeatureContext extends DrupalContext public function payWithA3dSecure() { $currentUrl = $this->getSession()->getCurrentUrl(); if (strpos($currentUrl, "wwwqt.") || strpos($currentUrl, "wwwqa.") || strpos($currentUrl, "wwwpreprod.") != FALSE) { $currentdate = date("Y"); ...
0
c6039cf27486a2fcb23ca0c7df026111
3ef4d57095694e46012ced881277a4b9
Get one historicoPrecoCombustivel by id.
public function getById($confettiInsertsPricesId);
0
e6004c49269b6fc1b097d04de5ca3056
2cd35842dbd5649241c60d4cfb17a285
Occurs after applying changes.
class MyKochbuch extends IPSModule protected function KernelReady() { $this->ApplyChanges(); }
0
e0842b0bddcc80d79cbb354d778113fc
ba915ece10086554a96dabc4d592bccf
Metodo que crea menu de Perfiles de Usuario
public partial class SiteMaster : System.Web.UI.MasterPage protected void CargarMenuPerfil(List<ML.Seguridad.Entidades.Menu> objOpciones) { varmenu = new MenuItem(); varmenu.Text = "Perfil"; varmenu.Value = "999"; varmenu.NavigateUrl = ""; NavigationMenu.Items.Add(varmenu); ...
1
086d0e38c671006b4e190634217c3aa7
99cb8c153d196d1ed8521803ff8150e3
根据当前的学科名找到学科id
$result = Major::find()->where(['name' => $major])->andFilterWhere(['college' => $cid])->select(['id'])->scalar(); return $result ? $result : NULL; }
1
5ad56ee65302cb9485243abb090417ac
c27320974279506f1d90205652cfb5b5
Получение SteamId игрока по его интерфейсу
if ( preg_match( '/^(7656119)([0-9]{10})$/', $steamid64, $match ) ) { $const1 = 7960265728; $steam32 = ''; if ( $const1 <= $match[2] ) { $a = ( $match[2] - $const1 ) % 2; $b = ( $match[2] - $const1 - $a ) / 2; $steam32 = 'STEAM_1:' . $a . ':' . $b; ...
0
c9ddcfb6d773a8e53f5ed9f42264cc17
61fa311a34f137789224d5235d81b6c9
Look for routes that use ContentTranslationController and change it to our subclass.
if ($route = $collection->get('hello.altered')) { $route->setPath('/hello-world'); $route->setDefault('_content', '\Drupal\hello\Controller\AlteredHelloController::helloAction'); } }
0
1650ec2e0d95433e6279d3425b5b4ee2
6e6988c07a198de4c83ec14cb4e6519a
将字符编码转换成ISO-8859-1码。
public final class StringUtil public String toISO_8859_1(String str) throws UnsupportedEncodingException{ return this.changeCharset(str, ISO_8859_1); }
1
b502088851d9136b1099cac159c7de54
d230a6202441a962776104b87c311578
Gets the sequence number of this CSeqHeader.
final class FlapHeader public final int getSeqnum() { return seqnum; }
0
a8b536c5bba9303bd8e5ddb27ad31a0f
413adb141f6bad6699c0367d4b7e255a
Initializes the left contact list with the contacts that could be added to the current chat session.
conversationDao: ConversationDao, ourContacts: List<Contact> ): List<Conversation> { val androidConversations = AndroidConversationResolver.retrieveAllAndroidConversations(context.contentResolver) val ourContactTable = ourContacts.associateBy({it.id}, {it}).toMuta...
0
cd6348ec7cd1541ab9549d2d01269a75
2641eced5bc61c36b629ebbc8f6544af
Voeg twee klanten samen. De tweede param wordt gemerged met de eerste. De eerste blijft dus bestaan. Deze klant wordt uiteindelijk verwijderd.
class StageModel public function wijzigKlant() { $id = $_POST['klant_id']; $voornaam = $_POST['voornaam']; $tussenvoegsel = $_POST['tussenvoegsel']; $achternaam = $_POST['achternaam']; $straatnaam = $_POST['straatnaam']; $huisnummer = $_POST['huisnummer']; $po...
0
0d94f71b3ea7b9c5f485fb0c94023737
0e1392f6ad6f2714049de3c9b2a419b1
runs the number n through the sieve and takes two actions 1. check if number is prime or not 2. if prime, check other numbers as composite
boolean is_prim=true; if(num < 2) return; for(int i=2;i<=num;i++) { is_prim=true; for(int j=2;j<i;j++) { if(i % 2 == 0) { is_prim=false; break; } } if(is_prim == true) { if(num % i == 0) { System.out.println(i); decompositeNumber(num/i); break; ...
0
b6db0b0a3d2af10c890d4aa007146235
320ac482a178d5c56542775ca44c3b9e
Configures the <see cref="GraphTraversalSource" /> as a "remote" to issue the <see cref="GraphTraversal{SType, EType}" /> for execution elsewhere.
class JanusGraphDriver : GremlinDriver() fun remoteConfig(remoteConfigPath: String) = apply { config.setProperty(REMOTE_CONFIG, remoteConfigPath) }
1
4f62ff8f333c25e6793c1276c1560c07
8eefa04457152eaaaa26de2cecf13e62
A tanár neve alapján visszaadja a tanár listát.
[HttpGet("by-name")] public List<GetUserListOutput> GetByName(string name) { return _userService.Get(u => u.Name.Contains(name)); }
1
f647ce41e3c414e1183719e2ae7dd2ca
74389d61fa9b3acd3732bc823d16efae
产生一个系统10毫秒滴答时钟.
{ static uint8_t u8Tick1ms= 0; ++u8Tick1ms; if(u8Tick1ms >= 10) { u8Tick1ms= 0; ++u8Tick10ms; } }
1
76611454bd1b3a8b92f075055b5dbdce
4c5d1b250930cdbd2665baca30386470
GET: api/<CourseController>
[Route("api/[controller]")] [ApiController] public class CoursesController : ControllerBase [HttpGet] [Produces(MediaTypeNames.Application.Xml)] public ICollection<Course> Get() { return _repository.GetAll(); }
1
4f8203b718a612d69966e43f9c1a80e2
bdcbc7c487b4bf4c65b589cc2df8b81e
微速前進用のbutton制御関数
static bool flgStop = false; int rate = 0; static int cnt=0; if(posTar>=4000){ elevatorOverrideSp = 0.4; }else{ elevatorOverrideSp = 1.0; } if( fabs(fMove) < 0.2 ) { if( flgStop == false) { flgStop = true; fMove = 0.0; posTar = mtr->GetSelectedSensorPosition(0); posSp = posTar; mtr->SetInt...
0
e0294893724f3634d717f7f0e4a739a7
52fe1384bc7fe5c8b5376a26508ea574
是否开启自动追踪Fragment的页面进入退出事件 默认不开启
public abstract class MyFragment extends Fragment implements FragmentInterface protected boolean isTrace() { return true; }
0
c10b2f5aada58b7be0da21283f705586
b709585ae75b6c2fa9ad77fdeadef288
在实例方法中访问私有属性
public void reflectPrivateMethod() { try { Class<?> classBook = Class.forName("com.chenjin.reflect.Person"); Method methodBook = classBook.getDeclaredMethod("getSecretName"); Object objectBook = classBook.newInstance(); String string = (String) methodBook.invo...
0
9f1062a9ee97cc861d6ab88dc7d13b5d
beb7cfaadb5d930ced535772c33e5c72
Path in a c-shaped pattern.
path = QPainterPath() path.moveTo(20, 120) path.cubicTo(20, 120, 170, 400, 330, 120) qp.drawPath(path)
0
5294480387ab5d5090504d69855395f7
3ff69b6e6a72e5e511ad9edeb0ec2769
If for some reason we end up in this function, then the watchdog timer is enabled. Disable it so we don't end up here again.
void watchdog_stop(void) { hal_misc_wdt_disable (); }
1
e2194ddf1555e1cbe13bf25cd6114059
df966e8f0712d171c685c29591f27058
replace - send one card to discard and replace with one from deck
discards_.push_back(card); setRoundScore(getRoundScore() + card->getRank() + 1); setScore(getScore() + card->getRank() + 1); hand_.erase(hand_.begin()); return true; }
0
e30b08dc145f14d6705f0c2352a6fdc1
8f1465899e7e05ae211aac0503424b39
Move the ingredient between lists and refresh adapters
if (event.previousContainer === event.container) { moveItemInArray(this.dataSource.data, event.previousIndex, event.currentIndex); this.dataSource.data = this.dataSource.data.slice(); this.store.dispatch(new shoppingListActions.SetIngredients(this.dataSource.data)) } }
0
631af875f640d66d789aa484265f7b41
648128b264e341be5a69b8cde57b548b
Download all available calendar sources from Untis
public class UntisProvider public static void syncTypeList(HtmlResponse htmlResponse, Profil mProfil) throws Exception { JSONArray clsarray = null; JSONArray teacherarray = null; JSONArray roomarray = null; GregorianCalendar date = new GregorianCalendar(); String url = "https://w...
0
dc1681de0effc563fea185bed30ad0e8
562668d242ad382f21e006c893d5f8bd
This function attempts to publish a message to a given topic.
class Broker(object): def publish(self, topic, payload): def on_connect(client, userdata, flags, rc): if rc!=0: print("Error %s" % rc) sys.exit(rc) client.publish(topic, payload=payload) self.sent = True self.sent = False self.c...
1
459ad888ce7ef01c641cb9a8d4bd48e7
bf37f24602db0825c5897b6396988792
Adds a translation to the current matrix
fun Matrix.translate(tx: Float, ty: Float) { append(getTranslateMatrix(tx, ty)) }
1
d07c2be8c22ed1586f484a40aab8bbbe
0e61f48bfce6b5f0544692757ea3b42d
Test of setPriority method, of class Delivery.
public void testResolveDeliveryByPriority() { final DynamicContentDelivery delivery2 = context.mock(DynamicContentDelivery.class, "delivery2"); final DynamicContent content21 = context.mock(DynamicContent.class, "content21"); context.checking(new Expectations() { { allowing(delivery2).getPriority(); will(re...
0
9e99b0ff36a1aa9636b32a2cc178be1c
52c84ac1ca804ec86da9e9d520abbc9b
Export infos to array.
$export = array( 'type' => $this->getType(), 'packs' => array(), ); foreach ($this->getPacks() as $Pack) { $export['packs'][] = $Pack->exportArray(); } return $export; }
1
ac45fd461208ad41d3f4712c41ca7c1e
dc651a6279e131068616cc3e03042168
Precompiles the given "functionList". Each of this function receives "inputList" as parameters.
Zen<T1> input = null, Func<Zen<T1>, Zen<bool>> precondition = null, int listSize = 5, bool checkSmallerLists = true, Backend backend = Backend.Z3) { input = CommonUtilities.GetArbitraryIfNull(input, listSize, checkSmallerLists); ...
0
abbbeeb9791ef10a7e65913ecb3d499c
af3300df7fe77fc793301cf322614462
Terminates the script and outputs all the queued messages.
class QueueCommand extends CConsoleCommand public function actionStop() { $this->commands->stop(); }
0
4a6355652bece71a5165d182dfeebe06
735c09687278c7e6e728d1d9ff2cda7b
Fonction effectuant l'allocation dynamique du tableau de liste chainé
void createList(list *p) { p->head = VIDE; p->nbElt = 0; }
0
939c079ede4ddeab6886c5147c0e0197
ee8e81cd9b1ef27752b16b97d46cb684
지정한 와일드카드가 포함된 파일들에 대해 File 타입의 배열로 가져온다.<br> 예) 와일드 카드: "test*.*" - test로 시작되는 파일 전부
{ List<string> Matches = new List<string>(); string[] Patterns = getPatterns(Mask); for (int i = 0; i < Patterns.Length; i++) { if (i == 0) { if ((Condition & MatchType.Directory) > 0 || i < Patterns.Length - 1) { ...
1
916b342edcb149d59ae7f6ed92c08fb5
d257c541a37f11ff9eb0c553b147bde3
Updates the amount of donator points the user has.
namespace CityQuest.Services Task SetUserPoints(UserPointsDto userPoints);
1
cdb3ceffc77d7fd0944666825166b3d9
e3021b6f50982076b7e7aa923fab7a67
Asynchronously gets the principal user.
{ try { return await Service.People.Get("me").ExecuteAsync(); } catch (GoogleApiException ex) { Debug.WriteLine($"Failed to get person: {ex.Message}"); throw new DataSourceException(ex.Message, ex); ...
1
34b9df2b0ff4280d16ba15ad58ef23d2
660abe6ae7b7b31172cf2f27eb0ace32
获取永恒套装总战力
if (this.state != NotWin) { return 0 } val fogProto = pcs.mapOpenProtoCache.mapOpenMap[this.fogId] if (fogProto == null) { assert(false) return 0 } val soliderTeamProto = pcs.soliderTeamProtoCache.soliderTeamMap[fogProto.army] i...
0
c62883239fffcde9eb2cfc5053308352
593658999de3daf3cbb39ecf2a63e4bb
Remove a scene listener.
public void dispose() { if (sceneListener != null) sceneListener.stop(); super.dispose(); }
1
9cbb00d33a128b4534a7c2d601aa7e46
f24cb292f51a643fca9d487e31a99aab
Funcion para ver una imagen y las clases predichas y la grafica que dice a que clase se parece mas
with open("%s"%map_file, 'r') as f: cat_to_name = json.load(f) imshow(process_image(image_path)) flower_labels = [] for n in top_class: n+=1 flower_labels.append(cat_to_name['%s'%n]) plt.subplot(2,1,2) sns.barplot(x=top_p, y=flower_labels, color=sns.color_palette()[0]) plt.sh...
1
f784a4a8fd5d1a06d71024220da67d6e
7581ff7032b1687fe1f04dbddfb4b67a
Returns the clock time average.
public class TimerSummary public double getCpuTimeAvg(TimeUnit unit) { return ((double) getCpuTime(unit)) / getNTimes(); }
0
7eb1eef57488bb4763ec249ebab5e683
160cf820c2d28768a7b6e7015c427b96
Zeichnet eine Halbkugel in Wireframe-Darstellung.
Color color) { double w = width / 2; double h1 = height; double d = depth / 2; Point3DCollection points = new Point3DCollection(20); Point3D point; point = new Point3D(-w, h1, d); points.Add(point); point...
0
81bee45d3713772e9cef24cb49f169ae
e59132e2496ce2809d7ee48e4de8e862
Add a random ID to the stack
(self->random_vars).shift_reg = 0; (self->random_vars).shift_reg += idmanager_getMyID(self, ADDR_16B)->addr_16b[0]*256; (self->random_vars).shift_reg += idmanager_getMyID(self, ADDR_16B)->addr_16b[1]; }
0
383172eea1a67a510a2ed7f8ec7808c1
db7d8d1f57798e39ba39278b58da88ac
translate symbols to schemas
a = a.replace('v0', 'actv'); a = a.replace('v1', 'midv'); a = a.replace('e0', 'inf'); a = a.replace('e1', 'supn'); a = a.replace('e2', 'pri'); a = a.replace('e3', 'prs'); a = a.replace('e4', 'psi'); a = a.replace('e5', 'pss'); a = a.replace('e6', 'imp'); a = a.replace('e7', 'ppres'); a = a.replace('e8', 'pp'...
1
f0fdd98e9284df2da9f8629fd68defe7
760949ad1b8cac09ebde345725f15944
Quits the display.
class RPG: def close(): display.quit()
1
f4e8d55a969797a54b63d9c1ee96c70d
33f466e5189f8bcec9ee049424cab97c
WF1A3
void WF31A() { Push(5); WECEC(); Push(0xbef2); MODULE(); WED3A(); }
0
a307c157274b489faa91d1bf7220d245
b8dec6e078c8e3d520c2b34efc32f391
copy constructor; deep copy
this->size = orig.size; this->error = orig.error; this->tableClusters.reserve(this->size); for (auto cl: orig.tableClusters) this->tableClusters.emplace_back(new Cluster(*cl)); }
1
ef79f0945279307b15e365f138f10b42
dde32fce9e6b148d524d70c6cbe227d3
Called when the user has chosen a target activity for his share intent.
void onSelected(Activity activity);
1
42febaa00110b714c403266f9bef7e69
8109c1c2057cb16175d968691d45df88
登陆跳转(登陆超时返回首页并给出提示信息)
@Controller public class LoginController extends BaseController @RequestMapping(value = LoginMapping.TIMEOUT) public String timeout(Model model) { request.getSession().invalidate(); model.addAttribute("redirect_url", request.getContextPath() + "/dlym.action"); return "/main/timeout"; }
1
d61ada0982d5b5d636b4ba8368c365a8
9f3884952d1eeef395c276933c063ca2
calculates the membership value of trapezoidal set
fset = [1, 11, 14, 15] values = [0, 1, 1, 0] points = [0.5, 1, 5, 11, 12.3, 14, 14.07, 15, 22] memberships = [] for p in points: memberships.append(fuzzy.trapezoid_membership(p, 1, 11, 14, 15)) plt.plot(fset, values) plt.plot(points, memberships, 'o') ...
1
5a3c9033df84d0510b0271da6b602aac
b38dde77b409f99796dc0db06f96dacf
发送:同步领奖记录
function KaifuActivityCtrl:SendShengxingzhuliIReq() local protocol_send = ProtocolPool.Instance:GetProtocol(CSGetShengxingzhuliInfoReq) protocol_send:EncodeAndSend() end
0
848b8b2c2c009c8a9fcbfa5a3ebcfec7
fdec06be22808ee3950ddbd4139fcf29
Performs the bulk modifcation operations or single select, returning false on commit failure or whether the modification transaction succeeded. WARNING!! if a select is passed in, it will halt execution and return the result set from the first select.
$sth = $dbCon->prepare($query); if(empty($args)){ $sth->execute(); } else{ $sth->execute($args); } return Database_util::STMNT_EXCTN_SCSS; }
0
e096dab005c888772173b11309eb6272
0e8279f6c9ff43fb216d5bf4878b9bcf
Sanitize prices before save to dabtabase
function etm_class_sanitize_price_save( $etm_class_price ) { return etm_sanitize_amount( $etm_class_price ); }
1
a3139e25beb3adf84db95c8c4949b08e
d43bdc9486e9b4d15506c457558d45d4
i行目のテキストの長さ取得
public class Printer public int getLength(JEditTextArea jetarea) { int max = 0; for (int i = 0; i < jetarea.getLineCount(); i++) { int len = jetarea.getLineLength(i); if (len > max) max = len; } return max; }
0
f183a67eeacf8c7a0b13bcc894ea615a
99898f3a3fe89aaed4c82b158468b5df
Gets new toDoListNames from text field in ToDoList GUI
public void onResume(){ super.onResume(); DataLoader dataLoader = new DataLoader(getBaseContext(), mDataFileName); String savedText = dataLoader.getSavedTextInputData(); mNewToDoName.setText(savedText); mNewToDoName.setSelection(savedText.length()); }
0
23738971f40b659060d9cc4afa5164af
41385751c28d77e42fd98bda7dfe4c36
Get the cached token for accessing twitter's oauth'd endpoint
class Uploadr: def getCachedToken( self ): if ( os.path.exists( TOKEN_PATH )): return open( TOKEN_PATH ).read() else : return None
1
a4651cf4f2827a1b447f599cbf1d25c7
1133ec10b588549c1c457968aaf8bfc9
将铃声的Uri进行存储
public class RecognitionFragment extends BaseFragment implements View.OnClickListener, ActionSheet.ActionSheetCallback private Uri createImageUri() { SimpleDateFormat timeStampFormat = new SimpleDateFormat( "yyyy_MM_dd_HH_mm_ss"); String filename = "JPEG_" + timeStampFormat.format(new Da...
0
7b686eecfe7746c3d17b6dd205178163
d4015ea4f4f3f6110c6f572014f6babd
Indicates error in type checking of terms.
lang = frozenset([Var, Add, Sub, Mul, Val]) @term_algebra(lang) class Foo(): pass with pytest.raises(TypeError): printer = Foo()
1
aab048658c84c85729ad1c12dcceecbe
2327b02b9e64ca6fd735f38341bb4e82
Gets the secret of this WebHookProperties. # noqa: E501 A secret that will be used to create a SHA256 hash of the payload with the secret as HMAC key. This hash will be set as X-MicrosoftSpeechServices-Signature header when calling back into the registered URL. # noqa: E501
public class Webhook extends BitmovinResource public WebhookSignature getSignature() { return signature; }
0
7d5a5e3375f854a7d09a98503307f444
8762f4f5552223dacf5514067e3b24a1
Prints the details of the specified node with name.
Targ_PrintNode(GNode *gn, int pass) { debug_printf("# %s%s", gn->name, gn->cohort_num); GNode_FprintDetails(opts.debug_file, ", ", gn, "\n"); if (GNodeFlags_IsNone(gn->flags)) return; if (!GNode_IsTarget(gn)) return; debug_printf("#\n"); if (gn == mainNode) debug_printf("# *** MAIN TARGET ***\n"); if (pass...
1
f367cab1c5666133d7ca25c073657162
ca79f9965657a8fa685a4c7c63b63042
One of the only ways we have found that will force an HTML element to redraw properly in an Android WebView set to have a transparent background. Use this in tandem with chameleon.invalidate().
public class TextureFromCameraActivity extends Activity implements SurfaceHolder.Callback/*, View.OnTouchListener*//*,SeekBar.OnSeekBarChangeListener*/ private static class RenderHandler extends Handler public void sendRedraw() { sendMessage(obtainMessage(MSG_REDRAW)); }
0
e89314b6471ce89f8b50b9c3ada1e3f5
0c300b910e4d6b289e0ee36a2a1a6646
Tests queries that use Lazy vectors with multiple layers of wrapping.
class TestObject: def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) class TestObjectFactory(factory.Factory): class Meta: model = TestObject two = 'two' class WrappingTestObjectFac...
1
02b26f4d43e0b8f064cdccb4b8f390e8
526db15146818eac74b6a37287670885
Sets the number of seconds that may elapse between tests of the validity of a connection to this backend. When this period has elapsed, a connection should be exercised to ensure it is still valid and will not be closed due to idleness. connection to be refreshed (supply <code>-1</code> to disable refreshing).
public abstract class Builder<T, U extends Builder<T,U>> public U setConnectionTTL(int connectionTTL) { configBuilder.setConnectionTtl(connectionTTL); return (U)this; }
1
57fbbbac50bd7860881c108d86e4a5e9
d765f6ba415b94d8486284a11a01f7af
设置ToolBar颜色
public abstract class BaseActivity extends RxAppCompatActivity implements BaseActivityView, View.OnClickListener public void setToolBarTitleColor(int colorId) { ((TextView) findViewById(R.id.toolbar_title_name)).setTextColor(MyApplication.getColorByResId(colorId)); }
0
3765744feb5219de6c48fbfcf7bcc004
22118908a87d8d87f9e207ab0cec9b09
method to login to facebook
public class Sign_In extends AppCompatActivity implements View.OnClickListener, AppConstants.urlConstants, AppConstants.SharedConstants, ResponseListener,IRunTimePermission private void loginwithfacebook() { LoginManager.getInstance().registerCallback(callbackManager, mFacebookCallback); LoginManager.ge...
1
b60d591ae8e783907d40da1c80dd8a2c
d4c89566e2b2a61a8a5160aae912f831
Get when the post has been reported
public function getReportedTime();
1
8b42606ab8a5846e135d214306d51cb8
5e744d7685c2d8123cf8d28b07743f9e
Parse azimuth angle mask configuration.
if 'CASAMBM' in self.header: self.beam = {'BMAJ': hdu[1].data['BMAJ'], 'BMIN': hdu[1].data['BMIN'], 'BPA': hdu[1].data['BPA'], 'CHAN': hdu[1].data['CHAN'], 'POL': hdu[1].data['POL']} self....
0
53e6d661326e337586425b719d9c8795
63951c10ee3e1fb4978fbe2dc0a948ff
Cria um autômato minimizado a partir das marcações feitas anteriormente.
{ _root = new TreeNode(null, ' '); foreach (string p in _keywords) { TreeNode nd = _root; foreach (char c in p) { TreeNode ndNew = null; foreach (TreeNo...
0
9a42f90846654d87f5a31a13b96122a7
1ad4da9025c43ffb0a8e8b08634675d8
Calculates mass using the asteroseismic scaling relations.
def Mass(L_k): L = L_k / 1.E10 if L < 1.: MtoL = 43.0 elif L > 1000.: MtoL = 121.19 else: MtoL = 43*(10**(0.15*log10(L))) Mass_out = L_k * MtoL return Mass_out
1
b4388e8f151179074896dfc9661ef0a8
854c3494977f1ca917e9a0e88fb1979c
使用區塊高度或是狀態取得交易總數
class Block extends Api public function getTxCountInOut($txid, $flag = "vout") { $res = $this->getrawtransaction($txid, true); if ($res) return count($res[$flag]); }
0
cf1d418bc78373c47a2e5bec56fb81f3
196b01b26e6473ed83851915db02e00e
@brief Check that we can get a peak at the final position of the input.
BOOST_AUTO_TEST_CASE(AugLagrangianTestFunctionTest) { AugLagrangianTestFunction f; AugLagrangian<AugLagrangianTestFunction> aug(f); arma::vec coords = f.GetInitialPoint(); if (!aug.Optimize(coords, 0)) BOOST_FAIL("Optimization reported failure."); double finalValue = f.Evaluate(coords); BOOST_REQUIRE_CL...
1
d536f56ce0dbfba7038e3c8e85365ce9
51bf91a3b06994b6616fae2431fa694b
Check preferences whether to keep screen on.
@SuppressWarnings("unused") public class DeveloperKit public static boolean isKeepScreenOn(Context context) { int enabled = 0; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { enabled = Settings.Global.getInt(context.getContentResolver(), Settings.Glob...
1
73ed6a584b29e64569432d796c355832
d10dd4258d2c1b4153ad74fe615d8261
保存配置页技能
{ ISkill[] skills = Hero.Inst.mSkills; for (int i = 0; i < skills.Length; i++) { if (i >= itemSkills.Length) { break; } ISkill skill = skills[i]; if (skill != null) { itemSkills[i].data = ...
0
0bb31d1d4b6adbff97c72734e03fe9f7
70e90a331390d499a1cc97d5c12ed451
Returns the underlying PHPExcel object
class Excel{ public function getPHPExcel() { return self::$PHPExcel; }
1
cf3eac01f47adc31d8288e10d5a01369
d119a896e12322c3447def7065e5a96a
Verify a large array and large vector object can be created and collected.
r1 = memNewArray(TSTRING, 0x1000000 - 16); r0 = memNewVector(TVECTOR, 0x1000000/8 - 2); assert(memtVerifyHeapLengths(0, 0, 2, 0)); memGarbageCollect(); assert(memtVerifyHeapLengths(0, 0, 2, 0)); GarbageCollectionMode = 1; memGarbageCollect(); assert(memtVerifyHeapLengths(0, 2, 0, 0)); r0 = r1 = 0; GarbageC...
1
4d14401653dbe9d5944b7e041afdafdc
a8859d5cc2da8eaa8df5e906d5675c47
Display dialog with certain fields disabled.
super(TextSearchDialog, self).__init__(parent) self.setupUi(self) self.Source.setEnabled(0) self.Researcher.setEnabled(0) self.Date.setEnabled(0) self.Updated.setEnabled(0) self.Comments.setEnabled(0) self.Keywords.setEnabled(0) self.limitBtn.state...
1
e462ca8c6774f468317fafd5c3e1527c
180f185e5b9241086ffbc9b6fc980670
获得物品最大耐久(含科技加成)
{ ITEM_INFO ItemInfo; if(this->GetInfo(index,&ItemInfo) == 0) { return 0; } if(index == GET_ITEM(12,144) || index == GET_ITEM(12,146) || gPentagramSystem.IsPentagramItem(index) != 0) { return ItemInfo.Durability; } if(index == GET_ITEM(14,21) || index == GET_ITEM(14,29) || index == GET_ITEM(14,100) || inde...
1
d64e01fc1c0f6c0f67393bbaa01717e7
89b9c031627e28990e8e41c74a6fccff
Renvoie une liste des prénoms des utilisateurs non confirmé similaire au paramètre.
List<String> listerPrenomsUtilisateursNonConfirme(String prenom);
1
8ba436cbd4e2502eeba3ab53f01e5076
1d3fdb40e8ecdc83c4e8ac6a586af4a0
指定したパッチ(名)をアンインストールします。
[ExecuteInEditMode] public class PureData : MonoBehaviour public static void ClosePatches(params string[] patchesName) { instance.patchManager.Close(patchesName); }
1
a90d06e0cc00cdfc976c91c9f62b5d3d
40abfdd2f973fbb1b10f932d651a3a76
Sets the contextType attribute of the SpatialElement object The new contextType value
public abstract class MaskenType public abstract void SetContextPanelType();
0
7b1f5f722ad195283bbbfb94468580be
0122e025df4a77fa7a1ab9c8fc758a28
获取一个新的序列化器JavaScriptSerializer对象,此序列化器已经注册了在配置文件中配置的Converter对象 并序列化器专门序列化resolverType类别的对象
Type typeToConvert , JsonSerializerOptions options ) { var ty = typeof ( SyntaxConverter <> ).MakeGenericType ( typeToConvert ) ; return ( JsonConverter ) Activator.CreateInstance ( ty ) ; }
0
cfc5f0220290146c1152ff62c75a0d38
d26ee459048bf635422c07f996453875
! \brief Obtain the WS_list of the most fitted elements
void WF_CAGetConnectionProfileList(UINT8 cpList[WF_CP_LIST_LENGTH]) { WF_ASSERT(FALSE); #if 0 LowLevel_CAGetElement(WF_CA_ELEMENT_CP_LIST, cpList, WF_CP_LIST_LENGTH, TRUE); ...
0
eb25b0cf27b45e3e77a0841f43f33fcf
f882a2c696709c8ba315809e6a696976
Converts an RDF collection represented by the given named node, blank node, or variable into an array of nodes.
let result = []; store.statementsMatching(collection, RDF("first")).forEach(statement => { if (!statement.object.equals(RDF("nil"))) { result.push(statement.object); } }); store.statementsMatching(collection, RDF("rest")).forEach(statement => { if (!statement.object.e...
1
0d5896e3bccc2b9b38a3bfe8b3d767ee
eebee993b350427451fd5bb6d85fe33f
购买人地址
public class UsedCarPurchaseInvoice extends AbstractModel{ public String getBuyerAddress() { return this.BuyerAddress; }
1
eef53d8fd19153b1f129e7c21862ca7c
82a8a1e2fc0758a43b6984a4196e8873
Informa a quantidade de pessoas cadastradas no sistema
public class AnaliseDAO public Informacoes consultarQuantidade() throws SQLException, ClassNotFoundException{ Informacoes informacoes = new Informacoes(); try{ PreparedStatement pstmt = conexao.getConnection().prepareStatement(CONSULTAR_QUANTIDADE_CONSUMIDORES_CADASTRADOS); pstm...
1
47450e9c738252973f3023dfcc454597
e87b8953f043341a4aab6cbfb5dc2fa2
Returns the gabriel graph of the given relational matrix.
class GAF(object): def gaf(self): n = self.length_time_series() initial_matrix = np.zeros((n, n)) x_ = self.normalize_time_series() for i in np.arange(n): for j in np.arange(n): initial_matrix[i][j] = x_[i] * x_[j] - np.sqrt( 1 - x_[i] * x_...
0
807358df85d5511520574e7870301c0a
20d5992e530f393fb560eef465e95c1a
将dex转换成jar
compile(path); File javaFile = new File(path); String className = javaFile.getName().split("\\.java")[0]; String classPath = javaFile.getParent()+ "/./"+className+".class"; dexify(classPath); run(className); }
0
def77a4047123fcd4741ad1733adf0a5
fee1357c3c6f62d18cc2577d2c7217c4
<p>interval で指定した選択範囲と交差する一定値時刻区間を選択して、新しい不変性情報のインスタンスを返す。</p>
ITimeSeriesMultivariate ret = cloneTimeSeries(timeSeriesMultivariate); while (ret.size() != 0 && ret.getFirstTimestamp() < start.getTime()) ret.removeTimeValue(0); while (ret.size() != 0 && ret.getLastTimestamp() > end.getTime()) ret.removeTimeValue(ret.size() - 1); return ret; }
1
b173bbe26989a57f09595b8c191c10fc
9766714afe481f061300f02d533af61a
Return a list of all segments that have their starting or ending location within the stated radius
public Iterable<Zone> contains(final Position target, final Double radius);
0
f2b8e7a616516595d60fc300a68dac29
e1558389a1491cbfa8ae9df6f54c84f8
交换变量,但不允许用中间变量
public class swaptest static void s(int a, int b) { a = a ^ b; b = a ^ b; a = a ^ b; System.out.println(a + " " + b); }
1
7e8e9046486f8a9d7fa351742659fa56
6447012975e3ea8c8a692f4a28c634ac
get maximum x of displayed range
class VdriveView(VDriveCommand): def x_max(self): return self._maxX
1
ac40983e013b5de4eafe2f4512914b37
16603015ba59dd57812130c22d8dc0e2
Sets the state to Loading, when the app is trying to create an account and waiting for the response.
public class RecommendationRainbowActivity extends Activity implements FTUDataSyncListener, OnClickListener, FTUAuthenticationListener, IDialogCallback, com.android.volley.Response.Listener<StringResponse>, com.android.volley.Response.ErrorListener private void setLoadingScreen() { isLoadingState = true; }
1
4a1d942d449b5e1592b49afab9a67496
2af97e41cbc0879fa7c8aec4a46f5816
Draw point on image control with uniform setting
static void _DrawPoint(unsigned int x,unsigned int y) { SetXY(x, y, x, y); Write_Data(front_color); }
1
04926b3e97fe9f3f42b2b5b37f3c98c8
86caf46ab441928afb618a4bef9c834a
マウスイベントでアクティブにすべきクライアントがいるか
{ PointerEventData pointer = new PointerEventData(EventSystem.current); pointer.position = Input.mousePosition; List<RaycastResult> list = new List<RaycastResult>(); EventSystem.current.RaycastAll(pointer, list); return list.Count != 0; }
1