problem
stringlengths
26
131k
labels
class label
2 classes
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
static int coroutine_fn bdrv_aligned_preadv(BlockDriverState *bs, BdrvTrackedRequest *req, int64_t offset, unsigned int bytes, int64_t align, QEMUIOVector *qiov, int flags) { BlockDriver *drv = bs->drv; int ret; int64_t sector_num = offset >> BDRV_SECTOR_BITS; unsigned int nb_sectors = ...
1threat
Is `namedtuple` really as efficient in memory usage as tuples? My test says NO : <p>It is stated in the Python documentation that one of the advantages of <code>namedtuple</code> is that it is as <em>memory-efficient</em> as tuples. </p> <p>To validate this, I used iPython with <a href="https://github.com/ianozsvald/i...
0debug
how to print php response json response in android : how to print php response json response in android thanks in advance im fresher in this field i needs help plz help me im fresher and i have no idea about this code thanks in advanced thank you im android devloper but i have no idea about json parsing plz help me ...
0debug
Angular 2 - Submodule routing and nested <router-outlet> : <p>I'm looking for a solution with Angular 2 for the scenario explained below:</p> <p><a href="https://i.stack.imgur.com/JOXsO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JOXsO.png" alt="enter image description here"></a></p> <p>In this scenario...
0debug
How to group by two field? : I have the following table: listId | accountId | ammount | 1 1 20 1 1 20 2 2 30 2 2 30 I need to `sum(ammount)` and group by `listId, accountId` to get result: listId | accountId | amm...
0debug
connection.query('SELECT * FROM users WHERE username = ' + input_string)
1threat
PCIBus *pci_gt64120_init(qemu_irq *pic) { GT64120State *s; PCIDevice *d; (void)&pci_host_data_writeb; (void)&pci_host_data_writew; (void)&pci_host_data_writel; (void)&pci_host_data_readb; (void)&pci_host_data_readw; (void)&pci_host_data_readl; s = qemu_mallocz(siz...
1threat
How to include correctly -Wl,-rpath,$ORIGIN linker argument in a Makefile? : <p>I'm preparing a c++ app on linux (Ubuntu 16.04) with the use of a few poco libraries which I have dynamically linked. I have project folder that consists of : include, bin, lib , src and build folders and the relevant Makefile. So far I us...
0debug
expression pattern of type 'Int' cannot match values of type 'uint?' (aka 'Optional<UInt32>') : <p>I am getting below error during Objective-C to Swift code change. Thanks</p> <pre><code>class func shareLevelUp(toFacebook level: uint, from vc: UIViewController?) { let report = GymStatusReport.statusReportForLe...
0debug
static double get_audio_clock(VideoState *is) { double pts; int hw_buf_size, bytes_per_sec; pts = is->audio_clock; hw_buf_size = audio_write_get_buf_size(is); bytes_per_sec = 0; if (is->audio_st) { bytes_per_sec = is->audio_st->codec->sample_rate * 2 * is...
1threat
How to use the sed command : <p>I have a <strong>text</strong> file lets say with the name of "example" and has this data :</p> <pre><code>data:data:data data:data:data data:data:data data:data:data </code></pre> <p>I want to Display the file substituting all instances of the : character with 5 spaces using the SED c...
0debug
SNI Dynamic Certificate : <p>I'm pulling my hair out here. Websites like <a href="http://wix.com" rel="noreferrer">wix.com</a>, <a href="http://squarespace.com" rel="noreferrer">squarespace.com</a> ...etc; can generate websites on the fly and still use SSL on every one of the millions of custom domains.</p> <p>I try ...
0debug
int qcow2_grow_l1_table(BlockDriverState *bs, int min_size) { BDRVQcowState *s = bs->opaque; int new_l1_size, new_l1_size2, ret, i; uint64_t *new_l1_table; int64_t new_l1_table_offset; uint8_t data[12]; new_l1_size = s->l1_size; if (min_size <= new_l1_size) return 0; ...
1threat
Need to create a ~2,000 flat files with specific structure in MS SQL : The .control files I need to create contains a specific structure that will be used to fax certain documents to specific destinations. Here is a sample: ;Sender Information #SENDER_NAME LA Medical Care #SENDER_EMAIL LAFakers@gmail.c...
0debug
static int socket_accept(int sock) { struct sockaddr_un addr; socklen_t addrlen; int ret; addrlen = sizeof(addr); do { ret = accept(sock, (struct sockaddr *)&addr, &addrlen); } while (ret == -1 && errno == EINTR); g_assert_no_errno(ret); close(sock); return ret...
1threat
I want a div to show only when user clicks on a button : <form id="search" action="#" method="post" style="float: left"> <div id="input" style="float: left; margin-left: 10px;" ><input type="text" name="search-terms" id="search-terms" placeholder="Search websites and categories..." st...
0debug
How can I make react-bootstrap's Dropdown open on mouse hover? : <p>Ok the question is simple. I need to make the dropdown open when mouse hover rather than on click.</p> <p>Currently my code is as follow.</p> <pre><code> &lt;Nav&gt; &lt;NavDropdown onMouseEnter = {()=&gt; isOpen=true} open={...
0debug
How git manage to store the files branch wise? : <p>Suppose, In my repository, I have two branches i.e Master and development. I've created the development branch from master and now I added some new files to the development branch and after committing those changes on local, I switched to the <strong>Master branch</st...
0debug
void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb) { uint32_t type; struct iovec *in_iov = req->elem.in_sg; struct iovec *iov = req->elem.out_sg; unsigned in_num = req->elem.in_num; unsigned out_num = req->elem.out_num; if (req->elem.out_num < 1 || req->elem.in_num...
1threat
JavaScript giving nonsense errors : <p>So, me and a few friends are making a text adventure in JavaScript. in it, there is a possibility of the player using a heal spell, which runs the following code:</p> <pre><code>function heal() { alert('You chant some ominous-sounding words, and your wounds heal'); alert('Hit...
0debug
Conversion of numbers from one form to other : I have a data frame "df" with a column "Amount", which contains values in millions like 2.3, 17, 1.47 and so on. I want to create a new column "Amount1" in "df" which converts each value in "Amount" to the form like 2300000, 17000000, 1470000 and so on. How would I accompl...
0debug
Is it possible to use Webpack-Hot-Middleware with NGINX on server side? : <p>I am working on a project for a client and I need to use webpack's Hot Module Replacement feature. I am using an express (node) application behind NGINX. I am using many javascript frameworks to design the application, React happens to be one ...
0debug
Finiding count of files using C language using sytem calls with specific extension : Using bash I can find count the count of specific extensions of a file like jpg,mp4 etc..,. How can I achieve this using C language system calls? Any help to achieve this using C language system calls? ls -lR /path/to/dir/*.jpg ...
0debug
static void decode_lpc(int32_t *coeffs, int mode, int length) { int i; if (length < 2) return; if (mode == 1) { unsigned a1 = *coeffs++; for (i = 0; i < length - 1 >> 1; i++) { *coeffs += a1; coeffs[1] += *coeffs; a1 = coeff...
1threat
How to feed input to an exe via bat file on DOS : Suppose I have a program kn.exe made in Visual Basic which takes in three numbers in text boxes and calculates an index out of them when one clicks the command "Calculate", and displays the calculated number (index) in another text box. Can I write a .bat file for D...
0debug
static int libopenjpeg_copy_unpacked8(AVCodecContext *avctx, const AVFrame *frame, opj_image_t *image) { int compno; int x; int y; int width; int height; int *image_line; int frame_index; const int numcomps = image->numcomps; for (compno = 0; compno < numcomps; ++compno) ...
1threat
Should I use block element or inline element? : I want to show like this.<br> > [![enter image description here][1]][1] [1]: http://i.stack.imgur.com/s973o.png What should i used? Obviously one external div with blue background.<br> But what inside?<br> **Two span or<br> Two p elements or<br> Two div**<...
0debug
static void do_safe_dpy_refresh(CPUState *cpu, run_on_cpu_data opaque) { DisplayChangeListener *dcl = opaque.host_ptr; dcl->ops->dpy_refresh(dcl); }
1threat
writing an "if" function that returns 3 possible vairable results based on the formula in a combination of 3 cells : I'm trying to write a formula that will do the following - if a1>b1 then (c2-d2)*f2, if a1<b1 but a1>c1, then (c3-d3)*f2, if a1<c1, then 0.
0debug
post data from a form in json format : I have two html pages : 1.html and 2.html I want to post data from a form in 1.html to 2.html I want to store data from form in 1.html in json and then post it to 2.html without going to 2.html when I click on submit button and parse json in 2.html and use them. 1.html : ...
0debug
Here im getting error when i pass my DB name i.e Test if i pass Sid its working plz help me : import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class Main { public ...
0debug
How to insert scale bar in a map in matplotlib : <p>Any ideas on how can I insert a scale bar in a map in matplotlib that shows the length scale? something like the one I have attached.</p> <p>Or maybe any ideas on measuring and showing distances automatically (not drawing an arrow and writing the distance manually!)?...
0debug
Getting error while running application on real device : I am developing quiz application where user can solve quiz in particular time but when I am running application on emulator it runs without error but at the time of running application on real device it throws following error. **Error:-** java.lang....
0debug
how to match /foo/:id/bar?any_query_string_I_want with regex : <p>This is a page URL and the :id param changes based on the resource and the query string can be all over the map.</p> <p>How can I match /foo/:id/bar?anything</p> <p>thanks in advance</p>
0debug
failed to deploy Travis CI `Python` : I got the below error when tried to run the build in `travis`. I'm new to travis and following some websites to create the builds for `Python` project. ```=========================== 2 passed in 0.02 seconds =========================== The command "coverage run -m pytest test.p...
0debug
how can i adjust my plot to make it easier to read? : import numpy as np import matplotlib.pyplot as plt def barchart(Gbar, Vbar, Wbar, Rbar, Dbar, Nebar, Tbar, Abar): N = 10 G = Gbar ind = np.arange(N) # the x locations for the groups width = 0.12 # the width of the bars ...
0debug
Strange behaviour of printf (C) : i'm trying to discover all capabilities of printf and I have tried this : printf("Test:%+*0d", 10, 20); that print : **Test:%+100d** I have use first the flag +, then the width * and the re-use the flag 0. Why it's make this output ? I purposely use printf in a bad way...
0debug
static void virtio_set_status(struct subchannel_id schid, unsigned long dev_addr) { unsigned char status = dev_addr; if (run_ccw(schid, CCW_CMD_WRITE_STATUS, &status, sizeof(status))) { virtio_panic("Could not write status to host!\n"); } }
1threat
def count_digs(tup): return sum([len(str(ele)) for ele in tup ]) def sort_list(test_list): test_list.sort(key = count_digs) return (str(test_list))
0debug
How can I post array keys that have special charachters? : I have a form that contains some special characters as the keys. Below is an example: <input type="text" name="skills[React.js]" placeholder="Years" class="form-control"> <input type="text" name="skills[Responsive-Web-Design-(RWD)]" placeholder="Years"...
0debug
Python A part of code is not being exicuted : Hi I have this class which gives me output of "I am in level 1" but doesn't out "i am in level 2" so i assume get_full_name(self) part isn't being executed any help ? class UserTest(TestCase): user = UserFactory() def test_user_login_client(self): ...
0debug
static void select_vgahw (const char *p) { const char *opts; assert(vga_interface_type == VGA_NONE); if (strstart(p, "std", &opts)) { if (vga_available()) { vga_interface_type = VGA_STD; } else { error_report("standard VGA not available"); exit(...
1threat
void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, uint16_t io_base) { Aml *dev; Aml *crs; Aml *pkg; Aml *field; Aml *method; Aml *if_ctx; Aml *else_ctx; int i, apic_idx; Aml *sb_scope = aml_scope("_SB"); uint8_t madt_...
1threat
git clone error: gnutls_handshake() failed: An unexpected TLS packet was received : <p>I am running Ubuntu 18.04 LTS on armv7l. I am running git clone inside a proxy (I got the proxy variables set properly), but now I get this;</p> <p><code>fatal: unable to access '&lt;my_git&gt;.git/': gnutls_handshake() failed: An u...
0debug
Is there another way to "setConnection" on an Eloquent Model? : <p>I am currently handling a "multi db on the fly swap connections" sort of project.</p> <p>So what I end up doing is the following:</p> <pre><code>$connectionName = uniqid(); \Config::set('database.connections.' . $connectionName, [/** db options **/]);...
0debug
int qcrypto_hash_bytesv(QCryptoHashAlgorithm alg, const struct iovec *iov, size_t niov, uint8_t **result, size_t *resultlen, Error **errp) { int i, ret; gnutls_hash_hd_t dig; if...
1threat
How to fix "Equations for ‘lefgNLista’ have different numbers of arguments" : I'm trying to learn list in Haskell but I have a error that me and my friends don't understand I've been trying with the definition of the arguments, but to be honest I don't understand too much of haskell yet. lefgNLista:: [Int]->[Int]...
0debug
I am doing a (StrIns) funcion that mix 2 words but the program is not working at all : this is my code ________________________________________________________________________ #include <stdio.h> #include <stdlib.h> char strins(char[],char[],int,int,int); int main(void) { char zk1[10...
0debug
How to find if all brackets are balanced (C) : <p>So I have an array full of brackets, for example :</p> <p>1) (()())())((())(())</p> <p>2) ()((()()))</p> <p>Any open bracket ( '(' ) should also be closed by another one (')')</p> <p>So for example 1) -></p> <p>(()())())((())(()) -> (....)..)((..)(..) -> ())(()() ...
0debug
How can I grant the account permission to list enabled APIs? : <p>During a build on Cloud Build, I get the following warning:</p> <p><code>Step #2: WARNING: Unable to verify that the Appengine Flexible API is enabled for project [xxxxx]. You may not have permission to list enabled services on this project. If it is no...
0debug
Why there is no Source Code Management tab in a Jenkins pipeline job? : <p>I've just installed the pipeline plugin (on Jenkins 2.1). When I create a new job the <em>Source Code Management</em> tab is missing (and a few others). According to <a href="https://jenkins.io/2.0/#ux" rel="noreferrer">the article describing th...
0debug
What is the different between force push and normal push in git : <p>I want to know what is the different between force push and normal push and at what kind of situations i should do force push in git?Is it a good practice to do force push into master branch?</p>
0debug
javascript variable's weird behaviour : <p>Case 1 - If I console.log(variable) before the variable declaration I get undefined. eg;</p> <pre><code> // code console.log(a); var a ; // output undefined </code></pre> <p>Case 2 - If I console.log(variable) without variable declaration I get Uncaught Reference...
0debug
Validating possibilities for HasMap access : Im asking myself what could be the more elegant way of validating a HasMap access. Map<String, String> m = new HashMap<>(); if(m.hasNext()){ ...} else System.out.println("Error."); or Map<String, String> m = new HashMap<>(); ...
0debug
Create a number with several digit in C++ : <p>I have 3 digits (1,4,6) and I want to create a number with 2 digits from my digits like 11,14,16,41,44,46,61,64,66.</p> <p>What command should I use in c++ ?</p>
0debug
Swift 1.2 -> Swift 2 : <p>I'm coding an app for my Kids. I have background in Java but havn't professionally coded in a decade. I don't thoroughly understand how the following line works but it worked in Swift 1.2:</p> <pre><code>leaderboardRequest.loadScoresWithCompletionHandler({ (scores:[AnyObject]!, error:NSError!...
0debug
How to pass method name as a parmeter? : <p>I'm looking for a way to make my code shorter. Since a big part of my code is repeatable, is there any way to pass a sub method name as a parmeter?</p> <p>Here is a some bigger part to make my problem some more clear:</p> <pre><code>Random rnd = new Random(Guid.NewGuid().Ge...
0debug
Mockito on Android, Context.getString(id) and NullPointerException : <p>I've just started learning a Mockito testing framework, I followed official tutorial from: <a href="https://developer.android.com/training/testing/unit-testing/local-unit-tests.html" rel="noreferrer">developer.android.com</a></p> <p>The code is:</...
0debug
static ssize_t virtio_net_receive(NetClientState *nc, const uint8_t *buf, size_t size) { VirtIONet *n = qemu_get_nic_opaque(nc); VirtIONetQueue *q = virtio_net_get_subqueue(nc); VirtIODevice *vdev = VIRTIO_DEVICE(n); struct iovec mhdr_sg[VIRTQUEUE_MAX_SIZE]; struct virtio_net_hdr_mrg_rxbuf mhd...
1threat
jsp?Action=someaction not working but jsp?action=someaction works : <p>In my web application, I use jsp and servlets. To redirect to a page, I use the following URL Pattern with some action.</p> <p><strong>This does not work.</strong></p> <p>1.<a href="http://100.320.22.1423:1023/hello/SomePage.jsp?Action=Det&amp;Fun...
0debug
Simple insertion sort : Why this code waits for user to input 10 integers when size of array input by user is 8 ? It gives segmentation fault when 10 integers are used.` #include<iostream> using namespace std; int main() { int x,a[x]; cout<<"enter the size of array"<<endl; cin>>...
0debug
void av_free(void *ptr) { #if CONFIG_MEMALIGN_HACK if (ptr) free((char *)ptr - ((char *)ptr)[-1]); #elif HAVE_ALIGNED_MALLOC _aligned_free(ptr); #else free(ptr); #endif }
1threat
c ++ code test if a inn value is in one of the hundred years (Ex: 1900, 1800 , 200) : <p>Does anyone know of a good code I can use for test if a value is one of the hundred years? </p> <p>Example: 1200 or 2000 or 2100 or 300.</p> <p>A easy one, so I dont have to write inn every year like this. </p> <p>The reason is ...
0debug
static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps) { #define HWACCEL_MAX (CONFIG_HEVC_DXVA2_HWACCEL + CONFIG_HEVC_D3D11VA_HWACCEL + CONFIG_HEVC_VAAPI_HWACCEL + CONFIG_HEVC_VDPAU_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts; switch (sps->pix_fmt) { c...
1threat
PermissionError: [Errno 13] Permission denied Flask.run() : <p>I am running MacOS X with python 3. The folder and files have 755 but I have also tested it in 777 with no luck. My question is if I have the right permissions why does it not let me run without sudo. Or are my settings incorrect?</p> <pre><code>cris-mbp:P...
0debug
static void encode_subband(SnowContext *s, SubBand *b, DWTELEM *src, DWTELEM *parent, int stride, int orientation){ encode_subband_c0run(s, b, src, parent, stride, orientation); }
1threat
golang append syntax error: missing statement after label : <pre><code> fmt.Print("Text to send: ") text, _ := readerConsole.ReadString('\n') sizen := (int)(unsafe.Sizeof(text)) fmt.Print(sizen) var bs []byte binary.BigEndian.PutUint32(bs, sizen) b := []byte(text) a: = append(bs, b...) ...
0debug
Installing python 3.6.4 : I'm trying to install python 3.6.4 on my new laptop with windows 8, but when I launch the IDLE, it shows me an error : "The program can't start because api-crt-runtime-|1-1-0.dll is missing from your computer". Can someone help me fix it??
0debug
How add my application content with description and preview to Google search results? : <p>I found this article: <a href="https://search.googleblog.com/2016/08/a-new-way-to-search-for-content-in-your.html" rel="nofollow noreferrer">A new way to search for content in your apps</a> and I'm really excited for this opportu...
0debug
How to do the AutoIncrement ID in php ajex : i am crating a simple crud system . i can increment the ID it working well stating from 0001 . but i need start from CS0001 i don't know how to do the task <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "loyalhospi...
0debug
av_cold void ff_vp8dsp_init_armv6(VP8DSPContext *dsp) { dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_armv6; dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_armv6; dsp->vp8_idct_add = ff_vp8_idct_add_armv6; dsp->vp8_idct_dc_add = ff_vp8_idct_dc_add_armv6; dsp->vp8_idct_dc_add4y = ff...
1threat
statement that executing code over and over : <p>I do not know how to do code that is executing over and over again. I would like to achieve something like this: (&lt; stands for input, > stands for output)</p> <pre><code>message=input() print('Write down the text.') </code></pre> <pre><code>&gt;Write down the text. ...
0debug
Linked list not working in c++ : <p>So i'm trying to get the linked list and this is my code so far. Everything look fine when i'm adding a node at the front of my list, but when i try to add my first node at the back, my code compile but return me -1. I'm not sure what's wrong with it but I know it's in the insertBack...
0debug
what is most efficient way to use sidebar menu? : So if i have to make have a sidebar menu like schools website, in which active clicked link is highlighted after the page loads.it uses individual pages like <a target="_top" href="default.asp">HTML HOME</a> <a target="_top" href="html_intro.asp">HTML In...
0debug
uint32_t HELPER(lpxbr)(CPUS390XState *env, uint32_t f1, uint32_t f2) { CPU_QuadU v1; CPU_QuadU v2; v2.ll.upper = env->fregs[f2].ll; v2.ll.lower = env->fregs[f2 + 2].ll; v1.q = float128_abs(v2.q); env->fregs[f1].ll = v1.ll.upper; env->fregs[f1 + 2].ll = v1.ll.lower; return set_...
1threat
How To Deserialize Generic Types with Moshi? : <p>Suppose we have this JSON:</p> <pre><code>[ { "__typename": "Car", "id": "123", "name": "Toyota Prius", "numDoors": 4 }, { "__typename": "Boat", "id": "4567", "name": "U.S.S. Constitution", "propulsion": "SAIL" } ] </code></pre> ...
0debug
static int compat_read(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples) { AVFilterBufferRef *buf; AVFrame *frame; int ret; if (!pbuf) return ff_poll_frame(ctx->inputs[0]); frame = av_frame_alloc(); if (!frame) return AVERROR(ENOMEM); if (!nb_sam...
1threat
void ff_put_h264_qpel16_mc21_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_midv_qrt_16w_msa(src - (2 * stride) - 2, stride, dst, stride, 16, 0); }
1threat
Determining the correct order in which jars should be compiled? : <p>we are given a set of jars, with dependencies over each other. How can we determine the correct ordering in which jars should be compiled?</p> <p>A->B and C</p> <p>B-> D and E</p> <p>D->E and C</p> <p>E->F</p> <p>F->C</p>
0debug
Why does c++ stick to this kind of symbol system? : <p>The system I mean is the one where anything you want to reference has to be prototyped or defined either above your current line or in a referenced header, not sure if this has a name. </p> <p>I'm cool with headers but sometimes the necessity of forward prototypes...
0debug
How to fix this? undefined method `links' for #<Mechanize::Image:0x120a7e38> (NoMethodError) : My spider script is stuck at this error: mySpiderScript.rb:119:in ` block (3 levels) in <main>': undefined method `links' for #<Mechanize::Image:0x120a7e38> (NoMethodError) Some code: page...
0debug
void qemu_spice_init(void) { QemuOpts *opts = QTAILQ_FIRST(&qemu_spice_opts.head); const char *password, *str, *x509_dir, *addr, *x509_key_password = NULL, *x509_dh_file = NULL, *tls_ciphers = NULL; char *x509_key_file = NULL, *x509_cert_file = NULL, *x509_ca...
1threat
static void read_storage_element1_info(SCLPDevice *sclp, SCCB *sccb) { ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) sccb; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); if ((mhd->standby_mem_size >> mhd->increment_size) >= 0x10000) { sccb->...
1threat
How can I do this? with bootstrap and css : I am trying to add a margin-top to a button in bootstrap but only if its inside the <form> tag and only if it has a class called formbutton, how can I do this? I have looked all over and nothing.
0debug
C++ Logging or a logger class that will print the log message with a custom prefix : I have a C++ project that has multiple classes. I want to streamline my logging process so that I can create some custom ostream object 'log' so that wherever I want to print a log message, I can write "log << my-message". The catch is...
0debug
one of our colleagues executed rm -rf /* command to one of our development servers : HELP!!! one of our colleagues executed `rm -rf /*` command to one of our development servers via SSH and most of our development sites were there. Is there any way to recover or rescue all those files? Please help. this is very very...
0debug
Fastest way to read new email from gmail : <p>What is the fastest way to read is any new gmail message? I want to refresh it in about 1 second delay. I'm using GMAIL.</p>
0debug
void s390x_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) { S390CPU *cpu = S390_CPU(cs); CPUS390XState *env = &cpu->env; if (retaddr) { cpu_restore_state(cs, r...
1threat
Retrieving xml nodes in c# using linq : i have xml like <century> <question>What is silvia</question> <answer>silvia is artificial intelligence</answer> <question>What is your name</question> <answer>my name is RAMESH</answer> </century> ihave multiple questions and an...
0debug
void helper_fcmp_eq_FT(CPUSH4State *env, float32 t0, float32 t1) { int relation; set_float_exception_flags(0, &env->fp_status); relation = float32_compare(t0, t1, &env->fp_status); if (unlikely(relation == float_relation_unordered)) { update_fpscr(env, GETPC()); } else { en...
1threat
static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, uint8_t *buf, int buf_size, int64_t wait_end) { RTSPState *rt = s->priv_data; RTSPStream *rtsp_st; int n, i, ret, timeout_cnt = 0; struct pollfd *p = rt->p; int *fds = NULL, fdsnum, fdsidx; ...
1threat
Run a background task from a controller action in asp.net core 2 : <p>I am developing a web application with a REST Api using C# with asp.net core 2.0</p> <p>What I want to achieve is when the client send a request to an endpoint I will run a background task separated from the client request context which will be ende...
0debug
static uint32_t qpi_mem_readl(void *opaque, target_phys_addr_t addr) { CPUState *env; env = cpu_single_env; if (!env) return 0; return env->eflags & (IF_MASK | IOPL_MASK); }
1threat
static int get_blocksize(BlockDriverState *bdrv) { uint8_t cmd[10]; uint8_t buf[8]; uint8_t sensebuf[8]; sg_io_hdr_t io_header; int ret; memset(cmd, 0, sizeof(cmd)); memset(buf, 0, sizeof(buf)); cmd[0] = READ_CAPACITY_10; memset(&io_header, 0, sizeof(io_header)); i...
1threat
How to shoot a moving object with hitboxes? IndexError: list index out of range Python 3.5.2 : I'm new to coding and I'm recreating space invaders for a school project. I've ran into a problem trying to get the bullet to hit one of the enemies to add and add score. I get the error "IndexError: list index out of range"....
0debug
iOS 10 compatibility to iOS 9 apps : <p>I have launched my iOS app written in swift 2.2 and supports iOS 9 and watch OS 2.2 in app store. iOS 10 is going to be released tomorrow. How will the app work on iOS 10 environment if any users upgrade to it till the app updates on iOS 10 support are pushed to app store?</p> ...
0debug
static int deband_8_coupling_c(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { DebandContext *s = ctx->priv; ThreadData *td = arg; AVFrame *in = td->in; AVFrame *out = td->out; const int start = (s->planeheight[0] * jobnr ) / nb_jobs; const int end = (s->planeheight[0] * (...
1threat
Hide NavigationBar when scrolling tableView in CollectionView? : <p>I have collectionViewController and collectionViewCell include TableView.CollectionView is horizontal layout.I want hide navigationbar when scroll the tableView. Is there any idea about that.</p>
0debug
Why this program is giving the output at -25 in spite of variables being unsigned integer : <p>1.The code defines the variables as unsigned integer however the output is shown negative.</p> <pre><code>#include&lt;stdio.h&gt; #include&lt;limits.h&gt; #include&lt;stdint.h&gt; int main(){ uint32_t a= 25,b=50; a =...
0debug