FAQ Database Discussion Community


Couldn't find User with 'id'=

ruby-on-rails,ruby,ruby-on-rails-4,devise,user
I know this is the most commonly asked question but i am really looking for some help here as i don't understand what i am doing wrong here . I have a generated a devise user and intend to create a gallery for users . Following is the code i...

Difference between honor, verified, audit and staff in openedx

user,openedx
Can anyone explain to me the difference between each user type (honor, verified, audit and staff) and they roles ? (a brief explanation of each user and what they can do). I searched in the official documentation, but i found nothing ! Thanks....

How to check if a group exists and add if it doesn't in Linux Shell Script

linux,shell,ubuntu,user,group
this is a summary of what i want my code to do: if (group exists) then (add user to group) else (create group) (add user to group) fi I am using the Ubuntu virtual machine but all of the results i have found on similar sites do not work....

Creating two types of users Rails app

ruby-on-rails,ruby,session,user,rails-models
I'm creating a rails app that has two types of users: drivers and mechanics. So far I have the drivers class (called "users") completely set up with profiles and attributes with a "cars" model connected so they can add cars to their profile. Now I need to create "mechanic" users...

How can I add additional columns to a Users table with rails and devise gem? [closed]

ruby-on-rails,ruby,database,devise,user
I am making an app in rails so that when a User adds their medications, it will add the medication in a new column in the Users table. I am using the devise gem with my User model, and I haven't made any additional changes to the User table other...

Can't create user in MySQL 5.6

mysql,user,admin
I want to create a user, which will be an admin in my classicmodels database. I want that my admin user can create other user accounts and assign them only to classicmodels database. I have already done the following steps: logged as root create user [email protected]'%' identified by 'qwerty'; grant...

author = models.ForeignKey('auth.User', null=True, blank=False) trouble

django,user,foreign-keys,author
I have a table where I save data(description, x, y, result and creation date) and until now everything works. I thought then to add a column with the author for each saved line eg: DES| X | Y | RESULT |CREATION DATE| AUTHOR | hi | 3| 1 | 4...

Linking two controllers in Rails

ruby-on-rails,ruby,model,user,controllers
I have a signed in user profile and each profile has its own phone-book that no other user can access. The question is how should i implement it. Considering User as one controller and phone-book as another i'm not able to establish a relation between the two for a specific...

fetching a http process user using bash

regex,bash,http,process,user
Whats the best way to fetch a web process user (apache|nginx|www-data) for bash script usage? In my case for setting up folder permissions and changing to the poper owner. Currently I'm using: ps aux | grep -E "(www-data|apache|nginx).*(httpd|apache2|nginx)" \ | grep -o "^[a-z\-]*" | head -n1 inside a bash script...

How to use the same auth userprofile in multiple apps in Django 1.6

python,django,authentication,login,user
I'm using Django 1.6 auth module to login users and I have a project consisting of two apps and I want to use the same user by calling request.user.username in the view in my second app. That is, in my template login.html in the first app this works {% if...

Cocos2dx 3.4 - manipulating user input

text,input,user,field,cocos2d-x
I am working on a breakout-type game using Cocos2dx, and I need some help, as I am a complete novice. Currently I need to make a highscore table. After the game is finished, I'd like to display a page, where player types his username into text field. The problem is...

Assigning a User Id to a Nested Model

ruby-on-rails,ruby,ruby-on-rails-4,devise,user
Using Rails 4 with Devise I have a Post model and a Comment model. Comments are nested into Posts. I have assigned posts to a user, but having trouble assigning comments to a user since it is nested. routes.rb resources :posts do resources :comments end user.rb has_many :posts has_many :comments...

Powershell LDAP Request per User

powershell,ldap,user,user-accounts
Is there a possibility to determine when a useraccount last did an LDAP request? I am trying to determine the User-Accounts wich havent been used since some Months. I cant do this with LastLogonDate because a LDAP request isnt a Logon. Thanks...

