problem
stringlengths
26
131k
labels
class label
2 classes
static int win_chr_pipe_init(CharDriverState *chr, const char *filename, Error **errp) { WinCharState *s = chr->opaque; OVERLAPPED ov; int ret; DWORD size; char openname[CHR_MAX_FILENAME_SIZE]; s->fpipe = TRUE; s->hsend = CreateEvent(NULL, TRUE, FALS...
1threat
PHP add target="_blank : <p>I hope everyone doing great, I need help how I can add target blank to a specific code </p> <p>this is the code:</p> <pre><code>if( !empty($social_fb) ){ $result .= '&lt;a href="'.esc_attr($social_fb).'"&gt;&lt;i class="fa fa-facebook"&gt;&lt;/i&gt;&lt;/a&gt;'; } </code></pre> ...
0debug
Bulk replace string in linux terminal : <p>I have bunch of wordpress in my server, i need to change each of wordpress database host in wp-config.php file, how i do it using terminal?</p> <p>current value</p> <pre><code>define( 'DB_HOST', '127.0.0.1' ); </code></pre> <p>need to change to</p> <pre><code>define( 'DB_H...
0debug
What options do I have for testing an Angular 2 application with Team City? : <p>Over the next two years we will be building a large Angular 2 application. Part of the test suite will be User Interface Tests. The Unit Tests and Integration tests will be written in C# with NUnit or MSTest. The client has chosen Selen...
0debug
Pod in pending state due to Insufficient CPU : <p>On my GCE Kubernetes cluster I can no longer create pods.</p> <pre><code>Warning FailedScheduling pod (www.caveconditions.com-f1be467e31c7b00bc983fbe5efdbb8eb-438ef) failed to fit in any node fit failure on node (gke-prod-cluster-default-pool-b39c7f0c-c0ug): Insuffi...
0debug
Ultimate java bad word filter : How can I create the best bad word chat filter? Like let users not type Poop and send them message :"That message is bad!" and WHen they say pooopppp still filter it. or P00p, Po0p, P0o0o0op, (or whatever trick they try to use) etc.
0debug
remove max and min duplicate of a list of number : > Hi i would i like to remove ONLY max and min duplicate of a list of > numbers. example: (**1 1 1** 4 4 5 6 **8 8 8**) result (**1** 4 4 5 6 > **8**) how to combine max() min() function with list(set(x))?? or is there any other way? Please do enlighte...
0debug
Laravel: how to create a function After or Before save|update : <p>I need to generate a function to call after or before save() or update() but i don't know how to do. I think I need a callback from save() update() but I don't know how to do. Thanks</p>
0debug
why my js cannot be linked to html? : <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; var instock=true; var shipp...
0debug
Add entity with InheritanceType.JOINED to native query : <p>I am struggling to get native queries to work with <code>InheritanceType.JOINED</code>. From the Hibernate <a href="https://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch13.html#d5e3844">documentation</a> I have found:</p> <blockquote> <h1>13.1.6. ...
0debug
static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id) { int i; int cur = 0; int skip = 0; int len, toks; TM2Codes codes; len = AV_RB32(buf); buf += 4; cur += 4; skip = len * 4 + 4; if(len == 0) return 4; toks = AV_RB32(buf); buf ...
1threat
Passing array into URLSearchParams while consuming http call for get request : <p>Going through the Angular documentation for <a href="https://angular.io/docs/ts/latest/api/http/index/URLSearchParams-class.html">URLSearchParams</a>, I dint find any documentation on passing array as an parameter.</p> <p>Can anybody hel...
0debug
static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr) { VP8Context *s = avctx->priv_data; VP8ThreadData *td = &s->thread_data[threadnr]; int mb_x, mb_y = td->thread_mb_pos >> 16, num_jobs = s->num_jobs; AVFrame *curframe = s->curfr...
1threat
static bool vregs_needed(void *opaque) { #ifdef CONFIG_KVM if (kvm_enabled()) { return kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS); } #endif return 0; }
1threat
static void dec_bcc(DisasContext *dc) { unsigned int cc; unsigned int dslot; cc = EXTRACT_FIELD(dc->ir, 21, 23); dslot = dc->ir & (1 << 25); LOG_DIS("bcc%s r%d %x\n", dslot ? "d" : "", dc->ra, dc->imm); dc->delayed_branch = 1; if (dslot) { dc->delayed_branch = 2; ...
1threat
Querying a MYSQL database with a GET variable : <p>I would like to query my database with the contents of my Get variable, then retrieve the matching url and put the matching url into a variable, what's the best and safest way of doing this? </p>
0debug
Please help ..on basic sql query. .. : I have three tables .. Student I'd. Name 1 vesd 2. Eet Subject table I'd name 1. Science 2 maths Marks Stud_id. Sub_id. Marks 1. 1. 20 1. 2. 30 2. 1. 40 2. ...
0debug
static void gen_tlbli_6xx(DisasContext *ctx) { #if defined(CONFIG_USER_ONLY) gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); #else if (unlikely(ctx->pr)) { gen_inval_exception(ctx, POWERPC_EXCP_PRIV_OPC); return; } gen_helper_6xx_tlbi(cpu_env, cpu_gpr[rB(ctx->opcode)]); #endif...
1threat
Why we need to use Redux? : <p>Sorry for this question, but I really don't understand why I have to use <code>redux</code> for <code>react</code> if I can make the same with core <code>react</code> features. I can make <code>this.setState({})</code> and pass this state value between components, and the application will...
0debug
How to call a view from a view model using MVVM pattern : I have two view models A and B. On a double click on view A I need to display view B. How can I call a view B from a view Model A using the `MVVM` pattern. I have looked around and I couldn't find a clear example that demonstrate this fundamental concept for ...
0debug
static inline void mix_3f_2r_to_stereo(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) { output[1][i] += (output[2][i] + output[4][i]); output[2][i] += (output[3][i] + output[5][i]); } memset(output[3], 0, size...
1threat
count elements with specific data using ES6 concatenation : <p>trying to use <code>ecmascript 6</code> variable concatenation.</p> <p>Expecting <code>exists</code> in console but getting error. Please help: </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div c...
0debug
boostrap div margin top : **Boostrap** <div class="mb-md-3 ml-md-3 col-lg-8" > <!-- <div class="mb-md-3 ml-md-3 col-lg-8" > --> <a href="<?php echo base_url();?>admin/admin/add_hospital"> <button class="btn btn-success" onclick="add_hospital()"...
0debug
Can't ping server, but server can ping client : <p>I have a Windows Server 2012 R2 Standard using a D-Link router. I want to Configure it using Static IP Addresses.</p> <p>on the Internet Protocol Version 4, I set these variables:</p> <pre><code>IP address -----&gt; IPv4 address from doing ipconfig Subnet mask -----...
0debug
How to install sshpass on Windows through Cygwin? : <p>In the packages window of CygWin, when I type sshpass, nothing comes up. I tried installing similar packages like openssh etc hoping one of them contains sshpass but no luck.</p>
0debug
IOS - adding images takes long time (core data) : How can I make the way I add images to the core data more efficient? It's taking 30 seconds to complete with this code. for(int i = 0; i<photonum; i++){ //Fetch all the missing user ids NSString *str = [NSString stringWithFormat:@"http://%@/%@%@"...
0debug
How does a vector as a key works internally in C++? : <p>This SO answers says that <a href="https://stackoverflow.com/questions/8903737/stl-map-with-a-vector-for-the-key">STL Map with a Vector for the Key</a> the vector can be used as a key. So when we use a vector as a key. How does that actually work since the key ne...
0debug
How do i take the table from this website into a dataframe? : <p>I have this link from forbes.. <a href="http://www.forbes.com/global2000/list/" rel="nofollow noreferrer">http://www.forbes.com/global2000/list/</a> . I need to take the top 2000 companies table into a dataframe for analysis. How do i do that?</p>
0debug
static void armv7m_bitband_init(void) { DeviceState *dev; dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_set_uint32(dev, "base", 0x20000000); qdev_init(dev); sysbus_mmio_map(sysbus_from_qdev(dev), 0, 0x22000000); dev = qdev_create(NULL, "ARM,bitband-memory"); qdev_prop_...
1threat
ngx-translate .instant returns key instead of value : <p>I am trying to make a method which would accept string key and return translated string value by using translate.instant(parameter). The problem is that it returns key(parameter). Usually this is returned if it doesn't find translation. I think the problem is tha...
0debug
How do I run a specific Behat scenario : <p>I'm trying to run a specific Behat scenario from the command line, here's what I'm doing:</p> <pre><code>$ bin/behat features/features/baseline.feature:3 </code></pre> <p>However this isn't picking up the scenario.</p> <p>If I run</p> <pre><code>bin/behat features/feature...
0debug
List 'target' of 'links' (powershell) : I need to get the 'target' inside of a shortcut. But... when i use -Recurse, it follows the links, instead of simply just getting the shortcut target Here is code that I found online that I edited to serve my purpose ... but it recurses into the links: #Created By Scot...
0debug
How to Calculating Scientific Method Using PHP : <p>I'm New in PHP I just ask simply question.I have calculating number without any formula. this is working fine.Now I have using formula in calculation.Check my example..</p> <pre><code>&lt;?php $calculation = (350/ (1+(18/100)) ; ?&gt; </code></pre> <p>i have getti...
0debug
How to reduce size of an apk file? : <p>First of all, don't suggest me <a href="https://developer.android.com/topic/performance/reduce-apk-size.html" rel="noreferrer">official documentation</a> or <a href="https://stackoverflow.com/questions/40036945/android-studio-2-2-compress-all-so-files-in-built-apk">this</a>. When...
0debug
Spark SQL - How to write DataFrame to text file? : <p>I am using <code>Spark SQL</code> for reading parquet and writing parquet file.</p> <p>But some cases,i need to write the <code>DataFrame</code> as text file instead of Json or Parquet.</p> <p>Is there any default methods supported or i have to convert that DataFr...
0debug
static void gen_adc(TCGv t0, TCGv t1) { TCGv tmp; tcg_gen_add_i32(t0, t0, t1); tmp = load_cpu_field(CF); tcg_gen_add_i32(t0, t0, tmp); dead_tmp(tmp); }
1threat
static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; ShowSpectrumContext *s = ctx->priv; AVFrame *outpicref = s->outpicref; int ret, plane, x, y, z = s->orientation == VERTICAL ? s->h : s->w; ...
1threat
List of Numbers which the Program Determines to be Prime or Not (Python) : I'm someone who is relatively new to Python (I just started maybe two, three weeks ago) and I'm trying to learn the computer language through SoloLearn. I've been looking for beginner projects online to help me reinforce what I've learned, and I...
0debug
Android EditText with different floating label and placeholder : <p>How can i create an editText that looks like this?</p> <p><a href="https://i.stack.imgur.com/jB2pV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jB2pV.png" alt="Edit Text with placeholder and label"></a></p>
0debug
static int bmdma_prepare_buf(IDEDMA *dma, int is_write) { BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); IDEState *s = bmdma_active_if(bm); struct { uint32_t addr; uint32_t size; } prd; int l, len; qemu_sglist_init(&s->sg, s->nsector / (BMDMA_PAGE_SIZE / 512) + 1); ...
1threat
Android how to store all ArrayList<ArrayList<String>> values into ArrayList<String> : stylistIDArray=differentGenderServicesAdapter.getSelectedStylistIdArray(); durationArray=differentGenderServicesAdapter.getSelectedDurArray(); ArrayList<String>styl...
0debug
UIView appereance from bottom to top and vice versa(Core Animation) : <p>My goal is to understand and implement feature via Core Animation.<br> I think it's not so hard,but unfortunately i don't know swift/Obj C and it's hard to understand native examples. </p> <hr> <h2>Visual implementation</h2> <p>So what exactly...
0debug
import math def otherside_rightangle(w,h): s=math.sqrt((w*w)+(h*h)) return s
0debug
static void update_initial_durations(AVFormatContext *s, AVStream *st, int stream_index, int duration) { AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue; int64_t cur_dts = RELATIVE_TS_BASE; if (st->first_d...
1threat
static int kvm_has_msr_star(CPUState *env) { kvm_supported_msrs(env); return has_msr_star; }
1threat
Open interface with image buttons Python : Ok what I'm trying to do is to make a simple interface, a window in which there are some squares containing an image that executes a code when clicking it. The images are contained in a folder. As soon as an user clicks on the image the interface should close and execute a cod...
0debug
Ios objective c progress bar update in background : Ive ran various types of code to try and make a progress bar increment for x seconds and continue to do so even when in background. Currently the bar just resumes from where it left off via the timer when going from background to focus. How can I continue the time...
0debug
Python: ValueError: The truth value of a Series is ambiguous. : I'm not sure why I keep getting this error. I've check the path for student and grade and they print out fine. I'm trying to drop any values of current students who have grades listed as fail. Any suggestions on how to improve this code? df.dro...
0debug
Webpacker configuration file not found - Rails 6.0.0 : <p>I was trying to run "rails s" to run my server then I suddenly run into an error that says webpacker configuration not found. </p> <p>Here's the info:</p> <pre><code>boot@noki-K54C:~/Desktop/app$ rails s =&amp;gt; Booting Puma =&amp;gt; Rails 6.0.0 application...
0debug
static char *shorts2str(int16_t *sp, int count, const char *sep) { int i; char *ap, *ap0; if (!sep) sep = ", "; ap = av_malloc((5 + strlen(sep)) * count); if (!ap) return NULL; ap0 = ap; ap[0] = '\0'; for (i = 0; i < count; i++) { int l = snprintf(ap, 5 + str...
1threat
JavaFX Click through overlaying stackpane : <p><img src="https://i.imgur.com/TMlKICc.png" alt="schematic"></p> <p>As you can see in the drawing above, I have a stackpane containing two elements, a BorderPane (which again contains a canvas and a statusbar) and another stackpane (which contains some other UI things).</p...
0debug
static int write_extradata(FFV1Context *f) { RangeCoder *const c = &f->c; uint8_t state[CONTEXT_SIZE]; int i, j, k; uint8_t state2[32][CONTEXT_SIZE]; unsigned v; memset(state2, 128, sizeof(state2)); memset(state, 128, sizeof(state)); f->avctx->extradata_size = 10000 + 4 + ...
1threat
How to upload an image in php mysql : <p>Hi iam trying to upload an image into database but it is inserting the tmp_name in the database.Can anyone help me this .</p> <p>Here is my code</p> <pre><code>&lt;?php $connection = mysql_connect("localhost", "root", "") or die(mysql_error()); $db = mysql_select_db("accountan...
0debug
Android - How to create a Notification with Action : <p>I'm creating a notification like this. </p> <pre><code>Notification.Builder builder = new Notification.Builder(context); builder.setContentTitle(notifyMessage1) .setContentText(notifyMessage2) .setSmallIcon(R.mipmap.ic_laun...
0debug
Getting an error on Android 8 on a Samsung device using SCameraCaptureSession : <p>I'm trying to capture a video using SCameraCaptureSession class. While using a function of this class - setRepeatingRequest (which described <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCaptureSession.h...
0debug
Python, parallelization with joblib: Delayed with multiple arguments : <p>I am using something similar to the following to parallelize a for loop over two matrices</p> <pre><code>from joblib import Parallel, delayed import numpy def processInput(i,j): for k in range(len(i)): i[k] = 1 for t in range(le...
0debug
static int sd_create(const char *filename, QEMUOptionParameter *options, Error **errp) { int ret = 0; uint32_t vid = 0; char *backing_file = NULL; BDRVSheepdogState *s; char tag[SD_MAX_VDI_TAG_LEN]; uint32_t snapid; bool prealloc = false; Error *local_err =...
1threat
How to show all DB result in PDO-form? : So, I just started with PDO and the connection and stuff work great, but now I have a little problem. I'm stuck on a part where I want to show 6 results per table. My code is as following: <?php $sql = "SEL...
0debug
static int dct_quantize_refine(MpegEncContext *s, DCTELEM *block, int16_t *weight, DCTELEM *orig, int n, int qscale){ int16_t rem[64]; DCTELEM d1[64]; const int *qmat; const uint8_t *scantable= s->intra_scantable.scantable; const uint8_t *perm_...
1threat
[VB6]No experience with it but I need it : Private Sub cmdtiehack_Click() Dim hwnd hwnd = FindWindow(vbNullString, "Window name") If hwnd = 0 Then MsgBox "Program is not open" Else Dim Retval As Long Retval = ShellExecute(Me.hw...
0debug
static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset, int width, int be) { target_phys_addr_t boff; uint32_t ret; uint8_t *p; DPRINTF("%s: offset " TARGET_FMT_plx "\n", __func__, offset); ret = -1; if (pfl->rom_mode) { if...
1threat
Error in R: Having output to be equal to zero : <p>I'm having some issue concerning the following code. I should get the value of v1 = ( 106.56, 247.97, 417.00, 505.70) but i'm getting it to be ( 106.56, 247.97, 417.00, 0). I can't figure out what the problem is. Can someone please help me out? Thank you in advance. <...
0debug
Unable to ssh localhost within a running Docker container : <p>I'm building a Docker image for an application which requires to ssh into localhost (i.e ssh user@localhost)</p> <p>I'm working on a Ubuntu desktop machine and started with a basic ubuntu:16.04 container. Following is the content of my Dockerfile:</p> <pr...
0debug
static int svq3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data; int m, mb_type; unsigned char *extradata; unsig...
1threat
extra column appears at last while hovering mouse : I have created a table with two columns in html using css. While hovering mouse outside the table an extra column appears at the right side. I don't want that extra unwanted column in my table. Please suggest what more changes do I need to make here. In the end, I nee...
0debug
static ssize_t proxy_pwritev(FsContext *ctx, V9fsFidOpenState *fs, const struct iovec *iov, int iovcnt, off_t offset) { ssize_t ret; #ifdef CONFIG_PREADV ret = pwritev(fs->fd, iov, iovcnt, offset); #else ret = lseek(fs->fd, offset, SEEK_SET...
1threat
pg_restore error: role XXX does not exist : <p>Trying to replicate a database from one system to another. The versions involved are 9.5.0 (source) and 9.5.2 (target). </p> <p>Source db name is <code>foodb</code> with owner <code>pgdba</code> and target db name will be named <code>foodb_dev</code> with owner <code>pgde...
0debug
Solutions to fair distribution programming problems : <p>I have run into a wall since I attended a coding contest. I think this problem falls into the category of fair distribution, but I am not sure. I am attaching the problem <a href="http://pastebin.com/xd3eywKj" rel="nofollow noreferrer">here</a>.</p> <p>I have co...
0debug
polymorphic functions in Haskell : <p>Have a parametrically polymorphic function <code>foo :: a -&gt; a -&gt; a</code>. Give four of the argument so that the resulting expression <code>foo arg1 arg2 arg3 arg4</code> would have type <code>Bool</code>.</p> <pre><code>-- foo :: a -&gt; a -&gt; a function is defined in a ...
0debug
How to pass parameter to PythonOperator in Airflow : <p>I just started using <strong>Airflow</strong>, can anyone enlighten me how to pass a parameter into <strong>PythonOperator</strong> like below:</p> <pre><code>t5_send_notification = PythonOperator( task_id='t5_send_notification', provide_context=True, ...
0debug
Return last item of strings.Split() slice in Golang : <p>I am <a href="https://golang.org/pkg/strings/#Split" rel="noreferrer">splitting</a> file names in Go to get at the file extension (e.g. <code>import ("strings") ; strings.Split("example.txt", ".")</code>). For this reason, I would like to return the last item in...
0debug
static struct pathelem *new_entry(const char *root, struct pathelem *parent, const char *name) { struct pathelem *new = malloc(sizeof(*new)); new->name = strdup(name); new->pathname = g_strdup_printf("%s/%s", root, name); new->nu...
1threat
How do I append an HTTP header in this format in PHP (cURL)? : <p>I am trying to make a GET request in PHP using cURL and here is what the documentation says about my header:</p> <blockquote> <p>Append an HTTP header called zuluapi using the created signature.</p> <p><code>zuluapi &lt;publicKey&gt;:&lt;base 64 ...
0debug
This code compiles using ecj but not javac. Is this a bug in ecj, javac or neither? : <p>The following code creates a <code>Collector</code> that produces an <code>UnmodifiableSortedSet</code>:</p> <pre><code>package com.stackoverflow; import java.util.Collections; import java.util.SortedSet; import java.util.TreeSet...
0debug
static int usb_msd_initfn(USBDevice *dev) { MSDState *s = DO_UPCAST(MSDState, dev, dev); if (!s->conf.dinfo || !s->conf.dinfo->bdrv) { error_report("usb-msd: drive property not set"); s->dev.speed = USB_SPEED_FULL; scsi_bus_new(&s->bus, &s->dev.qdev, 0, 1, usb_msd_command_complete); ...
1threat
static void xen_ram_init(ram_addr_t ram_size) { RAMBlock *new_block; ram_addr_t below_4g_mem_size, above_4g_mem_size = 0; new_block = qemu_mallocz(sizeof (*new_block)); pstrcpy(new_block->idstr, sizeof (new_block->idstr), "xen.ram"); new_block->host = NULL; new_block->offset = 0; n...
1threat
install mssql server 2012 on ubuntu : how can i install mssql server 2012 on ubuntu?
0debug
static int usb_net_handle_dataout(USBNetState *s, USBPacket *p) { int ret = p->len; int sz = sizeof(s->out_buf) - s->out_ptr; struct rndis_packet_msg_type *msg = (struct rndis_packet_msg_type *) s->out_buf; uint32_t len; #ifdef TRAFFIC_DEBUG fprintf(stderr, "usbnet: data out le...
1threat
static int xen_host_pci_config_open(XenHostPCIDevice *d) { char path[PATH_MAX]; int rc; rc = xen_host_pci_sysfs_path(d, "config", path, sizeof (path)); if (rc) { return rc; } d->config_fd = open(path, O_RDWR); if (d->config_fd < 0) { return -errno; } ret...
1threat
How do I get a list of files with specific file extension using node.js? : <p>The node <a href="https://www.npmjs.com/package/node-fs" rel="noreferrer">fs</a> package has the following methods to list a directory:</p> <blockquote> <p><strong>fs.readdir(path, [callback])</strong> Asynchronous readdir(3). Reads the ...
0debug
static void isabus_bridge_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); dc->fw_name = "isa"; }
1threat
static void l2tpv3_update_fd_handler(NetL2TPV3State *s) { qemu_set_fd_handler2(s->fd, s->read_poll ? l2tpv3_can_send : NULL, s->read_poll ? net_l2tpv3_send : NULL, s->write_poll ? l2tpv3_writable : NULL, s)...
1threat
I get a TypeError: Cannot read property 'val' of undefined when i try to send notification with Frebase : So here us my error; TypeError: Cannot read property 'val' of undefined at exports.sendNotification.functions.database.ref.onWrite (/user_code/index.js:14:19) at Object.<anonymous> (/user_code/node_mod...
0debug
RSpec partial match against a nested hash : <p>I've got a JSON structure that I'd like to match a single nested element in, while ignoring other data. The JSON looks like this (minimally):</p> <pre><code>{ "employee": { "id": 1, "jobs_count": 0 }, "messages": [ "something" ] } </code></pre> <p>Here's wh...
0debug
How to work out the median C# : <p>So I'm struggling to get this piece to output a median value with 4 values. The output produces a value one above the actual middle value and I cannot seem to get it to output a decimal even when I change 2 to 2.0. I can get it to output a value with 3 numbers just haven't achieved it...
0debug
static int mmu40x_get_physical_address (CPUState *env, mmu_ctx_t *ctx, target_ulong address, int rw, int access_type) { ppcemb_tlb_t *tlb; target_phys_addr_t raddr; int i, ret, zsel, zpr, pr; ret = -1; raddr = (target_phys_addr_t)-1ULL; pr = msr_pr; ...
1threat
How to add an edit text on a button : <p>I was wondering how to have the user be able to edit the text on a button in Android programming? I tried to put the edit text on top of the button but it is not working. How should I do this?</p>
0debug
static void aio_signal_handler(int signum) { if (posix_aio_state) { char byte = 0; write(posix_aio_state->wfd, &byte, sizeof(byte)); } qemu_service_io(); }
1threat
Is there a way to default to "Replace in all cells" in the "Find and Replace" in jupyter? : <p>I usually want to find and replace all, but it looks like it has been set to current/highlighted cell only (<a href="https://github.com/jupyter/notebook/pull/2131" rel="noreferrer">https://github.com/jupyter/notebook/pull/213...
0debug
def _sum(arr): sum=0 for i in arr: sum = sum + i return(sum)
0debug
static int libquvi_close(AVFormatContext *s) { LibQuviContext *qc = s->priv_data; if (qc->fmtctx) avformat_close_input(&qc->fmtctx); return 0; }
1threat
Can i write two foreach in only one? [PHP] : In my code i've this: $im = $database->query("SELECT * FROM cms_messaggi_importanti WHERE messo_da = :id ORDER BY ID DESC", array("id"=>$functions->Utente("id"))); foreach($im as $imp){ $mex_i = $database->query("SELECT * FR...
0debug
PHP syntax eroor : <p>Parse error: syntax error, unexpected '$user' (T_VARIABLE) in C:\xampp\htdocs\home\login.php on line 4</p> <pre><code> &lt;?php $host = "localhost" $user = "root"; &lt;------ line 4 $pass = ""; $db = "table"; mysql_connect($host, $user, $pass); mysql_select_db($db); if (isset($_POST['use...
0debug
Android Stud, Create new project : Guys. I don't know if I changed something without realizing it but I keep getting a different window when I try to create a new project. Do I need to reset Android Stud, if so how do I do that, or is there any way for me to fix this or at least how to get around it..? [enter ...
0debug
make validate useranme without Regex, must be alphanumeric : function isUser(username) { var numaric = username; for(var j=0; j<numaric.length; j++) { var alphaa = numaric.charAt(j); var hh = alphaa.charCodeAt(0); if((hh > 96 && hh<123) || (hh > 64 && hh<91) ==false){ //A-Z - a...
0debug
static void virtio_blk_device_unrealize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOBlock *s = VIRTIO_BLK(dev); remove_migration_state_change_notifier(&s->migration_state_notifier); virtio_blk_data_plane_destroy(s->dataplane); s->dataplane = NULL; qe...
1threat
Get Images From File In Android Directory As Integers : Am storing some images in `List` Initialized by `Integer`. I want to add images from the user directory in the same manner but I have trouble converting the files to `int`. List<Integer> ids = new ArrayList<>(); ids.add(R.drawable.pic1); ids.add(f...
0debug
static void omap_pwl_init(target_phys_addr_t base, struct omap_mpu_state_s *s, omap_clk clk) { int iomemtype; s->pwl.base = base; omap_pwl_reset(s); iomemtype = cpu_register_io_memory(0, omap_pwl_readfn, omap_pwl_writefn, s); cpu_register_physical_memo...
1threat
Create Cookie ASP.NET & MVC : <p>I have a quite simple problem - I want to create a cookie at a Client, that is created by the server. I've found a lot of <a href="http://www.codeproject.com/Articles/244904/Cookies-in-ASP-NET" rel="noreferrer">pages</a> that describe, how to use it - but I always stuck at the same poi...
0debug
Why does GNU Diff not understand Unicode (only UTF-8)? : Why does GNU Diff not understand Unicode (only UTF-8)? This GNU Diff is used by default in Git. Why this bug does not fix? BOM is part of the Unicode standard. http://www.unicode.org/faq/utf_bom.html#bom4 Why is BOM ignored by most programmers? In ...
0debug