problem
stringlengths
26
131k
labels
class label
2 classes
Windows 10: A required device isn't connected or can't be accessed. 0xc000000e : <p>Installed windows 10 on a new SSD but I apparently made the mistake of doing this while the original windows 10 HDD was still connected. Apparently the windows 10 installer edits the EFI of the original drive, which is definitely not wanted. Anyway, this causes the original windows 10 installation, on the original drive, to fail to boot because the EFI now points to a drive that doesn't exist. How can the EFI on the original drive be updated to correct this?</p>
0debug
How to create web app using Python : <p>I am just starting to learn Python.</p> <p>In the past I have embedded PHP in HTML to create web apps to: - Read user supplied input values, - Write the input values to a file, - Call a Fortran executable with command line arguments for the input and output file names, - Read and display on another tab page the output file created by the Fortran executable.</p> <p>I use VS.Php in VS 2013. When debugging, VS.Php starts a local web server to display my web page and allows me to step through the PHP code.</p> <p>I would like to have a road map telling me how I can achieve the same results using Python in VS to accomplish the same results. I have Python Tools installed in VS, and am using it to run through Python tutorial examples.</p> <p>The calculations I am doing are not extensive, so the Fortran code could easily be replaced with Python code.</p>
0debug
FWCfgState *pc_memory_init(MachineState *machine, MemoryRegion *system_memory, ram_addr_t below_4g_mem_size, ram_addr_t above_4g_mem_size, MemoryRegion *rom_memory, MemoryRegion **ram_memory, PcGuestInfo *guest_info) { int linux_boot, i; MemoryRegion *ram, *option_rom_mr; MemoryRegion *ram_below_4g, *ram_above_4g; FWCfgState *fw_cfg; PCMachineState *pcms = PC_MACHINE(machine); assert(machine->ram_size == below_4g_mem_size + above_4g_mem_size); linux_boot = (machine->kernel_filename != NULL); ram = g_malloc(sizeof(*ram)); memory_region_allocate_system_memory(ram, NULL, "pc.ram", machine->ram_size); *ram_memory = ram; ram_below_4g = g_malloc(sizeof(*ram_below_4g)); memory_region_init_alias(ram_below_4g, NULL, "ram-below-4g", ram, 0, below_4g_mem_size); memory_region_add_subregion(system_memory, 0, ram_below_4g); e820_add_entry(0, below_4g_mem_size, E820_RAM); if (above_4g_mem_size > 0) { ram_above_4g = g_malloc(sizeof(*ram_above_4g)); memory_region_init_alias(ram_above_4g, NULL, "ram-above-4g", ram, below_4g_mem_size, above_4g_mem_size); memory_region_add_subregion(system_memory, 0x100000000ULL, ram_above_4g); e820_add_entry(0x100000000ULL, above_4g_mem_size, E820_RAM); if (!guest_info->has_reserved_memory && (machine->ram_slots || (machine->maxram_size > machine->ram_size))) { MachineClass *mc = MACHINE_GET_CLASS(machine); error_report("\"-memory 'slots|maxmem'\" is not supported by: %s", mc->name); if (guest_info->has_reserved_memory && (machine->ram_size < machine->maxram_size)) { ram_addr_t hotplug_mem_size = machine->maxram_size - machine->ram_size; if (machine->ram_slots > ACPI_MAX_RAM_SLOTS) { error_report("unsupported amount of memory slots: %"PRIu64, machine->ram_slots); pcms->hotplug_memory_base = ROUND_UP(0x100000000ULL + above_4g_mem_size, 1ULL << 30); if (pcms->enforce_aligned_dimm) { hotplug_mem_size += (1ULL << 30) * machine->ram_slots; if ((pcms->hotplug_memory_base + hotplug_mem_size) < hotplug_mem_size) { error_report("unsupported amount of maximum memory: " RAM_ADDR_FMT, machine->maxram_size); memory_region_init(&pcms->hotplug_memory, OBJECT(pcms), "hotplug-memory", hotplug_mem_size); memory_region_add_subregion(system_memory, pcms->hotplug_memory_base, &pcms->hotplug_memory); pc_system_firmware_init(rom_memory, guest_info->isapc_ram_fw); option_rom_mr = g_malloc(sizeof(*option_rom_mr)); memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE, &error_abort); vmstate_register_ram_global(option_rom_mr); memory_region_add_subregion_overlap(rom_memory, PC_ROM_MIN_VGA, option_rom_mr, 1); fw_cfg = bochs_bios_init(); rom_set_fw(fw_cfg); if (guest_info->has_reserved_memory && pcms->hotplug_memory_base) { uint64_t *val = g_malloc(sizeof(*val)); *val = cpu_to_le64(ROUND_UP(pcms->hotplug_memory_base, 0x1ULL << 30)); fw_cfg_add_file(fw_cfg, "etc/reserved-memory-end", val, sizeof(*val)); if (linux_boot) { load_linux(fw_cfg, machine->kernel_filename, machine->initrd_filename, machine->kernel_cmdline, below_4g_mem_size); for (i = 0; i < nb_option_roms; i++) { rom_add_option(option_rom[i].name, option_rom[i].bootindex); guest_info->fw_cfg = fw_cfg; return fw_cfg;
1threat
Parsing new "barchart.com" site : <p>I'm looking for a way to parse data (one time per day) from barchart.com (for example, this link <a href="https://www.barchart.com/futures/quotes/HG" rel="nofollow noreferrer">https://www.barchart.com/futures/quotes/HG</a>*0/all-futures#/viewName=main).</p> <p>The problem is, the page code does not contain the values I want to get (and I cannot find the js script which loads it on the page). I mean the table with close/open/high prices.</p> <p>I guess the easiest way is to download the excel file from the page using the "download" button on the right top corner of the table (and then work with it). But I cannot find the download link too, cause the click event is also processed in some script.</p> <p>I'm using C#, but not asking for a code. Any ideas and hints will be really usefull. Thanks.</p>
0debug
getting text from PRE tag(seperated by BR) : <pre><pre> Coupon: 0.990<BR>Date: 07-26-2000 Interest gain: 07-26-2000<BR>1st Coupon: 08-15-2000 Next Couppn: 02-15-2018<BR>Frequency: Monthly Int Calc: ACT/ACT<BR>1st Var: 08-03-2000 Nxt Var: 02-15-2018<BR>Var Frq: Weekly<BR>Init Rt: 4.100</pre> </pre> I am trying to get the contents into tabular format Coupon - 0.990 Date - 07-26-2000 interest gain - 07-26-2000 1st coupon - 08-15-2000 next coupon - 02-15-2018 frequency - Monthly Need to write this in an excel Please help.
0debug
void ff_vc1_interp_mc(VC1Context *v) { MpegEncContext *s = &v->s; H264ChromaContext *h264chroma = &v->h264chroma; uint8_t *srcY, *srcU, *srcV; int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y; int off, off_uv; int v_edge_pos = s->v_edge_pos >> v->field_mode; int use_ic = v->next_use_ic; if (!v->field_mode && !v->s.next_picture.f->data[0]) return; mx = s->mv[1][0][0]; my = s->mv[1][0][1]; uvmx = (mx + ((mx & 3) == 3)) >> 1; uvmy = (my + ((my & 3) == 3)) >> 1; if (v->field_mode) { if (v->cur_field_type != v->ref_field_type[1]) my = my - 2 + 4 * v->cur_field_type; uvmy = uvmy - 2 + 4 * v->cur_field_type; } if (v->fastuvmc) { uvmx = uvmx + ((uvmx < 0) ? -(uvmx & 1) : (uvmx & 1)); uvmy = uvmy + ((uvmy < 0) ? -(uvmy & 1) : (uvmy & 1)); } srcY = s->next_picture.f->data[0]; srcU = s->next_picture.f->data[1]; srcV = s->next_picture.f->data[2]; src_x = s->mb_x * 16 + (mx >> 2); src_y = s->mb_y * 16 + (my >> 2); uvsrc_x = s->mb_x * 8 + (uvmx >> 2); uvsrc_y = s->mb_y * 8 + (uvmy >> 2); if (v->profile != PROFILE_ADVANCED) { src_x = av_clip( src_x, -16, s->mb_width * 16); src_y = av_clip( src_y, -16, s->mb_height * 16); uvsrc_x = av_clip(uvsrc_x, -8, s->mb_width * 8); uvsrc_y = av_clip(uvsrc_y, -8, s->mb_height * 8); } else { src_x = av_clip( src_x, -17, s->avctx->coded_width); src_y = av_clip( src_y, -18, s->avctx->coded_height + 1); uvsrc_x = av_clip(uvsrc_x, -8, s->avctx->coded_width >> 1); uvsrc_y = av_clip(uvsrc_y, -8, s->avctx->coded_height >> 1); } srcY += src_y * s->linesize + src_x; srcU += uvsrc_y * s->uvlinesize + uvsrc_x; srcV += uvsrc_y * s->uvlinesize + uvsrc_x; if (v->field_mode && v->ref_field_type[1]) { srcY += s->current_picture_ptr->f->linesize[0]; srcU += s->current_picture_ptr->f->linesize[1]; srcV += s->current_picture_ptr->f->linesize[2]; } if (s->flags & CODEC_FLAG_GRAY) { srcU = s->edge_emu_buffer + 18 * s->linesize; srcV = s->edge_emu_buffer + 18 * s->linesize; } if (v->rangeredfrm || s->h_edge_pos < 22 || v_edge_pos < 22 || use_ic || (unsigned)(src_x - 1) > s->h_edge_pos - (mx & 3) - 16 - 3 || (unsigned)(src_y - 1) > v_edge_pos - (my & 3) - 16 - 3) { uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize; srcY -= s->mspel * (1 + s->linesize); s->vdsp.emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, s->linesize, 17 + s->mspel * 2, 17 + s->mspel * 2, src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, v_edge_pos); srcY = s->edge_emu_buffer; s->vdsp.emulated_edge_mc(uvbuf, srcU, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); s->vdsp.emulated_edge_mc(uvbuf + 16, srcV, s->uvlinesize, s->uvlinesize, 8 + 1, 8 + 1, uvsrc_x, uvsrc_y, s->h_edge_pos >> 1, v_edge_pos >> 1); srcU = uvbuf; srcV = uvbuf + 16; if (v->rangeredfrm) { int i, j; uint8_t *src, *src2; src = srcY; for (j = 0; j < 17 + s->mspel * 2; j++) { for (i = 0; i < 17 + s->mspel * 2; i++) src[i] = ((src[i] - 128) >> 1) + 128; src += s->linesize; } src = srcU; src2 = srcV; for (j = 0; j < 9; j++) { for (i = 0; i < 9; i++) { src[i] = ((src[i] - 128) >> 1) + 128; src2[i] = ((src2[i] - 128) >> 1) + 128; } src += s->uvlinesize; src2 += s->uvlinesize; } } if (use_ic) { uint8_t (*luty )[256] = v->next_luty; uint8_t (*lutuv)[256] = v->next_lutuv; int i, j; uint8_t *src, *src2; src = srcY; for (j = 0; j < 17 + s->mspel * 2; j++) { int f = v->field_mode ? v->ref_field_type[1] : ((j+src_y - s->mspel) & 1); for (i = 0; i < 17 + s->mspel * 2; i++) src[i] = luty[f][src[i]]; src += s->linesize; } src = srcU; src2 = srcV; for (j = 0; j < 9; j++) { int f = v->field_mode ? v->ref_field_type[1] : ((j+uvsrc_y) & 1); for (i = 0; i < 9; i++) { src[i] = lutuv[f][src[i]]; src2[i] = lutuv[f][src2[i]]; } src += s->uvlinesize; src2 += s->uvlinesize; } } srcY += s->mspel * (1 + s->linesize); } off = 0; off_uv = 0; if (s->mspel) { dxy = ((my & 3) << 2) | (mx & 3); v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off , srcY , s->linesize, v->rnd); v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8, srcY + 8, s->linesize, v->rnd); srcY += s->linesize * 8; v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize , srcY , s->linesize, v->rnd); v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + off + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd); } else { dxy = (my & 2) | ((mx & 2) >> 1); if (!v->rnd) s->hdsp.avg_pixels_tab[0][dxy](s->dest[0] + off, srcY, s->linesize, 16); else s->hdsp.avg_no_rnd_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize, 16); } if (s->flags & CODEC_FLAG_GRAY) return; uvmx = (uvmx & 3) << 1; uvmy = (uvmy & 3) << 1; if (!v->rnd) { h264chroma->avg_h264_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); h264chroma->avg_h264_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); } else { v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1] + off_uv, srcU, s->uvlinesize, 8, uvmx, uvmy); v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2] + off_uv, srcV, s->uvlinesize, 8, uvmx, uvmy); } }
1threat
What is momentum in machine learning? : <p>I'm new in the field of machine learning and recently I heard about this term. I tried to read some articles in the internet but I still don't understand the idea behind it. Can someone give me some examples?</p>
0debug
C's coverage of assembly : <p>In an argument with a friend, I made the remark that it is impossible to write, in any language besides C, a program that is faster than <em>all</em> variants in C, that do the same thing. My argument was based on an affirmative answer to the question below. Is it true?</p> <ul> <li>If we think of "compiling" as a map from [C programs] to [assembly programs], then is this map surjective?</li> </ul> <p><strong>Caveat</strong>: Of course, you can include assembly in C programs, but pretend that isn't possible (makes for a more interesting question!).</p>
0debug
static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom) { uint32_t count; uint32_t i; if (atom.size < 8) return 0; avio_skip(pb, 4); count = avio_rb32(pb); if (count > UINT_MAX / sizeof(*c->meta_keys)) { av_log(c->fc, AV_LOG_ERROR, "The 'keys' atom with the invalid key count: %d\n", count); return AVERROR_INVALIDDATA; } c->meta_keys_count = count + 1; c->meta_keys = av_mallocz(c->meta_keys_count * sizeof(*c->meta_keys)); if (!c->meta_keys) return AVERROR(ENOMEM); for (i = 1; i <= count; ++i) { uint32_t key_size = avio_rb32(pb); uint32_t type = avio_rl32(pb); if (key_size < 8) { av_log(c->fc, AV_LOG_ERROR, "The key# %d in meta has invalid size: %d\n", i, key_size); return AVERROR_INVALIDDATA; } key_size -= 8; if (type != MKTAG('m','d','t','a')) { avio_skip(pb, key_size); } c->meta_keys[i] = av_mallocz(key_size + 1); if (!c->meta_keys[i]) return AVERROR(ENOMEM); avio_read(pb, c->meta_keys[i], key_size); } return 0; }
1threat
If your only tool is an alert box, then : <p>A coworker came into my office and showed me <a href="http://www.asmarterwaytolearn.com/js/index-of-exercises.html" rel="nofollow noreferrer">A Smarter Way to Learn JavaScript</a>, which he thought was great. I told him I didn't like the author's method of delivery, but my coworker left thinking that he was going to learn JavaScript by going through these exercises.</p> <p>So now the problem is: in every design meeting, my coworker suggests that we use an alert box to notify the user of something important.</p> <p>I'm trying to come up with a clever quote to say during our next meeting. Something like:</p> <blockquote> <p>If your only tool is an alert box, then all your problems...</p> </blockquote> <p>But I can't seem to find a clever ending. What should I say the next time he proposes using an alert box?</p>
0debug
USBDevice *usb_net_init(NICInfo *nd) { USBNetState *s; s = qemu_mallocz(sizeof(USBNetState)); s->dev.speed = USB_SPEED_FULL; s->dev.handle_packet = usb_generic_handle_packet; s->dev.handle_reset = usb_net_handle_reset; s->dev.handle_control = usb_net_handle_control; s->dev.handle_data = usb_net_handle_data; s->dev.handle_destroy = usb_net_handle_destroy; s->rndis = 1; s->rndis_state = RNDIS_UNINITIALIZED; s->medium = 0; s->speed = 1000000; s->media_state = 0; ; s->filter = 0; s->vendorid = 0x1234; memcpy(s->mac, nd->macaddr, 6); TAILQ_INIT(&s->rndis_resp); pstrcpy(s->dev.devname, sizeof(s->dev.devname), "QEMU USB Network Interface"); s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, usbnet_receive, usbnet_can_receive, s); qemu_format_nic_info_str(s->vc, s->mac); snprintf(s->usbstring_mac, sizeof(s->usbstring_mac), "%02x%02x%02x%02x%02x%02x", 0x40, s->mac[1], s->mac[2], s->mac[3], s->mac[4], s->mac[5]); fprintf(stderr, "usbnet: initialized mac %02x:%02x:%02x:%02x:%02x:%02x\n", s->mac[0], s->mac[1], s->mac[2], s->mac[3], s->mac[4], s->mac[5]); return (USBDevice *) s; }
1threat
Eliminar elemento de la lista si éste es cero : Soy novato. Si algún elemento de la lista "ju" es igual a cero se debe eliminar y también el elemento de igual índice en la lista "ja". Por ejemplo si "a==0" se debe eliminar "a" de "ju" y "500" de "ja". Igualmente quiero tener mi programa lo más corto posible. De antemano gracias. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css --> milista1=[a,b,c,d,e,f,g,h,i,j] milista2=[500,200,100,50,20,10,5,2,1] for y,z in zip(milista1 ,milista2): print('Hay {0} billete(s) de {1}'.format(y,z)) <!-- end snippet -->
0debug
int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum, BlockDriverState **file) { return bdrv_get_block_status_above(bs, backing_bs(bs), sector_num, nb_sectors, pnum, file); }
1threat
static int find_partition(BlockDriverState *bs, int partition, off_t *offset, off_t *size) { struct partition_record mbr[4]; uint8_t data[512]; int i; int ext_partnum = 4; if (bdrv_read(bs, 0, data, 1)) errx(EINVAL, "error while reading"); if (data[510] != 0x55 || data[511] != 0xaa) { errno = -EINVAL; return -1; } for (i = 0; i < 4; i++) { read_partition(&data[446 + 16 * i], &mbr[i]); if (!mbr[i].nb_sectors_abs) continue; if (mbr[i].system == 0xF || mbr[i].system == 0x5) { struct partition_record ext[4]; uint8_t data1[512]; int j; if (bdrv_read(bs, mbr[i].start_sector_abs, data1, 1)) errx(EINVAL, "error while reading"); for (j = 0; j < 4; j++) { read_partition(&data1[446 + 16 * j], &ext[j]); if (!ext[j].nb_sectors_abs) continue; if ((ext_partnum + j + 1) == partition) { *offset = (uint64_t)ext[j].start_sector_abs << 9; *size = (uint64_t)ext[j].nb_sectors_abs << 9; return 0; } } ext_partnum += 4; } else if ((i + 1) == partition) { *offset = (uint64_t)mbr[i].start_sector_abs << 9; *size = (uint64_t)mbr[i].nb_sectors_abs << 9; return 0; } } errno = -ENOENT; return -1; }
1threat
static void checkpoint(void) { assert(((mapping_t*)array_get(&(vvv->mapping), 0))->end == 2); check1(vvv); check2(vvv); assert(!vvv->current_mapping || vvv->current_fd || (vvv->current_mapping->mode & MODE_DIRECTORY)); #if 0 if (((direntry_t*)vvv->directory.pointer)[1].attributes != 0xf) fprintf(stderr, "Nonono!\n"); mapping_t* mapping; direntry_t* direntry; assert(vvv->mapping.size >= vvv->mapping.item_size * vvv->mapping.next); assert(vvv->directory.size >= vvv->directory.item_size * vvv->directory.next); if (vvv->mapping.next<47) return; assert((mapping = array_get(&(vvv->mapping), 47))); assert(mapping->dir_index < vvv->directory.next); direntry = array_get(&(vvv->directory), mapping->dir_index); assert(!memcmp(direntry->name, "USB H ", 11) || direntry->name[0]==0); #endif return; hexdump(NULL, 100); remove_mapping(vvv, NULL); print_mapping(NULL); print_direntry(NULL); }
1threat
void visit_optional(Visitor *v, bool *present, const char *name, Error **errp) { if (!error_is_set(errp) && v->optional) { v->optional(v, present, name, errp); } }
1threat
Reflection with generic syntax fails on a return parameter of an overridden method : <p>To avoid old-fashioned non-generic syntax when searching for attributes of a known type, one usually uses the extension methods in <a href="https://msdn.microsoft.com/en-us/library/system.reflection.customattributeextensions.aspx"><code>System.Reflection.CustomAttributeExtensions</code> class</a> (since .NET 4.5).</p> <p>However this appears to fail if you search for an attribute on the <em>return parameter</em> of an overridden method (or an accessor of an overridden property/indexer).</p> <p>I am experiencing this with .NET 4.6.1.</p> <p>Simple reproduction (complete):</p> <pre><code>using System; using System.Reflection; namespace ReflectionTrouble { class B { //[return: MyMark("In base class")] // uncommenting does not help public virtual int M() =&gt; 0; } class C : B { [return: MyMark("In inheriting class")] // commenting away attribute does not help public override int M() =&gt; -1; } [AttributeUsage(AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = false)] // commenting away AttributeUsage does not help sealed class MyMarkAttribute : Attribute { public string Descr { get; } public MyMarkAttribute(string descr) { Descr = descr; } public override string ToString() =&gt; $"MyMark({Descr})"; } static class Program { static void Main() { var derivedReturnVal = typeof(C).GetMethod("M").ReturnParameter; // usual new generic syntax (extension method in System.Refelction namespace): var attr = derivedReturnVal.GetCustomAttribute&lt;MyMarkAttribute&gt;(); // BLOWS UP HERE, System.IndexOutOfRangeException: Index was outside the bounds of the array. Console.WriteLine(attr); // old non-generic syntax without extension method works: var attr2 = ((MyMarkAttribute[])(derivedReturnVal.GetCustomAttributes(typeof(MyMarkAttribute), false)))[0]; // OK Console.WriteLine(attr2); } } } </code></pre> <p>The code may look "too long to read", but it is really just an overridden method with an attribute on its return parameter and the obvious attempt to retrieve that attribute instance.</p> <p>Stack trace:</p> <pre>Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Attribute.GetParentDefinition(ParameterInfo param) at System.Attribute.InternalParamGetCustomAttributes(ParameterInfo param, Type type, Boolean inherit) at System.Attribute.GetCustomAttributes(ParameterInfo element, Type attributeType, Boolean inherit) at System.Attribute.GetCustomAttribute(ParameterInfo element, Type attributeType, Boolean inherit) at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](ParameterInfo element) at ReflectionTrouble.Program.Main() in c:\MyPath\Program.cs:line 38</pre> <p><strong>Am I doing anything obviously wrong?</strong></p> <p><strong>Is this a bug, and if yes, is it well-known, and is it an old bug?</strong></p>
0debug
static int vdi_create(const char *filename, QEMUOptionParameter *options, Error **errp) { int fd; int result = 0; uint64_t bytes = 0; uint32_t blocks; size_t block_size = DEFAULT_CLUSTER_SIZE; uint32_t image_type = VDI_TYPE_DYNAMIC; VdiHeader header; size_t i; size_t bmap_size; logout("\n"); while (options && options->name) { if (!strcmp(options->name, BLOCK_OPT_SIZE)) { bytes = options->value.n; #if defined(CONFIG_VDI_BLOCK_SIZE) } else if (!strcmp(options->name, BLOCK_OPT_CLUSTER_SIZE)) { if (options->value.n) { block_size = options->value.n; } #endif #if defined(CONFIG_VDI_STATIC_IMAGE) } else if (!strcmp(options->name, BLOCK_OPT_STATIC)) { if (options->value.n) { image_type = VDI_TYPE_STATIC; } #endif } options++; } fd = qemu_open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_LARGEFILE, 0644); if (fd < 0) { return -errno; } blocks = (bytes + block_size - 1) / block_size; bmap_size = blocks * sizeof(uint32_t); bmap_size = ((bmap_size + SECTOR_SIZE - 1) & ~(SECTOR_SIZE -1)); memset(&header, 0, sizeof(header)); pstrcpy(header.text, sizeof(header.text), VDI_TEXT); header.signature = VDI_SIGNATURE; header.version = VDI_VERSION_1_1; header.header_size = 0x180; header.image_type = image_type; header.offset_bmap = 0x200; header.offset_data = 0x200 + bmap_size; header.sector_size = SECTOR_SIZE; header.disk_size = bytes; header.block_size = block_size; header.blocks_in_image = blocks; if (image_type == VDI_TYPE_STATIC) { header.blocks_allocated = blocks; } uuid_generate(header.uuid_image); uuid_generate(header.uuid_last_snap); #if defined(CONFIG_VDI_DEBUG) vdi_header_print(&header); #endif vdi_header_to_le(&header); if (write(fd, &header, sizeof(header)) < 0) { result = -errno; } if (bmap_size > 0) { uint32_t *bmap = g_malloc0(bmap_size); for (i = 0; i < blocks; i++) { if (image_type == VDI_TYPE_STATIC) { bmap[i] = i; } else { bmap[i] = VDI_UNALLOCATED; } } if (write(fd, bmap, bmap_size) < 0) { result = -errno; } g_free(bmap); } if (image_type == VDI_TYPE_STATIC) { if (ftruncate(fd, sizeof(header) + bmap_size + blocks * block_size)) { result = -errno; } } if (close(fd) < 0) { result = -errno; } return result; }
1threat
Pass a vector of pointers to function in c++ : <p>I saw many posts here but none of them explains what I'm trying to do. I have the vector <code>vector &lt;Car*&gt; carVector;</code> and I want to pass it to a function so I can read the information of the objects in there. The objective is to pass it and then I can use it in this cicle</p> <pre><code>for (i = 0; i &lt; racetrack.size(); i++) { for (int j = 1; j &lt; nRaceTracks + 1; j++) { if (racetrack[i]-&gt;getNome() == info[j]) { size= racetrack[i]-&gt;getTrackSize() / 100; for (int c = 0; c &lt; carVector.size(); c++) carVector[c]-&gt;chargeBattery(500); } } } </code></pre>
0debug
static int sofalizer_convolute(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { SOFAlizerContext *s = ctx->priv; ThreadData *td = arg; AVFrame *in = td->in, *out = td->out; int offset = jobnr; int *write = &td->write[jobnr]; const int *const delay = td->delay[jobnr]; const float *const ir = td->ir[jobnr]; int *n_clippings = &td->n_clippings[jobnr]; float *ringbuffer = td->ringbuffer[jobnr]; float *temp_src = td->temp_src[jobnr]; const int n_samples = s->sofa.n_samples; const float *src = (const float *)in->data[0]; float *dst = (float *)out->data[0]; const int in_channels = s->n_conv; const int buffer_length = s->buffer_length; const uint32_t modulo = (uint32_t)buffer_length - 1; float *buffer[16]; int wr = *write; int read; int i, l; dst += offset; for (l = 0; l < in_channels; l++) { buffer[l] = ringbuffer + l * buffer_length; } for (i = 0; i < in->nb_samples; i++) { const float *temp_ir = ir; *dst = 0; for (l = 0; l < in_channels; l++) { *(buffer[l] + wr) = src[l]; } for (l = 0; l < in_channels; l++) { const float *const bptr = buffer[l]; if (l == s->lfe_channel) { *dst += *(buffer[s->lfe_channel] + wr) * s->gain_lfe; temp_ir += n_samples; continue; } read = (wr - *(delay + l) - (n_samples - 1) + buffer_length) & modulo; if (read + n_samples < buffer_length) { memcpy(temp_src, bptr + read, n_samples * sizeof(*temp_src)); } else { int len = FFMIN(n_samples - (read % n_samples), buffer_length - read); memcpy(temp_src, bptr + read, len * sizeof(*temp_src)); memcpy(temp_src + len, bptr, (n_samples - len) * sizeof(*temp_src)); } dst[0] += s->fdsp->scalarproduct_float(temp_ir, temp_src, n_samples); temp_ir += n_samples; } if (fabs(*dst) > 1) *n_clippings += 1; dst += 2; src += in_channels; wr = (wr + 1) & modulo; } *write = wr; return 0; }
1threat
int bdrv_drop_intermediate(BlockDriverState *active, BlockDriverState *top, BlockDriverState *base, const char *backing_file_str) { BlockDriverState *intermediate; BlockDriverState *base_bs = NULL; BlockDriverState *new_top_bs = NULL; BlkIntermediateStates *intermediate_state, *next; int ret = -EIO; QSIMPLEQ_HEAD(states_to_delete, BlkIntermediateStates) states_to_delete; QSIMPLEQ_INIT(&states_to_delete); if (!top->drv || !base->drv) { goto exit; } new_top_bs = bdrv_find_overlay(active, top); if (new_top_bs == NULL) { goto exit; } if (new_top_bs->backing_hd == base) { ret = 0; goto exit; } intermediate = top; while (intermediate) { intermediate_state = g_malloc0(sizeof(BlkIntermediateStates)); intermediate_state->bs = intermediate; QSIMPLEQ_INSERT_TAIL(&states_to_delete, intermediate_state, entry); if (intermediate->backing_hd == base) { base_bs = intermediate->backing_hd; break; } intermediate = intermediate->backing_hd; } if (base_bs == NULL) { goto exit; } backing_file_str = backing_file_str ? backing_file_str : base_bs->filename; ret = bdrv_change_backing_file(new_top_bs, backing_file_str, base_bs->drv ? base_bs->drv->format_name : ""); if (ret) { goto exit; } bdrv_set_backing_hd(new_top_bs, base_bs); QSIMPLEQ_FOREACH_SAFE(intermediate_state, &states_to_delete, entry, next) { bdrv_set_backing_hd(intermediate_state->bs, NULL); bdrv_unref(intermediate_state->bs); } ret = 0; exit: QSIMPLEQ_FOREACH_SAFE(intermediate_state, &states_to_delete, entry, next) { g_free(intermediate_state); } return ret; }
1threat
Segmentation fault error array in c : <p>I want to write a program in which I want to initialize integer array of size 987654321 for storing values of 1 and 0 only, here is my program</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main(){ int x,y,z; int limit = 987654321; int arr[limit]; for (x = 0;x &lt; limit;x++){ printf("%d \n",arr[x]); } return 0; } </code></pre> <p>but it gives segmentation fault</p>
0debug
How to remove the blue background of button on mobile? : <p>I try to remove the blue background of my button on click as you can see : <a href="https://i.stack.imgur.com/EFS0T.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EFS0T.png" alt="My button"></a> Before asking, I have serached a lot, I have checked and tried the solutions given by the followings topics :</p> <ul> <li><a href="https://stackoverflow.com/questions/3397113/how-to-remove-border-outline-around-text-input-boxes-chrome">How to remove border (outline) around text/input boxes? (Chrome)</a></li> <li><a href="https://stackoverflow.com/questions/22746464/remove-blue-box-around-buttons-html">Remove blue box around buttons. HTML</a></li> <li><a href="https://stackoverflow.com/questions/24222798/how-to-remove-the-blue-box-shadow-border-in-button-if-clicked">How to remove the blue box shadow border in button if clicked</a></li> <li><a href="https://stackoverflow.com/questions/20593224/remove-blue-selected-outline-on-buttons/43773106#43773106">Remove blue &quot;selected&quot; outline on buttons</a></li> <li><a href="https://stackoverflow.com/questions/20593224/remove-blue-selected-outline-on-buttons">Remove blue &quot;selected&quot; outline on buttons</a></li> <li><a href="https://stackoverflow.com/questions/20340138/remove-blue-border-from-css-custom-styled-button-in-chrome">Remove blue border from css custom-styled button in Chrome</a></li> <li><a href="https://stackoverflow.com/questions/19053181/how-to-remove-focus-around-buttons-on-click">How to remove focus around buttons on click</a></li> <li>...</li> </ul> <p>I have tried all the answers ! It works on PC but not on mobile, if you are on PC, you can try it by simulating mobile with your console. Here is the button : <a href="https://jsfiddle.net/t4ykshst/" rel="noreferrer">https://jsfiddle.net/t4ykshst/</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>#add { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; outline: none; cursor: pointer; padding: 10px; overflow: hidden; border: none; -webkit-border-radius: 50%; border-radius: 50%; color: rgba(255,255,255,0.9); text-align: center; background: #1abc9c; -webkit-box-shadow: 0 4px 3px 2px rgba(0,0,0,0.2) ; box-shadow: 0 4px 3px 2px rgba(0,0,0,0.2) ; } #add:active { opacity: 0.85; -webkit-box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) ; box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.2) ; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="button" id="add" value="+" title="" style="position: absolute; left: 0px; top: 0px; width: 52px; height: 52px;"&gt;</code></pre> </div> </div> </p>
0debug
React - Preventing Form Submission : <p>I've been experimenting with React. In my experiement, I'm using the <a href="https://reactstrap.github.io/">Reactstrap framework</a>.When I click a button, I've noticed that the HTML form submits. Is there a way to prevent form submission when a button is clicked? </p> <p>I've recreated my issue <a href="http://jsbin.com/tiwuhovebu/1/edit?html,js,output">here</a>. My form is pretty basic and looks like this:</p> <pre><code>&lt;Form&gt; &lt;h3&gt;Buttons&lt;/h3&gt; &lt;p&gt; &lt;Button color="primary" onClick={this.onTestClick}&gt;primary&lt;/Button&gt;&amp;nbsp; &lt;/p&gt; &lt;/Form&gt; </code></pre> <p>What am I missing?</p>
0debug
alert('Hello ' + user_input);
1threat
How can I find the rank for each user? : <p>I am having trouble understanding on how can I sort the users according to their rank. I'm using the Convolutional Neural Network (CNN) for developing iris recognition system and I've got the output of the Softmax classifier from the left and right iris. What I'm going to do is using one of the ranking fusion methods (e.g. the highest rank method, the Borda count method, and the logistic regression method) to fuse the output of both the left and right iris. I completely understand each method how does it work, but I faced problem on how can I find the initial rank for each user. In other words, How can I find the rank for each user before I fed them to any one of the ranking methods?. Please, any explanation and idea on this will be highly appreciated. Thank you in advance.</p>
0debug
Storing a single character to Queue<string>: error : <p>I am practicing on LeetCode. </p> <p>I have the following CPP code:</p> <pre><code>string s="abcd"; queue&lt;string&gt; q; string temp; temp=s[2]; queue.push(temp); </code></pre> <p>Error:</p> <blockquote> <p>Line 5: conversion from '__gnu_cxx::__alloc_traits >::value_type {aka char}' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string}' requested</p> </blockquote> <p>I am wondering why this happen? I can't really change thte structure of this because temp will be growing over time (eg., temp='a'+'b'+'c'; queue.push(temp)); </p>
0debug
static av_always_inline void decode_line(FFV1Context *s, int w, int_fast16_t *sample[2], int plane_index, int bits){ PlaneContext * const p= &s->plane[plane_index]; RangeCoder * const c= &s->c; int x; int run_count=0; int run_mode=0; int run_index= s->run_index; for(x=0; x<w; x++){ int diff, context, sign; context= get_context(s, sample[1] + x, sample[0] + x, sample[1] + x); if(context < 0){ context= -context; sign=1; }else sign=0; if(s->ac){ diff= get_symbol_inline(c, p->state[context], 1); }else{ if(context == 0 && run_mode==0) run_mode=1; if(run_mode){ if(run_count==0 && run_mode==1){ if(get_bits1(&s->gb)){ run_count = 1<<ff_log2_run[run_index]; if(x + run_count <= w) run_index++; }else{ if(ff_log2_run[run_index]) run_count = get_bits(&s->gb, ff_log2_run[run_index]); else run_count=0; if(run_index) run_index--; run_mode=2; } } run_count--; if(run_count < 0){ run_mode=0; run_count=0; diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits); if(diff>=0) diff++; }else diff=0; }else diff= get_vlc_symbol(&s->gb, &p->vlc_state[context], bits); } if(sign) diff= -diff; sample[1][x]= (predict(sample[1] + x, sample[0] + x) + diff) & ((1<<bits)-1); } s->run_index= run_index; }
1threat
What does placing brackets around a function mean? (function(){}) : I know what a self-executing function is. I know the difference between this function() { } and this (function() { })() but what about this (function() { }) does the brackets here have any significance? I've seen it in several places before. [Here's one.](https://eslint.org/docs/rules/arrow-body-style#as-needed)
0debug
59 duplicate symbols for architecture x86_64 : <p>I am new to iOS programming.So I am not getting how to fix this error. I am using Xcode 7.2.1.While building my app I am getting this duplicate symbol _OBJC_IVAR_$_ECPercentDrivenInteractiveTransition._transitionContext in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECPercentDrivenInteractiveTransition._animationController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_CLASS_$_ECPercentDrivenInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_METACLASS_$_ECPercentDrivenInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECPercentDrivenInteractiveTransition._isActive in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECPercentDrivenInteractiveTransition._percentComplete in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECPercentDrivenInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECPercentDrivenInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingAnimationController._coordinatorAnimations in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingAnimationController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingAnimationController.o) duplicate symbol _OBJC_CLASS_$_ECSlidingAnimationController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingAnimationController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingAnimationController.o) duplicate symbol _OBJC_METACLASS_$_ECSlidingAnimationController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingAnimationController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingAnimationController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingAnimationController._coordinatorCompletion in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingAnimationController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingAnimationController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingAnimationController._defaultTransitionDuration in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingAnimationController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingAnimationController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingInteractiveTransition._positiveLeftToRight in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingInteractiveTransition._slidingViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_CLASS_$_ECSlidingInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_METACLASS_$_ECSlidingInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingInteractiveTransition._fullWidth in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingInteractiveTransition._currentPercentage in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingInteractiveTransition._coordinatorInteractionEnded in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingInteractiveTransition.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingInteractiveTransition.o) duplicate symbol _OBJC_IVAR_$_ECSlidingSegue._skipSettingTopViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingSegue.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingSegue.o) duplicate symbol _OBJC_IVAR_$_ECSlidingSegue._isUnwinding in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingSegue.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingSegue.o) duplicate symbol _OBJC_CLASS_$_ECSlidingSegue in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingSegue.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingSegue.o) duplicate symbol _OBJC_METACLASS_$_ECSlidingSegue in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingSegue.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingSegue.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._gestureView in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._anchorRightRevealAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._anchorLeftRevealAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._anchorRightPeekAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._preserveRightPeekAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._anchorLeftPeekAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._preserveLeftPeekAmount in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._transitionInProgress in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._coordinatorAnimations in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._customAnchoredGestures in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._underRightViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._underLeftViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._topViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_CLASS_$_ECSlidingViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_METACLASS_$_ECSlidingViewController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._currentAnimationController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._defaultAnimationController in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._customAnchoredGesturesViewMap in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._currentTopViewPosition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._currentInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._defaultInteractiveTransition in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._coordinatorCompletion in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._defaultTransitionDuration in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._currentOperation in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._isInteractive in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._animationComplete in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._delegate in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._resetTapGesture in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._panGesture in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._topViewAnchoredGesture in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._currentAnimationPercentage in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._isAnimated in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._transitionWasCancelled in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._coordinatorInteractionEnded in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._underRightViewControllerStoryboardId in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._underLeftViewControllerStoryboardId in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) duplicate symbol _OBJC_IVAR_$_ECSlidingViewController._topViewControllerStoryboardId in: /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Intermediates/iHealApp.build/Debug-iphonesimulator/iHealApp.build/Objects-normal/x86_64/ECSlidingViewController.o /Users/coders/Library/Developer/Xcode/DerivedData/iHealApp-ckstaumxwtiyvpgeursmlweqpdmq/Build/Products/Debug-iphonesimulator/libECSlidingViewController.a(ECSlidingViewController.o) ld: 59 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Please help me how to fix this.</p>
0debug
how to replace single escape char with double using sed : <p>I would like to replace single escape char \ with double \ using sed However when I use</p> <pre><code>`echo $regex | sed 's/\\/\\\\/g'` </code></pre> <p>it returns sed: -e expression #1, char 8: unterminated `s' command is there a solution for this?</p>
0debug
How to return value of function out of mainloop in python? : In this code I want to retune value out of set function but I Cannot. what should i do? from tkinter import * temp= 0 def sel(): selection = "You selected the option " + str(var.get()) label.config(text = selection) temp=selection return temp root = Tk() var = IntVar() R1 = Radiobutton(root, text="Option 1", variable=var, value=1, command=sel) R1.pack( anchor = W ) R2 = Radiobutton(root, text="Option 2", variable=var, value=2, command=sel) R2.pack( anchor = W ) R3 = Radiobutton(root, text="Option 3", variable=var, value=3, command=sel) R3.pack( anchor = W) label = Label(root) label.pack() print (sel()) root.mainloop() why print function cann't show result?
0debug
void visit_start_implicit_struct(Visitor *v, void **obj, size_t size, Error **errp) { if (!error_is_set(errp) && v->start_implicit_struct) { v->start_implicit_struct(v, obj, size, errp); } }
1threat
Invoke-WebRequest SSL fails? : <p>When I try to use <code>Invoke-WebRequest</code> I'm getting some weird error:</p> <pre><code>Invoke-WebRequest -Uri "https://idp.safenames.com/" Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send. </code></pre> <p>I'm not sure what's causing it, as the website itself seems fine.</p> <p>Even with all the "ignore ssl errors" functions around stackoverflow, it's still not working, making me wonder if it's related to SSL at all.</p>
0debug
SQL SEPARETE FOR SP : ABOUT : SQL MANAGEMENT STUDIO STORAGE PROSEDURE The following variables '|' I want to separate it from . How can I do it. '628391|28100|8304|3|1201129|12|Kg|M01|SERIOUSLY CHUNKY WOOL' '627452|70462|618|60|100059|72|Ad|M01|THICK & QUICK STRIPES' '617213|99233|89|10|18754|12|Kg|M01|FASHION KC ARAN 400'
0debug
Could not get uid/gid when building Node/Docker : <p>My Dockerfile is using alpine and globally installing react-scripts. When it tries to install it, it fails with "could not get uid/gid" error. I added the "---unsafe-perm" option to the npm install -g command. The docker container is successfully created, but the permissions in the container are messaged up for the installed files. I see the username and group set to 1000 for all of them. I tried adding the following command to the Dockerfile right before the install step but that didn't help.</p> <pre><code>RUN npm -g config set user root </code></pre> <p>Build error</p> <pre><code>Error: could not get uid/gid [ 'nobody', 0 ] at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16 at ChildProcess.exithandler (child_process.js:296:5) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:961:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5) TypeError: Cannot read property 'get' of undefined at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18) at /usr/local/lib/node_modules/npm/bin/npm-cli.js:76:20 at cb (/usr/local/lib/node_modules/npm/lib/npm.js:228:22) at /usr/local/lib/node_modules/npm/lib/npm.js:266:24 at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7 at Array.forEach (&lt;anonymous&gt;) at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13 at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25) at afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:173:20) at Conf.&lt;anonymous&gt; (/usr/local/lib/node_modules/npm/lib/config/core.js:231:22) /usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205 if (npm.config.get('json')) { ^ TypeError: Cannot read property 'get' of undefined at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18) at process.emit (events.js:182:13) at process._fatalException (internal/bootstrap/node.js:472:27) ERROR: Service 'sample-app' failed to build: The command '/bin/sh -c npm install react-scripts@1.1.1 -g' returned a non-zero code: </code></pre> <p>Dockerfile</p> <pre><code>/usr/src/app # cat Dockerfile # build environment FROM node:10-alpine as builder RUN mkdir -p /usr/src/app WORKDIR /usr/src/app ENV PATH /usr/src/app/node_modules/.bin:$PATH COPY package.json /usr/src/app/package.json RUN npm install RUN npm install react-scripts@1.1.1 -g COPY . /usr/src/app RUN npm run build # production environment FROM nginx:1.13.9-alpine COPY --from=builder /usr/src/app/build /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] </code></pre>
0debug
static int monitor_parse(const char *devname) { static int index = 0; char label[32]; if (strcmp(devname, "none") == 0) return 0; if (index == MAX_MONITOR_DEVICES) { fprintf(stderr, "qemu: too many monitor devices\n"); exit(1); } if (index == 0) { snprintf(label, sizeof(label), "monitor"); } else { snprintf(label, sizeof(label), "monitor%d", index); } monitor_hds[index] = qemu_chr_open(label, devname, NULL); if (!monitor_hds[index]) { fprintf(stderr, "qemu: could not open monitor device '%s'\n", devname); return -1; } index++; return 0; }
1threat
How can i find previous class using jQuery? : I want to get previous tag value with id but when I click on three then got value & when I click on four and five didn't get. How can I get it? This is what i tried:- <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> $(document).ready(function(){ $('ul li').click(function(){ alert($(this).prev('.two').text()); }); }); <!-- language: lang-html --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <ul> <li>One</li> <li class="two">Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul> <!-- end snippet --> The answer will be appreciated!
0debug
Php shows wrong time : <p>I'm making a website and the php time is incorrect, it is 40 seconds behinde. How do I fix it? (I have time events on my site). I have one javascript clock which is fine btw.</p>
0debug
Scrape HTML off AppBuilder page : <p>I found this website with some interesting data I wish to analyze. But the page is really slow and build around .docx files. But it has a preview of each document in HTML</p> <p><a href="http://www.produktresume.dk/AppBuilder/search?page=0" rel="nofollow noreferrer">http://www.produktresume.dk/AppBuilder/search?page=0</a></p> <p>My current idea for a strategy is:</p> <ol> <li>Wait for the page to load (haven't tried this before)</li> <li>Dig into the <code>div class="widget_inside"</code></li> <li>Grab all the <code>href</code> in <code>&lt;a class="preview_link"</code></li> <li>Iterate over all the collected links and parse the HTML into some <code>.json</code>/<code>.csv</code> for later analysis</li> </ol> <p>I'm pretty new when it comes to scraping, and had previously some luck with <code>BeautifulSoup</code> in Python - with a page that don't have a loading. But I have been using nodejs lately, so would prefer to be able to do it in JS with some npm package. </p> <p>Anybody who can help me out finding the right tools for the job and some pointers/comments on the best strategy?</p> <hr> <h1>Bonus info</h1> <p>By decoding one of the filter links to the left this comes up:</p> <p><code>http://www.produktresume.dk/AppBuilder/search?expand_all=true&amp;page=0&amp;refinements_token={}&amp;selected_tokens[]={"s":[{"id":"folder-refinement","xPath":"$folders","separator":"\u003e","logic":"OR","s":[{"n":"Human","k":"Human"}]}]}</code></p> <p>Don't know if that would be of any use?</p>
0debug
HOw Can I black & white camera in unity 2019.1.9? : I want make a filter camera for unity that black & white in unity 2019.1.9 how can I make it? that can change it to RGB and black and white every time thanks
0debug
void qpci_io_writel(QPCIDevice *dev, void *data, uint32_t value) { uintptr_t addr = (uintptr_t)data; if (addr < QPCI_PIO_LIMIT) { dev->bus->pio_writel(dev->bus, addr, value); } else { value = cpu_to_le32(value); dev->bus->memwrite(dev->bus, addr, &value, sizeof(value)); } }
1threat
How do I handle deletes in react-apollo : <p>I have a mutation like</p> <pre><code>mutation deleteRecord($id: ID) { deleteRecord(id: $id) { id } } </code></pre> <p>and in another location I have a list of elements. </p> <p>Is there something better I could return from the server, and how should I update the list?</p> <p>More generally, what is best practice for handling deletes in apollo/graphql?</p>
0debug
correct below tsql. I am getting error below : DECLARE @hashThis nvarchar(max); SET @hashThis = CONCAT( Branch | '|' | DiscountGroup | '|' | ItemNumber | '|' | PriceColumn |'|' | LastUpdatedDate |'|' | PMBasis |'|' | PMOper |'|' | PMMult |'|' | DeletedOnDate |'|' | PriceMatrixKey |'|' | ODS_INSERT_TS ) SELECT HASHBYTES('MD5', @hashThis);
0debug
What is the best common technology to store data locally for mobile apps? : <p>I want to do an app for the three platforms : Android, Apple, Windows and I want to know what is the best choice to store local data on devices, to have a common data base, easily reusable for each platform ? Thanks for your help</p>
0debug
I got an "Program has stopped " errow : The error code like this, E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.kerempc.odev, PID: 8573 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.kerempc.odev/com.example.kerempc.odev.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference at com.example.kerempc.odev.MainFragment.onCreateView(MainFragment.java:25) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2439) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:802) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411) at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273) at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3273) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3229) at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:620) at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334) at android.app.Activity.performStart(Activity.java:7029) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2741) What should I do ?
0debug
Don't work colspan or rowspan in trable html : I don't span a cells "cell1_1" and "cell1_2". When I'm use colspan="2" at #cell1_1 it don't work. My [example](https://jsfiddle.net/Erush/xcwk3d09/) I try use [method](http://stackoverflow.com/questions/15571556/html-colspan-rowspan?answertab=votes#tab-top) at [jsfiddler](http://jsfiddle.net/Tyriar/tAsbE/) ,but don't work tag `br` when I use rowspan. <br>I don't understand how working skipping cells? <br>But can't find solution! Please help!
0debug
How to save strings into an array of char pointers in C? : <p>I have to save Strings readen by command line and save them into a pointer array. The problem is that when I save the strings in their respective array [x][y] it seems that after every update on a [x][y] it affects the whole array. I used some printf to see the state of the array after each udpate and always prints the last value added instead of the previous that should be in the array. Can someone point me the problem please?</p> <pre><code>char *NFAtab[STATES][SYMBOLS]; void init_NFA_table() { char input[STATES+1]; int index; int state; DFA_states = 0; N_symbols = 2; printf("FUNCIONAMENT:\n No hi ha límit d'estats, però es necessari que els estats comencin per l'estat 0.\n Només s'accepten transicions amb a i b.\n"); printf("Introdueix nombre d'estats:"); scanf("%d", &amp;NFA_states); printf("--------------------------------------------\n"); printf("Introdueix transicions per cada estat per la 'a' (forma d'introducció: estatestat, sense espaiat; exemple: si va al estat 1 i al 2: 12 | si no hi ha transició '.')\n ------------------------------------------\n"); int i; for (i = 0; i &lt; NFA_states; i++){ printf("ESTAT %d: ", i); scanf("%s", input); if (strcmp(input, ".") == 0){ NFAtab[i][0] = ""; } else { NFAtab[i][0] = input; printf("%s\n", NFAtab[i][0]); } if (i&gt;0){ printf("%s\n", NFAtab[i-1][0]); } } printf("Introdueix transicions per cada estat per la 'b' (forma d'introducció: estatestat, sense espaiat; exemple: si va al estat 1 i al 2: 12 | si no hi ha transició '.')\n ------------------------------------------\n"); int x; for (x = 0; x &lt; NFA_states; x++){ printf("ESTAT %d: ", x); scanf("%s", input); if (strcmp(input, ".") == 0){ NFAtab[x][1] = ""; } else { NFAtab[x][1] = input; printf("%s\n", NFAtab[x][1]); } if (x &gt; 0){ printf("%s\n", NFAtab[x-1][1]); } } for (x = 0; x &lt; NFA_states; x++){ for (i = 0; i &lt; N_symbols; i++){ printf("ESTAT: %d | SIMBOL: %d : %s\n", x, i, NFAtab[x][i]); } } </code></pre>
0debug
'None' is being displayed in the output of quotient and remiander in python : **Writing a program to print quotient and remainder, but everywhere change the quotientProblem function into one called quotientString that merely returns the string rather than printing the string directly. Have the main function print the result of each call to the quotientString function.** def value(): a=int(input("Enter a number: ")) b=int(input("Enter next number: ")) z=print("When",a,"is divided by",b,"the remainder is",a%b,"and the quotient is",a//b,".") print (division(a,b,z)) def division(x,y,z): return z value() ////When I executed/// >>>Enter a number: 5 >>>Enter next number: 3 When 5 is divided by 3 the remainder is 2 and the quotient is 1 . None Here 'None' keeps displaying.
0debug
java ATM program simulation with exception handling - no error neither full output. : the output is not a complete one, and neither are the exceptions handled. Please help. public class ATM { private String message; public ATM(String m) { if (m == null || m.trim().equals("")) throw new IllegalArgumentException("ATM name cannot be empty"); else { message = m; System.out.println("Name is " + message); } } // public String getMessage() { // return message; // } public void withdraw(Card c, double amount) throws NotEnoughMoneyInAccountException { double bal = c.getBalance(); System.out.println(bal); if (c == null) throw new IllegalArgumentException("card cannot be null"); if (amount < 0) throw new IllegalArgumentException("please enter amount"); if (bal > amount) throw new NotEnoughMoneyInAccountException("money in account is less"); else { bal = bal - amount; c.setBalance(bal); System.out.println(bal); } } public void deposit(Card c, double amount) { double bal = c.getBalance(); if (amount == 0) throw new IllegalArgumentException("Please enter amount to deposit"); bal = bal + amount; System.out.println(bal); } } public class Card { private double balance; private String owner; public double getBalance() { return balance; } public void setBalance(double balance) { this.balance = balance; } public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } } public class NotEnoughMoneyInAccountException extends Exception { public NotEnoughMoneyInAccountException(String m) { super(m); } } public class TestATM { public static void main(String[] args) { // TODO Auto-generated method stub try { System.out.println("Starting"); Card c1 = new Card(); c1.setOwner("Shweta"); c1.setBalance(500); System.out.println(c1.getOwner()); ATM atm = new ATM("SBI"); atm.withdraw(c1, 200); atm.deposit(c1, 200); } catch (NotEnoughMoneyInAccountException e) { // TODO Auto-generated catch block e.getMessage(); } catch(Exception e) { e.getMessage(); } } } the output is : Starting Shweta Name is SBI 500.0 When I enter the atm name (String message) as null, the exception should be handled accordingly, but that does not happen. Even when I enter amount to withdraw < 0, it should enter the if loop and throw an exception which must be handled in the main program, neither does that happen. Neither do I get any kind of error. Please help.
0debug
c# for() loop setting the increment up to the last character in a string : <p>I am taking a c# course and this is what it whats me to do:</p> <p>"Create a string variable named decodedString and set it equal to the contents of the StringTextBox. Create a string variable named encodedString to hold the encoded string and set it equal to an empty string. We will build up the encoded values letter-by-letter in this variable. Use a for() loop to loop through all of the characters in decodedString. Your loop index "i" should start at 0 and increment up to the last character in decodedString."</p> <p>I'm confused on how I stop the loop at the last character in <em>decodedString</em>. Heres my short bit of code. </p> <pre><code> private void EnocodeButton_Click(object sender, EventArgs e) { String decodeString = StringTextBox.Text; String encodeString = ""; for(int i=0,i== ) //Im not sure what to do here? } </code></pre>
0debug
ssize_t nbd_receive_reply(int csock, struct nbd_reply *reply) { uint8_t buf[NBD_REPLY_SIZE]; uint32_t magic; if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { LOG("read failed"); errno = EINVAL; return -1; } magic = be32_to_cpup((uint32_t*)buf); reply->error = be32_to_cpup((uint32_t*)(buf + 4)); reply->handle = be64_to_cpup((uint64_t*)(buf + 8)); TRACE("Got reply: " "{ magic = 0x%x, .error = %d, handle = %" PRIu64" }", magic, reply->error, reply->handle); if (magic != NBD_REPLY_MAGIC) { LOG("invalid magic (got 0x%x)", magic); errno = EINVAL; return -1; } return 0; }
1threat
How to reverse order a list? (Python 3.x) : <p>How to reverse order the list containing strings where def view(self), because with reversed() I get an error that it can't be done with strings. Any help? </p> <pre><code>class Stack(): def __init__(self): self.stack = [] def view(self): for x in reversed(self.stack): print(self.stack[x]) def push(self): item = input("Please enter the item you wish to add to the stack: ") self.stack.append(item) def pop(self): item = self.stack.pop(-1) print("You just removed item: {0}".format(item)) stack = Stack() </code></pre>
0debug
How to use Postgres JSONB datatype with JPA? : <p>Im not finding a way to map the JSON and JSONB datatypes from PostgreSQL using JPA (EclipseLink). Is some one using this datatypes with JPA and can give me some working examples?</p>
0debug
PHP - get JSON parent value : <p>In php, I'm trying to get the numbers (0, 13, 20, 45, 53, 56) from this json file:</p> <pre><code>{ "0": { "classcat": "a", }, "13": { "classcat": "b", }, "20": { "classcat": "c", }, "45": { "classcat": "d", }, "53": { "classcat": "e", }, } </code></pre> <p>Im populating this file to a selectfield with a foreach loop. My desired output would be:</p> <pre><code>&lt;select&gt; &lt;option value="(classcatvalue)"&gt;(classcatvalue + number)&lt;/option&gt; &lt;option value="a"&gt;a 0&lt;/option&gt; &lt;option value="b"&gt;b 13&lt;/option&gt; &lt;option value="c"&gt;c 20&lt;/option&gt; &lt;option value="d"&gt;d 45&lt;/option&gt; &lt;option value="e"&gt;e 53&lt;/option&gt; &lt;/select&gt; </code></pre> <p>Looks simple, but i cannot figure it out. Any ideas?</p>
0debug
int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags) { BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; int ret; AVFrame *cur_frame; if (!av_fifo_size(buf->fifo)) { if (inlink->closed) return AVERROR_EOF; if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST) return AVERROR(EAGAIN); if ((ret = ff_request_frame(inlink)) < 0) return ret; } if (!av_fifo_size(buf->fifo)) return AVERROR(EINVAL); if (flags & AV_BUFFERSINK_FLAG_PEEK) { cur_frame = *((AVFrame **)av_fifo_peek2(buf->fifo, 0)); if ((ret = av_frame_ref(frame, cur_frame)) < 0) return ret; } else { av_fifo_generic_read(buf->fifo, &cur_frame, sizeof(cur_frame), NULL); av_frame_move_ref(frame, cur_frame); av_frame_free(&cur_frame); } return 0; }
1threat
jQuery: onclick method for every buttons with id starting with : <p>I have a set of buttons with ids "del1", "del2", and so on. I'm trying to make an onclick function that fires when any of those buttons are clicked on. So basically replace:</p> <pre><code>$(document).on('click', '#del1', function(e) { alert("For button1"); }); $(document).on('click', '#del2', function(e) { alert("For button2"); }); etc </code></pre> <p>With a single function. The amount of buttons can change, and there's no limit to the amount of buttons. How can I do this?</p>
0debug
static void pxa2xx_descriptor_load(PXA2xxLCDState *s) { PXAFrameDescriptor desc; target_phys_addr_t descptr; int i; for (i = 0; i < PXA_LCDDMA_CHANS; i ++) { s->dma_ch[i].source = 0; if (!s->dma_ch[i].up) continue; if (s->dma_ch[i].branch & FBR_BRA) { descptr = s->dma_ch[i].branch & FBR_SRCADDR; if (s->dma_ch[i].branch & FBR_BINT) pxa2xx_dma_bs_set(s, i); s->dma_ch[i].branch &= ~FBR_BRA; } else descptr = s->dma_ch[i].descriptor; if (!(descptr >= PXA2XX_SDRAM_BASE && descptr + sizeof(desc) <= PXA2XX_SDRAM_BASE + ram_size)) continue; cpu_physical_memory_read(descptr, (void *)&desc, sizeof(desc)); s->dma_ch[i].descriptor = tswap32(desc.fdaddr); s->dma_ch[i].source = tswap32(desc.fsaddr); s->dma_ch[i].id = tswap32(desc.fidr); s->dma_ch[i].command = tswap32(desc.ldcmd); } }
1threat
static attribute_align_arg void *frame_worker_thread(void *arg) { PerThreadContext *p = arg; FrameThreadContext *fctx = p->parent; AVCodecContext *avctx = p->avctx; AVCodec *codec = avctx->codec; while (1) { int i; if (p->state == STATE_INPUT_READY && !fctx->die) { pthread_mutex_lock(&p->mutex); while (p->state == STATE_INPUT_READY && !fctx->die) pthread_cond_wait(&p->input_cond, &p->mutex); pthread_mutex_unlock(&p->mutex); } if (fctx->die) break; if (!codec->update_thread_context && (avctx->thread_safe_callbacks || avctx->get_buffer == avcodec_default_get_buffer)) ff_thread_finish_setup(avctx); pthread_mutex_lock(&p->mutex); avcodec_get_frame_defaults(&p->frame); p->got_frame = 0; p->result = codec->decode(avctx, &p->frame, &p->got_frame, &p->avpkt); if (p->state == STATE_SETTING_UP) ff_thread_finish_setup(avctx); pthread_mutex_lock(&p->progress_mutex); for (i = 0; i < MAX_BUFFERS; i++) if (p->progress_used[i]) { p->progress[i][0] = INT_MAX; p->progress[i][1] = INT_MAX; } p->state = STATE_INPUT_READY; pthread_cond_broadcast(&p->progress_cond); pthread_cond_signal(&p->output_cond); pthread_mutex_unlock(&p->progress_mutex); pthread_mutex_unlock(&p->mutex); } return NULL; }
1threat
how to insert data in foreign key column in c# : I have a table that has an external key value. So I can save photos of a letter on the photo table. This table has three records. { Id is not null, Picture is not null, Latterid (Foreign key) is not null } I do not know what grammar should I write to add a bit to this table My program was used in C # and I used entityframework
0debug
operations not working in python 2.7 (uses easygui) : <p>Lately i tried to make a calculator using easy GUI yet the operations are not working i know the basics yet now i'm confused.</p> <pre><code>import easygui x = easygui.buttonbox("Caculator", choices = ['Addition', 'Subtraction', 'multiplication', 'Divison']) if x == 'Addition': xz = easygui.enterbox("First number: ") xp = easygui.enterbox("Second number: ") easygui.msgbox(int(xz + xp)) if x == 'Subtraction': xz = easygui.enterbox("First number: ") xp = easygui.enterbox("Second number: ") easygui.msgbox(int(xz - xp)) if x == 'multiplication': xz = easygui.enterbox("First number: ") xp = easygui.enterbox("Second number: ") easygui.msgbox(int(xz * xp)) if x == 'Divison': xz = easygui.enterbox("First number: ") xp = easygui.enterbox("Second number: ") easygui.msgbox(int(xz / xp)) </code></pre>
0debug
Combine two streams in Apache Flink regardless on window time : <p>I have two data streams that I want to combine. The problem is that one data stream has a much higher frequency than the other and there are times where one stream is not receiving events at all. Is it possible to use the last event from the one stream and join it with the other stream on every event that is coming?</p> <p>The only solution I found is using the join function, but you have to specify a common window, where you can apply the join function. This is window is not reached, when one stream is not receiving any events. </p> <p>Is there a possibility to apply the join function on every event that is coming from either one stream or the other and maintain state of the last consumed event and use this event for the join function?</p> <p>Thanks in advance for any helpful tips!</p>
0debug
Clickable functional diagram in html : How can i achieve this kind of diagram Link of the [image][1] Can i achieve this with something like charts? bit it must be responsive i've tried SVG but no success. [1]: http://(https://drive.google.com/a/mim-soft.com/file/d/0B3VIf9ZImYwyTjRueDhZZ05yTDA/view?usp=drivesdk
0debug
What does retag parameter in s/multi-spec mean? : <p>Can you explain with examples how does <code>retag</code> parameter impacts <code>multi-spec</code> creation? I find <code>multi-spec</code> documentation hard to digest.</p>
0debug
Can we include "strcmp" in printf statement? : <p>Can anyone explain what is the meaning of this line of code</p> <pre><code> printf("%d",strcmp("strcmp()","strcmp()")) </code></pre>
0debug
HTML Javascript message input not working : <pre><code>var age1 = 30; if(age1 &gt;= 13 &amp;&amp; age1 &lt;= 19){ message = "You are a teenager"; }else{ message = "You are not a teenager"; } </code></pre> <p>This code is pretty self explanatory, but when I run it in html It does not work, I don't know why. It does not give me any of the messages when run in HTML.</p>
0debug
static void omap_gp_timer_clk_setup(struct omap_gp_timer_s *timer) { omap_clk_adduser(timer->clk, qemu_allocate_irqs(omap_gp_timer_clk_update, timer, 1)[0]); timer->rate = omap_clk_getrate(timer->clk); }
1threat
PHP 7 mysqli_real_escape_string() Error : <p>I update php 5 to php 7 quite recently.so that when i run the project it gives following error.</p> <p><strong>Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\Project\Duplicate - Copy (2)\general.php on line 5</strong></p> <p>Here is the Code.</p> <pre><code>&lt;?php function sanitize($data){ return mysqli_real_escape_string($data); } ?&gt; </code></pre> <p>then i recoded connection like this.</p> <pre><code>$db = new PDO('mysql:host=localhost;dbname=test;charset=utf8mb4', 'root', ""); </code></pre> <p>can anyone help me please!</p>
0debug
static AVCodec *choose_codec(OptionsContext *o, AVFormatContext *s, AVStream *st, enum AVMediaType type) { char *codec_name = NULL; MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, st); if (!codec_name) { if (s->oformat) { st->codec->codec_id = av_guess_codec(s->oformat, NULL, s->filename, NULL, type); return avcodec_find_encoder(st->codec->codec_id); } } else if (!strcmp(codec_name, "copy")) st->stream_copy = 1; else { st->codec->codec_id = find_codec_or_die(codec_name, type, s->iformat == NULL); return s->oformat ? avcodec_find_encoder_by_name(codec_name) : avcodec_find_decoder_by_name(codec_name); } return NULL; }
1threat
static int h263_decode_init(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; int i; s->avctx = avctx; s->out_format = FMT_H263; s->width = avctx->width; s->height = avctx->height; switch(avctx->codec->id) { case CODEC_ID_H263: s->gob_number = 0; s->first_gob_line = 0; break; case CODEC_ID_MPEG4: s->time_increment_bits = 4; s->h263_pred = 1; s->has_b_frames = 1; break; case CODEC_ID_MSMPEG4V1: s->h263_msmpeg4 = 1; s->h263_pred = 1; s->msmpeg4_version=1; break; case CODEC_ID_MSMPEG4V2: s->h263_msmpeg4 = 1; s->h263_pred = 1; s->msmpeg4_version=2; break; case CODEC_ID_MSMPEG4V3: s->h263_msmpeg4 = 1; s->h263_pred = 1; s->msmpeg4_version=3; break; case CODEC_ID_WMV1: s->h263_msmpeg4 = 1; s->h263_pred = 1; s->msmpeg4_version=4; break; case CODEC_ID_H263I: s->h263_intel = 1; break; default: return -1; } if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) if (MPV_common_init(s) < 0) return -1; for(i=0;i<64;i++) s->non_intra_matrix[i] = default_non_intra_matrix[i]; if (s->h263_msmpeg4) msmpeg4_decode_init_vlc(s); else h263_decode_init_vlc(s); return 0; }
1threat
Elixir - Call method on module by String-name : <p>I'm pretty new to Elixir and functional programming-languages in general.</p> <p>In Elixir, I want to call one specific function on Modules, given the Module name as String.</p> <p>I've got the following (very bad) code working, which pretty much does what I want to:</p> <pre><code>module_name = elem(elem(Code.eval_file("module.ex", __DIR__), 0), 1) apply(module_name, :helloWorld, []) </code></pre> <p>This (at least as I understand it) compiles the (already compiled) module of <code>module.ex</code> in the current directory. I'm extracting the modules name (not as a String, don't know what data-type it actually is) out of the two tuples and run the method <code>helloWorld</code> on it.</p> <p>There are two problems with this code:</p> <ol> <li><p>It prints a warning like <code>redefining module Balance</code>. I certainly don't want that to happen in production.</p></li> <li><p>AFAIK this code compiles <code>module.ex</code>. But as module.ex is already compiled and loaded, it don't want that to happen.</p></li> </ol> <p>I don't need to call methods on these modules by filename, the module-name would be ok too. But it does have to by dynamic, eg. entering "Book" at the command line should, after a check whether the module exists, call the function <code>Book.helloWorld</code>.</p> <p>Thanks.</p>
0debug
static int usb_hid_handle_data(USBDevice *dev, USBPacket *p) { USBHIDState *us = DO_UPCAST(USBHIDState, dev, dev); HIDState *hs = &us->hid; uint8_t buf[p->iov.size]; int ret = 0; switch (p->pid) { case USB_TOKEN_IN: if (p->devep == 1) { int64_t curtime = qemu_get_clock_ns(vm_clock); if (!us->changed && (!us->idle || us->next_idle_clock - curtime > 0)) { return USB_RET_NAK; } usb_hid_set_next_idle(us, curtime); if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) { ret = hid_pointer_poll(hs, buf, p->iov.size); } else if (hs->kind == HID_KEYBOARD) { ret = hid_keyboard_poll(hs, buf, p->iov.size); } usb_packet_copy(p, buf, ret); us->changed = hs->n > 0; } else { goto fail; } break; case USB_TOKEN_OUT: default: fail: ret = USB_RET_STALL; break; } return ret; }
1threat
Facebook Messenger Chatbot how do I collect the users geo location that they send? : <p>In Facebook Messenger there is an icon allowing the user to send their geo coordinates. </p> <p><a href="https://i.stack.imgur.com/QFTtR.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/QFTtR.jpg" alt="Location Sent through Facebook Messenger"></a></p> <p>Is this available on the Facebook Messenger platform yet i.e. if a user sends me their location does my Chatbot have access to it? If so how is it done because i can't see it in the response in my webhook.</p>
0debug
After hosting Angular2 app on IIS direct url is not working : <p>We have developed Angular2 App.</p> <p>It is working fine while we are running under angular-cli with 'ng serve'.</p> <p>Once we host the app to IIS 7.5, we can browse to root of the app without much of the problem and we can navigate to whatever other views from app navigation created.</p> <p>But issue starts when user try to load url which is targeting specific route or component.</p> <p>so if we go to <strong><a href="http://serverurl" rel="noreferrer">http://serverurl</a></strong> ... it loads <strong>index.html</strong> and then clicking on navigation link on index.html it takes user to <strong><a href="http://serverurl/route1/component1" rel="noreferrer">http://serverurl/route1/component1</a></strong></p> <p>But when user tries to go to url <strong><a href="http://serverurl/route1/component1" rel="noreferrer">http://serverurl/route1/component1</a></strong> directly by typing <strong><a href="http://serverurl/route1/component1" rel="noreferrer">http://serverurl/route1/component1</a></strong> in browser address bar, it is sending that request to IIS, and that returns and error with resource not found.</p> <p>And it is easy to understand, that url is not exists on server. That is angular url. Ideally, it should load <strong>index.html</strong> and pass rest of the url to angular router and load that <strong>/route1/component1</strong>. And that works with 'ng serve' but does not work with IIS 7.5. Is there any settings I have to do in IIS to get it working ? Or in anything I have to do in Anuglar2 App ?</p> <p>Can anyone suggest me how to get this fixed?</p>
0debug
Django: Not Found static/admin/css : <p>I just deployed my first Django app on Heroku but I notice that it doesn't have any CSS like when I runserver on the local machine. I know there's something wrong with static files but I don't understand much about it even when I already read <a href="https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-static-files-in-development" rel="noreferrer">the docs</a>. I can do</p> <p><code>python3 manage.py collectstatic</code></p> <p>to create a static folder but I don't know where to put it and how to change the DIRS in settings.py. I really need some help to get rid of it.</p> <p><a href="https://i.stack.imgur.com/1NtBa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1NtBa.png" alt="root directory"></a></p> <p>settings.py:</p> <pre><code>DEBUG = True INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'household_management', ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] STATIC_ROOT = 'static' STATIC_URL = '/static/' </code></pre> <p>heroku logs:</p> <pre><code>2016-09-02T10:42:09.461124+00:00 heroku[router]: at=info method=GET path="/" host=peaceful-earth-63194.herokuapp.com request_id=33fc071d-344c-47e7-8721-919ba6d5df65 fwd="14.191.217.103" dyno=web.1 connect=2ms service=53ms status=302 bytes=400 2016-09-02T10:42:09.760323+00:00 heroku[router]: at=info method=GET path="/admin/login/?next=/" host=peaceful-earth-63194.herokuapp.com request_id=c050edcd-02d9-4c39-88ba-8a16be692843 fwd="14.191.217.103" dyno=web.1 connect=1ms service=45ms status=200 bytes=2184 2016-09-02T10:42:10.037370+00:00 heroku[router]: at=info method=GET path="/static/admin/css/login.css" host=peaceful-earth-63194.herokuapp.com request_id=ec43016a-09b7-499f-a84b-b8024577b717 fwd="14.191.217.103" dyno=web.1 connect=2ms service=9ms status=404 bytes=4569 2016-09-02T10:42:10.047224+00:00 heroku[router]: at=info method=GET path="/static/admin/css/base.css" host=peaceful-earth-63194.herokuapp.com request_id=6570ee02-3b78-44f4-9ab9-0e80b706ea40 fwd="14.191.217.103" dyno=web.1 connect=1ms service=16ms status=404 bytes=4566 2016-09-02T10:42:10.030726+00:00 app[web.1]: Not Found: /static/admin/css/login.css 2016-09-02T10:42:10.043743+00:00 app[web.1]: Not Found: /static/admin/css/base.css 2016-09-02T10:48:56.593180+00:00 heroku[api]: Deploy d1d39dc by huyvohcmc@gmail.com 2016-09-02T10:48:56.593290+00:00 heroku[api]: Release v21 created by huyvohcmc@gmail.com 2016-09-02T10:48:56.803122+00:00 heroku[slug-compiler]: Slug compilation started 2016-09-02T10:48:56.803127+00:00 heroku[slug-compiler]: Slug compilation finished 2016-09-02T10:48:56.893962+00:00 heroku[web.1]: Restarting 2016-09-02T10:48:56.894722+00:00 heroku[web.1]: State changed from up to starting 2016-09-02T10:48:59.681267+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2016-09-02T10:49:00.418357+00:00 app[web.1]: [2016-09-02 17:49:00 +0000] [9] [INFO] Worker exiting (pid: 9) 2016-09-02T10:49:00.418377+00:00 app[web.1]: [2016-09-02 17:49:00 +0000] [10] [INFO] Worker exiting (pid: 10) 2016-09-02T10:49:00.418393+00:00 app[web.1]: [2016-09-02 10:49:00 +0000] [3] [INFO] Handling signal: term 2016-09-02T10:49:00.477684+00:00 app[web.1]: [2016-09-02 10:49:00 +0000] [3] [INFO] Shutting down: Master 2016-09-02T10:49:00.594623+00:00 heroku[web.1]: Process exited with status 0 2016-09-02T10:49:00.607775+00:00 heroku[web.1]: Starting process with command `gunicorn assignment.wsgi --log-file -` 2016-09-02T10:49:02.911936+00:00 app[web.1]: [2016-09-02 10:49:02 +0000] [3] [INFO] Starting gunicorn 19.6.0 2016-09-02T10:49:02.912529+00:00 app[web.1]: [2016-09-02 10:49:02 +0000] [3] [INFO] Listening at: http://0.0.0.0:18162 (3) 2016-09-02T10:49:02.917427+00:00 app[web.1]: [2016-09-02 10:49:02 +0000] [9] [INFO] Booting worker with pid: 9 2016-09-02T10:49:02.912655+00:00 app[web.1]: [2016-09-02 10:49:02 +0000] [3] [INFO] Using worker: sync 2016-09-02T10:49:02.980208+00:00 app[web.1]: [2016-09-02 10:49:02 +0000] [10] [INFO] Booting worker with pid: 10 2016-09-02T10:49:04.228057+00:00 heroku[web.1]: State changed from starting to up 2016-09-02T10:53:41.572630+00:00 heroku[router]: at=info method=GET path="/" host=peaceful-earth-63194.herokuapp.com request_id=68c0b216-2084-46c8-9be5-b7e5aacaa590 fwd="14.191.217.103" dyno=web.1 connect=0ms service=42ms status=302 bytes=400 2016-09-02T10:53:41.880217+00:00 heroku[router]: at=info method=GET path="/admin/login/?next=/" host=peaceful-earth-63194.herokuapp.com request_id=17b91dc2-ba06-482c-8af0-e7b015fe2077 fwd="14.191.217.103" dyno=web.1 connect=0ms service=41ms status=200 bytes=2184 2016-09-02T10:53:42.156295+00:00 heroku[router]: at=info method=GET path="/static/admin/css/base.css" host=peaceful-earth-63194.herokuapp.com request_id=40dec62d-8c4a-4af6-8e0f-8053fe8379b9 fwd="14.191.217.103" dyno=web.1 connect=0ms service=9ms status=404 bytes=4566 2016-09-02T10:53:42.157491+00:00 heroku[router]: at=info method=GET path="/static/admin/css/login.css" host=peaceful-earth-63194.herokuapp.com request_id=3a29f200-c185-4344-a6e1-5af35e5d120e fwd="14.191.217.103" dyno=web.1 connect=0ms service=17ms status=404 bytes=4569 2016-09-02T10:53:42.164162+00:00 app[web.1]: Not Found: /static/admin/css/base.css 2016-09-02T10:53:42.177480+00:00 app[web.1]: Not Found: /static/admin/css/login.css 2016-09-02T11:01:19.031353+00:00 heroku[api]: Deploy 2beb15a by huyvohcmc@gmail.com 2016-09-02T11:01:19.031444+00:00 heroku[api]: Release v22 created by huyvohcmc@gmail.com 2016-09-02T11:01:19.262522+00:00 heroku[slug-compiler]: Slug compilation started 2016-09-02T11:01:19.262528+00:00 heroku[slug-compiler]: Slug compilation finished 2016-09-02T11:01:19.426837+00:00 heroku[web.1]: Restarting 2016-09-02T11:01:19.427455+00:00 heroku[web.1]: State changed from up to starting 2016-09-02T11:01:22.141325+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2016-09-02T11:01:22.545379+00:00 heroku[web.1]: Starting process with command `gunicorn assignment.wsgi --log-file -` 2016-09-02T11:01:22.754067+00:00 app[web.1]: [2016-09-02 18:01:22 +0000] [9] [INFO] Worker exiting (pid: 9) 2016-09-02T11:01:22.754077+00:00 app[web.1]: [2016-09-02 18:01:22 +0000] [10] [INFO] Worker exiting (pid: 10) 2016-09-02T11:01:22.757599+00:00 app[web.1]: [2016-09-02 11:01:22 +0000] [3] [INFO] Handling signal: term 2016-09-02T11:01:22.763197+00:00 app[web.1]: [2016-09-02 11:01:22 +0000] [3] [INFO] Shutting down: Master 2016-09-02T11:01:22.880977+00:00 heroku[web.1]: Process exited with status 0 2016-09-02T11:01:24.628348+00:00 app[web.1]: [2016-09-02 11:01:24 +0000] [3] [INFO] Starting gunicorn 19.6.0 2016-09-02T11:01:24.628921+00:00 app[web.1]: [2016-09-02 11:01:24 +0000] [3] [INFO] Listening at: http://0.0.0.0:34235 (3) 2016-09-02T11:01:24.629075+00:00 app[web.1]: [2016-09-02 11:01:24 +0000] [3] [INFO] Using worker: sync 2016-09-02T11:01:24.636198+00:00 app[web.1]: [2016-09-02 11:01:24 +0000] [9] [INFO] Booting worker with pid: 9 2016-09-02T11:01:24.722355+00:00 app[web.1]: [2016-09-02 11:01:24 +0000] [10] [INFO] Booting worker with pid: 10 2016-09-02T11:01:26.271435+00:00 heroku[web.1]: State changed from starting to up 2016-09-02T11:01:27.930795+00:00 heroku[router]: at=info method=GET path="/" host=peaceful-earth-63194.herokuapp.com request_id=a844ef4b-a2d1-44fe-af0e-09c76cb0e034 fwd="14.191.217.103" dyno=web.1 connect=0ms service=46ms status=302 bytes=400 2016-09-02T11:01:28.363163+00:00 heroku[router]: at=info method=GET path="/admin/login/?next=/" host=peaceful-earth-63194.herokuapp.com request_id=31c0823a-466f-4363-b550-3c81681305f5 fwd="14.191.217.103" dyno=web.1 connect=0ms service=171ms status=200 bytes=2184 2016-09-02T11:01:28.716801+00:00 heroku[router]: at=info method=GET path="/static/admin/css/base.css" host=peaceful-earth-63194.herokuapp.com request_id=2d1b8bb2-9ab3-49f7-b557-a54eed996547 fwd="14.191.217.103" dyno=web.1 connect=0ms service=8ms status=404 bytes=4566 2016-09-02T11:01:28.693936+00:00 heroku[router]: at=info method=GET path="/static/admin/css/login.css" host=peaceful-earth-63194.herokuapp.com request_id=24aa1eed-aa87-4854-ab35-1604e8393b9d fwd="14.191.217.103" dyno=web.1 connect=0ms service=18ms status=404 bytes=4569 2016-09-02T11:01:28.681948+00:00 app[web.1]: Not Found: /static/admin/css/base.css 2016-09-02T11:01:28.692958+00:00 app[web.1]: Not Found: /static/admin/css/login.css 2016-09-02T11:12:43.686922+00:00 heroku[api]: Deploy 63085e6 by huyvohcmc@gmail.com 2016-09-02T11:12:43.687037+00:00 heroku[api]: Release v23 created by huyvohcmc@gmail.com 2016-09-02T11:12:43.951987+00:00 heroku[slug-compiler]: Slug compilation started 2016-09-02T11:12:43.951998+00:00 heroku[slug-compiler]: Slug compilation finished 2016-09-02T11:12:43.926959+00:00 heroku[web.1]: Restarting 2016-09-02T11:12:43.929107+00:00 heroku[web.1]: State changed from up to starting 2016-09-02T11:12:46.931285+00:00 heroku[web.1]: Starting process with command `gunicorn assignment.wsgi --log-file -` 2016-09-02T11:12:47.860591+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2016-09-02T11:12:48.729601+00:00 app[web.1]: [2016-09-02 18:12:48 +0000] [10] [INFO] Worker exiting (pid: 10) 2016-09-02T11:12:48.729617+00:00 app[web.1]: [2016-09-02 18:12:48 +0000] [9] [INFO] Worker exiting (pid: 9) 2016-09-02T11:12:48.729623+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [3] [INFO] Handling signal: term 2016-09-02T11:12:48.775112+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [3] [INFO] Shutting down: Master 2016-09-02T11:12:48.890301+00:00 heroku[web.1]: Process exited with status 0 2016-09-02T11:12:48.839674+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [3] [INFO] Starting gunicorn 19.6.0 2016-09-02T11:12:48.840093+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [3] [INFO] Listening at: http://0.0.0.0:20001 (3) 2016-09-02T11:12:48.840166+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [3] [INFO] Using worker: sync 2016-09-02T11:12:48.843687+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [9] [INFO] Booting worker with pid: 9 2016-09-02T11:12:48.939210+00:00 app[web.1]: [2016-09-02 11:12:48 +0000] [10] [INFO] Booting worker with pid: 10 2016-09-02T11:12:50.565750+00:00 heroku[web.1]: State changed from starting to up 2016-09-02T11:13:00.439745+00:00 heroku[router]: at=info method=GET path="/" host=peaceful-earth-63194.herokuapp.com request_id=c30b47e6-fbb8-4412-9242-5fe37217026a fwd="14.191.217.103" dyno=web.1 connect=0ms service=49ms status=400 bytes=199 2016-09-02T11:14:01.686661+00:00 heroku[api]: Deploy c149525 by huyvohcmc@gmail.com 2016-09-02T11:14:01.686965+00:00 heroku[api]: Release v24 created by huyvohcmc@gmail.com 2016-09-02T11:14:02.189063+00:00 heroku[slug-compiler]: Slug compilation started 2016-09-02T11:14:02.189073+00:00 heroku[slug-compiler]: Slug compilation finished 2016-09-02T11:14:02.466456+00:00 heroku[web.1]: Restarting 2016-09-02T11:14:02.467005+00:00 heroku[web.1]: State changed from up to starting 2016-09-02T11:14:04.713176+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2016-09-02T11:14:05.259388+00:00 app[web.1]: [2016-09-02 18:14:05 +0000] [10] [INFO] Worker exiting (pid: 10) 2016-09-02T11:14:05.260345+00:00 app[web.1]: [2016-09-02 11:14:05 +0000] [3] [INFO] Handling signal: term 2016-09-02T11:14:05.265937+00:00 app[web.1]: [2016-09-02 18:14:05 +0000] [9] [INFO] Worker exiting (pid: 9) 2016-09-02T11:14:05.317647+00:00 app[web.1]: [2016-09-02 11:14:05 +0000] [3] [INFO] Shutting down: Master 2016-09-02T11:14:05.411311+00:00 heroku[web.1]: Process exited with status 0 2016-09-02T11:14:06.581314+00:00 heroku[web.1]: Starting process with command `gunicorn assignment.wsgi --log-file -` 2016-09-02T11:14:10.282506+00:00 heroku[web.1]: State changed from starting to up 2016-09-02T11:14:10.187781+00:00 app[web.1]: [2016-09-02 11:14:10 +0000] [3] [INFO] Starting gunicorn 19.6.0 2016-09-02T11:14:10.188490+00:00 app[web.1]: [2016-09-02 11:14:10 +0000] [3] [INFO] Listening at: http://0.0.0.0:27446 (3) 2016-09-02T11:14:10.188627+00:00 app[web.1]: [2016-09-02 11:14:10 +0000] [3] [INFO] Using worker: sync 2016-09-02T11:14:10.211822+00:00 app[web.1]: [2016-09-02 11:14:10 +0000] [9] [INFO] Booting worker with pid: 9 2016-09-02T11:14:10.231978+00:00 app[web.1]: [2016-09-02 11:14:10 +0000] [10] [INFO] Booting worker with pid: 10 2016-09-02T11:14:29.714607+00:00 heroku[router]: at=info method=GET path="/" host=peaceful-earth-63194.herokuapp.com request_id=947ed6b9-b48a-48b1-8860-36846248acea fwd="14.191.217.103" dyno=web.1 connect=0ms service=153ms status=302 bytes=400 2016-09-02T11:14:30.522664+00:00 heroku[router]: at=info method=GET path="/admin/login/?next=/" host=peaceful-earth-63194.herokuapp.com request_id=b74c55bf-913c-4e0d-8d16-2b1f4f0cea13 fwd="14.191.217.103" dyno=web.1 connect=0ms service=561ms status=200 bytes=2184 2016-09-02T11:14:30.879732+00:00 heroku[router]: at=info method=GET path="/static/admin/css/base.css" host=peaceful-earth-63194.herokuapp.com request_id=769f989a-f051-4a89-a079-1d6acea3c185 fwd="14.191.217.103" dyno=web.1 connect=0ms service=86ms status=404 bytes=4566 2016-09-02T11:14:30.865971+00:00 heroku[router]: at=info method=GET path="/static/admin/css/login.css" host=peaceful-earth-63194.herokuapp.com request_id=b271b831-a4fb-4bdb-9f6a-e4d66297db88 fwd="14.191.217.103" dyno=web.1 connect=0ms service=75ms status=404 bytes=4569 2016-09-02T11:14:30.865501+00:00 app[web.1]: Not Found: /static/admin/css/login.css 2016-09-02T11:14:30.871110+00:00 app[web.1]: Not Found: /static/admin/css/base.css </code></pre>
0debug
Java program to build and run a maven project : <p>I was trying to create a java application that automatically build my project.Is it possible to create a java program to run a maven project?</p>
0debug
static void *qemu_rdma_data_init(const char *host_port, Error **errp) { RDMAContext *rdma = NULL; InetSocketAddress *addr; if (host_port) { rdma = g_malloc0(sizeof(RDMAContext)); memset(rdma, 0, sizeof(RDMAContext)); rdma->current_index = -1; rdma->current_chunk = -1; addr = inet_parse(host_port, NULL); if (addr != NULL) { rdma->port = atoi(addr->port); rdma->host = g_strdup(addr->host); } else { ERROR(errp, "bad RDMA migration address '%s'", host_port); g_free(rdma); rdma = NULL; } qapi_free_InetSocketAddress(addr); } return rdma; }
1threat
How do I return path to file if it exists in python : <p>I have to check that file exists or not, and if it does, have to return path to it , the main problem is that <code>os.path.isdir</code> returns only <code>True</code> or <code>False</code> depending on existence, so it seems it does not fit. Any hints? Current schema in my mind is:</p> <pre><code>def get_config_path(): if exists(path1): return path1 if exists(path2): return path2 </code></pre>
0debug
Why isn't http server consuming a lot of CPU? : <p>The server should response as soon as possible, isn't the server process always polling if there are requests? So, it would like a while loop. But why is not CPU(single core) all consumed if there is no visit?</p>
0debug
what is wrong with those codes? (Objective - c) : <p><a href="https://i.stack.imgur.com/JLhkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JLhkA.png" alt="enter image description here"></a></p> <p>the / is fine but the % just dose not work. I don't know why...</p>
0debug
have two different column widths one div (Css, html, Js Jq) : i am currently trying to have a single div with a huge text split into two columns which have different widths. you could say, split up your text into two divs. which is not possible since i also want to be able to adjust the widths when nessesary lets say my html file looks like this: <style> #article{ width: 100%; column-count:2; column-gap 10vw; //webkit & moz stuff about columns } </style> <article id="main-article"> really long text devided into two columns... </article> JS or JQ will be allowed to spit up the text afterwards
0debug
'vertical-align: middle' does not work : <p><a href="http://codepen.io/abdulahhamzic/pen/rLBoOj" rel="nofollow">http://codepen.io/abdulahhamzic/pen/rLBoOj</a></p> <p>I'm trying to get the paragraphs (the name and other info of the stream) to be vertically aligned in the middle of their div parents. I'm trying this CSS code and it is not working:</p> <pre><code>.col-sm-4{ text-align: right; vertical-align: middle; } </code></pre>
0debug
bundler's executable "bundle" conflicts with /usr/local/bin/bundle Overwrite the executable? : <p>When I install jekyll bundle and entering the command of <code>gem install jekyll bundler</code>. The terminal pop up the message of bundler's executable "bundle" conflicts with /usr/local/bin/bundle</p> <p>Overwrite the executable?</p>
0debug
Overloaded function template disambiguation with `std::enable_if` and non-deduced context : <p>Consider the following code:</p> <pre><code>template &lt;typename T&gt; struct dependent_type { using type = T; }; template &lt;typename T&gt; auto foo(T) -&gt; std::enable_if_t&lt;std::is_same&lt;T, int&gt;{}&gt; { std::cout &lt;&lt; "a\n"; } template&lt;typename T&gt; void foo(typename dependent_type&lt;T&gt;::type) { std::cout &lt;&lt; "b\n"; } </code></pre> <ul> <li><p>The first overload of <code>foo</code> can deduce <code>T</code> from its invocation.</p></li> <li><p>The second overload of <code>foo</code> is a <a href="http://en.cppreference.com/w/cpp/language/template_argument_deduction#Non-deduced_contexts" rel="noreferrer"><em>non-deduced context</em></a>.</p></li> </ul> <p></p> <pre><code>int main() { foo&lt;int&gt;( 1 ); // prints "b" foo&lt;double&gt;( 1.0 ); // prints "b" foo( 1 ); // prints "a" } </code></pre> <p><strong>Why does <code>foo&lt;int&gt;( 1 )</code> print "b" and not "a"?</strong></p> <p><a href="http://melpon.org/wandbox/permlink/rzRrewtogo1iCjAv" rel="noreferrer"><strong>wandbox example</strong></a></p>
0debug
How to create Stripe elements postal code that accepts UK postcodes? : <p>I'm creating a payment form with separate Stripe Elements:</p> <pre class="lang-js prettyprint-override"><code>var stripe = Stripe(...); var elements = stripe.elements(); ... var postalCode = elements.create('postalCode'); postalCode.mount('#postalCode'); </code></pre> <p>This creates a field that accepts only digits. However, the UK's post codes contain letter as well. How do I allow these too? I want the user to be able to input pretty much any possible post code in the world.</p>
0debug
static void m5206_mbar_writel(void *opaque, target_phys_addr_t offset, uint32_t value) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset >= 0x200) { hw_error("Bad MBAR write offset 0x%x", (int)offset); } width = m5206_mbar_width[offset >> 2]; if (width < 4) { m5206_mbar_writew(opaque, offset, value >> 16); m5206_mbar_writew(opaque, offset + 2, value & 0xffff); return; } m5206_mbar_write(s, offset, value, 4); }
1threat
R - what does this tapply() function do? : <p>Please excuse my terrible knowledge of the language - just started looking at it a few hours ago.</p> <p>I'm trying to understand this code and what it produces but quite unsure. Given that the value of <code>inclusions</code> is 10, why is the output what it is?</p> <p><code>seps &lt;- tapply(diff, nonCore, function(x) sort(x)[inclusions])</code></p> <p>Outputs</p> <pre><code>"","x" "ab",23 "ad",15 </code></pre> <p>The value of <code>diff</code> is</p> <pre><code>"","x" "1",31 "2",43 "3",37 "4",22 "5",27 "6",13 "7",24 "8",7 "9",26 "10",29 "11",2 "12",15 "13",10 "14",38 "15",23 "16",21 "17",46 "18",10 "19",20 "20",46 "21",20 "22",32 "23",26 "24",11 "25",16 "26",2 "27",13 "28",4 "29",15 "30",18 "31",13 "32",26 "33",1 "34",27 "35",12 "36",10 "37",35 "38",21 "39",9 "40",35 </code></pre> <p>The value of <code>nonCore</code> is</p> <pre><code>"","x" "1","ab" "2","ab" "3","ab" "4","ab" "5","ab" "6","ab" "7","ab" "8","ab" "9","ab" "10","ab" "11","ab" "12","ab" "13","ab" "14","ab" "15","ab" "16","ab" "17","ab" "18","ab" "19","ab" "20","ab" "21","ad" "22","ad" "23","ad" "24","ad" "25","ad" "26","ad" "27","ad" "28","ad" "29","ad" "30","ad" "31","ad" "32","ad" "33","ad" "34","ad" "35","ad" "36","ad" "37","ad" "38","ad" "39","ad" "40","ad" </code></pre>
0debug
static void load_word(DBDMA_channel *ch, int key, uint32_t addr, uint16_t len) { dbdma_cmd *current = &ch->current; uint32_t val; DBDMA_DPRINTF("load_word\n"); if (key != KEY_SYSTEM) { printf("DBDMA: LOAD_WORD, unimplemented key %x\n", key); kill_channel(ch); return; } cpu_physical_memory_read(addr, (uint8_t*)&val, len); if (len == 2) val = (val << 16) | (current->cmd_dep & 0x0000ffff); else if (len == 1) val = (val << 24) | (current->cmd_dep & 0x00ffffff); current->cmd_dep = val; if (conditional_wait(ch)) goto wait; current->xfer_status = cpu_to_le16(be32_to_cpu(ch->regs[DBDMA_STATUS])); dbdma_cmdptr_save(ch); ch->regs[DBDMA_STATUS] &= cpu_to_be32(~FLUSH); conditional_interrupt(ch); next(ch); wait: qemu_bh_schedule(dbdma_bh); }
1threat
build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets, const char *oem_id, const char *oem_table_id) { AcpiRsdtDescriptorRev1 *rsdt; size_t rsdt_len; int i; const int table_data_len = (sizeof(uint32_t) * table_offsets->len); rsdt_len = sizeof(*rsdt) + table_data_len; rsdt = acpi_data_push(table_data, rsdt_len); memcpy(rsdt->table_offset_entry, table_offsets->data, table_data_len); for (i = 0; i < table_offsets->len; ++i) { bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, ACPI_BUILD_TABLE_FILE, table_data, &rsdt->table_offset_entry[i], sizeof(uint32_t)); } build_header(linker, table_data, (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id); }
1threat
static int kvm_mce_in_exception(CPUState *env) { struct kvm_msr_entry msr_mcg_status = { .index = MSR_MCG_STATUS, }; int r; r = kvm_get_msr(env, &msr_mcg_status, 1); if (r == -1 || r == 0) { return -1; } return !!(msr_mcg_status.data & MCG_STATUS_MCIP); }
1threat
HTML (php) how to check uncheck checkbox all at the same time : All I want is to check / uncheck all of the choices with one check button. <!DOCTYPE html> <html> <body> <form action="process.php" method="post"> <p> Select pet: </p> <p> <input type="checkbox" name="dog" value="dog"> Dog </p> <p> <input type="checkbox" name="cat" value="cat"> Cat </p> <p> <input type="checkbox" name="bird" value="Tbird"> Bird </p> <p> <input type="checkbox" name="checkall" value="checkall"> All </p> </body> </html> what code / codes am I missing? I need "All" to uncheck / check all choices if it is chosen by the user. I use xampp for this one. Thank you
0debug
Remote debugging Java 9 in a docker container from IntelliJ IDEA : <p>I have a Dockerfile with this content:</p> <pre><code>FROM openjdk:9 WORKDIR /project ADD . /project EXPOSE 5005 </code></pre> <p>My docker-compose.yml looks like this:</p> <pre><code>version: "3.2" services: some-project: build: . ports: - target: 5005 published: 5005 protocol: tcp mode: host command: "java '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005' SomeClass" </code></pre> <p>When I do <strong>docker-composer up</strong> I see a message "<em>Listening for transport dt_socket at address: 5005</em>". But when I try to connect with jdb or Idea I get "<em>java.io.IOException: handshake failed - connection prematurally closed</em>".</p> <p>Everything works fine if I change <strong>openjdk:9</strong> to <strong>openjdk:8</strong>. However, I need Java 9 for my project. </p>
0debug
Cannot read property 'whitelist' of undefined when importing ngrx dev tools : <p>Importing <a href="https://github.com/ngrx/store-devtools" rel="noreferrer">ngrx devtools</a> to enable a <strong>debugger</strong> for <strong>chrome</strong> tools results to an <strong>error</strong> below:</p> <blockquote> <p>ERROR TypeError: Cannot read property 'whitelist' of undefined at isFiltered (:1:5016) at Object.x [as send] (:1:74196) at DevtoolsExtension.notify (store-devtools.js:210) at ScanSubscriber.StoreDevtools.liftedAction$.pipe.Object.state [as accumulator] (store-devtools.js:649) at ScanSubscriber._tryNext (scan.js:61) at ScanSubscriber._next (scan.js:54) at ScanSubscriber.Subscriber.next (Subscriber.js:54) at WithLatestFromSubscriber._next (withLatestFrom.js:66) at WithLatestFromSubscriber.Subscriber.next (Subscriber.js:54) at Notification.observe (Notification.js:15)</p> </blockquote> <p>This are my versions below of ngrx:</p> <pre><code> "@ngrx/core": "^1.2.0", "@ngrx/effects": "^6.1.2", "@ngrx/store": "^6.1.2", "@ngrx/store-devtools": "^6.1.2", </code></pre> <p>and my <strong>angular</strong> and <strong>ionic</strong></p> <pre><code> "@angular/animations": "5.2.11", "@angular/common": "5.2.11", "@angular/compiler": "5.2.11", "@angular/compiler-cli": "5.2.11", "@angular/core": "5.2.11", "@angular/forms": "5.2.11", "@angular/http": "5.2.11", "@angular/platform-browser": "5.2.11", "@angular/platform-browser-dynamic": "5.2.11", "@ionic-native/core": "~4.17.0", "@ionic-native/splash-screen": "~4.17.0", "@ionic-native/status-bar": "~4.17.0", </code></pre> <p>Whenever I try to import this code below on <strong>app.module</strong> is always shows the error that I displayed on top.</p> <pre><code> StoreDevtoolsModule.instrument({ maxAge: 15 }), </code></pre> <p>The error on top refers to this line of code in my <strong>console</strong> on line <strong>210</strong></p> <pre><code>this.extensionConnection.send(sanitizedAction, sanitizedState); </code></pre> <p>Appreciate if someone could help. Thanks in advance.</p>
0debug
Will I be Charged for a VM instance which was running in a project I shut down? : <p>I have recently shut down a project and I had a VM instance running in that. Will that charge my free trial credit even after shut down?? If yes, will it charge even after deletion(after 30 days of shut down)</p>
0debug
XML to CSV using XSLT trouble shooting : I am new to XML and XSLT and have a need to convert an Rest API response XML to CSV using XSLT and I need the XSLT doc to attach to the program. I tried several online tutorials but the transformation is reading all the elements not just the way I need them. Can some one please help me! XML is below <convertTo xmlns="http://xecdapi.xe.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://xecdapi.xe.com/schema/v1/convertTo.xsd" class=" cd-browser-extension"> <terms>http://www.xe.com/legal/dfs.php</terms> <privacy>http://www.xe.com/privacy.php</privacy> <to>USD</to> <amount>1.0</amount> <timestamp>2018-10-25T00:00:00Z</timestamp> <from> <rate> <currency>AUD</currency> <mid>1.4160280983</mid> </rate> <rate> <currency>SGD</currency> <mid>1.3814918146</mid> </rate> <rate> <currency>EUR</currency> <mid>0.8773448168</mid> </rate> <rate> <currency>GBP</currency> <mid>0.7760517332</mid> </rate> <rate> <currency>CAD</currency> <mid>1.3048398838</mid> </rate> <rate> <currency>INR</currency> <mid>73.3497808743</mid> </rate> </from> </convertTo> CSV output needed [CSV Imange][1] [1]: https://i.stack.imgur.com/uxC16.jpg
0debug
void rgb15tobgr16(const uint8_t *src, uint8_t *dst, unsigned int src_size) { unsigned i; unsigned num_pixels = src_size >> 1; for(i=0; i<num_pixels; i++) { unsigned b,g,r; register uint16_t rgb; rgb = src[2*i]; r = rgb&0x1F; g = (rgb&0x3E0)>>5; b = (rgb&0x7C00)>>10; dst[2*i] = (b&0x1F) | ((g&0x3F)<<5) | ((r&0x1F)<<11); } }
1threat
static uint64_t apb_pci_config_read(void *opaque, target_phys_addr_t addr, unsigned size) { uint32_t ret; APBState *s = opaque; ret = pci_data_read(s->bus, addr, size); ret = qemu_bswap_len(ret, size); APB_DPRINTF("%s: addr " TARGET_FMT_lx " -> %x\n", __func__, addr, ret); return ret; }
1threat
StringOutputVisitor *string_output_visitor_new(bool human) { StringOutputVisitor *v; v = g_malloc0(sizeof(*v)); v->string = g_string_new(NULL); v->human = human; v->visitor.type = VISITOR_OUTPUT; v->visitor.type_int64 = print_type_int64; v->visitor.type_uint64 = print_type_uint64; v->visitor.type_size = print_type_size; v->visitor.type_bool = print_type_bool; v->visitor.type_str = print_type_str; v->visitor.type_number = print_type_number; v->visitor.start_list = start_list; v->visitor.next_list = next_list; v->visitor.end_list = end_list; v->visitor.free = string_output_free; return v; }
1threat
C++: Is there a way to access protected vector size via main function without turning it to public? : I've been working on a Shape program lately ( Some of you might remember my other questions about this... ;/ ) And I have a tiny problem which I want to fix. In my Menu class, which holds all the functions related to the menu. I have a unique_ptr vector with the type of my base class Shape which holds all of the newly created objects ( Circles, Rectangles, ect ) ``` protected: vector<unique_ptr<Shape>> _shapes; ``` One of the functions that I want to create is supposed to change the values of the variables in a given shape based on it's index. To do so, I was planning to print the vector to the user, and then let him to choose the index of the shape that he wants to change. ``` void Menu::printShapes() const { int i = 0; for (auto p = _shapes.begin(); p != _shapes.end(); p++, i++) { cout << i + " "; (*p)->printDetails(); cout << endl; } } ``` The problems lays in my main program which is going to use my Menu functions. Because I don't want the user to be able to enter values which are outside of my vector, I have to check if the given input is between 0 and the size of the vector. But I cannot access this info from my main function without making the vector public or make a return statement from the printShapes() function, which will make the code messy and not intuitive as I want it to be. So my question is: Is there a way to find the size of the vector at the Menu function from the main function without making the changes I stated above? Because in the end I want to be able to just do ```menu.printShapes()``` and then let the user to choose the index of the shape that he wants to change this is my main function as of now: ``` Menu menu; int input = 0, wait = 0; while (input != 4) { cout << "1: Add New Shape: " << endl; cout << "2: Modify Existing Shape: " << endl; cout << "3: Delete All Shapes: " << endl; cout << "4: Exit: " << endl; while (input < MIN || input > MAX) { cin >> input; cin.ignore(numeric_limits<streamsize>::max(), '\n'); std::cin >> wait; } switch (input) { case 1: { cout << "1: Circle: " << endl; cout << "2: Rectangle: " << endl; cout << "3: Triangle: " << endl; cout << "4: Arrow: " << endl; while (input < MIN || input > MAX) { cin >> input; cin.ignore(numeric_limits<streamsize>::max(), '\n'); std::cin >> wait; } menu.createShape(input); } case 2: { //Here I want to check for the input based on the size of vector } } } ``` Thanks a lot for the helpers :D
0debug
How to pass arguments to entrypoint in docker-compose.yml : <p>I use this image: dperson/samba</p> <p>The image is defining it's own entrypoint and I do not want to override it.</p> <p>I need to pass arguments to the entrypoint, easy with docker only:</p> <pre><code>docker run ... dperson/samba arg1 arg2 arg3 </code></pre> <p>But how to do it with docker_compose.yml ?</p> <p>Right now I use as a workaround: </p> <pre><code>command: samba.sh arg1 arg2 arg3 </code></pre> <p>But it is not satisfying as I force the redefinition of the entrypoint.</p>
0debug