w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
get list of logged on users on remote windows computer from a list computer
It (csv file) should be formatted as follows: computername server1 server2 server3 'Computername' is the column name. This can be derived from the code snippet as the Foreach-Object refers to the ComputerName property.

Categories : Windows

How to list all events from a particular folder which are going on today? And email the list to users
You can use a collection to get all events which contain today in their daterange and for the mail-sending you can use colective.contentrules.mailtotogroup. It is capable to send the body-text-field, too. If that's what you were looking for.

Categories : Email

Is it possible to use windows users for database login?
DB2 always uses the host systems security for identification and authentication. So if you run db2 on a windows server anyone logging in will need a userid and password which is valid in the servers domain. If they are logged in on the domain already they should not need to log in again. And believe it or not Microsofts SQLServer also uses the standard Microsoft Windows domain user ids :-)

Categories : Windows

Detect users logging off in Windows service
WM_QUERYENDSESSION is sent to all top level windows on the desktop in the closing session. However since your service usually runs in a different session, you normally won't get the notification. Before Vista you could enable interaction with desktop to share the desktop with the user on session 0, but you won't get the message sent to you if the logging off happens in another session. After XP, you won't get messages from user sessions due to session 0 isolation. To notify your service of this message, you need to run an agent process in each session (that is, register to auto start when the user log in via start menu shortcut or registry) and listen to WM_QUERYENDSESSION (in .Net terms, run a message pump like Application.Run in Windows Forms and subscribe to SystemEvents.SessionEnding

Categories : C#

Is it possible to mklink a directory to different target for different users? (windows 7)
mklink cannot use environment variables, so the answer is "no, that's not possible". PS: I reviewed "subst", mountpoints and "net use", but none of them will suit your need. In fact, I'm unaware of any technique that will. Sorry :-(

Categories : Windows

Windows Authentication - How to Deny Users using Code
If you want to authenticate by using information from a database, you would have to use forms authentication. The steps you have to take are: Build a Login-Webpage (login.aspx in this example) Put this in your web.config, to specify the login page and deny access for all users initially: Code: <authentication mode="Forms"> <!-- Login.aspx is the login page forms authentication should use. --> <forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" timeout="30" slidingExpiration="true" > </forms> </authentication> <authorization> <!-- deny all users access to ressources of this app, if not logged in. --> <deny users="?" /> </authorization> In your login page, in code behind, call this to let a user pass: Code: FormsAuthen

Categories : C#

Windows Phone 8 - Sharing data between users
There are many options and there is no best option. It all depends on your specific requirements. In general, you will need a client app that runs on the phone and then some sort of online web service where both parties can talk to and that service can handle pushing communication between connected clients. However, for a chat application SignalR comes to mind. It provides real-time web functionality. I think there is even a WP chat sample application on their website.

Categories : Networking

Is it possible using AZMS to authenticate users against Windows Azure AD?
Looks like a very good solution to this question is to implement Auth0: Authenticate AZMS Apps with Auth0

Categories : Azure

Get current logged in Windows Users privilliges
Below snippet is working for me in Windows7. Can you please try it out. Thanks public static bool IsAdminUser() { bool isAdmin = false; AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); WindowsPrincipal principal = (WindowsPrincipal)System.Threading.Thread.CurrentPrincipal; WindowsIdentity identity = (WindowsIdentity)principal.Identity; isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator); return isAdmin; }

Categories : Windows

SqlServer mixed mode restrict windows users
Users have to be explicitly given permission to the server and database. Simply, by not granting access, Windows users do not have access. You can explicitly restrict access with: DENY CONNECT SQL TO [domainuser]

Categories : Sql Server

Installing Apache on Windows for manual use and multiple users
you can get this in tomcat installation folder tomcat-users.xml. In tomcat6 the said file name is available in tomcat/conf/tomcat-users.xml In this file you will get the following <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <role rolename="manager-gui"/> <user username="tomcat" password="tomcat" roles="manager-gui"/> Edit the username and password for the role you want to give to your wife. If required restart the tomcat. EDIT By default this is commented, you have to remove the comment it

Categories : Apache

How to commit the multiple transactions from different users using concurrency in windows 8?
You have a database server accepting connections from various clients, and you want to synchronize them so that they are all treated as one big database transaction. I don't think this can be done in a straightforward fashion. You need your clients to save their data to an intermediary place (say, an "about-to-be-saved" table), and then once in a while, depending on what you define as 'at once', move data from the intermediate table to the "really-saved" table. You could implement this transaition from about-to-be-saved to really-saved inside your database, so you don't need an additional server. Keep in mind, though, that giving multiple clients direct access to your database is almost never a good idea.

Categories : C#

