problem
stringlengths
26
131k
labels
class label
2 classes
How do I split a string at only some commas, not all? : <p>I'm pretty inexperienced at programming, and I've been doing a lot of practice problems recently. I'm currently attempting to find the sum of the x and y values of the two closest points in <a href="https://d18l82el6cdm1i.cloudfront.net/uploads/documents/points...
0debug
how can I add value to my fields in database : I want to change field values in database but there are not any option to do that as you see in the picture below(I'm using mamp in Mac os Catalina),there aren't any option,[this is picture of my problem][1] I want to know how can I add the options, I will upload anothe...
0debug
pandas:how to change all column names with erasing specific letters : <p>I am using Anaconda to read table from hive and all my column names have been automaticly added a prefix like test.age,test.sex,test.degree... How to use pandas to erase all the prefix 'test.'?</p>
0debug
Deploy web app in docker data container vs volume : <p>I'm confused about common consensus that one shouldn't use data containers. I have specific use case that I want to accomplish.</p> <p>I want to have docker nginx container and behind it some other container with application. To run newest version of my app I want...
0debug
void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) { void (*start_frame)(AVFilterLink *, AVFilterBufferRef *); AVFilterPad *dst = link->dstpad; FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_ref(NULL, picref, 1); if (!(s...
1threat
Create a JSON object from HTML using jQuery and javascript : I would like to create JSON from HTML code using jQuery. I have number of divs with class row, each div contains divs with class header and body. Now, i would like to read the value of inputs from header and body and create a json object like below. ...
0debug
SQL I have to dipaly the digist 123.34 as 123.3400000000000 ie., 13 digit after the decimal point without loosing any values : Running query from Java code no chance to change the global preferences. I have to print 123.34 as 123.3400000000000 ie., 13 digit after the decimal point without loosing any values CAST(SUM...
0debug
How can i delete my .db file from WPF application? : I have a slight problem that I'm trying to solve. I am using SQLite database and i created my database *Schedule.db* automatically when application starts for the first time(if .db does not already exists). On a button_click i want to delete it so i can create ne...
0debug
Return ++a is different than return a++, why? : <p>I was experimenting with some code when I discovered something odd. I had the following code:</p> <pre><code>#include &lt;iostream&gt; int add_one_return(int a) { return a++; } void add_one_ref(int &amp;a) { a++; } int main(int argc, char const *argv[]) { ...
0debug
Which Java Version required for Junit 4.1 : <p>Working with Cucumber FrameWork, Need to know Which Java Version required for Junit 4.1 version</p>
0debug
See contents of long value in local storage in Safari : <p>I'm trying to see the entire contents of a single value held in local storage in Safari (it's a long JSON object). When I view the key/value pair, the value is too long for the screen, and copying the row only copies the visible portion of the value. Is there a...
0debug
static void bmdma_map(PCIDevice *pci_dev, int region_num, pcibus_t addr, pcibus_t size, int type) { PCIIDEState *d = DO_UPCAST(PCIIDEState, dev, pci_dev); int i; for(i = 0;i < 2; i++) { BMDMAState *bm = &d->bmdma[i]; d->bus[i].bmdma = bm; bm->bus = d->bu...
1threat
Input user defined variables in select statement : <p>I want to store user defined variables in sql select statement and use that variable in sub query like the following:</p> <pre><code>select user_id, @user_gender:=user_gender where user_id in (select user_id from post where post_gender=@user_gender); </code></pre>...
0debug
static void dma_aio_cancel(BlockDriverAIOCB *acb) { DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common); if (dbs->acb) { bdrv_aio_cancel(dbs->acb); } }
1threat
static void sigp_set_prefix(CPUState *cs, run_on_cpu_data arg) { S390CPU *cpu = S390_CPU(cs); SigpInfo *si = arg.host_ptr; uint32_t addr = si->param & 0x7fffe000u; cpu_synchronize_state(cs); if (!address_space_access_valid(&address_space_memory, addr, s...
1threat
AVChapter *ff_new_chapter(AVFormatContext *s, int id, AVRational time_base, int64_t start, int64_t end, const char *title) { AVChapter *chapter = NULL; int i; for(i=0; i<s->nb_chapters; i++) if(s->chapters[i]->id == id) chapter = s->chapters[i]; if(!chapter){ chap...
1threat
How do I configure goland to recognize 'mod' packages? : <p>I am taking go1.11rc1 for a spin and the first thing I noticed is that goland does not recognize imports. </p> <p>The <a href="https://blog.jetbrains.com/go/2018/07/25/goland-2018-2/" rel="noreferrer">goland version announcement</a> says: "support for Go modu...
0debug
Unable to click on href element <a href="" ng-click="selectPage(totalPages)" class="ng-binding">Last</a> using VBA : I have the following code on VBA: driver.FindElementByXPath(".//span[text()='Next']").Click which says element not found. to click on link [source page][1] Any help? [1]: https://i.stack.img...
0debug
neo4j: Cypher: grouping/relationships : am new to Cypher/graph DBs. I created a example to understand traversals but not quite getting it. //Cypher below to create nodes. (`0` :Person {id:'74474',Name:"Mr. Dan"}) , (`1` :Company {id:'1234',Name:"Company A"}) , (`2` :Company {id:'1111',Name:"Company B"}) , (`...
0debug
static int nbd_receive_request(int csock, struct nbd_request *request) { uint8_t buf[4 + 4 + 8 + 8 + 4]; uint32_t magic; if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { LOG("read failed"); errno = EINVAL; return -1; } magic = be32_to_...
1threat
Button Styling on WPF : <p>I'm designing a dashboard on wpf and I have to make buttons like this.</p> <p><a href="https://imgur.com/jEcSPiA" rel="nofollow noreferrer">https://imgur.com/jEcSPiA</a></p> <p>This is a button; there is an image in the middle, a content in the top right corner and a content in the bottom.<...
0debug
if clause teminates the workflow in JavaScript? : <p>When I look at the following code, I think "CheckChoice(IntSelect)" will always execute no matter "if (isNaN(IntSelect))" will execute or not.</p> <p>If I input a NaN and the CheckChoice function worked, the alert("The value supplied is out of range!"); should also ...
0debug
Refresh fragment when change between tabs : <p>App open on first fragment and there is 2 tabs i want to refresh second fragment when i move to it but i don't want to refresh first fragment </p> <h2>MainActivity</h2> <pre><code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState...
0debug
JavaScript access to Json : <p>Hi i want to access to value of <code>id</code> in this Json :</p> <pre><code>{ "arguments": { "torrent-added": { "hashString":"2c8cacb3183f5209804449bbd5573ffaab7a7072", "id":59, "name":"slackware64-13.1-iso" ...
0debug
what is the use of Zone.js in Angular 2 : <p>Currently am learning <strong>Angular</strong> <strong>2.0</strong> and i come accross the file <strong>Zone.js</strong>, and i would like to know what is the purpose of the file Zone.js and how will it make my application better.</p>
0debug
static void mirror_exit(BlockJob *job, void *opaque) { MirrorBlockJob *s = container_of(job, MirrorBlockJob, common); MirrorExitData *data = opaque; AioContext *replace_aio_context = NULL; BlockDriverState *src = blk_bs(s->common.blk); BlockDriverState *target_bs = blk_bs(s->target); ...
1threat
static int coroutine_fn nfs_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *iov) { NFSClient *client = bs->opaque; NFSRPC task; nfs_co_init_task(client, &task); task.iov = iov; if (...
1threat
Why Scala creators decided to re-implement Java collections? : <p>What are the main differences between Java collections and Scala collections? Why the Scala creators decided to create a whole new set of classes instead of building on top of the existing ones?</p>
0debug
Elbow method findig number of clusters for 90 different kmeans(weka) : I am doing incremental learning and i have to do clustering for every iteration. And i am doing 90 different clustering with simple kmeans on weka in java. How can find number of clusters for every clustering process? I can find wss easily so i thou...
0debug
error: ‘cast’ does not name a type void setCastDescription(std::string desc) cast.description = desc; } : <pre><code>player.h:155:43: error: expected ‘;’ at end of member declaration void setCastDescription(std::string desc) cast.description = desc; } player.h:155:45: error: ‘cast’ does not name a type void setC...
0debug
Function to check if version string is newer (1.2.5 > 1.1.10 for example) : <p>I'm looking for a simple function that checks 2 version strings to each other. What I've done now is explode it on the . and check each number from right to left. But I feel like it could be a lot simpler.</p> <p>Hope to hear. Kind regards,...
0debug
Why doesn't my newly-created docker have a digest? : <p>I have been following the <a href="https://docs.docker.com/engine/tutorials/dockerimages/#/image-digests" rel="noreferrer">Docker tutorial here</a>, and built a test image on my local OSX machine by committing changes to an existing image and tagging it with three...
0debug
Is it possible to use an IF statement in PHP along with differnet sql queries? : Basically I want to update a value in the table if the date field is equal to todays date, otherwise I'd like to insert a new row into the table if the date is not equal to today. Say for example something like (I know syntax is wrong here...
0debug
Haskell: Can this code be optimized? : <p>I have the following code. I want to know whether there is any way it can be optimized so that it runs faster.</p> <p>I wanted to solve it using a <code>SegmentTree</code> but I am not well versed with Haskell, which is why I took the following list (non-tree) approach.</p> <...
0debug
Does Collections.unmodifiableList(list) require a lock? : <p>I have a <code>productList</code> maintained in a file named <code>Products.java</code></p> <pre><code>private List&lt;String&gt; productList = Collections.synchronizedList(new ArrayList()); </code></pre> <p>Now creating a synchronized list, will ensure tha...
0debug
static void fw_cfg_initfn(Object *obj) { SysBusDevice *sbd = SYS_BUS_DEVICE(obj); FWCfgState *s = FW_CFG(obj); memory_region_init_io(&s->ctl_iomem, OBJECT(s), &fw_cfg_ctl_mem_ops, s, "fwcfg.ctl", FW_CFG_SIZE); sysbus_init_mmio(sbd, &s->ctl_iomem); memory_region_ini...
1threat
static void gen_advance_ccount(DisasContext *dc) { if (dc->ccount_delta > 0) { TCGv_i32 tmp = tcg_const_i32(dc->ccount_delta); dc->ccount_delta = 0; gen_helper_advance_ccount(cpu_env, tmp); tcg_temp_free(tmp); } }
1threat
static void do_test_validate_qmp_introspect(TestInputVisitorData *data, const char *schema_json) { SchemaInfoList *schema = NULL; Visitor *v; v = validate_test_init_raw(data, schema_json); visit_type_SchemaInfoList(v, NULL, &schema, &error_abort); ...
1threat
i can't solve my Error i'm doing CHECKBOX in recyclerview : ''' package com.example.project.Holder; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.wid...
0debug
.NET Core API Conditional Authentication attributes for Development & Production : <p>Long story short, Is it possible to place an environment based authorization attribute on my API so that the authorization restriction would be turned off in development and turned back on in Production? </p> <p>I have a separate An...
0debug
static USBDevice *usb_host_device_open_addr(int bus_num, int addr, const char *prod_name) { int fd = -1, ret; USBDevice *d = NULL; USBHostDevice *dev; struct usbdevfs_connectinfo ci; char buf[1024]; printf("husb: open device %d.%d\n", bus_num, addr); if (!usb_host_device_path) { ...
1threat
Cannot find symbol java netbeans : <p>Can someone tell me why I'm getting the error Cannot find symbol when I'm creating an object? in <code>bank_account Christine = new bank_account();</code> </p> <pre><code>public class BankAccountTester { public static void main (String []args) { bank_account Christine = new bank_a...
0debug
restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax) { unsigned int err = 0; abi_ulong fpstate_addr; unsigned int tmpflags; cpu_x86_load_seg(env, R_GS, tswap16(sc->gs)); cpu_x86_load_seg(env, R_FS, tswap16(sc->fs)); cpu_x86_load_seg(env, R_ES, tswap16(sc->es)); ...
1threat
MacIONVRAMState *macio_nvram_init (target_phys_addr_t size, unsigned int it_shift) { MacIONVRAMState *s; s = g_malloc0(sizeof(MacIONVRAMState)); s->data = g_malloc0(size); s->size = size; s->it_shift = it_shift; memory_region_init_io(&s->mem, &macio...
1threat
I got error when i was installing django.Pls Help me? : >>> import django Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named django >>> [enter image description here][1] [1]: http://i.stack.imgur.com/OveNv.png
0debug
How do I use printf to print arraylist of different variables : I have an arraylist filled with different variables, how would I print this arraylist out using the **printf** flag in Java? public class mendietaRAL { public static void theArrayList() { ArrayList<Object> theList = new Array...
0debug
Converted website into android app | pop window is not opening in android app : I am not the coder. But I have converted my already well built website into android app. One problem is: Popup window doesnt open in app. It opens in desktop version and it also opens perfect in mobile browsers. In app, it simply stays on ...
0debug
Write palindrome in JavaScript : <p>How to write a JavaScript program that returns the largest number-palindrome, which is the product of two prime five-digit numbers and returns the multipliers themselves ?</p> <p>My head feel empty...</p>
0debug
static int pcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { PCMDecode *s = avctx->priv_data; int n; short *samples; uint8_t *src; samples = data; src = buf; switch(avctx->codec->id) { case CODEC_ID_PCM_S16LE: n = buf_...
1threat
How to detect dns server and ip-adresses in PHP : <p>I want to program a DNS-leaktester in PHP. Is it possible? or do I have to use other languages like python etc. to get the information.</p>
0debug
Unspecified number of parameters in a function : <p>I have an Array of Arrays and a method that expects N arguments of type Array.</p> <p>For example, if I have: <code>let arr = [[0, 1], [2, 3], [4, 5]];</code></p> <p><code>arr</code> has 3 arrays inside, so I could do this:</p> <pre><code>theFunction(arr[0]); theFu...
0debug
How to iterate through a binary number in c++? in my following function I'm getting invalid operands to binary conversion (bitset<8> and int) : This is the function in my code, which is getting the stated error int value(int x) { int temp=0,counter=0; bitset<8> i(x); while (i != 0) { ...
0debug
Beginner needs some guidence C : I'm trying to make a code where a user chooses a number(lets call it A) and then it checks whether if A divided by i * i leaves any remainder, if it doesn't it must display just i number, u get this i number from loops. i'm getting an error saying that the number cant be divided by zero...
0debug
Automatically open html links in new tab : <p>I have a html document with 100 html-links. When I open the document in a browser I want all the links in the document to open automatically in 100 different tabs in the same browser. Alternatively I want to do this some other way with the terminal in OS X or with cmd.exe i...
0debug
using integer variables in switch statements in java : <p>I recently encountered a situation that is somewhat similar to this.</p> <pre><code>Scanner sc = new Scanner(System.in); int a = sc.nextInt(), ... , g = sc.nextInt(), x = sc.nextInt(), y = sc.nextInt(), z; z = x * y; switch (z) { case a : //print somethi...
0debug
Using Boto3 to interact with amazon Aurora on RDS : <p>I have set up a database in Amazon RDS using Amazon Aurora and would like to interact with the database using Python - the obvious choice is to use Boto.</p> <p>However, their documentation is awful and does nopt cover ways in which I can interact with the databse...
0debug
my interpreter don't recognize December as the winter month (if/else) : <p>I'm fairly new to Python. I'm using PyCharm for practice. When I typed "December" in month's input and the interpreter recognize December as the autumn month. Why is this happening? (Look at the bottom if you don't understand what I mean)</p> <...
0debug
How to clear mat-datepicker in Angular 5 : <p>How can I clear an Angular Material Datepicker with an button click?</p> <p>I've tried .date .value .clear .reset .resetDate</p> <p>None of them seem to clear the Datepicker.</p> <p>HTML:</p> <pre><code> &lt;mat-form-field&gt; &lt;input matInput [matDatepicker]="f...
0debug
int usb_desc_msos(const USBDesc *desc, USBPacket *p, int index, uint8_t *dest, size_t len) { void *buf = g_malloc0(4096); int length = 0; switch (index) { case 0x0004: length = usb_desc_msos_compat(desc, buf); break; case 0x0005: length = usb_de...
1threat
How to create a P2P network without a server? : <p>First I'd like to share a little of WHY I want to create this which seems to be complex:</p> <p>I've seen that in my city there's a lot of trouble with "lost pets". Since I lost my best companion for 11 years (My dog) I want to contribute my small city by developing a...
0debug
How To Group and Sort Array element base Specific Character : <p>i have an array Like This :</p> <pre><code>array("10", "1001","12", "1201","1002", "1202","120101", "120201","13"); </code></pre> <p>i need Loop in Php to sort and group with Two Character of value to output Like This :</p> <pre> -10 --1001 ...
0debug
How to create a Dynamic Associative array in PHP, from $_POST values? : I am trying to create php array (associative) declaration for non-empty key-value pairs only, which I am getting from $_POST. Any guesses, how to do this ? $my_array = [ "k1"=>"$val1", "k2"=>"$val2", "k3"=>"$val3", ...
0debug
SQL INSERT with LEFT JOIN : $sql3="INSERT INTO users_addresses (ua_user_id,ua_address_id) LEFT JOIN users ON users_addresses.ua_user_id=users.user_id LEFT JOIN addresses ON users_addresses.ua_address_id=addresses.address_id" I want when the forms are completed to fill the users_addresses with the id of the user ...
0debug
static int ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band, IVITile *tile, int32_t mv_scale) { int x, y, need_mc, mbn, blk, num_blocks, mv_x, mv_y, mc_type; int offs, mb_offset, row_offset; IVIMbInfo *mb, *ref_mb; cons...
1threat
Error in sql devloper : create table Blog ( blog_id NUMBER(8,0), blog_name VARCHAR2(255) not null, status VARCHAR2(50) DEFAULT 'PENDING', create_date DATE default sysDate, description CLOB not null, no_of_likes NUMBER(5), no_of comments NUMBER(5), no_of_views NUMBER(5), user_id NUMBER(8,0), CONSTRAINT pk_b...
0debug
How can I extract the specific words from a string in Python? : I need a program to accept a string and extract specific words get an output like this in Python? Input string: My name is somename. I am from India and I'm an Engineer. Output should be: Name : Somename Locaion : India Profession : Engineer P...
0debug
static ExitStatus gen_mfpr(TCGv va, int regno) { int data = cpu_pr_data(regno); if (regno == 250 || regno == 249) { void (*helper)(TCGv) = gen_helper_get_walltime; if (regno == 249) { helper = gen_helper_get_vmtime; } if (use_icount) { gen_io_start(); helpe...
1threat
Problem with my SQLite (SQLiteOpenHelper) : I am creating a sqlite database with android studio. My application closes at the call of my method "Insertprofile () " in my main. My DatabaseManager : public class DatabaseManager extends SQLiteOpenHelper { private static final String DATABASE_NAME = "U...
0debug
Do we have to unsubscribe when using switchMap operator in rxjs in Angular 2? : <p>In Angular 2 there are some observables that you do not need to unsubscribe from. For example http requests and activatedRoute.params.</p> <p><a href="https://stackoverflow.com/questions/38008334/angular-rxjs-when-should-i-unsubscribe-f...
0debug
.next() not work for .toggle() : I using jquery function Toggle() to create a Pull down menu But I will add many sub menu in this project. I need th click the `a.sub_open` to toggle the `div.submenu` https://jsfiddle.net/mr6b4k53/ js code: $(document).ready(function(){ $( ".sub_open" ).click(...
0debug
e1000e_set_pbaclr(E1000ECore *core, int index, uint32_t val) { int i; core->mac[PBACLR] = val & E1000_PBACLR_VALID_MASK; if (msix_enabled(core->owner)) { return; } for (i = 0; i < E1000E_MSIX_VEC_NUM; i++) { if (core->mac[PBACLR] & BIT(i)) { msix_clr_pendin...
1threat
ActionCable Not Receiving Data : <p>I created the following using ActionCable but not able to receive any data that is being broadcasted.</p> <p><strong>Comments Channel</strong>:</p> <pre><code>class CommentsChannel &lt; ApplicationCable::Channel def subscribed comment = Comment.find(params[:id]) stream_fo...
0debug
Wordpress cronjob every 3 minutes : <p>there are many post on stackoverflow with this topic but (i dont know why) nothing will work for me.</p> <p>What i have</p> <pre><code>function isa_add_every_three_minutes( $schedules ) { $schedules['every_three_minutes'] = array( 'interval' =&gt; 180, ...
0debug
python basic: how to sort a list only by considering the number? : <p>I admit I dont know how to give this question a better title. :-( Anybody has a better idea for the title? </p> <p>Here is my problem: </p> <p>I want to sort this list:</p> <pre><code>a = ['at10', 'at11', 'at12', 'at13', 'at9', 'at1', 'at8'] </cod...
0debug
I was wondering if This is the Best Way to Use #define : Hello everyone (my first post on this website), I am teaching myself C language by reading the **"C by example"** book by **Greg Perry**, and I just finished chapter 6 **"Preprocessor Directives".** At the end of each chapter, there are review exercises to co...
0debug
PythonL: invalid syntax file "<fstring>", line 1 : <p>When doing <code>python3 Webhook.py</code> (<a href="https://github.com/camielverdult/dis-nv-updatechecker.py/blob/master/Webhook.py" rel="noreferrer">this</a> is the file), it gives me the error: <code> File "&lt;fstring&gt;", line 1 (%X - %x) ^ SyntaxE...
0debug
static void update(Real288_internal *glob) { float buffer1[40], temp1[37]; float buffer2[8], temp2[11]; memcpy(buffer1 , glob->output + 20, 20*sizeof(*buffer1)); memcpy(buffer1 + 20, glob->output , 20*sizeof(*buffer1)); do_hybrid_window(36, 40, 35, buffer1, temp1, glob->st1a, glob-...
1threat
static void fill_prefetch_fifo(struct omap_gpmc_s *s) { int fptr; int cs = prefetch_cs(s->prefetch.config1); int is16bit = (((s->cs_file[cs].config[0] >> 12) & 3) != 0); int bytes; bytes = 64 - s->prefetch.fifopointer; if (bytes > s->prefetch.count) { bytes = s-...
1threat
How to convert data from monthly to annual in R? : <p>I need to convert monthly observations into annual -- year-country instead of month-country. </p> <p>This is how the data looks: </p> <pre><code>year month countrycode troop 1990 1 USA 6 1990 2 USA 4 1990 3 CANA...
0debug
How to split an ansible role's `defaults/main.yml` file into multiple files? : <p>In some ansible roles (e.g. <code>roles/my-role/</code>) I've got quite some big default variables files (<code>defaults/main.yml</code>). I'd like to split the <code>main.yml</code> into several smaller files. Is it possible to do that?<...
0debug
String a = "x"; then String x = a.substring(1) Wouldn't there be an error like indexOutOfRange? : <p>I am so confused. I thought to use str.substring(1), str has to be at least 2 characters, otherwise there should be index of of bound. But when I typed in, Java doesn't give any error. Why?</p>
0debug
Why does a*a match aaa? : <p>I am using python3 re module - I find that <code>a*a</code> matches <code>aaa</code>. I thought that regex was greedy by default (unless we override it to be lazy with <code>?</code>) - so, <code>a*</code> would have matched the entire string, and the trailing <code>a</code> in the pattern ...
0debug
how to remove several positions in an array : <p>I want remove specific positions in an array (I saw similar question, but removing values, not the positions), and I'm having some problems. Let's say I have:</p> <pre><code> myval &lt;- runif(1:1805) pos &lt;- c(240,601,962,1323,168...
0debug
CompletableFuture supplyAsync : <p>I've just started exploring some concurrency features of Java 8. One thing confused me a bit is these two static methods:</p> <pre><code>CompletableFuture&lt;Void&gt; runAsync(Runnable runnable) CompletableFuture&lt;U&gt; supplyAsync(Supplier&lt;U&gt; supplier) </code></pre> <p>Do ...
0debug
static int bdrv_wr_badreq_bytes(BlockDriverState *bs, int64_t offset, int count) { int64_t size = bs->total_sectors << SECTOR_BITS; if (count < 0 || offset < 0) return 1; if (offset > size - count) { if (bs->autogrow) bs->total_s...
1threat
check http status code using nightwatch : <p>how do I check the HTTP status code using nightwatch.js? I tried </p> <pre><code> browser.url(function (response) { browser.assert.equal(response.statusCode, 200); }); </code></pre> <p>but of course that does not work.</p>
0debug
Docker for Windows error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS" : <p>I've installed Docker and I'm getting this error when I run the GUI:</p> <blockquote> <p>Hardware assisted virtualization and data execution protection must be enabled in the BIOS</p> </block...
0debug
How to compare old password from migrated data using bycrypt : I recently migrated my users table from sql server to mongodb using pentaho etl tool.The password field is binary data type but i am using bycrypt to hash password in nodejs for all new user creation so how do i compare my old users password with bycrypt si...
0debug
Android Studio - Update to 2.3 - Studio doesn't have write access : <p>I didn't have this problem before. When i am trying to update Android Studio to 2.3, i get this:</p> <pre><code>Studio does not have write access to /private/var/folders/00/n4yy8fsx0njck05bfll1t3_w0000gn/T/AppTranslocation/2D9E214E-60BE-41D9-9843-3...
0debug
write if condition with two execution statement in single line python : Here is what I am looking for: if 1: print("hello") hello But when I tried something like this: >>> if 1: print("hello") print("end") File "<stdin>", line 1 if 1: print("hello") print("end") ...
0debug
How to put two child of Kendo grid hierarchy into tab : I have one parent table and two child table in hierarchy. what I want is to have a design that the child table was in seperate tab. This is the sample of what I've already tried. https://dojo.telerik.com/ubiZewAh
0debug
static int v9fs_synth_rename(FsContext *ctx, const char *oldpath, const char *newpath) { errno = EPERM; return -1; }
1threat
No integration defined for method - Choose a stage where your API will be deployed : <p>I'm working with AWS API Gateway and AWS Lambda. Often I face this type of error message when attempt to deploy API. The error message says to select a deployment stage. But I still selecting and trying to deploy! but same error occ...
0debug
Draws a Xmas tree on the screen of using size : I've been trying draw a Xmas tree by using size which is input from user and I also have been trying to find out the logic such as spaces would it take. Any hint for me would be fantastic. Also, this lab requires only one "for" loop and have to call the method write-patte...
0debug
When scale the data, why the train dataset use 'fit' and 'transform', but the test dataset only use 'transform'? : <p>When scale the data, why the train dataset use 'fit' and 'transform', but the test dataset only use 'transform'?</p> <pre><code>SAMPLE_COUNT = 5000 TEST_COUNT = 20000 seed(0) sample = list() test_sampl...
0debug
Regular expression to get data between two strings in java : <p>I am trying to get data between the two strings "Account:" and "Account" from the below string using regular expression.</p> <pre><code> String str= "Order Confirmation Account: Sample Account ID: 1111" </code></pre> <p>The regular expression I used i...
0debug
int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) { char buf1[32], tuple_type[32]; int h, w, depth, maxval; pnm_get(s, buf1, sizeof(buf1)); s->type= buf1[1]-'0'; if(buf1[0] != 'P') return AVERROR_INVALIDDATA; if (s->type==1 || s->type==4) { avctx-...
1threat
static int colo_packet_compare_other(Packet *spkt, Packet *ppkt) { trace_colo_compare_main("compare other"); if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) { char pri_ip_src[20], pri_ip_dst[20], sec_ip_src[20], sec_ip_dst[20]; strcpy(pri_ip_src, inet_ntoa(ppkt->ip->ip_src)); ...
1threat
Matlab make matrix from calculation : <p>so i have this code, clc data=[1;3;4;3;5;2;5] cnt=size(data,1)</p> <pre><code> for i=2:cnt; im=(data(i)-(data(i-1))) end im </code></pre> <p>i need a matrix output from that code</p> <p>but my output still like this</p> <pre><c...
0debug
how to perform regex for password validation without special character? : <p>Regex for password of minimum length-7 without special characters , atleast one uppercase and one number .</p> <p>In my case, regex which satisfies:</p> <p><strong>Killer1 - atleast one uppercase (K), atleast one number (1) , minumum length ...
0debug