Sample Filter
   11 tags on

0 answers

How can I post blog to baidu tieba using python code?

I want to post blog to baidu tieba 百度贴吧 using python code because I have a lot of good articles, I want to post them automatically. Is there have a full function python Libary to use or how can I ...

0 answers

Print all of the relations between a pair of sets

Looking for some to help me out with my problem. I need to print all of the relations between a pair of sets with the domain and codomain input by the user. For example if the input was "ab" and ...

2 answers

Function pointer to class template member

I've got this class: template <class T> class list { ... bool moreThan(T x, T y); bool lessThan(T x, T y); ... }; I need a function pointer to change the behavior of my class, ...

2 answers | 3 mins ago by Michael on Stack Overflow
0 answers

Number of call and ret instruction tracking mismatch while using Intel Pin (on x86)

I am trying to use Intel Pintool to monitor CALL and RET instructions on an x86-64 machine (Mac Pro). I'm passing IARG_INST_PTR (mentioned below) to the docount function and using the ...

3 answers

Rotating an object to match a vector

I thought that I was doing this correctly for the longest time, but however I believe I may be doing this in a very wrong way. I have a 3D engine with world terrain, and objects can be placed on the ...

0 answers

How to create a bigram from a text file with frequency count in Spark/Scala?

I want to take a text file and create a bigram of all words not separated by a dot ".", removing any special characters. I'm trying to do this using Spark and Scala. This text: Hello my Friend. How ...

0 answers

django admin adding hash to image name

Not a duplicate- django admin is adding 7 digit hashes each time I upload an image in admin. I tried what the other post suggests, and I flushed my database and completely restarted. Each new pic I ...

2 answers

Why does GCC optimize away this incrementation?

Consider the following code: #include <stdlib.h> #include <signal.h> #include <stdint.h> #include <stdio.h> uint64_t counter = 0; #define __STDC_FORMAT_MACROS #include ...

2 answers | 6 mins ago by d33tah on Stack Overflow
3 answers

how do you use golang with a private gitlab repo?

Gitlab is a free, open-source way to host private .git repositories but it does not seem to work with golang. When you create a project it generates a URL of the form: ...

3 answers | 9 mins ago by James Fremen on Stack Overflow
0 answers

Openframeworks, creating a video texture from two video grabbers

I am very new to C++ and image processing in general. I want to create a new unsigned char*which represents an array of pixels for use with ofTexture. I currently have two similar arrays which are ...

2 answers

pandas and category replacement

I'm trying to reduce the size of ~300 csv files (about a billion rows) by replacing lengthy fields with shorter, categorical, values. I'm making use of pandas, and I've iterated through each of the ...

0 answers

Importing Steam Community API in Unreal Engine

So I have my Steamworks SDK imported in my Unreal Engine project. It builds, and on run, I get the Steam overlay. Great! However, I am now trying to get the user's friends list, which requires the ...

0 answers

Converting complex raw query to django orm

Given PostgreSQL 9.2.10, Django 1.8, python 2.7.5 and the following models: class restProdAPI(models.Model): rest_id = models.PositiveIntegerField(primary_key=True) rest_host = ...

1 answer

Instagram Api Requests Systematically Refused

I have been using client id and auth token of instagram api for a while to make requests with urllib and json. Since a few days, any client id/auth token I create for an instagram account returns ...

1 answer

How to find file on disk without use of directories

I'm writing a C++ application that will watch to ensure certain files on disk exist. I've explored ReadDirectoryChanges and FindFirstFile/FindNextFile functions as well as a simple polling solution. ...

1 answers | 17 mins ago by zman on Stack Overflow
0 answers

how to remove gray border around matplotlib plots in Tkinter canvas

How can I remove the gray border that appears around each canvas? I am already setting the facecolor to black which I thought should take care of it. import matplotlib matplotlib.use('TkAgg') from ...

0 answers

Memory keeps on growing after writing large number of files

I've a sample program shown below which open a file and writes a 100kb of string into the file and closes the file. for a in xrange(100000): file_to = open('.//OutputFiles/Data' + str(a) + ...

2 answers

opencv highgui error

I installed the library opencv in my ubuntu pc and i wrote a program that takes a video from a webcam and it works. Yesterday I installed the driver for video capture "media_build" to take a video ...

2 answers | 22 mins ago by user2023431 on Stack Overflow
0 answers

What is the use of buffering in python's built-in open() function?

Python Documentation : open(name[, mode[, buffering]]) The above documentation says "The optional buffering argument specifies the file’s desired ...

1 answer

Python pandas: How do I drop specific levels in a hierarchical index if any column values are NaN?

I want to drop entire levels (in this case, countries) in my hierarchical index if ANY of the data values for that country are NaN. So I want to go from something like this: ...

1 answers | 27 mins ago by Martin on Stack Overflow
0 answers

Python Pandas Hierarchical index iterrows without converting data types

I have a data frame with a hierarchical index. step_index datapoint_num potential si max N min sum_of_squares sum sn ...

0 answers

Ctrl-U doesn't work in MacVim

The shortcut Ctrl-U (in normal mode) doesn't work in my MacVim, while Ctrl-D works fine. Also Ctrl-O does nothing, while Ctrl-I works as extected. Could anyone help me please? I'm using MacVim 7.4 ...

1 answer

my Italic font vim iTerm2 on mac not working

I am having trouble implementing italic style in my Vim under iTerm2 on OS X Yosimite. I did the step-by-step from and my iTerm is able to ...

1 answers | 35 mins ago by helman on Stack Overflow
0 answers

Encrypt RSA with a PUBLICKEYBLOB Windows Crypto API

I have a PEM RSA private key stored as a const char* in my code and can decrypt some data which is encrypted by my client software using the associated public key just fine. However, I need to ...

0 answers

Push only current branch to remote in mercurial

I normally branch from default to a new branch and always fix my issues on the new branch. After fix, I commit to the new branch and merge it to the default. Then i push the default with "hg push" ...

1 answer Path Directives serve index.html

I want to set up a Spray route to serve web content out of a directory. For example, the below URLs should resolve to the same file. ...

1 answers | 38 mins ago by Upio on Stack Overflow
1 answer

Sorting a 2D array using the second column C++

I have to sort a 2D array of ranks and names (used as strings) based on the second column. I'm trying to sort it in alphabetical order but I can't seem to get it right. I'm still new to ...

1 answers | 43 mins ago by Bea on Stack Overflow
1 answer

PIGPIO debounce

I have tried to do debounce using the pigpio library but it wasn't successful import pigpio captureFlag=1 pi=pigpio.pi() def ImgCap(gpio.level.ticks): global captureFlag if captureFlag==0: ...

1 answers | 44 mins ago by Hasi on Stack Overflow
0 answers

Kivy - Bind Label Text To Variable (Python Only)

I have been trying to get my labels to auto-update themselves for quite a while now and I have read over a dozen StackOverflow questions but to no avail. I have an global object that contains an ...

0 answers

plot multiple columns on same graph seaborn

I have a pandas dataFrame that I am plotting with seaborn: g = sns.FacetGrid(readCov, col='chr', col_wrap = 4, size=4), 'pos', 'bergC9', hue = edgecolor='white') g.set(xlim= (0, ...

15 30 50 per page
1 2 3