w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

About builtin command puzzle
Understand that for sudo or any other command that is not a shell builtin, when the command terminates, the shell picks up where it left off before the command was run (of course, the shell's current working directory won't change). As such, cd must be a shell builtin; otherwise, when cd terminates, the shell is back to the same old current working directory. In other words, a child process (i.e. an external command) can't change the working directory of the parent process (i.e. the shell). Courtesy: https://bbs.archlinux.org/viewtopic.php?id=127225

Categories : Bash

Freestanding GCC and builtin functions
In freestanding mode the compiler can not rely on semantical considerations. Most builtins in GCC work silently -- for instance the compiler sees that you are using strcpy() and in hosted mode it may guess that, when you are using strcpy(), you are intending exactly to copy a string. Then it may replace strcpy with an extensionally equivalent builtin, which is better for the given target to copy a string. In freestanding mode, using strcpy() function means ANYTHING. The idea is just not the standard library absence in linkage. The idea of freestanding mode is that there is no standard library even on definition level, except float.h, iso646.h, limits.h, stdarg.h, stdbool.h, stddef.h, stdint.h (C99 standard 4.6). You may in freestanding mode decide to format your hard drive with strcpy,

Categories : Gcc

try builtin credential first, then prompt for another
Have you tried [System.Management.Automation.PSCredential]::Empty? Are you using PS 3.0? You can set of default parameter value using $PSDefaultParameterValues.Add('Get-WMIObject:Credential',[System.Management.Automation.P SCredential]::Empty) And, when this fails, you can look for the Credential Parameter.

Categories : Authentication

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

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

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

Can iOS apps speak with a builtin library in iOS?
Yes, you can use your app (even when is on the background) for location and navigation purposes, and of course you can play sounds to give them directions. Check this: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Cookbook/Cookbook.html

Categories : Iphone

How to use shell builtin function from a Makefile?
The default shell for any Makefile is sh. If you have to use builtins of a specific shell, specify that shell in your Makefile: SHELL:=bash Note that this is bad practice, because the idea is that your Makefile should work on any machine, not only those with bash installed. If you want to support either variant (external vs. builtin), you can check for the availability of bash resp. ulimit via which, and set a variable containing the command to use (ulimit vs. bash -c "ulimit") depending on the outcome of that check. Edit: MadScientist is absolutely right about the "current shell only" aspect of ulimit. I'll keep this answer intact for documentation purposes, but it doesn't help with perror's specific problem.

Categories : Shell

Node.js Builtin Crypto: RSA Decryption
As there isn't any asymmetric encryption happening in the nodejs, I think you are more or less lost in the woods. You will require another library if you want to encrypt anything with RSA. The openssl list-cipher-algorithms documentation that crypto.createCipher(algorithm, password) and crypto.createCipheriv(algorithm, key, iv) only lists symmetric algorithms such as AES and DES (etc.). An IV is only used for symmetric algorithms in general in either way. nodejs only seems to support RSA signing and verification. I would really suggest to get deeper into the subject matter before continuing on your development path.

Categories : Node Js

How to restore a builtin that I overwrote by accident?
You can use __builtin__: >>> import __builtin__ >>> __builtin__.set <type 'set'> or simply( no imports required): >>> __builtins__.set <type 'set'> For py3.x: >>> import builtins >>> builtins.set <class 'set'> From docs: CPython implementation detail: Users should not touch __builtins__; it is strictly an implementation detail. Users wanting to override values in the builtins namespace should import the __builtin__ (no ‘s’) module and modify its attributes appropriately.

Categories : Python

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

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

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 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

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

how to enhance the features of builtin functions in python?
To do what you want, you should use str.join: "".join(['s','t','a','c','k']) Monkey patching is possible, but frowned upon, in Python, especially for trivial things like this. It will make you code harder to read, because standard library functions will do unexpected things. But, if you really want to, you can just redefine the function. Python won't stop you: def sum(l): return "".join(l) Python will let you do whatever you want to existing modules: import sys sys.stdout = open("somefile", "w") But again, you shouldn't.

Categories : Python

Can a C/C++ compiler inline builtin functions like malloc()?
A C compiler is allowed to inline malloc (or, as you see in your example, part of it), but it is not required to inline anything. The heuristics it uses need not be documented, and they're usually quite complex, but normally only short functions will be inlined, since otherwise code-bloat is likely.

