problem
stringlengths
26
131k
labels
class label
2 classes
Assigning a map to a new map in java, and then changing the new map also changes original map : <p>I have a use case which looks something like this :</p> <pre><code> Map&lt;String,String&gt; pr = new HashMap&lt;&gt;(); pr.put("ab","ab"); pr.put("xy","xy"); Map&lt;String,String&gt; prNew = new HashMap&l...
0debug
Docker: Container keeps on restarting again on again : <p>I today deployed an instance of MediaWiki using the appcontainers/mediawiki docker image, and I now have a new problem for which I cannot find any clue. After trying to attach to the mediawiki front container using:</p> <pre><code>docker attach mediawiki_web_1 ...
0debug
Having trouble making my website responsive : I'm working on a site for a school project that's due today and I have tried what seems like everything to make it responsive correctly and no matter what it doesn't resize correctly. I'm not that knowledgeable with coding to begin with, and worried since this is due soon. ...
0debug
How to Validate JSON objects without using any external libraries : <p>I want to validate a JSON object without the help of any libraries in nodejs.</p>
0debug
How to change home indicator background color on iPhone X? : <p>I would like to change the background color of the view that appears on the bottom of the new iPhone X with a home indicator inside.</p> <p>Is it possible?</p>
0debug
How to disable image fade in effect in React Native? : <p><strong>Situation</strong></p> <ul> <li>Dynamically toggling images</li> <li>React Native </li> <li>Dev mode</li> <li>Android </li> </ul> <p><strong>Problem</strong> </p> <ul> <li>The images fade in when appearing during dev mode. This is an issue since I am ...
0debug
static bool virtio_scsi_data_plane_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) { VirtIOSCSI *s = VIRTIO_SCSI(vdev); assert(s->ctx && s->dataplane_started); return virtio_scsi_handle_ctrl_vq(s, vq); }
1threat
static void ide_sector_write_cb(void *opaque, int ret) { IDEState *s = opaque; int n; if (ret == -ECANCELED) { return; } block_acct_done(bdrv_get_stats(s->bs), &s->acct); s->pio_aiocb = NULL; s->status &= ~BUSY_STAT; if (ret != 0) { if (ide_handle_rw_erro...
1threat
java interface Path extends more than one class, bug? : <p>I just find that interface Path has extended 3 class, which against the principle;</p> <pre><code>public interface Path extends Comparable&lt;Path&gt;, Iterable&lt;Path&gt;, Watchable </code></pre> <p>????</p>
0debug
Location of the Nginx default index.html file on MAC OS : <p><a href="https://i.stack.imgur.com/k3gGi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/k3gGi.png" alt="enter image description here"></a></p> <p>I have successfully installed nginx on my MAC with homebrew</p> <pre><code>brew install nginx </code...
0debug
how to create a while true loop? : <p>let me start off by saying, that i am a BEGINNER to coding. i use python 3.4.GUI.</p> <p>so i've got this code:</p> <pre><code>register = input("have you registered an account?") if register == "yes": print("you may proceed to log in") if register == "no": print("please,...
0debug
The module 'app' is an Android project without build variants : <p>I am getting below error while importing android project.</p> <p>Error:The module 'app' is an Android project without build variants, and cannot be built. Please fix the module's configuration in the build.gradle file and sync the project again.</p...
0debug
static int tcp_chr_new_client(CharDriverState *chr, QIOChannelSocket *sioc) { TCPCharDriver *s = chr->opaque; if (s->ioc != NULL) { return -1; } s->ioc = QIO_CHANNEL(sioc); object_ref(OBJECT(sioc)); if (s->do_nodelay) { qio_channel_set_delay(s->ioc, false); } if (...
1threat
import re def pass_validity(p): x = True while x: if (len(p)<6 or len(p)>12): break elif not re.search("[a-z]",p): break elif not re.search("[0-9]",p): break elif not re.search("[A-Z]",p): break elif not re.search("[$#@]",p): break elif r...
0debug
Please help me to complete my number guessing game : My program should execute these steps: 1. Generate random no from 0 to 100. 2. Display random no and ask user enter (h/l/c)? //user have to enter one of them. 3. If it is correct ask user if they like to play again(y/n)? // user must answer (y/n) I was able to ...
0debug
static void v9fs_fsync(void *opaque) { int err; int32_t fid; int datasync; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dd", &fid, &datasync); trace_v9fs_fsync(pdu->tag, pdu->id, fid, datasync); fi...
1threat
Alternating sums of a list : <p>9.Write a program that accepts 9 integers from the user and stores them in a list. Next, compute the alternating sum of all of the elements in the list. For example, if the user enters 1 4 9 16 9 7 4 9 11 then it computes 1 – 4 + 9 – 16 + 9 – 7 + 4 – 9 + 11 = –2</p> <pre><code>myList = ...
0debug
setModal in Java : public DatePicker(JFrame parent) { d = new JDialog(); d.setModal(true); String[] header = { "Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat" }; JPanel p1 = new JPanel(new GridLayout(7, 7)); p1.setPreferredSize(new Dimension(430, 120)); What is the p...
0debug
SpringBoot @WebMvcTest, autowiring RestTemplateBuilder : <p>I've got a problem while testing a Spring Controller. I'm using the annotation @WebMvcTest in my test class. When I run the test, I get this error: No qualifying bean of type 'org.springframework.boot.web.client.RestTemplateBuilder' available</p> <p>I'm using...
0debug
Error on load image on React-native: Unexpected character : <p>I'm try display a image on a component on React-native, but I don't know why this error happens...</p> <p>Example of code:</p> <pre><code>render () { let { convenience } = this.props return ( &lt;View style={{flexDirection: 'row', height: 50...
0debug
C# Change button background image using method : My code for FORM using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace YAHTZEE ...
0debug
static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int index, const char *filt_name, const char *args, void *log_ctx) { AVFilter *filt; char inst_name[30]; char tmp_args[256]; int ret; snprintf(inst_name, sizeof(inst_name), "Parsed_%s_%d", filt...
1threat
freeswitch have install cant properly plz resove this issue these found : 2016-10-24 02:37:33.733197 [INFO] mod_dialplan_xml.c:637 Processing 1985922714 <1985922714>->4595609013 in context default 2016-10-24 02:37:33.753200 [ERR] switch_odbc.c:368 STATE: 01000 CODE 0 ERROR: [unixODBC][Driver Manager]Can't open lib '/u...
0debug
int e820_add_entry(uint64_t address, uint64_t length, uint32_t type) { int index = le32_to_cpu(e820_reserve.count); struct e820_entry *entry; if (type != E820_RAM) { if (index >= E820_NR_ENTRIES) { return -EBUSY; } entry = &e820_reserve.entry[index++];...
1threat
How to delete zip folder programatically in c#? : Hi I am developing c# application. I want to delete a zip folder if it is exists. I have below code. string zippath = @"C:\Neenu\Downloads.zip"; ZipFile.CreateFromDirectory(@"" + TemporaryFolder, @"" + zippath); Just before the above code I want to...
0debug
Running a Jupyter notebook from another notebook : <p>I wonder if it is possible to run a *.ipynb file from another *.ipynb file and get a returned value. I know that we can run like this:</p> <pre><code>%run ./called_notebook.ipynb </code></pre> <p>the called_notebook contains:</p> <pre><code>def foo(): print(1...
0debug
static inline void dv_encode_video_segment(DVVideoContext *s, uint8_t *dif, const uint16_t *mb_pos_ptr) { int mb_index, i, j, v; int mb_x, mb_y, c_offset, linesize; uint8_t* y_ptr; uint8_t* data; uint8...
1threat
sidebar menu which scrolls down in sidebar : <p>i saw this several times on other sites but wasnt able to find how to do it easily.</p> <p>I have a website with a submenu in the left sidebar, now i want the menu-widget to stick inside the sidebar area at top of window when i scroll down, so the menu comes with down. <...
0debug
regex expression C# : I have url different url address that I need to change the domain and paths for example: http://goo.com/working/1.html http:/boo.com/kit/jo.png I need to read as http://mysit1e.com/1.html http:/mysit1e.com/jo.png I need to change the domains and bring all the files to level one
0debug
Can't start rails server. I'm new. : Hi I need help and i cant even post my problem on here as i am not going to add 4 spaces to each line of code. this seems really weird. just imagine if you had over 200 lines of code. would you have to go to each line and add 4 spaces? good god. please tell me how i can post all my ...
0debug
static int mkv_field_order(MatroskaDemuxContext *matroska, int64_t field_order) { int major, minor, micro, bttb = 0; if (sscanf(matroska->muxingapp, "Lavf%d.%d.%d", &major, &minor, &micro) == 3) bttb = (major == 57 && minor >= 36 && minor <= 51 && micro >= 100); switch (field_order)...
1threat
which takes the text thats is input in the inputbox in html and display it below as a clickable option. : <p>I am working on a project, which takes the text that is input in the inputbox and display it below as a clickable option/button in html. Is it possible to make such thing, if yes please let me know, any help wou...
0debug
ChefZero returning 404 : <p>I am setting up a simple vagrant box with chef solo as the provisioner. Everything was going fine until i tried running it on my laptop. The machine comes up fine but when it provisions it spits out some errors.</p> <p>I'm relatively fresh to chef and i'm not quite sure what i'm looking at....
0debug
static int ivi_decode_coded_blocks(GetBitContext *gb, IVIBandDesc *band, ivi_mc_func mc, int mv_x, int mv_y, int *prev_dc, int is_intra, int mc_type, uint32_t quant, int offs, ...
1threat
How to run a script only once in a day on a chrome extention : I'm building a chrome extension that redirect to web page when someone visit a specific site. but I want this to open web page only once in a day. not everytime. This is what I'm using but isn't working function showOnceInADay(){ var user=get...
0debug
Is there any way to run parallel cypress tests on local machine, for example 5 streams : <p>I'm trying to setup cypress on my local machine and run parallel tests. But I can't find some information how to do this.</p>
0debug
I need a Javascript REGEX for Integers between 18 and 140 inclusive : <p>I'm still trying to find my way around Javascript regular expressions, and I have not been able to deduce how to write this regex I need. </p> <p>Please I need a Javascript regex basically for age. I want to allow anybody between ages 18 and 140....
0debug
AWS SNS workaround for 100,000 topics limit : <p>I am developing an architecture for push notifications using AWS SNS with APNS and GCM. The model that I am following is</p> <ul> <li>Each user (not device) will have an SNS topic corresponding to it</li> <li>Each user can have multiple devices</li> <li>Create an platfo...
0debug
I want to check whether the user has entered something : <p>I am facing a problem that is is follows: a] How to check whether the user has entered something against the scanf statement. b] How to run a part of code repeatedly without goto function or what is the replacement for goto.</p>
0debug
Split number in order : I have table part_tab with column serial_no PART_NO SERIAL_NO A 1 A 2 A 3 A 5 A 7 A 8 A 9 A 10 I would like to select serial_no in...
0debug
strcpy() And strcat() Are Not Working Properly In Turbo C++ : > The strcpy() And The strcat() Functions Are Not Working Properly For > Me In The Turbo C++. I have Given my Code Below. I Want The Output To > Be: C:\TURBOC3\BIN\BANK\SHOP\SELLER\334pd.txt > C:\TURBOC3\BIN\BANK\SHOP\SELLER\334pr.txt > C:\TURBOC3\BIN\B...
0debug
static int vqa_decode_chunk(VqaContext *s) { unsigned int chunk_type; unsigned int chunk_size; int byte_skip; unsigned int index = 0; int i; unsigned char r, g, b; int index_shift; int res; int cbf0_chunk = -1; int cbfz_chunk = -1; int cbp0_chunk = -1; int ...
1threat
How to get user friend list from facebook using graph api : <p>Recently I have a requirement for getting all user's friend in facebook. I am successfully able to generate auth_code (with scope: <code>user_friends</code>) , access_token. </p> <p>Now When I am calling to <code>{user-id}/friends</code> <a href="https://d...
0debug
How can I start writing IT article? : <p>I am new stack overflow user.</p> <p>I see that I can post a new question by clicking 'question' button.</p> <p>But if I need to share knowledge,e.g., write some 101 tutorial.</p> <p>How can I start writing it?</p> <p>Which menu or link should I go to to post my article?</p>...
0debug
How to overrides the OpenJDK details ? : I am using `Linux` box and setup the `Oracle 12c` instance and `Java JDK`. [user@10.XXX-XX-00:~]$ java -version openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-b10) OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode) [user@...
0debug
C# SSN Reg Ex with first digit up to '8' : I need to have a Reg-ex for SSN, with a condition: The first digit should have a maximimum value of 8. The SSN format can be either 123-45-6789 or 123456789 . i.e., it should validate either with an '-' symbol or without it. Any help would be deeply appreciated. Rega...
0debug
Jest mock react context : <p>I need some help understanding how one can test an application using <code>React</code> <code>Context</code>.</p> <p>Here's my sample setup.</p> <p><strong>context.js</strong></p> <pre><code>import React from 'react' export const AppContext = React.createContext() </code></pre> <p><str...
0debug
QCryptoHmac *qcrypto_hmac_new(QCryptoHashAlgorithm alg, const uint8_t *key, size_t nkey, Error **errp) { QCryptoHmac *hmac; void *ctx = NULL; Error *err2 = NULL; QCryptoHmacDriver *drv = NULL; #ifdef CONFIG_AF_ALG ctx = qcrypto_a...
1threat
alertview textField returning nil value : let editTextField = UITextField() let alertController = UIAlertController(title: "Alert!", message: "Please enter from location", preferredStyle: .alert) alertController.addTextField { editTextField in editTextField.placeholder = "Enter correct na...
0debug
static int compare_ocl_device_desc(const void *a, const void *b) { return ((const OpenCLDeviceBenchmark*)a)->runtime - ((const OpenCLDeviceBenchmark*)b)->runtime; }
1threat
C function calculates wrong with pointers : <p>so i've been on trying to coding my first commandline game. I've been coding in C now for about a few months and it's my first coding language. I had no real problems until i came to the point where i had to deal with this pointer conversion. </p> <p>Here is my function: ...
0debug
C++ functional operator struct not doing anything? : <p>I have the following code in one of my problems for a certification program I'm in and can't figure out why the vector of A objects aren't being changed when the for-each statement is called with the doubler() struct. The code is below, if anyone could shed some l...
0debug
Why is "Application permissions" disabled in Azure AD's "Request API permissions"? : <p>I'm trying to give a console app permission to call an API in Azure AD.</p> <p>When I go to "Add permissions," "application permissions" is grayed out and I can only select "delegated permissions."</p> <p>My understanding is that ...
0debug
Substring syntax errors in java, used Array List to find common words in a dictionary : I have an array of words from which I would like to select words which have 4 similar characters, for example key word is split, it would be give me words relating to that from the array. The code however gives me errors with the su...
0debug
static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *int_mask, bool queuing) { UHCIAsync *async; int len = 0, max_len; uint8_t pid; USBDevice *dev; USBEndpoint *ep; if (!(td->ctrl & TD_CTRL_ACTIVE)) return TD_RESULT_NEXT...
1threat
Counting TCP retransmission in pyshark : <p>As far as I know pyshark is a Python wrapper to tshark which is the command line version of Wireshark. Since Wireshark and tshark allow to detect TCP retransmission, I was wondering how I could to that using pyshark. I haven't find any good documentation so I am not sure whet...
0debug
MarkupExtensions, Constructor and Intellisense : <p>I am trying to create my own MarkupExtension for localization. The idea is to pass a name of a resource (for example 'Save') to the markup extension and the return would be localized value (for example 'Save' in en-US, 'Speichern' in de-de and so on).</p> <p>This wor...
0debug
How to Pass IValueConverter Parameter? : <p>In XAML, <code>&lt;Grid x:Name="MainGrid3"&gt;</code>, Here I want to pass <code>MainGrid3</code> as a parameter of <code>IValueConverter</code>. How can I do this?<a href="https://i.stack.imgur.com/4l28Y.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4l28Y.png" al...
0debug
static void pci_reg_write4(void *opaque, target_phys_addr_t addr, uint32_t value) { PPCE500PCIState *pci = opaque; unsigned long win; win = addr & 0xfe0; pci_debug("%s: value:%x -> win:%lx(addr:" TARGET_FMT_plx ")\n", __func__, value, win, addr); ...
1threat
Using repository pattern to eager load entities using ThenIclude : <p>My application uses Entity Framework 7 and the repository pattern.</p> <p>The GetById method on the repository supports eager loading of child entities:</p> <pre><code> public virtual TEntity GetById(int id, params Expression&lt;Func&lt;TEntity,...
0debug
Syntax error - PHP if statement in html td tag : <p>I get this message in my browser: Parse error: syntax error, unexpected 'if' (T_IF)</p> <p>I have been making a HTML table showing prices on a Woocommerce product.</p> <p>I have seen a lot of similar issues, but cannot relate to my own problem.</p> <p>The problem s...
0debug
void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data) { VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev); uint8_t val = data; if (addr > (vdev->config_len - sizeof(val))) return; stb_p(vdev->config + addr, val); if (k->set_config) { k->set_conf...
1threat
Delphi Tdictionary inheritance : <p>I try to inherit from Tdictionary and somehow the default comparer is lost. This is what I do in essence:</p> <pre><code>type TinpVar = class end; TinputVars = class(Tdictionary&lt;string,TinpVar&gt;) end; TLVRvars = class(TinputVars) constructor create; end; const...
0debug
static void vc1_decode_b_mb(VC1Context *v) { MpegEncContext *s = &v->s; GetBitContext *gb = &s->gb; int i, j; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp = 0; int mqdiff, mquant; int ttmb = v->ttfrm; int mb_has_coeffs = 0; int index, index1; int val, si...
1threat
static int ty_read_packet(AVFormatContext *s, AVPacket *pkt) { TYDemuxContext *ty = s->priv_data; AVIOContext *pb = s->pb; TyRecHdr *rec; int64_t rec_size = 0; int ret = 0; if (avio_feof(pb)) return AVERROR_EOF; while (ret <= 0) { if (ty->first_chunk || ty->cur_...
1threat
How to apply morphological operations like clearing border and removing small objects using matlab for color image? : I have a color image obtained after using k-means cluster and I want to apply morphological operations like cleaning border,filling holes and remove small object using matlab but thsese operation works...
0debug
JSON Search in laravel eloquent : <p>I am storing <code>destinations</code> field as <code>json</code> type in <code>mysql</code></p> <p>example column value <code>["Goa", "Moonar", "Kochi"]</code></p> <p>I would like to get all rows that matches <code>goa</code> as destinations</p> <p>However this row query return...
0debug
What can I use instead of lcs (Longest common substring) : <p>I am trying to calculate the common string using lcs, but this algorithm only calculates 1 string. What can I use instead?</p> <p><strong>LCS =</strong> "<em>aaa</em>bbb<em>ccc</em>xxx" and "<em>aaa</em>ddd<em>ccc</em>" result: "aaa"</p> <p><strong>but wha...
0debug
static inline void gen_speundef (DisasContext *ctx) { RET_INVAL(ctx); }
1threat
JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list? : <p>In javascript:</p> <pre><code>var myarray = [2, 3]; var json_myarray = JSON.stringify(myarray) // '[2,3]' </code></pre> <p>But in Python:</p> <pre><code>mylist = [2, 3] json_mylist = json.dumps(mylist) # '[2, 3]' &lt;-- Note the space...
0debug
I don't get any further :( : I need help with my Java code that I wrote some days ago. It is a little game where the computer randomly picks a number from 1 to 100 and you need to get that number. I want it to work on cmd because I need to show someone my project on another computer where is no Eclipse (but if it only ...
0debug
import re def find_long_word(text): return (re.findall(r"\b\w{5}\b", text))
0debug
How do I output lists as a table in Jupyter notebook? : <p>I know that I've seen some example somewhere before but for the life of me I cannot find it when googling around.</p> <p>I have some rows of data:</p> <pre><code>data = [[1,2,3], [4,5,6], [7,8,9], ] </code></pre> <p>And I want to outp...
0debug
How to submit login form in Rvest package w/o button argument : <p>I am trying to scrape a web page that requires authentication using html_session() &amp; html_form() from the rvest package. I found this e.g. provided by Hadley Wickham, but am not able to customize it to my case.</p> <pre><code>united &lt;- html_sess...
0debug
int ne2000_can_receive(NetClientState *nc) { NE2000State *s = qemu_get_nic_opaque(nc); if (s->cmd & E8390_STOP) return 1; return !ne2000_buffer_full(s); }
1threat
static void decode_mb_i(AVSContext *h) { GetBitContext *gb = &h->s.gb; int block, pred_mode_uv; uint8_t top[18]; uint8_t left[18]; uint8_t *d; init_mb(h); for(block=0;block<4;block++) { int nA,nB,predpred; int pos = scan3x3[block]; nA = h->pred_m...
1threat
static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uint8_t *src, int size, int lines){ int c, line, pixels, code; const uint8_t *ssrc = src; int width = ((s->width * s->bpp) + 7) >> 3; #if CONFIG_ZLIB uint8_t *zbuf; unsigned long outlen; if(s->compr == TIFF_DEFLATE ...
1threat
MySql, where clause filter off entries even with LEFT join : <p>3 tables: classes, students and class_student (association table). Following query output student count of each class. When there is no students in a class, the count(..) is 0 but class name is still in result.</p> <pre><code>select c.name, count(s.id) fr...
0debug
import re def is_allowed_specific_char(string): get_char = re.compile(r'[^a-zA-Z0-9.]') string = get_char.search(string) return not bool(string)
0debug
yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, const int16_t *ubuf[2], const int16_t *vbuf[2], const int16_t *abuf0, uint8_t *dest, int dstW, int uvalpha, int y, enum AVPixelFormat target) { const uint8_t * const d128 = dither_8x8_220...
1threat
How to check whether DbContext has transaction? : <p>Background: I have WCF service with SimpleInjector as IoC which creates instance of DbContext per WCF request.</p> <p>Backend itself is CQRS. CommandHandlers have a lot of decorators (validation, authorization, logging, some common rules for different handler groups...
0debug
Get Values in from Json : I've the following console log: [{"$id":"1","EmailConfirmedDate":null,"InvitedDate":null,"Username":"abc@bcd.de","Email":"abc@bcd.de","RawPasswordValue":"wC90YmqM1+gFdMAvE2ONAg==E+7bIhf7nBoEmLhs0qn2UAmuzD9cq245gi1Nfr6PvXI=","IsApproved":true,"Name":"Editor","Avatar":null,"TourData":null,"S...
0debug
Friends birthday is not showing in facebook 2.7 graph API : <p>I am using mentioned below code to get birthday of my friend in Graph Explorer. But Birthday is not showing.</p> <p>/v2.7/me?fields=friends{birthday}</p>
0debug
How can I check a condition if the path equal a folder name? : <p>Path = c:\users\source\ <strong>reports</strong>\projects\ .file</p> <p>How can I check if the projects folder inside a folder name == "reports"?</p> <p>for example: If (reports) .....do a condition</p>
0debug
Error "timeout.close is not a function" when try to clear interval - angular(5) : <p>I get this error when i do clear interval:</p> <pre><code>ERROR Error: Uncaught (in promise): TypeError: timeout.close is not a function TypeError: timeout.close is not a function at exports.clearTimeout.exports.clearInterval (mai...
0debug
static void buffered_flush(QEMUFileBuffered *s) { size_t offset = 0; int error; error = qemu_file_get_error(s->file); if (error != 0) { DPRINTF("flush when error, bailing: %s\n", strerror(-error)); return; } DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size); ...
1threat
void qmp_migrate(const char *uri, bool has_blk, bool blk, bool has_inc, bool inc, bool has_detach, bool detach, Error **errp) { Error *local_err = NULL; MigrationState *s = migrate_get_current(); MigrationParams params; const char *p; params.blk = has_blk ...
1threat
c# Async method returned value. How can i use that? : public async Task<List<object>> handleSummaryOfWallets() { string token = giveMeToken("URL AND CREDS"); Channel channel = new Channel("NANANANA GIROUD", ChannelCredentials.Insecure); OMGadminAPI.OMGadminA...
0debug
Why won't this python game work with point and damage counters? : def match_duel(): print "do you want to swing right or left" print "and for how many points?" choice = raw_input("> ") points = 0 damage = 0 if "right" in choice: print "you take a swing right. 20 points." points = points + 20...
0debug
static void tcg_out_movi_int(TCGContext *s, TCGType type, TCGReg ret, tcg_target_long arg, bool in_prologue) { intptr_t tb_diff; tcg_target_long tmp; int shift; tcg_debug_assert(TCG_TARGET_REG_BITS == 64 || type == TCG_TYPE_I32); if (TCG_TARGET_REG_BITS == 64 ...
1threat
Regex to remove c# : <p>I want to remove some string from regex in c#.</p> <p>I have a string </p> <pre><code>000603ABC140702-005051-I-FILL200-NNYYNY180319-142110-A2002.zip </code></pre> <p>From this I want to remove those strings</p> <blockquote> <p>140702</p> <p>142110</p> </blockquote> <p>And I want a re...
0debug
Collectors.toMap vs. Collectors.groupingBy - toMap problem with not unique key in provided data : Code snippet: ------------- Map<Integer, Map<String, Integer>> collect = shopping.entrySet() .stream() .collect(Collectors.toMap/*groupingBy? */(e -> e.getKey().getAge(), ...
0debug
import re def is_decimal(num): num_fetch = re.compile(r"""^[0-9]+(\.[0-9]{1,2})?$""") result = num_fetch.search(num) return bool(result)
0debug
void cpu_outw(CPUState *env, pio_addr_t addr, uint16_t val) { LOG_IOPORT("outw: %04"FMT_pioaddr" %04"PRIx16"\n", addr, val); ioport_write(1, addr, val); #ifdef CONFIG_KQEMU if (env) env->last_io_time = cpu_get_time_fast(); #endif }
1threat
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
void ff_h261_loop_filter(MpegEncContext *s){ H261Context * h= (H261Context*)s; const int linesize = s->linesize; const int uvlinesize= s->uvlinesize; uint8_t *dest_y = s->dest[0]; uint8_t *dest_cb= s->dest[1]; uint8_t *dest_cr= s->dest[2]; if(!(IS_FIL (h->mtype))) return; ...
1threat
static av_cold int vmdaudio_decode_init(AVCodecContext *avctx) { VmdAudioContext *s = avctx->priv_data; if (avctx->channels < 1 || avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n"); return AVERROR(EINVAL); } if (avctx->block_align < 1) { ...
1threat
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
how to convert a date into DD/MM/YYYY/HH:MM:SS in c# : i wanted to convert date into DD/MM/YYYY/HH:MM:SS format. the date is given by the user. i am using the code below string fromdate = context.Request.QueryString["fromdate"]; string todate = context.Request.QueryString["todatedate"]...
0debug
void do_savevm(Monitor *mon, const QDict *qdict) { DriveInfo *dinfo; BlockDriverState *bs, *bs1; QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1; int ret; QEMUFile *f; int saved_vm_running; uint32_t vm_state_size; #ifdef _WIN32 struct _timeb tb; #else struct...
1threat