Sample Filter
   11 tags on

2 answers

Match anything EXCEPT a sequence of periods or ellipses

I want to use Python's re.findall() method to match something like the following: Email......@gmail.com in the manner that I get a return value of ["Email", "@gmail.com"] The dots can be ...

2 answers | 41 secs ago by allicoder on Stack Overflow stackoverflow.com
1 answer

Why the virtual destructor in derived class is empty?

I have one question, I see that in some codes, the virtual destructor in derived class is empty, then why we need it since it does nothing? Is it used to call the destructor in base class and without ...

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

bash screenshot script and writing url to file

This is my code: #!/bin/bash DATE=`date +%Y-%m-%d\ %H:%M:%S` import -window root "$HOME/Desktop/1.png" python imgur.py > "$HOME/Desktop/tekst.txt" mv "$HOME/Desktop/1.png" ...

0 answers

Plot csv file series using python

What is a very efficient way I can read data from a csv file then produce a graph of the different columns, where each column is graphed as a different color? I am interested in a method that can be ...

1 answer

Slicing Multidimentional array in python

I am trying to remove specific indexes in a 2d array as follows. a = [[1, *2, 3] [4, 5, 6*] [7*, 8, 9]] I want to delete the specific indexes(with *) of a 3x3 array and make it 2x3 array. ...

1 answers | 5 mins ago by Subhransu on Stack Overflow stackoverflow.com
2 answers

Boost Serialization Binary Archive giving incorrect output