Categories : C++

Can web.py route static content with its builtin server?
Wrote it myself :) urls = ( '/(.*)', 'General' ) class General: app_dir = 'www' def GET(self, path): root = os.path.abspath(os.path.join('.', os.pardir)) dest = '%s/%s/index.html' % (root, self.app_dir) if path: dest = '%s/%s/%s' % (root, self.app_dir, path) with open(dest, 'r') as f: return f.read() return ''

Categories : Python

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

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

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

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

Clang. How to overcome "unknown builtin" error message
Something must have gone funny when you did your project configuration. The ff_log2 code, for example, is inside: #if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) So you need to make sure HAVE_FAST_CLZ isn't defined, and you should be ok on that front. You can do similar things to fix the strcmp.

Categories : C++

How to create a literal slice of an alias to a builtin type in Go
func NewWhatevers(a ...int) (r []Whatever) { r = make([]Whatever, len(a)) for i, v := range a { r[i] = Whatever(v) } return } ... myWhatevers := NewWhatevers(7, 4, 2, 1)

Categories : Go

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

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

Get and list users based on idempresa of logged in user
It's generally not good practice to use sfContext::getInstance(). Read this post http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/. How about adding a static method to your sfGuardUserTable.class.php, e.g // libformsfGuardUserTable.class.php static public function getUsersByIdEmpresa($idempresa) { //... $q->andWhere('idempressa = ?', $idempresa); return $q->execute(); } Then calling it in your controller or from where you need, e.g // appmyAppmodulesmyModuleactionsaction.class.php public function executeMyAction() { $profile = $this->getUser()->getProfile(); $usersRelatedByIdempresa = sfGuardUserTable::getUsersByIdempresa($profile->getIdempresa()); //... }

Categories : Symfony2

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

Removing the logged in user's name from the list of users in django
Can you try something like that ? {% for likes in forum.likes.all %} {% if user != likes.user %} <li><a href="/get/{{likes.user}}">{{likes.get_full_name}}</a></li> {% endif %} {% endfor %}

Categories : Django

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

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#

Is there a Python method to access all non-private and non-builtin attributes of a class?
Actually, it would be unpythonic for such function to exists - because "officially" there is no private or protected fields/properties in Python. While it makes sense to throw away module attributes with leading underscores (which are usually some implementation details) during import * from some module*, it is not useful in context of any other object. So, if you need to list only "public" methods/attributes of an object, just iterate through result of dir and drop names with leading underscores. * "during import * from some module'" Usually it is not the best practice. Consider the next example: module A has a1 and a2 defined module B has b1 and b2 defined This code in module C works as expected: from A import a1, a2 from B import * Imagine we add function a1 in module B. N

Categories : Python

How do I prevent the Intellij python debugger from stepping into builtin functions?
As of right now (June 2013), this feature is not supported in PyCharm. Here is a ticket for adding the feature: http://youtrack.jetbrains.com/issue/PY-9101 If you are reading this after June 2013, then check the ticket to see if it is still in State "Open". If the ticket is still open then please vote for it! A workaround can be found here: Debugging with pycharm, how to step into project, without entering django libraries

Categories : Python

Copy to clipboard through builtin windows function, not sefmade subroutine
For windows forms, you can use the clipboard class System.Windows.Forms.Clipboard Clipboard.SetText(YourText) More information: http://msdn.microsoft.com/en-us/library/637ys738.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1

Categories : Vb.Net

Disabled ActiveDirectory Users from specific date with exclude list
A string value can never contain an array, so $_.SamAccountName -notcontains $excludeUsers will always evaluate to $true. You need to reverse the check and make the reference an array of strings (the CSV import produces an array of custom objects). Selecting only the field SamaccountName from the imported CSV and switching the arguments should do what you want: $excludeUsers = Import-Csv '.excludeusers.csv' | % { $_.SamaccountName } ... $colUsers | ? { $excludeUsers -notcontains $_.SamAccountName } | ... As a side note, you could simplify the the code for finding obsolete accounts like this: $myDate = Get-Date '01/01/1601 02:00:00' $limit = (Get-Date).AddDays(-30) $colObj = Get-ADUser -Filter * -Properties * ` | ? { $_.Enabled } ` | select Name,SamAccountName,@{n="NeedDisabl

Categories : Powershell

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