Sample Filter
   11 tags on

1 answer

Use .join() to manipulate inner dictionary elements of a nested dictionary

Apologies for the basic question, I tried to put together information from other questions but with no success. Assume I have data in the following form: file_list = ["f1", "f2", "f3"] inner_dict = ...

1 answers | 56 secs ago by Stezzo on Stack Overflow
1 answer

Rewrite Rails 3 to Rails 4 what to do with Git repo

If I have an old Rails 3 app and I wanted to rewrite the entire thing from scratch to Rails 4.2 (not upgrade); is it recommended to delete everything on the git branch and run the rails new myapp ...

0 answers

Creating a data dump using RDFib and adding data to a Graph without iteration

I have parsed some data from DBpedia using RDFlib: dbpediaSparqlEndpoint = '' sparql = SPARQLWrapper(dbpediaSparqlEndpoint) dbpedia_query = 'PREFIX : ...

1 answer

Scala client composition with Traits vs implementing an abstract class

I have read that with Scala, it is generally advised to use Traits instead of Abstract classes to extend a base class. Is the following a good design pattern and layout? Is this how Traits were ...

4 answers

How to add to set and increase counter in scala?

I want to add an item to the set, if item doesn't exist in set already. If item is added, I want to increase the counter and return the count at the end. What is the scala way of doing this? Here is ...

4 answers | 3 mins ago by Z-1 on Stack Overflow
1 answer

div tag not populating, using selenium python, inner HTML

I'm trying to access what appears to be a hidden table within a div tag on the following page: ...under the link "Passing" from selenium import webdriver driver = webdriver.Chrome() ...

2 answers

How to fill a global variable without calling for it in main program flow?

I'l like this piece of the library to be accessible without having to explicitly initialize it first, heres what I tried: #pragma once #include <Windows.h> struct SysInfoClass { DWORD ...

2 answers | 4 mins ago by user81993 on Stack Overflow
1 answer

Find next largest palindrome number

I wrote the following program to find the nearest largest palindrome for each of the entered numbers. The first line gives input of how many integers are to be entered. My problem is I've tried with ...

2 answers

Nested Query in From and Having clauses

