problem
stringlengths
26
131k
labels
class label
2 classes
UICollectionView with autosizing cells incorrectly positions supplementary view : <p>I am using a UICollectionView with a Flow Layout and trying to get the collectionView to size the cells appropriately according to AutoLayout constraints.</p> <p>While the cells work as intended, I am running in to issues with the lay...
0debug
static void property_get_tm(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { TMProperty *prop = opaque; Error *err = NULL; struct tm value; prop->get(obj, &value, &err); if (err) { goto out; } visit_start_struct(v, nam...
1threat
$_SERVER['HTTP_REFERER'] and RewriteCond %{HTTP_REFERER} : Some problem. .htaccess: RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !^example\.com RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] RewriteRule ^page([0-9]+).html$ index.php?page=$1 RewriteRule...
0debug
static void qemu_chr_fe_write_log(CharDriverState *s, const uint8_t *buf, size_t len) { size_t done = 0; ssize_t ret; if (s->logfd < 0) { return; } while (done < len) { do { ret = write(s->logfd, buf + done, len - done); ...
1threat
How to perfect forward a member variable : <p>Consider the following code:</p> <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T&gt; void foo(T&amp;&amp; some_struct) { bar(std::forward&lt;/* what to put here? */&gt;(some_struct.member)); } </code></pre> <p>In the case of forwarding the whol...
0debug
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
int bdrv_truncate(BlockDriverState *bs, int64_t offset) { BlockDriver *drv = bs->drv; int ret; if (!drv) return -ENOMEDIUM; if (!drv->bdrv_truncate) return -ENOTSUP; if (bs->read_only) return -EACCES; ret = drv->bdrv_truncate(bs, offset); if (ret == 0) { ...
1threat
static void vtd_init(IntelIOMMUState *s) { memset(s->csr, 0, DMAR_REG_SIZE); memset(s->wmask, 0, DMAR_REG_SIZE); memset(s->w1cmask, 0, DMAR_REG_SIZE); memset(s->womask, 0, DMAR_REG_SIZE); s->iommu_ops.translate = vtd_iommu_translate; s->root = 0; s->root_extended = false; s->d...
1threat
Group Numbers based on Level in sql server database : Hi I have requirement in sql server database where i have to group the data as mentioned below. If the Level is more than 2 then it has to be grouped under level 2 (ex: 1.1.1,1.1.2 are rolled up under 1.1.) and if there isn't any level 2 available then have to creat...
0debug
How do you train a neural network without an exact answer? : <p>Most neural networks use backpropagation to learn, but from how I've understood it you need an exact answer to what the outputs should be for this to work. What I want to do is to learn a walker bot to walk, and have a score or fitness variable to evaluate...
0debug
static UserDefTwo *nested_struct_create(void) { UserDefTwo *udnp = g_malloc0(sizeof(*udnp)); udnp->string0 = strdup("test_string0"); udnp->dict1 = g_malloc0(sizeof(*udnp->dict1)); udnp->dict1->string1 = strdup("test_string1"); udnp->dict1->dict2 = g_malloc0(sizeof(*udnp->dict1->dict2)); u...
1threat
Different Screen Size : <p>Hey guys i just wanna ask When ever we display a background picture in our activity we placed the picture in the drawable folder with sub different folder like </p> <pre><code>drawable layout_hdpi or layout_mdpi or layout_ldpi or layout_xhdpi </code></pre> <p>and there is a specific density...
0debug
Date Convertion : Im getting this type of data in DateandTime Column in SQl. 1803301611.1803301611 and i have to convert this data in a date format. Anyone please help me out in this. The DateandTime Column date type is Varchar(5)
0debug
How do i save the values from a huffman codification : im doing a huffman compression in c++ using opencv, i already have the codes for the tones of grey, but im confused about what to do with it, is there a way to replace the values in the image? do I have to create other mat? ps. My huffman codes are strings, do i n...
0debug
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size) { if (min_size < *size) return ptr; min_size = FFMAX(min_size + min_size / 16 + 32, min_size); ptr = av_realloc(ptr, min_size); if (!ptr) min_size = 0; *size = min_size; return ptr; ...
1threat
How floating-point convert to integer with truncate? : <pre><code>int a = atof("4.60") * 100; int b = atof("6.60") * 100; printf("a:%d",a); //&lt;==== here print a:459 printf("b:%d",b); //&lt;==== here print b:660 </code></pre> <p>In IEEE 754, 4.60 is 4.599999999... and 6.60 is 6.5999999... I expect print b will show ...
0debug
Scroll div next to other divs : <p>I'm having a lay-out like this:</p> <p><a href="https://i.stack.imgur.com/Ix1v7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ix1v7.png" alt="enter image description here"></a></p> <p>The left column should scroll down (till the next category) when scroling to bottom. </...
0debug
Insert line in a specfic line in a file : <p>I have a very simple question but I don't find the answer ...</p> <p>I have a file (data.txt) it contains </p> <pre><code>A B C D E F </code></pre> <p>I just want to make function to insert line where I want in this file.</p> <p>Like : Insert('Bouh', 3)</p> <p>Render :<...
0debug
int ff_avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) { int ret; if ((ret = query_formats(graph, log_ctx)) < 0) return ret; pick_formats(graph); return 0; }
1threat
Simple VBA IF statement problem. Only Else is printed : I am in the first steps of learning VBA and I am facing a problem that seems to be huge. I have a simple if statement that only the else value is printed. Please can anyone help me to understand my mistake? The code is the following: Sub checkifstatemen...
0debug
matlab data file to pandas DataFrame : <p>Is there a standard way to convert <em>matlab</em> <code>.mat</code> (matlab formated data) files to Panda <code>DataFrame</code>? </p> <p>I am aware that a workaround is possible by using <code>scipy.io</code> but I am wondering whether there is a straightforward way to do it...
0debug
Memory Leak in class destructor : I am constructing a Polynomial class in C++. Currently I am reading in input and creating a Polynomial object with a degree and coefficient (double) array. Ex. 6x^3+7.4x^2-3.0x+9 Polynomial ---------- degree = 3 coefficients[0] = 6 coefficient...
0debug
static int rtsp_parse_request(HTTPContext *c) { const char *p, *p1, *p2; char cmd[32]; char url[1024]; char protocol[32]; char line[1024]; int len; RTSPMessageHeader header1 = { 0 }, *header = &header1; c->buffer_ptr[0] = '\0'; p = c->buffer; get_word(cmd, sizeof(c...
1threat
void tcg_dump_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) { TCGContext *s = &tcg_ctx; int64_t tot; tot = s->interm_time + s->code_time; cpu_fprintf(f, "JIT cycles %" PRId64 " (%0.3f s at 2.4 GHz)\n", tot, tot / 2.4e9); cpu_fp...
1threat
Create XML Schema in VB : I have VB Script. In the Function Private Function generateXMLSchema(ZRouteName) As String Dim generatedXmlSchema As String ="<Name>tEST 250504</Name>" Here Name Element is Static. I want to `ZRouteName` instead of Static Data. "<Name>"ZRouteName"</Name>" ...
0debug
C#: How can I add a list of values into a msql WHERE IN clause : I have a list of values and want to use it in a query but how can I add each value with quotes into mysql where clause. List <string> customerlist = new List<string>(); sql = SELECT * FROM customerlist WHERE custid IN customerlist I am ge...
0debug
static inline int coef_test_compression(int coef) { int tmp = coef >> 2; int res = ff_ctz(tmp); if (res > 1) return 1; else if (res == 1) return 0; else if (ff_ctz(tmp >> 1) > 0) return 0; else return 1; }
1threat
Ganarate Random Ruby values : I want to generate random name using Ruby code. I tested this Ruby code: def random_card_holder Faker::Name.first_name + " " + Faker::Name.last_name end But I get validation error. Is this code valid?
0debug
static void unassign_storage(SCLPDevice *sclp, SCCB *sccb) { MemoryRegion *mr = NULL; AssignStorage *assign_info = (AssignStorage *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); ram_addr_t unassign_addr = (assign_info->rn - 1) * mhd->rzm; MemoryRegion *sys...
1threat
Get id for use as variable data in ajax call JQUERY : I cannot get the id from links calling the same ajax function. The 30+ links are generated dynamically, as follows:- <a href="javascript:void(0)" id="105">Item 105</a> <a href="javascript:void(0)" id="379">Item 379</a> <a href="javascript:void(0)...
0debug
How to Group by json array by two same key : <p>How to group by based on two json key which is f and b My json array </p> <pre><code>var json=[ { s:'s', f:1, b:1, q:2 }, { s:'s', f:1, b:1, q:3 }, { s:'s', f:2, b:1, q:2 }, { s:'s', f:2, b:1, q:2 }, { s:'s', f:1, b:2, ...
0debug
this is my mysql query and how to write in codeigniter : SELECT MAX(A.BID),B.* FROM tbl_bid A INNER JOIN wl_customers B ON A.customers_id=B.customers_id WHERE portfolio_id='16'
0debug
void do_smbios_option(const char *optarg) { #ifdef TARGET_I386 if (smbios_entry_add(optarg) < 0) { fprintf(stderr, "Wrong smbios provided\n"); exit(1); } #endif }
1threat
static coroutine_fn void do_co_req(void *opaque) { int ret; Coroutine *co; SheepdogReqCo *srco = opaque; int sockfd = srco->sockfd; SheepdogReq *hdr = srco->hdr; void *data = srco->data; unsigned int *wlen = srco->wlen; unsigned int *rlen = srco->rlen; co = qemu_coroutine...
1threat
Difference between Spark RDD's take(1) and first() : <p>I used to think that <code>rdd.take(1)</code> and <code>rdd.first()</code> are exactly the same. However I began to wonder if this is really true after my colleague pointed me to <a href="http://spark.apache.org/docs/latest/api/python/pyspark.html#pyspark.RDD" rel...
0debug
Dinamic array don't allocate the same numbers of elements than stack array : <p>I'm trying to create an array of 18 elements of BYTE whit calloc but don't know why calloc only give me back only 8 elements, I did it manually in the stack and the program works.</p> <pre><code>int arrsize; BYTE copyrow[18]; arrsize = siz...
0debug
What is going wrong with my code? It outputs not even no matter what i do : print "input a number please. " TestNumber = gets if TestNumber % 2 == 0 print "The number is even" else print "The number is not even" end
0debug
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
how to create int to string like this 50-> "00050" : <p>Hello i am trying to process character arrays. I want to assign the number 50 as string value "00050". How can I do it ?</p> <pre><code>enter code here string strRpc(int NumstrRpcSendLen) { int digit = Convert.ToInt32( Math.Floor(Math.Log10(NumstrRp...
0debug
void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette) { unsigned i; for(i=0; i<num_pixels; i++) ((uint16_t *)dst)[i] = bswap_16(((uint16_t *)palette)[ src[i] ]); }
1threat
static void test_port(int port) { struct qhc uhci; g_assert(port > 0); qusb_pci_init_one(qs->pcibus, &uhci, QPCI_DEVFN(0x1d, 0), 4); uhci_port_test(&uhci, port - 1, UHCI_PORT_CCS); }
1threat
static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip) { CPUState *cs = CPU(cpu); CPUX86State *env = &cpu->env; VAPICHandlers *handlers; uint8_t opcode[2]; uint32_t imm32 = 0; target_ulong current_pc = 0; target_ulong current_cs_base = 0; uint32_t current_...
1threat
what is string.setStr1/2/3(calledString) do ?? and what will return string; return? : <pre><code>TripleString pull() { string calledString; TripleString string; calledString = randString(); string.setStr1(calledString); calledString = randString(); string.setStr2(calledString); calledString = randS...
0debug
why does std::allocator::deallocate require a size? : <p><code>std::allocator</code> is an abstraction over the underlying memory model, which wraps the functionality of calling <code>new</code> and <code>delete</code>. <code>delete</code> doesn't need a size though, but <a href="http://en.cppreference.com/w/cpp/memor...
0debug
Simple way to visualize a TensorFlow graph in Jupyter? : <p>The official way to visualize a TensorFlow graph is with TensorBoard, but sometimes I just want a quick look at the graph when I'm working in Jupyter.</p> <p>Is there a quick solution, ideally based on TensorFlow tools, or standard SciPy packages (like matplo...
0debug
rdt_free_extradata (PayloadContext *rdt) { ff_rm_free_rmstream(rdt->rmst[0]); if (rdt->rmctx) av_close_input_stream(rdt->rmctx); av_freep(&rdt->mlti_data); av_free(rdt); }
1threat
static void sh_serial_ioport_write(void *opaque, uint32_t offs, uint32_t val) { sh_serial_state *s = opaque; unsigned char ch; #ifdef DEBUG_SERIAL printf("sh_serial: write offs=0x%02x val=0x%02x\n", offs, val); #endif switch(offs) { case 0x00: s->smr = val & ((s->feat & SH_S...
1threat
remove .php permanently from url : <p>I want to remove .php extension from my url, so I edited <code>.htaccess</code> to add this code</p> <pre><code>RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] </code></pre> <p>And the code works fine but only when I intentionally remove ...
0debug
Code build continues after build fails : <p>I'm building a CI/CD pipeline using git, codebuild and elastic beanstalk. </p> <p>During codebuild execution when build fails due to syntax error of a test case, I see codebuild progress to next stage and ultimatly go on to produce the artifacts. </p> <p>My understanding wa...
0debug
static void v9fs_xattrwalk(void *opaque) { int64_t size; V9fsString name; ssize_t err = 0; size_t offset = 7; int32_t fid, newfid; V9fsFidState *file_fidp; V9fsFidState *xattr_fidp = NULL; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; pdu_unmarshal(pdu, offset, "dds"...
1threat
Chart.js 2.0 doughnut tooltip percentages : <p>I have worked with chart.js 1.0 and had my doughnut chart tooltips displaying percentages based on data divided by dataset, but I'm unable to replicate this with chart 2.0.</p> <p>I have searched high and low and have not found a working solution. I know that it will go u...
0debug
What are the iPhone 11 / 11 Pro / 11 Pro Max media queries : <p>What are the correct CSS media queries used to target Apple's 2019 devices?</p> <p>The iPhone 11, iPhone 11 Pro and iPhone 11 Pro Max.</p>
0debug
def ncr_modp(n, r, p): C = [0 for i in range(r+1)] C[0] = 1 for i in range(1, n+1): for j in range(min(i, r), 0, -1): C[j] = (C[j] + C[j-1]) % p return C[r]
0debug
static int ffm_probe(AVProbeData *p) { if (p->buf_size >= 4 && p->buf[0] == 'F' && p->buf[1] == 'F' && p->buf[2] == 'M' && p->buf[3] == '1') return AVPROBE_SCORE_MAX + 1; return 0; }
1threat
Saving data (numbers), swift app? : I'm learning application development working on a quizz game, I'd like to add statistics to the game. For example, the average score since the app has been downloaded. How can I store the scores on the device in order to reuse them after the app has been closed ?
0debug
I like to know how to split a string on the basis of delimeters : I have a csv file which comprises of 5 columns of which i need only two columns which are seperated by pipe(|) delimeter.Here are few of them--- SERIAL_NO|N|1385,45,871,104|1|? CUST_ID|N|1704,211,552,71|1|? PROD_TYPE|A|367,286,1167,74|1|? BRA...
0debug
SELECT statement with if ELSE MSSQL : I have a table looks like this: > `ref doc` > `ref001 3` > `ref001 3` > `ref002 1` > `ref002 4` > `ref002 1` I want to use SELECT with IF ELSE STATEMENT similarly to this idea: `SELECT MAX(ref), if(ref=ref then MAX(doc)) else S...
0debug
int kvmppc_get_htab_fd(bool write) { struct kvm_get_htab_fd s = { .flags = write ? KVM_GET_HTAB_WRITE : 0, .start_index = 0, }; if (!cap_htab_fd) { fprintf(stderr, "KVM version doesn't support saving the hash table\n"); return -1; } return kvm_vm_ioctl(k...
1threat
Publishing a release build with debuggable true : I would like to publish a a library with debuggable true on release build types. This would help me debug that library. What are the potential problems if this library goes into production? Is it secure ? What difference does it make when released with debuggable as fal...
0debug
-bash: syntax error near unexpected token `('. help please : I am programming using IDL and unfortunately I decided to name a file using "(" and now I want to remove this file using "rm" but every time I try I get this same error message. It seems that I cannot copy or delete or doing anything with the file. Any help ...
0debug
MemoryRegionSection memory_region_find(MemoryRegion *mr, hwaddr addr, uint64_t size) { MemoryRegionSection ret = { .mr = NULL }; MemoryRegion *root; AddressSpace *as; AddrRange range; FlatView *view; FlatRange *fr; addr += mr->addr; for ...
1threat
static int aiocb_needs_copy(struct qemu_paiocb *aiocb) { if (aiocb->aio_flags & QEMU_AIO_SECTOR_ALIGNED) { int i; for (i = 0; i < aiocb->aio_niov; i++) if ((uintptr_t) aiocb->aio_iov[i].iov_base % 512) return 1; } return 0; }
1threat
Extract a given ancestor path form a deeper path in MS-DOS : I have no idea how to get what described here using an MS-DOS batch script: __pseudo-code__ ``` set aPath=C:\just\a\long\path\to\a\file\in\the\file\system set aDir=file ... some logic here echo %result% ``` Should print ``` C:\just\a\long\path\...
0debug
static uint64_t integratorcm_read(void *opaque, target_phys_addr_t offset, unsigned size) { integratorcm_state *s = (integratorcm_state *)opaque; if (offset >= 0x100 && offset < 0x200) { if (offset >= 0x180) return 0; return integrat...
1threat
i am makeing a traffic light with python turtle and at the end of the sequance i want all the lights to blink yellow : this is my code all i want is for three turtles to move/blink at the same time like a broken traffic light. i cant figure out how to do it. if you want to see all of my code let me now by an answer...
0debug
Is there anyway to develop a gui using HTML,CSS,JavaScript and use java for the backend? : <p>I'm building a point of sale system of my senior capstone and I really don't have much knowledge on building GUIs in java but I have made many UIs using HTML, CSS, and javascript. Just wondering if there is a way to combine th...
0debug
static int bdrv_open_common(BlockDriverState *bs, const char *filename, int flags, BlockDriver *drv) { int ret, open_flags; assert(drv != NULL); bs->file = NULL; bs->total_sectors = 0; bs->is_temporary = 0; bs->encrypted = 0; bs->valid_key = 0; bs->open_flags = flags; ...
1threat
weird typecasting ((ClassPathXmlApplicationContext) context).close(); : <p>I am learning java and spring on the way, I have the following code for which I do not understand how typecasting works:</p> <pre><code>public class App { public static void main(String[] args) { ApplicationContext context = new C...
0debug
how do i get the bottom offset of a scroll div from windowheight : Please see img the height i want from the reb box div bottom offset from window [See image for refrence][1] <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> //want offset bottom of box after som...
0debug
Vue Axios CORS policy: No 'Access-Control-Allow-Origin' : <p>I build an app use vue and codeigniter, but I have a problem when I try to get api, I got this error on console</p> <pre><code>Access to XMLHttpRequest at 'http://localhost:8888/project/login' from origin 'http://localhost:8080' has been blocked by CORS pol...
0debug
static void xhci_er_reset(XHCIState *xhci, int v) { XHCIInterrupter *intr = &xhci->intr[v]; XHCIEvRingSeg seg; if (intr->erstsz == 0) { intr->er_start = 0; intr->er_size = 0; return; } if (intr->erstsz != 1) { DPRINTF("xhci: invalid value f...
1threat
Ansible Cloudwatch rule reports failed invocations : <p>I have created an AWS lambda that works well when I test it and when I create a cron job manually through a cloudwatch rule.</p> <p>It reports metrics as invocations (not failed) and also logs with details about the execution.</p> <p>Then I decided to remove tha...
0debug
How to set the right path to image in java : I am trying to load and draw it with paint method in java whatever the way I write the path it always shows an exception java.lang.IllegalArgumentException: input == null! at javax.imageio.ImageIO.read(Unknown Source) I have the image at the same folder with the class ...
0debug
From a list, how to Print from certain string to certain string : <p>I want to print the Strings in a list.</p> <p>For example, if my list contains like below, I would like to print the strings between Deer to Crazy, but not Deer and crazy.</p> <p>['black', 'white', 'Deer', 'Blue', 'More', 'Crazy']</p>
0debug
How to add Pie Chart in my Android project : I want to add a Pie Chart in my Android project. If I have 95 car, 60 bus, 106 bicycle and so on. Please let me know if anyone have any suggestions...
0debug
static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base) { USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev); USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base); int rc; pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc); dev->info = info; dev->auto_a...
1threat
Parallel operations with Promise.all? : <p>I'm led to believe that Promise.all executes all the functions you pass it in parallel and doesn't care what order the returned promises finish.</p> <p>But when I write this test code:</p> <pre><code>function Promise1(){ return new Promise(function(resolve, reject){ ...
0debug
static int block_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque) { int ret; DPRINTF("Enter save live stage %d submitted %d transferred %d\n", stage, block_mig_state.submitted, block_mig_state.transferred); if (stage < 0) { blk_mig_cleanup(mon); return 0; ...
1threat
Difference between SDK vs LIB? : <p>What is the difference between an SDK vs Library and any examples of custom implementation in Java ?</p> <p>BR /norbix</p>
0debug
POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc); dc->fw_name = "PowerPC,POWER7"; dc->desc = "POWER7"; pcc->pvr = CPU_POWERPC_POWER7_BASE; pcc->pvr_mask = CPU_POWERPC_POWER7_MASK; pcc->init_proc ...
1threat
Applying MethodImplOptions.AggressiveInlining to F# functions : <p>The attribute <code>System.Runtime.CompilerServices.MethodImplAttribute</code> can be used to give hints to the JIT compiler about how to handle the decorated method. In particular, the option <code>MethodImplOptions.AggressiveInlining</code> instructs ...
0debug
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
Code Elegance: Java Strings : <p>A program that takes the first two characters of a string and adds them to the front and back of the string. Which version is better?</p> <pre><code>public String front22(String str) { if(str.length()&gt;2) return str.substring(0,2)+str+str.substring(0,2); return str+str+str; } </c...
0debug
How to add 10 number in listbox with a little code? : I code this it's fine but can I code a little ? If D = 10 Then ListBox3.Items.Add(1) ListBox3.Items.Add(2) ListBox3.Items.Add(3) ListBox3.Items.Add(4) ListBox3.Items.Add(5) List...
0debug
void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem, unsigned int len, unsigned int idx) { VRingUsedElem uelem; trace_virtqueue_fill(vq, elem, len, idx); virtqueue_unmap_sg(vq, elem, len); idx = (idx + vq->used_idx) % vq->vring.num; uelem.id = elem->index; uelem.l...
1threat
static void phys_sections_clear(PhysPageMap *map) { while (map->sections_nb > 0) { MemoryRegionSection *section = &map->sections[--map->sections_nb]; phys_section_destroy(section->mr); } g_free(map->sections); g_free(map->nodes); }
1threat
Displaying current username in _Layout view : <p>I am wanting to display the current ApplicationUsers Firstname+Lastname on my navigation bar on my _Layout view. I've found that you can pass your viewbag from the current RenderedBody controller like so:</p> <pre><code> private readonly IHttpContextAccessor _httpConte...
0debug
[PHP][JavaScript] Formating : I would like to set the display to none. I want to change the value of the display when the man click to the submit button. After that the form's display changes to none. But this code is not working. <!DOCTYPE html> <?php include_once 'header.php' ?> <html> ...
0debug
Angular 4 - using objects for option values in a select list : <p>I know that similar questions have been asked, but I've found none with a good answer. I want to create a select list in an Angular form, where the value for each option is an object. Also, I do NOT want to use 2 way data binding. e.g. if my Component ha...
0debug
Understanding a little syntaxis : load data infile 'D:\\diiet\\subir\\a.txt' Into table reporte_dts_empresa_2015_sut CHARACTER SET latin1 fields terminated by '\t' why I have to do this step? LINES TERMINATED BY '\r\n' IGNORE 1 LINES; I am new on sql, i am trying to create a table whith excel data i already...
0debug
static target_ulong h_read(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { CPUPPCState *env = &cpu->env; target_ulong flags = args[0]; target_ulong pte_index = args[1]; uint8_t *hpte; int i, ridx, n_entries = 1; if ((pte_i...
1threat
Should I block certain charecters from my EditTexts for security reasons? : I've been programming for about 6 months now, but also did a bit if code about 10 years ago. I remember back then I had to block some characters from text fields for security purposes, so people won't type in some code that would cause harm. ...
0debug
Why i can't get my array from another class : I have an activity, in which i have to use function from another class DataBase . In DataBase code have to get information from my FireBase database, and then return ArrayList<String> as a result. But when i use function `takeDataFromFirebase` my array in null, it's size is...
0debug
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) { int packet_size, ret, width, height; AVStream *st = s->streams[0]; width = st->codec->width; height = st->codec->height; packet_size = avpicture_get_size(st->codec->pix_fmt, width, height); if (packet_size < 0) ...
1threat
No handlers could be found for logger : <p>I am newbie to python. I was trying logging in python and I came across <strong>No handlers could be found for logger</strong> error while trying to print some warning through logger instance. Below is the code I tried</p> <pre><code>import logging logger=logging.getLogger('l...
0debug
static int svq3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) { SVQ3Context *svq3 = avctx->priv_data; H264Context *h = &svq3->h; MpegEncContext *s = &h->s; int buf_size = avpkt->size; int m, mb_type,...
1threat
I dont understand a c# line of code and cant find the answer online : Helo, I´m starting to learn C# and .net in my university and I'm having a hard time figuring out how some example code works. My problem is with the following sintax. The class componentes is a sublcass of Form1. public class componente ...
0debug
HTML / CSS table looks different in Internet Explorer and Chrome : I'm trying to create a heatmap using html, css, javascript. I got everything working perfect... in Chrome. In Internet Explorer, the table cells are 3-4 times taller, so the table looks weird. The picture below shows how it looks in Chrome. [![enter ...
0debug
how to sort card in symfony : <p>i am beginner in <code>symfony</code> and I want to sort (with <code>SYMFONY</code> 3) a hand of 10 <code>cards</code> (given randomly to the user) according to this order : Category order : DIAMOND – HEART – SPADES – CLUB. Value order : AS – 2 – 3 – 4 – 5 – 6 – 7 – 8 – 9 – 10 – JACK – ...
0debug
use NLP to identify similar phrase/words : <p>In our raw data, we know there're dirty data. For example, City name may be "Kunming", "Kun-Ming" or "kunming(city)", they all refer to a city named "Kun Ming". If we have a standard dictionary of city names, how can we clean our data using NLP. I'm thinking about building ...
0debug