problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
SQL Query - Help on Query : Table has 3 fields and sample data.
customerid,ordertype,countoforders
1, APP, 10
1, WEB, 20
2, APP, 10
3, WEB, 10
4, APP, 30
5, APP, 40
5, WEB, ... | 0debug |
update and override the image using codeignater : **I'm stuck on a problem with updating image. i did upload the multiple image and inserted in database but i can not override these images in database or my upload folder how can i override the images in my upload folder and my database 'm stuck on a problem with upd... | 0debug |
int read_targphys(int fd, target_phys_addr_t dst_addr, size_t nbytes)
{
uint8_t buf[4096];
target_phys_addr_t dst_begin = dst_addr;
size_t want, did;
while (nbytes) {
want = nbytes > sizeof(buf) ? sizeof(buf) : nbytes;
did = read(fd, buf, want);
if (did != want) break;
cpu_physical_memo... | 1threat |
Non-consumable In App Purchases for 30k items : **Problem**
I am working on app that has 30k digital items . I want to implement **InAppPurchases** for this . So as this is digital content and only once unlock-able/Purchase-able.
**What i have already done.**
I tried to do this via consumable for same price t... | 0debug |
how to pass jsp parameters in sql query? : I want to write sql query wch contain parameters from jsp.
I tried to code like
String sqlstring = "\"select"+Activity+" from backgroundcost where onpremprice =' "+service+" '\"";
pstmt ps = con.preparestatment(sqlstring);
Resultset rs = ps.executeQuery();
I m get... | 0debug |
Error date_modify() expects parameter 1 to be DateTime : <p>Full code :</p>
<pre><code>$ngayhientai = date("d/m/Y");
$ngaygiao = date_create($ngayhientai,timezone_open("Asia/Ho_Chi_Minh"));
$ngaygiao = date_modify($ngayhientai,"+3 days");
$ngaygiao = date_format($ngayhientai,"d/m/Y") ;
... | 0debug |
int kvm_init(void)
{
static const char upgrade_note[] =
"Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n"
"(see http:
KVMState *s;
const KVMCapabilityInfo *missing_cap;
int ret;
int i;
int max_vcpus;
s = g_malloc0(sizeof(KVMState));
... | 1threat |
static void store_slice_c(uint8_t *dst, const uint16_t *src,
int dst_linesize, int src_linesize,
int width, int height, int log2_scale,
const uint8_t dither[8][8])
{
int y, x;
#define STORE(pos) do { ... | 1threat |
static BusState *qbus_find(const char *path)
{
DeviceState *dev;
BusState *bus;
char elem[128];
int pos, len;
if (path[0] == '/') {
bus = sysbus_get_default();
pos = 0;
} else {
if (sscanf(path, "%127[^/]%n", elem, &len) != 1) {
assert(!path... | 1threat |
hello, I have a question about Flutter navigator/MaterialPageRoute , please help me : I have a BUTTON ,here is some code:
[enter image description here][1]
and i got the error like this:[enter image description here][2]
i never met the error like this, but when i add the 'dynamic' like this:[enter image de... | 0debug |
How to set the default working directory for run configurations in PyCharm : <p>When I want to run one of our many python scripts I hit run, which creates a new run configuration. The working directory for that configuration is the folder in which the python script file resides. Instead, it should run from a project wi... | 0debug |
beforeunload not working in Safari 9.1 after the page reloads on clicking leave page button : <p>In safari 9.1,jquery beforeunload browser pop up doesnt show up for the second time.
Once the user clicks on leave page button in the pop up the page reloads.But after this the pop up never comes up though the controls goes... | 0debug |
Euclidean GCD function returns type None instead of int : <p>I'm getting back into mathematics, algorithms, and data structures. Today, I spent time studying up on the Euclidean algorithm and greatest common divisors. </p>
<p>Below, I implemented a function to demonstrate what I learned: </p>
<pre><code>from math i... | 0debug |
How to configure Kubernetes to encrypt the traffic between nodes, and pods? : <p>In preparation for HIPAA compliance, we are transitioning our Kubernetes cluster to use secure endpoints across the fleet (between all pods). Since the cluster is composed of about 8-10 services currently using HTTP connections, it would ... | 0debug |
not work indexOf() for array that is from ajax text file data : jQuery version 1.4.4
aaa.txt
includes just 3row
01000
01001
01139
$.ajax({
url: "aaa.txt",
success: function(result){
console.log(result);
var rArr = result.split("\n");
var ee = rArr.in... | 0debug |
Can I use the Blade templating engine outside of Laravel? : <p>i'm want to creating a design pattern and use the "Blade templating engine".
Can I use the Blade templating engine outside of Laravel and use it in my new pattern ?</p>
| 0debug |
What is the diffrence between android api 17 and 23? : <p>So, i made a simple game in android studio and everything worked fine on my api 17 device. For some reason it doesn't want to work on my other device with api 23. It instantly stops working. I'm pretty sure it has nothing to do with permissions (that was the onl... | 0debug |
select all elements after element without jquery : I need to acces to all elements after certain element to change some attributes. I know there is nextAll() but I can't use jquery.
[i need to erase first answer and answer 2 to be updated to 1][1]
Thanks for the help.
[1]: https://i.stack.imgur.com/X1Yx8.pn... | 0debug |
Python Max value for each key in a list : Given:
`scooby = [1,4,1,4,1,4,1,1,4]
snacks = [6,28,14,3,9,8,18,6,7]
scoobysnacks = zip(scooby,snack)`
How do I run max(scoobysnacks) to get:
(1,18) and (4,28) as a result?
| 0debug |
void arm_cpu_list(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
{
int i;
(*cpu_fprintf)(f, "Available CPUs:\n");
for (i = 0; arm_cpu_names[i].name; i++) {
(*cpu_fprintf)(f, " %s\n", arm_cpu_names[i].name);
}
}
| 1threat |
Can anyone help me out with this, i got this error while executing the below script : from selenium import webdriver
driver = webdriver.Chrome()
driver = webdriver.Chrome(r'C:\Users\New User
prof\Downloads\chromedriver_win32.zip\chromedriver.exe')
driver.get ("https://www.google.com/webmas... | 0debug |
Is JS input spinners exists? NO JQUERY : <p>I'm looking for js spinners as on picture below (left & right control keys).
But i don't want to use jquery in my project. If you have any snippets, useful links - please paste it here. :) Simple short code is preferred.. :)
Maybe it has another name (not spinner, but.. ... | 0debug |
How can I make a Grafana template with a variable reference another variable using Prometheus as a datasource? : <p>I have a Grafana dashboard with template variables for <code>services</code> and <code>instances</code>. When I select a service how can I make it filter the second template variable list based on the fir... | 0debug |
Prevent TensorFlow from accessing the GPU? : <p>Is there a way to run TensorFlow purely on the CPU. All of the memory on my machine is hogged by a separate process running TensorFlow. I have tried setting the per_process_memory_fraction to 0, unsuccessfully.</p>
| 0debug |
How to loop the following inside a script, till they all deleted then continue? [Python] [Selenium] [Helium] : How to loop the following inside a script, till they all deleted then continue?
e.g. if there are X, then deleted X and conitue ( X = dynamic ) and so on.
if Text("Remove").exists():
click("Remove"... | 0debug |
Please how do you make a button click event bring about random labels : I tried making arrays labels but it seemed unsuccessful | 0debug |
extract data from csv and rename files : <p>I have files in a folder.</p>
<p>Filenames in this folder are available in a .csv file's column B.</p>
<p>Column A contains new file name.</p>
<p>Eg,</p>
<p>Attached pic.
<a href="https://i.stack.imgur.com/oXOVY.png" rel="nofollow noreferrer"><img src="https://i.stack.img... | 0debug |
Bash. getopts command. option that will do smth in the end of the program : Problem:
If my program takes option '-v' it should print "Good bye!" in the end of the program. I can do this, buy it will print is in the beginning. So i need some command that will execute it in the end, if any. Or how can i do this?
... | 0debug |
Passing an arraylist of object from servlet to jsp failed : <p>this things is giving me headache for the past 3 days already. I tried to store the resultset that i get from the database and store inside an arraylist of object then pass it to the jsp for display, but after running the program, it gave me this error:
<a ... | 0debug |
How can i use pandas to parse dataframe with specific column and write to sheets in one excel file : I uesed this but it won't work
for group in z3.group:
group=z3[z3['group']==group]
group.to_csv('group.csv',encoding='gbk') | 0debug |
how to show query while using query annotations with MongoRepository with spring data : <p>I'm using MongoRepository in spring boot to access mongo:</p>
<pre><code>public interface MongoReadRepository extends MongoRepository<User, String> {
@Query(value = "{$where: 'this.name == ?0'}", count = true)
publ... | 0debug |
Click on an element if a condition is true Angular js : I have an Angular js view.html page where I am passing a string called **datadict** from the $scope method of controller.
Value {{ datadict.days }} is displaying value **Nearly everyday** and {{ datadict.days.includes('Nearly everyday') }} is showing result *... | 0debug |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
static void decode_opc (CPUMIPSState *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 |
Visual Studio 2017 15.3.0 git changes include "storage.ide" even though .vs/ in .gitignore : <p>I upgraded VS 2017 to 15.3.0 a few days ago. Since then file "storage.ide" has remained in my modified files, even through I have used <a href="https://github.com/github/gitignore/blob/master/VisualStudio.gitignore" rel="nor... | 0debug |
static int mkv_write_trailer(AVFormatContext *s)
{
MatroskaMuxContext *mkv = s->priv_data;
AVIOContext *pb = s->pb;
int64_t currentpos, cuespos;
int ret;
if (mkv->cur_audio_pkt.size > 0) {
ret = mkv_write_packet_internal(s, &mkv->cur_audio_pkt, 0);
av_free_packet(&mkv... | 1threat |
How to create higher order components in Angular 2 : <p>Higher Order Components (HOC) is a pattern common among React community. See <a href="https://medium.com/@franleplant/react-higher-order-components-in-depth-cf9032ee6c3e#.m111af95l" rel="noreferrer">this article</a> if you don't know what's a HOC</p>
<p>Do they m... | 0debug |
Looping through downloaded files to print specific file and overall folder name : All i am trying to do is have a simple for-loop go through my documents and provide me with a dataframe that consists of a column of folder names, and then another column of the files within that folder.
For example, lets say i have a... | 0debug |
static int flac_probe(AVProbeData *p)
{
uint8_t *bufptr = p->buf;
if(ff_id3v2_match(bufptr))
bufptr += ff_id3v2_tag_len(bufptr);
if(memcmp(bufptr, "fLaC", 4)) return 0;
else return AVPROBE_SCORE_MAX / 2;
}
| 1threat |
mysqldump via SSH to local computer : <p>I have an SSH access to production server of the Rails app.</p>
<p>I want to make a mysqldump of production database to my Mac. Please help me to achieve this.</p>
| 0debug |
Disable frozen string literal comment checking : <p>I'm newbie in Rails. I am using 'Rubocop' for checking standards, however I'm bothered with the way it checks the 'frozen string literal'. It keeps on saying on my files: </p>
<pre><code>Missing frozen string literal comment.
</code></pre>
<p>Is there a way to dis... | 0debug |
static void *aio_thread(void *unused)
{
pid_t pid;
sigset_t set;
pid = getpid();
if (sigfillset(&set)) die("sigfillset");
if (sigprocmask(SIG_BLOCK, &set, NULL)) die("sigprocmask");
while (1) {
struct qemu_paiocb *aiocb;
size_t ret = 0;
qemu_timeval ... | 1threat |
static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
unsigned int channel, unsigned int filter)
{
FilterParams *fp = &m->channel_params[channel].filter_params[filter];
const int max_order = filter ? MAX_IIR_ORDER : MAX_FIR_ORDER;
const char fchar = filter... | 1threat |
Jquery href contains a DOT : How can I check if a href contains a string with a dot. I tried doing the following and it doesn't work:
$("a[href*=9.0]").hide();
Any ideas on how I should do this? | 0debug |
JQuery script method to ignore the execution of the event listener function and execute it only if I press the Enter key on the keyboard : I need to create a JQuery script method to ignore the execution of the keyup or keypress event listener function and execute it only if I press the Enter key on the keyboard.
... | 0debug |
How do I display the largest number in an array in Ruby? : <p><strong>I have a homework assignment that I need to finish. I think most of the code is working but I am having trouble with the last part. I need to display the largest number that a user enters (into an array). Below is the code I have so far. I am open to... | 0debug |
C++ | Is there any variable like BigInteger, but as floating point? : I saw, that there are libarys, that offer data types like BigInterger, but I need one, that contains a variable type, taht is "big" (means: that can handle very high values) but also I need the possibility to divide it by another high number, so it w... | 0debug |
animateLayoutChanges="true" in BottomSheetView showing unexpected behaviour : <p>I have a <code>BottomSheetView</code> which has <code>animateLayoutChanges="true"</code>. Initially it shows up fine. But if change the <code>visibility</code> of a view (inside <code>BottomSheetView</code>) from <code>GONE</code> to <code... | 0debug |
static void peer_test_vnet_hdr(VirtIONet *n)
{
NetClientState *nc = qemu_get_queue(n->nic);
if (!nc->peer) {
return;
}
n->has_vnet_hdr = qemu_peer_has_vnet_hdr(nc);
}
| 1threat |
Match string using perl : <p>I have stored a piece of string "Strawberry Hill" in a variable. However I am trying to use a regular expression to see if the string matches a particular format. If the string matches I would like to store it in a variable. However nothing gets stored in the variable. I tested the regular ... | 0debug |
Typescript - Allowed values for a property : <p>What it the best way in Typescript to only allow a number of value for a property ?</p>
<pre class="lang-js prettyprint-override"><code>class Foo {
public type:string;
// Possible values for type: ['foo1', 'foo2', 'foo3']
constructor() {}
}
</code></pre>
<p... | 0debug |
Why is docker build taking so long to run? : <p>I'm running docker build and it's taking an awfully long time to run. Infact, it doesn't complete and I have to CTRL + C to quit.</p>
<p>Last night things were working fine. When I returned to the computer and tried to rebuild it started acting strange.</p>
<p>Here's my... | 0debug |
Use default predicate in WHERE method : <p>Can I use a default predicate in the <code>where</code> method?</p>
<p>In my db I have a column <code>IsDeleted</code> for every tables. Is there a way when i get some data like this</p>
<pre><code>_dbContext.Person.Where(x => x.Age > 35).FirstOrDefault();
</code></pre... | 0debug |
Given a string / filename produce a hash in R? : <p>I have a set of file names:</p>
<pre><code>f <- c("a", "b", "c")
</code></pre>
<p>I have found <code>digest</code> function to do this, can you please advise if have chosen the right function for the task?</p>
| 0debug |
static uint8_t qvirtio_pci_config_readb(QVirtioDevice *d, uint64_t off)
{
QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
return qpci_io_readb(dev->pdev, CONFIG_BASE(dev) + off);
}
| 1threat |
How can I build a binary image with random sequence of 80% 1s and 20% 0s? : <p>I want to implement an algorithm for generating a binary image having random sequence of 80% 1s and 20% 0s in it with python-opencv.</p>
| 0debug |
Implement something similar to C++'s `std::remove_reference` in Rust? : <p>I'd like to have a tool to remove the reference from a type if the type is a reference. Something like this (pseudo code):</p>
<pre><code>remove_ref(i32) == i32
remove_ref(&i32) == i32
remove_ref(&&i32) == i32
remove_ref... | 0debug |
void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
{
BlockDriverState *bs, *bs1;
QEMUSnapshotInfo *sn_tab, *sn, s, *sn_info = &s;
int nb_sns, i, ret, available;
int total;
int *available_snapshots;
bs = find_vmstate_bs();
if (!bs) {
monitor_printf(mon, "No available... | 1threat |
static void set_pixel_format(VncState *vs,
int bits_per_pixel, int depth,
int big_endian_flag, int true_color_flag,
int red_max, int green_max, int blue_max,
int red_shift, int green_shift, int blue_s... | 1threat |
how to pull information from one table into text boxs based on primary key from another table? : protected void custo_search_Click(object sender, EventArgs e)
{
conn.Open();
if (appo_fname.Text != null || appo_lname.Text != null || appo_num.Text != null)
{
... | 0debug |
Connection Pool for rails 5 : <p>I am having this issue with rails 5 rc1. Does anyone have any idea how to configure it in the environment files and what is the default connection pool size for rails 5 active record.</p>
<pre><code> Puma caught this error: could not obtain a connection from the pool within 5.000 sec... | 0debug |
unsigned int av_codec_get_tag(const AVCodecTag *tags[4], enum CodecID id)
{
int i;
for(i=0; i<4 && tags[i]; i++){
int tag= codec_get_tag(tags[i], id);
if(tag) return tag;
}
return 0;
}
| 1threat |
static void wavpack_decode_flush(AVCodecContext *avctx)
{
WavpackContext *s = avctx->priv_data;
int i;
for (i = 0; i < s->fdec_num; i++)
wv_reset_saved_context(s->fdec[i]);
}
| 1threat |
C- find a series with recursion : im trying to write a **RECURSION** function that gets an array by pointer and its size, and return the number of longest series in the array (assume that there is a series),
for exemple:
array: {1 2 3 3 4 5 6 6 6 6 7 8}
returns-->: 4
but i dont know whats worng w... | 0debug |
int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt)
{
V4L2Buffer* avbuf = NULL;
avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? 200 : -1);
if (!avbuf) {
if (ctx->done)
return AVERROR_EOF;
return AVERROR(EAGAIN);
}... | 1threat |
static void bdrv_assign_node_name(BlockDriverState *bs,
const char *node_name,
Error **errp)
{
if (!node_name) {
return;
}
if (node_name[0] == '\0') {
error_setg(errp, "Empty node name");
return;
... | 1threat |
Attempting to unmarshal a json byte array in golang 1.12 : <p>I am getting a json byte array and simply attempting to unmarshal it into a struct for later use.</p>
<pre><code>type Event struct {
category string `json:"category"`
service string `json:"service"`
timestamp string `json:"timestamp"`
val... | 0debug |
static inline void update_rice(APERice *rice, int x)
{
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
if (rice->k == 0)
rice->k = 1;
else if (rice->ksum < (1 << (rice->k + 4)))
rice->k--;
else if (rice->ksum >= (1 << (rice->k + 5)))
rice->k++;
}
| 1threat |
To Re arrange the columns of dataframe from csv : I need to read a csv file in python and then re arrange the columns of csv and make a new dataframe made of the rearranged columns
I tried using list, but it might work slow..
Any alternative using numpy or pandas? | 0debug |
how to get same id different values in javascript json array object : how to get same id different values in javascript json array object and push it in array.
This is actual json data,
var data = [{
"areaid": 25,
"wardid": 5
},
{
"areaid": 24,
"wardid": 5
},
... | 0debug |
SQl Querry converting to Linq : select COUNT(prosold.Product_ID) as c,prosold.Product_ID,ProImg.ImagePath from ProductSold as ProSold,ProductImages as ProImg where ProSold.Product_ID=ProImg.Product_ID group by ProSold.Product_ID,ProImg.ImagePath order by c desc | 0debug |
Best practice calling scalar functions with Entity Framework Core (2.1) : <p>I often need to call scalar functions that are defined on a SQL Server from my web applications (ASP.NET Core / EF Core). Since these functions are just simple helper functions and I also use a lot of them I use a general pattern for calling t... | 0debug |
static int vnc_tls_initialize(void)
{
static int tlsinitialized = 0;
if (tlsinitialized)
return 1;
if (gnutls_global_init () < 0)
return 0;
if (gnutls_dh_params_init (&dh_params) < 0)
return 0;
if (gnutls_dh_params_generate2 (dh_params, DH_BITS) < 0)
return 0;
#if define... | 1threat |
(C#) How to remove the "Hello World" line when starting a new console application : <p>I am using Visual Studio 2017. When I start a new Console App(.NET Core) it comes with a Console.WriteLine("Hello World!") by default. My question is if there is a way to permanently remove this line instead of deleting it every sing... | 0debug |
how to fix andriod java ListViewAdapter : Please i need help to fix is problem with my ListView Adapter, when i scroll down the list of country change to only one country.
this my
Nraeby_ListViewAdapter
public class Nraeby_ListViewAdapter extends BaseAdapter {
private String Liked;
Context mCo... | 0debug |
javascript; What is the difference between two pieces of codes below : <p>I am trying to understand how are these two pieces of code different.</p>
<pre><code>var bill=10.25+3.99+7.15;
var tip = bill*0.15;
var total=bill+tip;
total = total.toFixed(2);
console.log("$"+total);
</code></pre>
<p>And</p>
<pre><code>var b... | 0debug |
static void synth_block_fcb_acb(WMAVoiceContext *s, GetBitContext *gb,
int block_idx, int size,
int block_pitch_sh2,
const struct frame_type_desc *frame_desc,
float *excitation)
{
st... | 1threat |
How to set conditions .each : I have here such a section of code
<% @portfolio.shuffle.each do |portfo| %>
How can I specify in the condition that the code in this block should be executed 6 times? | 0debug |
static void ich9_apm_ctrl_changed(uint32_t val, void *arg)
{
ICH9LPCState *lpc = arg;
acpi_pm1_cnt_update(&lpc->pm.acpi_regs,
val == ICH9_APM_ACPI_ENABLE,
val == ICH9_APM_ACPI_DISABLE);
if (val == ICH9_APM_ACPI_ENABLE || val == ICH9_APM_ACPI_DISA... | 1threat |
Javascript incompatible type error in android studio : [error in javascript][1]
[1]: https://i.stack.imgur.com/8na9r.png
javascript error shows when i build the gradle second time after opening the project, at first time the gradle build does not shows any errors. Can Someone plz help me in this error???? | 0debug |
How To Disable 2nd Saturday 4th Saturday ,Sunday And Holiday Date Using JQuery Calendar : i want to Disable 2nd Saturday 4th saturday, Sunday And Public Holiday Date Using jQuery calendar
All year of 2nd Saturday And 4th Saturday ,Sunday Disable from Calendar
Please Help Me | 0debug |
Swift 3 / Xcode 8 Upgrade - 100's of DerivedData files missing from working copy errors : <p>I have just upgraded to the latest Beta version of XCode and Swift but after using the converter my app project now has over 200 build time yellow errors all stating /"projectDirectoy"/DerivedData/XXXXXXXXX/XXXX/XXX/xXXX/xXX is... | 0debug |
Why kotlin gradle plugin cannot build with 1.8 target? : <p>I have the simplest gradle project configured using intellij for kotlin 1.2.10. Here is my build.gradle file:</p>
<pre><code>buildscript {
ext.kotlin_version = '1.2.10'
repositories {
mavenCentral()
}
dependencies {
classpath ... | 0debug |
I can run my PHP program and I received several errors.. Please see my attached images : [This is the warning I got][1]
[My logintest php code][2]
[][3]
[1]: http://i.stack.imgur.com/XDM3e.png
[2]: http://i.stack.imgur.com/m8Fqd.png
database name = portfolio
table name = admin | 0debug |
void PREFIX_h264_chroma_mc8_altivec(uint8_t * dst, uint8_t * src,
int stride, int h, int x, int y) {
POWERPC_PERF_DECLARE(PREFIX_h264_chroma_mc8_num, 1);
DECLARE_ALIGNED_16(signed int, ABCD[4]) =
{((8 - x) * (8 - y)),
(( ... | 1threat |
Read a conditon from a file java : i wrote this java codes and i want the conditions to be read from a file.
is it possible? if you have any tutorial. or anything that will help me understand how to do it.
i have tried putting each condition in a file and read form that.
if(con == 1){
Scanne... | 0debug |
int qmp_pc_dimm_device_list(Object *obj, void *opaque)
{
MemoryDeviceInfoList ***prev = opaque;
if (object_dynamic_cast(obj, TYPE_PC_DIMM)) {
DeviceState *dev = DEVICE(obj);
if (dev->realized) {
MemoryDeviceInfoList *elem = g_new0(MemoryDeviceInfoList, 1);
Memo... | 1threat |
How do I insert text into a Monaco Editor? : <p>I have a monaco code editor embedded in my app.</p>
<p>How do I programmatically insert text on a particular line?</p>
<pre><code>var editor = monaco.editor.create(document.getElementById("container"), {
value: "// First line\nfunction hello() {\n\talert('Hello worl... | 0debug |
SVG Fill Color Not Working : <p>I'm new to using SVGs and can't figure out what I'm doing wrong here. For most of them, if I want to change the color, I use:</p>
<pre><code>svg path {
fill: blue;
}
</code></pre>
<p>But for this one - and other's I've come across - for some reason this way doesn't work. </p>
<p>... | 0debug |
node.js require from parent folder : <p>I have the following structure:</p>
<pre><code>-- node_modules
-- websites
---- common
------- config.js
---- testing
------- test.js
</code></pre>
<p>Inside config I have some variables set, which are being exported using module.export.</p>
<p>I am trying to retrieve those va... | 0debug |
int64 float32_to_int64_round_to_zero( float32 a STATUS_PARAM )
{
flag aSign;
int16 aExp, shiftCount;
bits32 aSig;
bits64 aSig64;
int64 z;
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
aSign = extractFloat32Sign( a );
shiftCount = aExp - 0xBE;
if ( 0 ... | 1threat |
Convert an int** array into a char** array of a different size / composition : <p>I'm trying to convert an int** array that looks like the below, into a char** array that is made up from the number of rows and is comma seperated. </p>
<pre><code>1 2 3 4
5 6 7 8
9 3 2 1
</code></pre>
<p>An example of what I would like... | 0debug |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
async await in image loading : <p><strong>Temp.js</strong> </p>
<pre><code>export default class Temp {
async addImageProcess(src){
let img = new Image();
img.src = src;
return img.onload = await function(){
return this.height;
}
}
}
</code></pre>
<p><strong>anotherfi... | 0debug |
How to change all elements with the same IDs javascript/html? : <p>I will be working on a table and wanted to change one column with different img src icon.</p>
<p>Here's my sample code:</p>
<p>Html</p>
<pre><code><img src="" id="mytext">
<img src="" id="mytext">
<img src="" id="mytext">
</code></p... | 0debug |
static uint64_t gem_read(void *opaque, target_phys_addr_t offset, unsigned size)
{
GemState *s;
uint32_t retval;
s = (GemState *)opaque;
offset >>= 2;
retval = s->regs[offset];
DB_PRINT("offset: 0x%04x read: 0x%08x\n", offset*4, retval);
switch (offset) {
case GEM_ISR:
... | 1threat |
Excel vba set styl in new sheet with a table : How do I rectify this code?
Sub test()
Sheets("new").DeleteSheets.Add.Name = "new"
ActiveSheet.Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(3, 3)) = "f"
ActiveSheet.ListObjects.Add(xlSrcRange, Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(3, 3)... | 0debug |
static AVFrame *do_vmaf(AVFilterContext *ctx, AVFrame *main, const AVFrame *ref)
{
LIBVMAFContext *s = ctx->priv;
pthread_mutex_lock(&s->lock);
while (s->frame_set != 0) {
pthread_cond_wait(&s->cond, &s->lock);
}
av_frame_ref(s->gref, ref);
av_frame_ref(s->gmain, main);
... | 1threat |
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size)
{
const uint16_t *end;
uint8_t *d = (uint8_t *)dst;
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
while(s < end)
{
register uint16_t bgr;
bgr = *s++;
*d++ = (bgr&0x7C00)>>7;
*d++ = (bgr&0x3E0)>>2;
*... | 1threat |
No repeat randomizing in objective C (Xcode) : i am lost. So i need any help.
I wrote this code for a simple game. It is randomizing a number and then do something with SWITCH. It is simple but i want to have a task only once in one round. In my case round is 3 task. After a round is done, i want to reset my variable... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.