Sample Filter
   11 tags on

2 answers

Where/How can I obtain a locale's alphabet in Python?

Is there a Python library, or online resource I can use to programmatically obtain the alphabet of a particular locale? For example, for the 'es_ES' locale I'd like to obtain ...

1 answer

Accessing a vector of pointers

this is for a CS assignment. I've looked at similar problems/questions, but can't seem to find an answer for this. A little background info: We need to sort c-strings in a list and count how many ...

1 answers | 43 secs ago by Carousser on Stack Overflow stackoverflow.com
1 answer

How do I check if a User is using a mobile device in Django 1.9?

I'm using Django 1.9 with Python 2.7 and I'm trying to get my app to recognize if the user is browsing with a mobile device. I've tried django_mobile but it seems outdated for django 1.9 because there ...

0 answers

Looping through a dictionary using a generator in Python

I am trying to loop on a dictionary to find all the possible combinations, to be more specific, if I input {'a' : [1,2], 'b' : 3}, I want to get {'a' : 1, 'b' : 3} and {'a' : 2, 'b' : 3}. I tried to ...

1 answer

Greedy Algorithm for coin change c++

So, I'm creating a coin change algorithm that take a Value N and any number of denomination and if it doesn't have a 1, i have to include 1 automatically. I already did this, but there is a flaw now i ...

0 answers

How do I read from a file and print to the console without using a variable using C++?

In my code I have for (int i = 0; i < 10; i++) { ranInts= rand();//generate a random integer, store in ranInts cout << ranInts<< " ";//Print out ints ...

1 answer

Modern double reference

I've been learning a bit of modern C++, improving my code style and stuff, then I got to that part where I actually don't understand certain thing. It is basically anything with double reference: for ...

1 answers | 5 mins ago by dadas dasdas on Stack Overflow stackoverflow.com
1 answer

Build (or precompute) histogram from file too large for memory

Is there a graphing library for python that doesn't require storing all raw data points as a numpy array or list in order to graph a histogram? I have a dataset too large for memory, and I don't ...

0 answers

Written code on TextWrangler and when (seems like) perfect code is ran on idlE it shows up with a syntax

This is my code: def trip(nights): return 140 * nights def plane_cost(ride): if ride == "London": return 220 elif ride == "Rome": return 200 elif ride == "Glascow": ...

0 answers

Thread 1: signal SIGABRT C++

I am trying to implement a Polynomial as a linked list. How it works is the Polynomial needs a constructor that will allow it to be passed a vector of ints as its coefficients. If a Polynomial is ...

1 answer

vimrc function to search filename using literal `*` in a file which has list of all project filenames with absolute path

I have a large file called index.txt which has all absolute path of all files listed say, common/mac_get.c common/addr/addr_main_set_clear_config.c common/addr/mac/mac_load_done.c Need to write ...

1 answers | 9 mins ago by ypp on Stack Overflow stackoverflow.com
1 answer

Tensorflow: How to modify the value in tensor

Since I need to write some preprocesses for the data before using Tensorflow to train models, some modifications on the tensor is needed. However, I have no idea about how to modify the values in ...

1 answers | 10 mins ago by user3030046 on Stack Overflow stackoverflow.com
1 answer

Two local branches track separate remote Git repos

I have one local repo with two branches master private I want the master branch to track origin/master from the public repo on Github. I want the private branch to track origin_private/master from ...

1 answer

Issue with porting Python C library to “pure” C

I want to port a small library, that was written in C with the Python C API, to a pure C library/application. In the end I want this to work in C++ but I thought its better to get it working without ...

0 answers

Django - why is edit form posting to edit url + create url on top of each other?

I'm reusing my 'create' form for an edit view. 'Create' routing works just fine, but when the 'edit' form is submitted, my terminal says it tries to POST /comment/edit/26/comment/add/. I was trying a ...

0 answers

how to put a condition on a selection field

I am a beginner in odoo and I am know how to make a selection condition on a field, here is my code: ETAT_DOSSIER = [ ('dos_comp','Dossier Complet'), ('dos_manq','Dossier Manquant'), ...

2 answers

Can you generate instances of a class with unique members using a function?

I'm trying to generate 100 instances of an object, each with a numbered ID member. When I run this, I was expecting it to generate 100 instances of the Cell class with cell_IDs such as cell1, cell2, ...

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

variable columns amount Anorm result set parser

I'm experimenting with scala, here is my stack: Windows 10 JDK 1.8 Scala 2.11.8 PlayFramework 2.5 Anorm 2.4.0 MySql 5.5 I want to create a result set parser with Anorm that will ...

1 answers | 15 mins ago by Chupakabra Hunter on Stack Overflow stackoverflow.com
0 answers

C++ - Brent-Pollard rho algorithm infinite loop

I have this following function. I got it from two sites and tried to adapt it into my own but it didn't work very well. When I test unsigned long int max - 2 or to but it as a number 4294967293 it ...

0 answers

fblualib installation error curl (TH++)

I am trying to install fblualib using: curl -sk https://raw.githubusercontent.com/facebook/fblualib/master/install_all.sh | bash on Ubuntu 14.04. I have the dependencies installed. I am getting ...

2 answers

Python input based on short circuit

I am familiar with Python short circuits(AND, OR, NOT) but this seems weird to me. Here it is: What does the following line of Python code do? day = input("What day do you want [Tuesday]: ") or ...

2 answers | 17 mins ago by Zebra on Stack Overflow stackoverflow.com
1 answer

Multicore and multithread on Ipython Notebook

I am currently using the threading function in python and got the following: In [1]: import threading threading.activeCount() Out[1]: 4 Now on my terminal, I use lscpu and learned there are 2 ...

0 answers

Sort word sequence with pointers c++

first question on stackoverflow , i need to sort a sequence of words with pointers, can anyone help me? -Not sure it's ok nod_curent->NOD_urmator->word #include <stdio.h> #include ...

4 answers

Check file name is valid windows name

I wanna check if my string is valid windows file path. I was searching around and it seems that there is no reliable method to do that. Also I checked boost filesystem library , and no obvious ...

0 answers

Longest match in a Mongodb list

Say we have a following in the Mongo [{joe: { list: [ { "activity" : "buy", "type" : "cheese-cheddar" }, { "activity" : "dontbuy", "type" : "cheese-pepperjack" }, { ...

2 answers

How to combine diffs of previous commits in Git

I started working on an issue that I thought would only take one commit, then I started to include other features and UI changes with this issue and it ended up being 4 commits or so. I want to see a ...

2 answers | 20 mins ago by Logan Murphy on Stack Overflow stackoverflow.com
0 answers

How to pass correct client ip from nginx running in one container to python-flask app running 2nd container?

I have two docker container running, one is a nginx as reverse-proxy on 80,443 that accepts http and https requests and passes them to the another container which is a Python Flask App container ...

2 answers

Deriving from pure virtual template class

I belive my problem is simple, yet I cannot manage to overcome it. I have abstract template class aghContainer and child template class aghVector. I am trying to make aghVector object, but I get an ...

1 answer

Python Google Search: Hits within date range are inaccurate

I've been trying to write code to scrape the number of hits within a certain date range on google. I've done this by inserting the date into the google search query. When I copy and paste the link it ...

0 answers

Error building project using tensorflow

I am getting the error: error loading package '': Extension file not found. Unable to load package for '//tensorflow/tensorflow:workspace.bzl': BUILD file not found on package path. Any time I try ...

15 30 50 per page
1 2 3