text large_stringlengths 384 2.05k | rank_avg float64 1 4.19k ⌀ | rank_max float64 1 8.21k ⌀ | rank_min float64 1 5.03k ⌀ | rank_median float64 1 4.21k ⌀ | rank_by_avgsim float64 1 4.19k ⌀ | avgsim_to_github float32 0.77 0.85 ⌀ | dataset large_stringclasses 1
value |
|---|---|---|---|---|---|---|---|
, ReadFunc, WriteFunc, ini_parser_error>
(
ReadFunc(), WriteFunc(), error_data_2, NULL,
"testerr2.ini", NULL, "testerr2out.ini", 3
);
}
void test_unmappable_trees()
{
// Test too deep ptrees
{
ptree pt;
pt.put_child("section.key.bogus", ptree());
test_erroneous_w... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
which applied recursively up the call stack results in error reports
// without context or debugging information. The errors package allows
// programmers to add context to the failure path in their code in a way
// that does not destroy the original value of the error.
//
// Adding context to an error
//
// The errors... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
format. Each Frame of the error's StackTrace will
// be printed in detail.
//
// Retrieving the stack trace of an error or wrapper
//
// New, Errorf, Wrap, and Wrapf record a stack trace at the point they are
// invoked. This information can be retrieved with the following interface.
//
// type stackTrac... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
tack annotates err with a stack trace at the point WithStack was called.
// If err is nil, WithStack returns nil.
func WithStack(err error) error {
if err == nil {
return nil
}
return &withStack{
err,
callers(),
}
}
type withStack struct {
error
*stack
}
func (w *withStack) Cause() error { return w.error ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
sible.
// An error value has a cause if it implements the following
// interface:
//
// type causer interface {
// Cause() error
// }
//
// If the error does not implement Cause, the original error will
// be returned. If the error is nil, nil will be returned without further
// investigation.
func C... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
StanfordCoreNlpTreeAdder.java which is i <= XX to i <= ", str(i/SPLITNUM+1)
fname = open('../data/example_split_'+str(i/SPLITNUM+1)+'.json', 'w')
json.dump(para_list[(i/SPLITNUM)*SPLITNUM:], fname,ensure_ascii=False)
fname.close()
/* contrib/pg_trgm/pg_trgm--1.2--1.3.sql */
-- complain if script is sourced in... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ION set_limit(float4) PARALLEL UNSAFE;
ALTER FUNCTION show_limit() PARALLEL SAFE;
ALTER FUNCTION show_trgm(text) PARALLEL SAFE;
ALTER FUNCTION similarity(text, text) PARALLEL SAFE;
ALTER FUNCTION similarity_op(text, text) PARALLEL SAFE;
ALTER FUNCTION word_similarity(text, text) PARALLEL SAFE;
ALTER FUNCTION word_simil... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
c="../../deviceTheme.js" data-dojo-config="'dojo-bidi': true, mblThemeFiles: ['base','IconMenu']"></script>
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="async: true, parseOnLoad: true, has: {'dojo-bidi': true}"></script>
<script type="text/javascript">
require([
"dojo/parser",... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
produce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior wri... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
SAMP_MIN -SAMP_MAX
#if defined(CHECK_OVERFLOW)
# define CHECK_OVERFLOW_OP(a,op,b) \
if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); }
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
(res).r -= (a).r; (res).i -= (a).i; \
}while(0)
#ifdef FIXED_POINT
# define KISS_FFT_COS(phase) floor(.5+SAMP_MAX * cos (phase))
# define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase))
# define HALF_OF(x) ((x)>>1)
#elif defined(USE_SIMD)
# define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
# ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
;
if abs(trueY - y0) > .5
y0 = y0+sign(dy);
len = len+sqrt(2);
else
len = len + 1;
end
end
else
% part de (x0,y0) en incrementant y0
trueX = x0;
dy = sign(dy);
while img(y0, x0)
y0... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
able[] =
/* level: 0 1 2 3 4 5 6 7 8 */
{ -6, -4, -2, 0, 2, 4, 6, 8 }; /* lvl 0-7, default 3 */
/*
* register values to turn OFDM weak signal detection OFF
*/
static const int m1ThreshLow_off = 127;
static const int m2ThreshLow_off = 127;
static const int m1Thresh_off = 127;
static const ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ALL_TARGET_HT40_20,
ALL_TARGET_HT40_21,
ALL_TARGET_HT40_22,
ALL_TARGET_HT40_23,
};
/**
* ar9003_hw_set_channel - set channel on single-chip device
* @ah: atheros hardware structure
* @chan:
*
* This is the function to change channel on single-chip devices, that is
* for AR9300 family of chipsets.
*
* This... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
annelSel << 17) | chan_frac;
} else {
channelSel = CHANSEL_2G(freq) >> 1;
}
} else if (AR_SREV_9550(ah) || AR_SREV_9531(ah) ||
AR_SREV_9561(ah)) {
if (ah->is_clk_25mhz)
div = 75;
else
div = 120;
channelSel = (freq * 4) / div;
chan_frac = (((freq * 4) % div) * 0x20000) / div;
ch... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
};
int cur_bb_spur, negative = 0, cck_spur_freq;
int i;
int range, max_spur_cnts, synth_freq;
u8 *spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah, IS_CHAN_2GHZ(chan));
/*
* Need to verify range +/- 10 MHz in control channel, otherwise spur
* is out-of-band and can be ignored.
*/
if (AR_SREV_9485(ah) || AR_SR... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
AR_PHY_AGC_CONTROL_YCOK_MAX, 0x5);
REG_RMW_FIELD(ah, AR_PHY_CCK_SPUR_MIT,
AR_PHY_CCK_SPUR_MIT_USE_CCK_SPUR_MIT, 0x0);
REG_RMW_FIELD(ah, AR_PHY_CCK_SPUR_MIT,
AR_PHY_CCK_SPUR_MIT_CCK_SPUR_FREQ, 0x0);
}
/* Clean all spur register fields */
static void ar9003_hw_spur_ofdm_clear(struct ath_hw *ah... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
spur_freq_sd,
int spur_delta_phase,
int spur_subchannel_sd,
int range,
int synth_freq)
{
int mask_index = 0;
/* OFDM Spur mitigation */
REG_RMW_FIELD(ah, AR_PHY_TIMING4,
AR_PHY_TIMING4_ENABLE_SPUR_FILTER, 0x1);
REG_RMW_FIELD(ah, AR_PHY_TIMING11,
AR_PHY_TIMING11_SPUR_FREQ_SD, spur_freq_s... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
R_PHY_CHAN_SPUR_MASK_CF_CHAN_MASK_A, 0xc);
REG_RMW_FIELD(ah, AR_PHY_SPUR_MASK_A,
AR_PHY_SPUR_MASK_A_CF_PUNC_MASK_A, 0xa0);
REG_RMW_FIELD(ah, AR_PHY_SPUR_REG,
AR_PHY_SPUR_REG_MASK_RATE_CNTL, 0xff);
}
static void ar9003_hw_spur_ofdm_9565(struct ath_hw *ah,
int freq_offset)
{
int mask_index = ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ur_delta_phase & 0xfffff;
ar9003_hw_spur_ofdm(ah,
freq_offset,
spur_freq_sd,
spur_delta_phase,
spur_subchannel_sd,
range, synth_freq);
}
/* Spur mitigation for OFDM */
static void ar9003_hw_spur_mitigate_ofdm(struct ath_hw *ah,
struct ath9k_channel *chan)
{
int synth_freq;
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
pll |= SM(0x2c, AR_RTC_9300_SOC_PLL_DIV_INT);
return pll;
}
static u32 ar9003_hw_compute_pll_control(struct ath_hw *ah,
struct ath9k_channel *chan)
{
u32 pll;
pll = SM(0x5, AR_RTC_9300_PLL_REFDIV);
if (chan && IS_CHAN_HALF_RATE(chan))
pll |= SM(0x1, AR_RTC_9300_PLL_CLKSEL);
else if (chan && IS_CHAN_... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ynthDelay);
}
void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
{
if (ah->caps.tx_chainmask == 5 || ah->caps.rx_chainmask == 5)
REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
AR_PHY_SWAP_ALT_CHAIN);
REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx);
REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx);
if ((ah->caps.hw_caps... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ah, AR_SLP32_MODE, 0x0010f400);
REG_WRITE(ah, AR_SLP32_INC, 0x0001e800);
}
udelay(100);
}
}
static void ar9003_hw_prog_ini(struct ath_hw *ah,
struct ar5416IniArray *iniArr,
int column)
{
unsigned int i, regWrites = 0;
/* New INI format: Array may be undefined (pre, core, post arrays) */
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
5NM_CH0_RXTX2_SYNTHON_MASK);
REG_CLR_BIT(ah, AR_PHY_65NM_CH2_RXTX2,
AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK);
udelay(1);
REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_RXTX2,
AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK, 1);
REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX2,
AR_PHY_65NM_CH0_RXTX2_SYNTHON_MASK, 1);
REG_R... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
(ar9003_hw_get_rx_gain_idx(ah) == 2) ||
(ar9003_hw_get_rx_gain_idx(ah) == 3)) {
REG_WRITE_ARRAY(&ah->ini_modes_rxgain_xlna,
modesIndex, regWrites);
}
}
if (AR_SREV_9550(ah) || AR_SREV_9561(ah))
REG_WRITE_ARRAY(&ah->ini_modes_rx_gain_bounds, modesIndex,
regWrites);
if (AR_SREV_9561(ah) && (ar9... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
UARTER_RATE(chan))
REG_RMW_FIELD(ah, AR_PHY_FRAME_CTL,
AR_PHY_FRAME_CTL_CF_OVERLAP_WINDOW, 3);
REG_WRITE(ah, AR_PHY_MODE, rfMode);
}
static void ar9003_hw_mark_phy_inactive(struct ath_hw *ah)
{
REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_DIS);
}
static void ar9003_hw_set_delta_slope(struct ath_hw *ah,
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
AD(ah, AR_PHY_RX_DELAY) & AR_PHY_RX_DELAY_DELAY;
ath9k_hw_synth_delay(ah, ah->curchan, synthDelay);
REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
}
static bool ar9003_hw_ani_control(struct ath_hw *ah,
enum ath9k_ani_cmd cmd, int param)
{
struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_channel *chan = a... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
EG_RMW_FIELD(ah, AR_PHY_SFCORR,
AR_PHY_SFCORR_M2COUNT_THR,
m2CountThr);
REG_RMW_FIELD(ah, AR_PHY_SFCORR_LOW,
AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW,
m2CountThrLow);
REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT,
AR_PHY_SFCORR_EXT_M1_THRESH_LOW,
m1ThreshLowExt);
REG_RMW_FIELD... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
9K_ANI_FIRSTEP_LVL] +
aniState->iniDef.firstepLow;
if (value2 < ATH9K_SIG_FIRSTEP_SETTING_MIN)
value2 = ATH9K_SIG_FIRSTEP_SETTING_MIN;
if (value2 > ATH9K_SIG_FIRSTEP_SETTING_MAX)
value2 = ATH9K_SIG_FIRSTEP_SETTING_MAX;
REG_RMW_FIELD(ah, AR_PHY_FIND_SIG_LOW,
AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW, val... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
IN)
value2 = ATH9K_SIG_SPUR_IMM_SETTING_MIN;
if (value2 > ATH9K_SIG_SPUR_IMM_SETTING_MAX)
value2 = ATH9K_SIG_SPUR_IMM_SETTING_MAX;
REG_RMW_FIELD(ah, AR_PHY_EXT_CCA,
AR_PHY_EXT_CYCPWR_THR1, value2);
if (level != aniState->spurImmunityLevel) {
ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ount);
return true;
}
static void ar9003_hw_do_getnf(struct ath_hw *ah,
int16_t nfarray[NUM_NF_READINGS])
{
#define AR_PHY_CH_MINCCA_PWR 0x1FF00000
#define AR_PHY_CH_MINCCA_PWR_S 20
#define AR_PHY_CH_EXT_MINCCA_PWR 0x01FF0000
#define AR_PHY_CH_EXT_MINCCA_PWR_S 16
int16_t nf;
int i;
for (i = 0; i < AR930... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
R_PHY_SFCORR);
iniDef->m1Thresh = MS(val, AR_PHY_SFCORR_M1_THRESH);
iniDef->m2Thresh = MS(val, AR_PHY_SFCORR_M2_THRESH);
iniDef->m2CountThr = MS(val, AR_PHY_SFCORR_M2COUNT_THR);
val = REG_READ(ah, AR_PHY_SFCORR_LOW);
iniDef->m1ThreshLow = MS(val, AR_PHY_SFCORR_LOW_M1_THRESH_LOW);
iniDef->m2ThreshLow = MS(val, AR... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
AR_1_RELSTEP_THRESH |
AR_PHY_RADAR_1_RELPWR_THRESH);
radar_1 |= AR_PHY_RADAR_1_MAX_RRSSI;
radar_1 |= AR_PHY_RADAR_1_BLOCK_CHECK;
radar_1 |= SM(conf->pulse_maxlen, AR_PHY_RADAR_1_MAXLEN);
radar_1 |= SM(conf->pulse_inband_step, AR_PHY_RADAR_1_RELSTEP_THRESH);
radar_1 |= SM(conf->radar_inband, AR_PHY_RADAR_1_R... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
b_conf_set(struct ath_hw *ah,
struct ath_hw_antcomb_conf *antconf)
{
u32 regval;
regval = REG_READ(ah, AR_PHY_MC_GAIN_CTRL);
regval &= ~(AR_PHY_ANT_DIV_MAIN_LNACONF |
AR_PHY_ANT_DIV_ALT_LNACONF |
AR_PHY_ANT_FAST_DIV_BIAS |
AR_PHY_ANT_DIV_MAIN_GAINTB |
AR_PHY_ANT_DIV_ALT_GAINTB);
regv... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
_GAIN_CTRL, regval);
/*
* Enable fast antenna diversity.
*/
regval = REG_READ(ah, AR_PHY_CCK_DETECT);
regval &= ~AR_FAST_DIV_ENABLE;
regval |= ((ant_div_ctl1 >> 7) & 0x1) << AR_FAST_DIV_ENABLE_S;
if (enable)
regval |= AR_FAST_DIV_ENABLE;
REG_WRITE(ah, AR_PHY_CCK_DETECT, regval);
if (pCap->hw_c... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
val);
}
}
}
#endif
static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
struct ath9k_channel *chan,
u8 *ini_reloaded)
{
unsigned int regWrites = 0;
u32 modesIndex, txgain_index;
if (IS_CHAN_5GHZ(chan))
modesIndex = IS_CHAN_HT40(chan) ? 2 : 1;
else
modesIndex = IS_CHAN_HT40(chan) ? ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
and newer, count = 0 will make the the chip send
* spectral samples endlessly. Check if this really was intended,
* and fix otherwise.
*/
count = param->count;
if (param->endless)
count = 0;
else if (param->count == 0)
count = 1;
if (param->short_repeat)
REG_SET_BIT(ah, AR_PHY_SPECTRAL_SCAN,
AR... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
};
unsigned int i;
txpower = txpower <= MAX_RATE_POWER ? txpower : MAX_RATE_POWER;
for (i = 0; i < ar9300RateSize; i++)
p_pwr_array[i] = txpower;
ar9003_hw_tx_power_regwrite(ah, p_pwr_array);
}
static void ar9003_hw_init_txpower_cck(struct ath_hw *ah, u8 *rate_array)
{
ah->tx_power[0] = rate_array[ALL_TARGET_... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
an)) {
ar9003_hw_init_txpower_ofdm(ah, rate_array,
AR9300_11NA_OFDM_SHIFT);
if (IS_CHAN_HT20(chan) || IS_CHAN_HT40(chan)) {
ar9003_hw_init_txpower_ht(ah, rate_array,
AR9300_11NA_HT_SS_SHIFT,
AR9300_11NA_HT_DS_SHIFT,
AR9300_11NA_HT_TS_SHIFT,
IS_CHAN_HT40(chan));
ar9003_... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
_control;
priv_ops->do_getnf = ar9003_hw_do_getnf;
priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs;
priv_ops->set_radar_params = ar9003_hw_set_radar_params;
priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
ops->antdiv_comb_conf_set =... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
l &= ~AR_PHY_RADAR_0_FIRPWR;
val |= SM(AR9300_DFS_FIRPWR, AR_PHY_RADAR_0_FIRPWR);
REG_WRITE(ah, AR_PHY_RADAR_0, val);
return false;
case 0x1300000a:
return false;
case 0x0400000a:
case 0x04000b09:
return true;
case 0x04000409:
if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah))
return fals... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
*/
REG_WRITE(ah, AR_PHY_WATCHDOG_CTL_1,
AR_PHY_WATCHDOG_NON_IDLE_ENABLE |
AR_PHY_WATCHDOG_IDLE_MASK |
(AR_PHY_WATCHDOG_NON_IDLE_MASK & (idle_count << 2)));
ath_dbg(common, RESET, "Enabled BB Watchdog timeout (%u ms)\n",
idle_tmo_ms);
}
void ar9003_hw_bb_watchdog_read(struct ath_hw *ah)
{
/*
* we... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
n, RESET, "==== BB update: done ====\n\n");
}
EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info);
void ar9003_hw_disable_phy_restart(struct ath_hw *ah)
{
u8 result;
u32 val;
/* While receiving unsupported rate frame rx state machine
* gets into a state 0xb and if phy_restart happens in that
* state, BB would go han... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
orldwindx;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
public class CodeActivity extends AppCompatActivity {
@Override
protected void on... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
n.
*
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/atmel_pdc.h>
#include <sound/driver.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/initval... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
= &pdc_tx_reg,
.mask = &ssc_tx_mask,
},
{
.name = "SSC2 PCM in",
.pdc = &pdc_rx_reg,
.mask = &ssc_rx_mask,
}},
#endif
};
struct at91_ssc_state {
u32 ssc_cmr;
u32 ssc_rcmr;
u32 ssc_rfmr;
u32 ssc_tcmr;
u32 ssc_tfmr;
u32 ssc_sr;
u32 ssc_imr;
};
static struct at91_ssc_info {
char *name;
struct at91_s... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
stream);
}
return IRQ_HANDLED;
}
/*
* Startup. Only that one substream allowed in each direction.
*/
static int at91_ssc_startup(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct at91_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id];
int dir_mask;
DBG... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
e SSC system clock rate.
*/
static int at91_ssc_set_dai_sysclk(struct snd_soc_cpu_dai *cpu_dai,
int clk_id, unsigned int freq, int dir)
{
/*
* The only clock supplied to the SSC is the AT91 master clock,
* which is only used if the SSC is generating BCLK and/or
* LRC clocks.
*/
switch (clk_id) {
case AT91... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
->ssc.base;
dma_params->substream = substream;
ssc_p->dma_params[dir] = dma_params;
/*
* The cpu_dai->dma_data field is only used to communicate the
* appropriate DMA parameters to the pcm driver hw_params()
* function. It should not be used for other purposes
* as it is common to all substreams.
*/
rt... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
) & AT91_SSC_FSOS)
| (((bits - 1) << 16) & AT91_SSC_FSLEN)
| (((channels - 1) << 8) & AT91_SSC_DATNB)
| (( 1 << 7) & AT91_SSC_MSBF)
| (( 0 << 5) & AT91_SSC_LOOP)
| (((bits - 1) << 0) & AT91_SSC_DATALEN);
tcmr = (( ssc_p->tcmr_period << 24) & AT91_SSC_PERIOD)
| (( 1 << 16) & AT9... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
| (((bits - 1) << 0) & AT91_SSC_DATALEN);
tcmr = (( 0 << 24) & AT91_SSC_PERIOD)
| (( 1 << 16) & AT91_SSC_STTDLY)
| (( start_event ) & AT91_SSC_START)
| (( AT91_SSC_CKI_FALLING ) & AT91_SSC_CKI)
| (( AT91_SSC_CKO_NONE ) & AT91_SSC_CKO)
| (( AT91_SSC_CKS_PIN ) & AT91_SS... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
) & AT91_SSC_FSOS)
| (( 0 << 16) & AT91_SSC_FSLEN)
| (((channels - 1) << 8) & AT91_SSC_DATNB)
| (( 1 << 7) & AT91_SSC_MSBF)
| (( 0 << 5) & AT91_SSC_DATDEF)
| (((bits - 1) << 0) & AT91_SSC_DATALEN);
break;
case SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_CBM_CFM:
default:
printk(KER... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
tream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct at91_ssc_info *ssc_p = &ssc_info[rtd->dai->cpu_dai->id];
struct at91_pcm_dma_params *dma_params;
int dir;
dir = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1;
dma_params = ssc_p->dma_params[dir];
at91_ssc_write(dma_p... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
SSC_RCMR, ssc_p->ssc_state.ssc_rcmr);
at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CMR, ssc_p->ssc_state.ssc_cmr);
at91_ssc_write(ssc_p->ssc.base + AT91_SSC_IER, ssc_p->ssc_state.ssc_imr);
at91_ssc_write(ssc_p->ssc.base + AT91_SSC_CR,
((ssc_p->ssc_state.ssc_sr & AT91_SSC_RXENA) ? AT91_SSC_RXEN : 0) |
((ssc_p->s... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ssc_shutdown,
.prepare = at91_ssc_prepare,
.hw_params = at91_ssc_hw_params,},
.dai_ops = {
.set_sysclk = at91_ssc_set_dai_sysclk,
.set_fmt = at91_ssc_set_dai_fmt,
.set_clkdiv = at91_ssc_set_dai_clkdiv,},
.private_data = &ssc_info[1].ssc,
},
{ .name = "at91-ssc2",
.id = 2,
.type = SND_SOC_DAI_PC... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
instance
*
* @param string $handlerClass
* @throws \InvalidArgumentException
* @return HandlerInterface
*/
public function get($handlerClass = null)
{
if ($handlerClass === null) {
return $this->defaultHandler;
}
$handler = $this->objectManager->get... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
is.checkBreakouts({ breakouts: [] });
}
componentDidUpdate(oldProps) {
this.checkBreakouts(oldProps);
}
checkBreakouts(oldProps) {
const {
breakouts,
mountModal,
currentBreakoutUser,
getBreakoutByUser,
breakoutUserIsIn,
amIModerator,
} = this.props;
const {... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
akouts are running.
setTimeout(() => {
openBreakoutJoinConfirmation.call(this, breakout, breakout.name, mountModal);
}, BREAKOUT_MODAL_DELAY);
}
render() {
return null;
}
}
BreakoutRoomInvitation.propTypes = propTypes;
BreakoutRoomInvitation.defaultProps = defaultProps;
export default withMod... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
to prepend the current
working directory to a file name, which should not be done with a
name like d:foo. */
#define IS_ABSOLUTE_PATH_1(dos_based, f) \
(IS_DIR_SEPARATOR_1 (dos_based, (f)[0]) \
|| HAS_DRIVE_SPEC_1 (dos_based, f))
extern int filename_cmp (const char *s1, const char *s2);
#define FILENAM... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
);
} else if (((bitField & 33554432) !== 0)) {
values = values._value();
} else if (((bitField & 16777216) !== 0)) {
return this._reject(values._reason());
} else {
return this._cancel();
}
}
values = util.asArray(values);
if (values === n... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
seCancelled(i);
}
} else {
isResolved = this._promiseFulfilled(maybePromise, i);
}
}
if (!isResolved) result._setAsyncGuaranteed();
};
PromiseArray.prototype._isResolved = function () {
return this._values === null;
};
PromiseArray.prototype._resolve = function (val... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
rg/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* lim... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
upported;
/** True if the database supports the rs.setFetchSize() method. */
private static boolean fetchSizeSupported;
// True if the database supports correlated subqueries.
private static boolean subqueriesSupported;
// True if the database supports scroll-insensitive results.
private static ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
der());
}
} else {
setConnectionProvider(new DefaultConnectionProvider());
}
}
}
/**
* Attempts to create a connection to the database and execute a query.
*
* @param errors A map populated with errors if they occur.
* @return ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ception occurs or no connection was found.
*/
public static Connection getConnection() throws SQLException {
ensureConnectionProvider();
Integer currentRetryCount = 0;
Integer maxRetries = JiveGlobals.getXMLProperty(SETTING_DATABASE_MAX_RETRIES, 10);
Integer retryWait = JiveGlo... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
onManager.getConnection() " +
"failed to obtain a connection after " + currentRetryCount + " retries. " +
"The exception from the last attempt is as follows: " + lastException);
}
/**
* Returns a Connection from the currently active connection provider that
* is ready ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
on e) {
Log.error(e.getMessage(), e);
}
// Reset the connection to auto-commit mode.
try {
con.setAutoCommit(true);
}
catch (Exception e) {
Log.error(e.getMessage(), e);
}
}
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ment.
*/
public static void closeStatement(Statement stmt) {
if (stmt != null) {
try {
stmt.close();
}
catch (Exception e) {
Log.error(e.getMessage(), e);
}
}
}
/**
* Closes a statement and ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
Stmt(PreparedStatement pstmt) throws SQLException
{
pstmt.close();
}
/**
* Closes a statement and a result set. This method should be called within the try section of
* your database logic when you reuse a statement. It may throw an exception,
* so don't place it in the final... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
rs, Statement stmt, Connection con) {
closeResultSet(rs);
closeStatement(stmt);
closeConnection(con);
}
/**
* Closes a statement and database connection (returning the connection to
* the connection pool). This method should be called within the finally section of
* your ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
reparedStatement otherwise.
*
* @param con the database connection.
* @param sql the SQL to create the PreparedStatement with.
* @return a PreparedStatement
* @throws java.sql.SQLException if an error occurs.
*/
public static PreparedStatement createScrollablePreparedStatement(Connecti... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
llResultsSupported = false;
for (int i = 0; i < rowNumber; i++) {
rs.next();
}
}
}
}
// Otherwise, manually scroll to the correct row.
else {
for (int i = 0; i < rowNumber; i++) {
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
// However, it is a good idea to update the meta-data so that
// we don't have to incur the cost of catching an exception
// each time.
Log.error("Disabling JDBC method pstmt.setFetchSize(fetchSize).", t);
pstmt_fetchSizeSupported = false;
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
catch (Exception e) {
Log.error(e.getMessage(), e);
}
finally {
closeConnection(con);
}
}
// Remember what connection provider we want to use for restarts.
JiveGlobals.setXMLProperty("connectionProvider.className", prov... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
out.close();
}
catch (Exception e) {
Log.error(e.getMessage(), e);
throw new SQLException("Failed to load text field");
}
return value;
}
else {
return rs.getString(columnIndex);
}
}
/**
* S... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
nt stmt, int maxRows) {
if (isMaxRowsSupported()) {
try {
stmt.setMaxRows(maxRows);
}
catch (Throwable t) {
// Ignore. Exception may happen if the driver doesn't support
// this operation and we didn't set meta-data correctly.
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
mation about
* what different JDBC drivers and databases support.
*
* @param con the connection.
* @throws SQLException if an SQL exception occurs.
*/
private static void setMetaData(Connection con) throws SQLException {
DatabaseMetaData metaData = con.getMetaData();
// Supp... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
gres") != -1) {
databaseType = DatabaseType.postgresql;
// Postgres blows, so disable scrolling result sets.
scrollResultsSupported = false;
fetchSizeSupported = false;
}
// Interbase properties
else if (dbName.indexOf("interbase") != -1) {
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
return profilingEnabled;
}
/**
* Turns connection profiling on or off. You can collect profiling
* statistics by using the static methods of the ProfiledConnection
* class.
*
* @param enable true to enable profiling; false to disable.
*/
public static void setProfilingEnab... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
ual";
}
else {
return "select 1";
}
}
/**
* A class that identifies the type of the database that Jive is connected
* to. In most cases, we don't want to make any database specific calls
* and have no need to know the type of database we're using. However,
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
n the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import abc
class Parameter(object):
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
}
}
},
"train_data_path": "test_fixtures/rc/squad.json",
"validation_data_path": "test_fixtures/rc/squad.json",
"model": {
"type": "bidaf",
"text_field_embedder": {
"token_embedders": {
"tokens": {
"type": "embedding",
"embedding_dim": 2,
"trainable... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
-Variables
skip = !string.IsNullOrEmpty(value) ? Message : null;
}
public override string Skip => skip;
}
}
id: greatsword
name: Greatsword
kind:
Weapon:
kind: LargeSword
icon: inventory/weapon_greatsword
weight: 600
value: 1000
equippable:
slot: HeldMain
blocks_slo... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
r implementation, either here or in
// syscall_solaris.go or syscall_unix.go.
package unix
import (
"syscall"
"unsafe"
)
// Implemented in runtime/syscall_solaris.go.
type syscallFunc uintptr
func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
func sysvicall6(trap, ... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
[i] = sa.Addr[i]
}
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
name := sa.Name
n := len(name)
if n >= len(sa.raw.Path) {
return nil, 0, EINVAL
}
sa.raw.Family = AF_UNIX
for i := 0; i < n; i++ {
sa.raw.Path[i] = int8(name[... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
se if n == 0 {
return nil, nil
}
a := make([]_Gid_t, n)
n, err = getgroups(n, &a[0])
if n == -1 {
return nil, err
}
gids = make([]int, n)
for i, v := range a[0:n] {
gids[i] = int(v)
}
return
}
func Setgroups(gids []int) (err error) {
if len(gids) == 0 {
return setgroups(0, nil)
}
a := make([]_Gid... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
s *WaitStatus, options int, rusage *Rusage) (int, error) {
var status _C_int
rpid, err := wait4(int32(pid), &status, options, rusage)
wpid := int(rpid)
if wpid == -1 {
return wpid, err
}
if wstatus != nil {
*wstatus = WaitStatus(status)
}
return wpid, nil
}
//sys gethostname(buf []byte) (n int, err error)
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
1 != 0 {
return e1
}
return nil
}
//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error)
func Futimesat(dirfd int, path string, tv []Timeval) error {
pathp, err := BytePtrFromString(path)
if err != nil {
return err
}
if tv == nil {
return futimesat(dirfd, pathp, nil)
}
if len(tv) != 2 {
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
(fd int, err error) = libsocket.accept
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
nfd, err = accept(fd, &rsa, &len)
if nfd == -1 {
return
}
sa, err = anyToSockaddr(fd, &rsa)
if err != nil {
Close(nfd)
nfd = 0
}
return
}
//sys recv... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
!= nil {
return 0, err
}
if len(oob) > 0 && len(p) == 0 {
n = 0
}
return n, nil
}
//sys acct(path *byte) (err error)
func Acct(path string) (err error) {
if len(path) == 0 {
// Assume caller wants to disable accounting.
return acct(nil)
}
pathp, err := BytePtrFromString(path)
if err != nil {
return... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
r)
//sys Exit(code int)
//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchdir(fd int) (err error)
//sys Fchmod(fd int, mode uint32) (err error)
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fchownat(... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
te, flags int) (err error)
//sys Munlock(b []byte) (err error)
//sys Munlockall() (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
//sys Pathconf... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
th string) (err error)
//sys Unlinkat(dirfd int, path string, flags int) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
//sys Utime(path string, buf *Utimbuf) (err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind
//sys connect(s int, addr unsafe.Pointer, a... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
munmap: munmap,
}
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
return mapper.Mmap(fd, offset, length, prot, flags)
}
func Munmap(b []byte) (err error) {
return mapper.Munmap(b)
}
/**
* Tencent is pleased to support the open source community by making QMUI_iOS availa... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
s): NSMutableSet.new,
NSStringFromClass(self): NSMutableSet.new
};
[methods enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull classString, NSMutableSet<NSString *> * _Nonnull methods, BOOL * _Nonnull stop) {
[NSObject qmui_enumrateInstanceMethodsOfClass:NSCl... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
*)red green:(CGFloat *)green blue:(CGFloat *)blue alpha:(CGFloat *)alpha {
return [self.qmui_rawColor getRed:red green:green blue:blue alpha:alpha];
}
- (UIColor *)colorWithAlphaComponent:(CGFloat)alpha {
return [UIColor qmui_colorWithThemeProvider:^UIColor * _Nonnull(__kindof QMUIThemeManager * _Nonnull mana... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
i_rawColor;
}
#pragma mark - <QMUIDynamicColorProtocol>
@dynamic qmui_isDynamicColor;
- (UIColor *)qmui_rawColor {
QMUIThemeManager *manager = [QMUIThemeManagerCenter themeManagerWithName:self.managerName];
UIColor *color = self.themeProvider(manager, manager.currentThemeIdentifier, manager.currentTheme);
... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
* _Nullable, __kindof NSObject * _Nullable))provider {
QMUIThemeColor *color = QMUIThemeColor.new;
color.managerName = name;
color.themeProvider = provider;
return color;
}
@end
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2014-2018 Broadcom
* All rights reserved.
*/
#ifndef _BNXT_TXR... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
X_OIP_IIP_TCP_UDP_CKSUM (PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
#define PKT_TX_OIP_IIP_UDP_CKSUM (PKT_TX_UDP_CKSUM | \
PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
#define PKT_TX_OIP_IIP_TCP_CKSUM (PKT_TX_TCP_CKSUM | \
PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
#define... | null | null | null | null | null | null | github_plus_top10pct_by_avg |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.