on-internet

Access JIRA with VBA Excel 2010

I want to automate Excel reports in JIRA using VBA and Excel, I am trying to access JIRA with VBA to export data to Excel. So, I start with the authentification and then try to export data using this code : Private JiraService As New MSXML2.XMLHTTP60 Private JiraAuth As New MSXML2.XMLHTTP60 Sub JIRA() With JiraAuth .Open "POST", "https://jiralink/rest/auth/1/session", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json" .send " {""username"" : """username""", ""password"" : """password"""}""" MsgBox .Status If .Status = "200" Then sCookie =

Join the discussion →

Type hinting methods called from builder method

Consider an Active Record implementation which uses a static builder to return instances of a model. Here is a very reduced version of the ModelBuilder and Model classes to demonstrate, with all code irrelevant to the question removed: class ModelBuilder { public function __construct($class) { $this->class = $class } private function _execute() { $result = $pdo->query("SELECT * FROM {$this->class}"); return $result->fetchAll(PDO::FETCH_CLASS, $this->class); } public function all() { return $this->_execute(); } public function one() { return $this->_execute()[0]; } } class Model { public static

Join the discussion →

Show employees who earn more

I want to get a cursor which shows me the 3 employees who earn more. Here is the table, SOU means salary. Nombre ┐Nulo? Tipo ----------------------------------------- -------- ---------------------------- CODI_EMPL NOT NULL NUMBER(3) NOM_EMPL NOT NULL VARCHAR2(20) COGNOM_EMPL NOT NULL VARCHAR2(50) SOU NOT NULL NUMBER(8,2) NOM_DPT VARCHAR2(20) CIUTAT_DPT VARCHAR2(20) CODI_PROJ NUMBER(3) So I want to create a procedure which stores the three employees who earn more, obviously with CURSOR. I do not know here to start, i do not know who the query should be... Thanks in advance!

Join the discussion →

VS Code + CMake : cmake.build not found

I have CMake working perfectly fine with Visual Studio 2015. I wanted to try VS Code with C++ and CMake extensions, but when I try to call the build command (configured to F7 by default with the CMake extension for VSCode), I only get the message: command 'cmake.build' not found Is it trying to tell me it can't find CMake ? Because Cmake is installed and working so... I also tried changing in the settings to the full path to cmake with no success. I installed both CMake and CMake Tools from Extensions. Also the toolbar for CMake doesn't appear on the blue VSCode toolbar as shown in CMake Tools

Join the discussion →

Using PLYR for Youtube videos - poster image?

I am using Plyr (https://github.com/sampotts/plyr) to play Youtube videos inline. But i now want to add a poster to the player, so i can use a thumbnail for the video, before it plays. Plyr supports this, but i can not get it to work. I am currently using Plyr in its most simple form: Youtube video: <div data-type="youtube" data-video-id="bTqVqk7FSmY"></div> Initialize Plyr: <script>plyr.setup();</script> Thats it. How can i get the above snippet to show a poster for "/myposter.png"?

Join the discussion →

Avoiding KeyError when iterating over a list of dictionaries

I have a list of dictionaries, and I want to get all the values which have 'first' as key. test = [ {'first': '1'}, {'second': '2'}, {'first': '0'}, {'third': '3'}, {'fourth': '4'}] but when I do: stuff = [L['first'] for L in test] print(stuff) I get this: Traceback (most recent call last): File "C:/Users/User/Desktop/test_run.py", line 4, in <module> stuff = [L['first'] for L in test] File "C:/Users/User/Desktop/test_run.py", line 4, in <listcomp> stuff = [L['first'] for L in test] KeyError: 'first' I want to get: ['1', '0'] I know I might be doing a silly mistake. Do I need to make an if con

Join the discussion →

Linux stop a command while its loading in PUTTY/SSH

Let me start of by saying i just started learning linux. I have a command that keeps processing/loading until i press CTRL+C to cancel/stop the command and remain in session. What i want is to send that command, wait x amount of seconds and then close it programmatically in a single command (cause i can't enter new commands when its loading). Sorry if it sounds stupid, but that would solve my problem. Would really appreciate if someone could've helped me out here, couldn't find anything on google that was working (mostly exiting the session while the command remains loading).

Join the discussion →

Python: [WinError 10054] An existing connection was forcibly closed by the remote host

I'm creating a client to server based chat client and every time I setup a server and a client, the server keeps listening for a connection and when the client attempts to connect this error appears [WinError 10054] An existing connection was forcibly closed by the remote host, however the server still listens for a connection. I'm using python version 3.6.1 Script import socket import threading clients = [] s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) mode = input("Enter 1 for server mode and enter 2 for client mode") if mode == "1": def get_ip(): try: stest = socket.socket(socket.AF_

Join the discussion →

How to recode integers to other values in python?

I was surprised this question has not been asked yet. Given an array of integers x = np.random.randint(1,4,10) > array([3, 2, 1, 2, 1, 1, 3, 3, 2, 1]) How can I (easily) change all values according to some systematic rule, such as x[x==1] = 5 x[x==2] = 6 x[x==3] = 7 > array([6, 5, 6, 7, 5, 5, 6, 5, 7, 6]) The rule may be more complex than this, e.g. recode 1=2 and 2=1 so that the order plays a role.

Join the discussion →

Can't see system.debug ouput in logs when using apex batchable code

I execute the following in the anonymous execution: Database.executeBatch(new TransferACDCAccountOppOwnerBatch(), 200); The class is below. It uses Batchable interface. I put in a bunch of debug statements but don't see anything in the logs in the console. I also create debug logs at Debug level for Apex, etc. and also don't see any of the system.debug output. The SOQL itself I know works and should only return one row in the developer sandbox test data I setup. Is there something about the batchable interface that doesn't allow system.debug output? I know it's asynchronous, but the job comple

Join the discussion →

Sum of the first n Fibonacci numbers in Haskell

I have to calculate the sum of the first n Fibonacci numbers. The function fib returns the nth Fibonnaci number, but I don't know how to sum only the first n numbers (where n is given). fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib x = fib (x-1) + fib (x-2) sumFib :: Int -> Int sumFib x = if x == fib x then x+fib x else fib x

Join the discussion →

Sum of first n fibonacci numbers haskell

I have tu calculate the sum of first n fibonacci numbers. fib function returns the nth fibonnaci number. But i dont know how to sum only the first n numbers ( n given number ) fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib x = fib (x-1) + fib (x-2) sumFib :: Int -> Int sumFib x = if x == fib x then x+fib x else fib x

Join the discussion →

Sql server (Service) doesn't start

I removed old sql server from PC. Then I installed new sql server. After this sql server service doesn't start. When I am running service from sql server config manager - I receive error msg: "The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details." this command: sqlservr.exe -s MSSQL -e C:\1.txt returned logs: 2017-05-09 18:32:55.05 Server Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) Apr 29 2016 23:23:58 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 6.3 <X64> (Bui

Join the discussion →

Audio streaming with React native

I need to develop an app for a client that streams audio files from the network (both Android and iOS). I plan to use react-native-audio-streaming component. Clients biggest concern is that streamed files are not stored locally. Does anyone know is that the case with react-native-audio-streaming?

Join the discussion →

Add event listener on element focus

I have a search box input that opens when an icon is clicked on. I would like to give the input focus when the icon is clicked and call the function addLabel() that adds a label as placeholder text until a “onkeydown” event is fired, at which time it should call the function removeLabel(). Currently, my script adds focus(), but doesn’t acknowledge the other event listeners. Any help would be appreciated! window.onload = function() { <!--create absolutly positioned label as placeholder text for search--> var el = document.getElementById('gsc-i-id1'); var label = document.createElement('label');

Join the discussion →

How to increase Microphone volume level in Android PJSIP?

I have Integrated PJSIP with android. While making call in my application, the Speaker is working perfectly but Recording microphone volume is too low. My voice is not hearable by other side. Note: But in some mobiles it's working properly. Even i tried with adjustStreamVolume(), setStreamVolume(), setMode(),adjustVolume() methods to increase my volume level, it doesn't increase in anyway. Please give me a suggestion to solve this problem to increasing microphone Volume level in Android or from PJSIP.

Join the discussion →

WrongClassException: Object [id=null] was not of the specified subclass

I have a model like this one below: @Entity(name = "request") public class VisitRequest { @Id @GeneratedValue private Long id; @OneToMany(mappedBy = "visitRequest", cascade = CascadeType.ALL, orphanRemoval = true) @JsonManagedReference private List<Visitor> visitors; //default constructor, getters and setters } @Entity @Inheritance(strategy = InheritanceType.JOINED) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "class") public class Visitor { @Id @GeneratedValue private Long id; @ManyToOne @JsonBackReference private VisitRequest visitRequest; //defau

Join the discussion →

Weblogic Error: Server state changed to FORCE_SHUTTING_DOWN

It was still working when I closed it last week after I installed and conifigured weblogic server but right now it is not starting. Here are last few statements shown in the cmd: <May 8, 2017 10:08:23 AM CST> <Notice> <Security> <BEA-090898> <Ignoring the tru sted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Un supported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> <May 8, 2017 10:08:23 AM CST> <Notice> <Security> <BEA-090898> <Ignoring the tru sted CA certificate "CN=G

Join the discussion →

Excel VBA Updating Chart Series

I have a code the copying the range to a certain cell and change the data source to the chart. the chart has combination chart type, which has stacked columns and xlLineMarker with last series(Grand Total). The number of the series collection varies based on user selections(2 or more). It works, but sometimes the chart doesn't get fully updated like the image attached (displaying empty chart with series name as 'series1, series2, ...). When it happens, The right-click on the chart and click select data, and then simply selecting any series other than series1 update the chart. not refresh or re

Join the discussion →

Does JSONP require the use of JavaScript?

I'm vague on the details of JSONP, which doesn't appear to be a proper specification at all. I am writing a Perl client to communicate with a server that has a WebSocket JSONP API. Do I need to use JavaScript to specify the JSONP callback, or can it be done in another way?

Join the discussion →

PyInstaller exe file doesn't create log file

I'm trying to make my scripts executable so I can send it to my colleague. I'm using PyInstaller. pyinstaller --onefile main.py Which creates two folders. When I open dist/main.exe, something is wrong but I don't know what because it doesn't create a log file. I can't figure out why. When I run main.py, the log file is created immediately. Could you check it out? # coding=utf-8 from __future__ import print_function import csv import os import time import logging import sys import traceback from spider import is_connected from database import Database filename = os.path.join(os.path.dirname(os.

Join the discussion →

Content is not allowed in prolog when calling a soap webservice

I am using the following code to get a result but for some reason I am getting this error: Error on line 1: Content is not allowed in prolog. (line 134, file "Code") which in this case is var xmlResult = XmlService.parse(result).getRootElement(); var xml = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:v1=\"http://openclinica.org/ws/studySubject/v1\" xmlns:bean=\"http://openclinica.org/ws/beans\">" +"<soapenv:Header>" +"<wsse:Security soapenv:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

Join the discussion →

Performing MERGE with Dapper.net

We are using Dapper.net for the data layer in an ASP.net MVC 5 app. One operation requires the use of the MERGE command (if the TitleID exists, update the record, if it doesn't, insert it) - something like this: MERGE BookInventory bi USING BookOrder bo ON bi.TitleID = bo.TitleID WHEN MATCHED THEN UPDATE SET bi.Quantity = bi.Quantity + bo.Quantity WHEN NOT MATCHED BY TARGET THEN INSERT (TitleID, Title, Quantity) VALUES (bo.TitleID, bo.Title,bo.Quantity); Can Dapper be used to map values onto this MERGE statement? I can't find anything on this and it's unclear what the best approach to using ME

Join the discussion →

How to use 'node-7z' on Windows?

I am trying to set up an Azure webjob which unzips files passed to it. I am using an npm package node-7z to achieve this but I am having trouble getting it to work on windows machine. Apparently, adding a 7z.exe file on the same level as the package.json should work but it doesn't seem to do the trick. If anybody has managed to configure node-7z for windows setup, could you please advise on how to resolve this matter.

Join the discussion →

PowerShell output is crossing between functions

I am writing a PowerShell script in version 5.1 on Windows 10 that gets certain pieces of information about a local system ( and eventually its subnets ) and outputs them into a text file. At first, I had all of the aspects in a single function. I ran into output issues when outputting getUsersAndGroups and getRunningProcesses functions, where output from getUsersAndGroups would be injected into the output of getRunningProcesses. The two functions are: # Powershell script to get various properties and output to a text file Function getRunningProcesses() { # Running processes Write-Host "Runnin

Join the discussion →

Merge/combine two lists line by line?

I have two lists stored in variables: $list1 and $list2, for example: $list1: a b c d $list2: 1 2 3 4 How do I merge them together line by line so that I end up with: a1 b2 c3 d4 I have tried using array (@) but it just combines them one after the other, not line by line, example: $list1 = @(command) $list1 += @($list2)

Join the discussion →

How to publish an extension on VS Code

I use an extension on VS Code Market, but I think that it does not meet my needs. I want to customize it. But I have been confused for publishing npm package to VS Code market. Who can tell me more details?

Join the discussion →

STM32 NVIC ADC interrupt is not triggering

I have an STM32F411VET, and I want to have interrupt triggered after ADC conversion is finished. The documentation says the following: In Single conversion mode the ADC does one conversion. This mode is started with the CONT bit at 0 by either: setting the SWSTART bit in the ADC_CR2 register (for a regular channel only) Once the conversion of the selected channel is complete: If a regular channel was converted: The converted data are stored into the 16-bit ADC_DR register The EOC (end of conversion) flag is set An interrupt is generated if the EOCIE bit is set Then the ADC stops. Thus, I have

Join the discussion →

How to generate .csv file from oracle table data?

I have generated a csv file using the below query, but all column data are coming in one column in the csv file. Please help me to separate these column data. create or replace procedure csv_generate as CURSOR c1 is SELECT * FROM emp; v1 c1%rowtype; z1 VARCHAR2(2000); z2 VARCHAR2(2000); f1 utl_file.file_type; BEGIN FOR i IN c1 loop --play(i.ename); f1:=utl_file.fopen('TEST_DIR1','out.dbf','W'); z1:=i.empno||' '||i.ename||' '||i.JOB||' '||i.sal||' '||i.deptno; z2:=z2||chr(10)||z1; utl_file.put_line(f1,z2); utl_file.fclose(f1); END loop; --utl_file.put_line(f1,z2); END;

Join the discussion →
Older stories