problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
What is an array, what is the difference between array and objects and when and why use an array? : <p>Hello I have a few questions:
Why is an array?
Why is the difference between array and object?
Why and when I need to use an array?
Thanks for helping :);)</p>
| 0debug |
How to decode base64 in python3 : <p>I have a base64 encrypt code, and I can't decode in python3.5</p>
<pre><code>import base64
code = "YWRtaW46MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRiNzA" # Unencrypt is 202cb962ac59075b964b07152d234b70
base64.b64decode(code)
</code></pre>
<p>Result:</p>
<pre><code>binascii.Error: I... | 0debug |
how to create a function to get sum of Colors given in this array.....expected output=('RED'=>21,'GREEN=>'..etc) in php : '
$sales = array
(
'FIRST'=> array('RED'=> array(9,3),'GREEN'=> array(4,5,8,2)),
'SECOND'=> array('RED'=> array(3,5,5,2),'YELLOW'=> array(4,2,5)),
'THIRD'=> array('BLUE... | 0debug |
void gen_intermediate_code(CPUState *cs, TranslationBlock * tb)
{
CPUSPARCState *env = cs->env_ptr;
target_ulong pc_start, last_pc;
DisasContext dc1, *dc = &dc1;
int num_insns;
int max_insns;
unsigned int insn;
memset(dc, 0, sizeof(DisasContext));
dc->tb = tb;
pc_start = ... | 1threat |
static int encode_plane(AVCodecContext *avctx, uint8_t *src,
uint8_t *dst, int step, int stride,
int width, int height, PutByteContext *pb)
{
UtvideoContext *c = avctx->priv_data;
uint8_t lengths[256];
uint32_t counts[256] = { 0 };
Huf... | 1threat |
long vnc_client_write_sasl(VncState *vs)
{
long ret;
VNC_DEBUG("Write SASL: Pending output %p size %zd offset %zd "
"Encoded: %p size %d offset %d\n",
vs->output.buffer, vs->output.capacity, vs->output.offset,
vs->sasl.encoded, vs->sasl.encodedLength, vs->sasl.e... | 1threat |
VirtIODevice *virtio_scsi_init(DeviceState *dev, VirtIOSCSIConf *proxyconf)
{
VirtIOSCSI *s;
static int virtio_scsi_id;
size_t sz;
int i;
sz = sizeof(VirtIOSCSI) + proxyconf->num_queues * sizeof(VirtQueue *);
s = (VirtIOSCSI *)virtio_common_init("virtio-scsi", VIRTIO_ID_SCSI,
... | 1threat |
void ff_check_pixfmt_descriptors(void){
int i, j;
for (i=0; i<FF_ARRAY_ELEMS(av_pix_fmt_descriptors); i++) {
const AVPixFmtDescriptor *d = &av_pix_fmt_descriptors[i];
uint8_t fill[4][8+6+3] = {{0}};
uint8_t *data[4] = {fill[0], fill[1], fill[2], fill[3]};
int linesize[4] ... | 1threat |
int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
int mmu_idx, int is_softmmu)
{
mmu_ctx_t ctx;
int access_type;
int ret = 0;
if (rw == 2) {
rw = 0;
access_type = ACCESS_CODE;
} else {
acce... | 1threat |
creating a linux terminal css style pre tag for showcasing unix commands : What I am trying to do is create a pre tag that will look like a bash terminal - black background and white letter, mono spaced font.
<pre class="bash">
-bash-3.2$ groups
unixuser feegroup figroup fogroup fumgroup
</pre... | 0debug |
static void decode_opc (CPUState *env, DisasContext *ctx, int *is_branch)
{
int32_t offset;
int rs, rt, rd, sa;
uint32_t op, op1, op2;
int16_t imm;
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_exception(ctx, EXCP_AdEL);
return;
}
... | 1threat |
int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts)
{
if (ctb_addr_ts == s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]) {
int ret = cabac_init_decoder(s);
if (ret < 0)
return ret;
if (s->sh.dependent_slice_segment_flag == 0 ||
(s->ps.pps->tiles_enab... | 1threat |
Kotlin calling non final function in constructor works : <p>In Kotlin, it warns you when calling an abstract function in a constructor, citing the following problematic code:</p>
<pre><code>abstract class Base {
var code = calculate()
abstract fun calculate(): Int
}
class Derived(private val x: Int) : Base() ... | 0debug |
Pyhton - Numpy array, number of time satisfying a condition : I have a numpy array as follow:
a = [1 4 2 6 4 4 6 2 7 6 2 8 9 3 6 3 4 4 5 8]
and a constant number `b=6`
I am searching for a number `c` which is defined by the number of occurrence that `a` is more than 2 times consecutively inferior to `b`?
... | 0debug |
What does putting curly brackets around a variale when initializing it does exactly? : <p>Example : </p>
<pre><code>const {http} = require('http');
</code></pre>
<p>I have seen something about "destructing" and have read some resources about that, but I am still very confused about what it actually does.</p>
| 0debug |
How to switch from Second form to Main form but not create new Main form? : I know how to switch form to form, but problem is when switch from Second form to main form. It always create a new Main form. How to avoid this? (If not my app will replace a lots of Ram). Bad English! | 0debug |
static void v9fs_unlinkat(void *opaque)
{
int err = 0;
V9fsString name;
int32_t dfid, flags;
size_t offset = 7;
V9fsPath path;
V9fsFidState *dfidp;
V9fsPDU *pdu = opaque;
v9fs_string_init(&name);
err = pdu_unmarshal(pdu, offset, "dsd", &dfid, &name, &flags);
if (err < 0) {
df... | 1threat |
What is the best platform/solution to develop an app for iOS, Android, and Blackberry? : <p>I will be making a database that is offline and online and wondered what I could use to develop apps for Apple's iOS, Android, and Blackberry all in one sweep. I know Xamarin does iOS and Android, but not too sure how well it w... | 0debug |
int kvm_arch_init_vcpu(CPUState *env)
{
struct {
struct kvm_cpuid2 cpuid;
struct kvm_cpuid_entry2 entries[100];
} __attribute__((packed)) cpuid_data;
uint32_t limit, i, j, cpuid_i;
uint32_t unused;
struct kvm_cpuid_entry2 *c;
uint32_t signature[3];
env->cpuid_feat... | 1threat |
static inline void idct4col_add(uint8_t *dest, int line_size, const DCTELEM *col)
{
int c0, c1, c2, c3, a0, a1, a2, a3;
const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
a0 = col[8*0];
a1 = col[8*1];
a2 = col[8*2];
a3 = col[8*3];
c0 = (a0 + a2)*C3 + (1 << (C_SHIFT - 1));
c2 = (a0... | 1threat |
void ff_generate_sliding_window_mmcos(H264Context *h) {
MpegEncContext * const s = &h->s;
assert(h->long_ref_count + h->short_ref_count <= h->sps.ref_frame_count);
h->mmco_index= 0;
if(h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count &&
!(FIELD_PI... | 1threat |
From left/right to center transition with buttons : <p>I want my buttons on my page to go from the left/right to the center when the page loads. Is there a way I can do it? I wanna make the first one from left, second from right, etc. I'm thinking of using tags for each button- #button1, #button2 etc- and using CSS to ... | 0debug |
Check if the key value exists in hashmap : <p>I have HashMap where key is bird specie and value is number of perceptions. Here is my code:</p>
<pre><code>public class Program {
public static void main(String[] args) {
HashMap<String, Integer> species = new HashMap<>();
Scanner reader = new Scanne... | 0debug |
void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h)
{
assert(con->console_type == GRAPHIC_CONSOLE);
dpy_gfx_copy(con, src_x, src_y, dst_x, dst_y, w, h);
}
| 1threat |
static int amf_parse_object(AVFormatContext *s, AVStream *astream,
AVStream *vstream, const char *key,
int64_t max_pos, int depth)
{
AVCodecContext *acodec, *vcodec;
FLVContext *flv = s->priv_data;
AVIOContext *ioc;
AMFDataType amf_type;
... | 1threat |
How can you retrieve XML parser on "click" on an SVG? : I have an SVG of the United States, and once you click on a specific state, the USA SVG fades out, and a separate SVG of the state clicked will appear (an enlarged version of the state). Each state has counties in it, with their own paths and id's.
I have some... | 0debug |
static void restart_co_req(void *opaque)
{
Coroutine *co = opaque;
qemu_coroutine_enter(co, NULL);
}
| 1threat |
PHP code not able to run in Android App : - I have created an app in which there is a login page (login.php).This consists of the form
- The other script i have created is loginScript.php
- When i try to run the code, login.php,it does runs in the webview of app but when hit "sign in" button, the action calls ... | 0debug |
How to make non selectable embed custom format in quilljs : <p>I would like to create a custom embed format which can be styled but it's text cannot be changed. My use case is pretty similar to the hashtag case. I want to have an external button that will add an hashtag to the current selected range on the editor. But ... | 0debug |
static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
FlacEncodeContext *s;
int frame_bytes, out_bytes, ret;
s = avctx->priv_data;
if (!frame) {
s->max_framesize = s->max_encoded_framesize;
... | 1threat |
R how to remove first row of duplicate values from a big column : <p>in R I have a file (df) consisting in 2 very big columns, A and B (aprox. 1000000 elements each). I know I have many duplicate values in A. I know how to remove the duplicates (remove second rows of each duplicate):</p>
<pre><code>df1 = df[!duplicate... | 0debug |
c nested makros Verschachtelte Makros : a problem occurred to me.
Somebody might show me how to remove the "@".
I am writing c for a uc and I am lazy; so I want to solve easy problems whit makros, e.g. switching on a led.
I managed to do something like that:
//Begin of c code
#include <stdio.h>
... | 0debug |
Cannot apply BigDecimal to constructor : <p><strong>I have object like:</strong></p>
<pre><code>import java.math.BigDecimal;
public class Obj {
BigDecimal Sal;
int EMPID;
public Obj(BigDecimal Sal, int EMPID) {
this.Sal= Sal;
this.EMPID= EMPID;
}
}
</code></pre>
<p>Now I wanna create ... | 0debug |
Dynamically hiding a section on Wordpress pages : <p>I have a floating social bar on my website www.fashionsuggest.in </p>
<p>I only need this social bar on my wordpress posts and would like to to be removed from all pages.</p>
<p>There are only 5 or 6 pages in total. Can someone please suggest a solution to hide the... | 0debug |
Get string md5 in Swift 5 : <p>In Swift 4 we could use</p>
<pre><code>var md5: String? {
guard let data = self.data(using: .utf8) else { return nil }
let hash = data.withUnsafeBytes { (bytes: UnsafePointer<Data>) -> [UInt8] in
var hash: [UInt8] = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_... | 0debug |
Mock external dependency that returns a Future of list : <p>I have a class which have external dependency that returns future of lists.
How to mock the external dependency? </p>
<pre><code> public void meth() {
//some stuff
Future<List<String>> f1 = obj.methNew("anyString")
//some stuff
}
... | 0debug |
static void decode_component(DiracContext *s, int comp)
{
AVCodecContext *avctx = s->avctx;
SubBand *bands[3*MAX_DWT_LEVELS+1];
enum dirac_subband orientation;
int level, num_bands = 0;
for (level = 0; level < s->wavelet_depth; level++) {
for (orientation = !!level; orientatio... | 1threat |
how do I detect and make clickable links in a UILabel NOT using UITextView : <p>I am building a chat app and for performance reasons I need to use UILabel's instead of UITextView's to display the chat messages. I have previously used TextView's but with data detection on the scrolling is very slow and choppy.</p>
<p>... | 0debug |
Regular expression for a string upto 30 characters long of letters, numbers, and/or spaces C# .Net : <p>Regular expression for validating a string up to 30 characters long of letters, numbers and/or spaces in C# .Net</p>
<p>Thank You </p>
| 0debug |
static void init_proc_620 (CPUPPCState *env)
{
gen_spr_ne_601(env);
gen_spr_620(env);
gen_tbl(env);
spr_register(env, SPR_HID0, "HID0",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic,
0x00000000);
... | 1threat |
Trying to retreive Favicons from a dynamic URL : Im trying to retrieve favicons from random URL's in a feed that are called up from a ~~~Link~~~ Variable dynamically. (I.E. Apon page load ~~~link~~~ = https://www.website.com/2018/09/30/world/etc... > Retrieve favicon, and display favicon as a img in html.
What woul... | 0debug |
How to check store procedure gives null or not in mvc c# : I have a store procedure named GetLastRecordId() in ms sql which gives me last record id in controller of mvc project.But the problem is that when there is no data in table it shows me result like below so I cant check with null.
[image of result when there ... | 0debug |
Animating changes in a SliverList : <p>I currently have a <code>SliverList</code> whose items are loaded dynamically. The issue is that once these items are loaded, the <code>SliverList</code> updates without animating the changes, making the transition between loading & loaded <em>very</em> jarring.</p>
<p>I see ... | 0debug |
Retrofit and OkHttp basic authentication : <p>I am trying to add basic authentication (username and password) to a Retrofit OkHttp client. This is the code I have so far:</p>
<pre><code>private static Retrofit createMMSATService(String baseUrl, String user, String pass) {
HttpLoggingInterceptor interceptor = new H... | 0debug |
static void tcg_out_insn_3401(TCGContext *s, AArch64Insn insn, TCGType ext,
TCGReg rd, TCGReg rn, uint64_t aimm)
{
if (aimm > 0xfff) {
assert((aimm & 0xfff) == 0);
aimm >>= 12;
assert(aimm <= 0xfff);
aimm |= 1 << 12;
}
tcg_out32(s, ins... | 1threat |
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamples)
{
AVFilterContext *ctx = inlink->dst;
AVFilterLink *outlink = ctx->outputs[0];
ShowWavesContext *showwaves = ctx->priv;
const int nb_samples = insamples->audio->nb_samples;
AVFilterBufferRef *outpicref = showwaves->out... | 1threat |
Why did not work jQuery button in this code : <p><a href="https://i.imgur.com/WtzTa3g.png" rel="nofollow noreferrer">https://i.imgur.com/WtzTa3g.png</a> </p>
<p>what is my mistake ? why this click function is did not work ? i made this function without each loop, then that function working properly, but why did not ... | 0debug |
Find a pattern into a string without space : <p>I'm looking for a way to find and extract the string matching a pattern in a string without a space :</p>
<pre><code>string regexpattern = @"[A-Z]{4}\d{4}$"; // ex : BERF4787
string stringWithoutSpace = "stringsampleBERF4787withpattern";
s... | 0debug |
Hello, I an application developer php site : I an application developer php site. My topic is to retrieve the data on the site (https://www.agriconomie.com/assortiment-de-pouples-beta-double-spire/p210645) (this is a single page) existing and display them. I started and I am currently stuck. I have retrieved the desire... | 0debug |
JAVA linked list delete node NullPointerException : <p>I was working on this code to take in a target String and search the linked list for the target and delete all instances of it. I feel like I have most of the logic down but I am getting a NullPointerException and was needing some help. here is the code:</p>
<pre>... | 0debug |
static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vstream, const char *key, unsigned int max_pos, int depth) {
AVCodecContext *acodec, *vcodec;
ByteIOContext *ioc;
AMFDataType amf_type;
char str_val[256];
double num_val;
num_val = 0;
ioc = s->pb;
am... | 1threat |
Is this possible to predict the lottery numbers (not the most accurate)? : <p>I am looking for the machine learning correct approach for predicting the lottery numbers, not the most accurate answer but at least we have some predicted output. I am implementing the regression based and neural network models for this. Is ... | 0debug |
Native component for "RCTFBLoginButton" does not exist : <p>im posting here because ive done like 12hours searching and trying things to resolve my issue , but just cant find the solution.</p>
<p>Here is a screen of my errors:
<a href="https://i.stack.imgur.com/HgqsK.png" rel="noreferrer">React native debugger</a></p... | 0debug |
Parse error: syntax error, unexpected 'endwhile' (T_ENDWHILE), expecting end of file in C:\xampp\htdocs\demology\errors.php on line 11 : <p>//I get the above error when I try to run my registeration page</p>
<pre><code><div>
<?php foreach ($errors as $error): ?>
<p> <?php echo $erro... | 0debug |
How do I modify retrieved field from varbinary to formatted string in CakePHP 3? : I'm storing UUID data as varbinary(16) in MySQL tables. This is NOT a primary key. When I read this field, I'd like to have it converted to the standard 36-character string (binary to hex with hyphens inserted) in PHP. In CakePHP 2.x I w... | 0debug |
How to connect to remote Redis server? : <p>I have URL and PORT of remote Redis server. I am able to write into Redis from Scala. However I want to connect to remote Redis via terminal using <code>redis-server</code> or something similar in order to make several call of <code>hget</code>, <code>get</code>, etc. (I can ... | 0debug |
How does recaptcha 3 know I'm using selenium/chromedriver? : <p>I'm curious how Recaptcha v3 works. Specifically the browser fingerprinting.</p>
<p>When I launch a instance of chrome through selenium/chromedriver and test against ReCaptcha 3 (<a href="https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php"... | 0debug |
Sql Data Type for a specific string : i have a string format like :
<p>
++++++++++++++++++++++++++++<br/>
Sender ==> "Testsender"<br/>
Subject ==> "testsubject"<br/>
Content ==> "test Content ..."<br/>
++++++++++++++++++++++++++++++<br/>
++++++++++++++++++++++++++++<br/>
Sender ... | 0debug |
Empty class size in python : <p>I just trying to know the rationale behind the empty class size in python, In C++ as everyone knows the size of empty class will always shows 1 byte(as far as i have seen) this let the run time to create unique object,and i trying to find out what size of empty class in python:</p>
<pre... | 0debug |
how can I replace the value with the key in dictionary in python? : <p>I want the function inverse to return this output:</p>
<pre><code>{3: ['I', 'love'], 2: ['python']}
</code></pre>
<p>the function will replace the key and the value, but if there's the same value twice, it'll be one key. how can I do that?
// here... | 0debug |
I can't 'npm run releasae', that show errno 1 : when I use ``npm run release`` to release my project, i get error:
------------------------------------------------------------------
> react-scaffold@1.0.0 release
/home/nick/code/ops_order_system/ops_order/fesrc
> gulp release
assert.js:42
... | 0debug |
static void extract_mpeg4_header(AVFormatContext *infile)
{
int mpeg4_count, i, size;
AVPacket pkt;
AVStream *st;
const uint8_t *p;
mpeg4_count = 0;
for(i=0;i<infile->nb_streams;i++) {
st = infile->streams[i];
if (st->codec.codec_id == CODEC_ID_MPEG4 &&
st... | 1threat |
static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp)
{
uint16_t nodenr;
uint16List *cpus = NULL;
if (node->has_nodeid) {
nodenr = node->nodeid;
} else {
nodenr = nb_numa_nodes;
}
if (nodenr >= MAX_NODES) {
error_setg(errp, "Max nu... | 1threat |
static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block)
{
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
dest[0] = cm[(block[0] + 4)>>3];
}
| 1threat |
How do to execute function just once in void loop? : simplify i want to make counter to execute subrutine if digital read get toogle value. Can you help master, please :D
> ## Code #
>
> int lastState = 1;
>
> void setup() { Serial.begin(115200); }
>
> void loop() {
>
> int currentState = digital... | 0debug |
If condiction with two different diferent values for same variable : I have to allow upload of two different types of image dimension
image can either be of width 370 or 602
how can i check it using if image width `370 or 602` with if statement.
If image width are correct then it is okay otherwise i delete the f... | 0debug |
alert('Hello ' + user_input); | 1threat |
sed how I can replace csv only IF line contain string? : <p>I have a csv like this</p>
<pre>
titlemmmm;fff;ggg
mmmm;fff;ggg
mmmm;fff;ggg
</pre>
<p>I need to replace for obtain this</p>
<pre>
titlemmmm*fff*ggg
mmmm;fff;ggg
mmmm;fff;ggg
</pre>
<p>how I could do this </p>
<p>Please help me</p>
| 0debug |
Building Gradle porject fail : while Building my project when it reach (Task mergeReleaseAssets) i get this erorr com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid... | 0debug |
Data type conversion error: ValueError: Cannot convert non-finite values (NA or inf) to integer : <p>I've the following dataframe</p>
<pre><code>df1 = df[['tripduration','starttime','stoptime','start station name','end station name','bikeid','usertype','birth year','gender']]
print(df1.head(2))
</code></pre>
<p>which... | 0debug |
How to check to see if my variable contains a string : <p>In my c# program, I'm reading in lines from a text file and want to check to see if the line that I read in contains the string "EHRS" and if it does, I want to put that line into an array and if not, I want to read in the next line. When I run this, I get an er... | 0debug |
Haveing trouble getting rid of the extra space to the right of my content : <p>I am using a bootstrap 3 grid on my website and I am having trouble with getting rid of this extra space thats to the right of all my content. Allowing the bottom scrollbar to be visible and move. I dont want to hide the scrollbar I know How... | 0debug |
.net core Console application strongly typed Configuration : <p>On an .NET Core Console app, I'm trying to map settings from a custom appsettings.json file into a custom configuration class.</p>
<p>I've looked at several resources online but was not able to get the .Bind extension method work (i think it works on asp.... | 0debug |
Exclude Java package from dependency jar : <p>I want to use jar from third party vendor. But in this jar I have old version of Java package <code>org.osgi.framework</code> I need to find some way to exclude the package from the main project. Something like this:</p>
<pre><code><dependency>
<groupId>c... | 0debug |
static void openpic_save(QEMUFile* f, void *opaque)
{
OpenPICState *opp = (OpenPICState *)opaque;
unsigned int i;
qemu_put_be32s(f, &opp->glbc);
qemu_put_be32s(f, &opp->veni);
qemu_put_be32s(f, &opp->pint);
qemu_put_be32s(f, &opp->spve);
qemu_put_be32s(f, &opp->tifr);
for (i... | 1threat |
I need my search icon into search bar : So I am trying to have a search icon only in my nav bar which is up there, but I want a search bar to drop down when the search icon is clicked on I don't know what I'm doing with this code lol
<ul class="nav navbar-nav navbar-right">
... | 0debug |
How to run python code in hostgator every 30 minutes? : <p>I have hostgator shared plan.
Need to put a python file in the web-host and make it run every 30 minutes.</p>
<p>It is a long script, but please use a simple code instead to explain for example:
a=1
a=a+1</p>
| 0debug |
inline static int push_frame(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
AVFilterLink *inlink = ctx->inputs[0];
ShowWavesContext *showwaves = outlink->src->priv;
int nb_channels = inlink->channels;
int ret, i;
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) ... | 1threat |
AVFilterFormats *avfilter_make_all_channel_layouts(void)
{
static int64_t chlayouts[] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_QUAD,
AV_CH_LAYOUT_5POINT0,
AV_CH_LAYOUT_5POINT0_BACK,
AV_CH_LAYOUT_5POINT1,
... | 1threat |
Argument mismatch in python constructor : <p>I have written a python class whose constructor takes two lists as arguments.</p>
<pre><code>class nn:
def __init__(layer_dimensions=[],activations=[]):
self.parameters = {}
self.cache = []
self.activations= []
initialize_paramet... | 0debug |
Android app . fetching data from database : <p>I am a new Android app developer and need some help. I want to develop a simple login app just for understanding the working.
Using sqlite we can create tables and insert records in our application , but how to keep the table centralised for username and password so that... | 0debug |
static void decode_422_bitstream(HYuvContext *s, int count)
{
int i;
count /= 2;
if (count >= (get_bits_left(&s->gb)) / (31 * 4)) {
for (i = 0; i < count && get_bits_left(&s->gb) > 0; i++) {
READ_2PIX(s->temp[0][2 * i ], s->temp[1][i], 1);
READ_2PIX(s->temp[0][2... | 1threat |
How to replace all spaces present in a string with underscore using javascript? : <p>I have a string with spaces separating words. I want to replace all the spaces in the string with underscore. Please tell me any small code for that because my solution is taking too much space.
Example : 'Divyanshu Singh Divyanshu Sin... | 0debug |
Wiring and injected NLog into a .Net Core console application : <p>I created a consumer/job that I will have running as a process on linux written in C#. </p>
<p>The process will:</p>
<ol>
<li>Read a message from RabbitMQ </li>
<li>Make changes to the database </li>
<li>Log any errors</li>
</ol>
<p>All the documenta... | 0debug |
Kotlin call function only if all arguments are not null : <p>Is there a way in kotlin to prevent function call if all (or some) arguments are null? For example Having function:</p>
<pre><code>fun test(a: Int, b: Int) { /* function body here */ }
</code></pre>
<p>I would like to prevent null checks in case when argume... | 0debug |
static void FUNC(put_hevc_qpel_bi_w_h)(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride,
int16_t *src2,
int height, int denom, int wx0, int wx1,
int ox0, int ox1, intptr_t mx, ... | 1threat |
Python - How do I fix this speed varible writing back to file? : I've been writing a program, I've run into an error. My current code is:
import tkinter as tk
speed = 80
def onKeyPress(event, value):
global speed
text.delete("%s-1c" % 'insert', 'insert')
text.insert('end', ... | 0debug |
Installing docker on azure virtual machine windows 10 : <p>I am getting an error upon installing docker on azure virtual machine.</p>
<p><a href="https://i.stack.imgur.com/SKZI0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/SKZI0.png" alt="enter image description here"></a></p>
<p>m/c configuration: azure... | 0debug |
I am New In asp.net I just make a login page and i want to show user info name Adress etc when i successfuly login : > ## This is controller code for Login ##> This is User Login Controller code where I authenticating user EmailID and password when
> user login redirected to Home Controller where i want to ... | 0debug |
How to Run private class method.in same class in java : Can figure why it won't allow me to run the displaymainMethod because its private even though i know i can run it from from same class. is there a way to do this without using reflective API.
import java.util.*;
public class LoginPrototype {
... | 0debug |
Multiple images inside one container : <p>So, here is the problem, I <strong>need to do</strong> some <strong>development</strong> and for that I need following packages:</p>
<ol>
<li>MongoDb</li>
<li>NodeJs</li>
<li>Nginx</li>
<li>RabbitMq</li>
<li>Redis</li>
</ol>
<p>One option is that <strong>I take a Ubuntu image... | 0debug |
How do I compare three Boolean values when the comparisons are long? : I am trying to set up a condition check for my code. However, the code has become long and complex. I need a simpler version of the code that can easily do the job.
I have tried to compare three boolean values separated by brackets such that I o... | 0debug |
how to access database stored in array, specially particular rows and column : I am using laraval5.1 . i have stored by database table in array. Now i dont know how to access that array by rows or column.. how to get get particular data from array which is required by me from array.
please tell me how to do that.
... | 0debug |
Android TV RecyclerView focus interaction : <p>I'm currently using a regular <code>RecyclerView</code> with <code>GridLayoutManager</code>with different <code>spanCount</code> depeding on the <code>viewType</code> for an Android TV app. All is working decent but I have 2 issues:</p>
<ol>
<li>If you long press the dpad... | 0debug |
static int vhost_verify_ring_mappings(struct vhost_dev *dev,
uint64_t start_addr,
uint64_t size)
{
int i;
for (i = 0; i < dev->nvqs; ++i) {
struct vhost_virtqueue *vq = dev->vqs + i;
hwaddr l;
void *p;
... | 1threat |
How to call a function in python when using it's name as string? :
I am trying to read lines from my data and and output both the `forward` and `reverse` orientation by passing my list to a function. To solve what I am trying to do, I have to pipe the `function-name as string`. I am making a mock test below that repl... | 0debug |
static void parse_error(JSONParserContext *ctxt, QObject *token, const char *msg, ...)
{
fprintf(stderr, "parse error: %s\n", msg);
}
| 1threat |
Cannot run downloaded project on Android Studio : <p>I just downloaded an android project that I paid for but i cannot run the app on android studio. How do I run the project on android studio?</p>
| 0debug |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
API's to use with java to have fun with : <p>so I've been coding in java for the past 2 years, mainly making mods for Minecraft. Recently though I started making discord bots, and I've never really done anything with Java outside of Minecraft, and was using JDA(Java Discord API), and i realized how fun it was. I was wo... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.