I am trying to Serialize a class. Class definition: class StartPeerSessionRequest { public: StartPeerSessionRequest(); virtual ~StartPeerSessionRequest(); void ...

0 answers

SSPI delegation for double hop

I'm trying to do delegation with SSPI (and C++) I've made a TCP/IP client/server and want to do a double hop with SQLServer2008. So, The client is connecting to my TCP server with Kerberos without a ...

14 answers

Find all files in directory with extension .txt with python

How can I find all files in directory with the extension .txt in python?

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

Checking for indents in Python File IO

The problem I've been struggling with is: say I want to read in a .py file, indents and all. How do I check for an indent when I read in the file?

1 answers | 12 mins ago by Chris Boling on Stack Overflow stackoverflow.com
4 answers

What is special about numbers starting with zero?

This is kinda stupid question, but it's interesting for me ) This is what i get with visual studio 2013 int i = 07; // i == 7 int i = 16; // i == 16 int i = 00016; // i == 14, why? int i = ...

1 answer

compare a value of a pair with a string

config is a map within a map: std::map<std::string, std::map<std::string, std::string>> config; I'm trying to parse a configuration file (.ini). so, config[sectionName] = ...

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

getline() reading in when no input is present

Alright, I wrote a game of hangman. The game works great, except after the user finishes the game, and enters the char value of Y to play again. I have traced the problem down to the getline() ...

2 answers | 16 mins ago by Adam J on Stack Overflow stackoverflow.com
3 answers

Is there a difference between -1 and ~0?

When comparing a unsigned value, as in this test: if (pos == (size_t)-1) Is this comparison technically different from something like: if (pos == (size_t)~0) I am not used to the second variant. ...

3 answers | 16 mins ago by yves Baumes on Stack Overflow stackoverflow.com
0 answers

Django no such column error in admin

I'm returning an error in Django when a field is added to my Catalog model. The model work fine with just the "Article" foreign key, but when the "Annual" foreign key is added I get the following ...

4 answers

What does the assignment of ~0u to a variable mean in C++?

I understand 0u means 0 unsigned, but what does the ~ at the beginning mean? Does it signify inversion in this case or does it mean something else?

4 answers | 17 mins ago by ryeager on Stack Overflow stackoverflow.com
0 answers

Cannot Install pip on python 3.2

I am trying to install pip on python 3.2, and I am not sure what I am doing wrong. I followed the instructions provided in this video. I downloaded the file for setuptools and installed it without ...

2 answers

Socket program seg faulted: *** stack smashing detected ***

So I have a person that I allowed to test out my Socket program and they got it to segfault with the message: *** stack smashing detected ***: ./myProgram terminated Which as I understand it, is a ...

2 answers | 23 mins ago by theMonster on Stack Overflow stackoverflow.com
1 answer

TCHAR, WCHAR, LPWSTR, LPSTR, wstring clarification

Hello everybody and good afternoon. So I'm still new-ish to this scene but have quite the ambition for it and I've been trying to learn as much as i can. i consider myself to be adept in c++ but I've ...

1 answers | 24 mins ago by Pr Erkle on Stack Overflow stackoverflow.com
1 answer

how to write nested json using jsoncpp in c++

{ "id": "1234567890", "seatbid": [ { "bid" : [ { "id": "1", "crid" : "creative112", ...

1 answers | 24 mins ago by user3282963 on Stack Overflow stackoverflow.com
1 answer

Gurobi: Unable to convert argument to an expression

I'm kinda new to gurobi on python Is there someone who can explain me what I'm doing wrong? I get the error : gurobipy.GurobiError: Unable to convert argument to an expression when I call : ...

0 answers

Hybrid expression that counts number rows with condition

I have 4 tables: class Cebola(Base): __tablename__ = 'cebolas' id = Column(Integer, primary_key=True, autoincrement=True) class Checklist(Base): __tablename__ = 'checklists' id = ...

0 answers

Git Push Heroku Master - Failing?

so i tried pushing this app to heroku: https://github.com/harrystech/prelaunchr i am using virtualbox with ubuntu. i installed ruby using this: $ sudo apt-get install curl # Required $ curl ...

2 answers

Crontab wont run python script

When I execute my python script from the command line I have no problems like so: [rv@med240-183 db]$ python formatdb.py [rv@med240-183 db]$ When I try to use crontab to run the script every ...

2 answers | 29 mins ago by Phil on Stack Overflow stackoverflow.com
3 answers

How to implement an heterogeneous container in Scala

I need an heterogeneous, typesafe container to store unrelated type A, B, C. Here is a kind of type-level specification : trait Container { putA(a: A) putB(b: B) putC(c: C) put(o: Any) = { ...

1 answer

Syntastic going passive mode

It's been quite some time that I'm facing this annoying problem with syntastic. When running gvim and performing a SyntasticInfo c, without opening anything, it returns me : Syntastic version: ...

1 answers | 30 mins ago by ScriptorTux on Stack Overflow stackoverflow.com
0 answers

Numbapro: No speed-up for Matrix Multiplication

For last couple of days I've been trying to understand why Numbapro (Accelerate from Continuum Analytics, Inc.; I'm running a 30day trial version) does not accelerate on my MacBook Pro (Intel Core i7, ...

1 answer

C++ Issue with Stream Operators

I'm very new to Cpp and am having some issues declaring input streams. I keep getting an error, "error: no match for 'operator>>' in 'std::cin >> new_contact.Person::Name', in addition to a whole slew ...

1 answers | 31 mins ago by Eric on Stack Overflow stackoverflow.com
2 answers

Fastest way to get all combinations of numbers in array without gaps

I need to calculate the sum from every possible combination of numbers in array (separate sums, not one total). Combinations cannot skip a number, so: For y > x you need to add every number between ...

2 answers | 34 mins ago by Demiu on Stack Overflow stackoverflow.com
0 answers

How to use custom XML attributes with Swiften

I'm currently developing a XMPP-based system that consists of an iOS app, an ejabberd server, and a standalone client that acts as a controller that can receive requests from users and take actions ...

0 answers

Errors Merging a Git Submodule into its Parent Repository in OS X

I have cloned a parent repository 'objc4' from https://github.com/RandomDSdevel/objc4 to the local path '/Volumes/Development/Repositories/objc4.' This parent repository contains a submodule ...

15 30 50 per page
1 2 3