problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
"No component factory found for" Error When trying to push from one Page to another : <p>I get an error when trying to push from one page to another. When I try to push to same page, it won't give that error. Only i get error when pushing from one page to another. 'setRoot()' also not giving an error. </p>
<pre><code... | 0debug |
iBeacon possible to wake up an app? : <p>We have requirement to integrate ibeacon in our iphone app.When user reached nearest to a beacon ,</p>
<p>1)App need to wake up and open automatically.Is it possible?
or
2)We need a local notification first and click on it will open the app?</p>
<p>First one is possible , hel... | 0debug |
db.execute('SELECT * FROM products WHERE product_id = ' + product_input) | 1threat |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
What is this regex means? : <p>I found this regex as an email validation but i can't understand what is means, I tried to enter multiple forms of emails but they didn't work, I think there is a problem in this regex.</p>
<p><strong>^[A-Z0-9][A-Z0-9._%+-]{0,63}@(?:[A-Z0-9]{1,63}.){1,125}[A-Z]{2,63}$</strong></p>
<p>ca... | 0debug |
Convert multidimensional array to string : <pre><code>Array
(
[0] => Array
(
[0] = > 1
[1] = > 2
[2] = > 3
)
[1] = > Array
(
[0] = > 4
[1] = > 5
[2] = > 6
)
)
</code></pre>
<p>I have a multidimensional array, I want to convert the inner array to string with this format usin... | 0debug |
Jenkins with Xcode 8 - Cannot find Provisioning Profiles : <p>Jenkins cannot find our recently updated provisioning profiles and after trying every known solution I'm running out of ideas what could be wrong.</p>
<p>Build jobs fail with error:</p>
<blockquote>
<p>No profile matching 'xxxxx' found: Xcode couldn't fi... | 0debug |
the founction not returning any value : hey this is my code for school and its not working i should check in this code
if the arr in the prev position is bigger or smaller from the follow one if its bigger for all the array so i should return the value 1
if in some point in the array the prev position of the arr is ... | 0debug |
static inline void put_codeword(PutBitContext *pb, vorbis_enc_codebook *cb,
int entry)
{
assert(entry >= 0);
assert(entry < cb->nentries);
assert(cb->lens[entry]);
put_bits(pb, cb->lens[entry], cb->codewords[entry]);
}
| 1threat |
Convert decimal number to BigInteger in Java : <p>I am trying to convert <code>10000000000000000000000000000000</code> to <code>BigInteger</code>.
But it is not converting.
My code is </p>
<p><code>BigInteger number = BigInteger.valueOf(10000000000000000000000000000000);</code> </p>
<p>It is showing <code>The litera... | 0debug |
SQL Query so as to match content on 2 fields in database : i have a table #__newtoys_variants having many fields of which id and v_prod_id are there.
Now although id is unique - the v_prod_id is product id
for instance
id v_prod_id price
1 7 200
2 7 220
3 1 250... | 0debug |
this application has requested the runtime to terminate it in an unusual way : when I try to run java code the "this application has requested the runtime to terminate it in an unusual way" is coming and after that at my console window this message is showing "terminate called after throwing an instance of 'std::out_of... | 0debug |
Add something in front of domain name : <p>I own a domain, suppose <strong>www.something.com</strong>. How can I make a web page with a link like <strong>www.abc.something.com</strong> ? I want to add something in front of the root domain name. Please help.</p>
| 0debug |
Why will my remove function find strings but not ints? : <p>We are working on generics which requires us to have an array of AnyType (the driver implements an array of strings then integers). One of the functions is a boolean function called 'remove' which finds 'x' and removes it, then it returns true. It has no issue... | 0debug |
variable out of type PrintStream in Java (not printIn problem) : <p>When I run this Java code I get the error
"System.out.printLn("Java is more complicated than python");
^
symbol: method printLn(String)
location: variable out of type PrintStream"
My Code is:</p>
<pre><code>class complicated{
... | 0debug |
Copy Two-dimensional arrays in Javascript :
**
Hello everyone, I met a problem when coding in Javascript, and I'm seeking for a solution for "What should I do with a Two Dimensional Array if I want copy each line of them and make them a new Two-Dim array?" Thx a lot if any one can help~ Here is the format of thi... | 0debug |
Renaming table system unavailable SQL Azure : I have to perform the exchange of two tables and it's making my system unavailable for 20 minutes(are many data).
My sample code:
query = "DROP TABLE MY_TABLE; ";
query += "EXEC sp_rename MY_TABLE_TEMP, MY_TABLE; ";
query += "ALTER TABLE MY_TABLE ADD CON... | 0debug |
How do i create the dots used for slides,with only html and css? : <p>how do i create the dots used in navigation,slides.Using only Html and CSS.</p>
<p>Like this one: <a href="http://i.stack.imgur.com/qocTe.jpg" rel="nofollow">http://i.stack.imgur.com/qocTe.jpg</a></p>
<p>Thanks in advance.</p>
| 0debug |
when I class a div and assign css to that class it doest do anything : Sorry, i'm relatively new to programming. My question is, is that I have the div classed as .logo, so when i go over to my css file, I want to assign some different dimensions to the gif, as you can see in the css snippet, but the thing is that it j... | 0debug |
pandas multiply using dictionary values across several columns : <p>Given the following dataframe:</p>
<pre><code>import pandas as pd
df = pd.DataFrame({
'a': [1,2,3,4,5],
'b': [5,4,3,3,4],
'c': [3,2,4,3,10],
'd': [3, 2, 1, 1, 1]
})
</code></pre>
<p>And the following list of parameters:</p>
<pre><cod... | 0debug |
static ssize_t vc_sendv_compat(VLANClientState *vc, const struct iovec *iov,
int iovcnt)
{
uint8_t buffer[4096];
size_t offset = 0;
int i;
for (i = 0; i < iovcnt; i++) {
size_t len;
len = MIN(sizeof(buffer) - offset, iov[i].iov_len);
me... | 1threat |
Linkedin: Sharing URL Summary not appearing : <p>I'm not sure if this is new behaviour or if it didn't work at all.
So I'm using the LinkedIn Customized URL feature, you can look it up <a href="https://developer.linkedin.com/docs/share-on-linkedin" rel="noreferrer">here</a>. The URL looks like this:</p>
<p><code>https... | 0debug |
static int vmdk_open(BlockDriverState *bs, int flags)
{
int ret;
BDRVVmdkState *s = bs->opaque;
if (vmdk_open_sparse(bs, bs->file, flags) == 0) {
s->desc_offset = 0x200;
} else {
ret = vmdk_open_desc_file(bs, flags, 0);
if (ret) {
goto fail;
}
... | 1threat |
static long do_rt_sigreturn_v1(CPUARMState *env)
{
abi_ulong frame_addr;
struct rt_sigframe_v1 *frame = NULL;
sigset_t host_set;
frame_addr = env->regs[13];
trace_user_do_rt_sigreturn(env, frame_addr);
if (frame_addr & 7) {
goto badframe;
}
if (!lock_u... | 1threat |
How to Identify maven archtype? : I have an existing maven project for java services So is there any way to identify archetype from pom file or is there any way?
The folder structure for this project is:
src/test/java
src/main/java
src/main/resource
And it has "Referenced Libraries" not "Maven Dependenci... | 0debug |
void *address_space_map(AddressSpace *as,
hwaddr addr,
hwaddr *plen,
bool is_write)
{
AddressSpaceDispatch *d = as->dispatch;
hwaddr len = *plen;
hwaddr todo = 0;
int l;
hwaddr page;
MemoryRegionSection *section;
... | 1threat |
How to calculate the time different between two columns(max value) : [the table in database look like this][1]
[1]: https://i.stack.imgur.com/zJOsn.jpg
I want to calculate the time different between MAX(salinity) and MAX(Depth) on a day. How can I do it?
SELECT `r`.`date` , `r`.`time` , `r`.`salinity`
... | 0debug |
Flutter Bloc Pattern - How to navigate to another screen after stream event? : <p>my question is about Navigation used with the bloc pattern.</p>
<p>In my LoginScreen widget I have a button that adds an event into the EventSink of the bloc. The bloc calls the API and authenticates the user.
The question is where in t... | 0debug |
Python remove from beginning to first specific character in a string? : <p>Assuming I have the following string:</p>
<pre><code>this is ;a cool test
</code></pre>
<p>How can I remove everything from the start up to the first time a <code>;</code> occurs?
The expected output would be <code>a cool test</code>.</p>
<p>... | 0debug |
Angular Material Datepicker: Change event not firing when selecting date : <p>I'm using Angular and Angular Material's Datepicker. Everything is working fine for the most part, however I added a <code>(change)</code> event that is only working when the user manually types in a date. It does not get triggered when the u... | 0debug |
modifying a an array of strings in C : I know when we declared a `char *c ="Hello";` means that we cannot modify this string. But how come I was able to modify this array of string in C.
char *p [] = {"Hello","World"};
*p= "Mode";
Should not that give me an error for attempting to modify it. | 0debug |
Draw a rectangle and a text in it using PIL : <p>I want to draw a rectangle and a text in it, here's a part of my code and it's a bit obfuscated:</p>
<pre><code>from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageEnhance
source_img = Image.open(file_name).convert("RGB")
... | 0debug |
Flutter: Move to a new screen without back : <p>I'm implementing an authentication flow in my Flutter app.</p>
<p>After a sign in attempt, the CheckAuth <em>(which checks whether a user is signed in or not and then opens home screen or sign up screen accordingly)</em> is opened with this code: </p>
<pre><code> void ... | 0debug |
static void put_unused_buffer(QEMUFile *f, void *pv, size_t size)
{
static const uint8_t buf[1024];
int block_len;
while (size > 0) {
block_len = MIN(sizeof(buf), size);
size -= block_len;
qemu_put_buffer(f, buf, block_len);
}
}
| 1threat |
generate random no. but at 1st position character 2nd&3rd number and 4thcharacter at last confirm the generated no. : i want to input a string="abcde12345ABCDE" using scanner and then generate the random number of length 4 but at 1st place it should be character 2nd place it should be number 3place it should be number ... | 0debug |
Call a javascript function after Single time every 7 days : <p>I am working on node.js. I created a function I want to call it 1 time after every 7 days. I am able to call it after 7 days but I want to call this after every 7 days. </p>
| 0debug |
Why do Django developers use Django builtin admin panel? is it said that must to use instead of a html theme? : <p>I want to develop full functional web application in python django. I want to use bootstrap admin theme to develop admin site. I want to know is it required to use django admin while you are a django devel... | 0debug |
TypeScript keyof returning specific type : <p>If I have the following type</p>
<pre><code>interface Foo {
bar: string;
baz: number;
qux: string;
}
</code></pre>
<p>can I use <code>typeof</code> to type a parameter such that it only takes keys of <code>Foo</code> that return <code>string</code> (<code>'bar... | 0debug |
Counting Duplicate Row in Itab : ABAP Friends,
I need to count the number of duplicate row in ITAB base on one field.
I have tried create work area and counting the duplicate data but the problem its counting all duplicate data. my purpose is to count duplicate data by the same date.
DATA: gv_line TYPE i.
gv... | 0debug |
Why can't I pass a sentence value to a jQuery function? : <p>I am trying to run a function like this:</p>
<p><code>onclick="preConfirm(New Lots Avenue,40.660223,-73.896668);"</code></p>
<p>But I always get an error in the console saying</p>
<p><code>Uncaught SyntaxError: missing ) after argument list</code></p>
<p>... | 0debug |
Infinite loop after memory de-allocation : I have some issues with my code during my memory deallocaiton process. Here is the error I am getting: [![I make it to the part where my memory should be deallocated but instead of deallocation I get an infinite loop][1]][1]
bool LinkedList::addArtist(){
cout << "Ente... | 0debug |
how to filter betwenn date in codeigniter : i have a problem , how to filter between date if i only have one column date in my table ?
anyone can help me ? | 0debug |
How to rotate a view continuously in IOS Swift 3 : <p>I will answer my own question to share my solution for this piece of code.</p>
<p>How can i rotate any view continuously with a constant speed in IOS Swift 3?</p>
| 0debug |
Error:(67, 51) java: diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator) : <p>I want to use <a href="https://github.com/guoguibing/librec" rel="nofollow">this</a> library, I cloned it and imported it into IntelliJ IDEA 14.0.3, with JDK 1.8.0_77, but when I want to run t... | 0debug |
Swift protocol generic as function return type : <p>I want to use generic protocol type as a function return type like this:</p>
<pre><code>protocol P {
associatedtype T
func get() -> T?
func set(v: T)
}
class C<T>: P {
private var v: T?
func get() -> T? {
return v
}
func set(v: T) {
... | 0debug |
How to view 100k images? : <p>I'm looking for an efficient JavaScript library or web app with which I can scroll through 10-100k images that I have sorted in a remote directory.</p>
<p>When I tried using plain HTML and img tags the browser would crash from memory pressure.</p>
| 0debug |
static void vp5_parse_coeff(VP56Context *s)
{
VP56RangeCoder *c = &s->c;
VP56Model *model = s->modelp;
uint8_t *permute = s->idct_scantable;
uint8_t *model1, *model2;
int coeff, sign, coeff_idx;
int b, i, cg, idx, ctx, ctx_last;
int pt = 0;
for (b=0; b<6; b++) {
i... | 1threat |
preventDefault() Not Working With Ajax : the eventDefault isn't working and I have no clue why!
I checked other forums and this should be working
I also tried $(document).ready(function() ) but that didn't work either.
The java and html are in that exact order if it makes a difference.
<script src="http... | 0debug |
static void nbd_accept(void *opaque)
{
int server_fd = (uintptr_t) opaque;
struct sockaddr_in addr;
socklen_t addr_len = sizeof(addr);
int fd = accept(server_fd, (struct sockaddr *)&addr, &addr_len);
nbd_started = true;
if (fd >= 0 && nbd_client_new(exp, fd, nbd_client_closed)) {
... | 1threat |
Restrict Special and CNTRL+V character java script : How can we restrict, special characters and CNTRL+V from Javascript (Not JQUERY), but it should allow (-) hyphen. | 0debug |
static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
int x, int y, int w, int h, int wmv9_mask)
{
MSS2Context *ctx = avctx->priv_data;
MSS12Context *c = &ctx->c;
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
AVFrame *f;
... | 1threat |
AWS Cognito; unauthorized_client error when hitting /oauth2/token : <p>Steps taken so far:</p>
<ul>
<li>Set up new user pool in cognito</li>
<li>Generate an app client with <em>no secret</em>; let's call its id <code>user_pool_client_id</code></li>
<li>Under the user pool client settings for <code>user_pool_client_id<... | 0debug |
paxos vs raft for leader election : <p>After reading paxos and raft paper, I have following confusion:
paxos paper only describe consensus on single log entry, which is equivalent the leader election part of the raft algorithm. What's the advantage of paxos's approach over the simple random timeout approach in raft's l... | 0debug |
Using dot notation with variable to get object value in javascript : <p>I have a config object like this</p>
<pre><code>{ config: {
params: {
football: {
url: ''
},
soccer: {
url: ''
}
}
}
</code></pre>
<p>I simply need to get at the <code>football</code... | 0debug |
How to grab specific text from a website with Python : <p>I was wondering how could I make a program that will grab information from this webiste: <a href="https://growtopiagame.com/" rel="nofollow noreferrer">https://growtopiagame.com/</a> (Or any at general), But I don't want to grab every text from it: I just want t... | 0debug |
static void pl110_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = pl110_initfn;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->no_user = 1;
dc->vmsd = &vmstate_pl110;
}
| 1threat |
When should we use '=== ' operator in javascript? : <p>When and why should we use '===' in javascript or jquery.
Is it recommended to test string using === and if yes why.
I have a code where i am checking a condition on the string like.
if(a == "some-thing") is this right or should i use '===' </p>
| 0debug |
Why I am getting this output. Need Explanation : #include <stdio.h>
int main()
{
int x, y, z;
x=y=z=3;
z = ++x || ++y && ++z;
printf("%d, %d, %d", x, y,z);
return 0;
}
I am getting output 2, 1, 1. I need and explanation... | 0debug |
How can i avoid cast numbers to booleans in C#? : <p>I am writing a component for grasshopper in c#. But went i pass a number through a boolean it give me a a false or a true value. How can i add a exception to this event. I only want to pass as parameter booleans types</p>
| 0debug |
Python: goto command : My current assignment asks me to code a graphical representation of some nested squares varying in size from 20-80, like this https://imgur.com/NLt1csa .
After creating the first square I need to move position to the start of the next square I use the goto command for this.
My problem is the ... | 0debug |
How can I copy the <td> value(Command column) by clicking the copy button? : <p><a href="https://preview.linuxcommand.dev/" rel="nofollow noreferrer">https://preview.linuxcommand.dev/</a></p>
<p>This is my website I'm trying to build, So right now its static and not dynamic, So all are same command you see that.
So I... | 0debug |
Using Django URLs with AngularJs routeProvider : <p>for a project, I am using Django on the back-end and AngularJs on the front end.</p>
<p>Basically, what I want is to run the Angular app only when the url starts with <code>projectkeeper/</code>.</p>
<p>In other words, lets say my website is example.com. I want the ... | 0debug |
How to show part of next/previous card RecyclerView : <p>What is the best strategy to achieve this feature:</p>
<p><a href="https://i.stack.imgur.com/IKaKq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IKaKq.png" alt="enter image description here"></a></p>
<p>I Have a horizontal RecyclerView with cards.
E... | 0debug |
Index Bounds on Mongo Regex Search : <p>I'm using MongoDB, and I have a collection of documents with the following structure:</p>
<pre><code>{
fName:"Foo",
lName:"Barius",
email:"fbarius@example.com",
search:"foo barius"
}
</code></pre>
<p>I am building a function that will perform a regular expressio... | 0debug |
static double fade_gain(int curve, int64_t index, int range)
{
double gain;
gain = av_clipd(1.0 * index / range, 0, 1.0);
switch (curve) {
case QSIN:
gain = sin(gain * M_PI / 2.0);
break;
case IQSIN:
gain = 0.636943 * asin(gain);
break;
case ESIN:
... | 1threat |
static void tb_gen_code(CPUState *env,
target_ulong pc, target_ulong cs_base, int flags,
int cflags)
{
TranslationBlock *tb;
uint8_t *tc_ptr;
target_ulong phys_pc, phys_page2, virt_page2;
int code_gen_size;
phys_pc = get_phys_addr_code(env, p... | 1threat |
void hd_geometry_guess(BlockDriverState *bs,
int *pcyls, int *pheads, int *psecs)
{
int cylinders, heads, secs, translation;
bdrv_get_geometry_hint(bs, &cylinders, &heads, &secs);
translation = bdrv_get_translation_hint(bs);
if (cylinders != 0) {
*pcyl... | 1threat |
TypeError: softmax() got an unexpected keyword argument 'axis' : <p>When I use this it does not give any error</p>
<pre><code>out_layer = tf.add(tf.matmul(layer_4 , weights['out']) , biases['out'])
out_layer = tf.nn.softmax(out_layer)
</code></pre>
<p>But when I use this </p>
<pre><code>model=Sequential()
model.add... | 0debug |
Nodejs - Joi Check if string is in a given list : <p>I'm using <a href="https://github.com/hapijs/joi/blob/v10.1.0/API.md" rel="noreferrer">Joi package</a> for server side Validation.<br> I want to check if a given string is in a given list or if it is not in a given list.(define black list or white list for values)<br... | 0debug |
DriveInfo *drive_get_by_blockdev(BlockDriverState *bs)
{
return bs->blk ? blk_legacy_dinfo(bs->blk) : NULL;
}
| 1threat |
yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0,
const int16_t *ubuf[2], const int16_t *vbuf[2],
const int16_t *abuf0, uint8_t *dest, int dstW,
int uvalpha, int y, enum PixelFormat target,
int hasAlpha)
{
const int16_t... | 1threat |
About my Java Code Function : http://jsfiddle.net/MrBigglesWorth/Lwxoeyyp/408/ This code is suppose to save the checkboxs I've ticked after clicking the Save button. Currently that is working but only for one Button. I'm trying to get it to work on all of them to allow me to check them all and save and I plan on adding... | 0debug |
def find_last_occurrence(A, x):
(left, right) = (0, len(A) - 1)
result = -1
while left <= right:
mid = (left + right) // 2
if x == A[mid]:
result = mid
left = mid + 1
elif x < A[mid]:
right = mid - 1
else:
left = mid ... | 0debug |
What is the default encoding for source files in visual studio 2017 : <p>It seems visual studio 2017 always saves new files as UTF8-BOM.
It also seems this was not the case with earlier versions of visual studio, but i could not find any documentation. </p>
<p>Also there has been an option "Advanced Save Options\Enco... | 0debug |
int bdrv_block_status(BlockDriverState *bs, int64_t offset, int64_t bytes,
int64_t *pnum, int64_t *map, BlockDriverState **file)
{
int64_t ret;
int n;
assert(QEMU_IS_ALIGNED(offset | bytes, BDRV_SECTOR_SIZE));
assert(pnum);
bytes = MIN(bytes, BDRV_REQUEST... | 1threat |
build_facs(GArray *table_data, GArray *linker)
{
AcpiFacsDescriptorRev1 *facs = acpi_data_push(table_data, sizeof *facs);
memcpy(&facs->signature, "FACS", 4);
facs->length = cpu_to_le32(sizeof(*facs));
}
| 1threat |
static void free_buffers(AVCodecContext *avctx)
{
CFHDContext *s = avctx->priv_data;
int i;
for (i = 0; i < 4; i++) {
av_freep(&s->plane[i].idwt_buf);
av_freep(&s->plane[i].idwt_tmp);
}
s->a_height = 0;
s->a_width = 0;
}
| 1threat |
HOW TO FETCH FULL TABLE IN FUNCTION IN SNOWFLAKE AND TEST THAT FUNCTION AS IT IS WORKING FINE OR NOT : CREATE OR REPLACE function FN_TABLE_ROWS() returns TABLE(ID NUMBER,NAME VARCHAR) as 'select 111 AS ID,'' NEERAJ'' AS NAME from DUAL';
SELECT FN_TABLE_ROWS() FROM DUAL;
| 0debug |
make a div a square in css : how do i make those box divs look like a little box or a square however you want to call them, please, i set #header's width and height and on those it doesn't work...
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>A Page</title>
<link type="text/css" re... | 0debug |
PyCharm: Configuring multi-hop remote Interpreters via SSH : <p>To connect to the computer at my office I need to run ssh twice. First to connect to the host-1 and then from host-1 to host-2 and each one has different credentials. However the configuration menu in Pycharm only accepts one ssh tunnel.</p>
<p><a href="h... | 0debug |
Differences between Spring Boot and spring MVC : <p>just starting out learning Spring, could you tell me the main differences between Spring Boot and MVC?
Which one is recommended for a beginner?</p>
<p>Thanks.</p>
| 0debug |
build_spcr(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info)
{
AcpiSerialPortConsoleRedirection *spcr;
const MemMapEntry *uart_memmap = &guest_info->memmap[VIRT_UART];
int irq = guest_info->irqmap[VIRT_UART] + ARM_SPI_BASE;
spcr = acpi_data_push(table_data, sizeof(*spcr));
spc... | 1threat |
Dagger 2 Singleton Component Depend On Singleton : <p>I've got a strange problem here, and I'm not quite sure why what I'm doing isn't allowed. I've got the following modules:</p>
<pre><code>@Module
public final class AppModule {
private Context mContext;
@Provides
@Singleton
@AppContext
public Context prov... | 0debug |
Meaning of "Allowed to push" and "Allowed to merge" in Gitlab : <p>What's the meaning of "Allowed to push" and "Allowed to merge" in Gitlab protected branches</p>
| 0debug |
int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame,
int64_t pts, AVRational pixel_aspect, int width,
int height, enum PixelFormat pix_fmt,
const char *sws_param)
{
BufferSourceContext *c = buffe... | 1threat |
Randomly changing background of JButtons in array? : <p>I'm currently attempting to create a Battleship game. The part I'm having trouble with is when I select the "Randomize" button, I would like it to put the ships at a random part of the grid.</p>
<p>For example, the Carrier ship would cover 5 JButtons within the a... | 0debug |
How to test a variable is null in python : <pre><code>val = ""
del val
if val is None:
print("null")
</code></pre>
<p>I ran above code, but got <code>NameError: name 'val' is not defined</code>.</p>
<p>How to decide whether a variable is null, and avoid NameError?</p>
| 0debug |
Unable to load the mojo 'test' - org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M1:test : <p>I am building my apps with Maven-3 and i guess after auto-refresh of maven-surefire-plugin to 3.0.0-M1 i am not able to do build and getting the below error. </p>
<p>As a initial step, I have cleared the directory /org/... | 0debug |
converting string value from text field to integer in Swift 3 &/or Swift 4 : I'm really new to Swift and am having problems with the conversion of a string (entered in a text field) to an integer.
I'm trying to create a small calculation app in XCode 8 (I was following a tutorial on YouTube but it's old).
My app ... | 0debug |
c# How can i replace backslash in a string? : <p>I am working on a c# project and have some strings like this </p>
<p><strong>first string</strong></p>
<pre><code>"[\"2018\\/02\\/12\",[\"Test1\",\"Test2\",\"Test3\",\"Test4\"]]"
</code></pre>
<p>But this string format is not not suitable for my application. I want to... | 0debug |
XCODE I tried to add music to my app that I'm trying to make, I added the code below but there's no sound coming from the simulator, help please~! : I'm trying to add loop music to my App. The Simulator runs, but there's no music coming out. Help Please, Thanks.
import AVFoundation
class ViewController: UIViewCon... | 0debug |
static void rtas_set_tce_bypass(sPAPREnvironment *spapr, uint32_t token,
uint32_t nargs, target_ulong args,
uint32_t nret, target_ulong rets)
{
VIOsPAPRBus *bus = spapr->vio_bus;
VIOsPAPRDevice *dev;
uint32_t unit, enable;
if (narg... | 1threat |
How can I convert epoch datetime in python? : <p>I'm calling an api and getting the datetime field in this format /Date(1500462505221)/ . My motive is to convert it to this format "2018-05-11 23:25:47" . How do I accomplish this ?</p>
| 0debug |
Hash an integer in Python to match Oracle's STANDARD_HASH : <p>In Oracle, my data has been hashed by passing an integer into `STANDARD_HASH' as follows. How can I get the same hash value using Python?</p>
<p>Result in Oracle when an integer passed to STANDARD_HASH:</p>
<pre><code>SELECT STANDARD_HASH(123, 'SHA256') F... | 0debug |
How to average every 12 columns for each row in r : <p>I have a matrix which contains 100 rows and 120 columns, I wonder how I can find the mean value for every 12 columns for each row. so I can have the annual mean. Thanks.</p>
<pre><code>set.seed(1234)
data=rnorm(100*120)
data=matrix(data,nrow = 100,ncol = 120)
</co... | 0debug |
Pattern Matching for Country codes in JAVA : <p>I have a requirement to filter out data based on the country codes . For example if the phone numbers are
+911234567891,+922234567891,+933234567893.
Now we need to dynamically create patterns to get the country codes for the phone numbers. Some country codes might be +9... | 0debug |
static int usb_msd_handle_control(USBDevice *dev, int request, int value,
int index, int length, uint8_t *data)
{
MSDState *s = (MSDState *)dev;
int ret;
ret = usb_desc_handle_control(dev, request, value, index, length, data);
if (ret >= 0) {
return ret... | 1threat |
void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels,
int line_size)
{
int i;
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
for(i=0;i<8;i++) {
pixels[0] = cm[block[0]];
pixels[1] = cm[block[1]];
pixels[2] = cm[block[2]];
... | 1threat |
How do you tell pylint what the members of a protobuf-generated object are? : <p>I would like to release a python package for a set of protobuf messages. The protobuf compiler (<code>protoc</code>) generates a python library that does not actually define types/classes the typical sense, but rather dynamically construct... | 0debug |
static av_cold int dvvideo_encode_init(AVCodecContext *avctx)
{
DVVideoContext *s = avctx->priv_data;
FDCTDSPContext fdsp;
MECmpContext mecc;
PixblockDSPContext pdsp;
int ret;
s->sys = av_dv_codec_profile(avctx->width, avctx->height, avctx->pix_fmt);
if (!s->sys) {
av_log(... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.