problem
stringlengths
26
131k
labels
class label
2 classes
What are the truthy and falsy values in Perl 6? : <p>While it is always possible to use mixins or method overrides to modify the Bool coercions, <em>by default</em> what values are considered to be truthy and what values are considered to be falsy?</p> <p>Note: this question was <a href="https://stackoverflow.com/ques...
0debug
How to randomly select certain percentage of rows and create new columns in r : I have a species column containing 100 species names. I have to distribute the species into four columns randomly such that each column will take a specific percentage of species. lets say the first column takes 20%, the second 30%, the thi...
0debug
How to return an array of objects with a count of how many for each one : <p>How would I go about returning an object that returns the genres of Country, Rock, and Pop with and a count of how many songs are in each genre? The output would look something like:</p> <p>Country: 4, Rock: 2, Pop: 1</p> <pre><code>const mu...
0debug
How to un-obfuscate JavaScript starting with const and a bunch of vars : <p>Hi i found this extension and would like to see the contents of the script itself to check what is actually does. I tried putting the script through all sort of javascript de/un-obfuscators and none worked.</p> <p>Please tell me one that works...
0debug
static void vfio_add_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage *msg, bool msix) { int virq; if ((msix && !VFIO_ALLOW_KVM_MSIX) || (!msix && !VFIO_ALLOW_KVM_MSI) || !msg) { return; } if (event_notifier_init(&vector->kvm_interrupt, 0)) { ...
1threat
Javascript closure and return values : can someone please explain the code below? I'm confused about the role of return f(); 1) Does return f(); call the method 'f' and return the result? (i.e. the return of 'f') 2) Does return f(); return an object? If I change return f(); to just f(); checkscope = undefin...
0debug
How to replace part of text with html text : I want to replace matching keyword in text with same keyword but wrapped with `<span></span>` example : This is the sample text to be searched replaced text should be line This is the <span class="match">sample</span>text to be searched i am using followi...
0debug
What is the usage of the pseudo class :not()? : <p>I saw this pseudo class <code>:not()</code> being used in a source code of a <strong>Youtube</strong> video page, searching in the <strong>MDN</strong> I saw <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:not" rel="nofollow noreferrer">this article</a> expl...
0debug
CUDA kernel performance is bad using a for-loop : I have a 1D array in C-code that I would like to convert to a corresponding CUDA kernel that can execute with good performance on a GPU DEVICE. The architecture is Nvidia CUDA 10.x I have tried the naive approach whereby the C-code is applied directly to a CUDA kerne...
0debug
Method validate does not exist - Laravel 5.4 : <p>I have a very weird problem. When I'm submitting the form, it throws an error with server-side validation.</p> <p>Here is my simple controller:</p> <pre><code>namespace App\Http\Controllers; use Newsletter; use Illuminate\Http\Request; class SubscriptionController e...
0debug
checkbox attibuted checked but the opposite checkbox that does not have the attribute checked is selected : my checkboxes are acting strangely or maybe I am missing something but cannot get my finger on it. I have two checkboxes of the same name and the one with the attribute Checked="checked" is not showing as chec...
0debug
static void imx_gpt_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { IMXGPTState *s = IMX_GPT(opaque); uint32_t oldreg; uint32_t reg = offset >> 2; DPRINTF("(%s, value = 0x%08x)\n", imx_gpt_reg_name(reg), (uint32_t)value); switch (...
1threat
opts_type_int(Visitor *v, int64_t *obj, const char *name, Error **errp) { OptsVisitor *ov = DO_UPCAST(OptsVisitor, visitor, v); const QemuOpt *opt; const char *str; long long val; char *endptr; if (ov->list_mode == LM_SIGNED_INTERVAL) { *obj = ov->range_next.s; return;...
1threat
How to control other view in different activity? : I have created the customAdapter of listview . when I click the button in the listview ,I want to control the Textview outside the listview from different layout. Notice ! There are not in the same java code. here is i want to do: viewHolder.plus...
0debug
What's the difference between getElementById and getElementsByClassName : <p>I know maybe is not the right way of using the <code>getElementsByClassName</code>. For example the code below doesn't work as it is ¿why?, but when change <code>getElementsByClassName("demo")</code> for <code>getElementById("demo2")</code> do...
0debug
static av_cold int vaapi_encode_h264_init_internal(AVCodecContext *avctx) { static const VAConfigAttrib default_config_attributes[] = { { .type = VAConfigAttribRTFormat, .value = VA_RT_FORMAT_YUV420 }, { .type = VAConfigAttribEncPackedHeaders, .value = (VA_ENC_PACKED_HEAD...
1threat
How many elements in string array : I want to find how many names in `names` array.I know `sizeof(names)/sizeof(names[0])` give the right answer. But the problem is i can't just decleare `char *names[];`. Because compiler gives me an error like this ***"Storage of names is unknown"***. To avoid this error, i must decle...
0debug
Excel VBA - Providing cell address in formula as a variable : Is this doable? I'll edit in more details in 5 minutes, unable to initiate question form on a desktop so I'm posting from my phone and will edit on a computer.
0debug
int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup) { AVCodecContext *const avctx = h->avctx; int err = 0; h->mb_y = 0; if (!in_setup && !h->droppable) ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX, h->picture_structure ==...
1threat
static inline void RENAME(bgr15ToY)(uint8_t *dst, uint8_t *src, int width) { int i; for(i=0; i<width; i++) { int d= ((uint16_t*)src)[i]; int b= d&0x1F; int g= (d>>5)&0x1F; int r= (d>>10)&0x1F; dst[i]= ((RY*r + GY*g + BY*b)>>(RGB2YUV_SHIFT-3)) + 16; } }
1threat
In a C# console app, how would I create 'images' for playing cards in a blackjack game? : <p>I'm working on a simple C# blackjack console application game for my school and I was given an example to look at. This example somehow draws a picture of the card in the console window and I can't figure out how to replicate t...
0debug
Swift 3 sound play : <p>Ok I have looked into this and have tried many different ways to play a sound when a button is clicked.</p> <p>How would I play a sound when a button is clicked in swift 3? I have my sound in a folder named Sounds and the name is ClickSound.mp3</p>
0debug
error: lvalue required as left operand of assignment, I GOT THIS ERROR WHAT IS lvalue and rvalue and how to remove this error : I got this error in my code while compiling here is the code #include <iostream> using namespace std; int main() { int l,n,w,h; cin>>l>>n; whi...
0debug
Data science/General Programming- How to make all combination of features ? : I am trying to generate all combination of features so that I can try all the combination to check which combination increased cross validation score. I am using this code which I used to do solve data structures problem.But it becomes highly...
0debug
Dutuch flag for 4 colors : I went trough solution for 2 and 3 colors but I am unable to get it for 4 colors. I am unable to do it for fo four colors.Please help. Will it be rrbb????yyyggg how will we swap the green flag. I tried the solution but it is not working swapping ;last yellow with green publ...
0debug
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) { AVFrame tmp; AVFrame *padded_frame = ...
1threat
Display full image without cut in ViewPager how to fix : i want to display full image without cut height/width on android.support.v4.view.ViewPager but when a set image in ImagePagerAdapter adapter image crop from both side in my image gallery how to fix pls help me i am new in android so pls help me how ...
0debug
How to calculate profit formula with multiple user input text in swift4 : So im traying to make a simple calculation formula , but I don't know how to add all the variables simultaneously. I already tried this but is giving an error and is being supper inaccurate. var fee :Int = Int(0.866) var otherFee:In...
0debug
How to generate constructors in swagger codegen? : <p>The codegen did not generate any constructor. I referred to petstore swagger file, used latest swagger codegen jar file.</p> <p>But only default constructor was generated.</p> <p>It is not generating constructor based on its fields.</p> <p>How to enable it?</p>
0debug
static int v9fs_do_open2(V9fsState *s, V9fsCreateState *vs) { FsCred cred; int flags; cred_init(&cred); cred.fc_uid = vs->fidp->uid; cred.fc_mode = vs->perm & 0777; flags = omode_to_uflags(vs->mode) | O_CREAT; return s->ops->open2(&s->ctx, vs->fullname.data, flags, &cred); }
1threat
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length){ const uint8_t *end= buffer+length; #if !CONFIG_SMALL if(!ctx[256]) while(buffer<end-3){ crc ^= le2me_32(*(const uint32_t*)buffer); buffer+=4; crc = ctx[3*256 + ( crc &0xFF)] ...
1threat
Android 3.3.0 update, ERROR: Cause: invalid type code: 68 : <p>After the new update of Android Studio (3.3.0) I'm getting error from Gradle sync saying "ERROR: Cause: invalid type code: 68". Even in project, that have been created before the update and hasn't changed at all. I've tried to reinstall Android Studio, whic...
0debug
Finding the last row with data using vba : <p><strong>I am creating a program in which everytime it generates, the generated data will appear in a specific sheet and arranged in specific date order . It looks like this.</strong></p> <p><a href="https://i.stack.imgur.com/1vUeq.png" rel="nofollow noreferrer"><img src="h...
0debug
ld: library not found for -lFirebaseCore clang: error: linker command failed with exit code 1 (use -v to see invocation) : <p>I using <code>react-native-fcm</code> for remote push notification but it gives this error:</p> <p>ld: library not found for -lFirebaseCore clang: error: linker command failed with exit code 1 ...
0debug
void qemu_system_reset_request(void) { if (no_reboot) { shutdown_requested = 1; } else { reset_requested = 1; } cpu_stop_current(); qemu_notify_event(); }
1threat
What is the best method to seeding a Node / MongoDB application? : <p>So, I'm new to the MEAN stack, and I've hit a wall trying to seed MongoDB. I'm using Mongoose to communicate with the database, and there's a bunch of documentation suggesting I should be able to seed using populated JSON files.</p> <p>What I've tri...
0debug
Git clone: Redirect stderr to stdout but keep errors being written to stderr : <p><code>git clone</code> writes its output to <code>stderr</code> as documented <a href="https://www.kernel.org/pub/software/scm/git/docs/git-clone.html">here</a>. I can redirect this with the following command:</p> <pre><code>git clone ht...
0debug
Save Login Data in NSUserDefaults : <p>How to save Login form data and after click on login it switch to logout page. and when we click logout it come back to login form.</p>
0debug
How Do We Generate a Base64-Encoded SHA256 Hash of SubjectPublicKeyInfo of an X.509 Certificate, for Android N Certificate Pinning? : <p>The documentation in the N Developer Preview for their network security configuration offers these instructions:</p> <blockquote> <p>Certificate pinning is done by providing a set ...
0debug
def does_Contain_B(a,b,c): if (a == b): return True if ((b - a) * c > 0 and (b - a) % c == 0): return True return False
0debug
New to Java - How do I properly check that user input is an Integer in this scenario? : I'm new to Java and I have an assignment in where I have to calculate a user-determined amount of Fibonacci numbers using a recursive function, then again with an iterative function, then compare the times it takes to do each. Anywa...
0debug
static rwpipe *rwpipe_open( int argc, char *argv[] ) { rwpipe *this = av_mallocz( sizeof( rwpipe ) ); if ( this != NULL ) { int input[ 2 ]; int output[ 2 ]; pipe( input ); pipe( output ); this->pid = fork(); if ( this->pid == 0 ) { ...
1threat
#javascript if condition is getting executed even though the condition is false : javascript flow is entering `if condition` even if the condition is false. The code is below: console.log("RefRefRef: "+Ref.length); if(false) { console.log("slakdfjaskldjlk"); $ .aja...
0debug
Scan a folder for files : <p>I am tasked with creating an app to monitor a folder for files to be processed.</p> <p>I was wondering if there is anything new an exciting that I can use or should I just spin up a good old windows service?</p>
0debug
Python : What is the purpose of a double comma in a if statement : I have this piece of python code below. def m(list): v = list[0] for e in list: if v < e: v = e return v values = [[3, 4, 5, 1], [33, 6, 1, 2]] for row in values: print(m(row...
0debug
Javascript function : I recently started learning Javascript. I have an assignment for my class, and what I have to do is to click a button (a number 10 is written on the button), and there has to be "Result = 55". (here all numbers from 0 to 10 are added) To change words by clicking buttons, I wrote code like this. ...
0debug
INLINE float64 packFloat64( flag zSign, int16 zExp, bits64 zSig ) { return ( ( (bits64) zSign )<<63 ) + ( ( (bits64) zExp )<<52 ) + zSig; }
1threat
How to find images in a specific folder which are not multiples of 2? : I've some folders with about 200 images and I'd like to highligh the images which are not multiples of 2. Is there an efficient way of doing so? Best Regards!
0debug
what is delay() in C? is it a system function? : in a book, I saw a piece of code. [![command line aurguments][1]][1] but when I ran this code it says C:\Users\dipankar\Desktop\cla.cpp [Error] 'delay' was not declared in this scope they used it without proper documentation. they only said that "delay() is use...
0debug
Eclipse Maven project error when performing any maven operation (maven build, maven clean ...) : <p>Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher</p>
0debug
static void mptsas_update_interrupt(MPTSASState *s) { PCIDevice *pci = (PCIDevice *) s; uint32_t state = s->intr_status & ~(s->intr_mask | MPI_HIS_IOP_DOORBELL_STATUS); if (s->msi_in_use && msi_enabled(pci)) { if (state) { trace_mptsas_irq_msi(s); msi_notify(pci, 0);...
1threat
static void stream_complete(BlockJob *job, void *opaque) { StreamBlockJob *s = container_of(job, StreamBlockJob, common); StreamCompleteData *data = opaque; BlockDriverState *bs = blk_bs(job->blk); BlockDriverState *base = s->base; Error *local_err = NULL; if (!block_job_is_cancelled(&s...
1threat
Recursive Fibonacci in Python : This is not my code. I can't understand what line 3 is doing exactly, the logical operations. cache = {} def fiba(n): cache[n] = cache.get(n, 0) or (n <= 1 and 1 or fiba(n-1) + fiba(n-2)) return cache[n] n = 0 x = 0 while fi...
0debug
What kind of code is this? C or C++ : <p>I have written some code for my own practice purpose, but interesting thing happened. I was originally trying to write a C++ code, however I forgot include streamio library and using namespace std, then I just using printf() function all the way during my coding. </p> <p>I thi...
0debug
static av_cold void decode_init_vlc(void){ static int done = 0; if (!done) { int i; done = 1; init_vlc(&chroma_dc_coeff_token_vlc, CHROMA_DC_COEFF_TOKEN_VLC_BITS, 4*5, &chroma_dc_coeff_token_len [0], 1, 1, &chroma_dc_coeff_token_bits[0], 1, 1,...
1threat
is "delete[]" necessary after a wchar_t array/ string? : As i was explaining in the title, is that necessary? or operative system just handle that? This is the first question. The second question is from the code i was developing, i had an error from debugging with the "delete" instruction, and i'm not able to know wh...
0debug
What does std::cout << std::cin do? : <p>I am new to C++ and was messing around with some of the things that I've learnt. So I tried the following code:</p> <pre><code>#include &lt;iostream&gt; int main() { std::cout &lt;&lt; std::cin; } </code></pre> <p>So I expected the code to return an error, but instead got ...
0debug
My if/else is messing up. (New programmer.) : cout << "Get ready to enter in the total rainfall for year " << yearCount << ".\n"; for (months = 1; months <= 12; months ++) cout << "Please enter the total rainfall for "; if (months == 1) cout << "January.\n"; else if (months...
0debug
static void qdict_array_split_test(void) { QDict *test_dict = qdict_new(); QDict *dict1, *dict2; QList *test_list; qdict_put(test_dict, "1.x", qint_from_int(0)); qdict_put(test_dict, "3.y", qint_from_int(1)); qdic...
1threat
How to set start page in dotnet core web api? : <p>I try to build a web application with dotnet core web api,but i do not know how to set index.html as start page which can be done with dotnet framework web api easily. And i tried to use <code>app.UseDefaultFiles();app.UseStaticFiles();</code> to solve this problem, ho...
0debug
Submit form to fill up the last recent ID row [MySQL] : <p>Lets say I have this table:</p> <pre><code>------------------ ID | Car | ------------------ 25 | Honda | .. | ... | .. | ... | .. | ... | 123 | Toyota | ------------------ </code></pre> <p>How to start fill in at row ...
0debug
BusState *qbus_create(BusType type, size_t size, DeviceState *parent, const char *name) { BusState *bus; bus = qemu_mallocz(size); bus->type = type; bus->parent = parent; bus->name = qemu_strdup(name); LIST_INIT(&bus->children); if (parent) { LIST_IN...
1threat
Ckeditor show block element html : I'm using Ckeditor 4.5 version. I want to config same this images. Please help me [Block html][1] [1]: http://i.stack.imgur.com/ezjxL.png
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 must_delete, ret; QEMUFile *f; int saved_vm_running; uint32_t vm_state_size; #ifdef _WIN32 struct _timeb tb; #els...
1threat
static void img_snapshot(int argc, char **argv) { BlockDriverState *bs; QEMUSnapshotInfo sn; char *filename, *snapshot_name = NULL; int c, ret; int action = 0; qemu_timeval tv; for(;;) { c = getopt(argc, argv, "la:c:d:h"); if (c == -1) break; ...
1threat
np.arange function returns weird value. I don't know why : <pre><code>import numpy as np a=np.arange(1e-10,2e-10,1e-11) print(len(a)) b=np.arange(0.1,0.2,0.01) print(len(b)) </code></pre> <p>Value of a is 11 and value of b is 10. Why is that? I've known that arange func is the interval including start but excluding st...
0debug
unsigned long get_checksum(ByteIOContext *s){ s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_ptr - s->checksum_ptr); s->checksum_ptr= NULL; return s->checksum; }
1threat
how to solve bean exception in spring framework? : package test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import beans.Test; public class Client { public...
0debug
static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, mfxExtBuffer **coding_opts) { mfxInfoMFX *info = &q->param.mfx; mfxExtCodingOption *co = (mfxExtCodingOption*)coding_opts[0]; #if QSV_HAVE_CO2 mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_...
1threat
Warning: function result variable of a managed type does not seem to initialized : I am unfortunately required to use pascal for university to create programs, the task I have requires me to create two routines one of which reads in data from a terminal and the other outputs data to the terminal, and another two routin...
0debug
static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, Error **errp) { const char *buf; int bdrv_flags = 0; int on_read_error, on_write_error; bool account_invalid, account_failed; const char *stats_intervals; BlockBackend *blk; Block...
1threat
static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){ int x, y; const int width= f->avctx->width; const int height= f->avctx->height; uint16_t *src= (uint16_t*)f->last_picture.data[0]; uint16_t *dst= (uint16_t*)f->current_picture.data[0]; const int stride= f->current_...
1threat
PHP array sort using Bubble approach : <p>I have a array such as $arr = array(1,3,2,8,5,7,4,6,0);</p> <p>How can i use bubble sorting method for custom sort ?</p> <p>Thank you</p>
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
java static final in kotlin: Const 'val' initializer should be a constant value : <p>In Java, We can do this:</p> <pre><code>public class TestA { public static final boolean flag = true; public static final String str = flag ? "A" : "B"; // ok } </code></pre> <p>But cannot in Kotlin</p> <pre><code> class Tes...
0debug
acces to switch statement parametre value from a global variable : am learning javascript by making a little project , I have little probleme of understanding well global variables , in that example when I put the variable = result ; from the randomvariable() function , on the switch parametre of test() func...
0debug
how to Increase the figure size of Dataframe.hist for pandas 0.11.0 : <p>I am trying to make histograms for all columns of a dataframe through pandas 0.11.0 but the figure size is very small and hence the histograms are coming even smaller. We have the figsize property in 0.19.0 but how can we achieve the same in 0.11....
0debug
submit and do html form string in asp mvc controler side : i have html string like this in controller i receive this from web service (not important) string str ="<form name='jy'action='https://' method='POST'><input type=submit value='Pay'></form>"; i should send this to view and show to user and user sh...
0debug
How to use classes in C++? : <p>I can't see to find the problem in my code. Nor the solution on the internet. I can see that i can create the code in a different way but i need to know how to work with it written like this:</p> <pre><code>class Triunghi{ int l1=0;//latura1 int l2=0;//latura2 int ba=0;//baz...
0debug
static void extend_solid_area(VncState *vs, int x, int y, int w, int h, uint32_t color, int *x_ptr, int *y_ptr, int *w_ptr, int *h_ptr) { int cx, cy; for ( cy = *y_ptr - 1; cy >= y && check_solid_tile(vs, *x_ptr, cy, *w_ptr, 1, ...
1threat
Xcode 7.3 autocomplete is so frustrating : <p>There is a new autocomplete in Xcode. Probably might be useful because it checks not only beginning of names etc. But I found that very often it doesn't find a class name or a const name at all etc. I need to type in entire name by myself. Over all I found it makes my life ...
0debug
Pytorch Chatbot Tutorial problem: How can I slove List Index Out of Range : I’m new to pytorch and have been following the many tutorials available. But, When I did The CHATBOT TUTORIAL (https://pytorch.org/tutorials/beginner/chatbot_tutorial.html?highlight=chatbot%20tutorial) is not work. Like the figure below ...
0debug
How to implement drop down list in flutter? : <p>I have a list of locations that i want to implement as a dropdown list in Flutter. Im pretty new to the language. Here's what i have done.</p> <pre><code>new DropdownButton( value: _selectedLocation, onChanged: (String newValue) { setState(() { _selectedLo...
0debug
def dealnnoy_num(n, m): if (m == 0 or n == 0) : return 1 return dealnnoy_num(m - 1, n) + dealnnoy_num(m - 1, n - 1) + dealnnoy_num(m, n - 1)
0debug
wanting to print if list elements are armstrong number or not : n = int(input("" "")) l = [] for i in range(n): a = int(input()) l.append(a) s=0 for i in l: temp = i while temp>0: d = temp % 10 s += d**3 temp /...
0debug
What's the difference between pg_table_size, pg_relation_size & pg_total_relation_size? (PostgreSQL) : <p>What's the difference between <code>pg_table_size()</code>, <code>pg_relation_size()</code> &amp; <code>pg_total_relation_size()</code>?</p> <p>I understand the basic differences explained <a href="https://www.pos...
0debug
void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn) { spapr_hcall_fn old_fn; assert(opcode <= MAX_HCALL_OPCODE); assert((opcode & 0x3) == 0); old_fn = hypercall_table[opcode / 4]; assert(!old_fn || (fn == old_fn)); hypercall_table[opcode / 4] = fn; }
1threat
Javascript password validation check if it hass small and capitals and special characters : Am trying to create a password vaidation by checking if it has small, capital letters and special characters but still fails to work so i have testPwd(val){ return Boolean(/^[a-zA-Z0-9]+$/.test(val)); } W...
0debug
int qemu_thread_is_self(QemuThread *thread) { QemuThread *this_thread = TlsGetValue(qemu_thread_tls_index); return this_thread->thread == thread->thread; }
1threat
static void generate_new_codebooks(RoqContext *enc, RoqTempdata *tempData) { int i,j; RoqCodebooks *codebooks = &tempData->codebooks; int max = enc->width*enc->height/16; uint8_t mb2[3*4]; roq_cell *results4 = av_malloc(sizeof(roq_cell)*MAX_CBS_4x4*4); uint8_t *yuvClusters=av_malloc(sizeo...
1threat
static void pc_cpu_unplug_request_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { int idx = -1; HotplugHandlerClass *hhc; Error *local_err = NULL; X86CPU *cpu = X86_CPU(dev); PCMachineState *pcms = PC_MACHINE(hotplug_dev); pc_find_cpu_slot(M...
1threat
static void qxl_send_events(PCIQXLDevice *d, uint32_t events) { uint32_t old_pending; uint32_t le_events = cpu_to_le32(events); trace_qxl_send_events(d->id, events); assert(qemu_spice_display_is_running(&d->ssd)); old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events); if ((...
1threat
function on php file : I have this code that I got from here, (function() { var quotes = $(".quotes"); var quoteIndex = -1; function showNextQuote() { ++quoteIndex; quotes.eq(quoteIndex % quotes.length) .fadeIn(2000) .delay(2000) .fadeOu...
0debug
How to call Kotlin suspending coroutine function from Java 7 : <p>I'm trying to call Kotlin function from Java 7. I'm using coroutines and this called function is suspending, for example:</p> <pre><code>suspend fun suspendingFunction(): Boolean { return async { longRunningFunction() }.await() } suspend fun longRu...
0debug
How to remove brackets and the contents inside from a file using python : I have a large file which have contents like ServiceProfile.SharediFCList[11] where the number increments. my requirement is to remove the [number] contents from the file and save those to another file. Please guide me in doing so Regard...
0debug
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
Replacing golang error codes with panic for all error handeling : We have medium size application written in go. From all the code lines about 60 percent goes to code error handling. Something like this: if err != nil { return err } After some time, writing this lines over and over again be...
0debug
static int process_requests(int sock) { int flags; int size = 0; int retval = 0; uint64_t offset; ProxyHeader header; int mode, uid, gid; V9fsString name, value; struct timespec spec[2]; V9fsString oldpath, path; struct iovec in_iovec, out_iovec; in_iovec.iov_ba...
1threat
SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c) { SwsFunc t = NULL; #if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL t = ff_yuv2rgb_init_mmx(c); #endif #if HAVE_VIS t = ff_yuv2rgb_init_vis(c); #endif #if CONFIG_MLIB t = ff_yuv2rgb_init_mlib(c); #endif #if HAVE_ALTIVEC && CONFIG_GPL if (c->flag...
1threat
HTML + CSS only - three equal columns (33%~) with equal heights : <p>I'm having a huge issue and I suppose it may be not "doable", but I thought it would do no harm to ask.</p> <p>I need three equal columns, with equal heights, but I don't know their heights, so this must be dynamic.</p> <p>To make it even harder, ea...
0debug