problem
stringlengths
26
131k
labels
class label
2 classes
CSS3 :nth-child(odd) Selector not selecting columns not rows : I have a simple table using tr:nth-child(odd) to alternate background for rows in a table. HTML <tr class="sao-zebra"> <th class="sao-feature">Some Text</th> <td class="sao-even-basic">Copy</td> <td class="sao-even-gold">Copy</t...
0debug
Sending JSON Data with Xcode : I'm building a chat app and I understand how to receive the data back but I'm having trouble sending the data. Im trying to take two UITextField values which are the username and the message and send the data. Variables @IBOutlet weak var username: UITextField! @IBOutlet we...
0debug
how to sort my sql table datas in category wise : im trying to create a music site i need to sort my table datas in category wise Like English , Chines , Hindi etc but i dont know this Help Me Please sorry for my bad english my table CREATE TABLE `players` ( `id` int(11) NOT NULL auto_increment, ...
0debug
Subtract values in single column using where condition : Table Name : report column : amount, type values of 'type' = credit, debit I want to calculate balance via sum (amount) where type=credit - sum (amount) where type=debit Please check the sqlfiddle : http://sqlfiddle.com/#!9/cd8b8c thanks a lot !!!
0debug
Kotlin Android Extensions giving Layout Null Pointer : <p>There is a fairly simple scenario that is giving me quite a bit of trouble. I'm making a very simple Activity with an embedded fragment. This fragment is simply a Gridview that displays some images. The issue comes when referring to the Gridview using Kotlin ext...
0debug
Tkinter error TclError: invalid command name ".71847552" : I am making an excel comparing program and exporting it to a CSV file. Here is my code: import openpyxl, csv from tkinter import * from tkinter.filedialog import askopenfilename from openpyxl.utils import column_index_from_string ou...
0debug
Pattern to use Serilog (pass ILogger vs using static Serilog.Log) : <p><strong>Background</strong></p> <p>In a new project where <em>Serilog</em> was chosen as the logger I automatically started passing around <code>ILogger</code> interface. The code accesses <code>Log.Logger</code> once and from then the classes that...
0debug
Material spinner cant support v4 device. How can i fix it? : Im using material spinner library 'com.github.ganfra:material-spinner:1.1.0'. This spinner working fine all device . But not working version 4. How can i fix this issues?I attached screenshot [![enter image description here][1]][1] [1]: https://i.stac...
0debug
Python substitution of words : <p>Let's say that I have a text with me and I assigned it a variable. </p> <p>text = "Don't you want to play"</p> <p>I want to add a question at the end of the sentence, in order to do that, I need some code which helps me recognize and analyse the first word of the sentence and place a...
0debug
Getting error while using const ,I am little confused in using const : <p>I'm wondering what is the difference between let and const in ECMAScript 6. Both of them are block scoped</p>
0debug
tow like condition in 1 sql query : i have a datagridview and i want to set it user to serch data using textbox i am using vb.net and ms accsess here is my sql code .when i run it there is an error show "no value given for one or more parameeter ("select *from itemtbl where (item_id like '%" & TextBox1.Text & ...
0debug
Android Studio not stopping for asking to update Gradle : <p>Since the latest version, Android Studio is annoying me that</p> <blockquote> <p>It is strongly recommended that you update Gradle to version 2.14.1 or later.</p> </blockquote> <p><a href="https://i.stack.imgur.com/d6tTk.png" rel="noreferrer"><img src="ht...
0debug
How to create and validate forms in Javascript / JQuery? : <p>I'm currently developing a checkout form for an e-commerce site, as any other checkout there are a lot of validations on its fields, things like: </p> <ul> <li>If the user selects the radio buton 'I'm Company' show the VAT field.</li> <li>If the user has no...
0debug
How to get the record number returned for a MySQL insert command in Perl : <p>I am inserting into a MySQL table from Perl. But sometimes I would like to get the record number for that insert to use later.</p> <p>Is there a way to get that return from MySQL?</p> <p>p.s. This table has zero indexes. </p> <p>Thanks</...
0debug
sql convert datetime to day name : i want convert form datetime formate to day name but i have problem failed convert. "Conversion failed when converting date and/or time from character string." `SELECT DATENAME(dw, date) as date , name, date FROM kkpsurabaya`
0debug
AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact) { AVFixedDSPContext * fdsp = av_malloc(sizeof(AVFixedDSPContext)); fdsp->vector_fmul_window_scaled = vector_fmul_window_fixed_scaled_c; fdsp->vector_fmul_window = vector_fmul_window_fixed_c; return fdsp; }
1threat
Parsing a string to a usable formate and compare it to current date & time (C#) : I'm trying to parse a string that looks like this (20190903T114500,000) to a formate and compare it to the current time and date. It's supposed to give an allert, when the date and time are only 5 minutes appart. Yet I'm struggeling w...
0debug
C# "content acceptance : Hi you know I can't make my character move in unity, because c# doesn't accet word "velocity". Help me solve this problem please. public class MarioController : MonoBehaviour { public float maxSpeed=10f; bool facingRight=true; void Start () {} void FixedUpdate () ...
0debug
static void omap_update_display(void *opaque) { struct omap_lcd_panel_s *omap_lcd = (struct omap_lcd_panel_s *) opaque; DisplaySurface *surface = qemu_console_surface(omap_lcd->con); draw_line_func draw_line; int size, height, first, last; int width, linesize, step, bpp, frame_offset; hwa...
1threat
document.getElementById('input').innerHTML = user_input;
1threat
Unit testing with private service injected using jasmine angular2 : <p>I have a problem trying to unit test an angular service. I want to verify that this service is properly calling another service that is injected into it.</p> <p>Lets say I have this ServiceToTest that injects ServiceInjected:</p> <p>ServiceToTest ...
0debug
static void correlate_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int inverse, int use_median, int start_y, int end_y){ const int w= b->width; int x,y; DWTELEM * line; DWTELEM * prev; if (start_y != 0) line = slice_buffer_get_line(sb,...
1threat
static void vga_putcharxy(DisplayState *ds, int x, int y, int ch, TextAttributes *t_attrib) { uint8_t *d; const uint8_t *font_ptr; unsigned int font_data, linesize, xorcol, bpp; int i; unsigned int fgcol, bgcol; #ifdef DEBUG_CONSOLE printf("x: %2i y: %2i", x,...
1threat
Slice signatures are inconsistent with android studio default run : <p>I've configured gradle for signing with:</p> <pre><code>android { ... signingConfigs{ debug { storeFile file("..."); storePassword '...' keyAlias '...' keyPassword '...' } ...
0debug
Code for C# that allows you to Sum all Quantity from SQL Database with only name Condition without using datagridview : <p>Please Help. What is the code for C# Windows Form that allows you to Sum all Quantity from SQL Database with only name Condition without using Datagridview. Thanks in advance</p> <p>This be like: ...
0debug
JSON Web Token (JWT) as a url for email activation : <p>How secure it is to make JWT as the activation url in email?</p> <p>For example: Click link to activate your account <a href="http://127.0.0.1:8000/account/activate/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ0b3B0YWwuY29tIiwiZXhwIjoxNDI2NDIwODAwLCJodHRwOi8vd...
0debug
Why, when I print a derefrenced pointer in main that points to a variable declared in a function, does it not print junk memory. (GOLANG) : package main 2 3 import "fmt" 4 5 6 func point(x int) *int { 7 8 y := x 9 return &y 10 11 } 12 13 14 func main() { 15 ...
0debug
Color gamut in Xcode 8 : <p>Today I have installed Xcode 8(beta) and exploring Storyboards. Here we can now set background and tintColor for different traits. That's good news.</p> <p>But here with trait collection(for example any height X any width) there is another selection of <code>gamuts</code></p> <p>Here is th...
0debug
copy a file and change the name : i was asked to make a file copier that will change the name of the file (add "_Copy") but will keep the type of file for example: c:\...mike.jpg(or mp3 or any type of file) to: c:\...mike_Copy.jpg here is my code : private void btnChseFile_Click(object sender, EventArgs...
0debug
static void free_packet_list(AVPacketList *pktl) { AVPacketList *cur; while (pktl) { cur = pktl; pktl = cur->next; av_free_packet(&cur->pkt); av_free(cur); } }
1threat
I have jason object But I am unabled to access 'name' element in this? : This is the jason data <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-html --> {"0":{"restaurant":"Bayleaf","order":"HIHUN10","delivery at":"04:43 PM 2016-06-22","type":"Home Delivery","name":"dE...
0debug
static void tcg_out_ri64(TCGContext *s, int const_arg, TCGArg arg) { if (const_arg) { assert(const_arg == 1); tcg_out8(s, TCG_CONST); tcg_out64(s, arg); } else { tcg_out_r(s, arg); } }
1threat
React’s new context api with enzyme : <p>I have been using enzyme and love it a lot. It works with react 16 until I wanted to test my new project that uses react’s new context api. </p> <p>If I render only my basic component using shallow and console log the debug of the component I can see its content but when I use ...
0debug
Java - Subtracting doubles gives answer * 1000 : <p>I am trying to find the difference of 2 doubles with many decimal points: </p> <pre><code>double highest = 0.01518804243008679; double lowest = 0.01464486209421528; System.out.println("Difference: " + (highest - lowest)); </code></pre> <p>And I get an answer which i...
0debug
static void flush_dpb(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; int i; for(i=0; i<16; i++) h->delayed_pic[i]= NULL; h->delayed_output_pic= NULL; idr(h); }
1threat
PHP - Get the current array with string : <pre><code>$form = array( array( 'form' =&gt; 'Change Schedule', 'data' =&gt; array( array( 'element'=&gt;'input', 'name'=&gt;'form-start', 'class'=&gt;'form-control'...
0debug
int ff_vorbiscomment_write(uint8_t **p, AVDictionary **m, const char *vendor_string) { bytestream_put_le32(p, strlen(vendor_string)); bytestream_put_buffer(p, vendor_string, strlen(vendor_string)); if (*m) { int count = av_dict_count(*m); AVDictionaryEntry *...
1threat
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
static bool tcg_out_opc_jmp(TCGContext *s, MIPSInsn opc, void *target) { uintptr_t dest = (uintptr_t)target; uintptr_t from = (uintptr_t)s->code_ptr + 4; int32_t inst; if ((from ^ dest) & -(1 << 28)) { return false; } assert((dest & 3) == 0); inst = opc; ins...
1threat
static int nbd_send_rep(int csock, uint32_t type, uint32_t opt) { uint64_t magic; uint32_t len; magic = cpu_to_be64(NBD_REP_MAGIC); if (write_sync(csock, &magic, sizeof(magic)) != sizeof(magic)) { LOG("write failed (rep magic)"); return -EINVAL; } opt = cpu_to_be32(opt...
1threat
static inline void mix_3f_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] + output[3][i]); memset(output[2], 0, sizeof(output[2])); memset(output[3], 0, sizeof(output[3])); }
1threat
React Native: Can't see console.logs when I run application from XCode : <p>I'm struggling to get my code working with <code>react-native run-ios</code>. The native code is pulling some old cached version of the javascript bundle, and I can't seem to clear that to save my life.</p> <p>When I run the application from X...
0debug
static void virtio_pci_device_plugged(DeviceState *d) { VirtIOPCIProxy *proxy = VIRTIO_PCI(d); VirtioBusState *bus = &proxy->bus; uint8_t *config; uint32_t size; config = proxy->pci_dev.config; if (proxy->class_code) { pci_config_set_class(config, proxy->class_code); } ...
1threat
Vue.js display one data at a time from an array : <p>My requirement is something like this</p> <ol> <li>I have an array with few names.</li> <li>I want to take first name from this array and display it inside the div. After that I want to display the second name then third...</li> <li>I want this to happen as an infin...
0debug
How to extract the Photo/Video component of a MVIMG? : <p>The Google Pixel 2 and probably other phones since have the capability to cover "Motion Photos". These are saved as MVIMG and comparatively big.</p> <p>I’m looking for a way to remove/extract the video.</p> <p>So far I found a promising exif tag</p> <pre><cod...
0debug
How to make a phone call in Xamarin.Forms by clicking on a label? : <p>Hello I have an app i'm working on in Xamarin.Forms that gets contact info from a web service and then displays that info in labels however I want to make the label that lists the phone number to make a call when clicked. How do I go about doing thi...
0debug
static int x86_cpu_filter_features(X86CPU *cpu) { CPUX86State *env = &cpu->env; FeatureWord w; int rv = 0; for (w = 0; w < FEATURE_WORDS; w++) { uint32_t host_feat = x86_cpu_get_supported_feature_word(w, false); uint32_t requested_features = env->features[w]; ...
1threat
void cpu_dump_statistics (CPUState *env, FILE*f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...), int flags) { #if defined(DO_PPC_STATISTICS) opc_handler_t **t1, **t2, **t3, *handler; int op1, op2, op3; t1 = env->opcodes; for (op1 = 0; op1 ...
1threat
void net_slirp_redir(const char *redir_str) { int is_udp; char buf[256], *r; const char *p; struct in_addr guest_addr; int host_port, guest_port; if (!slirp_inited) { slirp_inited = 1; slirp_init(0, NULL); } p = redir_str; if (get_str_sep(buf, sizeof(b...
1threat
static inline void vhost_dev_log_resize(struct vhost_dev* dev, uint64_t size) { vhost_log_chunk_t *log; uint64_t log_base; int r; if (size) { log = g_malloc0(size * sizeof *log); } else { log = NULL; } log_base = (uint64_t)(unsigned long)log; r = ioctl(dev->con...
1threat
IdentityUserLogin<string>' requires a primary key to be defined error while adding migration : <p>I am using 2 different Dbcontexts. i want to use 2 different databases users and mycontext. While doing that i am getting a error The entity type 'Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin' requir...
0debug
ssize_t qemu_paio_return(struct qemu_paiocb *aiocb) { ssize_t ret; pthread_mutex_lock(&lock); ret = aiocb->ret; pthread_mutex_unlock(&lock); return ret; }
1threat
Why can't I parse "0-2-6-1​" to ints after splitting by '-' : <p>Reading from an Excel Worksheet that was copy and pasted with a list of string speperated numbers, why will c# not convert a char/string 0 to a zero or a char/string 1 to an int 1 after splitting the string into an array by '-'? </p> <p>It seems like th...
0debug
HTML/CSS layout design help? How can I center this slideshow? : I need some help regarding the layout of my website. Basically, **I'm trying to center the Js slideshow & "Slideshow header" that you can see in image left.** Below you can see what my website looks like on the left and on the right is how I want to center...
0debug
int bdrv_all_create_snapshot(QEMUSnapshotInfo *sn, BlockDriverState *vm_state_bs, uint64_t vm_state_size, BlockDriverState **first_bad_bs) { int err = 0; BlockDriverState *bs; BdrvNextIterator it; for (bs = ...
1threat
What are the benefits of C# 7 local functions over lambdas? : <p>The other day in one of my utilities, ReSharper hinted me about the piece of code below stating that lambda defining the delegate <code>ThreadStart</code> can be turned into a local function:</p> <pre><code>public void Start(ThreadPriority threadPriority...
0debug
How to configure Lombok with maven-compiler-plugin? : <p>I have a root module and submodule in maven in the project. I am trying to use Lombok. I have added </p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.projectlombok&lt;/groupId&gt; &lt;artifactId&gt;lombok&lt;/artifactId&gt; &lt;version&gt;1.16.12...
0debug
Unable to predict test dataset : I have a training data set with the below variables > str(PairsTrain) 'data.frame': 1495698 obs. of 4 variables: $ itemID_1 : int 1 4 8 12 15 19 20 20 22 26 ... $ itemID_2 : int 4112648 1223296 2161930 5637025 113701 ...
0debug
user registration form without entity framework using MVC : [HttpPost] public ActionResult Create(UserModel userModel) { using (SqlConnection sqlCon= new SqlConnection(connectionString)) { sqlCon.Open(); String query = "INSERT INTO User V...
0debug
can i scan objects like fruits, vegetables, non vegetables and flowers with camera in android? : <blockquote> <p>I want to make an android app to check the freshness of fruits,vegetables, non vegetables and flowers. I want to scan all these with camera and provide details to user after scanning. Can anyone please giv...
0debug
void cpu_outw(pio_addr_t addr, uint16_t val) { LOG_IOPORT("outw: %04"FMT_pioaddr" %04"PRIx16"\n", addr, val); trace_cpu_out(addr, val); ioport_write(1, addr, val); }
1threat
static void get_seg(SegmentCache *lhs, const struct kvm_segment *rhs) { lhs->selector = rhs->selector; lhs->base = rhs->base; lhs->limit = rhs->limit; lhs->flags = (rhs->type << DESC_TYPE_SHIFT) | (rhs->present * DESC_P_MASK) | (rhs->dpl << DESC_DPL_SHIFT) | (rhs->db << DESC_B_SHIFT) | (r...
1threat
Xquery with dynamic Index : i am trying to use Xquery in Sql Server, but i need that the index be dynamic: This is my query: <code> SELECT cast(yourXML as XML).value('(/integracao/item/NumPedido)[1]','VARCHAR(MAX)') NumPedido FROM #xml </code> what i have tried: <code> SELECT cast(yourXML as XML).value('(/i...
0debug
Avoid `logger=logging.getLogger(__name__)` without loosing : I am lazy and want to avoid this line in every python file which uses logging: logger = logging.getLogger(__name__) In january I asked how this could be done, and found an answer: http://stackoverflow.com/questions/34726515/avoid-logger-logging-ge...
0debug
static bool check_section_footer(QEMUFile *f, SaveStateEntry *se) { uint8_t read_mark; uint32_t read_section_id; if (skip_section_footers) { return true; } read_mark = qemu_get_byte(f); if (read_mark != QEMU_VM_SECTION_FOOTER) { error_report("Missing sect...
1threat
JQUERY - using has class to show/hide rows results in lag and performance hit : I have a quite large html table that I am showing/hiding rows based on their class. The code works as desired, but there is around a 10 second lag/freeze of the client. Any help or pointers on fixing this performance issue would be apprecia...
0debug
Filter through an array of objects : <p>Having an array of objects with this structure<a href="https://i.stack.imgur.com/hJRWZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hJRWZ.png" alt="enter image description here"></a> My question is how should a filter it to return, for example, only the obje...
0debug
static void virtio_blk_migration_state_changed(Notifier *notifier, void *data) { VirtIOBlock *s = container_of(notifier, VirtIOBlock, migration_state_notifier); MigrationState *mig = data; Error *err = NULL; if (migration_in_setup(mig)) { if (!s->datapl...
1threat
static int decode_frame_png(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { PNGDecContext *const s = avctx->priv_data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; AVFrame *p; int64_t sig; ...
1threat
Efficiently mapping one-to-many many-to-many database to struct in Golang : <h1>Question</h1> <p>When dealing with a one-to-many or many-to-many SQL relationship in Golang, what is the best (efficient, recommended, "Go-like") way of mapping the rows to a struct?</p> <p>Taking the example setup below I have tried to d...
0debug
Easy way to sort DOM? : <p>I'm really new to JS and i'm trying to sort this code from the higher user_mmr to lowest.</p> <pre><code> &lt;table&gt; &lt;tr class="user"&gt;&lt;td class="user_name"&gt;Kyun#294&lt;/td&gt;&lt;td class="user_mmr"&gt;4837&lt;/td&gt; &lt;tr class="user"&gt; &lt;td class="user_name"&gt;...
0debug
def geometric_sum(n): if n < 0: return 0 else: return 1 / (pow(2, n)) + geometric_sum(n - 1)
0debug
static uint32_t nabm_readl (void *opaque, uint32_t addr) { PCIAC97LinkState *d = opaque; AC97LinkState *s = &d->ac97; AC97BusMasterRegs *r = NULL; uint32_t index = addr - s->base[1]; uint32_t val = ~0U; switch (index) { case PI_BDBAR: case PO_BDBAR: case MC_BDBAR: ...
1threat
how to insert tab in a sequential word in python : nowadays I met a problem that I have a very large txt file which looks like following: - A T T A G C A - A AT A G C A - T TT AG G A - G T T A G C A every character was spilt by \t,but some characters are connected,I want to add \t to these sequence. What I...
0debug
static int unpack_block_qpis(Vp3DecodeContext *s, GetBitContext *gb) { int qpi, i, j, bit, run_length, blocks_decoded, num_blocks_at_qpi; int num_blocks = s->total_num_coded_frags; for (qpi = 0; qpi < s->nqps-1 && num_blocks > 0; qpi++) { i = blocks_decoded = num_blocks_at_qpi = 0; ...
1threat
static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { Jpeg2000DecoderContext *s = avctx->priv_data; ThreadFrame frame = { .f = data }; AVFrame *picture = data; int tileno, ret; s->avctx = avctx; s->bu...
1threat
e1000_set_link_status(NetClientState *nc) { E1000State *s = qemu_get_nic_opaque(nc); uint32_t old_status = s->mac_reg[STATUS]; if (nc->link_down) { e1000_link_down(s); } else { if (s->compat_flags & E1000_FLAG_AUTONEG && s->phy_reg[PHY_CTRL] & MII_CR_AUTO_NEG_EN && ...
1threat
static void gem_transmit(GemState *s) { unsigned desc[2]; target_phys_addr_t packet_desc_addr; uint8_t tx_packet[2048]; uint8_t *p; unsigned total_bytes; if (!(s->regs[GEM_NWCTRL] & GEM_NWCTRL_TXENA)) { return; } DB_PRINT("\n"); ...
1threat
AWS Glue executor memory limit : <p>I found that AWS Glue set up executor's instance with memory limit to 5 Gb <code>--conf spark.executor.memory=5g</code> and some times, on a big datasets it fails with <code>java.lang.OutOfMemoryError</code>. The same is for driver instance <code>--spark.driver.memory=5g</code>. Is t...
0debug
static void vfio_msix_enable(VFIOPCIDevice *vdev) { vfio_disable_interrupts(vdev); vdev->msi_vectors = g_malloc0(vdev->msix->entries * sizeof(VFIOMSIVector)); vdev->interrupt = VFIO_INT_MSIX; vfio_msix_vector_do_use(&vdev->pdev, 0, NULL, NULL); vfio_msix_vec...
1threat
Git - how to automatically resolve "deleted by us" conflict when cherry-picking : <p>I run the following command:</p> <pre><code>git cherry-pick SHA --strategy-option theirs </code></pre> <p>and get a conflict like this waiting for manual resolution:</p> <pre><code>deleted by us: SOME_FILE </code></pre> <p>Is there...
0debug
Comapre object properties in 2 lists : I found in some other questions how to compare two lists of objects and get the difference in the way that objects in lists are different. But I am not sure If the same/similar thing is possible in case that I have same objects in two list, but possibly different property value ...
0debug
struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, ...
1threat
Checking file existence in Julia : <p>Is there a simple way in Julia to check whether a file in the current working directory exists (something like <code>test = os.path.isfile("foo.txt")</code> in Python or <code>inquire(file = "foo.txt", exist = test)</code> in Fortran)?</p>
0debug
what's the difference between yield from and yield in python 3.3.2+ : <p>After python 3.3.2+ python support a new syntax for create generator function </p> <pre><code>yield from &lt;expression&gt; </code></pre> <p>I have made a quick try for this by </p> <pre><code>&gt;&gt;&gt; def g(): ... yield from [1,2,3,4] ...
0debug
How to add multiplie placeholders to HTML Program? : Okay I made a program <div id="todo-app"> <label class="todo-label" for="new-todo">What do you want to do today?</label> <input type="text" id="new-todo" class="todo-input" placeholder="buy milk"> But in the placeholder ...
0debug
Convert a column of datetimes to epoch in Python : <p>I'm currently having an issue with Python. I have a Pandas DataFrame and one of the columns is a string with a date. The format is :</p> <blockquote> <p>"%Y-%m-%d %H:%m:00.000". For example : "2011-04-24 01:30:00.000"</p> </blockquote> <p>I need to convert the e...
0debug
static int tcp_write(URLContext *h, uint8_t *buf, int size) { TCPContext *s = h->priv_data; int ret, size1, fd_max; fd_set wfds; struct timeval tv; size1 = size; while (size > 0) { if (url_interrupt_cb()) return -EINTR; fd_max = s->fd; FD_ZERO(&wf...
1threat
How to get index of smallest value from list : <p>I want to get the index of smallest value from ArrayList of String type</p> <pre><code>ArrayList&lt;String&gt; list = new ArrayList(); list.add("7.01"); list.add("12.01") list.add("9.00"); list.add("8.1"); </code></pre> <p>I am getting those above value from server. <...
0debug
@ngrx Effect does not run the second time : <p>I've just started learning about @ngrx/store and @ngrx.effects and have created my first effect in my Angular/Ionic app. It runs ok the first time but if I dispatch the event to the store again (i.e when clicking the button again), nothing happens (no network call is made,...
0debug
void qmp_migrate_set_cache_size(int64_t value, Error **errp) { MigrationState *s = migrate_get_current(); int64_t new_size; if (value != (size_t)value) { error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size", "exceeding address space"); return; } ...
1threat
static PageDesc *page_find_alloc(tb_page_addr_t index, int alloc) { PageDesc *pd; void **lp; int i; #if defined(CONFIG_USER_ONLY) # define ALLOC(P, SIZE) \ do { \ P = mmap(NULL, SIZE, PROT_READ | PROT_...
1threat
Null pointer exception during ParseJSON : <p>When i am trying to parse the json, its throwing a null pointer exception. Also nothing is showing when i am trying to display the values.</p> <p>code:</p> <pre><code>public class ParseJSON { //public static String[] ids; public static String[] names; public st...
0debug
Upgrade Angular version (now: 2.4.3 or 4.0.0-beta.3) following the best practice? : <p>Now that <a href="http://angularjs.blogspot.com.eg/2016/12/ok-let-me-explain-its-going-to-be.html" rel="noreferrer">Angular is following a Semantic Versioning</a>, and <a href="http://angularjs.blogspot.com.eg/2016/12/angular-240-no...
0debug
Why install symfony version 4? : <p>I want to install version 4 symfony , but when I use the compose composer-project symfony / website-skeleton demo, it is version 5 downloaded by default ?</p>
0debug
static void pxa2xx_pcmcia_realize(DeviceState *dev, Error **errp) { PXA2xxPCMCIAState *s = PXA2XX_PCMCIA(dev); pcmcia_socket_register(&s->slot); }
1threat
java8: method reference from another method reference : <p>I want to use a method reference based off another method reference. It's kind of hard to explain, so I'll give you an example:</p> <p><strong>Person.java</strong></p> <pre><code>public class Person{ Person sibling; int age; public Person(int ag...
0debug
Trying to learn better lamba coding : While the following code works fine I was wondering if there a cleaner way to accomplish this with lambda expressions? var counter = 1; foreach (var item in model) { item.ID = counter++; }
0debug
Delay a jquery function without timer : <p>I have seen many stack or google answer, where to delay a function there is a suggestion for timer. But is there a way to delay a function with out using timer. Or other way is there a event where once a event for eg onclick or on blur is done check for the event end and call ...
0debug
def closest_num(N): return (N - 1)
0debug