problem
stringlengths
26
131k
labels
class label
2 classes
Check a value is exactly 0? : <p>I want to check whether a value <code>s</code> is exactly zero,but when <code>s = False</code>, <code>s == 0</code> is also true.Thus how to address such case?<br> Thanks in advance!</p>
0debug
vArray if else macro Excel 2016 : I am trying to create a macro the adds different pages to a pdf based on a check box status. This is what I currently have. Sub ToyotaMO() ' ' ToyotaMO Macro ' Sheets("TC").Visible = True Sheets("BS").Visible = True Sheets("ToyotaMO").Activate If Sheets...
0debug
What are Android Architecture Components,LiveData and ViewModel? : <p>As a beginner it is very hard to understand what are these things Is there any resource which can give a grasp knowledge of things in easy language?</p>
0debug
static void show_programs(WriterContext *w, AVFormatContext *fmt_ctx) { int i; writer_print_section_header(w, SECTION_ID_PROGRAMS); for (i = 0; i < fmt_ctx->nb_programs; i++) { AVProgram *program = fmt_ctx->programs[i]; if (!program) continue; show_program(w, fm...
1threat
Matlab repmat into long single dismension array? : <p>I'm trying to take: </p> <pre><code>a = [1 2 3] </code></pre> <p>and repeat it 5 times to get: </p> <pre><code>b = [1 2 3 1 2 3 1 2 3 1 2 3 1 2 3] </code></pre> <p>but when I try: </p> <pre><code>b = repmat(a, 5, 1) </code></pre> <p>instead I get: </p...
0debug
static void scsi_unmap_complete(void *opaque, int ret) { UnmapCBData *data = opaque; SCSIDiskReq *r = data->r; SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev); uint64_t sector_num; uint32_t nb_sectors; r->req.aiocb = NULL; if (r->req.io_canceled) { scsi_req_c...
1threat
static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) { AVFrame *decoded_frame, *f; AVCodecContext *avctx = ist->dec_ctx; int i, ret, err = 0; if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) return AVERROR(ENOMEM); if (!ist->filter_frame && !...
1threat
count only if field is filled : I have a question about an sql query i want to make. Supose i have an column with the follow values in table: school with column: grades. SUI grades | Score 2 9 2 2 9 5 4 1 5 4 1 5 4 6 1 ...
0debug
void do_405_check_sat (void) { if (!likely(((T1 ^ T2) >> 31) || !((T0 ^ T2) >> 31))) { if (T2 >> 31) { T0 = INT32_MIN; } else { T0 = INT32_MAX; } } }
1threat
Automatically answer to input prompt in windows batch : <p>In a windows batch, I want to start a program that prompts the user for an input:</p> <pre><code>&gt;someProgram.exe &gt; "Please enter "s" to start the program: &gt; </code></pre> <p>How can I automatically pass the "y" input to the prompt, such that I can ...
0debug
Can some explain the java code given here? : <p>code - job.setOutputKeyClass(Text.class); </p> <p>what does it mean by passing param as Text.class? whey .class is required.</p>
0debug
Read from a file search for a word and copy the entire line to another file : <p>I have a file 1.txt with lines of words</p> <ol> <li>A cat went bankrupt</li> <li>List item</li> <li>Something is there</li> </ol> <p>I search for a word List and copy the entire line to new file 2.txt List item.</p> <p>How do i do that...
0debug
When i update an android app i am getting error code:-26.How to solve it? : <p>When i update an android app i am getting error code:-26.How to solve it?<a href="https://i.stack.imgur.com/yl5Za.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yl5Za.png" alt="enter image description here"></a></p>
0debug
uint32_t avpriv_fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id) { int i; for (i = 0; avpriv_fmt_conversion_table[i].codec_id != AV_CODEC_ID_NONE; i++) { if ((codec_id == AV_CODEC_ID_NONE || avpriv_fmt_conversion_table[i].codec_id == codec_id) && (pix_fmt ...
1threat
How to get top and bottom number of a number in iOS Swift? : <p>I have a number like 73<br> how get max and min like 70 and 80.<br> or 173 I want to get 170 and 180 etc.</p>
0debug
vbDatabaseCompare in StrComp function : <p>When we use StrComp in VBA we have 3 compare options. <br><br> vbTextCompare<br> vbBinaryCompare<br> vbDatabaseCompare<br></p> <p>How vbDatabaseCompare differs from other 2?</p>
0debug
Is the default lodash memoize function a danger for memory leaks? : <p>I want to use <code>memoize</code> but I have a concern that the cache will grow indefinitely until sad times occur.</p> <p>I couldn't find anything via google/stackoverflow searches.</p> <p>P.S. I am using lodash v4.</p>
0debug
Construct regular expression that matches numeric expressions like 5+65 : <p>I'm looking for a way to construct regular expressions to match two integers with mathematical operation, like 6+36 85*52 </p>
0debug
display mysql-table - wrong order displayed : <p>php snippet:</p> <pre><code>mysqli_select_db($con,"dbtest"); $sql="SELECT * FROM w3school"; $result = mysqli_query($con,$sql); echo "&lt;ul id='myUL'&gt;"; while($w3school = mysqli_fetch_array($result)) { echo "&lt;li id='".$w3school['id']."'&gt;" . $w3school['Las...
0debug
who is the owner of the contracts deployed using truffle? : <p>I am using testrpc and truffle to test my contract.</p> <p>When I type <code>truffle migrate</code> , this will deploy my contract to the testrpc network.</p> <p>My question is , which account (from testrpc accounts) has been used to deploy the contract.<...
0debug
Missing "Web Inspector" Settings in simulator : <p>After doing a "Reset All Content And Settings.." on the simulator the setting to enable using the web inspector in safari has disappeared, and I have no idea how to get it back:</p> <p><a href="https://i.stack.imgur.com/njxSz.png" rel="noreferrer"><img src="https://i....
0debug
Rotate all html element (whole page) 90 degree with CSS? : <p>I want to display every thing in the page rotated consistently and dependently 90 degree, I tried to do it but the result was inaccurate and each element rotated independently.</p>
0debug
How to write a `ByteData` instance to a File in Dart? : <p>I am using Flutter to load an "asset" into a <code>File</code> so that a native application can access it.</p> <p>This is how I load the asset:</p> <pre><code>final dbBytes = await rootBundle.load('assets/file'); </code></pre> <p>This returns an instance of ...
0debug
index was outside the bounds of the array meaning WPF C# : <p>I try this code to display names from database in loop but this shows an error index was outside the bounds of the array meaning on this line name[j++] = Convert.ToString(reader["CategoryName"]);</p> <p>code</p> <pre><code> con.Open(); ...
0debug
How to use this inside a collection class : <p>How can I use THIS keyword to refer to the collection in a class which inherits from an ArrayList like this. I got an error at design time and IDE doesn't allow me to compile my code. </p> <pre><code>public class Company{ private EmployeeCollection employees; publ...
0debug
window.location.href = 'http://attack.com?user=' + user_input;
1threat
void r4k_helper_tlbp(CPUMIPSState *env) { r4k_tlb_t *tlb; target_ulong mask; target_ulong tag; target_ulong VPN; uint8_t ASID; int i; ASID = env->CP0_EntryHi & 0xFF; for (i = 0; i < env->tlb->nb_tlb; i++) { tlb = &env->tlb->mmu.r4k.tlb[i]; mask = tl...
1threat
How get time on timecurrent on node of firebase using angular? : I want to show only the time on the view, when use $firebaseArray i get the list of items and i want to get only the time. firebase tree { "eventmodel" : { "-KX6kDkufxLg-fLocsN7" : { "info" : "ok", "limit" :...
0debug
def extract_rear(test_tuple): res = list(sub[len(sub) - 1] for sub in test_tuple) return (res)
0debug
window.back() is not working in javascript : <p>window.back() is not working in javascript.</p> <p>Trying to write a test case where need to access the url from history.</p> <p>but not getting any result</p>
0debug
How can I make a trailing slash optional on a Django Rest Framework SimpleRouter : <p>The <a href="http://www.django-rest-framework.org/api-guide/routers/#simplerouter" rel="noreferrer">docs</a> say you can set <code>trailing_slash=False</code> but how can you allow both endpoints to work, with or without a trailing sl...
0debug
I insert struct to vector,but address of all the elements of vector are same : <p>I declared a struct treenode</p> <pre><code>struct treenode { int val; treenode *l; treenode *r; }; </code></pre> <p>and a vector</p> <pre><code>vector&lt;int&gt; v = { 1,2,3,4,5,6,7,8,9 }; </code></pre> <p>now I want to c...
0debug
Where shall I put an existing DB in a android project : <p>Im making an app, and want to port it to android which im new to. Where should i place the db? and is the code below enough to successfully connect and query the db or do i need more to just test if it works?</p> <pre><code> String path = "WHERE_SHOULD_I_PLACE...
0debug
SQL queries - For Customer and Sale representative using pgAdmin4 : Q: List the numbers and names of all customers who are represented by Ann Hull but who do not currently have orders on file. This is what i have so far... but it isn't the right output... Can someone HELP!
0debug
Extracting highest value in some unequal periods/time-series in R : I have two data frame: period_example (consists of ‘ Beg’, and ‘End’) and price_example (consists of ‘Date’ and ‘High’). I want the highest value of High for each Beg-End period. How to do it? Thank you. Here is the data: > period_example <- data....
0debug
Bad initialisation of std::vector ? : <p>This is how I declare my vector : </p> <pre><code> std::vector &lt;Link *&gt; _components; </code></pre> <p>Link is this structure : </p> <pre><code> struct Link { size_t targetPin; nts::IComponent *component; }; </code></pre> <p>First to initialise it I do </p...
0debug
@mention via incoming webhook in MS Teams : <p>I'm trying to mention a user from an incoming webhook.</p> <p>I tried a few iterations via Postman of </p> <pre><code>{ "text": "test @user" } </code></pre> <p>or </p> <pre><code>{ "text": "test @user@email.com" } </code></pre> <p>but none of these seem to work. Is th...
0debug
How do I fix error of the main python file? : Please help. It gave me an error when running the main.py file.. Error: No module named 'kivymd.app'
0debug
How can this be done in perl : <Root> <Top Name=" "> <Tag name="ALU"> <in name="PC"/> <iodirection name="AB"/> </Tag> <Tag name=" "> <in name="CCB"/> <ou name="PC"/> <bi name="AB"/> </Tag> <Tag name=" "> <in na...
0debug
static struct omap_pwl_s *omap_pwl_init(MemoryRegion *system_memory, target_phys_addr_t base, omap_clk clk) { struct omap_pwl_s *s = g_malloc0(sizeof(*s)); omap_pwl_reset(s); memory_region_init_io(&s->iomem, &omap_pwl_...
1threat
Android gradle 3.0.0 buildConfigField warning after updating : <p>I recently installed the latest Canary build of Android Studio which is currently using the Android Gradle plugin <code>3.0.0-alpha4</code> (previous was <code>2.3.3</code>).</p> <p>I now get a warning for all of my buildConfigFields:</p> <pre><code>bu...
0debug
name 'A' is not defined : <p>I am trying to learn opencv using python, when I try to define a variable, I got the same error. </p> <p>this is my code </p> <pre><code>import numpy as np import cv2 img = cv2. imread('love.jpg', 1) cv2. imshow('image', img) A == cv2.waitkey(0) &amp; 0xFF if A == 27: cv2.destroyAllW...
0debug
Making REST calls from a react component : <p>I am trying to make REST call from a react component and render the returned JSON data into the DOM</p> <p>Here is my component</p> <pre><code>import React from 'react'; export default class ItemLister extends React.Component { constructor() { super(); ...
0debug
Random letter generator game : <p>Warning: I am brand new to programing! I am trying to create a random letter generator game for a class project. I feel like I have a decent start to it but I am having difficulty with a few points. </p> <p>The program is supposed to ask the player how many games they would like to pl...
0debug
How can I avoid <br> tags inside of other tags using php : <p>For some reasons, I do not want to have <code>&lt;br&gt;</code> tags inside of my others tags. For example, if I have </p> <pre><code>&lt;b&gt;This is a line&lt;br&gt;another line?&lt;/b&gt; &lt;i&gt;testing 1&lt;br&gt;testing 2&lt;/i&gt; </code></pre> <p>...
0debug
items in flex container overlap : When I try this code, the two dots overlap each other as well as the text. Why? How can I get them to be side by side? <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> .container { display: flex; ...
0debug
static void patch_reloc(tcg_insn_unit *code_ptr, int type, intptr_t value, intptr_t addend) { assert(type == R_ARM_PC24); assert(addend == 0); reloc_pc24(code_ptr, (tcg_insn_unit *)value); }
1threat
def No_of_cubes(N,K): No = 0 No = (N - K + 1) No = pow(No, 3) return No
0debug
void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq) { stellaris_enet_state *s; int iomemtype; qemu_check_nic_model(nd, "stellaris"); s = (stellaris_enet_state *)qemu_mallocz(sizeof(stellaris_enet_state)); iomemtype = cpu_register_io_memory(0, stellaris_enet_readfn, ...
1threat
static void pmac_ide_transfer(DBDMA_io *io) { MACIOIDEState *m = io->opaque; IDEState *s = idebus_active_if(&m->bus); MACIO_DPRINTF("\n"); s->io_buffer_size = 0; if (s->drive_kind == IDE_CD) { if (s->lba == -1) { s->io_buffer_size = MIN(io->len, s->packet_...
1threat
static void omap_pwl_write(void *opaque, target_phys_addr_t addr, uint64_t value, unsigned size) { struct omap_pwl_s *s = (struct omap_pwl_s *) opaque; int offset = addr & OMAP_MPUI_REG_MASK; if (size != 1) { return omap_badwidth_write8(opaque, addr, value); }...
1threat
How to use tf.keras with bfloat16 : <p>I'm trying to get a tf.keras model to run on a TPU using mixed precision. I was wondering how to build the keras model using bfloat16 mixed precision. Is it something like this?</p> <pre><code>with tf.contrib.tpu.bfloat16_scope(): inputs = tf.keras.layers.Input(shape=(2,), dt...
0debug
Recursively list directories in powershell : <p>How do you recursively list directories in Powershell?</p> <p>I tried <code>dir /S</code> but no luck:</p> <pre><code>PS C:\Users\snowcrash&gt; dir /S dir : Cannot find path 'C:\S' because it does not exist. At line:1 char:1 + dir /S + ~~~~~~ + CategoryInfo ...
0debug
How to pass an std::array with unknown size? in C++ : <p>I'd like to pass an C++ std::array defined as </p> <pre><code>array&lt;int,100&gt; arrayName </code></pre> <p>to another function, but I don't want to specify there the size, so I can easily change the size only at creation of the array.</p> <p>How do I write ...
0debug
Is there a way to make an array of arrays? Java : <p>OK so I created a method and I actually need it to return two different values. Two different arrays. Now the only way I think I could do this is by putting the values into an array. That didn't work. This was because I was initializing improperly. Now I have no clue...
0debug
CPUPPCState *cpu_ppc_init(void) { CPUPPCState *env; cpu_exec_init(); env = qemu_mallocz(sizeof(CPUPPCState)); if (!env) return NULL; #if !defined(CONFIG_USER_ONLY) && defined (USE_OPEN_FIRMWARE) setup_machine(env, 0); #else env->spr[PVR] = 0x00080100; #endif tl...
1threat
HOW TO DRAW EDGES WITH JUNG LIBRARY? : I have an implementation of a Graph and I want to visualize it using JUNG. My problem is that when I add an edge, I visualize 2 edges, for example 1 to 2 and 2 to 1 with the same weight, but I just want to see 1 edge. My code: public void createGraph(HashMap<Integer, V...
0debug
static bool cmd_read_multiple(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_MULTREAD_EXT); if (!s->bs || !s->mult_sectors) { ide_abort_command(s); return true; } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = s->mult_sectors; ide_sector_read(s); r...
1threat
trouble merging two pandas dataframes by the transposed headers : <p>I'm having trouble merging two of my pandas dataframes together. I have two dictionaries that I turn into dataframes and transpose, and I want to merge the two dataframes based on the first row headers.</p> <p>I have two dictionaries </p> <pre><code...
0debug
Angular 6 Downloading file from rest api : <p>I have my REST API where I put my pdf file, now I want my angular app to download it on click via my web browser but I got HttpErrorResponse </p> <p>"Unexpected token % in JSON at position 0"</p> <p>"SyntaxError: Unexpected token % in JSON at position 0↵ at JSON.parse ...
0debug
Is Java Random return negative numbers? : I'd like to know that if I try to get a random integer using the following method, should it return negative value? int value = new Random().nextInt(bound);
0debug
def find_longest_conseq_subseq(arr, n): ans = 0 count = 0 arr.sort() v = [] v.append(arr[0]) for i in range(1, n): if (arr[i] != arr[i - 1]): v.append(arr[i]) for i in range(len(v)): if (i > 0 and v[i] == v[i - 1] + 1): count += 1 else: count = 1 ans = max(ans, count) ...
0debug
int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, BdrvRequestFlags flags) { int ret; trace_blk_co_preadv(blk, blk_bs(blk), offset, bytes, flags); ret = blk_check_byte_request(blk, ...
1threat
How to validate javascript and html code? : <p>In our application end users are provided with a textbox where they can paste their html or javascript code to create advertisement much like Google advertisement , so I need to validate these html and js source code against malicious code and also proper syntax . So are ...
0debug
Errors occuring on running : I am new to C programming in Linux. I wrote a program, in compiling, no errors are occurred. But on running it is giving too many errors. My program is, #include <stdio.h> typedef struct a{ char *name; int id; char *department; int num; } ab; ...
0debug
How to find every version of android support libraries source code : <p>I meets some problems so I want to find the source code of the Android support libraries . For example , I want to read the ActionBarActivity.java source code in version 19.0.1 and 20.0.0 in support.appcompat-v7 , and find out the difference betwee...
0debug
Read incoming sms at every time in Oreo : <p>I want to read all sms messages from specific number at any time not relating when app is runned or not runned. How can I read all messages when app is not runned, in newer versions of android?</p>
0debug
AttributeError: 'dict' object has no attribute 'cpe_mac' : I'm trying to print out all the cpe_mac fields of my API via python. I have # Last updated : BH | 8/31/2016 import requests import json ssc_ip = raw_input("What is your SSC Host (Ex. http://172.19.242.32:1234/ ) ? : ") ...
0debug
React Native 0.47.1: Hot reload is not reflecting code changes on MacOS : <p>I'm trying to get hot reload working with my React Native project. The packager shows the message <code>Bundling index.ios.js ... [hmr enabled]</code> and when I make a change, i see the <code>Hot reloading...</code> message flash on the devic...
0debug
unexpacted output from C-program : thanks for your help earlier.. here i am with a new problem facing the same output. scanf() not working. i am using MACROs in it and this time format is correct LOL.. please have a look and tell me what am i doing wrong here. i am trying to take two characters as input and test wh...
0debug
Using classes vs constructor functions in TypeScript : I am starting to write my first little app in TypeScript. Before, I did a lot of reading on the JavaScript classes and how *bad* and *fake* they are in JavaScript. That's why I decided to use good old constructor functions in my TS application, but after I wrote my...
0debug
CREATE PROCEDURE for INSERTING THE RECORDS, IF EXCEPTION, PROCEDURE NEEDS START FROM EXCEPTION LINE : I need to write the procedure for inserting the records in to multiple tables, for example I am HAVING here 3 table, CREATE TABLE SOURCE ( SORT_CODE NUMBER, FLAG CHAR(1) ); INSERT INTO SOURCE VALUES(605...
0debug
Clicked legend should show remaining all legend should hide automattically in highchart.js : I am having 10 legends in highchart,if i click first legend only clicked legend should show remaining all legend should hide automatically...
0debug
DropDownList - ASP.NET Problems : <p>Having trouble with a drop down list in my ASP site</p> <p>Ok, what am i trying to do? </p> <p>i want to select a item from my drop list and then fire some code, an example when i click Hek, it loads the correct information i'm after, when i click Dodixie after the page refreshes ...
0debug
Lock symbol in Android xml : I've been trying to put a [Lock Symbol][1] in the textview of an activity. However what I have used from this website did not seem to work. <TextView android:id="@+id/lockTextView" android:layout_width="wrap_content" android:layout_height="match_parent" ...
0debug
getting this error Binary operator '==' cannot be applied to operands of type 'Any' and 'Int' : for i in class_User.day{ if i == 1{ print(i) strdays += "1" } else if (i == "2"){ print(i) s...
0debug
docker-compose: difference between network and link : <p>I'm learning docker. I see those two terms make me confuse. For example here is a docker-compose that defined two services <code>redis</code> and <code>web-app</code>.</p> <pre><code>services: redis: container_name: redis image: redis:latest ports:...
0debug
What is better to certain values in a certain manner in C : <p>I want to know which is the suitable way to store some generated values values? the values will be computed like so:</p> <pre><code>0 0 N/4 2N/4 3N/4 0 N/4² .. .. .. .. (4²-1)N/4² . . . 0 N/4^p .. .. .. .. (4^p-1)N/4^p </cod...
0debug
How do I get Windows 10 Terminal to launch WSL? : <p>I'm using the new Windows Terminal, and trying to get it to launch my WSL terminal. This is the setting that I'm trying to use:</p> <pre><code> { "acrylicOpacity" : 0.75, "closeOnExit" : true, "colorScheme" : "Campbell", ...
0debug
how ı write a matrix ? it print random numbers : I'm trying write a code that matrix 3*3 but it doesn't work corretly.ıt print random numbers.what ı did wrong? int matrix[3][3]; int i,j; for(i=0;i<3;i++){ for(j=0;j<3;j++){ scanf("%d",&matrix[i][j]); } } for(i=0;i<3;i++){ ...
0debug
void cpu_reset(CPUSPARCState *env) { if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", env->cpu_index); log_cpu_state(env, 0); } tlb_flush(env, 1); env->cwp = 0; #ifndef TARGET_SPARC64 env->wim = 1; #endif env->regwptr = env->regbase + (env->c...
1threat
static void musb_async_cancel_device(MUSBState *s, USBDevice *dev) { int ep, dir; for (ep = 0; ep < 16; ep++) { for (dir = 0; dir < 2; dir++) { if (s->ep[ep].packey[dir].p.owner == NULL || s->ep[ep].packey[dir].p.owner->dev != dev) { continue; ...
1threat
DateTime.Parse changing date? : <p>This is my code snippet: </p> <pre><code> public bool getEffDate() { testfunction(DateTime.Today.ToString("u")); return true; } private bool testfunction(string modDate) { modDate = DateTime.Parse(modDate).ToString("yyyy-MM-dd"); r...
0debug
How do I create or add a user to rabbitmq? : <p>This seems like a question that should be easily be googleable. It is not though. Can anybody help?</p> <p>How do I create a new user for rabbitmq?</p>
0debug
static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused) { #if COMPILE_TEMPLATE_MMX __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: ...
1threat
Hi i am trying to solve this task of a javascript challenge : The task is to make a function that can take any non-negative integer as a argument and return it with its digits in descending order. Essentially, rearrange the digits to create the highest possible number. Examples: Input: 21445 Output: 54421 Input:...
0debug
Unique Login and SQLiteConstraintException in Android : I have the following code for inserting login information into a SQL Lite database. public boolean addLogin(Login login) { SQLiteDatabase Db = this.getWritableDatabase(); ContentValues values = new ContentValues(); va...
0debug
Why WebAssembly is so slow? : <p>I'm implementing a Mandelbrot Set visualization using Rust with WebAssmbly, where my goal is to make it using multi-threading.</p> <p>I've implemented the Mandelbrot Set both in Javascript (using Typescript) and in Rust single-threaded so far. I've made some benchmarks and the Rust imp...
0debug
how to fill array content using for loop in JavaScript : <p>I want to create and array and fill it's content using for loop. It's like </p> <h1>include </h1> <pre><code>Int main (){ Int array [6]; Int i; For(i=0;i &lt;6;i++){ Array [i]=i*3; Printf ("%d",array [i]); } Return 0; } ...
0debug
How to query a relationship on multiple polymorphic-inheritance tables? : <p>Let's say you have the following simplified example schema, which uses SQLAlchemy joined table polymorphic inheritance. <code>Engineer</code> and <code>Analyst</code> models have a <code>Role</code> relationship. The <code>Intern</code> model ...
0debug
static int virtio_blk_device_init(VirtIODevice *vdev) { DeviceState *qdev = DEVICE(vdev); VirtIOBlock *s = VIRTIO_BLK(vdev); VirtIOBlkConf *blk = &(s->blk); static int virtio_blk_id; if (!blk->conf.bs) { error_report("drive property not set"); return -1; } if (!bd...
1threat
static BusState *qbus_find_recursive(BusState *bus, const char *name, const BusInfo *info) { DeviceState *dev; BusState *child, *ret; int match = 1; if (name && (strcmp(bus->name, name) != 0)) { match = 0; } if (info && (bus->info != info))...
1threat
How to compare a string with a struct (which include strings too)? : <p>so im working on my project and i have problem.</p> <p>This is my struct:</p> <pre><code>struct adminst { string usernameadmin; int passwordadmin; </code></pre> <p>and its another function:</p> <pre><code>void adminlogin() { string username, pa...
0debug
C# Coding structure wrong, input (45 degrees) not outputting correct answer? : <p>I have some c# code (as below **) but I cannot seem to output the correct answer? The input is 45 (degrees) and the output should read 255.102 (meters), my answer is wrong as the output reads 413.2653. </p> <p>I must confess that I think...
0debug
static int64_t archipelago_volume_info(BDRVArchipelagoState *s) { uint64_t size; int ret, targetlen; struct xseg_request *req; struct xseg_reply_info *xinfo; AIORequestData *reqdata = g_malloc(sizeof(AIORequestData)); const char *volname = s->volname; targetlen = strlen(volname); ...
1threat
static void test_visitor_out_native_list_number(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_NUMBER); }
1threat
static void mmio_ide_cmd_write(void *opaque, target_phys_addr_t addr, uint64_t val, unsigned size) { MMIOState *s = opaque; ide_cmd_write(&s->bus, 0, val); }
1threat
How to get specific key values from an multi dimensional array in PHP : I currently have the following array: <pre> Array ( [2] => Array ( [id] => 2 [type] => 2 [name] => R-1 Agency [parent] => 1 [children] => Array ( ...
0debug
Copy one struct to another with some uncommon fileds? : I have two structs. type UserStruct struct{ UserID string `bson:"user_id" json:"user_id"` Address string `bson:"address" json:"address"` Email string `bson:"email" json:"email"` CreatedAt time.Time `bson:"created_at" json...
0debug
static inline void gen_op_eval_fbue(TCGv dst, TCGv src, unsigned int fcc_offset) { gen_mov_reg_FCC0(dst, src, fcc_offset); gen_mov_reg_FCC1(cpu_tmp0, src, fcc_offset); tcg_gen_xor_tl(dst, dst, cpu_tmp0); tcg_gen_xori_tl(dst, dst, 0x1); }
1threat