Authenticate user from Perl against Windows local users
Ok, so I found a way to accomplish this. I'd still like to hear from you guys to see if there's a better method. Active State Perl includes a module called Win32::UserAuthentication, which is not documented (and is not on CPAN) and contains a warning about it not being maintained. However, it works over XS and returns a boolean when authenticating a local user. So far it works pretty well and fast for that part. For the checking of groups the user belongs to, I'm using this system command: net user $user | grep Administrators Which works pretty fast too and so far works for this purpose. NOTE: For anyone trying the command above, I only have grep because it's on my system path thanks to having Cygwin installed. If a better solution if proposed, I'll select it as best answer. Thank

Categories : Windows

Getting deleted users by lastknownparent in windows active directory using c#
Maybe I'm a little bit late but I hope this answer will help. Just replace ADEL with \0ADEL in your LDAP query. By the way, this rule applies to every attribute with dn syntax.

Categories : C#

Use Windows Azure Active Directory to register new users for MVC 4 website
I don't believe it is the user that has to be registered first. It is the application that holds the permissions to read/write to WAAD. If the application is registered in WAAD, and contains the necessary write permissions, then the app and query WAAD and add new users to the directory.

Categories : Asp Net Mvc

scripting languages native to windows for remote users support
You can run a powershell script like so: powershell -executionpolicy unrestricted -file "C:Myscript.ps1" This will not change the global executionpolicy for the whole machine, but just to run that script.

Categories : Windows

how to Diogenes users that login with remote desktop in windows xp by programming with c#
[DllImport("wtsapi32.dll")] static extern IntPtr WTSOpenServer([MarshalAs(UnmanagedType.LPStr)] String pServerName); [DllImport("wtsapi32.dll")] static extern void WTSCloseServer(IntPtr hServer); [DllImport("wtsapi32.dll")] static extern Int32 WTSEnumerateSessions( IntPtr hServer, [MarshalAs(UnmanagedType.U4)] Int32 Reserved, [MarshalAs(UnmanagedType.U4)] Int32 Version, ref IntPtr ppSessionInfo, [MarshalAs(UnmanagedType.U4)] ref Int32 pCount); [DllImport("wtsapi32.dll")] static extern void WTSFreeMemory(IntPtr pMemory); [DllImport("Wtsapi32.dll")] static extern bool WTSQuerySessionInformation( System.IntPtr hServer, int sessionId, WTS_INFO_CLASS wtsInfoClass, out System.IntPtr ppBuffer, out uint pBytesReturned); [StructLayout(LayoutKind.Sequential)] private str

Categories : Windows

Trying to Creating users in Google Apps domain in Windows Forms code
I managed to solve this, primarily by modyfin code from the google-api-samples/Tasks.WinForms.NoteMgr; Here's how I've done it: public static DirectoryService Service { get; private set; } private static IAuthenticator CreateAuthenticator() { var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description); provider.ClientIdentifier = <myClientId>; provider.ClientSecret = <myClientSecret>"; return new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthentication); } private static IAuthorizationState GetAuthentication(NativeApplicationClient client) { // You should use a more secure way of storing the key here as // .NET applications can be disassembled using a reflection

Categories : C#

Allowing users to view parts of webpage based on their Windows domain login
Simon, You tag the question with asp.net-mvc, so I will give a quick example based on that. In your controller you can decorate either the entire controller, or just the action with the Authorize attribute. This means that you can explicity allow only users within certain Roles to have access to the function. By way of a quick example: [Authorize(Roles = "AdminRole, CreditAdvisorRole")] public ActionResult Edit() { var viewModel = _shopService.ShopIndex(); return View(viewModel); } So, that example would only allow users defined in the roles of "AdminRole" and "CreditAdvisorRole" to access the functionality. This of course is inbuilt behaviour and at some point, you will hit the limitations of this approach. At this point, then you can move on and create your own overrides o

Categories : C#

