problem
stringlengths
26
131k
labels
class label
2 classes
How to speed up a .py script refering to millions of files? : <p>I have about 2.5M files to process with a .py script. </p> <p>I'm using super calculator but I the problem is not the power, its the python process itself that open and close every time and loosing time.</p> <p>I'm using a loop to get every files in a f...
0debug
Is this C# syntax correct? : Learning C#, found below code snippet. What does below line means, which has the same name as a class? [see attached][1] `public Item Parent;` ``` class Item { public string Name; public Item Parent; } ``` [1]: https://i.stack.imgur.com/cwFKG.png
0debug
i have set this funciton in one loop but issue is only work in first tiime : private static void SendMailTest() { var dto = qEmail.Dequeue(); if (dto.Attachment != null && dto.Attachment.Length > 0) { for (int i = 0; i < dto...
0debug
mapping integers 1-max onto 100 integers from 1-1,000,000 : <p>I need to map a Java integer from the range 1-max to the range 1-1,000,000, but only using 100 particular (non-linear) values in the destination range. The 100 values are:<br> 1-10 (so the first 10 values map to themselves)<br> then by 5's: 15, 20, 25 ... ...
0debug
How to get row data in columns and column data in rows using pivot in sql 2008 r2 : [Current result which i am getting from my stored procedure][1] [Expected result from current result][2] [1]: http://i.stack.imgur.com/S8zxt.jpg [2]: http://i.stack.imgur.com/L1OtK.jpg
0debug
void do_info_snapshots(Monitor *mon) { DriveInfo *dinfo; BlockDriverState *bs, *bs1; QEMUSnapshotInfo *sn_tab, *sn; int nb_sns, i; char buf[256]; bs = get_bs_snapshots(); if (!bs) { monitor_printf(mon, "No available block device supports snapshots\n"); return; ...
1threat
How to change port number of Appache server in ubuntu : I want to change my port number 80 to some other number of my Appache server . how it possible in ubuntu
0debug
Run python script from an android app : <p>i am creating an android app which basically asks a user to enter a product name and then returns the best deals available for that particular product.I wrote a python script to scrape various ecommerce websites and return various deals available. What will be the best way to ...
0debug
What is the purpose of the "new" keyword in Java, PHP, etc.? : <p>In many languages, we use <code>new</code> to instantiate a new instance of a class. For example, in Java:</p> <pre class="lang-java prettyprint-override"><code>class MyClass { int number = 1; MyClass(int n) { self.number = n; } } <...
0debug
int64_t helper_fdtox(CPUSPARCState *env, float64 src) { int64_t ret; clear_float_exceptions(env); ret = float64_to_int64_round_to_zero(src, &env->fp_status); check_ieee_exceptions(env); return ret; }
1threat
image not displaying in ci : controller has index() method and display() method. Method index displays the image. and this method called display() doesn't display the images. Both methods are in same controller. Both methods are calling the same view file called $this->load->view('home/portfolio2');. index() method is ...
0debug
static void add_user_command(char *optarg) { cmdline = g_realloc(cmdline, ++ncmdline * sizeof(char *)); cmdline[ncmdline-1] = optarg; }
1threat
Create/append nested dictionary inside a dictionary in Python? : <p>How to append a dictionary?<br> I tried <code>maindict[a] = m</code> and <code>maindict[a][x] = n</code>. It didnt work, I get <code>TypeError: list indices must be integers or slices, not str</code></p> <pre><code>maindict = { 'a' : '', 'b' : '', ...
0debug
Perl text::csv unknown variable : Here is an easy one. I checked to documents, what is that in line 18 ? What kind of variable is @$row, is it the (default output) $_ of the TEXT::CSV getline function ? 1 #!/efs/dist/perl5/core/5.10/exec/bin/perl 2 3 use Text::CSV ; 4 use Time::Local...
0debug
static void check_guest_output(const testdef_t *test, int fd) { bool output_ok = false; int i, nbr, pos = 0; char ch; for (i = 0; i < 6000; ++i) { while ((nbr = read(fd, &ch, 1)) == 1) { if (ch == test->expect[pos]) { pos += 1; if (tes...
1threat
static void qsv_uninit(AVCodecContext *s) { InputStream *ist = s->opaque; QSVContext *qsv = ist->hwaccel_ctx; av_freep(&qsv->ost->enc_ctx->hwaccel_context); av_freep(&s->hwaccel_context); av_buffer_unref(&qsv->opaque_surfaces_buf); av_freep(&qsv->surface_used); av_freep(&qsv->su...
1threat
Angular 2 Get current route : <p>So I need somehow check if I am on home page and do something and in other pages don't do that. Also that component imported on all of pages.</p> <p>How can I detect on that component if I'm on home page???</p> <p>Thanks</p>
0debug
Determining the number of times a substring occurs in a string : <p>I have a string "ABChi hi" and I would like to write a program to determine the number of times the substring "hi" occurs in the main string. So far, my code looks like this:</p> <pre><code> the_word = "ABChi hi" new_word = the_word.split() ...
0debug
def substract_elements(test_tup1, test_tup2): res = tuple(map(lambda i, j: i - j, test_tup1, test_tup2)) return (res)
0debug
static int build_filter(ResampleContext *c, void *filter, double factor, int tap_count, int alloc, int phase_count, int scale, int filter_type, int kaiser_beta){ int ph, i; double x, y, w; double *tab = av_malloc_array(tap_count+1, sizeof(*tab)); const int center= (tap_coun...
1threat
What is faster in C#, an if statement, or a virtual function call to a function that does nothing? And why? : <p>Say you have a class called <code>MyClass</code> which has a certain behavior encapsulated using a reference (<code>myBehavior</code>) to another class called <code>Behavior</code>. By default <code>MyClass...
0debug
static void qxl_check_state(PCIQXLDevice *d) { QXLRam *ram = d->ram; assert(SPICE_RING_IS_EMPTY(&ram->cmd_ring)); assert(SPICE_RING_IS_EMPTY(&ram->cursor_ring)); }
1threat
Select top 5 records of each group in MYSQL : <p>I am trying to fetch a grouped result, with only top 5 rows for each group.. Confused how to do it..</p> <p>Here's the query:</p> <pre><code>SELECT O.rest_brId as BRID, O.`reason` as REASON , count(O.reason) as OCCURENCES FROM orders O WHERE O.status = 4 GROUP BY B...
0debug
Java Swing - Localize Temperature : <p>Is there a way to localize Temperature in Java? Like temperature format will be based on the locale?</p> <p>Because for example, for Norwegian language temperature format should be 14 °C. There should be a space before degrees symbol. But other languages should be 14°C.</p>
0debug
How to control the printwriter from a separate method : Im working on building my own GUI program that talks to my pc from a tablet. I have the server side done in java but my problem is on the client side. I want to send data out the PrintWriter to the server from a separate method. I have accomplished sending i...
0debug
static int init_context_frame(MpegEncContext *s) { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y; s->mb_width = (s->width + 15) / 16; s->mb_stride = s->mb_width + 1; s->b8_stride = s->mb_width * 2 + 1; s->b4_stride = s->mb_width * 4 + 1; mb_array_size = s->mb_h...
1threat
Trying to get a simple php form to fire : <p>I shouldnt even be in HTML/CSS, but here I am trying to incorporate a php modal contact form into my site...</p> <p>I'm trying to get all of a demo form's functionality into my footer page (and then I'll restyle everything.)</p> <p><a href="http://danux.me/sections/footer_...
0debug
static void cpu_exec_step(CPUState *cpu) { CPUClass *cc = CPU_GET_CLASS(cpu); TranslationBlock *tb; target_ulong cs_base, pc; uint32_t flags; uint32_t cflags = 1 | CF_IGNORE_ICOUNT; if (sigsetjmp(cpu->jmp_env, 0) == 0) { tb = tb_lookup__cpu_state(cpu, &pc, &cs_base, &flags, ...
1threat
replace sub string with conditions vba : hoping you can help me out with a bit of vba code i cant seem to make work. been using stackoverflow to help me create some simple macros but this one is a bit more complicated and i suck the goal is to search thru a excel file with strings in column A and replace a part o...
0debug
Elasticsearch 6: Rejecting mapping update as the final mapping would have more than 1 type : <p>I'm trying to convert a project to use the latest Elasticsearch 6 and am having this problem. I don't know if the problem is "Product" vs "product". In my mappings and attributes I specify "products", so I am not sure why I ...
0debug
static void onenand_reset(OneNANDState *s, int cold) { memset(&s->addr, 0, sizeof(s->addr)); s->command = 0; s->count = 1; s->bufaddr = 0; s->config[0] = 0x40c0; s->config[1] = 0x0000; onenand_intr_update(s); qemu_irq_raise(s->rdy); s->status = 0x0000; s->intstatus = c...
1threat
Difference between pip3 and `python3 setup.py install` regarding cmdclass argument : <p>I tried to configure my package such that a script is executed on the installation process. Therefore, I inherited from setuptools.command install and created my custom class <code>ActionOnInstall</code> to do stuff when package is ...
0debug
static void decode_bo_addrmode_post_pre_base(CPUTriCoreState *env, DisasContext *ctx) { uint32_t op2; uint32_t off10; int32_t r1, r2; TCGv temp; r1 = MASK_OP_BO_S1D(ctx->opcode); r2 = MASK_OP_BO_S2(ctx->opcode); off10 = MASK_OP_BO_OFF1...
1threat
How to create this layout using LinearLayout? : <p>I want to construct below layout using LinearLayout. <a href="https://i.stack.imgur.com/AqBgH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AqBgH.png" alt="enter image description here"></a> I created that using ConstraintLayout,but it was too lon...
0debug
Printing a char in C with printf wont print : <p>I have the following code: </p> <pre><code>#include &lt;stdio.h&gt; #include &lt;string.h&gt; int main(void) { char buff[50]; int pass = 0; printf("\n Enter the password : \n"); gets(buff); char str[80]; strcat(str, "nw"); strcat(str, "ww")...
0debug
Keras conv1d layer parameters: filters and kernel_size : <p>I am very confused by these two parameters in the conv1d layer from keras: <a href="https://keras.io/layers/convolutional/#conv1d" rel="noreferrer">https://keras.io/layers/convolutional/#conv1d</a></p> <p>the documentation says:</p> <pre><code>filters: Integ...
0debug
static uint64_t qemu_next_deadline_dyntick(void) { int64_t delta; int64_t rtdelta; if (use_icount) delta = INT32_MAX; else delta = (qemu_next_deadline() + 999) / 1000; if (active_timers[QEMU_TIMER_REALTIME]) { rtdelta = (active_timers[QEMU_TIMER_REALTIME]->expire...
1threat
Code for copy data using VbA code in excel : Can someone please help me to how to code for below snapshots : [Input][1] [Output][2] [1]: https://i.stack.imgur.com/AgX6l.jpg [2]: https://i.stack.imgur.com/spTJ2.jpg
0debug
how to convert string to array in ios? : I have get a response from server like following link. http://paste.ofcode.org/NhBN7HVALRg9DjjucD9xmK NSString *strdetails = [NSString stringWithFormat:@"%@",[[products objectAtIndex:i] valueForKey:@"details"]]; NSLog(@"%@",strde...
0debug
static ssize_t test_block_read_func(QCryptoBlock *block, size_t offset, uint8_t *buf, size_t buflen, Error **errp, void *opaque) { ...
1threat
Vuejs, Difficulties to build with relative path : <p>I'm facing difficulties to make a proper build with a relative path when I run <code>npm run build</code>. Resolving assets is easy but I don't know how to configure 2 things:</p> <p>1/ The <code>assetsPublicPath</code> in <code>config/index.js</code></p> <pre><cod...
0debug
static int ftp_connect_data_connection(URLContext *h) { int err; char buf[CONTROL_BUFFER_SIZE], opts_format[20]; AVDictionary *opts = NULL; FTPContext *s = h->priv_data; if (!s->conn_data) { if ((err = ftp_passive_mode(s)) < 0) { av_dlog(h, "Set passive mode f...
1threat
Most efficient of using 'if' : <p>Code 1 :</p> <pre><code>if( !(varOfsomeClass-&gt;isValid($imParams)) ){ //some function i need to run } </code></pre> <ul> <li>run function isValid</li> <li>reverse value with not (!)</li> <li>check value with if</li> </ul> <p>Code 2 :</p> <pre><code>if( (varOfsomeClass-&gt;isV...
0debug
How does Java handle vulnerable code coming as input arguments? : <p>How does jvm handle vulnerable code like 'System.exit()' when passed as user inputs?</p>
0debug
Is it possible to prevent `useLazyQuery` queries from being re-fetched on component state change / re-render? : <p>Currently I have a <code>useLazyQuery</code> hook which is fired on a button press (part of a search form). </p> <p>The hook behaves normally, and is only fired when the button is pressed. However, once I...
0debug
What is the difference between a double and short type in C? : <p>I am writing a C code but am not sure when to use a double or a short type when defining a pointer. Can someone explain the difference between the two?</p>
0debug
Why do we declare pointers : Why do we use pointers in c to store addresses of variables?? Why can't we simply use an unsigned int instead?? I mean we could simply declare an unsigned int to store the addresses
0debug
static int swri_resample(ResampleContext *c, uint8_t *dst, const uint8_t *src, int *consumed, int src_size, int dst_size, int update_ctx) { int fn_idx = c->format - AV_SAMPLE_FMT_S16P; if (c->filter_length == 1 && c->phase_shift == 0) { int index...
1threat
Elixir - how to deep merge maps? : <p>With <code>Map.merge</code> I have:</p> <pre><code>Map.merge(%{ a: %{ b: 1 }}, %{ a: %{ c: 3 }}) # =&gt; %{ a: %{ c: 3 }} </code></pre> <p>but actually I want to:</p> <pre><code>Map.merge(%{ a: %{ b: 1 }}, %{ a: %{ c: 3 }}) # =&gt; %{ a: %{ b: 1, c: 3 }} </code></pre> <p>Is the...
0debug
static void exynos4210_i2c_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) { Exynos4210I2CState *s = (Exynos4210I2CState *)opaque; uint8_t v = value & 0xff; DPRINT("write %s [0x%02x] <- 0x%02x\n", exynos4_i2c_get_regname(offset), ...
1threat
static int has_codec_parameters(AVCodecContext *enc) { int val; switch(enc->codec_type) { case CODEC_TYPE_AUDIO: val = enc->sample_rate; break; case CODEC_TYPE_VIDEO: val = enc->width && enc->pix_fmt != PIX_FMT_NONE; break; default: val = 1; ...
1threat
(Java) For some reason this when I print this arraylist it prints the second part of it as same as the third part : import java.util.*; public class RoadTrip { ArrayList<GeoLocation> roadTrip = new ArrayList<GeoLocation>(); double cheat = 0; // Create a GeoLocation and add it to t...
0debug
void cpu_state_reset(CPUMIPSState *env) { MIPSCPU *cpu = mips_env_get_cpu(env); CPUState *cs = CPU(cpu); env->CP0_PRid = env->cpu_model->CP0_PRid; env->CP0_Config0 = env->cpu_model->CP0_Config0; #ifdef TARGET_WORDS_BIGENDIAN env->CP0_Config0 |= (1 << CP0C0_BE); #endif env->CP0_Config1 = env...
1threat
datagridview cellcontent checkbiox change event : I have a datagridview with 3 columns invoice id, price and a checkbox. If checkbox is clicked price becomes 0 for that row. Now that is happening. But when I uncheck the checkbox price should be as it was. But it is remaining zero. Below is my code for cellcontent...
0debug
void main_loop_wait(int nonblocking) { IOHandlerRecord *ioh; fd_set rfds, wfds, xfds; int ret, nfds; struct timeval tv; int timeout; if (nonblocking) timeout = 0; else { timeout = qemu_calculate_timeout(); qemu_bh_update_timeout(&timeout); } o...
1threat
static int do_subchannel_work(SubchDev *sch) { if (sch->do_subchannel_work) { return sch->do_subchannel_work(sch); } else { return -EINVAL; } }
1threat
what is the dataWithContentsOfURL equivalent in android? : Hi i am trying to get the video data from a url. my project is base in a swift project. there they use dataWithContentsOfURL someone know what is the equivalent for android > data = [NSData dataWithContentsOfURL:videoUrl options:0 error:&error]; ...
0debug
How to create a Navigation Drawer and Bottom Bar in the same app : <p>I am creating an app, and I want to have a Navigation Drawer and a Bottom Bar in the app.</p> <p>I think that I am going for a good way, but I Can do that the Navigation Drawer when I display it, this is not above the Bottom Bar, it is behind, so Ho...
0debug
Cannot read property 'style' of null - Google Sign-In Button : <p>I'm trying to implement Google sign in for my website. The Sign-In button shows up correctly and signs-people in well initially. My problem occurs when I log out after having used the website and try to move to the Sign-In page (I'm using React, so it's ...
0debug
static AVFilterContext *create_filter(AVFilterGraph *ctx, int index, const char *name, const char *args, AVClass *log_ctx) { AVFilterContext *filt; AVFilter *filterdef; char inst_name[30]; snprintf(inst_name, sizeof(i...
1threat
C# Writing to a excel file : <p>I have Data stored in DataTables and I'm trying to write that data into a .xlsx file, with multiple sheets. I don't how to go about it. Thanks</p>
0debug
How to load a component from a variable name in Vue.js? : <p>I want to load a component from a dynamic variable name in my vue.js application.</p> <p>I have the following component registered:</p> <pre><code>&lt;template id="goal"&gt; &lt;h1&gt;Goal:{{data.text}}&lt;/h1&gt; &lt;/template&gt; </code></pre> <p>Inste...
0debug
How do I convert a Python3 file i to .exe file? : <p>I've been coding on python for a while. Made quite a few games and applications. Now I want to share them but don't know how. I can't just ask my friends to download python on their computers. </p> <p>Please Help!</p>
0debug
Python How to prevent input same value in a empty list for several times : **Wrong** example a = [ ] while a [ 4 ] ! = None: #ensure in put 5 times option = input() if option in a: #prevent input same value continue else: a.append(option) Moreover, ...
0debug
Remove exact alphanumeric string from text in R/Python : <p>"The string? is made up a load of strings but the problem is the removal of question mark in the word string? without removing the other question marks. can anybody have a look?" </p> <p>In the above text I have to alter "string?" to "string". But I dont wa...
0debug
Connect new oulet from storyboard is always nil : I'm trying to connect new outlet from storyboard to UIViewController (by dragging), the outlet created as follow: @IBOutle var button2: UIButton! - without "weak" key, in runtime the outlet is nil, even if i add the "weak" key by my self and reconnect it agai...
0debug
static int ffm2_read_header(AVFormatContext *s) { FFMContext *ffm = s->priv_data; AVStream *st; AVIOContext *pb = s->pb; AVCodecContext *codec; const AVCodecDescriptor *codec_desc; int ret, i; int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1; AVCodec *enc; char *buffer...
1threat
A way to subclass NamedTuple for purposes of typechecking : <p>I have several namedtuples that share some fields. I have a function that accepts these tuples and is guaranteed to only interact with the shared fields. I want to typecheck such code in mypy.</p> <p>An example of the code would be:</p> <pre><code>from ty...
0debug
static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce) { FFPsyBand *band; int w, g, w2, i; float *PNS = &s->scoefs[0*128], *PNS34 = &s->scoefs[1*128]; float *NOR34 = &s->scoefs[3*128]; const float lambda = s->lambda; const float freq_mult = avctx->s...
1threat
Perl tr usage of regexp : <p>i would like to ask about regex usage in Perl, extacly the tr///</p> <p>So if i have an expression tr/abcde/abc the result will be abcab? How extacly the tr works?</p>
0debug
How would I assign Configmap to a pod that is already running? : I can not get a configmap loaded into a pod that is currently running nginx. I can not get a currently running pod (running nginx) to read a configmap. I tried by creating a simple pod definition and added to it a simple read configmap shown below: ...
0debug
angular build size with sass is huge : <p>So, I'm working on big app and all components have their own sass file style (we use ViewEncapsulation.Native) but I build <code>npm run build --stats-json --prod --aot</code> and check the stats with <a href="https://chrisbateman.github.io/webpack-visualizer/" rel="noreferrer"...
0debug
How to declare a variable that can not insert in function : <p>I wanna declare a function with 2 Input parameters.</p> <pre><code>function myFunc( $first , $second ) { return $first; } </code></pre> <p>When it called I only need the first parameter and don't wanna use "NULL" for the second.</p> <pre><...
0debug
Using a loop function or lapply funtion to have a plot : I have a very large data set including 200 variables (columns), I am looking for a way (Loop function, etc) to have multiple variables in the same plot. How can I modify the below code to have this kind of plot(instead of repeating each geom_line(aes(y=)) for eac...
0debug
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) { int total = size; do { int len = FFMIN(f->end - f->wptr, size); if (func) { if (func(src, f->wptr, len) <= 0) break; } else { memcpy(f->wptr,...
1threat
static inline int get_segment(CPUPPCState *env, mmu_ctx_t *ctx, target_ulong eaddr, int rw, int type) { hwaddr hash; target_ulong vsid; int ds, pr, target_page_bits; int ret, ret2; pr = msr_pr; ctx->eaddr = eaddr; #if defined(TARGET_PPC64) if (env->m...
1threat
C# - Dictionary.Count - not working as expected : The following line of code is not working as expected: If there are two dictionary entries it prints "2, 2" instead of "1, 2" Console.WriteLine($"Student: {studentMap.Count} - Average Score: {average} - Letter Grade: {GetLetterGrade(average)}"); It is not...
0debug
Clickonce App Doesn't start with Windows 1803 : <p>I have a Clickonce app from Visual Studio 2015 SP3 that is published to the network server and used in-house only. The program works just fine when launched from Visual Studio. It runs just fine on a Windows machine that <strong>does not</strong> have the 1803 update. ...
0debug
Python - How to make a list of permutations : I have a list of variables, let's call it X. Below are the contents of X x = ['A, B', '2', '3', 'Jan, Feb'] I want to transform this list into a list of lists with all the permutations of each list item that is comma separated sot hat it looks like this. x ...
0debug
i need to hide radio input doesn't work : This is my html code i want to hide the radio button on css but when i press f5 doesn't work <div id="ud_tab"> <input type="radio" name="ud_tabs" id="tab1" checked=""> <label for="tab1">Headline 1</label> <input type="radio" name="ud_tabs" id="tab2...
0debug
How i can fetch only date from timestamp column through PHP? : I wanna to fetch old date as well not only current date stored in Timestamp,i used date() function but it only return current date and time.
0debug
Color under status bar when using Drawer Layout : I'm having the hardest time changing the color beneath the transparent status bar color.The transparency is fine when the drawer is open but the color beneath is wrong. Different fragments are going to have different action bar colors. fitsSystemWindow has no effect....
0debug
Turning a string that contains a equation into an integer : <p>I would like to be able to convert a string such as "(5+6)*6" and get the resulting integer from that equation. It is important that it starts out as a string. </p>
0debug
Change path symbols \ to / [C++] : I have a string path to my file that I want to execute . It is for example : E:\folderA\folderB\myfile.exe If I write this path and I try to execute file there it says that file doesn't exist. When I write it like that. Then it works. E:/folderA/folderB/myFi...
0debug
int check_hw_breakpoints(CPUX86State *env, int force_dr6_update) { target_ulong dr6; int reg, type; int hit_enabled = 0; dr6 = env->dr[6] & ~0xf; for (reg = 0; reg < DR7_MAX_BP; reg++) { type = hw_breakpoint_type(env->dr[7], reg); if ((type == 0 && env->dr[reg] == env->eip)...
1threat
What server URL should be used for the `oc login` command when using OpenShift's PaaS? : <p>What do I provide for the server URL in the <code>oc login</code> tool, when using the OpenShift PaaS?</p> <p>I'm trying to migrate my OpenShift Online v2 app to v3, following <a href="https://docs.openshift.com/online/dev_guid...
0debug
static void gen_spr_604 (CPUPPCState *env) { spr_register(env, SPR_PIR, "PIR", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_pir, 0x00000000); spr_register(env, SPR_IABR, "IABR", SPR_NOACCESS, SPR_NOACCESS, ...
1threat
How to insert column in sql server dynamically using stored procedures? : M trying this query bt its not working. CREATE PROCEDURE USP_UPDATEUSERS_0 @COLUMNNAME NVARCHAR(30),@DATATYPE NVARCHAR(30) AS ALTER TABLE HC_USER_MAIN ADD COLUMNNAME=@COLUMNNAME DATATYPE=@DATATYPE its showing error: Msg 102, Level 15, Stat...
0debug
Store First & Second Character value in two different veritable : <p>I wish to store First &amp; Second character of value in two different variable <code>id</code> with <code>ccMain</code>.Using jquery or Javascript.</p> <p>Here is the html code I have to set up the environment:</p> <pre><code>&lt;span id="ccMain"&g...
0debug
How to make this regex have proper syntax for python 3 : #!/usr/bin/env python # -*- encoding: utf8 -*- import re sample = u'I am from 美国。We should be friends. 朋友。' for n in re.findall(ur'[\u4e00-\u9fff]+',sample): print n
0debug
Making Unix shell scripts POSIX compliant : <p>I have been working on a shell script to automate some tasks. What is the best way to make sure the shell script would run without any issues in most of the platforms. For ex., I have been using <code>echo -n</code> command to print some messages to the screen without a tr...
0debug
static int applehttp_open(URLContext *h, const char *uri, int flags) { AppleHTTPContext *s; int ret, i; const char *nested_url; if (flags & AVIO_FLAG_WRITE) return AVERROR(ENOSYS); s = av_mallocz(sizeof(AppleHTTPContext)); if (!s) return AVERROR(ENOMEM); h->priv...
1threat
What does it mean to initialize a string like "std::string mystring{""};". Is it new feature of C++ 11 or 14? : <p>I am new to <strong>C++ 11 &amp; 14</strong>. In my new role I saw a code where <strong>string was initialized</strong> (below) and I do not know what is this new way called and where to read about it. Can...
0debug
How to serve static directory from "ng serve" : <p>Can I ask if there are any similar config for webpack dev server config like this:</p> <pre><code>devServer : { historyApiFallback : true, stats : 'minimal', contentBase: helpers.root('../src/static'), } </code></pre> <p>I want to serve static files fro...
0debug
Create JSON Array and JSON Object Android Studio : I'm getting data from an XML file and this is my code on parsing the XML, which I have no problems with. I'm not familiar with ArrayList so I stick with JSON. while (eventType != XmlPullParser.END_DOCUMENT) { if(eventType == XmlPullParser.S...
0debug
git clone with different username/account : <p>This is a stupid question, but I've looked it up for ages, and I can't find anything, so I have to ask it.</p> <p>How do you <code>clone</code> something on <code>git</code> with a different account?</p> <p>e.g if I am logged in to <code>abcdef</code>, and I want to clon...
0debug
static void cpu_notify_map_clients(void) { MapClient *client; while (!LIST_EMPTY(&map_client_list)) { client = LIST_FIRST(&map_client_list); client->callback(client->opaque); LIST_REMOVE(client, link); } }
1threat
org.json.JSONException: Value <br><table of type java.lang.String cannot be converted to JSONObject? : I know there a lot of people with the same problem but any answers can help me. And all just confuse me. I'm trying to do a Login/Register on Android Studio. The problem display is the follow. W/System.er...
0debug
View being blocked by UITransitionView after being presented : <p>I have a side navigation controller and present it via a UIButton. When I make this NC the root view controller directly by <code>[self presentviewcontroller: NC animated: YES completion: nil]</code>, some reason the menu side of the NC is blocked by a <...
0debug
uint64_t cpu_get_tsc(CPUX86State *env) { #ifdef CONFIG_KQEMU if (env->kqemu_enabled) { return cpu_get_real_ticks(); } else #endif { return cpu_get_ticks(); } }
1threat