Check multiple objects up against request.user in template django

django,templates,user,views
What I basicly want do to is check if an user has applied for one or more of the jobs in a list of jobs. In my view i have: jobs = Job.objects.filter(status='open').order_by('-created_at') And in my template I have: {% if user == job.creator %} {% if not job.get_applicants %}...

SWIFT + Parse signUpInBackgroundWithBlock no longer works: Xcode 6.3.1 [duplicate]

xcode,swift,parse.com,user,xcode6.3.1
This question already has an answer here: Parse SDK methods not working in Xcode 6.3 Beta 5 answers I'm using the latest parse code from the parse.com for user.signupInBackgroundWithBlock user.signUpInBackgroundWithBlock { (succeeded: Bool?, error: NSError?) -> Void in if let error = error { let errorString = error.userInfo?["error"] as?...

Retrieving Custom Parse User Variables

ios,parse.com,user
I am creating an app which uses Parse. I have set up a user sign up and login. I have the username and password options all figured out, but I want a third option. This is going to be a string called "school" user["school"] = "Your School Here" and it...

Wordpress - Edit dashboard based on user id NOT user role

css,wordpress,user,wordpress-theming
Is there a way to edit the dashboard based on the user ID? I know this is relatively straight forward when targeting a user role, but how about ID? For a working example, something along the lines of changing the admin menu background color for the user ID of 7....

Use PHP in Array and Title For Wordpress Term Creation

php,wordpress,insert,user,category
So I'm trying to create two categories when the user logs in. I need the category names to be the username of the user who is logging in. I'm fairly new to PHP and I've been looking through the Codex and I know how to get the user information but...

Displaying multiplication table based on user input

java,input,user
I'm working on iterations right now, as shown in this page of my textbook: http://i.stack.imgur.com/i7vbm.jpg I have worked out the following code: package rectangle; import java.util.Scanner; public class messin { public static void main(String[] args){ int number; Scanner scanner = new Scanner(System.in); number = scanner.nextInt(); double newstuff = Math.sqrt(number*number+number*number); System.out.format("%10.3f%n",...

Add user input to JFrame [closed]

java,debugging,jframe,user,jtextfield
How can I make a JFrame have an option for user input, that can also detect a certain input and do something afterwards? Is it something along the lines of JTextField?

Laravel Auth::user() relationships

