Newest Questions

Q&A for professional and enthusiast programmers

Remove Build Number from Version Number: 1.3.0.342 should be 1.3.0 in bash

For a Jenkins build script I need to remove the build number from the version. I need to end up with MajorVersion.MinorVersion.BugfixVersion. These numbers are not fixed to one digit. If they already ...

Access index from *ngFor outside *ngFor

I have this *ngFor inside a div: <div class="divRow" *ngFor="let userspec of userspecs; let i = index" id="ChosenCar"> Is it possible to access the i outside of the *ngFor? I would like to ...

NPEs with JavaFX's HTMLEditor

I wrote a relatively simple test class: public class Main extends Application { @Override public void start(Stage stage) { BorderPane root = new BorderPane(); Scene scene = new ...

Background and Y-axis changed in adding series in Excel

I added new series to existing graph. The graph background changed. In addition the Y-axis values disappeared. How can I add it so it will be same as the source graph? Why did both change? Here is the ...

Android release crashes upon start. Stuck for a few days. Please help. (adb logcat included)

Much easier to read my config and all here: https://github.com/facebook/react-native/issues/12013

custom wordpress post loop - hide iframe content

I am trying to create custom loop to display my posts in different styling. In my posts I have mostly youtube videos and some text around. I my posts loop I need to display only thumbnail of the ...

How can I move my logo 18px away from the left?

My logo for my website is supposed to be in the top left of the page. Which it is, but right now its a little bit too close to left side. I want to move it 18px to the right. But I just can't get it ...

How to use shared_ptr and custom reference counting simultaneously?

I have a legacy class whose lifetime is managed by reference counting (it derives from ACE_Event_Handler, to be precise). I want to be able to manage it using std::shared_ptr in my code but still ...

Self isn't defined, can't figure out why

So, for some reason, I keep getting a Namerror: 'self' is not defined. I can't figure out why, because to me everything seems to be in order. Also, if the indentation here looks off, I apologize, the ...

<JAVA> Camera Movement in OpenGL

I am currently trying to make a camera move in OpenGL for java which is in 3d. I am trying to use glRotatef and glTranslatef for rotating the camera and moving the camera using keyboard controls. Are ...

C# how to display image uploaded in html form on another page

I can do it easily with text by declaring string = this.TextBox1.Text; but cant work it out with Images Html: Image<input type='file' id ="ImgID" runat="server" onchange="readURL(this);" /> C#...

Add volume to a media file

I made a program able to play mp3 files like this: class Mp3Player : IDisposable { public bool Repeat { get; set; } public Mp3Player(string fileName) { const string FORMAT = @"...

Add lollipop sticks for point plots

How do I (if possible) add lollipop sticks to point plots? For instance, plot(1:10, sin(1:10)) How do I add a vertical line (lollipop stick) from each of the ten points to the x-axis? Do I need to ...

How to turn on Wifi Direct in android programmatically

I want to enable Wifi-Direct programmatically and get it's MAC addess to pass it to nearby devices to directly connect with it. I am able to get MAC address and pass it to other devices but it is not ...

(racket) cannot reference undefined identifier

I'm new to racket here's my situation. I have this piece of code: (define (f n) (if (or (< n 3) (= n 3)) ;return n n (+ (f (- n 1)) (* 2 (f (- n 2))) (* 2 (f (- n 3)))))) In ...

Volley Unexpected response code 401

i'm trying to make login with API. but it's still appear unexpected response code 401. i already put the override application/x-www-form-urlencoded. BasicNetwork.performRequest: Unexpected response ...

How to stop centering the map region to user's current location after user pans/moves the map

I have an app that displays a mapView, sets region and centers it to the user's current location. It also displays various annotations. When a user drags/pans the map the didUpdate userLocation ...

In the stripe invoice.payment_succeeded webhook, how can I distinguish between a subscription creation and renewal

According to the docs, invoice.payment_succeeded is fired both on subscription creation and on renewal. https://stripe.com/docs/subscriptions/lifecycle I need different logic for the creation case ...

certain elemets parsing from txt file using python

all. I am trying to get distance and time of two different locations. I have about 2500 combinations of locations and so far I could get them using python and google maps distance matrix. The ...

how does laravel know if it's on https or http?

how does laravel know if it's on https or http? I just installed https on my app but I have customer who enabled cloudfare https on his website and links that my app generates are http and not https ...

Maven Dependency version conflict : Elasticsearch and Lucene

My application uses Elasticsearch's transport client to connect to ES 1.7.2 cluster. As per the documentation, it uses Lucene 4.10.4, so below are the dependency versions in my application: ...

How to use 2to3 to translate all files in directory

I'm able to translate one file. But I don't understand how to translate whole directory. From docs: To translate an entire project from one directory tree to another use: $ 2to3 --output-dir=python3-...

Speed up .isPresent or .isDisplayed when sometimes expecting false

I want to check to see if a label exists. Sometimes I expect it to be displayed "class.checkLabel(true)" and sometimes I want to check to make sure it is hidden "class.checkLabel(false)". When ...

LU decomposition using python 3

i need to write a program implementing LU decomposition and then compare it to the np.linalg.solve function of numpy The function in the code (see below) compile with no problem but when i use it ...

Upload an image using alamofire swift

self.manager!.request( RestApiManager.sharedInstance.baseURL+"rest/secure/add/"+self.id!+"/create?language="+lang, method: .post, parameters: requestDictionary, encoding: URLEncoding.httpBody,headers: ...

Include link to local html file in DataTable in Shiny

I want to include a link to a local html file, which lives inside the www directory of my shiny app, inside a column in data.table. On click a new tab should open showing the html file. I've found ...

Add date information to text string in Python Script

I have successfully written a Python script to upload to YouTube with a lot of help. See this question for details if required: I know need to add date information to the Title as I upload a video ...

Cannot assign value of type 'Array<SKtexture>' to type 'SKTexture'

I define a array of SKTextures in a class like this : var walking: Array<SKTexture> = [] Then I have a function in the same class that returns a element of that array : func running() -> ...

I am trying to load a Sequence of dates for each and every id in a SQL table

I have a table with some id's, I would like to link sequence of dates to those id's, Sample Table: ID 12345 54321 78945 32165 I am trying to get result like this: ID Dates 12345 01/01/2017 ...

bitwise negate and bitwise XOR 1 not equivalent?

My discrete math tells me that negate every bit of a binary number is equivalent to XOR it with 1. That is: ~1010 === 0101 1010 XOR 111 = 0101 But this doesn't hold in javascript: ~123 === -124 123 ...

Elgato HD not showing in Devices list with DirectShow.GetDevicesOfCat

I'm trying to get content from a capturing device the Elgate HD. Using C# with the DirectShow Lib, calling DsDevice.GetDevicesOfCat(DirectShowLib.FilterCategory.KSAudioDevice); does not give me the ...

Retrieve data from JSON with where statement

I have a json file with a structure like this: { "gasStationID":"441", "gasStationLat":"39.6337420", "gasStationLong":"22.4324412", "fuelCompID":"6", "fuelCompNormalName":"AVIN", ...

Data logging on the website [Qt,C++]

I would like to raport some actions performed by the user of my application. I would like to write logs to file and send to some website. In the first case, I want to use redirect qDebug to file with ...

replacing a character in a string in a list by index

nm,b = input().split() b = int(b) n,m = [int(i) for i in nm] s = '|' layout = ['-------'] tal = [ ['###', '# #', '# #', '# #', '###'], [' #', ' #', ' #', ' #', ' #'], ['###', ' #', '###', '# ', ...

Bootstrap Navbar Missing on Heroku Deploy (NodeJS, Angular2)

Before this is flagged as a duplicate question, this question offers a ruby specific answer using rake which is not applicable in my situation. Why is my bootstrap nav bar missing only in production ...

What's wrong with my PHP code

I'm learning PHP but it doesn't work. Do you guys know what's wrong with my code? http://h51116rm.informatica-laz.nl/PHP/Opdracht_182.php . This is my domain. The sentence is in Dutch so don't worry ...

How to convert tick data to candlesticks in python

Here is the code I would like to have the Bitstamp exchange show tick data in candlestick format(OHLC) instead of line chart. def animate(i): global refershRate global DatCounter pd....

In Visual Studio: Make value of one Textbox result to a value in another Textbox1

Am building a VB project. I have two textboxes: Textbox1 Textbox2 I want, if the value of textbox1 equals to numbers between 10-20, the textbox2 to automatically display the word "Thanks". I ...

Python-Docx Inserting HTML into Docx

Is it possible to insert HTML into a Document using python-docx with styling applied? The only thing I need to work are italics. For example how to insert "Today is < i > Saturday < / i >" with ...

Amazon CloudSearch filter query on range of values

I am trying to filter a CloudSearch using the filterQuery property. I would like to pass a non-successive range of values, but can't seem to understand the correct syntax. I can pass a single value: ...

Lane Detection with python and openCV, average/extrapolate lines dont show up

I was writing a lane-detection Programm and got quite far, but I wanted to add some average/extrapolate lines. My code looks like this: def draw_lines(img, lines, color=[255, 0, 0], thickness=2): ...

Xcode project breaking on code that should work

I already have a struct of type meme and have the two textFields as their own classes, but nothing seems to work... I'm getting 12 errors and I have no idea how to fix them. Thanks :) class ...

C# Generics, is this where constraint possible?

I have quite strange scenario in my .NET Core application. I'm providing zip with test case solution, because there is lot of inheritance hard to compile in brain. enter link description here The ...

How to pass an object from one case statement to another

I'm trying to get the "player" object from case "A" to to case "G" but of course I can't do that because the object was created in case A and I have to keep it there. How can I move it down there ...

Cannot get glx to work after changing from Nvidia to Nouveau drivers

I run FC 24. I recently decided to change from Nvidia proprietary drivers to Nouveau. Everything seems OK, except that I can't get GLX to work. For glxinfo I get: name of display: :0.0 Xlib: ...

take :first elem img src content and pop 2nd elem bg-img property (featured img in WP)

I have external RSS feeds populating the below reoccurring class elements. <div class="featimg">{teaserImage}</div> <div class="featimg">{teaserImage}</div> <div class="...

How to store a function pointer in struct in C++?

If I have a struct that needs to store a special iteration of a function--as in the case of a tree of functions--how do I store and access it in C++? For instance: struct MyStruct{ bool *...

CSS Gradient not transitioning from end to end

My css gradient animation is working except all parts are changing at the same time not running from end to end like this www.verily.com, here is what I tried, .animated { -webkit-animation: ...

Didn't need an import statement

My project footprint is: project |-app |-component1 |-<angular component files> |-helpers |-helper1 |-<plain typescript file> |-node_modules I was surprised that when I ...

Insert different multiple values in single column postgresql

I have a small table in a database. I have a column for movie title, synopsis, and director. There are 20 rows. How do I update the column 'director' with different values corresponding to the ...
15 30 50 per page
Translating... 0%