Schema: CREATE TABLE companies ( company_name varchar(200), market varchar(200), funding_total integer, status varchar(20), country varchar(10), state varchar(10), city varchar(30), funding_rounds ...

2 answers | 5 mins ago by ajfbiw.s on Stack Overflow
4 answers

Python, zip multiple lists where one list requires two items each

I have the following lists as an example: a = ['#12908069', '#12906115', '#12904949', '#12904654', '#12904288', '#12903553'] b = ['85028,', '83646,', '77015,', '90011,', '91902,', '80203,'] c ...

4 answers | 6 mins ago by Kenny Powers on Stack Overflow
0 answers

using gstreamer within kivy

I already aksed this question at the kivy user group, but unfortunately does not get an answer. That's why I try it here again: Do I have the full gstreamer framework available (similar to having the ...

2 answers

Static initializer inside member function require compile-time constant?

I have seen it written that: The static initializer is executed before the first invocation of the containing function; the initializer expression must be a compile-time constant. Consider this: ...

2 answers | 6 mins ago by johnbakers on Stack Overflow
0 answers

Simplex implementation giving incorrect result

My python implementation of the simplex algorithm is getting stuck in a corner on this example: Maximise: x_1 + x_2 Subject to: 4*x_1 - x_2 <= 8 2*x_1 + x_2 <= 10 5*x_1 - ...

0 answers

Get Depth in mm for recorded video from Kinect sdk

i am using recorded video from kinect with c++ language for my project. I am trying to get the real world coordinates (real depth) for a point. but i dont know, if there is a function in kinect sdk ...

1 answer

Suppress or overwrite keyword NULL

I am parsing a complex grammar which requires me to define an enum class like so: enum class NULLSTYLE { NULL, NOTNULL }; Since I could just use 0 or nullptr in C++11, can I somehow ...

1 answers | 8 mins ago by Arne Wolframm on Stack Overflow
0 answers

What is the (current) state of scala reflection capabilities, especially wrt annotations, as of version 2.11?

scala appears to be a wonderful addition to the JVM universe. It reminds me of a strange hybrid of C++, C#, and Swift, nested in the JVM world. However, many of scala's features may be inaccessible ...

2 answers

Sort-Merge-Join Algorithm in Python

My code: def merge_join(self, outer, outer_join_index, inner, inner_join_index): a=list(inner) b=list(outer) if not a or not b: return inner_copy = sorted(a,key=lambda tup: ...

2 answers | 15 mins ago by qwt185 on Stack Overflow
0 answers

What is the proper way to update related data when using Eve?

I am using Flask-SQLAlchemy and Eve (eve-sqlalchemy). And I have some models, like Person and PersonTelephonenumber. In my model definition Person has-many PersonTelephonenumber. I know how I can ...

2 answers

Can I contribute to a project hosted on GitHub from my GitLab account?

I'm new to Git and have started with GitLab which I quite like. One of the projects that I'd like to contribute to is hosted on GitHub. Is there a way for me to contribute to the project from my ...

2 answers | 16 mins ago by Leo on Stack Overflow
1 answer

Python Packet Sniffer and Sockets for Noobs

So I have some questions about sockets and sniffer programming... I've just started programming and have a project where I would like to use information that is sent across my network. I tried ...

3 answers

refer to Array pattern in scala

val Array(direction, value, power, type, zone) = Array(1, 2, 3, 4, 5) Is there any way to refer Array(1, 2, 3, 4, 5) from some reference that we can use to perform other array operations like ...

3 answers | 18 mins ago by rits on Stack Overflow
0 answers

Error cropping Mat

Point particle_position ; // Define the particle's point Mat binaryMat; // Initialize a Matrix Rect myROI = Rect(particle_position.x,particle_position.y,50,50); // Cropping the whole image to smaller ...

0 answers

The way to deploy application for testing?

We develop a product and have as many git branches as any other active repository. Those branches have database migration. Two problems: 1. It is common issue when we switched to a branch, ran ...

1 answer

How do I add Builder methods to a custom IndexedSeq in Scala?

As a simplified example, assume I want to set up an IndexedSeq that is typed specifically to use integers, like the below: class IntSeq private(val ints: Seq[Int], val length: Int) extends ...

7 answers

How “\n”,“\t” adds a new line and tab respectively?

In programming languages if I use "\n" it adds a newline character. Could somebody explain how this works? How the "\n" gets translated to a newline and the same for "\t"?

7 answers | 27 mins ago by function on Stack Overflow
1 answer

How to determine if a text occurs somewhere in the sequence?

I'm suppose to code as if the sequence was streaming a very large file that would not fit in memory. Can someone help me on this please? Thank you so much!! Here's my code: def ...

1 answers | 30 mins ago by zyxcom on Stack Overflow
1 answer

Passing member variables (QList) by reference to a member function?

I have an application whose purpose is to take a key press value and place it into a QList. However, every time I call the class member function that handles the QList modifications, the member ...

1 answers | 30 mins ago by orbit on Stack Overflow
1 answer

numpy : normalize column B according to value of column A

Given a numpy array [A B], were A are differents indexes and B count values. How can i normalize the B values according to their A value ? i tried : def normalize(np_array): normalized_array = ...

0 answers

V8 compiler errors

I recently managed to generate the visual studio project file for V8, but it doesn't compile When I compile the All solution it spends maybe ~10 minutes compiling and then presents me with a bunch of ...

0 answers

undefined reference to `icu_56::UnicodeString::UnicodeString(signed char, unsigned short const*, int)'

I am running ubuntu, and I can build ICU I have included: #include <unistr.h> using namespace icu; This is my build method for ICU: CPPFLAGS="-DU_USING_ICU_NAMESPACE=0" ...

15 30 50 per page
1 2 3