php,authentication,laravel,user,eloquent
I am trying to get my users role relation through the Auth::user() function. I have done this before but for some reason it is not working. Auth::user()->role This returns the error trying to get property from non-object. In my user model I have this: public function role() { return $this->belongsTo('vendor\package\Models\Role');...

How to handle 5 million users? ASP.NET Identity

asp.net,user,identity
I am running a ASP.NET mvc5 app which currently has 5 million users. It is hosted in the Azure cloud. For the authentication I use the Asp.Net Identity for EntityFramework. However, the more users I get, the slower the register function becomes. I tried scaling the database, but the results...

How to measure user priority over a request in teradata?

sql,request,user,teradata,priority
In Teradata, I have set two differents priorities (low and high) for two different users Is there something that can proove that a request sent simultaneously by these two users will be treated differently according to the user priority ? Thanks in advance....

Trying to rename several account types at once based on current displayName

powershell,active-directory,user,rename,identity
This morning some awesome people helped me make a script to move user accounts based on their displayName to a certain OU. I tested and it worked. I cannibalized the script to make another one that will rename the same accounts based off of the same criteria. I've gone through...

How to do Google Sign-In in Meteor

authentication,login,meteor,user,iron-router
I've tried various tutorials and links on how to get Google Sign-In to work in Meteor to no avail. How can I create a google sign in button on my login page that redirects to my user dashboard--using iron:router perhaps (and shows the persons name in the corner), and restrict...

Django 1.8.2: Passing a data object to User.objects.create_user

python,django,user
Is there a way you can pass an instance of object (from Python) to the create_user method when creating a user on Django? What I mean is, suppose that I want to let the user decide whether to include a first name, a last name, both, or neither. An e-mail...

Disconnect Session via Powershell [closed]

session,powershell,user,server,disconnect
Is there a command to disconnect a user from a session on a server via PowerShell? To logoff i use: Logoff /server:<Server> <SessionID> ...

Setting data that belongs to a User in iron router

meteor,user,iron-router
Router.route('/settings', { name: 'settings', data: function() { return Settings.findOne({userId: Meteor.user()._id}); } }); It's showing an error in the browser: Uncaught TypeError: Cannot read property '_id' of undefined Any suggestions on how to grab the settings record for a logged in user?...

Jenkins java process started as a defined user

java,process,jenkins,user
Currently I'm running Jenkins on Windows machine, The problem is that sometimes java*32.exe process is not killed after build and hangs. I tried to use taskkill /F /IM java*32.exe to kill it before next build but it's not very effective. I think that the problem is caused by default user...

how to display articles by user in django?

django,user,views,models
I have article models: class Article(models.Model): title = models.CharField(max_length=200) body = models.TextField() pub_date = models.DateTimeField(editable=False) modified = models.DateTimeField(editable=True) whopost = models.ForeignKey(UserProfile) and I have userprofile models: class UserProfile(models.Model): user = models.OneToOneField(User) info1 = models.BooleanField(default=False) mobile = models.CharField(max_length=50,default="") I try to do a relation between a user and article so I...

Moodle php get current user country

php,get,user,profile,moodle
How can I get current logged in users country from profile information? I have searched many sites, have found some answers, but I haven't got them working. I currently have this code, that doesn't do the work: global $user; if ($user->country == 'Estonia') { redirect($CFG->wwwroot .'/course/view.php?id=15'); } else { redirect($CFG->wwwroot...

Storing per-user data in Meteor

meteor,user,data-modeling
I want to store information for every logged in user in my meteor app, such as their profile picture, bio, ect. But if I try to do something like Meteor.user().picLink = "..."; it appears to get erased on every subsequent call to Meteor.user(). I assume this means I'm not supposed...

How to create active directory user with UserPrincipalName length more than 20 chars

c#,.net,active-directory,user
Is there any way to create AD user account from C# code with UserPrincipalName length more than 20 chars? I tried to do it with userPrincipal.UserPrincipalName = [email protected] but got an error A device attached to the system is not functioning. At the same time user account with userPrincipal.UserPrincipalName =...

while loop in table [closed]

php,sql,while-loop,user
I have this problem with this while loop. I want to make a table where an administrator can see users and delete them. So I want this into a table. I have tried some echo's like: echo <table>, echo <td>, echo </td>, echo </table>. Unfortunately nothing of this al works....

storing array from user and accessing it

arrays,assembly,input,user,mips
I have to create an int array based on user input, sum the integers, and output the sum and the array itself. My code calculates the sum correctly, but I cannot output the list. It only prints out the last number and zeros and then gets stuck in an infinite...

Organizing Active Directory accounts

powershell,active-directory,user,organization,ou
I am trying to get a script to work that will organize my active directory accounts based off of their display name since all of our accounts have their OU in their name (or a subOU). I am trying to do this with an If statement inside of a ForEach...

user defined illegal exception

c#,exception,user,defined
I have this program where I'm supposed to return illegal triangle exception if sum of any 2 sides are greater than one. Where am i supposed to put the if(side1 + side2 < side3) throw new illegalTriangleException("Sum of any 2 sides not bigger than the other side"); if(side1 + side3...

Proper SSH ENV in an Ambari bootstrapped HDP 2.2 Cluster

shell,hadoop,ssh,user,ambari
Just rolled out a new 2.2 cluster w/ Ambari, which was awesome, but now when I hit the shell with my user, I don’t have the right JAVA_HOME set in my env. Is there something I should source on login that will setup my ENV properly (not just JAVA_HOME) or...

cloudkit: how to access main user's attributes?

swift,user,nsuserdefaults,cloudkit
I am fairly new to programing and a total newbie regarding cloudkit. I am trying to make an app in which every user would have a personal avatar, a nickname and so on. The problem is that I don't know how to access the user's account on cloudkit. My solution...

Trying to set a variable based on two user inputs in Swift

variables,swift,input,user
I am trying to replicate the Index Match function in excel. I have userInputQty and userInputLoc1. I need to use these to look at a chart and set a variable. For example: if userInputLoc1 <= 1 && userInputQty <= 23 { let printCost6 = 2.50 } else { let printCost6...

How can i spit the input into 2?

java,input,user,token
i have an input that consists of any 2 numbers on a single line and there can be an unlimited number of lines, ex. 30 60 81 22 38 18 I want to split each line into 2 tokens, first token is the number on the left and the second...

TYPO3: Pass current menu page uid as parameter to userFunc

function,menu,parameters,user,typoscript
How can I pass menu pages ids to a custom user function? I need it so that I can change some page links which are not valid in TYPO3. They will be parsed in another application. lib.test = HMENU lib.test { ... 1 = TMENU 1 { NO = 1...

check current user in mysql command line

mysql,user
Here is my question about mysql. After i logon to mysql using: mysql -u myname -p mysql> I wanted to know what the username I used to logon. Is there a way to check this? like "whoami" in unix? Thanks....

system.time command - diffrence?

r,user
When I run this command: system.time(fread('x.csv', header = T)) I receive this output: user system elapsed 4.740 0.048 4.785 In simple terms, what does each of those means, besides "elapsed," which the time that has passed since running the command? What do User and System mean?...

User path with username

ruby-on-rails,ruby,path,user,friendly-id
To show User's profile I used their id. In controller: @user = User.find(params[:id]) In routes: get ':id' => 'users#show' But now I try new way with username: get ':username' => 'users#show' #route @user = User.find_by(username: params[:username]) #controller And when I go to user's profile with /username I see error: undefined...

create permission for user to see only one view

sql,sql-server,login,permissions,user
I have a db and create login and user, this user is not able to see anything. grant select on GuestView to PublicLogin after this user see this view but user can select anything MY QUESTION Why I can lock user to do any select insert / update? I have...

How to Create API for User Data (MySQL & PHP)

php,mysql,api,login,user
I want to wish to create an application that registers/takes the users details (username, email and password primarily) into a MySQL Database from the domain example.com; however I am having trouble to find out how this information can be used to login into that site on subdomain.example.com and anotherdomain.com.

SQL Query Multiple Conditions

mysql,sql,user
I have two tables like these. They represent an interaction of following/followers between two users. users --------------------------------------- id | username | <br> 1 | bobby | <br> 2 | jessica | <br> 3 | jonny | <br> 4 | mike | <br> follows ---------------------------------------- id | userid_1 | userid_2 |...

Oracle trigger audit - How to log App user

oracle11g,user,audit-trail
I'm constructing a website. In this website, people will be able to manipulate several DB tables data. Everytime someone wants to make a CUD operation I want to log it (like and audit). The way I see it, I should use triggers for CUD operations, but I can't understand how...

Retrieving Facebook / Google+ / Linkedin profile picture having email address only

php,facebook,download,user,profile-picture
What I need I need to automatically find & download profile picture for user knowing his email address only. Originally, I focused on Facebook considering the amount of people actively using it. However, there seem to be no direct support from their API anymore. There was similar question here: How...

System and database leveled users in Oracle Database

sql,database,oracle,user
I'm using the Oracle Database EX 11.2.0.2.0 and I hava a quite simple database created there. Now the issue is i would like to have multiple users with different privileges set up. I have found that topic: How to create a user in Oracle 11g and grant permissions but I...

Django - Allow User to Edit Profile and then Show Updated Profile fields

django-forms,user
I have the form populating with the user profile information, but when I click save, it doesn't actually update. Any clues/hints as to which part I need to modify is greatly appreciated. Thanks in advance! views.py def profile_view(request): user = request.user form = EditProfileForm(initial={'first_name':user.first_name, 'last_name':user.last_name}) context = { "form": form...

ActionController::UrlGenerationError in Home#home No route me atches {:action=>“edit”, :controller=>“users”, :id=>nil} missing required keys: [:id]

ruby-on-rails,routing,user,actioncontroller
I get the error: ActionController::UrlGenerationError in Home#home No route matches {:action=>"edit", :controller=>"users", :id=>nil} missing required keys: [:id] in my home controller. When I am sign in, I get errors in the home/home mostly about No route matches...:controller=>"users", :id=>nil} missing required keys: [:id]. For some reason, it looks like the sign_in...

Python GUI html+css package [closed]

python,html,css,user
I want create python GUI application. I want use html+css for drawing controls (buttons, comboboxes and other) because I already have source code for them. Ultimately I want have executable file (generated with PyInstaller or with other 'py to exe' packages). I don't want use packages which represent webserver because...

how to print users of Parse in Objective C?

objective-c,arrays,parse.com,user,pfquery
I'm trying to print users loaded of Parse, but can't find the error in the code. -(void)viewDidLoad { [super viewDidLoad]; PFQuery *query = [PFQuery queryWithClassName:@"User"]; [query orderByAscending:@"username"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"Error: %@, %@", error, [error userInfo]); } else { self.allUsers = objects; NSLog(@"%@",self.allUsers); [self.tableView...

AtTask API get assigned users

api,user,attask
We have multiple people assigned to a single ticket but when using the assignedToID field, it just returns the first user?.. Why is it not returning an array of user ids? I know this is off-topic but is it possible to get user's name also and not just id?...

Jboss stop working when user connection over 5000

java,performance,jboss,connection,user
i use jboss application server 4 , when user less than 5000 jboss work correctly and every things is ok but the problem occurred when users over than 5000 connected to jboss , after 5 to 15 minute jboss locked and do not work correctly i check jconsole , and...

perl: trouble testing numeric user input against array elements

arrays,perl,input,user
I'm a Perl beginner and I'm making a simple fortune teller program for a class. I wanted to start by having the user choose between four numbers, like on a paper fortune teller (cootie catcher, as it were). I created an array, @number_choices = ( 1, 2, 3, 4 );...

Fetching join date from mysql database and echoing it as a readable format

php,mysql,date,user,registration
I want to fetch the join date of users from my database and then echo it out into a readable format. Here's my code: function date_registered($user_id) { $sqldate = mysql_fetch_array(mysql_query("SELECT `date_registered` FROM `users` WHERE `user_id` = $user_id")); $date = strtotime($sqldate['date_registered']); return date("j F Y", $sql);} and the echo: echo '<p>Joined:...

How to redirect users after Meteor.loginWithFacebook in Meteor

facebook,meteor,user,facebook-login,iron-router
I have gotten the 3rd party Facebook login to work. I am now trying to figure out how to redirect my users to my "primaryLayout" template. Do I do this using iron:router or is there a better way? This is what my code looks like so far: Template.fbLogin.events({ 'click #facebook-login':...

PHP login system help needed for deletion

php,login,delete,user
Help with user deletion: Hello I am creating a user creation system for a project of mine, I am still very new to PHP, my issue is getting the user from the MySQL database and then deleting it, I will show you my code below: <?php require_once("config/db.php"); if ($login->isUserLoggedIn() ==...

Laravel 5 Entrust one route - load different controller based on Role

php,authentication,laravel,user,admin
So I'm just starting to learn Laravel and I've implemented the Entrust Role Permission package, which works really well. Now my question is, I'd like to have a 'Dashboard' page like so: example.com/dashboard. The thing is, I'm not sure how to set this up. Since In my App\Http\Controllers folder I...

Users accept the challenge (wordpress data logic)

wordpress,user,relationship
I'm working on a project and do not understand how I can relate data between users and post in wordpress. It is about creating a custom post that challenges users to do "something" and users decide whether to accept the challenge pressing a button (for example). I would understand the...

Devise and Rolify - Display all of users - roles — Multiple Roles

devise,user,roles,rolify
I have a view that shows the user and roles. I can get it to show all of the users and a single role with user.roles.first.name. I cant get it to loop and retrieve all roles for the user selected. Any help would be wonderful. <h1>Admin#users</h1> <p>Find me in app/views/admin/users.html.erb</p>...

Search Range If Blank Prompt User Intup per cell

excel,vba,input,user
I have a range of info and want to check it before i save it. I am having trouble with the equation to prompt the user which cell is blank and then prompt them to input the correct info. i think it is because i defined the cells as a...

Terminal in mac weird user?

osx,unix,terminal,user,osx-yosemite
Whenever i login into terminal i get the following before my user: Last login: Wed May 13 12:52:32 on ttys000 stange-name:~ andy$ Where is jhps-gardens coming from?? I have no idea what it is, or where it is coming from. I know im not in that directory. And i haven't...

Form does not validate in Django

django,forms,validation,user,group
I have such a form as shown below. When I click the "Add" button instead of the notification that the fields are required I get an error: DoesNotExist at /users/add-to-group/ Group matching query does not exist. My form code class AddUserToGroupForm(forms.ModelForm): group = forms.ModelChoiceField(queryset=Group.objects.all(), required=True) user = forms.ModelChoiceField(queryset=User.objects.all(), required=True) class...

Admin set to true not working on Rails after forgetting to register first the admin email in app

ruby-on-rails,devise,user,admin,rails-console
I have created a users' registration/signedup through Devise gem. To give a user an admin role I've added a new column in users table (giving the command in the terminal followed by rake db:migrate) named "admin" and set all to "false" by default: class AddAdminToUsers < ActiveRecord::Migration def change add_column...

Correct form to get last uer id in laravel5

php,orm,user,eloquent
Good Morning ! I am developing a profile user and I have the following doubt. I know that I get my last user which the following form $full = User::orderBy('id','desc')->take(1)->get(); I recieve this json with this eloquent. . [{"id":58,"nif":"AAAA","name":"AAA","cognoms":"AAA","file":"uploads\/\/f0414.gif","birthday":"0000-00-00","presentacion":"descripciones","email":"[email protected]","idempresa":1,"id_poblacion":2254,"id_online":0,"created_at":"2015-05-24 00:00:40","updated_at":"2015-05-24 00:00:40"}] But...

Android: ParseUser with username shown on button after login

android,parse.com,user
I am implementing ParseUser for user management. ParseUser login: public void signIn(final View v) { v.setEnabled(false); ParseUser.logInInBackground(mUsernameField.getText().toString(), mPasswordField.getText().toString(), new LogInCallback() { @Override public void done(ParseUser user, ParseException e) { if (user != null) { Intent intent = new Intent(LoginActivity.this, First4.class); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); startActivityForResult(intent, 0); overridePendingTransition(0, 0); // 0 for no animation...

Django registration opens other template

python,django,templates,redirect,user
I am pretty new to Django but have gone through a few tutorials and have taken it upon myself to create an app very similar to the Tango with Django walkthrough app, rango. Everything has worked so far, but when I attempt to add a registration feature, the link brings...

Bash: sourcing file as user from script

linux,bash,user,source,sudo
I am creating a script meant to be run as superuser that reads a file and runs a number of scripts on behalf of all users. The important bit is this: sudo -u $user -H source /home/$user/list_of_commands However, whether I encose the command with quotesor not, this fails with: sudo:...

Is it possible to use Maintenance Windows when deploying an application to USER collections in SCCM 2012?

collections,window,user,maintenance,sccm
I am trying to see if there is a way to deploy an application to a user collection where the application only installs during the night or out of office hours. It's only this one application that requires this. I believe that you can do it to device collections using...

Django How to create M2M relation with User table

django,table,user,many-to-many,relation
I would like to create M2M relation with User table but it does not work this is my code from django.contrib.auth.models import User # Create your models here. class projects(models.Model): project_name = models.CharField(verbose_name=" ", max_length=250, blank=True, null=True) description = models.CharField(verbose_name=" ", max_length=500, blank=True, null=True) create_date = models.DateField(verbose_name='', auto_now_add=True, null=True, blank=True,...

Limit Google Sign-In to .edu accounts in Meteor

login,meteor,user,iron-router,google-login
I'm trying to limit my Google + Sign-In Button to only allow @something.edu accounts to sign in. How would I go about doing this. This is my code so far: Template.googleLogin.events({ 'click #gLogin': function(event) { Meteor.loginWithGoogle({}, function(err){ if (err) { throw new Meteor.Error("Google login didn't work!"); } else { Router.go('/home')...

Yii2 Display Data from the Database Without Using GridView

php,gridview,user,yii2
I have this GridView widget in my index.php view: <?= GridView::widget([ 'dataProvider' => $dataProvider, //'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], //'user_id', 'fname', 'lname', 'username', // 'password', // 'user_type', // 'creator', ], ]); ?> It obviously generates a table containing data from my database table. I want to...

How can i use multiple scanners

java,user,java.util.scanner
I am having trouble figuring out how I can allow input that will consist of as many lines as the user wants. Input will consists of at least 1 line. On the first line will be an integer, this integer is suppose to tell the program how many lines are...

How do I stop a user from rating a movie more than once?

php,database,user,rating
On my site when a user is logged in, they can give a 1-5 rating on a movie. What I want to do is make it so that database knows which user gave the rating and to update there rating if they click it again rather than creating a new...

Ruby on Rails Why can I not log in?

ruby-on-rails,ruby,authentication,login,user
In my Ruby on Rails application, I have made it so that users can register but once the server is stopped and I load the page again they are not logged in (which is fine) but when I click "Log In" I get the following error: NameError in Sessions#new Showing...

Powershell Parameter Error?

variables,powershell,input,parameters,user
notepad #Starts Notepad# get-process notepad #Finds the processes named notepad# param( [Parameter(Mandatory=$true)][string]$ProcessID ) #This should request user input, and store it in a variable# Stop-Process $ProcessID #Stops the input process ID# When I try to run this, I'm met with: param : The term 'param' is not recognized as the...

How to access application data in a session .jsp file

java,html,jsp,session,user
I am new to the javaservice page session environment, and I am executing the following loop to view all my session attributes: <% for (Enumeration e = session.getAttributeNames(); e.hasMoreElements(); ) { String attribName = (String) e.nextElement(); Object attribValue = session.getAttribute(attribName); %> <BR> <%= attribName %> - <%= attribValue %> Which...

How to allow only 1 vote per person(computer/mobile) on 1 post at website without making user accounts ?

javascript,authentication,meteor,user
I'm recreating Yik Yak mobile application as a web application in process of learning Meteor framework. But that app is completely anonymous without user accounts, but still you can upvote or downvote post only once. How to make this work ?

Adding start separate page in django app

python,django,templates,user,home
I want to add a separate homepage in my Django app. If a user is logged in to show him all the content. If the user is not logged in to show him the starting page and a link to login. The solution is based on the code below does...

Meteor: Profile update fails mysteriously

collections,meteor,user,updates
I'm building a Meteor application and want users to be able to update/set their name. I've got the code set up, and everything seems to be working except that it mysteriously fails on the update. Here's my code: Template <template name="_editName"> {{#ionModal focusFirstInput=true customTemplate=true}} <form id="updateName"> <div class="bar bar-header bar-stable">...

FOSUserBundle reset password: weird behaviour

symfony2,user,bundle,fosuserbundle
I'm trying to make my own form for allowing user to edit his profile. I success to add my field at the FosUserBundle original fields but I have a weird behaviour. My user can change his password only one time !! If I retry to change it from the form...

How to perferm different action depending on user input

java,input,user
I'm trying to make a really simple game (even without an interface). You are supposed to type what action would you like to do attack, heavy and light or block). But "enemy" responds only to "light" action. What is the problem? import java.util.Scanner; public class Game { public static void...

I cant get the CMD outputs to display in my textbox.

c#,cmd,textbox,user,boolean
Since Local User Group Management doesnt seem to be something I can query in C#, I figured I would do a down and dirty version of what I an trying to accomplish and I need some advice for best practices. THE GOAL: Essentially, I need to determine if the current...

Handling users of phpMyAdmin

mysql,security,phpmyadmin,user,privileges
Hi stackoverflow community, I have some doubts in how to manage the users in phpMyAdmin, I am starting a project but I see multiple users with ALL PRIVILEGES. I should choose one user, set my password, and then delete the other ones? Having multiple users with ALL PRIVILEGES and without...

count registerd users in database php

php,mysqli,count,user
I would like to echo the number of people registered on my website only the code that i have does not work, it gives me back that it cant be converted to string. Also when i make it a function to call in my html i get error that $connection...

AngularJS if user chooses year/month/week resolution on Dropdown1, populate Dropdown2 with the corresponding values

angularjs,drop-down-menu,user,selection
I am new to AngularJS and I'm trying to figure out how to do the following task: Say that we have a dropdown (Dropdown1) that includes the options {year, month, week, day}. We also have Dropdown2, that changes according to what is chosen in Dropdown1. So if user chooses 'year',...

Check if the number entered is in array, otherwise add to the array

java,arrays,validation,input,user
The user will enter the size of the array and its values. If the entered value exists, the user must enter a different number. I can't seem to construct the proper code to check if the inserted value exists. public static void main(String[] args) { String holder="", s; int size;...

Messaging between users with node application

node.js,encryption,user,messages
I want to implement in-app messaging in my iOS and Android application, and I am unsure about how the backend functionality should be created. From before my backend is running with Node.js and users etc. are stored with MongoDB. I figure that I quite easily could implement messaging just by...

Java user input, declare as int?

java,input,user
I'm new to Java and I want to make a program that calculates price of donuts by typing in how much donuts you want and then telling you what is the price depending on the number of donuts you want. This is the code import java.util.Scanner; class MyFirstProgram { public...

Creating Users With Parse and specifically for swift and Xcode 6

ios,database,swift,parse.com,user
How would I create custom fields to add to the PFUser class in parse or is there anyway to create it from the beginning with the PFObject class? Many thanks.

Ruby on rails 4 - What would be the best way to allow one user to see the data of another user

ruby-on-rails,permissions,user
I want to allow one user on my app to chose who can see his own data, I don't know if I'm really clear so here is an example : User A creates data on a table and he can only see his own data and/or decide to share it...

Meteor find all user emails

javascript,email,meteor,user
I'm trying to gather all user emails on a Meteor server function (to send to all on an event). I have tried many constructions and have got to this: /server/lib/mail/mailNewEvent.js Meteor.users.find({}, {transform: function(doc) {return doc.profile}}).fetch(); which returns: [ { name: 'Tardar', email: '[email protected]', _id: 'YyEk2sLDiQoBjC6gS' }, { name: 'Chutney', email:...

Issue with belongs_to and user (devise)

ruby-on-rails,devise,user,belongs-to
I'm new to RoR, and I would like to develop an app, but I have an issue with the belongs_to association. I am using devise for the authentication of my users, and I have an object called timesheet, I followed several tutorials and read a lot of forums but unfortunately...

Javascript max and min not working

javascript,input,user,max,min
I am trying to create a page that lets the user enter three numbers, and have the max and min values printed below from the input. I've used both the Math.max/min functions and also tried an if statement but When I click submit nothing shows up. Some insight would be...