problem
stringlengths
26
131k
labels
class label
2 classes
static void coroutine_fn v9fs_write(void *opaque) { ssize_t err; int32_t fid; uint64_t off; uint32_t count; int32_t len = 0; int32_t total = 0; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; QEMUIOVector qiov_full; QEMUIO...
1threat
RUBY: How Can Either Convert A String Into A Hash or Add It Into A Hash : So in basic RUBY I am trying to figure out how to either Convert a string into a hash or put a string into a hash. I want the pokemon item as the key and a integer for the value. Something like this hash = {} pokemon_list = "pikachu chari...
0debug
Can someone answer for conversion in java? : Can someone guide me how to convert a string value(which is "15000000" to string "150.00"? what I am trying is : public static String truncate(String str, int length) { // Ensure String length is longer than requested size. str = str.trim(); if...
0debug
operator overload to preety print enum class : <p>I am trying to print the enum class(will use some kind of map to print car, house).</p> <p>In below code where should I stick the function to operator overload &lt;&lt; ?</p> <p>PS: this is a contrived example.</p> <pre><code>#include &lt;iostream&gt; #include &lt;ve...
0debug
Im a bit of noob, i want to change the title text to an image : I need some help. i want to change the following text logo into a logo, currently used by a theme on wordpress It looks like this now:[header image on website][1] any suggestions, my logo is currently on the server at: content/uploads/2016/07/cropped...
0debug
IndexError: index 151 is out of bounds for axis 0 with size 151 : help me with error please? and how to save the output from print function to dataframe? from haversine import haversine import pandas as pd dataframe = pd.read_csv("gpsdataedit.csv", delimiter = None) dataset = dataframe.val...
0debug
How to rename actors in draw.io : <p>I am using draw.io online tool for drawing UML diagrams. When I am dragging an Actor from left panel to the canvas, there I found no options to rename the actor. For example I want to rename the default label 'Actor' to 'User' but no luck. How to rename an Actor?</p> <p><a href="ht...
0debug
node.js How recieve field value? : with node.js i create server. Than i build http form on the specific adress(i gona do diferent form for diferent adress). I want to recieve data from the user in specific field(i give them diferent ID). But I cant recieve it like: document.getElementById() becouse DOM in node....
0debug
how i can support more than one pattern @ datetimeformat : [enter image description here][1] [1]: https://i.stack.imgur.com/Qv1G2.jpg how i can support more than one pattern like yyyyMMdd and yyyy-MM-dd
0debug
How to properly mask a numpy 2D array? : <p>Say I have a two dimensional array of coordinates that looks something like</p> <p><code>x = array([[1,2],[2,3],[3,4]])</code></p> <p>Previously in my work so far, I generated a mask that ends up looking something like</p> <p><code>mask = [False,False,True]</code></p> <p>...
0debug
How to run multiple functions inside a foreach loop : <p>I would like to run a foreach loop with three functions inside of it but only the first function runs.</p> <p>Here is my code</p> <pre><code>function import_events() { global $wpdb; $query_name = $wpdb-&gt;prefix . 'options'; $options = $wpdb-&gt;get_re...
0debug
My html and css are not linking ( i have searched everything and i cant solve this) : <p>I recently started learning HTML and CSS. I've been trying to link my css for hours. I've searched more than 10 forums but nothing seems to be solving my issue. Ive tried to change the order of the [href="stylesheet.css" rel="style...
0debug
How to solve the red line's of taskSnapshot : [How to solve the red line's problem]How to solve the red line's problem of taskSnapshots[1] [1]: https://i.stack.imgur.com/e72l1.png
0debug
static void emulate_spapr_hypercall(PPCVirtualHypervisor *vhyp, PowerPCCPU *cpu) { CPUPPCState *env = &cpu->env; if (msr_pr) { hcall_dprintf("Hypercall made with MSR[PR]=1\n"); env->gpr[3] = H_PRIVILEGE; } else { env->gpr[3] = spapr_hypercall(cpu, ...
1threat
static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt) { CDXLDemuxContext *cdxl = s->priv_data; AVIOContext *pb = s->pb; uint32_t current_size, video_size, image_size; uint16_t audio_size, palette_size, width, height; int64_t pos; int ret; if (pb->eof_reached) ...
1threat
static int proxy_opendir(FsContext *ctx, V9fsPath *fs_path, V9fsFidOpenState *fs) { int serrno, fd; fs->dir = NULL; fd = v9fs_request(ctx->private, T_OPEN, NULL, "sd", fs_path, O_DIRECTORY); if (fd < 0) { errno = -fd; return -1; } fs->dir = fd...
1threat
static void fw_cfg_bootsplash(FWCfgState *s) { int boot_splash_time = -1; const char *boot_splash_filename = NULL; char *p; char *filename, *file_data; int file_size; int file_type = -1; const char *temp; QemuOptsList *plist = qemu_find_opts("boot-opts"); QemuOpts *...
1threat
document.getElementById('input').innerHTML = user_input;
1threat
Cannot concatenate 'str' and 'int' objects. Python : <pre><code>if int(gtin) == barcode[1]: print "You have ordered", item[1] **quantity1 = raw_input("Please select a quantity of 100mm bolts") quantitybolt = int(quantity1) quantity1 += quantitybolt** </code></pre> <p>TypeError:cannot concatenate 'str' ...
0debug
dyld: Library not loaded SwiftUI when app runs on iOS 12 using @available(iOS 13.0, *) : <p>I decided to implement a few views using SwiftUI in my app. The app is backwards compatible to iOS 12.</p> <p>Everything works perfectly until I run it on an iOS 12 device. The app crashes immediately and the warning I get says...
0debug
How to join tables on values : Table 1: Col A | Col B | Col C | Col D Cat 1 | Bla a | C-1 | D-1 Cat 1 | Bla a | C-2 | D-2 Cat 1 | Bla a | C-3 | D-3 Cat 2 | Bla b | C-4 | D-4 Cat 2 | Bla b | C-5 | D-5 Table 2: Col A | Col B | Col E Cat 1 | Bla a | E-1 Cat 2 | Bla b | E-2 ...
0debug
3 variables (collumns) to be combined in 1 variable (collumn) : [1] click on the photo to see the demo data Either in Excel or in SPSS To combine the 3 colluns into 1 and to be able then to calculate the statistics of the collumn. Mean Median Moden Frequencies and all these. Anny help would be appreciated. Thank ...
0debug
static int get_packet_size(const uint8_t *buf, int size) { int score, fec_score, dvhs_score; if (size < (TS_FEC_PACKET_SIZE * 5 + 1)) return AVERROR_INVALIDDATA; score = analyze(buf, size, TS_PACKET_SIZE, NULL); dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL); fec_...
1threat
R: Handling of sf objects in raster package : <p>Previously I was using <code>raster::crop</code> and <code>raster::mask</code> with shapefiles of class Spatial*, read in using <code>rgal::readOGR</code>. </p> <p>I am just "upgrading" my scripts to use <code>sf</code> for reading and manipulating polygons. </p> <h3>r...
0debug
SQL server 2008 : When I attempt to restore the back up (.bak 1,32GO) database into SQL server 2008 .I get the following message:CREATE DATABASE or ALTER DATABASE failed because the cumulative size of the resulting database will exceed the license limits of 4096 MB per database Any suggestion?
0debug
Creating a catalogue template : <p>I'm making my first steps learning to code. I have been taking some courses on internet about css, html, javascript, php and mysql. Since some months ago I decided to continue learning while I experiment with wordpress.</p> <p>As a beginner I always start watching templates, which I ...
0debug
how to make video stabilizer? : <p>I'm new at this topic. All i want is some information about video stabilization that how it works and how we can develop a software to stabilize a video, also is there any site which provides a detailed study about video stabilization ? Hoping for a helpful answer.</p>
0debug
static int ape_tag_read_field(AVFormatContext *s) { AVIOContext *pb = s->pb; uint8_t key[1024], *value; uint32_t size, flags; int i, c; size = avio_rl32(pb); flags = avio_rl32(pb); for (i = 0; i < sizeof(key) - 1; i++) { c = avio_r8(pb); if (c < 0x20 || c > 0x7...
1threat
Hug subviews in SwiftUI : <p>Dave Abrahams explained some of the mechanics of SwiftUI layouts in his WWDC19 talk about Custom Views, but he left out some bits and I have trouble getting my views properly sized. </p> <p><strong>Is there a way for a View to tell its container that it is not making any space demands, but...
0debug
document.write('<script src="evil.js"></script>');
1threat
Is there any solution to use only 1 findViewById in different method : I have 2 different method. Method a will display textview1. Method b also will display textview1. Both method I need to include findViewById(R.id.textview1). When I am doing like this, I need to put twice findViewById in the code.
0debug
If String array contains a specific string : I have a string array(String []words) which gets populated during runtime and contains almost 400k members. I tried to check if the array contains a specific string : boolean check=Arrays.asList(words).contains ("code"); I know the "code" is already within the array, ...
0debug
Simple way to use looping in java : <p>This is example for my looping code:</p> <pre><code>int outsideLoop = 0; for (int i = 1; i &lt; 11; i++) { outsideLoop += i; System.out.println("Count is: " + i); } System.out.println("Outside loop is: " + outsideLoop); </code></pre> <p>My friend is said that using <code...
0debug
Failed to resolve target intent service, Error while delivering the message: ServiceIntent not found : <p>I try to make <strong>gcm</strong> work.</p> <p>When our server sends a push notification I got these two errors in my app's log:</p> <blockquote> <p>E/GcmReceiver(8049): Failed to resolve target intent service...
0debug
static void test_visitor_out_native_list_int(TestOutputVisitorData *data, const void *unused) { test_native_list(data, unused, USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER); }
1threat
canvas to WebGL : <p>I tried to study WebGL, but I have nothing. I do not want to use the library, they are too big. I wrote what I want on the canvas, help me to do it on WebGL</p> <p><a href="https://jsfiddle.net/g9tx903c/" rel="nofollow">https://jsfiddle.net/g9tx903c/</a></p> <pre><code>&lt;canvas id="canvas" widt...
0debug
static av_cold int vp9_decode_free(AVCodecContext *ctx) { VP9Context *s = ctx->priv_data; int i; for (i = 0; i < 2; i++) { if (s->frames[i].tf.f->data[0]) vp9_unref_frame(ctx, &s->frames[i]); av_frame_free(&s->frames[i].tf.f); } for (i = 0; i < 8; i++) { ...
1threat
void ff_avg_h264_qpel8_mc22_msa(uint8_t *dst, const uint8_t *src, ptrdiff_t stride) { avc_luma_mid_and_aver_dst_8w_msa(src - (2 * stride) - 2, stride, dst, stride, 8); }
1threat
static void hmp_handle_error(Monitor *mon, Error **errp) { if (error_is_set(errp)) { monitor_printf(mon, "%s\n", error_get_pretty(*errp)); error_free(*errp); } }
1threat
static int amr_nb_decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t * buf, int buf_size) { AMRContext *s = avctx->priv_data; uint8_t*amrData=buf; int offset=0; UWord8 toc, q, ft; Word16 serial[SERIAL_FRAMESIZE]; Word16 *synth; UWord...
1threat
def find(n,m): q = n//m return (q)
0debug
int kvm_arch_remove_hw_breakpoint(target_ulong addr, target_ulong len, int type) { return -EINVAL; }
1threat
void qemu_unregister_reset(QEMUResetHandler *func, void *opaque) { QEMUResetEntry *re; TAILQ_FOREACH(re, &reset_handlers, entry) { if (re->func == func && re->opaque == opaque) { TAILQ_REMOVE(&reset_handlers, re, entry); qemu_free(re); return; } ...
1threat
static void gen_arith (CPUState *env, DisasContext *ctx, uint32_t opc, int rd, int rs, int rt) { const char *opn = "arith"; TCGv t0 = tcg_temp_local_new(TCG_TYPE_TL); TCGv t1 = tcg_temp_local_new(TCG_TYPE_TL); if (rd == 0 && opc != OPC_ADD && opc != OPC_SUB && opc ...
1threat
int rom_add_file(const char *file, const char *fw_dir, const char *fw_file, target_phys_addr_t addr) { Rom *rom; int rc, fd = -1; rom = qemu_mallocz(sizeof(*rom)); rom->name = qemu_strdup(file); rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name); if (rom->path ...
1threat
How to exclude year from date? : <p>I'm trying to take a year out of today's date to be able to make some simple calculations with age. Something like if I would like to know in what year somebody gonna be 100 years old if I know their age. Would appreciate some help.</p>
0debug
static int qsv_get_buffer(AVCodecContext *s, AVFrame *frame, int flags) { InputStream *ist = s->opaque; QSVContext *qsv = ist->hwaccel_ctx; int i; for (i = 0; i < qsv->nb_surfaces; i++) { if (qsv->surface_used[i]) continue; frame->buf[0] = av_buffer_create((uint8...
1threat
cursor.execute('SELECT * FROM users WHERE username = ' + user_input)
1threat
static int qemu_laio_process_requests(void *opaque) { struct qemu_laio_state *s = opaque; struct qemu_laiocb *laiocb, *next; int res = 0; QLIST_FOREACH_SAFE (laiocb, &s->completed_reqs, node, next) { if (laiocb->async_context_id == get_async_context_id()) { qemu_laio_process...
1threat
int qemu_loadvm_state(QEMUFile *f) { LIST_HEAD(, LoadStateEntry) loadvm_handlers = LIST_HEAD_INITIALIZER(loadvm_handlers); LoadStateEntry *le, *new_le; uint8_t section_type; unsigned int v; int ret; v = qemu_get_be32(f); if (v != QEMU_VM_FILE_MAGIC) return -EINVAL...
1threat
How to trigger a button multiple times in jQuery : currently i clone or duplicate a div on button click it works perfectly. but the problem is that i also want to duplicate a div according to url parameters value for example (localhost/app/index-2.html?zipCode=78001&**empNo=15**) if empNo= 3 then clone 3 time , els...
0debug
Google Beacon Not Recognized : <p>I recently received 2 Beacons from Google for my small business. I followed the installation instructions that came in the box. To activate it, I followed the link in the box, which brought me to a Google form page to enter in the activation code. I then downloaded the Beacon tools ap...
0debug
static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { AC3DecodeContext *ctx = (AC3DecodeContext *)avctx->priv_data; ac3_audio_block *ab = &ctx->audio_block; int frame_start; int i, j, k, l, value; float tmp_block_first_half[128], tmp_bloc...
1threat
static void netfilter_finalize(Object *obj) { NetFilterState *nf = NETFILTER(obj); NetFilterClass *nfc = NETFILTER_GET_CLASS(obj); if (nfc->cleanup) { nfc->cleanup(nf); } if (nf->netdev && !QTAILQ_EMPTY(&nf->netdev->filters) && nf->next.tqe_prev) { QTAILQ_REMOVE(...
1threat
How can I create Android Intent with Action on Google(android assistant)? : <p>I want to create Android Intent with Google Assistant. I'll ask "Ok Google, show me some specific information from my app" and google assistant should open my app via Android intent. Anyone faced with this issue?</p>
0debug
static int usb_bt_initfn(USBDevice *dev) { struct USBBtState *s = DO_UPCAST(struct USBBtState, dev, dev); s->dev.speed = USB_SPEED_HIGH; return 0; }
1threat
How do you get the HTTP host with Laravel 5 : <p>I'm trying to get the hostname from an HTTP request using Laravel 5, including the subdomain (e.g., <code>dev.site.com</code>). I can't find anything about this in <a href="https://laravel.com/docs/5.3/requests#request-path-and-method" rel="noreferrer">the docs</a>, but ...
0debug
static int decode_seq_header(AVSContext *h) { MpegEncContext *s = &h->s; int frame_rate_code; int width, height; h->profile = get_bits(&s->gb,8); h->level = get_bits(&s->gb,8); skip_bits1(&s->gb); width = get_bits(&s->gb,14); height = ...
1threat
Switch node_modules folder when I change git branch : <p>I'm working with two branches, <code>master</code> and <code>feature-1</code></p> <p>In the master branch I'm using a lib <code>xyz@1.0</code></p> <p>In the branch <code>feature-1</code> I've installed a new version from lib <code>xyz</code> version <code>2.0<...
0debug
Git commit count a day : <p>I have a branch called <code>development</code>. Now I want to know how many commits are happened per day (i.e) each day.</p> <p>I want Toal number of commits (i.e) count of commits in a day.</p> <p>I tried this command, but it is giving all commits count from the branch</p> <pre><code>g...
0debug
static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr, int idx) { OpenPICState *opp = opaque; IRQ_src_t *src; IRQ_dst_t *dst; uint32_t retval; int n_IRQ; DPRINTF("%s: cpu %d addr " TARGET_FMT_plx "\n", __func__, idx, addr); r...
1threat
Since List is an interface and how we are creating instance without any anonymous class : <p>In java collections, Since List is an interface and how the "new" keyword is used to declare it without any anonymous class.</p> <p>Please explain how the following line works. List listTry= new ArrayList();</p> <p>How the in...
0debug
Convert TimeStamp String to DayName-Month-year at 4:00 pm in android? : <p>i am stuck at this ,i have timestamp as string variable , and i want to convert it to this pattern DayName-Month-year at 04:00 pm ,the problem is i am targeting older version of android so when use SimpleDateFormat it shows error as required hi...
0debug
void cpu_watchpoint_remove_all(CPUState *env, int mask) { CPUWatchpoint *wp, *next; TAILQ_FOREACH_SAFE(wp, &env->watchpoints, entry, next) { if (wp->flags & mask) cpu_watchpoint_remove_by_ref(env, wp); } }
1threat
static void aux_register_types(void) { type_register_static(&aux_bus_info); type_register_static(&aux_slave_type_info); type_register_static(&aux_to_i2c_type_info); }
1threat
How to add claims in a mock ClaimsPrincipal : <p>I am trying to unit test my controller code which gets the information from the ClaimsPrincipal.Current. In the controller code I</p> <pre><code>public class HomeController { public ActionResult GetName() { return Content(ClaimsPrincipal.Current.FindFirst("...
0debug
Location of .bashrc in linux : <p>I made some changes in the <code>.bashrc</code> file some time ago. In which directory is this file supposed to be located exactly?</p>
0debug
AWS Application Load Balancer transforms all headers to lower case : <p>I've a REST API application running in two EC2 instance and was using AWS Classic Load Balancer for a long time. The clients of REST API rely on the response headers (e.g. such as <code>Location</code>). </p> <p>I know that HTTP headers are case-i...
0debug
Cannot deserialize value of type `java.util.Date` from String : <p>Using Spring 1.5.8.RELEASE Jackson mapper giving the following exception.</p> <pre><code>Cannot deserialize value of type `java.util.Date` from String "2018-09-04T10:44:46": expected format "yyyy-MM-dd'T'HH:mm:ss.SSS" </code></pre> <p>at [Source: UNKN...
0debug
To Wirte Junit Test Case for generic array : > I am new to Junit , kindly let me know how can I write a test case the below method which generic. public <T> T getValueAtIndex(int i) { return (T) values[i]; }
0debug
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { AVFrame *frame = data; const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; ZmbvContext * const c = avctx->priv_data; int zret = Z_OK; int len = buf_size; int hi_ver, lo_ver, ret; ...
1threat
How to make Paging library work with reverse recyclerview? : <p>How to use the latest paging with endless reverse recyclerview for the purpose of chat?</p> <p>I have linear layout with reverse layout true:</p> <pre><code>LinearLayoutManager layoutManager = new LinearLayoutManager(this); layoutManager.setReverseLayout...
0debug
swap tensor axis in keras : <p>I want to swap tensor axis of image batches from (batch_size, row, col, ch) to (batch_size, ch, row, col). </p> <p>in numpy, this can be done with </p> <pre><code>X_batch = np.moveaxis( X_batch, 3, 1) </code></pre> <p>How would I do that in Keras? </p>
0debug
Is the call to super(props) in an ES6 class important? : <p>Suppose I've the following class:</p> <pre><code>class Tabs extends React.Component { displayName: Tabs; static propTypes = { selected: React.PropTypes.number, children: React.PropTypes.oneOfType([ React.PropTypes.array, React.PropTypes.eleme...
0debug
logical operators in C C+ K&R (Polish Reverse Calculator) : int getop(char s[]) { int i, c; while ((s[0] = c = getch()) == ' ' || c == '\t') ; s[1] = '\0'; i = 0; if (isalpha(c)) //math function found. { while (isalpha(s[++i] = c = getch())) ; ...
0debug
Why the decrypted key is not the same as the encrypted key? : I wrote function to encrypt or to decrypt a word Why the decrypted key is not the same as the encrypted key ? function cryptage(action, password) { var method = "AES-256-CBC"; if(action=="encrypt") { var cipher = crypto...
0debug
int qcow2_snapshot_delete(BlockDriverState *bs, const char *snapshot_id) { BDRVQcowState *s = bs->opaque; QCowSnapshot sn; int snapshot_index, ret; snapshot_index = find_snapshot_by_id_or_name(bs, snapshot_id); if (snapshot_index < 0) { return -ENOENT; } sn = s->snap...
1threat
static uint16_t qvirtio_pci_config_readw(QVirtioDevice *d, uint64_t off) { QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; uint16_t value; value = qpci_io_readw(dev->pdev, CONFIG_BASE(dev) + off); if (qvirtio_is_big_endian(d)) { value = bswap16(value); } return value; }
1threat
how to get numbers from a string in java script : I have a variable which it contains a telephone number in a sentence, to know it better it is like this `"tel1": "Tél: 01.78.99.93.06",` now I need to get just numbers and put in another variable the out put should be like this `var nom="0178999306"` how I can do it wi...
0debug
Why do glob.glob and pathlib.Path.glob treat hidden files differently? : <p>Consider this folder containing two files:</p> <pre><code>test/ foo .bar </code></pre> <p>Calling <a href="https://docs.python.org/3/library/glob.html#glob.glob" rel="noreferrer"><code>glob.glob('*')</code></a> on this folder won't li...
0debug
How do I loop a statement til condition is met ?Java : <pre><code> Scanner scanner = new Scanner(System.in); System.out.println("1. Do you like computers?"); String input = scanner.nextLine(); if (input.equals("no")) { System.out.println("You should!"); if (input.equals("yes")){ ...
0debug
db.execute('SELECT * FROM employees WHERE id = ' + user_input)
1threat
bool qemu_net_queue_flush(NetQueue *queue) { while (!QTAILQ_EMPTY(&queue->packets)) { NetPacket *packet; int ret; packet = QTAILQ_FIRST(&queue->packets); QTAILQ_REMOVE(&queue->packets, packet, entry); ret = qemu_net_queue_deliver(queue, ...
1threat
Singleton Class or Class with only static fields? : <p>what is the better approach? </p> <p>Let us assume a scenario in which there is a utility class that is used by other classes. What is better to use in this case, a singleton class which can be instantiated exactly once or should i make all the fieds static?</p>
0debug
JAVA Ask user to enter word until they enter "exit" : Ask user to enter word until they enter "exit", when they enter exit display all of their entered words without the "exit". I'm confused how to combine all of their words and display it at the end, I know I will need another loop for that import java.util.*; ...
0debug
Python loops and dinamic stacks : I know that the titel is very unspecific, but that`s because I don´t even know right now how to articulate my question. My problem is the following: I want to creat a loop. This loop is supposed to do an iteration. The only thing I need is the last Iteration it does. I was wonde...
0debug
Trouble Indexing with a Multi-index in Pandas : The following example from the docs works as expected: s = pd.Series([1, 2, 3, 4, 5, 6],index=pd.MultiIndex.from_product([["A", "B"], ["c", "d", "e"]])) s['A'] c 1 d 2 e 3 However, for this example, from my data, such indexing ra...
0debug
code ran into segmentation fault error.how to fix? : <p>The attached image is the code on hackerrank for a problem i dont know why but it runs into segmentation fault error.Please help me to fix this problem.<a href="https://i.stack.imgur.com/ezoLQ.png" rel="nofollow noreferrer">Code</a> The error shown is in this link...
0debug
Ordering numbers by random : <p>i have some list with 5 numbers (exp. 1 2 3 4 5) i want to order them in random ordering each time (page refresh) examples: (2 4 3 1 5) (1 3 5 4 2) (5 1 2 3 4)... code in C#, Thanks</p> <pre><code>var loadcards = (from card in db.GameCards select card).Take(5).ToLis...
0debug
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len) { if (len > 6) { if (AV_RB32(data) == 0x00000001 || AV_RB24(data) == 0x000001) { uint8_t *buf=NULL, *end, *start; uint32_t sps_size=0, pps_size=0; uint8_t *sps=0, *pps=0; ...
1threat
How to fix MySQL State [2002] Database "Connection Refused " C panel : i am setting a new live server for my Laravel application its work perfectly on localhost but not on live server. Now its showing SQL State [2002] connection refused. i also try with mysqli_connect and PDO but error remains same. <?php $...
0debug
why is the value of b when printed 23 and not 46? : var a = 23; var b = a; a = 46; console.log(a); console.log(b); **why is the value of b when printed 23 and not 46 ? O/P : a=46, b=23, why? **
0debug
Cannot resolve symbol ViewModelProviders on AppCompatActivity : <p>Hey I'm trying to get my ViewModel working, but no luck so far. Android Studio shows error <code>Cannot resolve symbol 'ViewModelProviders'</code>. </p> <p>Every other question I found on this topic was correcting <code>extends Activity</code> to <cod...
0debug
Is it possilbe in Git to simutaneously create a local branch that tracks a currently non-existing remote branch AND switch to it all at the same time? : **I want a yes or no answer to this one guys!** I've tried this command which the official Git documentation says should work, with respect to the question I am as...
0debug
Angular 4 - Error: formControlName must be used with a parent formGroup directive : <p>I am adding <code>form</code> input fields using component -</p> <p><em>engine-add-contact-form.html</em></p> <pre><code>&lt;form (ngSubmit)="onSubmit()" [formGroup]="contact_form"&gt; &lt;md-tab-group&gt; &lt;md-tab label="For...
0debug
Is there a way to call a function stored as a property using bracket notation in JS? : <p>I am building an object that contains properties where the key is a string and the value is a function. I understand that if the key was not a string, I could use dot notation to call this function. For example:</p> <pre><code>co...
0debug
document.getElementById('input').innerHTML = user_input;
1threat
static int virtio_scsi_parse_req(VirtIOSCSIReq *req, unsigned req_size, unsigned resp_size) { VirtIODevice *vdev = (VirtIODevice *) req->dev; size_t in_size, out_size; if (iov_to_buf(req->elem.out_sg, req->elem.out_num, 0, &req->req, req_size) < re...
1threat
Split string into array based on delimiters, using Regex? : <p>I am trying to split the following string:</p> <pre><code>s = "Whyy noot this thing? Noot!" </code></pre> <p>into an array using the following delimiters:</p> <pre><code>delimiters = [ ' ', '?', '!' ]; </code></pre> <p>I believe that I can u...
0debug
create table sql in access : this is my query in sql it seems to say i have a syntax error im used to coding in sql server not access fo i expected this outcome if anyone could help me correct my code id really apprisiate it create table M ( NMR_METER_PT_REF Varchar (50) , NMR_ST_METER_READ_DATE D...
0debug