How to get a list of users in a certain role?
user_roles() is actually implemented in such a way that it searches the roles database table to extract all roles. You could do similar thing and search the users table for a given role. Please look at the function below function getUsersByRole($rid = 1) { // rid = Role Id from users_roles table $query = db_select('users', 'u'); $query->fields('u', array('uid', 'name')); $query->innerJoin('users_roles', 'r', 'r.uid = u.uid'); $query->condition('r.rid', $rid); $query->orderBy('u.name'); $result = $query->execute(); $users = array(); foreach ($result as $user) { $users[] = $user; } return $users; } $users = getUsersByRole(3); var_dump($users); Make sure you will run it within Drupal environment.

Categories : PHP

PHP PDO how do I show who I am following beside my list of users?
You don't want to loop over one result set and then makes queries for each row. It is inefficient and the database can do it for you. Try a join query: SELECT u.id, u.username, IF(f.follower_id IS NULL, 0, 1) as following FROM users u LEFT JOIN following f ON u.id = f.user_id AND f.follower_id = $loggedinuser The LEFT JOIN gives you every row from the users table then any rows in following that match the criteria in the "ON" clause. If there is no match, those columns are set to NULL in the result.

Categories : PHP

List AD users who do not belong to one of several groups
All users, computers, groups and contacts (and possibly other objects) in Active Directory have a property called memberof. This property contains the distinguished names of all groups from the whole forest that this entity is a member of, as the attribute's name implies. Given this information, you can now construct an ldap search query to find all entities that are not members of at least one of those groups: (!(|(memberof=CN=Group1,dc=domain,dc=com)(memberof=CN=Group3,dc=domain,dc=com)(memberof=CN=Group3,dc=domain,dc=com))) Other conditions may be included as necessary. If you need to obtain the distinguished names of those groups first, you can either hard-code them in your filter or do a normal Powershell search for the groups and then read their distinguished names. You can use

Categories : Powershell

How to obtain a list of Users from ASP.NET Identity?
I found out that I wasn't using the derived ApplicationUser object for anything, so I just went ahead and changed all uses of it for plain old User. Then I just changed ApplicationDbContext definition for the following: public class ApplicationDbContext : IdentityDbContext< User, UserClaim, UserSecret, UserLogin, Role, UserRole, Token, UserManagement> { } And now I can access the user list: UsersContext = new ApplicationDbContext(); ... UsersContext.Users.ToList(); However, I think this will come back and haunt me in the future (I'll probably need to add more fields to User) so probably I'll have to use the same approach as in this question: Get all role names in ASP.NET MVC5 Identity system Edit: Since I got the need to add a new property, I had to revert my changes.

Categories : Asp Net

List tweets from multiple users (PHP)
Yeah, you can't just change the string and that's it ;) You need to make authenticated requests (OAuth). This post will walk you through exactly how to make authenticated requests to the 1.1 API using Oauth. This post, although a little more complex because it involves multiple users and also multiple hashtags, shows how you can join multiple users in a query (although it looks like you've already got that covered). You've got the gist of the actual query you need to make, so well done for doing some research and reading the docs. However, performing 1.1 requests is a little more involved now.

Categories : PHP

Is there a way to get a list of users based on a hashtag they used?
Yes, you can. And it's quite simple, really. According to the documentation: GET search/tweets: - Returns a collection of relevant Tweets matching a specified query. Resource URL: https://api.twitter.com/1.1/search/tweets.json Now if you scroll down on that page, it gives an example of what a query for a tweet returns (I took a screen, sorry about the appalling arrow, it's 10am here and I haven't had my tea yet). Great! So you know the URL and method (GET) that you need to get your data. As for searching for a hashtag specifically, the query documentation is what you're after. This is basically as urlencoded string in the GET request like: ?q=#hashtag. Perform the search like that and you'll get back the data above. Then just loop through it, find the user object, and grab

Categories : Twitter

Get users and groups list from Hadoop?
I am not sure on the API but a robust way of getting the information would be to use a Offline Image Viewer that parses the fsimage of the name node and get the information in a XML format for say . You can then use a simple java API to parse the xml and get the list of users and groups. Useful Links a) http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html b) https://github.com/twitter/hdfs-du

Categories : Java

Create a list of email users?
It would appear to be by design. If you concatenate NULL with some value, the result is NULL : SQL Server String Concatenation with Null hence your attempt to set @usersin and @usersout are failing, because they are NULL to start with. Either assign to it directly (not concatenating), or give it an initial value (e.g. empty string).

Categories : SQL

Keep users in Config.groovy list in Grails
I do not think you can do that because annotations are resolved at compile time and not in runtime. Config properties will be read during the application runtime so you I fear you have to end up doing: @Secured(["authentication.name in ['Bill', 'Tom', 'Rick']"]) class SomeController { }

Categories : Grails

how to get the list of users accessing to particular tables or views
As long as the query is running, you can execute a system stored procedure: sp_who3 which you can find under [db_name] - [Stored Procedures] - [dbo.sp_who3]. Unfortunately it doesn't log anywhere. Easiest way is to modify it - add storing logs into own table. You can INSERT what it selects - Login, SQLStatement, StartTime. Frankly speaking the logging table will grow huge very soon. Consider limiting logging to selected users!

Categories : SQL

graph api retrieves list of users name where name is like given text in ios
Hi Friend i solved my problem.i used this coding to get next 25 result. FbGraphResponse *next_page_fb_graph_response = [fbGraph doGraphGetWithUrlString:next_page_url]; And i have another one issue. if i searched in facebook i got all user name which are not allowed public search. But in fb graph api i tried to get users name it is not showing which are not allowed public search. any one resolve this issue?

Categories : Iphone

