Newest Questions

Q&A for professional and enthusiast programmers

how to create and xml output

Im currentling doing a visual basic coding project for school and the lesson before it starts my teacher trys to teach us XML in one lesson and its the hardest part of the project. The pragram has ...

ionic build ios error code 1

I have purchased the ionic starter app: ionFullApp. When I run the command ionic serve, the app runs fine on local server. I am unable to emulate iOS. When I run the command ionic build ios, I get the ...

Woocommerce, get the variation id and name

I'm using $product->get_variation_attributes() to get the variations from a product. This function returns an array with the names without the ID's. Like this: [pa_color-shirt] ...

Mod rewrite for adding a suffix

I would like to add suffix to a URL when a client visits index.php For example: it browses to /index.php then it must be translated to /index.php? I tried this: but then I get a 502 or 503 error. And ...

Save data from random extraction from DB

I have a simple quiz with random extraction from my DB and I need to save the last data when the user close my app. When user re-open the app, he should see the last data and after there is the ...

How can I track either the autocomplete is call from keyup or onclick?

I have the following code to call the autocomplete by either enter into input or click on the lablel Image: HTML: <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label ...

Getting error “Cannot load underlying module” when importing Swift framework

I have written a framework in Swift 2.3 that uses Cocoapods to utilize a few Objective-C projects such as AFNetworking and CocoaLumberjack. Since bridging headers cannot be used in frameworks I have ...

How to create custom buttons on Leaflet map (same style as the zoom buttons)?

I'm looking for a way to create button(s) reusing as much of the existing Leaflet code/styles for the zoom buttons as practical. Specifically what I'm looking for: same style as Leaflet buttons same ...

find string after task- in a long substring using regex

I have list of files with a pattern sub-_task-XYZabc_run-_bold.json and sub-*_task-PQRghu_bold.json For eg: sub-03_task-dis_run-01_bold.json sub-03_task-dis_run-02_bold.json sub-03_task-dis_run-...

GUI for Python, Spark and R

We have a SAS Enterprise guide as GUI for SAS. Similarly we would like have a GUI for Python and Spark. Can any one suggest GUI's for Python and Spark? Thanks

toupper and tolower with pointers

I am trying to figure out how to use toupper and tolower using pointers. I thought I was on the right track. I managed to get the pointers correct for the uppercase letters but for some reason, it ...

Telegram bot sendMessage doesn't work

