problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
How to create real time chat in mobile apps with attachment image/videos in socket io? The backend framework is rails,nginx,unicorn : <p>I have a mobile chat application that need to be real time and it has an attachment videos/images.The back end framework I have used is rails4 with nginx and unicorn. Anybody can help... | 0debug |
BroadcastReciever(To check internet connectivity) getting called at the start of activity : I am using BroadcastReciever to check internet connectivity but it is getting called at the start of activity.This is my BroadcastReceiver` public BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
@Over... | 0debug |
sql fragmentation : I need **SQL FRAGMENTATION** with *examples* | 0debug |
in this code, i can't change parameters i & j . I Don't know why , i am a beginner. plz help me to figure this out . : #include <iostream>
using namespace std;
int rev(int& sourcenum)
{
int temp = sourcenum;
int sum = 0;
while (temp!=0)
{
sum*=10;
sum += temp%10;
temp/=10;
}
... | 0debug |
Return boolean before time.sleep finish when pressing a JButton in Java : <p>This is my code. I want to return true if the user press the button and false otherwise. The problem that I have is that when the button is press it still waits for the time.sleep to finish and then returns. How can I work around this?</p>
<p... | 0debug |
static int add_metadata(const uint8_t **buf, int count, int type,
const char *name, const char *sep, TiffContext *s)
{
switch(type) {
case TIFF_DOUBLE: return add_doubles_metadata(buf, count, name, sep, s);
case TIFF_SHORT : return add_shorts_metadata(buf, count, name, sep, s);
... | 1threat |
PayPal Checkout (javascript) with Smart Payment Buttons create order problem : <p>I'm trying to implement on my webpage the PayPal Checkout (javascript) following the manual: <a href="https://developer.paypal.com/docs/checkout/" rel="noreferrer">https://developer.paypal.com/docs/checkout/</a>
Everything is great with s... | 0debug |
static void qcow2_invalidate_cache(BlockDriverState *bs)
{
BDRVQcowState *s = bs->opaque;
int flags = s->flags;
AES_KEY aes_encrypt_key;
AES_KEY aes_decrypt_key;
uint32_t crypt_method = 0;
QDict *options;
if (s->crypt_method) {
crypt_method = s->crypt_method;
memcpy(&... | 1threat |
Random word generator with a equal probability of occurrence of letters : <p>So I made a pretty simple word generator program in c# that works relatively well. My question is how to generate a words with a equal probability of occurrence of letters eg. aaaa, aabb or abab</p>
<p>My code:</p>
<pre><code>listView1.Items... | 0debug |
how to make app minimize with back button : I need to minimize app after user info input with back button.
What i do wrong
There's the back button code
backButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
if (sendThread !... | 0debug |
In TensorFlow, how can I get nonzero values and their indices from a tensor with python? : <p>I want to do something like this.<br>
Let's say we have a tensor A. </p>
<pre><code>A = [[1,0],[0,4]]
</code></pre>
<p>And I want to get nonzero values and their indices from it. </p>
<pre><code>Nonzero values: [1,4]
No... | 0debug |
Laravel Eloquent Many-to-Many query whereIn : <p>In my application I have updated a relationship from <code>one-to-many</code> to <code>many-to-many</code> and I'm trying to figure out a way to persist associated functionality.</p>
<p>Let's say I have two related tables, e.g. dogs and owners. If I have an array of own... | 0debug |
how to create an empty tuple in Scala : I want to create an empty tuple of size n and populate it according to n. For example;
val n = 3 ; val y = 15; val z = 10 , val e = 11
val x = Tuple3
// populate the tuple with 15
val x = (15,10,11)
Thanks
| 0debug |
void framebuffer_update_display(
DisplaySurface *ds,
MemoryRegionSection *mem_section,
int cols,
int rows,
int src_width,
int dest_row_pitch,
int dest_col_pitch,
int invalidate,
drawfn fn,
void *opaque,
int *first_row,
int *last_row )
{
hwaddr src... | 1threat |
Is it possible to develop iOS apps with Flutter on a Linux virtual machine? : <p>I am new to developing mobile apps and wanted to try Flutter but I use Windows. Because Flutter doesn't support Windows yet I had the idea to use a virtual machine running Linux to install Flutter. Does this work?</p>
<p>Also in the Flutt... | 0debug |
Regex get whole word email : <p>i'm having troubles to try to form a regex to make a match from a string to get the email only, the string would be like this: 'Hello we have sent an email to ***foo@hotmail.com check it"</p>
<p>I would like a match that only returns ***foor@hotmail.com and i have tried this with a bein... | 0debug |
def Repeat(x):
_size = len(x)
repeated = []
for i in range(_size):
k = i + 1
for j in range(k, _size):
if x[i] == x[j] and x[i] not in repeated:
repeated.append(x[i])
return repeated | 0debug |
Python - How to create a program that will that will store 50 random numbers in a list, and find average? : How would I:
- Write a function that will take a single parameter of an integer, and return a list of that many random numbers between 1 and 100.
Using this function, write a program that will store 50 random... | 0debug |
void vnc_display_init(const char *id)
{
VncDisplay *vs;
if (vnc_display_find(id) != NULL) {
return;
}
vs = g_malloc0(sizeof(*vs));
vs->id = strdup(id);
QTAILQ_INSERT_TAIL(&vnc_displays, vs, next);
vs->lsock = -1;
#ifdef CONFIG_VNC_WS
vs->lwebsock = -1;
#endif
... | 1threat |
Why is a function literal returning an int not assignable to a function returning interface{}? : <p>I couldn't reason why this code does <a href="https://play.golang.org/p/yOzukoJhJ4N" rel="nofollow noreferrer">not</a> compile:</p>
<pre><code>package main
import "math/rand"
type ooThinAir func() interface{}
func In... | 0debug |
Ocaml turning a string to an array of chars without the blank spaces : so i am doing an assignment on Ocaml and i am kind of stuck in a part where i need to convert a String to an array.
The trick is that i dont want the array to have blank spaces.
Example:
let s = "This is a string test";;
and i want the o... | 0debug |
How do remove all Unicode from string, BUT keep lanauges such as: Japanese, Greek, Hindi etc : <p>How would I remove all Unicode from this string【Hello!】★ ああああ
I need to remove all the "weird" symbols (【, ★, 】) and keep "Hello!" and "ああああ". This needs to work for all languages not just Japanese. </p>
| 0debug |
copy text what you want : i want a php code that can copy text after a selective text from string.
like string = hello my name is Nitesh
than my code can copy 6 character after "hello my name is "
it show only Nitesh
Can you help Me... | 0debug |
static int codec_get_buffer(AVCodecContext *s, AVFrame *frame)
{
InputStream *ist = s->opaque;
FrameBuffer *buf;
int ret, i;
if(av_image_check_size(s->width, s->height, 0, s))
return -1;
if (!ist->buffer_pool && (ret = alloc_buffer(s, ist, &ist->buffer_pool)) < 0)
return ... | 1threat |
RegEx PHP: strange things with lookaheads : <p>Good day! I have the following pattern:</p>
<pre><code>/(?=test)(?=.*la).{8}/
</code></pre>
<p>to match this:</p>
<pre><code>testlaoo
</code></pre>
<p>And it is working correctly. But I can't understand why do I have to use .* here</p>
| 0debug |
static av_cold int dvdsub_init(AVCodecContext *avctx)
{
DVDSubContext *ctx = avctx->priv_data;
char *data, *cur;
if (!avctx->extradata || !avctx->extradata_size)
return 0;
data = av_malloc(avctx->extradata_size + 1);
if (!data)
return AVERROR(ENOMEM);
memcpy(data, av... | 1threat |
static always_inline void gen_qemu_ldg (TCGv t0, TCGv t1, int flags)
{
TCGv tmp = tcg_temp_new(TCG_TYPE_I64);
tcg_gen_qemu_ld64(tmp, t1, flags);
tcg_gen_helper_1_1(helper_memory_to_g, t0, tmp);
tcg_temp_free(tmp);
}
| 1threat |
C# - Programmatically change content of xaml : So I'm wondering if it's possible to change xaml programmatically through c#
Basically what I'm trying to do is hide or replace a specific element, using a if statement within my class file.
The code I'm trying to manipulate is below, to be more specific I want to kn... | 0debug |
Implementing a mathematical formula in python 3 : I want to implement the followin mathematical formula in python:
optimal[i][s]=max{ optimal[i+1][s], optimal[i+1][s-J[i]] + V[i-1] (s>J[i])}, i try the following:
W={1:3,2:2,3:1,4:4,5:5,6:9,7:6,8:7}
V=[25,20,15,40,50,55,45,58]
optimal=[[]]
J=l... | 0debug |
Delphi - Prime Numbers : <p>A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself.
What I'm doing is this to check if the number is prime or not :</p>
<pre><code>begin
writeln('give a number ');
readln(N); S := 0;
for I := 1 to N do
if N mod I = 0 then
S... | 0debug |
vb.net bitmaps and picturebox : Please help. i need the hex. colour of pixel in an image. This works fine:
Private Sub PictureBox1_MouseMove(sender As Object, e As MouseEventArgs) Handles PictureBox1.MouseMove
PictureBox1.Image = Image.FromFile("c:\image.jpg")
PictureBox1.SizeMode = Pictur... | 0debug |
Aligning bootstrap grids : My grid setup now is as follows
<div class='col-md-12 col-sm-12 col-xs-12'>
<div class='col-md-9 col-sm-9 col-xs-12'>
DIV 1
</div>
<div class='col-md-3 col-sm-3 col-xs-12'>
DIV 2
</div>
<div class='col-md-9 co... | 0debug |
How to remove CSS class inside the DIV tag in javascript? : <p>Please help how to remove css inside of div tag?</p>
<p>I tried with below code for removing css for the input type inside the div tag. but its now working. </p>
<pre><code><style>
.removeInputBorder {
border: none
}
</style>
</head>... | 0debug |
Display a visual at a certain position in the browser with javascript/jquery : is it possible for me to display some sort of visual at a certain position in the browser(firefox)? Let's say I have these offsets {left: 336, top: 378} which I am calculating dynamically, and I want to display a small line of some sort (eit... | 0debug |
static inline void gen_evmergelohi(DisasContext *ctx)
{
if (unlikely(!ctx->spe_enabled)) {
gen_exception(ctx, POWERPC_EXCP_APU);
return;
}
#if defined(TARGET_PPC64)
TCGv t0 = tcg_temp_new();
TCGv t1 = tcg_temp_new();
tcg_gen_shri_tl(t0, cpu_gpr[rB(ctx->opcode)], 32);
tc... | 1threat |
static inline bool migration_bitmap_test_and_reset_dirty(MemoryRegion *mr,
ram_addr_t offset)
{
bool ret;
int nr = (mr->ram_addr + offset) >> TARGET_PAGE_BITS;
ret = test_and_clear_bit(nr, migration_bitmap);
if (ret) {
migration... | 1threat |
intptr_t (*checkasm_check_func(intptr_t (*func)(), const char *name, ...))()
{
char name_buf[256];
intptr_t (*ref)() = func;
CheckasmFuncVersion *v;
int name_length;
va_list arg;
va_start(arg, name);
name_length = vsnprintf(name_buf, sizeof(name_buf), name, arg);
va_end(arg);
... | 1threat |
How to get total time spend in Gitlab? : <p><strong>Is there a way to get the total time spend on all issues that a user have spend with the time tracking <code>/spend</code> <em>slash command</em>?</strong></p>
<p>Time tracking stats with the API gets just a small amount of data: <a href="https://docs.gitlab.com/ce/a... | 0debug |
How do I make a CountDownTimer show at the same moment my Button gets enabled? : "How do I make a CountDownTimer show at the same moment my Button gets enabled ?"
Additional info regarding the button: the Buttons Job is it to click 5 times through a stringarray displayed in a Textview to then get disabled for 5 seco... | 0debug |
How to convert Number into Words in yii2 : <p>I need to convert amount into words for example total = 5600 into five thousand six hundred only in yii2</p>
| 0debug |
How do I parse a yaml string with python? : <p>I see an API and many examples on how to parse a yaml file but what about a string?</p>
| 0debug |
void i2c_register_slave(I2CSlaveInfo *info)
{
assert(info->qdev.size >= sizeof(i2c_slave));
info->qdev.init = i2c_slave_qdev_init;
info->qdev.bus_type = BUS_TYPE_I2C;
qdev_register(&info->qdev);
}
| 1threat |
target_ulong helper_emt(target_ulong arg1)
{
arg1 = 0;
return arg1;
}
| 1threat |
static int qemu_event_init(void)
{
int err;
int fds[2];
err = qemu_eventfd(fds);
if (err == -1) {
return -errno;
}
err = fcntl_setfl(fds[0], O_NONBLOCK);
if (err < 0) {
goto fail;
}
err = fcntl_setfl(fds[1], O_NONBLOCK);
if (err < 0) {
goto... | 1threat |
C++ Erase not working as expected : <p>Consider this following program:</p>
<pre><code>#include <iostream>
#include <string>
#include <algorithm> // std::remove
int main ()
{
std::string str ("This is an example sentence blah");
std::remove(str.begin(), str.end(), '\t');
std::cout <&... | 0debug |
static ExitStatus trans_fop_ded(DisasContext *ctx, uint32_t insn,
const DisasInsn *di)
{
unsigned rt = extract32(insn, 0, 5);
unsigned ra = extract32(insn, 21, 5);
return do_fop_ded(ctx, rt, ra, di->f_ded);
}
| 1threat |
static void vnc_client_read(void *opaque)
{
VncState *vs = opaque;
long ret;
buffer_reserve(&vs->input, 4096);
#ifdef CONFIG_VNC_TLS
if (vs->tls_session) {
ret = gnutls_read(vs->tls_session, buffer_end(&vs->input), 4096);
if (ret < 0) {
if (ret == GNUTLS_E_AGAIN)
errno = EAGAIN;
... | 1threat |
part of my html not displaying in Chrome : The top third of my page including a graphic and headline shows up just fine in firefox and explorer but does not appear in Chrome when accessed from my server. It does appear in Chrome when viewing the page as a file. The link to my page is: [http://donfiler.net/index2.html][... | 0debug |
static int vmd_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
VmdDemuxContext *vmd = (VmdDemuxContext *)s->priv_data;
ByteIOContext *pb = &s->pb;
int ret = 0;
vmd_frame_t *frame;
if (vmd->current_frame >= vmd->frame_count)
return -EIO;
frame = &v... | 1threat |
iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
void *command_data, void *opaque)
{
struct IscsiTask *iTask = opaque;
struct scsi_task *task = command_data;
iTask->status = status;
iTask->do_retry = 0;
iTask->task = task;
if (status != SCSI_STATUS... | 1threat |
static int vorbis_parse_setup_hdr_residues(vorbis_context *vc){
GetBitContext *gb=&vc->gb;
uint_fast8_t i, j, k;
vc->residue_count=get_bits(gb, 6)+1;
vc->residues=av_mallocz(vc->residue_count * sizeof(vorbis_residue));
AV_DEBUG(" There are %d residues. \n", vc->residue_count);
for(i=0;i<vc->resi... | 1threat |
Read strings from a file : <pre><code> FILE *fp;
char name[50];
fp=fopen("stu.txt","r");
while(fgets(name,50,fp)!=NULL)
{
printf(" %s",name);
fgets(name,50,fp);
}
fclose(fp);
</code></pre>
<p>In my file there are 4 names in 4 different lines but the output only displays the 1st and the 3rd name.What's wrong?... | 0debug |
Python - What is queue.task_done() used for? : <p>I wrote a script that has multiple threads (created with <code>threading.Thread</code>) fetching URLs from a <code>Queue</code> using <code>queue.get_nowait()</code>, and then processing the HTML. I am new to multi-threaded programming, and am having trouble understandi... | 0debug |
How to assign a name to running container in docker? : <p>I have created container from particular image using command:</p>
<pre><code>$ docker run -d -P selenium/hub
</code></pre>
<p>running container status is below:</p>
<pre><code>$ docker ps
CONTAINER ID IMAGE COMMAND CREATE... | 0debug |
Creating objects in bulk and prining the names of the objects : <p>I wanted to make a 100 objects from the same class and print the names of the objects each time they were created. Something like this:</p>
<pre><code>class Human():
def __init__(self):
#print the name of the object
human1 = Human(... | 0debug |
static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
const int data_size, AVCodecContext *avctx)
{
int hdr_size, width, height, flags;
int version;
const uint8_t *ptr;
hdr_size = AV_RB16(buf);
av_dlog(avctx, "header size %d\n", hdr_size);
... | 1threat |
Plotting data R : <p>I have a simple tasks I would like to do. Using an RODBC connection I have connected R to a SQL server database. There are four tables in the database and they are tenors of Libor rates</p>
<pre><code>Libor_1_mos
Libor_3_mos
Libor_6_mos
Libor_12_mos
</code></pre>
<p>Each table has two columns. Th... | 0debug |
Is void() a valid C++ expression? : <p>Apparently, this ternary expression with <code>void()</code> as one argument compiles:</p>
<pre class="lang-cpp prettyprint-override"><code>void foo() {}
//...
a == b ? foo() : void();
</code></pre>
<p>Is <code>void()</code> a valid expression by the standard, or is it just a c... | 0debug |
static int analyze(const uint8_t *buf, int size, int packet_size,
int probe)
{
int stat[TS_MAX_PACKET_SIZE];
int stat_all = 0;
int i;
int best_score = 0;
memset(stat, 0, packet_size * sizeof(*stat));
for (i = 0; i < size - 3; i++) {
if (buf[i] == 0x47 &&
... | 1threat |
TypeScript version mismatch in Visual Studio 2019 : <p>I am thoroughly confused by Typescript versioning as it relates to Visual Studio 2019. I have a .NET Core 2.2.x project which utilizes Typescript. When I edit any .ts file, I get the following warning (in the error list):</p>
<blockquote>
<p>Your project is bu... | 0debug |
password_verify is not Matching the password on the db password : <p>Please tell me whats wrong i'm doing</p>
<p><a href="https://i.stack.imgur.com/dIhCd.png" rel="nofollow noreferrer">Its showing errorflase error </a></p>
| 0debug |
Kubernetes cluster for docker image : i have docker image , i need to create a Kubernetes cluster from one node.
don't have knowledge in Kubernetes, this is the first time to create it.
how can i do it with the simplest way?
Thanks
| 0debug |
batch replace command, i'm confused : <p>okay, so I tried this</p>
<pre><code>set x=12 &
set var=(x)
set var=%var:(=^%%
set var=%var:)=^%%
echo %var%
</code></pre>
<p>and I get x%%</p>
<p>then I did this</p>
<pre><code>setlocal enabledelayedexpansion
set var=!var:(=%!
set var=!var:)=%!
echo %var%
</code></pr... | 0debug |
static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
AVStream *st = c->fc->streams[c->fc->nb_streams-1];
int entries, i;
int64_t duration=0;
int64_t total_sample_count=0;
print_atom("stts", atom);
get_byte(pb);
get_byte(pb); get_byte(pb); get_byte(... | 1threat |
Is there a reason that .str.split() will not work with '$_'? : <p>I am trying to split a string using .str.split('$_') but this is not working. </p>
<p>Other combinations like 'W_' or '$' work fine but not '$<em>'. I also tried .str.replace('$</em>') - which also does not work.</p>
<p>Initial string is '$<em>WA</em>:... | 0debug |
void bdrv_io_plug(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
if (drv && drv->bdrv_io_plug) {
drv->bdrv_io_plug(bs);
} else if (bs->file) {
bdrv_io_plug(bs->file);
}
}
| 1threat |
DOMException: Error processing ICE candidate : <p>I get this error <code>DOMException: Error processing ICE candidate</code> when I try to add an ice candidate. Here's the candidate:</p>
<blockquote>
<p>candidate:1278028030 1 udp 2122260223 10.0.18.123 62694 typ host
generation 0 ufrag eGOGlVCnFLZYKTsc network-id ... | 0debug |
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
int flags, CPUWatchpoint **watchpoint)
{
CPUWatchpoint *wp;
if (len == 0 || (addr + len - 1) <= addr) {
error_report("tried to set invalid watchpoint at %"
VADDR_PRIx ", len=%" VA... | 1threat |
delete user in SQL SERVER database : Hi I am executing this code to create user in my database.
CREATE LOGIN john WITH PASSWORD = 'john123';
GO
USE mytestdb;
GO
CREATE USER [john] FOR LOGIN [john]
GO
ALTER USER [john] WITH DEFAULT_SCHEMA=[dbo]
GO
ALTER ROLE [db_datar... | 0debug |
Sorting ArrayList based on number of duplicates? : <p>working here to sort an ArrayList in order with the highest number of duplicates at index 0. Can anyone help me out with what kind of loop to use or a method?</p>
| 0debug |
static void usb_host_handle_reset(USBDevice *udev)
{
USBHostDevice *s = USB_HOST_DEVICE(udev);
trace_usb_host_reset(s->bus_num, s->addr);
if (udev->configuration == 0) {
return;
}
usb_host_release_interfaces(s);
libusb_reset_device(s->dh);
usb_host_claim_interfaces(s, 0)... | 1threat |
get item position List<Posts> : I have this to get recyclerview position click:
int position = getAdapterPosition();
and this function to return list in a position:
List<Posts> Posts;
public Posts getItem(int position) {
return Posts.get(position);
}
in this ... | 0debug |
int show_bsfs(void *optctx, const char *opt, const char *arg)
{
AVBitStreamFilter *bsf = NULL;
printf("Bitstream filters:\n");
while ((bsf = av_bitstream_filter_next(bsf)))
printf("%s\n", bsf->name);
printf("\n");
return 0;
}
| 1threat |
What is the difference between arr and *arr? : <p>What is the difference between these 2 prints, I got the same address in both of them : </p>
<pre><code>int main(void)
{
int arr[2][3] = {{1,2,3},{4,5,6}};
printf("%p\n", arr);
printf("%p\n", *(arr));
}
</code></pre>
| 0debug |
Any advantage of using the s suffix in C++ : <p>My question is related to the use of the "s" suffix in C++?</p>
<p>Example of code using the "s" suffix:</p>
<pre><code>auto hello = "Hello!"s; // a std::string
</code></pre>
<p>The same could be written as:</p>
<pre><code>auto hello = std::string{"Hello!"};
</code></... | 0debug |
Unable to require directive in AngularJS 1.5 component : <p>I've created a directive which works perfectly fine. Now after bumping <code>angular</code> to <code>1.5.0</code>, I figured this directive is a typical example of what could be written using the new <code>.component()</code> notation.</p>
<p>For some reason,... | 0debug |
I want Use Lag Function By Using Running Total in Another Column, But It is Not Work in SQL Server 2012??? : [enter image description here][1]
[enter image description here][2]
[1]: https://i.stack.imgur.com/64ke7.png
[2]: https://i.stack.imgur.com/nWQJV.png
I want Use Lag Function By Using Running ... | 0debug |
getting a 200 statue useing refresh token : public async Task NewMethodAsync()
{
try
{
HttpClient objClient = new HttpClient();
Uri requestUri = new Uri("https://approvalbotbeta.azurewebsites.net/api/token");
... | 0debug |
static void dump_json_image_info_list(ImageInfoList *list)
{
Error *local_err = NULL;
QString *str;
QmpOutputVisitor *ov = qmp_output_visitor_new();
QObject *obj;
visit_type_ImageInfoList(qmp_output_get_visitor(ov), NULL, &list,
&local_err);
obj = qmp_output_... | 1threat |
I want a table cell to completely cover up the entire screen in ios Swift? : The problem here is I want the UITable cell to fully take the view of the cell and once I swipe down the other cell has to appear. What I have here is the other cell also appears on the same UITable screen. As you can see the title of the othe... | 0debug |
Directory comparision : path1 : /home/users/term/R1.0/test/mw & path2 : /home/users/term/R1.2/test/mw
I would like to compare the above two directory paths and output the path which has highest version.
output = /home/users/term/R1.2/test/mw
what is the best way to achieve it.
| 0debug |
static QString *read_line(FILE *file, char *key)
{
char value[128];
if (fscanf(file, "%s%s", key, value) == EOF)
return NULL;
remove_dots(key);
return qstring_from_str(value);
}
| 1threat |
issue in changing the dataframe schema from int to double : I have a dataframe label and i want to change the schema of the dataframe from integer to double
The schema of the data frame is
`label.printSchema`
`root
|-- value: integer (nullable = false)`
the command I am using is
`label = label.withColu... | 0debug |
How to write a program that prints a string a successive number of times (defined by user), in the same number of lines? : I am EXTREMELY new to programming. I am trying to write a function that prints the string '$' a number of times defined by the user, successively reaching that number in the same amount of lines. F... | 0debug |
How to rename multiple files in vscode (visual studio code)? : <p>I wonder, if there is way to rename multiple files in visual studio code? I have tried to use find and replace, no luck.</p>
| 0debug |
Trying to figure out how to use "Date()"s for an assignment due friday : Basically, I need to make the closeDate = null and the openDate the current date. Using latest version of Java SDK and netbeans.
import java.util.Date;
public class Task {
Date openDate = new Date();
Date closeDa... | 0debug |
how to make a batch file create a batch file that can still contain percentage values : i'm trying to create a batch file that creates a batch file, but as it seems i can't get the first batch file to also send over percentage value's (fx. %example%), so how do i make the first batch file create the second batch file b... | 0debug |
What does 'ICU' stand for in Android SDK? : <p>Have seen new packages in Android SDK docs. All of them are available in API level 24 which corresponds to Android Nougat and seem to replace the '<em>java.xxx</em>' packages by '<em>android.icu.xxx</em>'. For example:</p>
<blockquote>
<p>The <em>java.text.DateFormat</e... | 0debug |
How to make random selection from a set of random numbers? : <ul>
<li>I have a series expressed as </li>
</ul>
<blockquote>
<p><code>y = a*np.exp(-t/T1) + a*np.exp(-t/T2) + a*np.exp(-t/T3) + a*np.exp(-t/T4) + a*np.exp(-t/T5)</code></p>
</blockquote>
<ul>
<li><p>I want to generate this series <code>n</code> number o... | 0debug |
Newline Text Node : i have this code and i want to new line in Text Node. its now working :(
your help please.......
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
// Create a new list item when clicking on the "Add" button
function newEl... | 0debug |
Not use self in every class method and not use singleton model in ruby : <p>I'm having trouble with nice and beautiful code. Basically, if I define a class that won't be instantiated at all, I'd do something like this:</p>
<pre><code>class Foo
def self.bar
# Do something
end
end
</code></pre>
<p>but this synt... | 0debug |
PHP cut text after find "," : <p>I want to cut text after find ","</p>
<blockquote>
<p>input text > 12223443,3532432</p>
<p>I want > 12223443</p>
</blockquote>
<p>**text length is no fixed</p>
| 0debug |
How to add more data in access_token JWT : <p>I am trying to add new fields in JWT token which is actually <code>access_token</code> which is generated with <code>grant_type=password</code>. I want to add more fields if grant type is only <code>password</code>.</p>
<p>If I implement a custom token enhancer, it adds ne... | 0debug |
void qemu_register_clock_reset_notifier(QEMUClock *clock,
Notifier *notifier)
{
qemu_clock_register_reset_notifier(clock->type, notifier);
}
| 1threat |
How to hide status bar in android in just one activity : <p>I want to hide status bar / notification bar in splash screen I am using
style:<code><style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"></code>
this dose not hide the status bar, how should i do this?</p>
| 0debug |
void ff_free_stream(AVFormatContext *s, AVStream *st){
av_assert0(s->nb_streams>0);
av_assert0(s->streams[ s->nb_streams-1 ] == st);
if (st->codec) {
avcodec_close(st->codec);
}
if (st->parser) {
av_parser_close(st->parser);
}
if (st->attached_pic.data)
av... | 1threat |
Why is tslint:recommended not allowing modules? : <p>We are using typescript v2.3.2 and TSLint v4.5.1 with VS Code to create a SPA. Codebase is growing and we need to modularize it someway.</p>
<p>I tried to do the modularization using typescript modules but found the following lint error when transpiling the app.</p>... | 0debug |
Keeping track of a fragment in the activity : <p>in my app there's an Activity with a Navigation Drawer. The selection of the drawer's items brings to the instantiation of related List Fragments.
When I select an item in the List Fragment, a second Activity begins showing information about the item I clicked.
Navigat... | 0debug |
void rgb24tobgr32(const uint8_t *src, uint8_t *dst, long src_size)
{
long i;
for(i=0; 3*i<src_size; i++)
{
#ifdef WORDS_BIGENDIAN
dst[4*i + 0] = 0;
dst[4*i + 1] = src[3*i + 0];
dst[4*i + 2] = src[3*i + 1];
dst[4*i + 3] = src[3*i + 2];
#else
dst[4*i + 0] = src[3*i + 2];
dst[4*i ... | 1threat |
Single Linked List in reverse order Java : <p>How to write a code for printing Single linked list in reverse order?</p>
<pre><code>private class Elem {
private int data;
private Elem next;
public Elem(int data, Elem next) {
this.data = data;
this.next = next;
}
public Elem(int d... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.