problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
Mongo Atlas: Connection authentication failed with custom databases : <p>I am trying the Mongo Atlas Cloud. I create a cluster and i am trying a connection with the mongo shell: (same problem with mongo drivers)</p>
<pre><code>mongo mongodb://***-cluster-shard-00-00-***.mongodb.net:27017,***-cluster-shard-00-01-***.mo... | 0debug |
BottomSheetBehaviour: The view is not associated with BottomSheetBehavior : <p>I am using Google Design Support Library 25.0.0
In my activity I have a relative layout with </p>
<pre><code>app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
</code></pre>
<p>Now when I reference it for adding Bottom... | 0debug |
int32_t helper_fstoi(CPUSPARCState *env, float32 src)
{
int32_t ret;
clear_float_exceptions(env);
ret = float32_to_int32_round_to_zero(src, &env->fp_status);
check_ieee_exceptions(env);
return ret;
}
| 1threat |
C++: Cannot copy line from an input file to an output file : <p>This is a home work question, so if you are not a fan of those I understand. Here is my code:</p>
<pre><code>#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main()
{
fstream myfile1("datafile1.txt")... | 0debug |
remove item object javascript : <p>I have the following object:</p>
<pre><code>[{
"id": 2,
"price": 2000,
"name": "Mr Robot T1",
"image": "http://placehold.it/270x335"
}, {
"id": 1,
"price": 1000,
"name": "Mr Robot T2",
"image": "http://placehold.it/270x335"
}]
</code></pre>
<p>and wha... | 0debug |
why does this line ignored by java? : <p>i am writing a program to provide a menu for the user .. after he enters a number i use switch to decide which parameter should the user enter . Anyway, in one case ( case 1 ) i need to inputs from the user . but after the user enter the first input the program breaks the switch... | 0debug |
Writing CSV Rows to a Dataframe : I am using the csv library to read specific rows from several files I have. The problem I am having is saving those rows into a dataframe. I am getting an indexing error that I can't solve.
The current version of the code finds the column names (which is on the third row) and then s... | 0debug |
stream reader over regex loop? : <p>how I can apply stream reader over regex loop </p>
<p>please help
i dont know</p>
<pre><code> string Value =pattern search;
var match = Regex.Match(File.ReadAllText(patch ) , Value);
while (match.Success)
{
doing regex code loop
}
</code></pre>
<p>please... | 0debug |
How to stop bokeh from opening a new tab in Jupyter Notebook? : <p>First of all, before this is tagged as duplicate, I have read the other solutions and unfortunately none of them worked for me.</p>
<p>My problem is that I want to display a bokeh plot in Juypter Notebook (and only in Jupyter Notebook), not in a new t... | 0debug |
Python "Str to Int" within a list of lists...How? : I want to convert an element "str" to "int" within a list of list.
list = [['2003', '12', '5'], ['2004', '10', '7']]
to
[['2003', '12', 5], ['2004', '10', 7]] | 0debug |
void visit_type_str(Visitor *v, const char *name, char **obj, Error **errp)
{
v->type_str(v, name, obj, errp);
}
| 1threat |
how to create empty file in python : <p>I would like to create an empty file in Python. But I have difficulty creating one..Below is the Python code I used to create but it gives me error:</p>
<pre><code>gdsfile = "/home/hha/temp.gds"
if not (os.path.isfile(gdsfile)):
os.system(touch gdsfile)
</code></pre>
<p>Er... | 0debug |
Windows Batch FOR loop : <p>I'm trying to write a batch script that would loop through each line from the output of another command. I am having trouble getting it to work. This is one example:</p>
<blockquote>
<p>FOR %i in ('wmic useraccount get name') DO ECHO %i</p>
</blockquote>
<p>The command <strong>wmic usera... | 0debug |
def noprofit_noloss(actual_cost,sale_amount):
if(sale_amount == actual_cost):
return True
else:
return False | 0debug |
static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice)
{
unsigned int x, overflow;
int tmpk;
overflow = range_get_symbol(ctx, counts_3970, counts_diff_3970);
if (overflow == (MODEL_ELEMENTS - 1)) {
tmpk = range_decode_bits(ctx, 5);
overflow = 0;
} else
... | 1threat |
how to let the h and cpp talk to each other? : I am trying to Creating and Using a Static Library using the official examples
https://msdn.microsoft.com/en-us/library/ms235627.aspx
but i find the cpp file just can not get connected with the class definitions in the h file.
I get the error messages: ...is not a... | 0debug |
Update UIlable automatically : I'm trying to update an UILable based on the numbers inserted in an UITextField.
UITextField, lets say 45 was inserted
A function that does (45 * 2)
UILable will now becomes 90
I am having trouble exporting values from the function and updating the UILable.
Thanks for the h... | 0debug |
Error handling with Node.js, Async and Formidable : <p>In the following snippet I would like to validate the fields in the first async method. </p>
<p>If they are not valid I would like to return an error to the user immediately. </p>
<p>How do I do that?</p>
<pre><code>var form = new formidable.IncomingForm();
a... | 0debug |
Error when use Pointer-to-Pointer : <p>I am using Visual Studio 2013.
Today, i did some research on pointer, i found error when try to point to a pointer from the orther.
Error occured at this line:
char *cPP = &cP;
when try to read address of cP and put on cPP. Visual Studio announced:</p>
<pre><code>a value of t... | 0debug |
Using StackExchange.Redis in a ASP.NET Core Controller : <p>I'd like to use Redis features such as bitfields and hashfields from an MVC controller. I understand there's <a href="https://docs.microsoft.com/en-us/aspnet/core/performance/caching/distributed" rel="noreferrer">built in caching support</a> in ASP.NET core bu... | 0debug |
How to compare words in a string/python dictionary? : <p>I have a dictionary item in the form</p>
<pre><code> {"value for money": ["rescheduled", "cost", "low", "high", "simplicity", "booking", "price-performance", "satisfied", "satisfaction", "pricing", "prices"]}
</code></pre>
<p>I need to check whether the a stri... | 0debug |
cursor.execute('SELECT * FROM users WHERE username = ' + user_input) | 1threat |
how to remove properties via mapped type in TypeScript : <p>Here is the code </p>
<pre><code>class A {
x = 0;
y = 0;
visible = false;
render() {
}
}
type RemoveProperties<T> = {
readonly [P in keyof T]: T[P] extends Function ? T[P] : never//;
};
var a = new A() as RemoveProperties<... | 0debug |
static abi_long do_connect(int sockfd, abi_ulong target_addr,
socklen_t addrlen)
{
void *addr;
if (addrlen < 0)
return -TARGET_EINVAL;
addr = alloca(addrlen);
target_to_host_sockaddr(addr, target_addr, addrlen);
return get_errno(connect(sockfd, addr, ... | 1threat |
How to implement these github examples? : <p>All,</p>
<p>I am new to github and its a bit confusing to say the least. This link shows a bunch of animated menu styles, but I have no clue how to use their code on my sites. For example the 10th one down "Adrian". Where would I get all the code I need? I just signed up fo... | 0debug |
Function in C programming xcode "C99" : <p>This is the first time I try to use a function in C. I have checked the internet and do not understand why my compiler (xcode) are complaining</p>
<pre><code>#include <stdio.h>
int upp2(int argc, const char * argv[]) {
float kronor;
float valutakurs = 0.1;
flo... | 0debug |
What's the best/proper way to set up my database : <p>I have a database, image below, and I feel that there must be an efficient way to add separate books for each child. For example... there may be 50 clubbers in the database. Each clubber will be in their own book and to make it simple, each book has 10 sections a cl... | 0debug |
Python .append not working when found within a for, if else : <p>Working on a list creator to generate assignments for a sound crew. Creating 4 lists and adding people to the various lists based on the training they have recieved and the jobs they are capable of doing. I have one base list with all of the people includ... | 0debug |
static int rv10_decode_packet(AVCodecContext *avctx,
uint8_t *buf, int buf_size)
{
MpegEncContext *s = avctx->priv_data;
int i, mb_count, mb_pos, left;
init_get_bits(&s->gb, buf, buf_size*8);
#if 0
for(i=0; i<buf_size*8 && i<200; i++)
printf("%d", get_bits... | 1threat |
static int nbd_co_receive_request(NBDRequestData *req, NBDRequest *request,
Error **errp)
{
NBDClient *client = req->client;
int valid_flags;
g_assert(qemu_in_coroutine());
assert(client->recv_coroutine == qemu_coroutine_self());
if (nbd_receive_request(cli... | 1threat |
MvcBuildViews true causes "'/temp' is not a valid IIS application" error : <p>After setting <code>MvcBuildViews</code> to <code>true</code> in my <code>.csproj</code> file in order to have the views compile during build, I get the following error:</p>
<blockquote>
<p>'/temp' is not a valid IIS application</p>
</bloc... | 0debug |
bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov)
{
int i;
for (i = 0; i < qiov->niov; i++) {
if ((uintptr_t) qiov->iov[i].iov_base % bs->buffer_alignment) {
return false;
}
if (qiov->iov[i].iov_len % bs->buffer_alignment) {
return fals... | 1threat |
int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
uint8_t *data, size_t size)
{
AVPacketSideData *sd, *tmp;
int i;
for (i = 0; i < st->nb_side_data; i++) {
sd = &st->side_data[i];
if (sd->type == type) {
av_freep(&sd... | 1threat |
static int dx2_decode_slice_rgb(GetBitContext *gb, AVFrame *frame,
int line, int left, uint8_t lru[3][8])
{
int x, y;
int width = frame->width;
int stride = frame->linesize[0];
uint8_t *dst = frame->data[0] + stride * line;
for (y = 0; y < left && get_bi... | 1threat |
MemoryRegionSection memory_region_find(MemoryRegion *address_space,
hwaddr addr, uint64_t size)
{
AddressSpace *as = memory_region_to_address_space(address_space);
AddrRange range = addrrange_make(int128_make64(addr),
int128_make64... | 1threat |
static void dump_aml_files(test_data *data, bool rebuild)
{
AcpiSdtTable *sdt;
GError *error = NULL;
gchar *aml_file = NULL;
gint fd;
ssize_t ret;
int i;
for (i = 0; i < data->tables->len; ++i) {
const char *ext = data->variant ? data->variant : "";
sdt = &g_array... | 1threat |
in python3: most efficient way to modify each element in multiple lists together? : Let's say I have 3 lists
```
a = [1.12, 2.23, 3.34]
b = [2.12, 3.23, 4.34]
c = [3.12, 4.23, 5.34]
```
my goal is to round the numbers down to 1 decimal. so I have this custom function:
```
import math
def round_down(n, decima... | 0debug |
Angular UI modal with Bootstrap 4 : <p>Bootstrap 3 modal works fine:
<a href="https://jsfiddle.net/qLy7gk3f/4/" rel="noreferrer">https://jsfiddle.net/qLy7gk3f/4/</a></p>
<p>But Bootstrap 4 modal doesn't:
<a href="https://jsfiddle.net/qLy7gk3f/3/" rel="noreferrer">https://jsfiddle.net/qLy7gk3f/3/</a></p>
<p>The code i... | 0debug |
static always_inline target_phys_addr_t get_pgaddr (target_phys_addr_t sdr1,
int sdr_sh,
target_phys_addr_t hash,
target_phys_addr_t mask)
{
return (sdr1 &... | 1threat |
static void gen_mtc0(DisasContext *ctx, TCGv arg, int reg, int sel)
{
const char *rn = "invalid";
if (sel != 0)
check_insn(ctx, ISA_MIPS32);
if (ctx->tb->cflags & CF_USE_ICOUNT) {
gen_io_start();
}
switch (reg) {
case 0:
switch (sel) {
case 0:
... | 1threat |
Show hiden table on parent row click : I have rows but one row one row is hidden and I need to show them when I click on parent row link .btn-link ...
I have html:
<tr>
<td><a href="#" class="btn-link"> <i class="fa fa-plus-circle" aria-hidden="true"></i> Details
</a>
</td>
... | 0debug |
static void test_hash_digest(void)
{
size_t i;
g_assert(qcrypto_init(NULL) == 0);
for (i = 0; i < G_N_ELEMENTS(expected_outputs) ; i++) {
int ret;
char *digest;
size_t digestsize;
digestsize = qcrypto_hash_digest_len(i);
g_assert_cmpint(digestsize * 2... | 1threat |
uint64_t blk_mig_bytes_remaining(void)
{
return blk_mig_bytes_total() - blk_mig_bytes_transferred();
}
| 1threat |
How to create a Image Dataset just like MNIST dataset? : <p>I have 10000 BMP images of some handwritten digits. If i want to feed the datas to a neural network what do i need to do ? For MNIST dataset i just had to write</p>
<pre><code>(X_train, y_train), (X_test, y_test) = mnist.load_data()
</code></pre>
<p>I am usi... | 0debug |
Is there an actual 8-bit integer data type in C++ : <p>In c++, specifically the cstdint header file, there are types for 8-bit integers which turn out to be of the char data type with a typedef. Could anyone suggest an actual 8-bit integer type?</p>
| 0debug |
Jquery ajax POST method not working : I am trying to execute the ajax operation. the call is working fine but the problem I am having is that I am getting an empty string as a response. there is no error in the console. all I get is an empty string. Even when I change the dataType to JSON, I still get the same response... | 0debug |
Bash: How to leave a process running even after it's user logs out : <p>The only way i've heard of is using the cron, but id rather do it ad hoc. Is there another way in bash?</p>
| 0debug |
expand an array of arrays to an array of objects : <p>I have an array of arrays and I need to make the first member in each nested array into a key, and make an array of objects from the rest. Where each odd member after the first is key and an even member is value.</p>
<p>See the example: note that the original neste... | 0debug |
How to use requestReview (SKStoreReviewController) to show review popup in the current viewController after a random period of time : <p>I've read about this new feature available in iOS 10.3 and thought it will be more flexible and out of the box. But after I read the <a href="https://developer.apple.com/reference/s... | 0debug |
Configure different timeouts in gunicorn for different endpoints? : <p>Gunicorn allows configuring a timeout for requests, as demonstrated in their documentation below. This seems to be a global configuration for the entire application.</p>
<p>Is it possible to configure different timeouts for different endpoints? Per... | 0debug |
Sammy.js cache and scroll position when going back in history : <p>I don't know if anyone is still using Sammy.js, but I found it perfectly suits my needs for a lightweight routing and templating library. If anyone has other ideas, please let me know.</p>
<p>My problem is that when I have a long page and I scroll down... | 0debug |
loan payment project in Python : I am learning Python and am stuck. I am trying to find the loan payment amount. I currently have:
def myMonthlyPayment(Principal, annual_r, n):
years = n
r = ( annual_r / 100 ) / 12
MonthlyPayment = (Principal * (r * ( 1 + r ) ** years / (( 1 + r ) ** (years - 1)... | 0debug |
static void spatial_compose97i(IDWTELEM *buffer, int width, int height, int stride){
dwt_compose_t cs;
spatial_compose97i_init(&cs, buffer, height, stride);
while(cs.y <= height)
spatial_compose97i_dy(&cs, buffer, width, height, stride);
}
| 1threat |
Check the User Whether Exist in Azure AD from WPF application : <p>I have a WPF application and its authentication is AzureAD. If any new user comes then first we will add that user in Azure AD and after that we will add the same user to our WPF application. While adding that user to WPF we need to verify that user is ... | 0debug |
I want to write a function that prints a sum : I just started python a few weeks ago and I want to write a function that opens a file, counts and adds up the characters in each line and prints that those equal the total number of characters in the file.
For example, given a file test1.txt:
lineLengths('test1.txt'... | 0debug |
Use a different user.email and user.name for Git config based upon remote clone URL : <p>I configure my global <code>~/.gitconfig</code> properties <code>user.name</code> and <code>user.email</code> like this:</p>
<p></p>
<pre><code>git config --global user.email "mkobit@example.com"
git config --global user.name "m... | 0debug |
void qio_channel_socket_listen_async(QIOChannelSocket *ioc,
SocketAddress *addr,
QIOTaskFunc callback,
gpointer opaque,
GDestroyNotify destroy)
{
QIOTask *task = ... | 1threat |
what is the $row variable in php? and whats the duty of $row variable in php? : function getCats() {
global $con;
$get_cats = "select * from categories"; //select from database
$run_cats = mysqli_query($con, $get_cats); //
while($row_cats = mysqli_fetch_array($run_cats)) {
$cat_id = $row_cats['c... | 0debug |
Formatting date from JSON response - only shows January? : <p>I am trying to get the right date to display but no matter what I do, or the date, it changes the month to January. What am I doing wrong?</p>
<pre><code> private static String formatDate(String dateFormat) {
String jsonDate = "yyyy-mm-dd'T'HH:mm:ss'Z'... | 0debug |
PHP & HTML - echo li tag without break line : <p>i have this code:</p>
<pre><code> <ol>
<?php foreach ($articles as $article) { ?>
<li>
<img src="public_html/images/example.jpg" height="250" width="250">
<br />
<a href="public_html/article.php?id=<?ph... | 0debug |
Event Handlers in React Stateless Components : <p>Trying to figure out an optimal way to create event handlers in React stateless components. I could do something like this:</p>
<pre><code>const myComponent = (props) => {
const myHandler = (e) => props.dispatch(something());
return (
<button o... | 0debug |
raw_co_writev_flags(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
QEMUIOVector *qiov, int flags)
{
void *buf = NULL;
BlockDriver *drv;
QEMUIOVector local_qiov;
int ret;
if (bs->probed && sector_num == 0) {
QEMU_BUILD_BUG_ON(BLOCK_PROBE_BU... | 1threat |
How to assign one variable value to new variable value in Javascirpt Angular2 : I trying to creating a new dynamic array. I assigned one dynamic variable value to another new variable and pushing new array. But updating last array variable value. How to do without setTimout(function())
Code
----
for(let i=0... | 0debug |
syntax error, unexpected keyword_end, expecting ')' : <p>I have a script called <code>import.rb</code> which will import json content from url to drafts directory.</p>
<pre><code>require 'fileutils'
require 'json'
# Load JSON data from source
# (Assuming the data source is a json file on your file system)
data = JSON... | 0debug |
minimac2_write(void *opaque, target_phys_addr_t addr, uint64_t value,
unsigned size)
{
MilkymistMinimac2State *s = opaque;
trace_milkymist_minimac2_memory_read(addr, value);
addr >>= 2;
switch (addr) {
case R_MDIO:
{
int mdio_di = (s->regs[R_MDIO] & ... | 1threat |
I need help for my form validation.I dont get error msgs all at once but appears only at the first text of name 'first name' : my Html code:<body>
<img id="logo2" src="logo2.jpg">
<div id="request-container">
<h2>REQUEST A DEMO</h2>
<div id="request">
<p>First Name *</p>
... | 0debug |
How to set "Selection" scope of search & replace in VS 2015 : <p>When I select a text block in text editor and open the search & replace window (Ctrl+H), the search & replace scope is set to "Selection" automatically in VS 2013 and the olders. </p>
<p>In VS 2015, the scope is always set to "Current document".<... | 0debug |
How to specify the size of the icon on the Marker in Google Maps V2 Android : <p>In may app i use Map from Google Maps V2 and in this map i am trying to add markers each Marker with an icon, but the marker is taking the size of the icon which is making the icon looks flue.
How can i specify the size of the marker in <s... | 0debug |
Updating Visual Studio 2015 extensions end up disabled : <p>I have a machine with seems to repeat the following pattern with VS2015 (including all patches).</p>
<ol>
<li>Install an extension and it's fine, works perfectly.</li>
<li>The developer of the extension releases a new update.</li>
<li>Update extension, which ... | 0debug |
ssize_t iov_send_recv(int sockfd, struct iovec *iov,
size_t offset, size_t bytes,
bool do_sendv)
{
int iovlen;
ssize_t ret;
size_t diff;
struct iovec *last_iov;
iovlen = 1;
last_iov = iov;
bytes += offset;
while (last_iov->... | 1threat |
Ajax success function not executing after getting response : <p>Following is my code:</p>
<pre><code>$(".simpleCart_shelfItem button").click(function() {
$(this).prop('disabled', true);
$(this).addClass('disabled');
$(this).html("Adding &nbsp;&nbsp;<i class='icon-spinner9... | 0debug |
sql server Same City and same Salary record Finding :
This is my Qurey for finding matching Record But Same Salary Condition Not Working
i i want Multiple Same City And Multiple Same Salary Record
select distinct t1.Name,t1.Salary,t1.City from Test t1 , test t2
where
t1.City=t2.City and t1.Salary<>t2.Salar... | 0debug |
Merge 3 Excel files into 1 excel file. (xlsx) : Hello i am parsing some data into a excel sheet and i am generating 3 excel sheets(Compliance1.xls,Compliance2.xls,Compliance3.xls) by using the below code:
owb.SaveAs(Input_File+@"\Compliance1.xls",Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, Type.M... | 0debug |
static int vtd_iova_to_slpte(VTDContextEntry *ce, uint64_t iova, bool is_write,
uint64_t *slptep, uint32_t *slpte_level,
bool *reads, bool *writes)
{
dma_addr_t addr = vtd_get_slpt_base_from_context(ce);
uint32_t level = vtd_get_level_from_context_e... | 1threat |
read an string array as property name? : <pre><code>newDesign = {
color: 'blue',
shape: 'round'
}
oldDesign = {
color: 'yellow',
shape: 'triangle'
}
</code></pre>
<p>I want to compare this two design to see if their field is changed, so I write these:</p>
<pre><code>fields = [ 'color', 'shape' ]
for ... | 0debug |
Clear React Native TextInput : <p>Working through the Redux AddTodo example in React Native. The first AddTodo example below uses state to store the TextInput value and works fine.</p>
<pre><code>class AddTodo extends React.Component{
constructor(props){
super(props);
this.state = { todoText: "" }... | 0debug |
I'm having a problem with nested loop c++ : I am a noobe in c++ ans I'm having problem with nested loops. Could you please help me and tell me where I'm mistaking
main()
{
int n, sum=0;
printf("ENTER NUMBER:");
scanf("%i",n);
while(n>0)
{
sum+=n;
n--;
... | 0debug |
How can I move a window to another session in tmux? : <p>In tmux, how can I move a window from a session to another session?</p>
<p>ex. move window:4 in session [0] to session [4] .</p>
| 0debug |
void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length)
{
int i, j, left;
align_get_bits(gb);
left = get_bits_left(gb) >> 3;
l->bytestream_start =
l->bytestream = gb->buffer + get_bits_count(gb) / 8;
l->bytestream_end = l->bytestream_start + left... | 1threat |
how to make my android app doesn't work in certain android phones : I have a strange question a little bit but I really need your help,
can I make my android app doesn't work on certain Android phones ? for example I don't want my app to work on Samsung J5 2016 Phones, can I do that? I will be thankful for your hel... | 0debug |
If we want use S3 to host Python packages, how can we tell pip where to find the newest version? : <p>we are trying to come up with a solution to have AWS S3 to host and distribute our Python packages. </p>
<p>Basically what we want to do is using "python3 setup.py bdist_wheel" to create a wheel. Upload it to S3. Then... | 0debug |
Date format problem in c#? while retriving data from excel : Below is the image of my code please have a look on it.
I am trying to retrive data from excel sheet and storing it into database table through sql bulkcopy.
Error:
The date format is:05-01-2019
It insert 2019-05-01 (database) incorrect
correct date is=... | 0debug |
Launching my webview app when my website url cliks or open : <p>I have a website and WebView app based on it. my website link is like <a href="http://website.in/" rel="nofollow noreferrer">http://website.in/</a>. when the user tries to open this link and associated links like <a href="http://website.in/post_name/" rel=... | 0debug |
Write a MATLAB code to compute and determine the convergence rate : Write a MATLAB code to compute and determine the convergence rate of :
(exp(h)-(1+h+1/2*h^2))/h with h=1/2, 1/2^2,..., 1/2^10
my code was:
h0=(0.5)^i;
TOL=10^(-8);
N=10;
i=1;
flag=0;
table=zeros(30,1);
table(1)=h0
while i ... | 0debug |
How do I print DIV content of HTML to printer with Javascript only? : <p>I needed to print the content of HTML div. For that I have added a button. I am trying to call a function onclick of button to print the div content using Javascript.</p>
| 0debug |
valarray with arithmetic operations return type : <p>When I write a simple arithmetic expression with <code>valarray</code> and assign the result to <code>auto</code> I get a segfault when I try to access the result on gcc.</p>
<pre><code>#include <iostream>
#include <valarray>
using std::ostream; using st... | 0debug |
Replace vector of vector with flat memory structure : <p>I have the following type:</p>
<pre><code>std::vector<std::vector<int>> indicies
</code></pre>
<p>where the size of the inner vector is always 2. The problem is, that vectors are non-contiguous in memory. I would like to replace the inner vector wit... | 0debug |
UIButton press not working with an IF statement (XCODE/SWIFT) : I am currently trying to get an IF statement working only when the user presses on the UIButton which will then run the `self.eslTopics.isHidden = false` in order to show my UIPickerView, what is the correct syntax of writing the if statement? i currently ... | 0debug |
Angular 6 RXJS Import Syntax? : <p>I'm migrating an Angular 5 app to the latest CLI and Angular 6 RC and all of my Observable imports are broken. I see that Angular 6 changes the way the imports work, but I can't find any definite reference as to how the syntax works.</p>
<p>I had this in 5 and it worked fine:</p>
<p... | 0debug |
how can I cache ID tokens from cognito for subsequent hits to API gateway? : how to implement this scenario in AWS?
the user hits a API endpoint in API gateway, Cognito is used for verification. the user passes access id (after successful Cognito verification) to API gateway, then once the access token is exchanged ... | 0debug |
How to install jenkins plugins from command line? : <p>Is there any option to install jenkins plugins from command line ?</p>
<p>I found a command for this after a bit google search : </p>
<pre><code>java -jar /var/lib/jenkins/jenkins.war -s http://127.0.0.1:8080/ install-plugin ${Plugin_Name}
</code></pre>
<p>But i... | 0debug |
Creating sequence of lists from content of one list : <p>Trying to solve the following problem:</p>
<p>I have a large collection which I will represent by the following example list:</p>
<pre><code>lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
</code></pre>
<p>How do I splice up this list and return ... | 0debug |
Angular 2 template driven form with ngFor inputs : <p>Is it possible to create input fields with a ngFor in a template driven form and use something like #name="ngModel" to be able to use name.valid in another tag?</p>
<p>Right now we have a dynamic list of products with a quantity field and a add to cart button in a ... | 0debug |
How do I insert one value into one column? : <p>I need to get a value from a field on front end application that is connected to the DB. The thing is I would like to insert the single value entered into One column in a table that has multiple columns.</p>
| 0debug |
Infinite Recursion in Java? : <p>Obviously the following recursion in Java will cause stack overflow error:</p>
<pre><code>public class XXX {
public static void main(String[] args) {
main(null);
}
}
</code></pre>
<p>But what if I catch this error and invoke the function again?</p>
<pre><code>public c... | 0debug |
void s390_io_interrupt(S390CPU *cpu, uint16_t subchannel_id,
uint16_t subchannel_nr, uint32_t io_int_parm,
uint32_t io_int_word)
{
if (kvm_enabled()) {
kvm_s390_io_interrupt(cpu, subchannel_id, subchannel_nr, io_int_parm,
io_i... | 1threat |
Kotlin sorting nulls last : <p>What would be a Kotlin way of sorting list of objects by nullable field with nulls last? </p>
<p>Kotlin object to sort:
</p>
<pre><code>@JsonInclude(NON_NULL)
data class SomeObject(
val nullableField: String?
)
</code></pre>
<p>Analogue to below Java code:</p>
<pre class="lang-jav... | 0debug |
How to use docker deploy in docker-compose 3? : <p>When I make command <code>sudo docker stack deploy -c docker-compose.yml test</code></p>
<pre><code>Ignoring unsupported options: build, external_links, links, restart
Updating service test_cache (id: me2vh1lffrl4ppzomphin167la)
Updating service test_lb (id: ycnne1if... | 0debug |
nodejs push is not a function : <p>I have difficulty making a collection of a class</p>
<p>Match example</p>
<p>and matches</p>
<p>matches is a collection of match</p>
<p>my class match:</p>
<pre><code>const uuid = require("uuid");
// Match class is a single game Match structure
class Match {
constructor(playe... | 0debug |
Why Array of ArrayLists Does't work in Java? : <p>I'm using an Array of ArrayLists of Integer in Java but it can't run. Every time I get the message
"Note: Goal.java uses unchecked or unsafe operations." and
"Note: Recompile with -Xlint:unchecked for details." after compile and when I want to run it message "Exception ... | 0debug |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.