2018-10-22         Barnett

Layering masks in CSS

I'm trying to figure out if it is possible layer masks in CSS. Basically I have an SVG which denotes some kind of stage. This is displayed as a mask using mask-image and has a black background-color. Something along the lines of:mask-image: url(image.svg);background-color: #000;...Depending on some related state, I need to draw attention to that masked svg by layering another svg over it, for example and exclamation mark. This would have another colour, for example red, but could change depending on the circumstance.A crude example is shown below where I have a button with ...

 css                     2 answers                     87 view
 2018-10-22         Barnett

How to move Inline SVG to css

I have this inline SVG that I got working, and now want to move it to an external file so I can use it in other places.(It's a simple drag icon.)https://gist.run/?id=de197c5eb19bc35bf7f537f7aab345a8How do I do that? <svg style="height:16px; width:16px;" focusable="false" viewBox="0 0 32 32"><path d="M14,5.5c0,1.7-1.3,3-3,3s-3-1.3-3-3s1.3-3,3-3S14,3.8,14,5.5z M21,8.5c1.7,0,3-1.3,3-3s-1.3-3-3-3s-3,1.3-3,3S19.3,8.5,21,8.5z M11,12.5c-1.7,0-3,1.3-3,3s1.3,3,3,3s3-1.3,3-3S12.7,12.5,11,12.5z M21,12.5c-1.7,0-3,1.3-3,3s1.3,3,3,3s3-1.3,3-3S22.7,12.5,21,12.5z M11,22.5c-1.7,0-3...

 html                     2 answers                     53 view
 2018-10-22         Barnett

How can I add a css file into my TinyMCE template?

My question is about Tinymce Template Plugin.I have been developing a CMS with ASP.NET MVC. I can insert a template by using “insert template plugin”, but I can not insert a css file.The template I will insert should be more developed. When I add a css file, it does not work. For example, <link rel=“stylesheet” type=“text/css” href=“theme.css”>. This link is my template I want to use.And then I am saving this content into my database. This link can not be saved into my database. It can not seen.I used content_css ,the template looks good in the editor, but when I look...

 asp.net                     1 answers                     8 view
 2018-10-22         Barnett

How to get all Browsing data with Browsing date using windows CMD command?

I searched on the Internet and found a way to get all Browsing data.Create a bat file with below-mentioned code and execute it to get all browsing data into windows power shell.Now, I want to get all the Browsing data with the Browsing Date on CMD.Is there any way to do this?@echo offPowershell -noexit "ipconfig /displaydns | select-string 'Record Name' | `foreach-object { $_.ToString().Split(' ')[-1] } | Sort | Out-Gridview"`Here is my Output:[![enter image description here][1]][1] I am by no means a Powershell guru. All I did was Google Search. Using another foreac...

 powershell                     1 answers                     75 view
 2018-10-22         Barnett

Javascript JQuery - Hide a button if value is 0, display if not

I have this:<input type="button" id="total_items" value="0">The value is increasing as items added to the site.What I need is to hide it if the value is 0 and start to displaying as the value is increasing.I know JQuery has an option to add a css display:none option, but I don't know how. Thank you for all the help! Try this code below, Just you must call checkValue() function every time number count of objects changed.var btn = $('#total_items');$(document).ready(function() { checkValue();})btn.change(function() { checkValue();});function AddNumber(count) { btn...

 javascript                     2 answers                     14 view
 2018-10-22         Barnett

Reinterpreting Unicode strings

I'm receiving unicode data from a client, stored in a dictionary called "data". The following codevariable1 = '\u03b5\u0061\u0073\u0064\u0066'print("TYPE1 = " + str(type(variable1)))print("VAR1 = " + variable1)variable2 = data['text']print("TYPE2 = " + str(type(variable2)))print("VAR2 = " + variable2)printsTYPE1 = <class 'str'>VAR1 = εasdfTYPE2 = <class 'str'>VAR2 = \u03b5\u0061\u0073\u0064\u0066This suggests that the data from the client is somehow not interpreted properly. Writing the variables to file also gives the exact same result: the file has the literal...

 python-3.x                     2 answers                     80 view
 2018-10-22         Barnett

Export pandas dataframe as an interaction file: row \t value \t col

With the below pd dataframe:print(df) A B CX 1 2 3Y 4 5 6Z 7 8 9I need to create a simple interaction network file, or SIF file, of the format:node1 xx node2node1 xx node2node1 yy node2...Where each line is an interaction on a df: row label, value, column label. Below is an iterative (and naive) approach to writing such a file:with open ('interaction.sif', 'w') as sif: for row in df.index: for col in df.columns: sif.write('{}\t{}\t{}'.format(row, df[col][row], col))The inefficient code above offers the ideal sif file for the dataframe df:X...

 python                     2 answers                     35 view
 2018-10-22         Barnett

Parsing a string to a datetime does not return the correct time

In Android...I am expecting 3:12 pm as time out put of the following code but I get 4:12 pm. Whats the correct way to parse this date time format.String dt = "2018-09-02T19:12:00-0400";SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");try { Date date = dateFormat.parse(dt); System.out.println(date);} catch (ParseException e) { e.printStackTrace();} Time zoneIt’s best to specify explicitly in which time zone you want your output: DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ssXX"); ...

 java                     1 answers                     24 view
 2018-10-22         Barnett

getting ╠ when printing in C

This question already has an answer here: Check if a string is palindrome in C 3 answers this loop is not executing at all:for (i = strlen(string); i < 0; i--){ if ((string[i] >= 'A' && string[i] <= 'Z') || (string[i] >= 'a' && string[i] <= 'z')) { check2[i] = string[i]; }}because i < 0 condition is a "continue" condition, not a "stop" condition. Besides, i starts outside string data.So check2 is never initialized, which explains the gar...

 c                     2 answers                     54 view
 2018-10-22         Barnett

How to use next date column value to calculate delta for current column

I have a temp table BusinessDate SSQ_CompScore2011-01-05 00:00:00.000 412011-01-06 00:00:00.000 62011-01-07 00:00:00.000 12011-01-10 00:00:00.000 82011-01-11 00:00:00.000 482011-01-12 00:00:00.000 502011-01-13 00:00:00.000 59I need to calculate delta for each current date.I have prepared a solution but it doesn't work where date as not consecutive.Can you please help?select t1.businessdate, t1.ssq_compscore, (t2.ssq_compscore - t1.ssq_compscore) as deltafrom #temp t1left join #temp t2 on t1.businessdate = DATEADD(dd,1,t2.businessdate)where t1.businessdate >='20180814...

 sql                     1 answers                     7 view
 2018-10-22         Barnett

Unexpected word breaker results on Sql Server 2012

SELECT occurrence, display_term FROM sys.dm_fts_parser ('"ROBIX 156 DM"', 1033, null, 0)does not return expected results (display_term):robix156nn156dmbutrobix156 dmnn156dmWhat is 'DM', why its resulting in unexpected result from word breaker, and how could one avoid it ? What is likely happening here is that DM is being recognized as a currency (Deutsche Mark) which is causing the word breaker to associate with the leading numerical value. I tried replacing DM with USD and ended up getting the same results - SELECT occurrence, display_term FROM sys.dm_fts_parser ('"ROB...

 sql                     2 answers                     71 view
 2018-10-22         Barnett

Choose an aggregate function for Group BY in SQL Server

I have a query like this:Select Count(*) as TotalCount, Object2_ID, Object_ID, Object_Descriptionfrom Table1 inner join table2 on... Group BY Object2_ID, Object_IDI can't run this query because the column Object_Description isn't in GROUP BY or under aggregate function. Object_Description is a text column. I need any value of Object_Description. Now I use MAX(Object_Description) because it gives me right results, because Object_Description is the same for each group.I can use MAX() or MIN() etc. - I will get right results in my query.The question is - what is the most suff...

 sql-server                     1 answers                     83 view
 2018-10-22         Barnett

How to filter a table then the output to be printed in a pdf

Hi guys I am trying to filter a table then print the filtered table to a pdf.I typed other codes but this is as close as i can get to finishing it.I tried different solutions but cant seem to fix it.If you guys have any suggestions on how to do it just say. Any help would be great.Help guys! Thanks in advance!This is reportss.php<?php ob_start(); include ('filters.php'); function fetch_data() { require('filters.php'); $output = ''; $conn = mysqli_connect("localhost", "root", "", "trans"); $sql = "SELECT * FROM customers ORDER BY created_at ASC"; $result ...

 php                     1 answers                     55 view
 2018-10-22         Barnett

One Slicer for Power BI Desktop affecting multiple tables

I'm setting up multiple tables on a single Page in Power BI Desktop, with plans to publish to an App. I'm using SQL Server as a data source to pull the output of three different pre-established System Views. Each of the Views pulls from the same set of original database tables, but presents a distinct grouping of orders. So for example one view might return:Order # | Requested By | Reason Declined1 | Bob Smith | too expensive3 | Jim Trout | no space5 | Becky Bond | not neededand another might return:Order # | Requested By | Number Items Approved2 ...

 powerbi                     1 answers                     80 view
 2018-10-22         Barnett

Php script executing exec function for compiling c script in bash throws error

I have been following this answer and I can't figure out what the hell I'm doing wrong. When I call my api endpoint (via postman) I get following error, when my script tries to generate and compile script c script.My php code exec('cat > wrapper.c <<CONTENT #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main (int argc, char *argv[]) { setuid (0); system ("/bin/sh /var/www/html/myapp/script.sh"); return 0; }CONTENTgcc wrapper.c -o php_root 2>&1', $output, $returnVar); var_dump($output); ...

 php                     1 answers                     49 view
 2018-10-22         Barnett

Moving label of seaborn colour bar

I've got a seaborn heat map with a labelled colour bar using:seaborn.heatmap(df, cbar_kws = {'label': 'Label for colour bar axis'})but the colourbar's label overlaps with its tick labels. Is there a way to reposition this label further from the ticks (in my case, further to the right) like the 'padding' options for a normal matplotlib plot? Unfortunately cbar_kws doesn't accept the labelpad argument. Therefore one way to add some padding to the labels will be to access the colorbar after it has been drawn.You can use ax.collections[0].colorbar to get access to the matplo...

 python                     1 answers                     86 view

Page 1 of 146  |  Show More Pages:  Top Prev Next Last