Sample Filter
   11 tags on

0 answers

I get the output when i run the curl request in command line but not able to get the output when using python

subprocess.call('curl https://api.smartsheet.com/1.1/sheets -H "Authorization: Bearer 26lhbngfsybdayabz6afrc6dcd" -H "Content-Type: application/json" -X POST -d @test.json' ) my test.json has: ...

0 answers

Youtube partner and Cms?

I wanted to upload a video with monetization. Could you please tell the below question is correct? I am not a you tube partner. I don't have you tube cms account. How to open? Please tell step by ...

0 answers

Nose test superclass calls and inherited classes

Question How may I test a class and its methods that has inherited from another Superclass through a super() call? Example class A(): def __init__(self, x, y): # do something with x ...

0 answers

How to call a view inside a class context using Requests

I am using Resquests together with Pyramid, and I have a class with a @view_defaults() decorator using the route_name parameter. Inside this class I decorate my functions with @view_config() using the ...

2 answers

Python Sniffing from Black Hat Python book

import socket import os import struct import sys from ctypes import * # host to listen on host = sys.argv[1] class IP(Structure): _fields_ = [ ("ihl", c_ubyte, 4), ...

3 answers

Sum of all values in a Python dict

I'm new to Python. Let's say I have a dictionary in which the keys map to integers like: d = {'key1':1,'key2':14,'key3':47} Is there a syntactically minimalistic way to return the sum of the ...

3 answers | 4 mins ago by nedblorf on Stack Overflow stackoverflow.com
0 answers

How to embed maths in MediaWiki

This is what I've found so far: http://www.mediawiki.org/wiki/Extension:MathJax -- appears to be discontinued. http://www.mediawiki.org/wiki/Extension:SimpleMathJax -- I tried this and it works on ...

1 answer

Read in value of const int when ran - C++

I have a program which defines a const int as a value for the size of arrays. Is there anyway I can change the value of this var when the program is first ran? I only need it to be set once at the ...

1 answers | 4 mins ago by Colin747 on Stack Overflow stackoverflow.com
0 answers

Perfect forwarding to multiple constructors

I'm really happy with the perfect forwarding in C++11 and want to do something more complicated. It's somewhat a classic case. I have a template axis-aligned box class. The template argument is a ...

9 answers

Why isnt int pow(int base, int exponent) in the standard C++ libraries?

I feel like I must just be unable to find it. Is there any reason that the c++ pow function does not implement the "power" function for anything except floats and doubles? I know the implementation ...

9 answers | 5 mins ago by Dan O on Stack Overflow stackoverflow.com
1 answer

Container folder modification

Using MFC Dialog Box application in VC++, I have a file path(without the end file) which is displayed in an edit box. This path represents the container folder location for the file: CString ...

1 answers | 5 mins ago by RN24 on Stack Overflow stackoverflow.com
0 answers

Sphinx autodoc: Python-source and link not included for automodule

I am using sphinx.ext.autodoc to document my Python module. It works great, and I really like that it results in highly readable documentation with highlights, cross-references, etc. However there is ...

2 answers

Opening Excel in wxpython

Can I open excel spreadsheet as a reponse to event in wxpython? I want to build an application which entails the neccessity to interact with excel in visual mode? Is this possible? Can somebody ...

0 answers

Python OOP from a Java programmer's perspective

I only have OOP programming experience in Java and have just started working on a project in Python and I'm starting to realize Python makes me skeptical about a few things that my intuition is to do. ...

0 answers

How to use dronekit with SITL vagrant VM from dev Wiki

I am following the getting started instructions in DroneKit-Python to set up DroneKit in a VM. To make things easier for myself I started by Setting up SITL using Vagrant. However I can't work out how ...

4 answers

What's the common strategy to optimize c++ arithmetic computation for arrays?

For example, I have three float arrays, a, b and c, and I want to add a and b element-wisely up to c. A naive way is like for(int i = 0; i < n; i++){ c[i] = a[i] + b[i]; } As far as I know, ...

4 answers | 10 mins ago by ZHOU on Stack Overflow stackoverflow.com
0 answers

How to hide the linker warning start with AL (ALINK)

I got this warning while compiling the VC++ project. 1>ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor I think it is safe to hide this in my situation ...

2 answers

How to perform fast merging c++ list with itself

Lets say I have a list containing some integers, I need to quickly merge it with itself : for example I have {1, 2, 3} after that procedure I want the list to be {1, 2, 3, 1, 2, 3} These versions do ...

2 answers | 12 mins ago by arammis on Stack Overflow stackoverflow.com
0 answers

Efficiently working with a large list of strings while generating dicts

I'm fairly new to Python and especially new to working with large amounts of data. I'm working on a little fun project, which is effectively an upscale of something I've done before in another ...

1 answer

Qt codingstyle: how to name private variables

I would like to know, what is the "best" way to name your private variables in a Qt c++ class? I know that every company/person has its own preferences when it comes to coding style guidelines, but ...

1 answers | 14 mins ago by user2567875 on Stack Overflow stackoverflow.com
1 answer

Disable close button of console window

I want to control usage of the [X] button (the exit window button), which is generally present in the top-right corner when running a console-based Python application. I will be providing an ...

1 answer

Spray.io: When (not) to use non-blocking route handling?

If we are thinking of production grade REST API, should we use non-blocking as much as possible, e.g. def insertDbAsync(rows: RowList): Future[Unit] = ... ... val route = path("database" / ...

1 answers | 14 mins ago by lolski on Stack Overflow stackoverflow.com
0 answers

UnicodeEncodeError: 'ascii' codec can't encode character '\u030c' in position 142: ordinal not in range(128)

import json import codecs from urllib.request import urlopen url = "https://translate.yandex.net/api/v1.5/tr.json/translate?key=myapikeyhere&lang=hr-en&text=" word_list = ...

2 answers

Programmatically Print a PDF File - Specifying Printer

I have a requirement to print an existing PDF file from a Python script. I need to be able to specify the printer in the script. It's running on Windows XP. Any ideas what I could do? This method ...

2 answers | 15 mins ago by Greg on Stack Overflow stackoverflow.com
0 answers

Django authenticating using non django user

I have to write a Django application / website which gets all of it's data from a third party REST server. This means that I'm actually not using any of the default Django ORM models, and reading ...

2 answers

TeamCity and git repository with Visual Studio online

I'm trying to configure TeamCity to build the project located on the Visual Studio online with Git as VCS. The project contains spaces in the URL, so it looks like: ...

2 answers | 15 mins ago by msi on Stack Overflow stackoverflow.com
2 answers

How to get http header in python?

I am newbie to python and using Python Flask and generating REST API service. I want to check authorization header which is sent by angularjs. But I can't find way to get HTTP header in python. Any ...

1 answer

Pandas concat from excel tables with missing data

I am trying to concatenate a number of tables that I have read from excel and pivoted (stacked) using pandas. The code below works perfectly except the final dataframe (GRL) is missing the last two ...

1 answers | 16 mins ago by user2989613 on Stack Overflow stackoverflow.com
1 answer

Requests : No connection adapters were found for, error in Python3

import requests import xml.etree.ElementTree as ET import re gen_news_list=[] r_milligenel = requests.get('http://www.milliyet.com.tr/D/rss/rss/Rss_4.xml') root_milligenel = ...

2 answers

Rebasing in smartgit “git-am is in progress”

I will try to explain the problem that I have. I have used the rebase option via git bash many times. Now I have SmartGit and don’t know why rebase is not correct. Step 1: Step 2: Step 3: ...

2 answers | 17 mins ago by Ark on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3