How can I retrieve list of Active Directory users
You can use a PrincipalSearcher and a "query-by-example" principal to do your searching: // create your domain context using (PrincipalContext ctx = new PrincipalContext(ContextType.Domain)) { // define a "query-by-example" principal - here, we search for a UserPrincipal // and with the first name (GivenName) of "Bruce" UserPrincipal qbeUser = new UserPrincipal(ctx); qbeUser.GivenName = "Bruce"; // create your principal searcher passing in the QBE principal PrincipalSearcher srch = new PrincipalSearcher(qbeUser); // find all matches foreach(var found in srch.FindAll()) { // do whatever here - "found" is of type "Principal" - it could be user, group, computer..... } } If you haven't already - absolutely read the MSDN article Managing

Categories : Dotnet

How to retrieve hashtaged tweets from a list of users
Note: I've updated the library so I suggest you grab the newly updated version before trying this - I've made it so you don't need to manually encode each individual character. This page shows you how to use search, and has a number of operators down toward the bottom of the page. One of these is the OR operator: Getting tweets for multiple users OR - Either this or that love OR hate - containing either "love" or "hate" (or both) From - From this user from:twitterapi sent from the user @twitterapi So, armed with the above knowledge, I'm guessing your query would look like this: Translated into a GET request: ?q=from:user1+OR+from:user2 Getting tweets for specific hashtags So that's how you get tweets for multiple users. The next step you want is for certain hashtags. #

Categories : Twitter

How to extend admin users list page?
i believe if you follow theses instructions you will get what your looking for: http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

Categories : PHP

Adding Sharepoint List Item to Windows form list
Completely untested, made fresh while drinking morning coffee. Good luck! var list = siteWeb.Lists.TryGetList(listName); if (list == null) { return; } var items = list.GetItems(query); var countOfItems = items.Count; if (countOfItems == 0) { return; } var listItemFieldObjects = items.Cast<SPListItem>().Select(item => item[1]); foreach (var item in listItemFieldObjects) { var listViewItem = new ListViewItem("Object's value"); listView.BeginUpdate(); listViewItem.SubItems.Add(item.ToString()); listView.Items.Add(listViewItem); listView.EndUpdate(); }

Categories : Sharepoint

Need user to pick from a list to connect two users in YESOD
If you use an AForm / MForm, the form will be automatically generated for you (using Tables or Divs). That should simplify things for you. If you want to manually style it, you can do something like this when using a form: How to make button look like a link?. Most people end up creating styled buttons for such actions anyways (think of your standard CRUD app with Edit, Delete buttons, etc.). If you go down the path of trapping link clicks and do ajax Post, it will not degrade nicely if javascript is disabled so something you need to watch out for. HTH

Categories : Misc

Users list, follow button not working properly
Yeah, that makes sense. foreach ($users as $user) { $user_id = $user['user_id']; // At the end of the loop this is the last user $username = $user['username']; echo $user_id . ' ' . $username; echo '<form action="" method="post">'; echo '<input type="submit" name="follow" value="Follow">'; echo '</form>'; } if ($_POST['follow']) { // Regardless of what you input you're getting the last user here $FClass->follow($user_id); } Try something like this foreach ($users as $user) { $user_id = $user['user_id']; // At the end of the loop this is the last user $username = $user['username']; echo $user_id . ' ' . $username; echo '<form action="" method="post">'; echo '<input type="hidden" name="userid" value="'

Categories : PHP

List users in active directory domain AND subdomain
You can query the global catalog. It contains a read-only, searchable, partial representation of every object in every domain in a multidomain Active Directory forest. The GC operates on port 3268 ( standard ldap ) and 3269 ( SSL ldap ). Simply connect to any of your domain controllers on one of the above two ports and your search will be automatically directed to the GC server. To perform any modifications, though, you will have to send such request to a domain controller for that particular domain the object belongs to.

Categories : C#

facebooki API scope: Do NOT request users friend list
The Facebook documentation specifies that "the app will have access to only the user's public profile and also their friend list" if there are no additional permissions requested.

Categories : PHP

Adding new users to a collection and having them render on a list automatically?
So I assume then that "player" records belong to a user in some way? So when you create a new user, you create their new default player record? Maybe you just need your helpers to check that a player record for the user exists, and if not, create it. Template.leaderboard.players = function () { var players = Players.find({/* Get players for this user */ }, {sort: {score: -1, name: 1}}); if(!players) { players = /* Insert default player record */ } return players; };

Categories : Meteor

Has anyone got Google DirectoryService.Users.List().Execute(); to work in C#/.NET?
ListRequest had those properties. It looks like those properties aren't mandatory, so they aren't part of the constructor. You can do the following: var listReq = service.Users.List(); listReq.Customer = "CUSTOMER_HERE"; listReq.Domain = "DOMAIN_HERE"; Users results = listReq.Execute();

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.