problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
How to delete lines in a file based on an the indices in a list : I have a txt file which is of this format:
1 2 [2, 3, 5]
2 5 [3, 4]
5 6 [4, 5]
4 9 [1, 6]
I need to write a programme such that it would delete the lines having the first column equals to the indices in the list of each line. but, ... | 0debug |
from itertools import groupby
def group_element(test_list):
res = dict()
for key, val in groupby(sorted(test_list, key = lambda ele: ele[1]), key = lambda ele: ele[1]):
res[key] = [ele[0] for ele in val]
return (res)
| 0debug |
static av_cold int cuvid_decode_init(AVCodecContext *avctx)
{
CuvidContext *ctx = avctx->priv_data;
AVCUDADeviceContext *device_hwctx;
AVHWDeviceContext *device_ctx;
AVHWFramesContext *hwframe_ctx;
CUVIDPARSERPARAMS cuparseinfo;
CUVIDEOFORMATEX cuparse_ext;
CUVIDSOURCEDATAPACKET seq_... | 1threat |
Union Two DataFrames of Different Types Spark : In my recent project, i need to union two dataframes of different sizes.
For example:
Here is my sample data:
df1:
name number address
kevin 101 NZ
gevin 102 CA
here all the fields are of type String.
df2:
name number add... | 0debug |
Why can't I cast a function pointer to (void *)? : <p>I have a function that takes a string, an array of strings, and an array of pointers, and looks for the string in the array of strings, and returns the corresponding pointer from the array of pointers. Since I use this for several different things, the pointer arra... | 0debug |
Working with variables within javascript console.log function : <p>I am seeing sort of strange behaviour with javascript. I am new to this language, but from what I can see, if you increment a variable (or change it in any way) from within a console.log() method, this actually globally changes the variable.</p>
<pre><... | 0debug |
RSpec: Is there a not for `and change`, e.g. `and_not to change`? : <p>I find the <code>.and</code> method very useful for chaining many expectations.</p>
<pre><code>expect {
click_button 'Update Boilerplate'
@boilerplate_original.reload
} .to change { @boilerplate_original.title }.to('A new boilerplate')
.and ... | 0debug |
How to Change Html Element Text Using CSS - Help a Brother Out : all! I hope i can make myself as clear as possible, I'm a real newbie when it comes to CSS and HTML, but I'm trying my best searching on the net.
I'm trying to translate a website using Google Inspect and save the changes on my pc. So far I've been abl... | 0debug |
void ff_xvmc_decode_mb(MpegEncContext *s)
{
XvMCMacroBlock *mv_block;
struct xvmc_pix_fmt *render;
int i, cbp, blocks_per_mb;
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if (s->encoding) {
av_log(s->avctx, AV_LOG_ERROR, "XVMC doesn't support encoding!!!\n");
ret... | 1threat |
Why have confliting properties for the same class? : I am examining a third party CSS file, and I am coming across the same class that has the same property set multiple times but with different values each time, I cannot figure out why this is, could someone please shed some light on this?
Example below, the `vert... | 0debug |
How to derived a new column using value_counts for one column with another columns : <p>I have dataframe which consists with many columns. </p>
<pre><code>df2
TargetDescription Output_media_duration
0 VMN 4.0 16x9 25 - 1920x1080, 1280x720, 960x540... NaN
1 VMN 4.0 16x9 25 - 1... | 0debug |
Variable in loop on Python don't change : <p>I can't understand why in loop variable don't change, but I explicitly try it. So here is my code:</p>
<pre><code>a=[1,2,3]
b=["a","b","c"]
d=[a,b]
for i in d:
for a in i:
a*2
print(a)
</code></pre>
<p>And when I run I see :</p>
<pre><code>1
2
3
a
b
... | 0debug |
static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp)
{
int idx = 0;
BlockBackend *new_blk = NULL;
Error *local_err = NULL;
char *desc = NULL;
int64_t total_size = 0, filesize;
char *adapter_type = NULL;
char *backing_file = NULL;
char *hw_version = NULL;
... | 1threat |
static void fill_caches(H264Context *h, int mb_type, int for_deblock){
MpegEncContext * const s = &h->s;
const int mb_xy= h->mb_xy;
int topleft_xy, top_xy, topright_xy, left_xy[2];
int topleft_type, top_type, topright_type, left_type[2];
int * left_block;
int topleft_partition= -1;
in... | 1threat |
AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
URLContext *handle, int packet_size)
{
AVFormatContext *rtpctx;
int ret;
AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
if (!rtp_format)
return NULL;
... | 1threat |
Locking scroll position in FlatList (and ScrollView) : <p>I'm trying to create a FlatList that keeps the current scroll position locked and does not change by new items that are inserted at the top of the list.</p>
<p>I've created an <a href="https://snack.expo.io/ryUcWZ1fW" rel="noreferrer">expo snack</a> to demonstr... | 0debug |
static int send_extradata(APNGDemuxContext *ctx, AVPacket *pkt)
{
if (!ctx->extra_data_updated) {
uint8_t *side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, ctx->extra_data_size);
if (!side_data)
return AVERROR(ENOMEM);
memcpy(side_data, ctx->extra_data, c... | 1threat |
static int adaptive_cb_search(const int16_t *adapt_cb, float *work,
const float *coefs, float *data)
{
int i, best_vect;
float score, gain, best_score, best_gain;
float exc[BLOCKSIZE];
gain = best_score = 0;
for (i = BLOCKSIZE / 2; i <= BUFFERSIZE; i++) {
... | 1threat |
Check if value tuple is default : <p>How to check if a System.ValueTuple is default? Rough example:</p>
<pre><code>(string foo, string bar) MyMethod() => default;
// Later
var result = MyMethod();
if (result is default){ } // doesnt work
</code></pre>
<p>I can return a default value in <code>MyMethod</code> using... | 0debug |
python decimal shift customize : I am pretty new to python.
I have a question about how to shift decimal based on demand.
There is a list of amount which have two distinc values(option, amount).
The option has three numbers 0, 1, 2.
0 means that you should shift the decimal over zero spaces (there is no amount... | 0debug |
static int parse_tonal(DCALbrDecoder *s, int group)
{
unsigned int amp[DCA_LBR_CHANNELS_TOTAL];
unsigned int phs[DCA_LBR_CHANNELS_TOTAL];
unsigned int diff, main_amp, shift;
int sf, sf_idx, ch, main_ch, freq;
int ch_nbits = av_ceil_log2(s->nchannels_total);
for (sf = 0; sf < 1 << ... | 1threat |
static off_t read_off(int fd, int64_t offset)
{
uint64_t buffer;
if (pread(fd, &buffer, 8, offset) < 8)
return 0;
return be64_to_cpu(buffer);
}
| 1threat |
Error launching application on Android SDK built for x86 : <p>There are a least a dozen previously compiled and running flutter applets that suddenly will not compile under Android Studio or Intellij.</p>
<p>Even if i build a new default Flutter app i get this crash error:</p>
<p>Clearly something has changed .. plug... | 0debug |
check key is present in python dictionary : <p>Below is the "data" dict</p>
<pre><code>{' node2': {'Status': ' online', 'TU': ' 900', 'Link': ' up', 'Port': ' a0a-180', 'MTU': ' 9000'}, ' node1': {'Status': ' online', 'TU': ' 900', 'Link': ' up', 'Port': ' a0a-180', 'MTU': ' 9000'}}
</code></pre>
<p>I am trying key n... | 0debug |
static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf,
int buf_size, void *data)
{
SVQ1Context * const s = avctx->priv_data;
AVFrame *pict = data;
AVFrame * const p= (AVFrame*)&s->picture;
AVFrame temp;
int i;
if(avctx->pix_fmt != PIX_FMT_YUV410P){
av_log... | 1threat |
How to interpret mysqldump output? : <p>My intent is to extract the triggers, functions, and stored procedures from a database, edit them, and add them to another database.</p>
<p>Below is a partial output from <code>mysqldump</code>. I understand how the database is updated with the <code>DROP</code>, <code>CREATE</... | 0debug |
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
{
AVStream *stream = fmt_ctx->streams[stream_idx];
AVCodecContext *dec_ctx;
AVCodec *dec;
char val_str[128];
AVRational display_aspect_ratio;
struct print_buf pbuf = {.s = NULL};
print_section_heade... | 1threat |
static int mpegts_init(AVFormatContext *s)
{
MpegTSWrite *ts = s->priv_data;
MpegTSWriteStream *ts_st;
MpegTSService *service;
AVStream *st, *pcr_st = NULL;
AVDictionaryEntry *title, *provider;
int i, j;
const char *service_name;
const char *provider_name;
int *pids;
i... | 1threat |
GCP load balancer backend status unknown : <p>I'm flabbergasted.</p>
<p>I have a staging and production environment. Both environments have the same deployments, services, ingress, firewall rules, and both serve a <code>200</code> on <code>/</code>. </p>
<p>However, after turning on the staging environment and provis... | 0debug |
Regular Expression For Parsing JSON Objects : <p>I have a Json file containing text as such:</p>
<pre><code>{
title1: {
x: "abc",
y: "def"
} ,
title2:{
x: "{{abc}}",
y: "{{def}}"
},
}
</code></pre>
<p>I want to first get the title1 title2 ,... groups. And after that, f... | 0debug |
static void flush_packet(AVFormatContext *ctx, int stream_index, int last_pkt)
{
MpegMuxContext *s = ctx->priv_data;
StreamInfo *stream = ctx->streams[stream_index]->priv_data;
uint8_t *buf_ptr;
int size, payload_size, startcode, id, len, stuffing_size, i, header_len;
int64_t timestamp;
u... | 1threat |
View is not rerendered in Nested ForEach loop : <p>I have the following component that renders a grid of semi transparent characters:</p>
<pre class="lang-swift prettyprint-override"><code> var body: some View {
VStack{
Text("\(self.settings.numRows) x \(self.settings.numColumns)")
F... | 0debug |
How to connect to a unknown secure wifi network via cmd : <p>I want to know if there is some possibility to connect to a unknow secure wifi network? Because right know I tried something but apparently I just connect to the wifi network that I connected until now. </p>
<p>something like this: netsh wlan connect wifi_na... | 0debug |
How to mapping an array to another array in efficient way : <p>For these 4 array,
a1 a2 a3 </p>
<pre><code>a1 = [5,3,0,2,4,2,...,...]
a2 = [5,3,0,2,4,2,...,...] => store index number, correspond value is in b
a3 = [5,3,0,2,4,2,...,...]
b = [250,300,1,2,70,23,...,...]
</code></pre>
<p>I want to find an efficient... | 0debug |
mysqli_query(): MySQL server has gone away : <p>I'm getting these errors:</p>
<pre><code>Warning: mysqli_query(): MySQL server has gone away in (local db)
Warning: mysqli_query(): Error reading result set's header in (local db)
</code></pre>
<p>I am establishing a connection at first:</p>
<pre><code>$connection = n... | 0debug |
How to store image in a database using laravel and then display it : <p>I've seen some topics on stack about this question but none of them are exactly what i want. Mostly people are saying it's a bad idea to store image in a database. I know it but still I need to save an image in a database and be able to display it.... | 0debug |
def tn_ap(a,n,d):
tn = a + (n - 1) * d
return tn | 0debug |
static int vncws_start_tls_handshake(VncState *vs)
{
int ret = gnutls_handshake(vs->tls.session);
if (ret < 0) {
if (!gnutls_error_is_fatal(ret)) {
VNC_DEBUG("Handshake interrupted (blocking)\n");
if (!gnutls_record_get_direction(vs->tls.session)) {
qemu_... | 1threat |
static void uhci_async_complete(USBPort *port, USBPacket *packet)
{
UHCIAsync *async = container_of(packet, UHCIAsync, packet);
UHCIState *s = async->queue->uhci;
if (async->isoc) {
UHCI_TD td;
uint32_t link = async->td;
uint32_t int_mask = 0, val;
pci_dma_read(&s... | 1threat |
Convert String to Type unknown at compile time C# : Given a string and a type of number, I would like to check if the string can be converted to that type and would like the string to be converted to that type if possible. Bellow is the sudo code for what I am trying to do:
public bool DataIsValid(string s, Type... | 0debug |
Angular 4 enable HTML5 validation : <p>I want to use HTML5 validation in Angular 4 rather than their form's based validation/reactive validation. I want to keep the validation running in the browser. </p>
<p>It used to work in Angular 2, but since I've upgraded, I can't get even manually created forms without any ang... | 0debug |
Handling large file uploads with Flask : <p>What would be the best way to handle very large file uploads (1 GB +) with Flask?</p>
<p>My application essentially takes multiple files assigns them one unique file number and then saves it on the server depending on where the user selected.</p>
<p><strong>How can we run f... | 0debug |
void qed_release(BDRVQEDState *s)
{
aio_context_release(bdrv_get_aio_context(s->bs));
}
| 1threat |
Linked Lists - Insert Function Modification : The program should show the element to be inserted at a position greater than the current size of the linked list at the end.
I have tried the following piece of code : (Changed == with >= )
if(pos >= 1)
{
newNode->next = start;
start = newNode;
... | 0debug |
Why dose this not save : Html:
What the code needs to do is to save the informacion but it dose not!
Please help with this
<form>
<h1>Email</h1>
<input type="email" id="email2" required><br><br>
<h1>Password</h1>
<input type="password" id="myInput">
<input type="checkb... | 0debug |
Javascript - what does != -1 do in this function : <p>I understand practically all of this code except the lines noted below</p>
<pre><code>function hasEvent(event, entry) {
return entry.events.indexOf(event) != -1; /*?????????*/
}
function tableFor(event, journal) {
var table = [0, 0, 0, 0];
for (var i = 0; i ... | 0debug |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
What's the output of this program? Explain the answer too please : `void main()
{
printf("%d",-10 & 5);
}`
/*Why is the output of this program 4*/ | 0debug |
static inline void RENAME(yuv2yuvX)(SwsContext *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize,
const int16_t *chrFilter, const int16_t **chrSrc, int chrFilterSize, const int16_t **alpSrc,
uint8_t *dest, uint8_t *uDest, ui... | 1threat |
Compress and Encrypt (AES 256) excel files in (streams) in C# : <p>I need a package with encryption and compressions methods. </p>
<p>Preferably compress/decompress and encrpyt/desencrypt large streams correctly.</p>
| 0debug |
What's default TTL in Redis? : <p>I can't find anywhere online what is default TTL in Redis.
I know that I can set TTL for specific SET, but don't know what is default TTL.
Can someone tell me what default time to live is in Redis?</p>
| 0debug |
static void handle_input(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIORNG *vrng = DO_UPCAST(VirtIORNG, vdev, vdev);
size_t size;
size = pop_an_elem(vrng);
if (size) {
rng_backend_request_entropy(vrng->rng, size, chr_read, vrng);
}
}
| 1threat |
Best practies CodeIgniter Templating : <p>I'm using CodeIgniter for few years for my PHP project.
Now I'm thinking how improve my view folder structure, using best practies.</p>
<p>I'll explain better. Basically I divide my webpage into 3 view: </p>
<ul>
<li>Header (/view/inc/header.php)</li>
<li>SomeContent (/view/c... | 0debug |
concatenate 2 dates in SQL just like we do in Excel. I am using MS SQL server : In excel if we concat 2 dates for e.g 1/1/2015 and 7/1/2018 by using the formula =CONCAT(1/1/2015,"_",7/1/2018) the result is 42005_43282.
Can we do the same thing in SQL? | 0debug |
static void pxa2xx_i2s_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
PXA2xxI2SState *s = (PXA2xxI2SState *) opaque;
uint32_t *sample;
switch (addr) {
case SACR0:
if (value & (1 << 3))
pxa2xx_i2s_reset(s);
s->cont... | 1threat |
static int g726_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr)
{
G726Context *c = avctx->priv_data;
const int16_t *samples = (const int16_t *)frame->data[0];
PutBitContext pb;
int i, ret, out_size;
out_size = (fra... | 1threat |
iscsi_synccache10_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
IscsiAIOCB *acb = opaque;
if (acb->canceled != 0) {
qemu_aio_release(acb);
scsi_free_scsi_task(acb->task);
acb->task = NULL;
return;
}
acb-... | 1threat |
implement length() of string without using Built-in functions : <p>How can i get the length of a string in java without using any Built-in Functions
neither using length() nor using any function</p>
| 0debug |
Java: while loop, enter your next number or type "S" to stop : <p>I want the user to stop entering numbers whenever they feel like it. When I run it, it does not work the way I want it to. Thanks for all the help in advance.</p>
<pre><code>private static void whileLoop3()
{
System.out.printf("%n%nExecu... | 0debug |
int floatx80_lt(floatx80 a, floatx80 b, float_status *status)
{
flag aSign, bSign;
if ( ( ( extractFloatx80Exp( a ) == 0x7FFF )
&& (uint64_t) ( extractFloatx80Frac( a )<<1 ) )
|| ( ( extractFloatx80Exp( b ) == 0x7FFF )
&& (uint64_t) ( extractFloatx80Frac( b ... | 1threat |
xCode 8, Swift 3, iOS: Input lowercase letters to uppercase and vice-versa in textfield : I am using xCode 8 and Swift 3. I am creating app for iOS. How will I make inputted lowercase letters be automatically converted to uppercase letters in the text field and vice-versa? I thank those who can answer this question acc... | 0debug |
static void pc_init_pci_1_4(QEMUMachineInitArgs *args)
{
pc_sysfw_flash_vs_rom_bug_compatible = true;
has_pvpanic = false;
x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
pc_init_pci(args);
}
| 1threat |
ran into a issue with my java program : <p>So im pretty new to java and creating something for school.
My problem is the last If statements i make compare strings and i understand that != or >= doesnt work but i dont understand what to use in place of it. any help?</p>
<p>I've tried looking up the proper way to use th... | 0debug |
python split regex into multiple lines : <p>Just a simple question. Lets say i have a very long regex.</p>
<pre><code>regex = "(foo|foo|foo|foo|bar|bar|bar)"
</code></pre>
<p>Now i want to split this regex into multiple lines. I tried</p>
<pre><code>regex = "(foo|foo|foo|foo|\
bar|bar|bar)"
</code></pre>
... | 0debug |
How do coroutines in Python compare to those in Lua? : <p>Support for coroutines in Lua is provided by <a href="https://www.lua.org/manual/5.3/manual.html#2.6" rel="noreferrer">functions in the <code>coroutine</code> table</a>, primarily <code>create</code>, <code>resume</code> and <code>yield</code>. The developers de... | 0debug |
static inline void temp_save(TCGContext *s, TCGTemp *ts,
TCGRegSet allocated_regs)
{
#ifdef USE_LIVENESS_ANALYSIS
if (!ts->indirect_base) {
tcg_debug_assert(ts->val_type == TEMP_VAL_MEM || ts->fixed_reg);
return;
}
#endif
temp_sync(s, t... | 1threat |
how to fix the two button center and right side? im expecting the best answer without using "dp".please guide me : I'm creating login form and i would like to give back button as center and red button at right side.
<Button
android:layout_width="wrap_content"
android:layout_heig... | 0debug |
static int handle_packets(MpegTSContext *ts, int nb_packets)
{
AVFormatContext *s = ts->stream;
uint8_t packet[TS_PACKET_SIZE];
int packet_num, ret = 0;
if (avio_tell(s->pb) != ts->last_pos) {
int i;
av_dlog("Skipping after seek\n");
for (i = 0; i < NB_PID_MAX... | 1threat |
AWS API Gateway MTLS client auth : <p>Everytime I searched for <strong>Mutual Auth over SSL</strong> for <strong>AWS API Gateway</strong> I can only find MTLS between AWS API Gateway and Backend Services. But I'm looking to secure my AWS API Gateway endpoints itself with <strong>MTLS (client auth)</strong>. </p>
<p>Fo... | 0debug |
static int latm_decode_frame(AVCodecContext *avctx, void *out,
int *got_frame_ptr, AVPacket *avpkt)
{
struct LATMContext *latmctx = avctx->priv_data;
int muxlength, err;
GetBitContext gb;
init_get_bits(&gb, avpkt->data, avpkt->size * 8);
... | 1threat |
URI-based Versioning for AWS API Gateway : <p>I am struggling to understand how AWS API Gateway wants me to organise my APIs such that versioning is straightforward. For example, let's say I have a simple API for getting words from a dictionary, optionally filtering the results by a query parameter. I'd like to have v1... | 0debug |
Is it possible "extend" ThemeData in Flutter : <p>I might very well be missing something as I'm so new to flutter, but I'm finding ThemeData's options very limited (at least with my understanding of how to implement it). </p>
<p>If you look at this random design below from MaterialUp, I'd want to model something <em>r... | 0debug |
Java join() concept : <p>See my code in with <a href="http://collabedit.com/92yma" rel="nofollow">link</a>. My understanding with join concept is that if I created a thread "t2" in main thread. And I am writing like t2.join(). Than first all things under run method of t object will be executed than execution of main th... | 0debug |
Adding business logic to a spring-data-rest application : <p>I have been experimenting with spring-data-rest (SDR) and am really impressed with how quickly I can build a rest api. My application is based around the following repository which gives me GET /attachements and POST /attachements </p>
<pre><code>package co... | 0debug |
Swift: print() not working : I started coding on Swift couple days ago. This is my code right here, I can't find what is the problem. When I press button on simulator it doesn't print anything.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
... | 0debug |
Efficiently determining whether a point is inside a triangle or on the edge : **How to determine whether a point lies inside of a triangle or on the edge efficiently, if possible with O(1) time.**
Context:
- The plane is two dimensional
- Triangle is set according to three coordinate pairs `Coord(int x, int y)`... | 0debug |
What happens when an object is assigned to a value in c++ : <p>Check the following code:</p>
<pre><code>#include<iostream>
using namespace std;
class example
{
public:
int number;
example()
{
cout<<"1";
number = 1;
}
example(int value)
{
cout<<"2... | 0debug |
what is a rescue image? : I am trying to learn how to make my own os from here:http://wiki.osdev.org/Bare_Bones but somewhere there it says that I have to use the `grub-mkrescue` command. I was doing some research around internet to understand what does that command do and found in the [grub official documentation][1] ... | 0debug |
void pvpanic_init(ISABus *bus)
{
isa_create_simple(bus, TYPE_ISA_PVPANIC_DEVICE);
}
| 1threat |
Stop working when running : <p>i wrote this code for my university project but it stop working when i try to run it.
can any one please help me where the problem is?
i guess its the pointers but i dont know where its wrong
for t and z if u want to try it use 20 and 5
and when i enter them it stop working instead of giv... | 0debug |
VLANState *qemu_find_vlan(int id, int allocate)
{
VLANState **pvlan, *vlan;
for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
if (vlan->id == id)
return vlan;
}
if (!allocate) {
return NULL;
}
vlan = qemu_mallocz(sizeof(VLANState));
vlan->id = i... | 1threat |
float32 int64_to_float32( int64 a STATUS_PARAM )
{
flag zSign;
uint64 absA;
int8 shiftCount;
if ( a == 0 ) return 0;
zSign = ( a < 0 );
absA = zSign ? - a : a;
shiftCount = countLeadingZeros64( absA ) - 40;
if ( 0 <= shiftCount ) {
return packFloat32( zSign, 0x95 - sh... | 1threat |
How to sort results in PHP? : <pre><code> foreach($domainCheckResults as $domainCheckResult)
{
switch($domainCheckResult->status)
{
case Transip_DomainService::AVAILABILITY_INYOURACCOUNT:
$result .= "<p style='color:red;'>".$domainCheckResult->domainName."... | 0debug |
Put keys from dictionary to new list based on other lists : <p>I am a total beginner on python and wondering if this is possible? </p>
<pre><code>businessideas = {
"DeliDelivery": ['bread'],
"Ikea": ['sofa','table'],
'Volvo': ['car','window'],
'saab' : ['window']
}
carkeywords = ['car', 'engine']
furniturekeywo... | 0debug |
Getting Java Play framework to cache Ebean entities using memcached : <p>I am running <a href="https://www.playframework.com" rel="noreferrer">Java Play framework</a> version v2.6.1 and using <a href="http://ebean-orm.github.io/" rel="noreferrer">Ebean</a> for persistence. My intention is to get <a href="http://ebean-o... | 0debug |
How to fix program that calculates minimum amount of coins in change : I have a homework assignment in which we have to write a program that outputs the change to be given by a vending machine using the lowest number of coins. E.g. £3.67 can be dispensed as 1x£2 + 1x£1 + 1x50p + 1x10p + 1x5p + 1x2p.
However, my prog... | 0debug |
Passing ngFor variable to an ngIf template : <p>How do I pass the current variable in an ngFor loop to ngIf, if it is using templates with then/else syntax?</p>
<p>It appears that they pass through fine when used inline, but aren't accessible from a template, for example:</p>
<pre><code><ul *ngFor="let number of n... | 0debug |
void omap_badwidth_write32(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
OMAP_32B_REG(addr);
cpu_physical_memory_write(addr, (void *) &value, 4);
}
| 1threat |
Code on generating possible ordered pairs upto a number and finding maximum value of binary operations of the pairs : I got a question at hackerrank which states that , a user should input a larger number (say 5) and a smaller number (say 4) . Then taking each pair from the oerdered list {1,2,3,4,5} , the binary and (... | 0debug |
Angular 4 circle dropdown menu? : I saw this in web.whatsapp.com
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/ZnhtR.png
Is there a npm package for angular that make the exact menu?
If is not. ¿How can I do it with css? | 0debug |
how to use apply family to average multiple conditional arguments in R : <p>This is a very large dataset and I'm trying to get away from writing for loops in R. Looking for a way to attack what I would usually use a nested loop to do. </p>
<p>For each unique value in the confidence col., I need to extract the row indi... | 0debug |
static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
{
AVFilterContext *ctx = inlink->dst;
TileContext *tile = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
if (tile->current)
return 0;
outlink->out_buf = ff_get_video_buffer(outlink, AV_PERM_WRITE,
... | 1threat |
how can I get the lattitude and longitude of someone in android as I just start working on android : actually I want to calculate distance between two user's coordinates .Is there anywhere that would be a good place for me to start with GPS feature on Android, or that has a good example of how to use GPS? I don't want ... | 0debug |
Android Navigation Architecture Component: How to pass bundle data to startDestination : <p>I have an activity which has a <code>NavHostFragment</code>. The activity receives certain values in its intent. I want to pass this data to the first fragment i.e <code>startDestination</code> of the navigation graph. I couldn'... | 0debug |
Missing a using directive or an assembly reference for .ToList() : <p>I have this code in the class constructor.</p>
<pre><code>this._images = images.Split('#').ToList();
</code></pre>
<p>It has always worked, but now it gives this error:</p>
<blockquote>
<p>Error CS1061 'string[]' does not contain a definition f... | 0debug |
How to create playstore like shapes : <p><a href="https://i.stack.imgur.com/ymHW0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ymHW0.png" alt="Playstore like shapes"></a></p>
<p>How to create these download, rating , Media & Video and similar kind of shapes in android ? Is there any library a... | 0debug |
How to blur google map with css : <p>I'm making a semi-transparent panel to overlay on my map, and I thought blurring the map underneath it would be a neat effect. I tried using CSS filters, namely <code>filter: blur(5px);</code>, however this only blurred the contents of the panel, not the map beneath it.</p>
<p>Does... | 0debug |
jquery selector not returning array : <p>I thought jquery was returning an array when selecting something. But it does not look like that:</p>
<p>With this html:</p>
<pre><code><p>A</p>
<p>B</p>
<p>C</p>
</code></pre>
<p>And this js:</p>
<pre><code>var p = $('p');
console.log(Arr... | 0debug |
How do i restructure following code? : <p>I want to create an json structure with data which will get from an api call. I can generate the structure by using following code. But how can I restructure the code to remove nested call of function and loops.</p>
<pre><code> var temp = {
applications: []
};
api.getA... | 0debug |
IOS Swift to retrieve data liner from webpage : Need help here..
my webpage displays a constructive data in a single line, specifically to let xcode to retrieve it.
[{"long":"1234..45","lat":"345.12"}]
this information is in a page
Click here to see "www.gogrex.com/Sandbox/startloc.json"
How do I retrie... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.