problem
stringlengths
26
131k
labels
class label
2 classes
Camera2 ImageReader freezes repeating capture request : <p>I'm trying to capture image data from the camera using the camera2 API. I've mostly used code taken from the android Capture2RAW example. Only a few images come through (i.e. calls to onImageAvailable) before stopping completely. I've tried capturing using the ...
0debug
alert('Hello ' + user_input);
1threat
int kvmppc_remove_spapr_tce(void *table, int fd, uint32_t window_size) { long len; if (fd < 0) { return -1; } len = (window_size / SPAPR_TCE_PAGE_SIZE)*sizeof(sPAPRTCE); if ((munmap(table, len) < 0) || (close(fd) < 0)) { fprintf(stderr, "KVM: Unexpected error rem...
1threat
static void v9fs_unlinkat(void *opaque) { int err = 0; V9fsString name; int32_t dfid, flags; size_t offset = 7; V9fsPath path; V9fsFidState *dfidp; V9fsPDU *pdu = opaque; pdu_unmarshal(pdu, offset, "dsd", &dfid, &name, &flags); dfidp = get_fid(pdu, dfid); if (dfidp...
1threat
selenium with C# on IE : <p>Switching multiple windows in IE. </p> <p>First page has LOGIN button which on clicked goes to second window. </p> <p>Second window takes credentials and has a NEXT button which on clicked goes to third window.</p> <p>Third window has a button which on clicking moves to the fourth ...
0debug
void cpu_loop(CPUM68KState *env) { CPUState *cs = CPU(m68k_env_get_cpu(env)); int trapnr; unsigned int n; target_siginfo_t info; TaskState *ts = cs->opaque; for(;;) { cpu_exec_start(cs); trapnr = cpu_m68k_exec(cs); cpu_exec_end(cs); switch(trapnr) { ...
1threat
static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix) { return qcow2_check_refcounts(bs, result, fix); }
1threat
How to find the sum of an array using recursion? : <p>need some help figuring out this assignment, I basically have to find the sum of an array using recursion, I can't use any loops and my function could only have 2 arguments which are the array and the array's size. Also this is my first time posting so forgive me fo...
0debug
int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_num, int nb_sectors, BdrvRequestFlags flags) { return bdrv_rw_co(bs, sector_num, NULL, nb_sectors, true, BDRV_REQ_ZERO_WRITE | flags); }
1threat
Sort Array of Objects Based on number of Keys it contains : <p>This is a sample code but it does not seem to sort the array. All I want is the array of object sorted in such a manner that the object with maximum keys comes first.</p> <pre><code>CSVData.sort(function(item1,item2){ return Obj...
0debug
static void RENAME(uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src, long width, long height, long lumStride, long chromStride, long srcStride) { long y; const long chromWidth= -((-width)>>1); fo...
1threat
SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter){ SwsContext *c; int i; SwsFilter dummyFilter= {NULL, NULL, NULL, NULL}; #ifdef ARCH_X86 if(gCpuCaps.hasMMX) asm volatile("emms\...
1threat
SQL server query help please, I am newbie : Can anyone help me with the correct query for this please? I need to know the total number of Jobs completed by each Employee as well as the total Rate if I only have the following information. *One job can be completed by 2 different Employees. For Example, Employee A...
0debug
static int swScale(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[]) { const int srcW = c->srcW; const int dstW = c->dstW; const int dstH ...
1threat
How to multiply two matrices in R? : <p>I hve two matrices . One of the matrix is 3x1 and another one is 3x3 matrix. How could I multiply them in R ?</p>
0debug
How to add custom font in react native android : <p>I am learning <code>react-native</code>, trying to create some demo apps just for learning. I want to set <code>fontFamily</code> to roboto thin of my toolbar title. </p> <p>I have added roboto thin ttf in <code>assets/fonts</code> folder of my android project, howev...
0debug
NullReferenceException on foreach loop when list is populated (not null) : <p>I was going to write up a question on this very peculiar issue I was having, but while writing the question found my own answer. So I figured I would go ahead and post this for the benefit of others and give my answer below.</p> <p>I have t...
0debug
Place an item at a fixed position in a scrolling div : <p>I have a page full of content and <code>window</code> is scrollable, in which there is scrollable <code>div</code> where my objective is to place an icon at the very bottom of the <code>div</code>, which will be visible when someone is scrolling the <code>div</c...
0debug
How can I capitalize the first letter of each sentence in C# using char? I'm very new to C#, so simplified responses would be appreciated : Sentence capitalization: private string SentenceCapitalizer(string input) { char delim = '.'; string letter1; string[] token...
0debug
image grid css responsive unorganized : any suggestions on how i can make a unorganized gallery grid Like This one . i have tagged the photo bellow. i am limited to 6 pictures and no more , mostly want to make it responsive for any display size device and my pictures are in standard horizontal format. [T...
0debug
C++ friend function can't access public function of the class : <p>This is an excerpt of an implementation of a Stack class in C++:<br> <strong>Stackdemo.hpp</strong></p> <pre><code>#include&lt;iostream&gt; using namespace std; template&lt;typename T&gt; class Stack { private: int top; T *arr; ...
0debug
how to use class name after getting class name from event.target in jaquery? : i've this code on html <div id="readMorediv_id"> <button class="readMorebtn_id">Read More</button> <div class="afterReadMore_Class" style="display: none !important;"> <div > <span><b>User CNIC:</b></span><span><?php $r...
0debug
def get_pell(n): if (n <= 2): return n a = 1 b = 2 for i in range(3, n+1): c = 2 * b + a a = b b = c return b
0debug
Java Program using Linked List : <p>I am making a program in which the program shows some options like insert Book, delete Book etc. The program asks us to enter certain details about a book by Insert method.</p> <p>I have made every method but I have no any idea of how to make a delete method. It's my assignment in c...
0debug
static void blk_mig_cleanup(void) { BlkMigDevState *bmds; BlkMigBlock *blk; bdrv_drain_all(); unset_dirty_tracking(); blk_mig_lock(); while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry); bdrv...
1threat
How to request user input (In-Line) Console Application C# : So getting and checking user input is easy and all, but when working with the C# Console Application how does one request input inline? <br>EG:<br> What is your name : (USER WRITES HERE) Also, since I am on the topic of Console Applications, how do...
0debug
static void lan9118_writel(void *opaque, hwaddr offset, uint64_t val, unsigned size) { lan9118_state *s = (lan9118_state *)opaque; offset &= 0xff; if (offset >= 0x20 && offset < 0x40) { tx_fifo_push(s, val); return; } switch (offs...
1threat
how can I split the image into 3 parts in the image processing project : [filename pathname]=uigetfile('*.png','Pick the image file'); file=strcat(pathname,filename); I=imread(file); figure,imshow(I); title('Input Image'); im1=I; su=median(im1); median=ceil(su); disp('mean Value');...
0debug
Logical Operator Creation Cause : Almost all programming languages are having the concept of logical operator I am having a query why logical operators were created.I googled and found its created for condition based operation, but that's a kind of usage i think. I am interested in the answer that what are the challen...
0debug
Compiler can't deduce the return type? : <p>I am trying to use the <code>decltype</code> keyword on an auto function:</p> <pre><code>struct Thing { static auto foo() { return 12; } using type_t = decltype(foo()); }; </code></pre> <p>And I get the following error (gcc 7.4):</p> <pre><code>&lt;sou...
0debug
C# How to extract specific column from 2D array using C# : I have an array and i want to extract specific column from it, let's say the 3rd column only. **Example:** > 1 2 3 4 > > 1 2 3 4 > > 1 2 3 4 > > 1 2 3 4 What is want is to extract 3rd column and display only: > 3 > > 3 ...
0debug
Printing current time, in different timez ones, in C : I'm trying to print in the console the current time in my local timezone (-0600), then printing the time at the +0100 timezone. Currently I'm using gmtime, and adding 1 to the tm_hour section. However when using strftime, it still prints the: "... +0000". How...
0debug
static inline void mix_dualmono_to_mono(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) output[1][i] += output[2][i]; memset(output[2], 0, sizeof(output[2])); }
1threat
Could not locate Gemfile or .bundle/ directory in Bash—bundle exec jekyll serve : I am working on getting my Jekyll blog configured, and when I ran `bundle exec jekyll serve`, I got the following error: Could not locate Gemfile or .bundle/ directory I cannot find the solution to this bug.
0debug
pp_context *pp_get_context(int width, int height, int cpuCaps){ PPContext *c= av_mallocz(sizeof(PPContext)); int stride= FFALIGN(width, 16); int qpStride= (width+15)/16 + 2; c->av_class = &av_codec_context_class; if(cpuCaps&PP_FORMAT){ c->hChromaSubSample= cpuCaps&0x3; c->vChromaS...
1threat
static void disas_xtensa_insn(CPUXtensaState *env, DisasContext *dc) { #define HAS_OPTION_BITS(opt) do { \ if (!option_bits_enabled(dc, opt)) { \ qemu_log("Option is not enabled %s:%d\n", \ __FILE__, __LINE__); \ goto invalid_opcode; \ } \ } while ...
1threat
static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { GetBitContext gb; HuffContext h[4]; VLC vlc[4]; int16_t *samples = data; int val; int i, res; int unp_size; int bits, stereo; int pred[2] = {0, 0}; unp_size ...
1threat
I need the image aligned to left ie, the bank white space in this https://codepen.io/soorajbala/pen/JLbOgq?editors=1100 : Please check link : I need the image aligned to left ie, to the bank white space [1]: https://codepen.io/soorajbala/pen/JLbOgq?editors=1100
0debug
how can i convert binary to string in c : <p>I want to create a function that converts a binary (int type) to string. for example : if i have this 01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100</p> <p>the function should return "Hello World".</p>
0debug
How generate list of string with Bogus library in C#? : <p>I use <a href="https://github.com/bchavez/Bogus" rel="noreferrer">Bogus</a> library for generate test data.</p> <p>for example I have a class :</p> <pre><code>public class Person { public int Id {get; set;} public List&lt;string&gt; Phones {get; set;} /...
0debug
Build versus Runtime Dependencies in Nix : <p>I am just starting to get to grips with Nix, so apologies if I missed the answer to my question in the docs.</p> <p>I want to use Nix to setup a secure production machine with the minimal set of libraries and executables. I don't want any compilers or other build tools pre...
0debug
Is it possible to fill List<Interface> with items from a normal string list in c# : <p>First time dealing with a problem like this and i was wondering if it was even possible before spending a lot of time trying. If it is, would someone please explain/show me how.</p> <p>Thank you in advance!</p>
0debug
Server Side Rendering Angular 2 in ASP.NET with Edge.js : <p>I'm exploring the possibility of rendering Angular 2 on the server side using Edge.js in an ASP.NET MVC application.</p> <p>I'm aware that the Angular Universal Starter Kit has part of this equation: <a href="https://github.com/alexpods/angular2-universal-st...
0debug
How do i convert a memory address 0x8134597 to "\x97\x45\x13\x08" : Hi I'm going through the PWK course where this springs up in the notes: 0x08134597 - > \x97\x45\x13\x08 what is the conversion between the two. The left being hex and the right being whatever that is.
0debug
Changing the image of a button in a different layout - Android Studio : So I'm a bit stumped on this. I have a button in an 'Upgrades' activity that will change the image of an imagebutton in my Main Activity. How would I go about doing this? I simply want the image of that button to change/update when the upgra...
0debug
How to open a PopupMenuButton? : <p>How do I open a popup menu from a second widget?</p> <pre><code>final button = new PopupMenuButton( itemBuilder: (_) =&gt; &lt;PopupMenuItem&lt;String&gt;&gt;[ new PopupMenuItem&lt;String&gt;( child: const Text('Doge'), value: 'Doge'), new Popup...
0debug
is there something wrong in this code written in java? : the actual answer is supposed to be "stack" and "overflow" in two separate lines for input "stack.overflow".delimiter used is ".". nothing is shown in the output Scanner p=new Scanner(System.in); p.useDelimiter("."); System.out.println("delimiter is "+ ...
0debug
when we use the pointer in C, what time do we need to use malloc?and why do we need to use malloc? : [enter image description here][1] why it's wrong when i define ans in this case [enter image description here][2] and when it will not wrong when i puls the malloc why? Thans in advance! [1]: https://i...
0debug
static void spapr_memory_unplug_request(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { sPAPRMachineState *spapr = SPAPR_MACHINE(hotplug_dev); Error *local_err = NULL; PCDIMMDevice *dimm = PC_DIMM(dev); PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLA...
1threat
static void asf_build_simple_index(AVFormatContext *s, int stream_index) { ff_asf_guid g; ASFContext *asf = s->priv_data; int64_t current_pos= avio_tell(s->pb); int i; avio_seek(s->pb, asf->data_object_offset + asf->data_object_size, SEEK_SET); ff_get_guid(s->pb, &g); whi...
1threat
QT,QML , Combobox's popup is opened transparent : I Have an combobox(Control 2.0). I write myown combobox like Rectangle { border.width: 1 border.color: "lightsteelblue" height:dp(40) width: parent.width ComboBox { id:tmCombo model:combotm.datalist ...
0debug
Different output on recursive call using static variable : <pre><code>int fun1(int x){ static int n; n = 0; if(x &gt; 0){ n++; return fun1(x-1)+n; } return 0; } int fun(int x){ static int n = 0; if(x &gt; 0){ n++; return fun(x-1)+n; } return 0; } </cod...
0debug
How to use GraphQL with Retrofit on Android? : <p>I'm new to GraphQL but I have been using Retrofit for a while now and its easy to use and fast. GraphQL is much different than rest apis in terms of how you pass data. There really are not too many tutorials out there on using GraphQL with Android, I was only able to fi...
0debug
document.write('<script src="evil.js"></script>');
1threat
C# Math.Tan error : <p>The following code produces result zero:</p> <pre><code>double x = 1/2 + Math.Tan(0) + 1/2; </code></pre> <p>Or any other code that involves Math.Tan and some other items in the expression. Compiler seems to just calculate the Tan value and ignore the rest of the expression. Why is that?</p>
0debug
ssize_t nbd_wr_syncv(QIOChannel *ioc, struct iovec *iov, size_t niov, size_t length, bool do_read, Error **errp) { ssize_t done = 0; struct iovec *local_iov = g_new(struct iovec, niov); struct i...
1threat
Module not found: Error: Can't resolve 'bundle.js' in '/Users/jonathankuhl/Documents/Programming/node js/sandbox/webpack-app' : <p>I am trying to go through a very basic tutorial about Webpack. I cannot get it to compile a very basic single line javascript application. I have installed and uninstalled it multiple tim...
0debug
PHP - Has anyway to encrypt/decrpyt hash in PHP? : <p>I'm interested to encrypt/decrpyt hash in PHP.</p> <p>But as I know hash can be encoding only with md5, sha1, sha256.</p> <p>However, is it possible to make encrypt/decrpyt in PHP by another hash like ripemd160, haval256,5 or ripemd256?</p> <p>Thank</p>
0debug
How to add documentation to enum associated values in Swift : <p>Is there a way to add descriptions to associated values of enums in Swift 3? I want them to show up in the symbol documentation popup (option+click), like they do for function parameters in Xcode 8.</p> <p>This is my enum:</p> <pre><code>enum Result { ...
0debug
Vagrant's Ubuntu 16.04 vagrantfile default password : <p>I'm attempting to deploy and run an Ubuntu 16.04 VM via Vagrant 1.9.1. The Vagrantfile I'm using is from Atlas:</p> <p><a href="https://atlas.hashicorp.com/ubuntu/boxes/xenial64/" rel="noreferrer">Ubuntu Xenial 16.04 Vagrantfile</a></p> <p>I'm using Debian Stre...
0debug
react button onClick redirect page : <p>I am working on web application using React and bootstrap. When it comes to applying button onClick, it takes me hard time to let my page being redirect to another. if after a href , I cannot go the another page. </p> <p>So would you please tell me is there any need for using ...
0debug
static int huff_build(VLC *vlc, uint8_t *len) { HuffEntry he[256]; uint32_t codes[256]; uint8_t bits[256]; uint8_t syms[256]; uint32_t code; int i; for (i = 0; i < 256; i++) { he[i].sym = 255 - i; he[i].len = len[i]; if (len[i] == 0) return A...
1threat
asp web api 2.x How to prevent access to Help Page Services : I'm using Help Page to "map" my asp.net web api services: Install-Package Microsoft.AspNet.WebApi.HelpPage How can I Prevent from Unauthorized users to access my all web services ? even using in Web.Config (inside Areas/HelpPage/Views) : ...
0debug
How do I parse an ISO 8601 Timestamp in GoLang? : <p>I know I need to use a time layout in GoLang (as shown here <a href="https://golang.org/src/time/format.go" rel="noreferrer">https://golang.org/src/time/format.go</a>) but I can't find the layout for an ISO 8601 timestamp. </p> <p>If it helps, I get the timestamp fr...
0debug
static int64_t coroutine_fn raw_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { off_t start, data = 0, hole = 0; int64_t total_size; int ret; ret = ...
1threat
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) { UnsharpContext *unsharp = ctx->priv; int lmsize_x = 5, cmsize_x = 0; int lmsize_y = 5, cmsize_y = 0; double lamount = 1.0f, camount = 0.0f; if (args) sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsiz...
1threat
from copy import deepcopy def colon_tuplex(tuplex,m,n): tuplex_colon = deepcopy(tuplex) tuplex_colon[m].append(n) return tuplex_colon
0debug
def find_max(test_list): res = max(int(j) for i in test_list for j in i) return (res)
0debug
yaml syntax error (Ansible playboook) : I'm new to ansible and yaml, so was just practicing to write a playbook that installs apache. but I get the below error : " The offending line appears to be: tasks: - name: command to install apache ^ here here is my yaml code : ---...
0debug
TraceEvent *trace_event_iter_next(TraceEventIter *iter) { while (iter->event < TRACE_EVENT_COUNT) { TraceEvent *ev = &(trace_events[iter->event]); iter->event++; if (!iter->pattern || pattern_glob(iter->pattern, trace_event_get_name(ev))) { ...
1threat
What is the difference between the two codes in C++? : <p>I was trying the problem Hash Tables: Ice Cream Parlor on Hackerrank. It is a simple question, but here is the bizzare situation i got to. How does the change of data structure matter? Case 1:</p> <pre><code>void whatFlavors(vector&lt;int&gt; cost, int money) {...
0debug
static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length) { GetBitContext gb; int i; init_get_bits(&gb, src, length * 8); for (i = 0; i < 3; i++) { if (read_len_table(s->len[i], &gb) < 0) return -1; if (ff_huffyuv_generate_bits_table(s->bits[i...
1threat
static int check_refcounts_l1(BlockDriverState *bs, BdrvCheckResult *res, uint16_t *refcount_table, int64_t refcount_table_size, int64_t l1_table_offset, int l1_size, ...
1threat
Show loading screen when navigating between routes in Angular 2 : <p>How do I show a loading screen when I change a route in Angular 2?</p>
0debug
Error: style attribute '@android:attr/windowExitAnimation' not found : <p>I recently upgraded to the gradle-3.0.0-alpha8 after which some styles are not resolved at compile time.<br> Develop envirment:</p> <ul> <li>IDE: Android studio 3.0 Bate3 </li> <li>Gradle build tools : 'com.android.tools.build:gradle:3.0.0-bet...
0debug
testing that a component method calls another method : <p>Given this simple component :</p> <pre><code>import { Component} from '@angular/core'; @Component({ selector: 'app-component' }) export class AppComponent { foo() { this.bar(); } bar() { console.log('hello'); } } </code></pre> <p>How come t...
0debug
static inline int gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb, int search_pc) { DisasContext ctx, *ctxp = &ctx; opc_handler_t **table, *handler; target_ulong pc_start; uint1...
1threat
static int transcode_init(OutputFile *output_files, int nb_output_files, InputFile *input_files, int nb_input_files) { int ret = 0, i, j; AVFormatContext *os; AVCodecContext *codec, *icodec; OutputStream *ost; Inp...
1threat
static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size) { RTSPState *rt = s->priv_data; int id, len, i, ret; RTSPStream *rtsp_st; #ifdef DEBUG_RTP_TCP dprintf(s, "tcp_read_packet:\n"); #endif redo: for(;;) { R...
1threat
static int usb_hid_handle_data(USBDevice *dev, USBPacket *p) { USBHIDState *s = (USBHIDState *)dev; int ret = 0; switch(p->pid) { case USB_TOKEN_IN: if (p->devep == 1) { int64_t curtime = qemu_get_clock_ns(vm_clock); if (!s->changed && (!s->idle || s->next_idle_...
1threat
static void secondary_do_checkpoint(BDRVReplicationState *s, Error **errp) { Error *local_err = NULL; int ret; if (!s->secondary_disk->bs->job) { error_setg(errp, "Backup job was cancelled unexpectedly"); backup_do_checkpoint(s->secondary_disk->bs->job, &local_err); if (local_err) { ...
1threat
How to compare two strings and find the percent of similarity? : <p>How to <strong>compare two strings</strong> and print the <em>percentage of similarity</em>. It is easy to find similarities between string but <em>displaying it in percentage is hard.</em> How to achieve it in <strong>Ruby</strong> ?</p>
0debug
void x86_cpudef_setup(void) { int i, j; static const char *model_with_versions[] = { "qemu32", "qemu64", "athlon" }; for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); ++i) { X86CPUDefinition *def = &builtin_x86_defs[i]; for (j = 0; j < ARRAY_SIZE(model_with_versions...
1threat
static int decode_packet(AVCodecContext *avctx, void *data, int *data_size, AVPacket* avpkt) { WmallDecodeCtx *s = avctx->priv_data; GetBitContext* gb = &s->pgb; const uint8_t* buf = avpkt->data; int buf_size = avpkt->size; int num_bits_prev_frame; int pac...
1threat
wieird beahaviour of String Pointers : code here #include <stdio.h> int main() { char*m ; m="srm"; printf("%d",*m); return 0; } the output is 115 can someone explain why it gives 115 as output
0debug
static int raw_decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; int linesize_align = 4; RawVideoContext *context = avctx->priv_data; AVFrame *...
1threat
What codes can I use in order to make music from parse I uploaded play shuffled for an app created by Xcode in swift language? : This is what I have so far... let query = PFQuery(className: "Genres") //Find objects in the background query.findObjectsInBackground...
0debug
Index out of bounds after I've already accessed that index less than 10 lines ago : <p>I'm creating a little text dungeon crawler and each floor of the dungeon is a 2d array of rooms. for some reason when you get to the third floor, after creating the array and making sure all rooms are set to null, when I'm setting up...
0debug
int coroutine_fn bdrv_co_preadv(BlockDriverState *bs, int64_t offset, unsigned int bytes, QEMUIOVector *qiov, BdrvRequestFlags flags) { BlockDriver *drv = bs->drv; BdrvTrackedRequest req; uint64_t align = bs->request_alignment; uint8_t *head_buf = NULL; uint8_t *tail_buf = NULL; ...
1threat
How to resolve java.lang.AssertionError when creating OkHttpClient in mockito? : <p>I'm trying to make some canned network respones. I have the json response for the actual request and I have Retrofit interfaces that serialize responses. I am beyond frustrated trying to set this up. What should I be doing here? It seem...
0debug
php how to check if date string in between dates : <p>I have date in string. i.e: 18/10/2018</p> <p>and also date in an object: $pnrProduct['Date'] . i.e 20/10/2018</p> <p>I would like to check if the second date is bigger then the first one (in this case it is bigger)</p> <p>how can i do that?</p>
0debug
void *qemu_ram_ptr_length(target_phys_addr_t addr, target_phys_addr_t *size) { if (xen_enabled()) { return xen_map_cache(addr, *size, 1); } else { RAMBlock *block; QLIST_FOREACH(block, &ram_list.blocks, next) { if (addr - block->offset < block->length) { ...
1threat
angularjs replace * for space : i'm triyng to replace * for a space. I got un loop of informations look like this : "FC Girondins de Bordeaux*null*null*OSC Lille" dans I would like to change the * for a simple space. I tried to split the informations but that didn't work. The loop of informations are stored in a locals...
0debug
SQL update using range in another table : I Have two table **T1** object Value Calculated_Name AA 10 BB 100 CC 150 **T2** R1 R2 Name 1 15 Z 16 130 w I Want UPDATE T1.Calculated_Name with T2.name like this...
0debug
Empty atom in Ecto changeset : <p>Why in an Ecto <code>changeset</code> method do you set the params to the default <code>:empty</code> atom? e.g.</p> <pre><code>def changeset(user, params \\ :empty) do ... </code></pre> <p>Does this allow you to call the changeset method with nil for params?</p>
0debug
syntax error near unexpected token error : <p>Below is my .vimrc file </p> <pre><code>set nocompatible set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'tomlion/vim-solidity' Plugin 'othreaa/yajs.vim' call vundle#end() filetype plugin indent on set autoindent set wrap set nob...
0debug
meaning of a struct within a struct in c : <p>Can someone explain what we mean when we do, like what does struct Node* next do. does it create a pointer of type struct? any help and resources about structures in c would be helpful</p> <pre><code>struct Node { int dest; struct Node* next; }; </code></pre>
0debug
Haskell couldn't match 't0 ->t' with actual type '[Integer]' : <p>I am learning Haskell and after grasping some of the basics I decided to solve some easy problems in HackerRank. But I soon found myself stuck.</p> <p>Problem 7 in Functional Problems is called "Array of N elements"</p> <p>We are supposed to return any...
0debug
a href can't return through ajax, echo whole code : Just a simple problem, I have used ajax to alert data which is echoed in php page. It is working fine except href link. a href link can't return, it returns whole code. For example, this is ajax code. **form.html** $("#ceb").submit(function(event){ ev...
0debug
how connect 2 sql server table with a query and use data dynamically : i have two table in sql server one is member table and other one is friend table 1- in member table we have information of members, like username password etc 2-in friend table, we have userID and FriendID , so we can know each user how many frie...
0debug