Multiple Conditions in Nhibernate Left Join

SQL
Please need some help converting this sql query to nhibernate select a.ID, count(b.ID) from appusers a left join weeklytasks b on a.ID...
47 seconds ago

RESTfully design /login or /register resources?

reST (reStructuredText)
I was designing a web app and then stopped to think about how my api should be designed as a RESTful web service. For now, most of my URI's are gener...
3 minutes ago

react-router Link calling Redux Action

React JSX
I have a menu in React with an option to Log out. I keep the session state in the Redux store. When I click on the Log out option I want to dispatch a...
4 minutes ago

R merge error: output filled of 'NA' for large data frames

R
I am trying to use the merge function of R on a large dataset: First data frame is Dates called Dates_test (dim = 7472 x 1) Second data frame are Da...
5 minutes ago

Relatively Referencing Observations in a function in R

R
When writing a function that calculates each observation in a vector, how do I reference said observation to include cells of observations that are a ...
5 minutes ago

Cannot load RevoScaler

R
I have just installed R evolution (Windows 7, 64 bit). Immediately after loading, RStudio shows the following error: Error : .onLoad failed in lo...
5 minutes ago

Any efficent way other than loops to clean large observations?

R
i have a dataset of 550 242 observations and 9 variables str(train) 'data.frame': 550242 obs. of 9 variables: $ State.Name : chr "ANDHRA...
5 minutes ago

Pre-fill new functions in Eclipse and Pydev with docstring and "Not Implemented" exception

Python
I am editing my Python source code with Eclipse and Pydev. I want to document all of my functions and raise a "Not Implemented" exception whenever a ...
5 minutes ago

matplotlib savefig - text chopped off

Python
Say I create a plot: import matplotlib.pyplot as plt plt.clf() import numpy as np props = np.random.randint(0,100,(200,)) x=np.arange(1,201,1) plt.pl...
5 minutes ago

Intersection of sets as columns in pandas

Python
I have a df such as: df=pd.DataFrame.from_items([('i', [set([1,2,3,4]), set([1,2,3,4]), set([1,2,3,4]),set([1,2,3,4])]), ('j', [set([2,3]), set([1]),...
5 minutes ago

Data imputation with fancyimpute and pandas

Python
I have a large pandas data fame df. It has quite a few missings. Dropping row/or col-wise is not an option. Imputing medians, means or the most freque...
5 minutes ago

auto update many to many field

Python
i have following database model class Author(models.Model): choices=['Mr.','Mrs.','Er.','Dr','Prof',] name=models.CharField('Authors Name',ma...
5 minutes ago

Given a character with Unicode General Category Ps or Pi, what's the matching closing character?

Python
Some opening punctuation characters (Unicode General Category Ps) and opening quote characters (Unicode General Category Pi) happen to have their appr...
5 minutes ago

Scrapy and xpath find <a> with the text "»"

Python
I have a spider, which has to find the «next» link —the one with the "»" inside— from this HTML: &lt;div id="content-center"&gt; &lt;div class="p...
5 minutes ago

Python Catching Exception But Printing Them

Python
I have built a max heap and trying to extract max as long as there are elements. If there isn't I'm returning an IndexError. This the code I'm trying ...
5 minutes ago

Grok learning- "How many words"

Python
I'm doing a question on grok learning, it asks for this: You are learning a new language, and are having a competition to see how many unique word...
5 minutes ago

Django count in model

Python
I have a simple model to register if any user like an article in my blog. class Like(models.Model): articles = models.ForeignKey(Articles, verbos...
5 minutes ago

How do I correctly check if text box is empty or not?

Python
When I enter nothing in the text and click enter, it counts the length of the text as 1, which means there is something there. (Presumably a space), a...
5 minutes ago

CodeIgniter Password Encryption And Validation

PHP
I'm using CodeIgniter, and am creating a section of the site where users need to be logged in. I have been reading about storing passwords as MD5 Hash...
7 minutes ago

How can I override resources from Third-Party bundle Symfony 4 structure?

PHP
I did a fresh Symfony installation by using Symfony Flex and the new skeleton belong to the next Symfony 4 structure. Next, I'm going to override some...
7 minutes ago

WooCommerce product collection issue

PHP
I would like to ask how is it possible when i have 3000 variable products in an old woocommerce version eshop, when i am trying to loop throught the...
7 minutes ago

Eloquent: find() and where() usage laravel

PHP
I am trying to get a record from a posts database table using its id. I've been banging my head on the find() method for quite sometime now, confused ...
7 minutes ago

Laravel relationship with pivot table

PHP
I have 3 tables in my database : users (id); interests (id); users_interests (user_id, interests_id); I want to be able to fetch all the user's in...
7 minutes ago

Implementing qsort in Objective-C

Objective-C
I'm trying to use qsort to sort a C array in descending order based on what this website is suggesting. Here is the relevant code: int x = 3; - (I...
9 minutes ago

Node Crypto aes-128-ecb encrypt doesnt get me right results

Node.js
Following program in python: from Crypto.Cipher import AES key = '11223344556677889900aabbccddeeff'.decode("hex") aesECB = AES.new(key, AES.MODE_ECB)...
9 minutes ago