problem stringlengths 26 131k | labels class label 2
classes |
|---|---|
What are the programming languages for stalking facebook friends : <p>I would like your guidance. Could you suggest me a programming languages capable of monitoring my Facebook friends activity?
By activity I mean:</p>
<ul>
<li>Know when they get online</li>
<li>Know when they post something</li>
<li>Know which are m... | 0debug |
How do I cout items right below the category? : [image][1]
[1]: http://i.stack.imgur.com/zvKLa.png
Yeah so I guess the question is self evident from the image,I want the output text to be right below its category(eg. ID, name etc.)
Here is the code snippet:
FILE *fp;
fp = fopen("Records.txt... | 0debug |
diference c++ passing argument methods : What is the difference in passing base class constructor in your derived class in these two different ways 1) Dog::Dog(string input_name , int input_age ): Pet(input_name, input_age) { } 2) Dog::Dog(string input_name , int input_age ) {Pet(input_name, input_age) } | 0debug |
How to DRY when using Swagger UI and the ApiResponses annotations with Java Spring endpoints? : <p>I like <code>Swagger</code> because it makes your apis very user friendly. I use <code>Swagger</code> annotations like</p>
<ul>
<li>@ApiParam </li>
<li>@ApiResponse | @ApiResponses </li>
<li>@ApiOperation </li>
<li>Other... | 0debug |
int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec,
struct in_addr addr, int port)
{
struct ex_list *tmp_ptr;
for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) {
if (port == tmp_ptr->ex_fport &&
addr.s_addr == tmp_ptr->ex_addr.s_addr)
return -1;
}
tmp_ptr... | 1threat |
android studio : error in Type in number in edittext then do math on it and show result : hi the title says it all
here is the code
public class Main2Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance... | 0debug |
Multiple jenkinsfile in one repository : <p>We have a project in a Github repository with multiple Jenkinsfiles:</p>
<pre><code>my-project
app
Jenkinsfile
lib1
Jenkinsfile
lib2
Jenkinsfile
</code></pre>
<p>We have created 3 Jenkins pipelines each referring to a Jenkinsfile.
<a href="https://i.stack.... | 0debug |
static int msvideo1_decode_init(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
s->avctx = avctx;
if (s->avctx->palctrl) {
s->mode_8bit = 1;
avctx->pix_fmt = PIX_FMT_PAL8;
} else {
s->mode_8bit = 0;
avctx->pix_fmt = PIX_FMT_RGB555;
... | 1threat |
Voximal : Unable to call asteri : I try to get the softphone connected to our instance for playing with our app,
but I failed to get the psw
https://wiki.voximal.com/doku.php?id=installation_guide:softphone:start
In the web Interface is no psw mentioned
And for the astreisk console, I got no Access to cli , e... | 0debug |
My C code gives me result that is not correct(array operation) : It should be simple,two arrays,one with 5 other with 6 elements.
#include <stdlib.h>
#include <stdio.h>
int main()
{
int i=0;
int k=0;
int v[5] = {2,3,4,5,6};
int g[6];
for( i = 1; i <= 6; i++ ){
... | 0debug |
Extracting Value from JSON variable : <p>I'm trying to extract a value called "balanceStr" from a web scraper I'm making, but I'm not having much luck!</p>
<p>Here's where I got so far:</p>
<pre><code>import requests
import json
url = "https://www.hpbscan.org/HpbScan/addrs/getAddressDetailInfo"
headers = {'Content-T... | 0debug |
static int fill_note_info(struct elf_note_info *info,
long signr, const CPUState *env)
{
#define NUMNOTES 3
CPUState *cpu = NULL;
TaskState *ts = (TaskState *)env->opaque;
int i;
(void) memset(info, 0, sizeof (*info));
TAILQ_INIT(&info->thread_list);
info->notes = qemu_mallocz... | 1threat |
qemu_irq sh7750_irl(SH7750State *s)
{
sh_intc_toggle_source(sh_intc_source(&s->intc, IRL), 1, 0);
return qemu_allocate_irqs(sh_intc_set_irl, sh_intc_source(&s->intc, IRL),
1)[0];
}
| 1threat |
int64_t qemu_strtosz_MiB(const char *nptr, char **end)
{
return do_strtosz(nptr, end, 'M', 1024);
}
| 1threat |
i wrote a code for binary search and kept getting this error "TypeError: unsupported operand type(s) for //: 'list' and 'int'" : def binary_search(arr,val):
if len(arr)==0 or len(arr)==1 and arr[0]!=val:
return false
mid=arr[len(arr)//2]
if val==mid:
return true
if val<mid:
return binary_se... | 0debug |
How the gitlab-ci cache is working on docker runner? what is /cache directory? what is cache_dir? : <ol>
<li><p>How the gitlab-ci cache is working on docker runner? </p></li>
<li><p>What is /cache directory? </p></li>
<li><p>What is cache_dir?</p></li>
<li><p>Where and how files matching the <a href="https://docs.gitla... | 0debug |
Read an excel file on asp.net core 1.0 : <p>Hello I`m trying to upload and read an excel file on my asp.net project but all the documentation I find is for ASP MVC 5.
My goal is to read the excel sheet and pass the values to an list of objects.</p>
<p>This is my controller, it works for upload the file to my wwwroot/u... | 0debug |
static int mono_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer)
{
int category_index[128];
int quant_index_table[102];
int category[128];
int ret;
memset(&category, 0, sizeof(category));
memset(&category_index, 0, sizeof(category_index));
if ((ret = decode_envel... | 1threat |
Getting the ClaimsPrincipal in a logic layer in an aspnet core 1 application : <p>I'm writing an aspnet core 1 application.
Using a bearer token authentication I have the User property inside the controller with the correct identity. However I cant seem to find a way to grab with identity as I did before using the <cod... | 0debug |
RestFuse vs Rest Assured vs MockMVC Rest Service Unit Test Framework : <p>I've been trying to find a simple all purpose unit test framework for Spring MVC based Rest Services I've written.</p>
<p>I've been searching online and narrowed it down to:</p>
<ul>
<li>RestFuse (<a href="http://developer.eclipsesource.com/res... | 0debug |
Problem with SDL_FINGERDOWN : I don't why SDL_FINGERDOWN records
even simple touch event.It should register on Sliding finger down as name says right?I use android N for testing
Here is my code
#include "SDL.h"
#include <SDL2/SDL.h>
#include<iostream>
using namespace std;
int ... | 0debug |
Deal with relative and absolute path : My script should open file properly whether it gets relative or absolute path as an argument.
There is something shorter and better that this my try?
def main():
if os.path.isabs(sys.argv[1]):
filename = sys.argv[1]
else:
... | 0debug |
static void compute_pts_dts(AVStream *st, int64_t *ppts, int64_t *pdts,
int64_t timestamp)
{
int frame_delay;
int64_t pts, dts;
if (st->codec.codec_type == CODEC_TYPE_VIDEO &&
st->codec.max_b_frames != 0) {
frame_delay = (st->codec.frame_rate_base * 900... | 1threat |
resources when opening a website : When we open a website, the browser will retrieve other resources, not just the site link itself. I'd like to know what are all those resources and the links that browser connect during a site's open. Is there a tool to determine this thing?
Thanks everyone. | 0debug |
TSLint in Visual Studio 2015/2017? : <p>My organization uses <a href="https://github.com/palantir/tslint/" rel="noreferrer">TSLint</a> pretty heavily for quality-checking our Typescript code, and it provides a valuable service to us! However, we use Visual Studio 2015 & 2017 as our main IDE and the only way to get... | 0debug |
read, compare, and save 2 files with shell script (little more then what it sounds like) : <p>So I didn't quite get the answer I was looking for before, so here we go again;</p>
<p>I'm creating a script that searches IPs from a.csv log file against pre-defined blacked IP lists. </p>
<p>It first imports the log file, ... | 0debug |
static void get_aac_sample_rates(AVFormatContext *s, AVCodecContext *codec,
int *sample_rate, int *output_sample_rate)
{
MPEG4AudioConfig mp4ac;
if (avpriv_mpeg4audio_get_config(&mp4ac, codec->extradata,
codec->extradata_size * 8, 1) <... | 1threat |
static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx,
HEVCPPS *pps, HEVCSPS *sps) {
int i;
if (pps->transform_skip_enabled_flag) {
pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2;
}
pps->cross_component_prediction_e... | 1threat |
Updating sqlalchemy with boolean value from form : <p>I'm trying to update a row in a database table with a value from a wtforms BooleanField. When creating the row, it's inserted into the database with no problem, but when updating I get the error below.</p>
<p>When reading around this issue, it seems it's something ... | 0debug |
Factoring try catch : <p>I have a Java EE application with dozens of web services using the same pattern:</p>
<pre><code>public Response myWebService1() {
try {
// do something different depending on the web service called
} catch (MyCustomException e1) {
return Response.status(409).build();
... | 0debug |
How to get week name from selected date month and year in android? : I tried below code but it gives two days ago week name
DatePicker picker;
int date = picker.DayOfMonth;
int month = (picker.Month + 1);//month is 0 based
int year = picker.Year;
SimpleDateFormat simpledatefor... | 0debug |
Angular 2: How to prevent a form from submitting on keypress enter? : <p>I have a form with one field that acts as autocomplete. If the user enters a word and presses enter, the content of the field should be added to a list below the field.</p>
<p>The problem: When the user hits enter, naturally the whole form is bei... | 0debug |
static inline int get_phys_addr(CPUState *env, uint32_t address,
int access_type, int is_user,
uint32_t *phys_ptr, int *prot,
target_ulong *page_size)
{
if (address < 0x02000000)
address += env->cp15.... | 1threat |
Nested arrays in Angular 2 reactive forms? : <p>I have use the following tutorial to create reactive forms in Angular 2 and it works well.</p>
<p><a href="https://scotch.io/tutorials/how-to-build-nested-model-driven-forms-in-angular-2" rel="noreferrer">https://scotch.io/tutorials/how-to-build-nested-model-driven-forms... | 0debug |
dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum,
enum dshowDeviceType devtype, IBaseFilter **pfilter)
{
struct dshow_ctx *ctx = avctx->priv_data;
IBaseFilter *device_filter = NULL;
IEnumMoniker *classenum = NULL;
IMoniker *m = NULL;
const char *device_n... | 1threat |
find_element_by_class_name does not work with python : I am trying to fill out a form, using selenium and python.
I am using find_element_by_class_name in the following code and it is not working. I have no idea why as with java it works...
url='https://service.mail.com/registration.html'
driver = webdriver... | 0debug |
Firebase hosting with only ONE A record : <p>I have my client's domain registered via 1and1.com </p>
<p>To connect the domain to the Firebase hosting, Firebase asks me to add <em>TWO</em> A records with 2 IPs. In 1and1 we can only add <em>ONE</em> A record. Yesterday Firebase sent me this message by mail </p>
<blockq... | 0debug |
Issue creating a save as function in python : Im trying to create a function to save data taken from multiple Entry widgets in my code and create a new save file storing the data from all the entries, i made a entry list called entries and try to pull from that but cant get it quite right. It will create the file but i... | 0debug |
Date conversion with condition : Please feel free to suggest me to change the title.
I have a hire date column and I want to assign specific Tiers depending on employee work years with the following conditions:
1-4 years = T1
5-9 years = T2
10-15 years = T3
15+ years = T4
For e... | 0debug |
static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
int mvn, int r_x, int r_y, uint8_t* is_intra)
{
MpegEncContext *s = &v->s;
int xy, wrap, off = 0;
int A[2], B[2], C[2];
int px, py;
int a_valid = 0, b_valid = 0, c_valid = 0;
... | 1threat |
How to configure "git pull --ff-only" and "git merge --no-ff" : <p>A typical git workflow for me is to clone a remote repository and use git pull to keep it up-to-date. I don't want merge commits when I pull, so i use the --ff-only option.</p>
<p>I also make local branches for feature work. I want to preserve the bran... | 0debug |
Iterate on arry of json objects in go : I just started learning Go and trying to iterate through each element of array of json objects.
I tried the following.
package main
import (
"encoding/json"
"fmt"
)
type itemdata []string
func main() {
var birds it... | 0debug |
int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
{
int i, av_uninit(j);
int current_ref_assigned = 0, err = 0;
H264Picture *av_uninit(pic);
if ((h->avctx->debug & FF_DEBUG_MMCO) && mmco_count == 0)
av_log(h->avctx, AV_LOG_DEBUG, "no mmco here\n");
fo... | 1threat |
db.execute('SELECT * FROM employees WHERE id = ' + user_input) | 1threat |
RxJs: poll until interval done or correct data received : <p>How do i execute the following scenario in the browser with RxJs:</p>
<ul>
<li>submit data to queue for processing</li>
<li>get back the job id</li>
<li>poll another endpoint every 1s until result is available or 60seconds have passed(then fail)</li>
</ul>
... | 0debug |
how to make program code for application that can calculate postage of goods with android app : [See image][1]
i learning make a application, the application have function to calculate postage of goods from a airport of origin to airport destination
the process description is as follows:
1. choose a airport origin
... | 0debug |
bluebird.js vs bluebird.core.js what is the difference? : <p>What is the difference between bluebird.js and bluebird.core.js? </p>
<p>When should I use bluebird.core.js instead of bluebird.js? </p>
<p>I haven't been able to find anything in the <a href="http://bluebirdjs.com/docs/getting-started.html">bluebird site</... | 0debug |
Vertical aligning a <span> text in a header in React : <p>I have a react header component that looks like this:</p>
<pre><code>const Header = () => {
return (
<div className="navbar">
<div className="logo-container">
<img id='logo' alt='header-logo' src={Logo}/... | 0debug |
kafka broker not available at starting : <p>I set on a ubuntu node of a cluster a kafka 0.11.0.0 instance.
Until some weeks ago everything worked fine, today I'm trying to starting it and I obtain this error after the boot:</p>
<pre><code>[2017-09-11 16:21:13,894] INFO [Kafka Server 0], started (kafka.server.KafkaServ... | 0debug |
C++ Class won't execute function : <p>I want to write a simple backup program. Its not finished yet, but i've encountered a problem: My class responsible for setting the right path wont execute the worker which will copy the file. I don't know why and yes - i already looked up on any helping site i know. Here is my fil... | 0debug |
Android Studio Install Disappears : <p>I'm trying to install the latest Android Studio.</p>
<p>Environment:</p>
<p>Windows7 64-bit
JDK v12</p>
<p>I run the installer, and then it disappears after the initial setup progress dialog. Is there any way to troubleshoot this?</p>
<p><a href="https://youtu.be/y1ueVCxyhdo" ... | 0debug |
React-navigation: Deep linking with authentication : <p>I am building a mobile app with react-native and the react-navigation library for managing the navigation in my app. Right now, my app looks something like that:</p>
<pre><code>App [SwitchNavigator]
Splash [Screen]
Auth [Screen]
MainApp [StackNavigato... | 0debug |
void qemu_cpu_kick(void *_env)
{
CPUState *env = _env;
qemu_cond_broadcast(env->halt_cond);
if (!env->thread_kicked) {
qemu_cpu_kick_thread(env);
env->thread_kicked = true;
}
}
| 1threat |
How can the nested loops of unknown layers be implemented by recursion? : <p>int m =10;</p>
<pre><code> int n = 9;
int p = 4;
int q = 7;
for(int i=0;i<m;i++){
int a = i;
for(int j=0;j<n;j++){
int b = j;
if(b==a){
continue;
... | 0debug |
Jquery - Get all the option fields of a select and save the value and id and compare with var string and is inside : I have a select with several option, each option has an id and the value.
This select is loaded with an ajax in jquery.
There is also a string variable that contains a text, with which you would ha... | 0debug |
Passing value by refrence : can some one explain completely that what is the this?????
struct p{
int x;
int y;
struct p *ptr;
};
I can't understand the line that we again write struct p.
| 0debug |
Odd element transfer (Arrays) : this.blockHeights = new int[] { 1, 2, 1, 1, 2, 1, 2, 1 };
int x = blockHeights.length/2;
int leftSource[] = new int[x];
System.out.println(x);
int j = 0;
for (int i = 0; i < x; i++)
{
if ((blockHeights[i]%2 == 0) || (i == 0)) //odd-elements
{
left... | 0debug |
Access strings which is inside the list : Python list has ['12:30','12:45'] and I want to access the '12:30' for the first iteration and the second iteration I should get '12:45'
my_list=['12:30','12:45']
for each_value in my_list:
print(each_value[0])
my_list=['12:30','12:45']
for each_value in my_list:... | 0debug |
static void mkv_write_simpletag(AVIOContext *pb, AVDictionaryEntry *t)
{
uint8_t *key = av_strdup(t->key);
uint8_t *p = key;
const uint8_t *lang = NULL;
ebml_master tag;
if ((p = strrchr(p, '-')) &&
(lang = av_convert_lang_to(p + 1, AV_LANG_ISO639_2_BIBL)))
*p = 0;
... | 1threat |
static int adpcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
uint8_t *buf, int buf_size)
{
ADPCMContext *c = avctx->priv_data;
ADPCMChannelStatus *cs;
int n, m, channel, i;
int block_predictor[2];
short *samples;
... | 1threat |
How to save secret key securely in android : <p>I just read this article <a href="http://android-developers.blogspot.in/2013/02/using-cryptography-to-store-credentials.html" rel="noreferrer">http://android-developers.blogspot.in/2013/02/using-cryptography-to-store-credentials.html</a> where I learnt to generate securit... | 0debug |
C# Syntax beyond me, a beginner : <p>Okay, so still very new to C#, so sorry if this is obvious...</p>
<p>There is some code I can't follow that was created by someone who is much better at C#than I am.</p>
<p>We have a class, call it "CC", and it has a number of fields, one of which is "FORM_NBR".</p>
<p>So, in a n... | 0debug |
Reducing array to simple format : I have array of
[
0: "United States"
1: "India"
2: "Germany"
3: "Brazil"
4: "Taiwan"
5: "Israel"
6: "United Kingdom"
]
I just want to make it like
["United States", "India", "Germany".....]
I already tried some codes like
... | 0debug |
START_TEST(unterminated_string)
{
QObject *obj = qobject_from_json("\"abc");
fail_unless(obj == NULL);
}
| 1threat |
Ruby simple bar graph challenge using arrays : I am really new to Ruby and am trying to solve the following challenge, which is to create a simple bar graph program using Ruby:
[Challenge picture][1]
[1]: https://i.stack.imgur.com/y6h3i.png
This is a challenge that comes as part of a tutorial on Arrays, s... | 0debug |
static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid)
{
MXFDescriptor *descriptor = arg;
switch(tag) {
case 0x3F01:
descriptor->sub_descriptors_count = avio_rb32(pb);
if (descriptor->sub_descriptors_count >= UINT_MAX / sizeof(UID))
... | 1threat |
systrace: Invalid trace result format for HTML output : <p>When I run
<strong>python systrace.py --time=10 -o mynewtrace.html gfx</strong> <br/>
The following error occurs<br></p>
<pre><code>Starting tracing (10 seconds)
Tracing completed. Collecting output...
<br>
</code></pre>
<blockquote>
<p><strong>Except... | 0debug |
static inline bool fp_access_check(DisasContext *s)
{
assert(!s->fp_access_checked);
s->fp_access_checked = true;
if (s->cpacr_fpen) {
return true;
}
gen_exception_insn(s, 4, EXCP_UDEF, syn_fp_access_trap(1, 0xe, false),
default_exception_el(s));
retur... | 1threat |
Best data-binding practice in Combine + SwiftUI? : <p>In RxSwift it's pretty easy to bind a <code>Driver</code> or an <code>Observable</code> in a <code>View Model</code> to some observer in a <code>ViewController</code> (i.e. a <code>UILabel</code>).</p>
<p>I usually prefer to build a pipeline, with observables <stro... | 0debug |
quickest way to swap index with values : <p>consider the <code>pd.Series</code> <code>s</code></p>
<pre><code>s = pd.Series(list('abcdefghij'), list('ABCDEFGHIJ'))
s
A a
B b
C c
D d
E e
F f
G g
H h
I i
J j
dtype: object
</code></pre>
<p>What is the quickest way to swap index and values ... | 0debug |
Please rate your Swift MVVM implementation : <p>I would like to be evaluated to ensure that Swift MVVM is implemented correctly.</p>
<p>Also, if there is anything else that can be supplemented, please modify it.</p>
<h1>1. AppDelegate.swift</h1>
<p>Before the ViewController is displayed, AppDelegate specifies a View... | 0debug |
Initializing multiple variables in one line C++ : #include <iostream>
using namespace std;
int main() {
cout << "input a single letter";
int var;
cin >> var;
int vowel = 'a','e','i','o','u';
int consonant = 'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','... | 0debug |
Differences between 2 pointers of a template : <p>I want to know if there is any difference between 2 pointers (as data members) in a template class. For example:</p>
<pre><code>template <typename E>
class Link
{
private:
E element;
Link* a;
Link<E>* b;
};
</code></pre>
<p>Is "a" analogous to ... | 0debug |
static void dbdma_cmdptr_load(DBDMA_channel *ch)
{
DBDMA_DPRINTF("dbdma_cmdptr_load 0x%08x\n",
be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO]));
cpu_physical_memory_read(be32_to_cpu(ch->regs[DBDMA_CMDPTR_LO]),
(uint8_t*)&ch->current, sizeof(dbdma_cmd));
}
| 1threat |
Is there any convenience way to get JSON element without type assertion? : I am mainly a python programmer and new Golang.
There are some inconvenience while processing JSON response from a web server.
For example, I don't know the data structure (and don't want to model it) of the JSON in advanced, and just want... | 0debug |
How to open the device selector every time i run the app in Android Studio? : <p>I have a real device and an emulator. When i first install the app , the IDE asks me to select between the two but on subsequent runs it does not ask me to choose. How do i get it to ask me every time? I tried clicking on stop app , but th... | 0debug |
ValueError: Unknown projection '3d' (once again) : <p><strong>Context:</strong> using Spyder version 3.3.4</p>
<p>When executing this line of code:</p>
<pre><code>import matplotlib.pyplot as plt
#your code
fig = plt.figure()
ax = fig.gca(projection='3d')
</code></pre>
<p>I have an output error:</p>
<pre><code>rai... | 0debug |
Why is the finally statement needed if there is no catch block? (Java) : My teacher was explaining how the `finally` statement is optional in a `try-catch` blockbut why is it absolutely necessary if there is no `catch` statement?
For example:
try{
for(int j = 0; j <= i.length; j++)
{
System.out.p... | 0debug |
Easiest way to update TextView or String from AsyncTask : <p>It know this is possible in multiple ways like with bundles, params... But what is the shortest easiest way to update a textview or string data from an AsyncTask's OnPostExecute method?</p>
| 0debug |
How to keep a scrollbar always bottom? : <p>I have a scroll-bar in a div element and initially it's position is top. Whenever i add some text to the div element then the scroll-bar does not move. Is there any way, the scroll-bar of the div element's position will be always bottom and whenever I add some text to the div... | 0debug |
I cant use two OnClickListeners? : I have been trying to use two OnClickListeners but I cant figure out how to do it right.
Could anyone help me fix my code?
btnClear.setOnClickListener(new View.OnClickListener() {
public void onClick(View paramView) {
... | 0debug |
Google Cloud Datastore: Full text search? : <p>I am developing a database app using Google Cloud Datastore but don't see any built-in way of doing full-text search on fields. Is there a google-cloud-native solution?</p>
<p>The alternative I see is either:</p>
<ol>
<li><p>Do full text search application side (read in... | 0debug |
new to ruby and don't understand yield : I come from a C#, java background and i don't know much about ruby. I have been piggy backing off my cousin's college course and all the work they get is fairly simple for me. I just got this one "while not being in that class and not having notes" looks like giberish to me. ... | 0debug |
Add from one array to another by click. Angularjs2 : I have a json like:
"data":
[{
"max":10,
"class":"selected"
"type":"numbers"
}]
I want to use an angular *NgIf or other loop, which will start from 1 and to 10 (my max value) and display all the numbers inside span like:
<sp... | 0debug |
Is there a difference between malloc() and creating a variable and then using the & operator? : <p>In C, is there a difference between</p>
<pre><code>struct Foo foo;
struct Foo* fooPtr = &foo;
</code></pre>
<p>and</p>
<pre><code>struct Foo* fooPtr = (struct Foo*) malloc(sizeof(struct Foo));
</code></pre>
| 0debug |
Dicom files in object detection problems : <p>I have faced with an issue of working with dicom files in object detection. I need to recognize various objects on the CT (computer tomography) images.</p>
<p>I tried to follow this tutorial. The author uses jpeg files for labeling the dataset, obtaining a csv file with th... | 0debug |
pip install netmiko error : Installing collected packages: setuptools, idna, ipaddress, enum34, cryptography, paramiko, scp, pyyaml, netmiko
Found existing installation: setuptools 1.1.6
Uninstalling setuptools-1.1.6:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip... | 0debug |
Ealuate jQuery code nested in the object when object is used : I have a JS object like:
{
'element1':{'redirectURI' : 'abc.php?toDate='+encodeURIComponent(jQuery('.dateField1').val())},
'element2':{'redirectURI' : 'pqr.php?&toDate='+encodeURIComponent(jQuery('.dateField2').val())}
};
I need th... | 0debug |
static void vnc_listen_read(void *opaque)
{
VncDisplay *vs = opaque;
struct sockaddr_in addr;
socklen_t addrlen = sizeof(addr);
vga_hw_update();
int csock = accept(vs->lsock, (struct sockaddr *)&addr, &addrlen);
if (csock != -1) {
vnc_connect(vs, csock);
}
}
| 1threat |
fill array with random but unique numbers in C# : <p>Okay I know there are few posts like this but I need to use only loops (for,do,while) and if, else to fill array with random but unique numbers so how shall i edit this code</p>
<pre><code> int[] x = new int[10];
Random r = new Random();
int ... | 0debug |
static void rm_read_metadata(AVFormatContext *s, int wide)
{
char buf[1024];
int i;
for (i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
int len = wide ? avio_rb16(s->pb) : avio_r8(s->pb);
get_strl(s->pb, buf, sizeof(buf), len);
av_dict_set(&s->metadata, ff_rm_metadata[i], buf, ... | 1threat |
TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op,
TCGOpcode opc, int nargs)
{
int oi = s->gen_next_op_idx;
int prev = old_op->prev;
int next = old_op - s->gen_op_buf;
TCGOp *new_op;
tcg_debug_assert(oi < OPC_BUF_SIZE);
s->gen_next_op_idx = oi + 1;
... | 1threat |
Unable to use sed to replace text with shell variable : <p>For some reason, the answer in the post below doesn't work for me. Any thoughts?<br>
<a href="https://stackoverflow.com/questions/15230020/how-to-use-sed-to-replace-a-string-in-a-file-with-a-shell-variable">how to use sed to replace a string in a file with a s... | 0debug |
how to edit strings in a list (PYTHON) : i am not so familiar with python, and i don't know how to do this.. So I have a list that looks like this:
animal_id = ['id01', 'id02', 'id03', 'id04', 'id05']
and I would like to make a new list from the list above, using string manipulation. and the new list should ... | 0debug |
void visit_type_uint32(Visitor *v, uint32_t *obj, const char *name, Error **errp)
{
int64_t value;
if (v->type_uint32) {
v->type_uint32(v, obj, name, errp);
} else {
value = *obj;
v->type_int64(v, &value, name, errp);
if (value < 0 || value > UINT32_MAX) {
... | 1threat |
SQL - Procedure & Query with SUM & return - Need help - Willing pay 15$ : I'am trying to do a **Procedure** with a sub query who do a **SUM**.
The procedure should list all items of <ProductFinished> (I.e Pizza etc) and list the ingredients , with unit price of ingredient and the total sum of cost of the finished prod... | 0debug |
Why cant I get a reference to a value in a map? : <p>I am quite confused about everything being a reference in most cases but sometimes not, and containers. Consider this piece of code:</p>
<pre><code>HashMap<Integer,String> x_map = new HashMap<>();
x_map.put(42,"foo");
String g = x_map.get(42);
g = "bar";... | 0debug |
How to convert seconds to minutes and hours in javascript : <p>I have a count of seconds stored in variable <code>seconds</code>. I want to convert for example 1439 seconds to 23 minutes and 59 seconds. And if the time is greater than 1 hour (for example 9432 seconds), to 2 hours, 37 minutes and 12 seconds.</p>
<p>How... | 0debug |
Angular 2 Material tooltip with HTML content in angular : <p>I am trying to bind the HTML strings into angular 2 tool tip. But it's rendering as HTML it showing as a plain string. Is there any way to do render string as an HTML.</p>
<p>Here is my code:</p>
<p>In View:</p>
<pre><code> <span class="icon-status" md... | 0debug |
static int dca_convert_bitstream(uint8_t * src, int src_size, uint8_t * dst,
int max_size)
{
uint32_t mrk;
int i, tmp;
uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst;
PutBitContext pb;
mrk = AV_RB32(src);
switch (mrk) {
case DCA_MARKER_RAW_BE:
m... | 1threat |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.