I'm trying running a telegram bot using php but when I try using sendMessage function it simply doesn't work. define("Token","<myTOKEN>"); define("Telegram","https://api.telegram.org/bot".Token....

Aforge vide direct show orientation

I'm using VideoCaptureDevice for showing live stream video with resolution 1280 × 720 landscape , i need to change camera to portrait orientation to be vertical without losing quality ? How can i do ...

Best way to generate subtotal array from total

This is a bit of a contrived problem, but a real one for our industry. Our customer's rent hotel rooms and for hotel accounting reasons, room charges are added to the folio each night, not all at ...

Javascript: using date as array key doesn't work

I have a list of simple objects that include date and I need to group them by the date. Unfortunately it doesn't seem to work. Here is simplified code: games = [ {date:"3/5/17", name:"game 1, 3"}...

Python Json - KeyError

I am trying to retrieve the records from an API and eventually want to store them in a dataframe so that I can do some analytics. But I am getting the following error: for item in json_obj["records"...

Smarty admin page HTML parse

This script {else} {$obj->mMenus[i].name} is in div. First row is ok, other rows name goes up right, and div tags disappears. It is because of smarty else. My grid is correct.

why am I getting (null) after scanf?

I just don't understand why am I getting (null) after running this code: [1]: [SEE IMAGE][1]https://i.stack.imgur.com/Eh8xU.png #include <stdio.h> #include <stdlib.h> #include <string....

Reading data periodically from PLC using S7NET

I was reading data from a real PLC (S7 300) with S7NET periodically via a timer but seeing that there are many data blocks to read I got lags in the application while running. after that I have ...

HTML Div border not showing

I'm trying to add a border to a div element in HTML. Below is my code. <!DOCTYPE> <html> <head> <style> #container-border{ border-width: 2px;...

T-SQL PIVOT data from long form to wide by a date

I want to pivot my data from long to wide using t-sql pivot function if possible. My current table looks like: ID DATE NUM VALUE 1 2005-01-20 29 197 1 2005-01-20 28 58 1 2005-01-20 ...

C# adding multiple word tables into word

I'm trying to insert multiple tables into a word document using c#, but when I add I add another block of code to add a table in I am getting an error and the second table is not being inserted. How ...

Use single IEnumerable value before For Each

I have a view that lists auditorium names of a theater. @ModelType IEnumerable(Of dbtheatersinfo.TheaterAuditorium) <h2>Theater Auditoriums</h2> <table class="table"> <tr>...

CSS in head over adding an id

I am working on responsive website that has 100's of pages. It is implemented using a CMS. The problem is, I need to apply some styling only for homepage. It is a bit cumbersome to add a class or id ...

Clickhouse - как пронумировать строки?

SELECT phone_normalize as phone, toStartOfMonth(date) as created FROM ppc_enterprise_1c_test ORDER BY phone_normalize, created Подскажите, как добавить колонку, с нумерацией строк, так чтобы ...

Selecting and joining rows from multiple tables based on MAX(Column Name)

Overall, my goal is to obtain a customer's email, code, and most recent rewards balance from three tables. The three tables are: Customer, CustomerCode, and Rewards The tables look roughly like the ...

Hive Serde Xpath Extract

I have an xml that needs to be extracted in hive. I am using hive serde to do this. The requirement is to have the xml in one column stored as string. However when I do this the attributes are ...

How to add related keywords for product search on my website

I am developing a website(using php mysql) where in product suppliers are my users and i want visitor to search product suppliers on the basis of their location and product category which i have saved ...

kwmaven command is not generating a spec file

I am running the kwmaven command and it doesn't generate. This is the output I am getting: [INFO] Scanning for projects... [INFO] ----------------------------------------------------------------------...

resizeGL() and updateGL() appear not to be updating scene in QGLWidget

Can anyone explain why resizeGL() and updateGL() would not be refreshing the scene or updating the viewport when the screen is resized or a QT timer function is called? I have created a class which ...

Angular 2 - How do I conditionally add styles to my component?

I have a component with a stylesheet that loads correctly like this: @Component({ selector: 'open-account', styleUrls: ['open-account.component.scss'], templateUrl: './open-account.component....

Using d3.json without reading from file

I am trying to create an interactive graph using d3.js library. I want to alternate between feeding data into my d3 object from either a stored json file or directly from a dictionary (that gets ...

Google Sheets - Every time a value appears paste another cell

Below are examples of the columns I am using in my Google Sheet. For every time that the serial exists I need to "ID" and "Fault" pasted of all the other times that the serial appears in the list. ID ...

Displaying weather data on a Google map

First as this is my first post I apologize if any formatting is incorrect. In short, My plan was to use an API such as OpenWeatherMap or AerisWeather to get the weather data of the location of my ...

Qt5 Separating a video widget

I am trying to find a way to create and separate a video widget into two parts, in order to process stereo videos: The first one would play a part of the video; The second one would play the other ...

CSS3 Style button: how can I make a button fades away while playing

I have been trying to style a CSS3 button that currently activates on hover and each time it gets stopped/started it fades. I am trying to modify the current code in order for the play button to fade ...

R: Sorting factor by level frequency and plotting

I have a data.frame with several factors such as: df<-data.frame(Var1=as.factor(sample(c("AB", "BC", "CD", "DE", "EF"), 1000, replace=TRUE))) with summary(df$Var1) AB BC CD DE EF 209 195 ...

Git Pre-Commit Hook Adding File After Commit

I am attempting to dump a mysql database and add the .sql dump file to the staging area using a pre-commit hook so it can then be included in the commit (on Windows Server 2012 R2/IIS). The following ...

Sequelize: how to implement a search based on associated keywords?

I am looking to return all articles from the database associated with one or more keywords, but I am not sure there right way to go about this? I am using Sequelize 3.x, with node.js 3.7.0. The data ...

Add column into a dataframe based on condition

I would like to create a column within a dataframe based on three other columns. My dataframe contains 3 columns B,C,D all factors and I want to create column A I have tried the following df$A<...

Hamburger icon hiding behind the Navigation bar iOS

I am trying to create a hamburger icon on top of the navbar for the side menu toggle using react-native-side-menu and react-native-router-flux, but the menu icon is hiding behind the navbar I have ...

Swift generate random number without arc4random

I want to generate a random number in Swift within a function deployed to OpenWhisk on IBM Bluemix. Because it's a Linux runtime, I can't use arc4random_uniform(). I also don't want to use drand48() ...

React Native Error Raw Text “1997” must be wrapped in an explicit <text> component

I have a function that loops through and grabs the year of of a year property in an object. I'm trying to render it in the title prop of my list view but I get this error. Error: raw text "1997" ...

How can I show The Number of markers in Google map according to zooming and nearst user

This is my code : I Need to Show only markers according to the following : example : I have 30 markers so 1- when user zooming it should display only 20 markers that visible in map then it should ...

I don't understand what is wrong with my code - Pyplot gives me errors

import random import matplotlib.pyplot as plt from math import log, e, ceil, floor,sqrt,pi,exp import numpy as np from numpy import arange,array, empty import pdb from random import randint import ...

python pandas apply if statement and groupby only for one category

Piggy backing of this question python pandas flag if more than one unique row per value in column I want to apply the following rule only to rows with Type X. df['Test_flag'] = np.where(df.groupby('...

Possible to present UIViewController from another app?

This may seem overly ambitious, but I'm exploring the ability to present a view controller from one app in a separate app (both authored by me). I'm not talking about reusing a class, I'm referring to ...

Best practices for initialization functions in an Express app

I'm building a node app with express and mongo (using mongoose) and I'd like to establish a route that returns a random document form a collection. Reading through this I found out that storing the ....

Connecting to an API - the basics

I am currently looking to start a small project. I am aiming to create a website that allows a user to search for a game they like and then it will return a few various games that are similar to their ...

Store jquery in a variable

I've got an FAQ page I'm building. Next to the question, there is a plus sign to expand the content. On click, I've added the class active, but there are many questions, and I don't want to repeat the ...
15 30 50 per page
Translating... 0%