problem
stringlengths
26
131k
labels
class label
2 classes
C++ keeps skipping my "for" loop : <p>I'm trying to create a program that will find a four-digit number that meets four specific requirements: all four digits are different, the thousands number is 3x the tens number, the number is odd, and the sum of the digits is 27. For some reason, despite the program compiling, th...
0debug
Simple local search function. Javascript and JSON? : <p>Building a 'fake' web browser and web pages that are all compiled locally in a windows form application. The whole thing operates offline.</p> <p>I need to build a search function on one of the web pages I've made. Obviously theirs no server involved, so I have t...
0debug
How can I create a java program that reads from the user a number and searches for that number in an array? : <p>This is the code which I've tried so far: </p> <pre><code>int num; int[] a={2, 3, 4,7, 9}; System.out.println("enter a no"); for(int i=0; i&lt;a.length; i++){ num= in.nextInt...
0debug
static int start_auth_vnc(VncState *vs) { make_challenge(vs); vnc_write(vs, vs->challenge, sizeof(vs->challenge)); vnc_flush(vs); vnc_read_when(vs, protocol_client_auth_vnc, sizeof(vs->challenge)); return 0; }
1threat
Create a file on .jar folder same that are in project java : How I can create a file on the .jar folder that is on the project folder? Thanks, and sorry for my bad english :v
0debug
What is the difference between new pointer and simple pointer? : What is the difference between those two declarations? ``` int *p = new int; int *q; ```
0debug
int64_t qemu_clock_get_ns(QEMUClockType type) { int64_t now, last; QEMUClock *clock = qemu_clock_ptr(type); switch (type) { case QEMU_CLOCK_REALTIME: return get_clock(); default: case QEMU_CLOCK_VIRTUAL: if (use_icount) { return cpu_get_icount(); ...
1threat
int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; if (!swr_is_initialized(s)) { av_log(s, AV_LOG_ERROR, "Context has not been i...
1threat
Semaphore Wait vs WaitAsync in an async method : <p>I'm trying to find out what is the difference between the SemaphoreSlim use of Wait and WaitAsync, used in this kind of context:</p> <pre><code>private SemaphoreSlim semaphore = new SemaphoreSlim(1); public async Task&lt;string&gt; Get() { // What's the difference...
0debug
int omap_validate_emifs_addr(struct omap_mpu_state_s *s, target_phys_addr_t addr) { return addr >= OMAP_EMIFS_BASE && addr < OMAP_EMIFF_BASE; }
1threat
android textview issue in run() : class BTCSync extends Thread{ public void run(){ while(!BTC && MainPage.BTC){ TextView BTCPer = (TextView) findViewById(R.id.lblBTCPer); BTCPer.setText(BTCProgress+"%"); if(BTCProgress == 1...
0debug
Two arrays into one Dictinary C# : <p>I would like to create a</p> <p><code>Dictionary&lt;string, int[]&gt; dict</code></p> <p>out of two arrays(different length):</p> <pre><code>string[] keys = { "A", "B", "A", "D", "C","E" }; string[] values = { green, blue, yellow}; </code></pre> <p>The results:</p> <pre><code>...
0debug
configuration.module has an unknown property 'loaders' : <p>my output of error:</p> <blockquote> <p>Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.module has an unknown property 'loaders'. These properties are valid: ...
0debug
Spy on setTimeout and clearTimeout in Karma and Jasmine : <p>I cannot seem to be able to spy on <code>setTimeout</code> and <code>clearTimeout</code> in my Jasmine tests, which are being run through Karma. </p> <p>I have tried variations on all of this</p> <pre><code>spyOn(window, 'setTimeout').and.callFake(()=&gt;{}...
0debug
i have table formatted data and wanted to convert into tuple format : <p>I have a csv file mentioned as below screen shot ...</p> <p><a href="https://i.stack.imgur.com/WAVzb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WAVzb.png" alt="enter image description here"></a></p> <p>and i want to conve...
0debug
Check if a date is in between collection of Date Periods : <p>I'm trying to find if a given date falls between a collection of periods I have a period class with start and end dates, and a date to check if it is in the collection of periods. Here is the sample code to work with.</p> <pre><code>public class Period { ...
0debug
Javascript re-assign let variable with destructuring : <p>In my React app I am using airbnb's eslint style guide which will throw an error if I do not use destructuing.</p> <p>In the situation below, I first use <code>let</code> to assign the two variables <code>latitude</code> and <code>longitude</code> to the coordi...
0debug
static void pnv_chip_realize(DeviceState *dev, Error **errp) { PnvChip *chip = PNV_CHIP(dev); Error *error = NULL; PnvChipClass *pcc = PNV_CHIP_GET_CLASS(chip); char *typename = pnv_core_typename(pcc->cpu_model); size_t typesize = object_type_get_instance_size(typename); int i, core_hwid; if...
1threat
How to use PhpSpreadsheet without installation (like PHPExcel) : <p>According to the <a href="https://phpspreadsheet.readthedocs.io/en/develop/#installation" rel="noreferrer">PhpSpreadsheet Doc</a> it's neccessary to install it with composer. In my case I just have a webspace without Terminal but Plesk. Is it anyway p...
0debug
Access OBDC Connection to SQL SERVER : I setup a new user with a new computer and installed MS Office. When I open the link to the access DB I get the error "OBDC - connection to SQL Server Native Client 11.0Path/of/Accessdb" Unfortunately I did not develop the Access DB and have no documentation on how to configur...
0debug
static void test_tco_timeout(void) { TestData d; const uint16_t ticks = TCO_SECS_TO_TICKS(4); uint32_t val; int ret; d.args = NULL; d.noreboot = true; test_init(&d); stop_tco(&d); clear_tco_status(&d); reset_on_second_timeout(false); set_tco_timeout(&d, ticks)...
1threat
static int ahci_dma_prepare_buf(IDEDMA *dma, int is_write) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); IDEState *s = &ad->port.ifs[0]; ahci_populate_sglist(ad, &s->sg, 0); s->io_buffer_size = s->sg.size; DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size); return s->io_buffer...
1threat
div inside form-group does not display with correct width : thanks for the help. I have the following `developers_controller` and I want to perform a query based on the `location_params`. In the `index_update` action I create a variable `location` with the `location_params` that the user gave as input for the resear...
0debug
Explain please need help understanding code : ap = argparse.ArgumentParser() ap.add_argument("--image", "-i", required = True, help = "Path to input image") ap.add_argument("--template", "-t", required = True, help = "Path to template image") args = vars(ap.parse_args()) --Could somone help me understand what i n...
0debug
static inline void hcscale_fast_c(SwsContext *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc) { int i; unsigned int xpos=0; for (i=0;i<dstWidth;i++) { register unsi...
1threat
void qemu_bh_cancel(QEMUBH *bh) { QEMUBH **pbh; if (bh->scheduled) { pbh = &first_bh; while (*pbh != bh) pbh = &(*pbh)->next; *pbh = bh->next; bh->scheduled = 0; } }
1threat
static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, Error **errp) { VirtIOBlock *s = VIRTIO_BLK(vdev); virtio_add_feature(&features, VIRTIO_BLK_F_SEG_MAX); virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY); virtio_add_feature(...
1threat
static void pc_init1(MachineState *machine) { PCMachineState *pc_machine = PC_MACHINE(machine); MemoryRegion *system_memory = get_system_memory(); MemoryRegion *system_io = get_system_io(); int i; ram_addr_t below_4g_mem_size, above_4g_mem_size; PCIBus *pci_bus; ISABus *isa_bus; ...
1threat
What is the difference between Object[] obj and Object obj[] in java? : <p>I wrote a code using two type of Object styles. Both are working properly. I just want to know what is the difference between these both types.</p> <pre><code>PatientsTabData ob[] = {new PatientsTabData().SetPatientId( Integer.p...
0debug
How to upload/access database online : <p>I have a small POS system in my store, and i want to create a new app and install it to my laptop, the problem is how to access the database even im far away. Where can i upload my database to be accesible through internet?</p> <p>I am using MySQL and C# windows form applicati...
0debug
C++ map with custom comparator not inserting all elements : <p>I have created the following comparator to test the map:</p> <pre><code>struct comparator{ bool operatior() (int a,int b){ return 1; } } </code></pre> <p>then the following algorthim:</p> <pre><code>int main(){ // imports string to cu...
0debug
TranslationBlock *tb_gen_code(CPUState *cpu, target_ulong pc, target_ulong cs_base, uint32_t flags, int cflags) { CPUArchState *env = cpu->env_ptr; TranslationBlock *tb; tb_page_addr_t phys_pc, phys_page2; target_ulong virt_page2; t...
1threat
Accessing varibles inside Self-Executing Anonymous Function : as per my knowledge varibles inside Self-Executing Anonymous Function are not accessible from outside but how come var q is accessible outside and y not var p then (function(){ var p = q= 20; })() alert(q) --> 10 alert(p) --> p is undefined is the...
0debug
void pcspk_init(PITState *pit) { PCSpkState *s = &pcspk_state; s->pit = pit; register_ioport_read(0x61, 1, 1, pcspk_ioport_read, s); register_ioport_write(0x61, 1, 1, pcspk_ioport_write, s); }
1threat
Load images from internal memory to imageview android : [enter image description here][1][2]How to display images from internal storage of phone to imageview android? no image is loaded in imageview.my phone's version is Marshmallow. [1]: https://i.stack.imgur.com/J7b1L.png [2]: https://i.stack.imgur.com...
0debug
How to debug Fable using Visual Studio (not Code) : <p>I know it is possible to debug Fable apps in VS Code and hit breakpoints, but I haven't seen any examples of such when using Visual Studio. How can one debug Fable apps using Visual Studio, being able to hit breakpoints, inspect variables, etc.?</p>
0debug
How to pass a data from a link and then print it in a controller in Codeigniter : <p>I want to pass a data from a link and then print it in a controller. This is my View:</p> <pre><code>&lt;a href="&lt;?php echo site_url("Main_controller/show_chronicles/".$row-&gt;chronicles_no); ?&gt;"&gt;Chronicles&lt;/a&gt; </code>...
0debug
Spring boot validation annotations @Valid and @NotBlank not working : <p>Given below is my main controller from which i am calling getPDFDetails method.</p> <pre><code>@RequestMapping(value=PATH_PRINT_CONTRACTS, method=RequestMethod.POST) public ResponseEntity&lt;?&gt; printContracts(@RequestBody final UpdatePrint...
0debug
Pass command line args to npm scripts in package.json : <p>I have the below scripts in my package.json:</p> <pre><code>"scripts": { "vumper": "node node_modules/vumper/index.js", "format": "prettier --single-quote -width=80 --write package.json" }, </code></pre> <p>The 'vumper' package takes in a command lin...
0debug
How to use OpenCV in the Flutter SDK? : <p>I have been trying to find a Flutter OpenCV library. I'm looking to handle facial recognition through eye positioning. I need this to be for both android and iOS. I found one for C++ which I think Flutter compiles to as well as Swift/Objective C libraries. I am wondering which...
0debug
static void ff_h264_idct_add8_mmx(uint8_t **dest, const int *block_offset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]){ int i; for(i=16; i<16+8; i++){ if(nnzc[ scan8[i] ] || block[i*16]) ff_h264_idct_add_mmx (dest[(i&4)>>2] + block_offset[i], block + i*16, stride); } }
1threat
Multi Array Sorting : <p>My Array is like this</p> <pre><code>Array ( [0] =&gt; Array ( [salesID] =&gt; 7 [creditID] =&gt; 9 [amount] =&gt; 80400.00 [due_date] =&gt; 2018-12-12 [status] =&gt; no [given_date] =&gt; 2018-09-30 [av_class] =&gt; table-warning ...
0debug
pandas: groupby and aggregate without losing the column which was grouped : <p>I have a pandas dataframe as below. For each Id I can have multiple Names and Sub-ids.</p> <pre><code>Id NAME SUB_ID 276956 A 5933 276956 B 5934 276956 C 5935 287266 D 1589 </code></pre> <p>I want to condense...
0debug
what's the different with using $scope and explicitly using ctrl as namespace? : <p>We can use <code>$scope</code> as a namespace in angularJS</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-js lang-js prettyprin...
0debug
How to make WebStorm format code according to eslint? : <p>I've specified eslint configuration for my WebStorm project. But it does not seem to apply to code reformat feature. For example, it continues to format <code>import { something } from 'somewhere'</code> as <code>import {something} from 'somewhere'</code>.</p> ...
0debug
static int vfio_set_resample_eventfd(VFIOINTp *intp) { VFIODevice *vbasedev = &intp->vdev->vbasedev; struct vfio_irq_set *irq_set; int argsz, ret; int32_t *pfd; argsz = sizeof(*irq_set) + sizeof(*pfd); irq_set = g_malloc0(argsz); irq_set->argsz = argsz; irq_set->flags = VFIO_I...
1threat
How do I do strikethrough (line-through) in asciidoc? : <p>How do I render a strikethrough (or line-through) in an <code>adoc</code> file?</p> <p>Let's presume I want to write "That technology is -c-r-a-p- not perfect."</p>
0debug
static void rng_random_finalize(Object *obj) { RndRandom *s = RNG_RANDOM(obj); qemu_set_fd_handler(s->fd, NULL, NULL, NULL); if (s->fd != -1) { qemu_close(s->fd); } g_free(s->filename); }
1threat
Window batch / DOS script to remove duplicate words in a string : <p>Can anyone help me with window batch / DOS script to remove in a string. </p> <p>If the string is -</p> <p>test1 test2 test1 test3 test2 test3</p> <p>I need a script to display as </p> <p>test1 test2 test3</p>
0debug
which namespace is need to add for mathematical functions like sin,asin in c# : i need to calculate the following equation.which namespace is needed to add?.I used using.System but its not detected my code and contains error double n= arcsin(sin(0.1570) / cos(_savedPosition.Latitude));
0debug
RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, RTPPayloadData *rtp_payload_data) { RTPDemuxContext *s; s = av_mallocz(sizeof(RTPDemuxContext)); if (!s) return NULL; s->payload_type = payload_type; s->last_rtcp_ntp_time = AV_NOP...
1threat
Decimal Separated String List as Tree in Java : Please consider the following data, which i am getting as list. <code>{"20.01","20.01.01","20.01.01.01","20.01.02","20.01.02.01","20.01.02.02","20.02","20.02.01","20.02.01.01","20.02.02","20.02.02.01","20.02.02.02","20.02.02.02.01","20.02.02.02.01.01","20.02.02.02.02","2...
0debug
void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, unsigned long vga_ram_offset, int vga_ram_size) { PCICirrusVGAState *d; uint8_t *pci_conf; CirrusVGAState *s; int device_id; device_id = CIRRUS_ID_CLGD5446; d = (PCICirrusVGA...
1threat
Invalid maximum heap size : <p>I have copied a jdk directory from another location. Since then, I get the following error message.</p> <pre><code>Your environment has been set. java version "1.5.0_22" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03) Java HotSpot(TM) Client VM (build 1.5.0_22-b03, ...
0debug
Integrating SVN with kwallet : <p>I can't for my life make SVN read the password stored at kwallet and use it to stop asking when I do anything. Google has not helped finding the answer, so I turn back to you. </p> <p>I'm running right now Kubuntu 16.04 fully upgraded, SVN is version 1.9.3 (r1718519), and it says that...
0debug
Cant call javascript function : I cant seem call the function formValidation from my form. I tried everything but Im pretty sure I'm over-looking something minor I have to add more text to post this question and hopefully this much is enough <!DOCTYPE html> <html> <head> <title></title> <...
0debug
"‘CLOCK_PER_SEC’ was not declared in this scope" error even after including <time.h> : <p>I'm getting "‘CLOCK_PER_SEC’ was not declared in this scope" error even after including time.h. I'm very newbie to c++, so this will be related to simple mistakes, but i sadly can't figure out. please help me.</p> <pre><code>#inc...
0debug
how can i make {0} and {1} variables in python? : <p>in C# it was Possible to Use a Code Like This:</p> <pre><code>Console.WriteLine ("hello{0}" ,Hello); </code></pre> <p>i Want to do Same Thing in Python,i Want to Call Variable With {0} and {1} Way. How Can I Do This ?</p>
0debug
START_TEST(qdict_del_test) { const char *key = "key test"; qdict_put(tests_dict, key, qstring_from_str("foo")); fail_unless(qdict_size(tests_dict) == 1); qdict_del(tests_dict, key); fail_unless(qdict_size(tests_dict) == 0); fail_unless(qdict_haskey(tests_dict, key) == 0); }
1threat
service is not being called in angular 2 aplication : need urgent help i am new to angular 2 need help in calling service. here is the plnkr i made `App.ts`**https://plnkr.co/edit/wss2Jy41pYyjQUOk47es?p=preview)**
0debug
Why if else is different form guard let and if let? : <p>Because we can identify nil value using if else. Same thing we do using guard let and if let. What is the use of these..</p>
0debug
static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) { OutputFile *of = output_files[ost->file_index]; int64_t ost_tb_start_time = av_rescale_q(of->start_time, AV_TIME_BASE_Q, ost->st->time_base); AVPacket opkt; av_init_packet(&opkt); if ((!ost->frame_number ...
1threat
i want to do something when i close console VB window is that possible? : <p>I want to call function or execute some code when i <code>close</code> the window in console vb is that possible?</p> <p>thanks in advance </p>
0debug
Graph multicolor area line : <p>i need to create graph as <a href="https://i.stack.imgur.com/BGAO6.png" rel="nofollow noreferrer">showed on image</a>.</p> <p>One line with color filled area, if point value is more than zero than color of line and area is green, else red.</p> <p>How can i do this? JS (some plugin?) or...
0debug
Rewriting "do while" loop from java to python : <p>I am trying to rewrite the following piece of java code to python:</p> <pre><code>class pcp { public static void main(String[] args) { final int b = 13; final int m = 1000; int a0 = 1; int mas[] = new int[10]; int a = a0, T ...
0debug
Volume binding using docker compose on Windows : <p>I recently upgraded my Docker Toolbox on Windows 10, and now my volume mounts no longer work. I've tried everything. Here is the current mount path:</p> <pre><code>volumes: - C:\Users\Joey\Desktop\backend:/var/www/html </code></pre> <p>I receive an invalid bind mo...
0debug
How to split a date from String by using slenium...? i trie with below way, but , i am not able to store : The client start date is 13/10/2018. In above string i want to keep date in separate varible. String[] effectiveDateText=driver.findElement(By.xpath(xpath)).getText().split(" "); for(int i=0;i...
0debug
Traefik Forward Authentication in k8s ingress controller : <p>Hello I tried looking at the auth options in the annotations for kubernetes traefik ingress. I couldn't find anything where I could configure Forward Authentication as documented here: <a href="https://docs.traefik.io/configuration/entrypoints/#forward-authe...
0debug
guys i have below test code. How can I made this condition to be True : guys i have below test code. How can I made this condition to be True. I know a.split is method in Str() but when I put it on a variable it sees it as a list. a="1.1.1.1/29" aa=a.split('/') >>aa == "29" >>False
0debug
Swift, polare circle : I have to draw 12 points in a circle with different radiant. From point 1, draw a line to point 2, from point 2 to 3, etc. I can not find a formula, but I think it's something with polar circle? Is anyone working with it and maybe want to share with me? See the picture, which might expla...
0debug
CPUState *ppc405cr_init (target_phys_addr_t ram_bases[4], target_phys_addr_t ram_sizes[4], uint32_t sysclk, qemu_irq **picp, int do_init) { clk_setup_t clk_setup[PPC405CR_CLK_NB]; qemu_irq dma_irqs[4]; CPUState *env; qemu...
1threat
Build laravel from framework kernel : <p>I have started a project to convert some parts of laravel framework to compiled php extensions to improve the performance. I have created a git repository for the migrated parts and another for the laravel modification that will use that extension.</p> <p>My question is how to ...
0debug
static inline int available_samples(AVFrame *out) { int bytes_per_sample = av_get_bytes_per_sample(out->format); int samples = out->linesize[0] / bytes_per_sample; if (av_sample_fmt_is_planar(out->format)) { return samples; } else { int channels = av_get_channel_layout_nb_channe...
1threat
Beautify JSON when stringify : <p>When I'm saving JSON with stringify and <code>fs</code> package it looks like this:</p> <pre><code>{"\"name:\"":"\"Alice\"","\"age\"": 18} </code></pre> <p>I don't understand why. Is there any way to prettify it like this?</p> <pre><code>{"name:":"Alice","age": 18} </code></pre>...
0debug
def month_season(month,days): if month in ('January', 'February', 'March'): season = 'winter' elif month in ('April', 'May', 'June'): season = 'spring' elif month in ('July', 'August', 'September'): season = 'summer' else: season = 'autumn' if (month == 'March') and (days > 19): season = 'sprin...
0debug
My program cant run accountType as a variable : #include <iostream> #include <iomanip> using namespace std; int main () { int accountNumber; float minimumBalance, currentBalance; char accountType; const float SAVINGS_SERVICE_CHARGE = 10.00; con...
0debug
Generate 6 digits pin code using python : <p>I want to build python algorithm that generates 6 digits pin code. I had many ideas like : based on time, on id .... etc, but non sounded secure once the algorithm is exposed. Now I am trying to generate that using <code>random.randint(a, b)</code>, however I want to know ho...
0debug
static uint64_t ppc_hash64_page_shift(ppc_slb_t *slb) { uint64_t epnshift; if ((slb->vsid & SLB_VSID_LLP_MASK) == SLB_VSID_4K) { epnshift = TARGET_PAGE_BITS; } else if ((slb->vsid & SLB_VSID_LLP_MASK) == SLB_VSID_64K) { epnshift = TARGET_PAGE_BITS_64K; } else { ...
1threat
Should Health Checks call other App Health Checks : <p>I have two API's A and B that I control and both have readiness and liveness health checks. A has a dependency on B.</p> <pre><code>A /foo - This endpoint makes a call to /bar in B /status/live /status/ready B /bar /status/live /status/ready </code></pre> <p>Sho...
0debug
How to diff in a comment on github? : <p>I've seen people show diffs of their code from other forks to illustrate a point in github like on this pull request thread: <a href="https://github.com/osTicket/osTicket/pull/3035" rel="noreferrer">https://github.com/osTicket/osTicket/pull/3035</a></p> <p>I think it would be r...
0debug
def highest_Power_of_2(n): res = 0; for i in range(n, 0, -1): if ((i & (i - 1)) == 0): res = i; break; return res;
0debug
How can I pause the azure storage sync service : Azure Storage Sync Service[enter image description here][1] [1]: https://i.stack.imgur.com/9ns2C.jpg [1]: https://i.stack.imgur.com/9ns2C.jpg
0debug
static int vhost_net_start_one(struct vhost_net *net, VirtIODevice *dev) { struct vhost_vring_file file = { }; int r; net->dev.nvqs = 2; net->dev.vqs = net->vqs; r = vhost_dev_enable_notifiers(&net->dev, dev); if (r < 0) { goto fail_notifiers; ...
1threat
def sum_nums(x, y,m,n): sum_nums= x + y if sum_nums in range(m, n): return 20 else: return sum_nums
0debug
Angular-CLI: unable to display API response : Hey Stackoverflow Angular guys, it's me again ;-) So, my API is getting a json response (hooray!). Now, I'm trying to just display it however possible in one of my components just to understand and observe how the data is being transferred and displayed, so I can build o...
0debug
Best Multithread Global Variable Management : <p>I've looked at things like <code>std::atomic</code> (which doesn't work) and <code>std::mutex</code> (which is too much to manage) but nothing is working :( I'm using <code>std::thread</code> to create my threads, but I'm open to using <code>CreateThread()</code></p> <p...
0debug
Convert date to timestamp for storing into firebase firestore in javascript : <p>I'm currently using <code>Math.floor(Date.now() / 1000)</code> to get the correct timestamp format to add into a document in Firebase, however, the timestamp gets inserted as a number, and not as a timestamp.</p> <p><a href="https://i.sta...
0debug
static void colo_compare_finalize(Object *obj) { CompareState *s = COLO_COMPARE(obj); qemu_chr_fe_deinit(&s->chr_pri_in); qemu_chr_fe_deinit(&s->chr_sec_in); qemu_chr_fe_deinit(&s->chr_out); g_queue_free(&s->conn_list); if (qemu_thread_is_self(&s->thread)) { g_que...
1threat
finding the number of pixels : I have a simple green fluorescent image. I want to find the total number of pixels that are above a specific value using MATLAB. I don't know where the pixel values are stored in an image. Please help me.
0debug
How would you convert this C++ program to a C program? : <p>Thank you for your time in advance, I'm struggling on how to turn this code into C language, I'm just starting in the programming world, so if you have any doubt, I can answer, this is the code... </p> <pre><code>// C++ program for implementation of Heap Sort...
0debug
How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"? : <p>When I run <code>composer install</code> on command promp, there exist error like this : </p> <pre><code> Problem 1 - Installation request for laravel/horizon v1.1.0 -&gt; satisfiab...
0debug
Is there a macro for creating fast Iterators from generator-like functions in julia? : <p>Coming from python3 to Julia one would love to be able to write <strong>fast</strong> iterators as a function with produce/yield syntax or something like that.</p> <p>Julia's macros seem to suggest that one could build a macro wh...
0debug
Easy C++ for newbie function of the '<<' : <pre><code>#import &lt;iostream&gt; using namespace std; int main() { cout &lt;&lt; 123 &lt;&lt;'\n'; cout &lt;&lt;"$100 recived \n"; cout &lt;&lt;"see you tomorrow \n"; return 0; } </code></pre> <p>in this C++ program line, i dunno the function of the '&lt;&lt;' here; (i'...
0debug
match(n)-[r:LIKES]->(m) with count(n) as cnt, m where cnt = max(cnt) return m : match(n)-[r:LIKES]->(m) with count(n) as cnt, m where cnt = max(cnt) return m above query gives following error: Invalid use of aggregating function max(...) in this context (line 1, column 61 (offset: 60))
0debug
C2248 - From to 2 inheritances : <p>I have 3 classes, 1 inherited by another. A->B->C. A has a protected member function that I'm trying to set using C.</p> <p>I'm getting C2248 - Error C2248 'A::status': cannot access inaccessible member declared in class 'A' Associations </p> <p>Am I not allowed to ac...
0debug
void bdrv_init_with_whitelist(void) { use_bdrv_whitelist = 1; bdrv_init(); }
1threat
static abi_long target_to_host_data_route(struct nlmsghdr *nlh) { struct ifinfomsg *ifi; struct ifaddrmsg *ifa; struct rtmsg *rtm; switch (nlh->nlmsg_type) { case RTM_GETLINK: break; case RTM_NEWLINK: case RTM_DELLINK: ifi = NLMSG_DATA(nlh); ifi->ifi_type...
1threat
Ruby on Rails Developed Applications : <p>I'm looking to develop a desktop (not server) web application and I have been comparing Ruby on Rails vs Django. Question is, with Django the client needs to install Python 2.5, does the client need to install anything to execute a Ruby on Rails application? Thanks....</p>
0debug
what is the meaning of tslint: "Warning: The 'no-use-before-declare' rule requires type information"? : <p>What is the meaning of tslint: "Warning: The 'no-use-before-declare' rule requires type information."? I did some basic googling but I'm not clear on what this means or its implications.</p>
0debug
int DMA_read_memory (int nchan, void *buf, int pos, int len) { struct dma_regs *r = &dma_controllers[nchan > 3].regs[nchan & 3]; target_phys_addr_t addr = ((r->pageh & 0x7f) << 24) | (r->page << 16) | r->now[ADDR]; if (r->mode & 0x20) { int i; uint8_t *p = buf; cpu_physica...
1threat