Search Results

Search found 18 results on 1 pages for 'auser'.

Page 1/1 | 1 

  • 'And' operator in Linq

    - by Ani
    I have a query that prints userid in label1 when username is entered.Works fine; but i want to write query for username and password that prints userid. so how can i write it? i tried writing using 'and' operator but dont seems to work. int id = (from auser in lq.logins where auser.username == userNameString //&& auser.Password =pwdString select auser.userid).SingleOrDefault(); label1.Text = id.ToString(); Thanks Ani

    Read the article

  • How to pass output of a linq query to another form in C#

    - by Ani
    I have a Linq query and I want to pass the ouput (userid) to another form for further processing. var userid = from auser in allusers.Users where auser.Username == nameString select new { id = auser.UserId }; so only 'UserId' is stored in variable 'userid' and I want to use this value in another form. Is there any way we can do this. Thanks, Ani

    Read the article

  • Would a typical corporate firewall block a Java applet having the following behaviour

    - by auser
    I'm thinking of developing a proxy-like program to forward ports on a remote PC to a local PC (for example SSH). Assume that both local and remote PCs are running behind typical firewalls (i.e. consumer broadband router firewall, Windows firewall or corporate firewalls). The program will be a Java program which the user will run on both the remote and local PC. The remote client will periodically poll a central server to determine whether there are pending client connections. A session could be initiated as follows: The local client contacts the central server and request the current connection details for a specific remote client. The central server responds with the remote server's last received IP address and port. The next time the remote server polls the central server, the client's IP address and port are returned. The remote server initiates a connection to the local client using the IP address and port returned by the central server and listens for a response on a random port. The remote server will pass the value of the port it's listening on to central server. Goto 1, if client fails to connect to server. Would this work or will a typical firewall block the interactions.

    Read the article

  • Is the Spark View Engine for ASP.NET dead?

    - by AUser
    Is the Spark View Engine for ASP.NET dead? I'm considering using it for a new project. I tried to get approved to the Google Groups but nobody would approve me. The last message posted there was in May. I tried emailing the developers but nobody would reply back. I'm not having happy feelings about this using SPARK for a major project of mine at the moment. Is this project now dead especially after the Razor came out?

    Read the article

  • Ruby on Rails script/console printing more than expected

    - by Lloyd
    I have a simple model setup in my Ruby on Rails app. (User {name, username, lat, lon}) and am writing a basic extension to the model. I would like the method to return users within a certain distance. It all works just fine in the page view, but as I am debugging I would like to work through some testing using the script/console. My question: It seems to be printing to the screen the entire result set when I run it from the command line and script/console. My model: class User < ActiveRecord::Base def distance_from(aLat, aLon) Math.sqrt((69.1*(aLat - self.lat))**2 + (49*(aLon - self.lon))**2 ) end def distance_from_user(aUser) distance_from(aUser.lat, aUser.lon) end def users_within(distance) close_users = [] users = User.find(:all) users.each do |u| close_users << u if u.distance_from_user(self) < distance end return close_users end end and from the command line I am running >> u = User.find_by_username("someuser") >> print u.users_within(1) So, I guess I would like to know why it's printing the whole result set, and if there is a way to suppress it so as to only print what I want?

    Read the article

  • EL syntax error: Expression cannot start with binary operator

    - by auser
    Anyone have any creative ideas for how I can solve this warning? EL syntax error: Expression cannot start with binary operator caused by the following code: String.format("#{myController.deleteItemById(%d)}", getId()) My code looked like this before: "#{myController.deleteItemById(" + getId() + ")}" but this caused eclipse to generate the following warning: EL syntax error: String is not closed UPDATE: @ManagedBean(name = "myController") @ViewScoped public class MyController implements Serializable { private long id; private HtmlPanelGroup panel; public long getId() {return this.id; } private void getPanel() { /// bunch of code for programatically creating a form HtmlCommandButton deleteButton = new HtmlCommandButton(); deleteButton.setId(id); deleteButton.setValue(value); deleteButton.setActionExpression(/* EL expression used here */); } } <?xml version='1.0' encoding='UTF-8' ?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <!-- some other elements removed for the sake of clarity --> <h:body> <h:panelGroup binding="#{myController.panel}" /> </h:body> </html>

    Read the article

  • RESTful principles question

    - by auser
    An intelligent coworker friend of mine brought up a question to me that I was uncertain how to answer and I'd like to pose it to the world. If a RESTful endpoint uses token-based authentication, aka a time-based token is required to access a resource and that token expires after a certain amount of time, would this violate the RESTful principle? In other words, if the same URL expires after a certain amount of time, so the resource returns a different response depending when it was requested, is that breaking REST?

    Read the article

  • WCF Runtime Error while using Constructor

    - by Pranesh Nair
    Hi all, I am new to WCF i am using constructor in my WCF service.svc.cs file....It throws this error when i use the constructor The service type provided could not be loaded as a service because it does not have a default (parameter-less) constructor. To fix the problem, add a default constructor to the type, or pass an instance of the type to the host. When i remove the constructor its working fine....But its compulsory that i have to use constructor... This is my code namespace UserAuthentication { [ServiceBehavior(InstanceContextMode=System.ServiceModel.InstanceContextMode.Single)] public class UserAuthentication : UserRepository,IUserAuthentication { private ISqlMapper _mapper; private IRoleRepository _roleRepository; public UserAuthentication(ISqlMapper mapper): base(mapper) { _mapper = mapper; _roleRepository = new RoleRepository(_mapper); } public string EduvisionLogin(EduvisionUser aUser, int SchoolID) { UserRepository sampleCode= new UserRepository(_mapper); sampleCode.Login(aUser); return "Login Success"; } } } can anyone provide ideas or suggestions or sample code hw to resolve this issue...

    Read the article

  • Oracle logical standby fails with ORA-01919

    - by DCookie
    I have an Oracle logical standby database being managed via data guard. Just this morning the redo apply process began failing with an ORA-01919 error, indicating one of our application roles did not exist. However, I can see the role on both primary and standby databases. We also have a physical standby that has long since applied the redo where this is happening on the logical, without issue. I have opened an SR with Oracle. I was wondering if anyone out there has seen this before. I guess I should mention: Oracle 10.2.0.4, Win2003 Server SP2. UPDATE: So far, Oracle Support has not provided an answer. I thought I'd post here what I have learned so far. It appears that a grant of DBA on the primary host to a role works fine for users granted the role. It does not work on the logical standby. IOW: create role TEST; grant dba to TEST; grant TEST to auser; connect auser set role TEST; grant <existing role> to <existing user>; This works on the primary instance but fails on the logical. A workaround appears to be to grant each role on the primary to the role TEST with admin option in the logical: grant <existing role> to TEST with admin option; <== do this on the logical standby Then the command works on the logical standby.

    Read the article

  • JavaScript call to page method: error 500. JSON

    - by Ryan Ternier
    I'm using the auto complete control here:http://www.ramirezcobos.com/labs/autocomplete-for-jquery-js/comment-page-2/ And i've modified it as: var json_options; json_options = { script:'ReportSearch.aspx/GetUserList?json=true&limit=6&', varname:'input', json:true, shownoresults:true, maxresults:16, callback: function (obj) { $('#json_info').html('you have selected: '+obj.id + ' ' + obj.value + ' (' + obj.info + ')'); } }; $('#ctl00_contentModule_txtJQuerySearch').autoComplete(json_options); I have the following method in C# Code behind (aspx.cs) [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public static string[] GetUserList(string input) { List<string> lUsers = new List<string>(); Server.DAL.SQLServer2005.User user = new Server.DAL.SQLServer2005.User(); Server.Info.AuthUser aUser = (Server.Info.AuthUser)HttpContext.Current.Session["AuthUser"]; List<Server.Info.User.UserDetails> users = user.GetUserList(aUser, input, 16, true); users.ForEach(delegate(ReportBeam.Server.Info.User.UserDetails u) { lUsers.Add("(" + u.UserName + ")" + u.LastName + ", " + u.FirstName); }); return lUsers.ToArray(); } The error I get back is: Server Error in '/WebPortal4' Application. Unknown web method GetUserList. Parameter name: methodName If I change any of the paraemeter names I get an error telling me the paremeter names are not in match. now that everything is as it should, it's bombing. Any help would rock.

    Read the article

  • does it makes sense to use int instead of char or nvarchar for a discriminator column if I'm using i

    - by Omu
    I have something like this: create table account ( id int identity(1,1) primary key, usertype char(1) check(usertype in ('a', 'b')) not null, unique(id, usertype) ) create table auser ( id int primary key, usertype char(1) check(usertype = 'a') not null, foreign key (id, usertype) references account(id, usertype) ) create table buser ( ... same just with b ) the question is: if I'm going to use int instead of char(1), does it going to work faster/better ?

    Read the article

  • Ubuntu, user can't write to a directory and I don't see why not.

    - by Peter
    I've got a directory, /var/www/someProject/backup/mysql, and I want the user mysql to write to it. Each time I try to write to it with the mysql user, I get a "can't read/write" error. Yet the directory is 777 as you can see here: drwxrwxrwx 2 aUser users 4096 2010-03-17 17:14 mysql I also tried to chown the directory to mysql:mysql, just like the home dir of the mysql user, but no luck, that changed nothing. What am I doing wrong here? Or is the mysql user limited to his home dir in some other way in Ubuntu? Been bugging me for days now, this problem so any help greatly appreciated.

    Read the article

  • Block Domain User login

    - by Param
    I have created a Domain User id ( for example - Auser ). I have integrated my LDAP login with Firewall. I use this user to login in to firewall only. So, I want to block all the login for this User except on Firewall. Is there any way to accomplish this? As per my knowledge, we can specify :- By right click on Domain User -- Properties -- Account tab -- Logonto ( but here we have to specify Computer Name, we don't have any computer name for Firewall -- So i can't use this option ) Through Group Policy Window Setting -- Security Setting -- Local Policies -- User Rights Assignment -- Allow logon Locally (But it has to apply on Computer OU -- So i can't use this option also ) Any Other Option you know ??

    Read the article

  • How to display subversion URL for the Project with jenkins email-ext plugin?

    - by kamal
    Here is the jelly script i am using: <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"> <STYLE>BODY, TABLE, TD, TH, P { font-family:Verdana,Helvetica,sans serif; font-size:11px; color:black; } h1 { color:black; } h2 { color:black; } h3 { color:black; } TD.bg1 { color:white; background-color:#0000C0; font-size:120% } TD.bg2 { color:white; background-color:#4040FF; font-size:110% } TD.bg3 { color:white; background-color:#8080FF; } TD.test_passed { color:blue; } TD.test_failed { color:red ; } TD.console { font-family:Courier New; }</STYLE> <BODY> <j:set var="spc" value="&amp;nbsp;&amp;nbsp;" /> <!-- GENERAL INFO --> <TABLE> <TR> <TD align="right"> <j:choose> <j:when test="${build.result=='SUCCESS'}"> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/blue.gif" /> </j:when> <j:when test="${build.result=='FAILURE'}"> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/red.gif" /> </j:when> <j:otherwise> <IMG SRC="${rooturl}static/e59dfe28/images/32x32/yellow.gif" /> </j:otherwise> </j:choose> </TD> <TD valign="center"> <B style="font-size: 200%;">BUILD ${build.result}</B> </TD> </TR> <TR> <TD>Build URL</TD> <TD> <A href="${rooturl}${build.url}">${rooturl}${build.url}</A> </TD> </TR> <TR> <TD>Project:</TD> <TD>${project.name}</TD> </TR> <TR> <TD>Date of build:</TD> <TD>${it.timestampString}</TD> </TR> <TR> <TD>Build duration:</TD> <TD>${build.durationString}</TD> </TR> <TR> <!-- BRANCH --> <TD>Subversion Repo:</TD> <TD>${build.scm}</TD> </TR> <tr> <td>Build Cause:</td> <td> <j:forEach var="cause" items="${build.causes}">${cause.shortDescription} </j:forEach> </td> </tr> </TABLE> <BR /> <!-- CHANGE SET --> <j:set var="changeSet" value="${build.changeSet}" /> <j:if test="${changeSet!=null}"> <j:set var="hadChanges" value="false" /> <TABLE width="100%"> <TR> <TD class="bg1" colspan="2"> <B>CHANGES</B> </TD> </TR> <j:forEach var="cs" items="${changeSet}" varStatus="loop"> <j:set var="hadChanges" value="true" /> <j:set var="aUser" value="${cs.hudsonUser}" /> <TR> <TD colspan="2" class="bg2">${spc}Revision <B>${cs.commitId?:cs.revision?:cs.changeNumber}</B>by <B>${aUser!=null?aUser.displayName:cs.author.displayName}:</B> <B>(${cs.msgAnnotated})</B></TD> </TR> <j:forEach var="p" items="${cs.affectedFiles}"> <TR> <TD width="10%">${spc}${p.editType.name}</TD> <TD>${p.path}</TD> </TR> </j:forEach> </j:forEach> <j:if test="${!hadChanges}"> <TR> <TD colspan="2">No Changes</TD> </TR> </j:if> </TABLE> <BR /> </j:if> <!-- ARTIFACTS --> <j:set var="artifacts" value="${build.artifacts}" /> <j:if test="${artifacts!=null and artifacts.size()&gt;0}"> <TABLE width="100%"> <TR> <TD class="bg1"> <B>BUILD ATRIFACTS</B> </TD> </TR> <TR> <TD> <j:forEach var="f" items="${artifacts}"> <li> <a href="${rooturl}${build.url}artifact/${f}">${f}</a> </li> </j:forEach> </TD> </TR> </TABLE> <BR /> </j:if> <!-- MAVEN ARTIFACTS --> <j:set var="mbuilds" value="${build.moduleBuilds}" /> <j:if test="${mbuilds!=null}"> <TABLE width="100%"> <TR> <TD class="bg1"> <B>BUILD ATRIFACTS</B> </TD> </TR> <j:forEach var="m" items="${mbuilds}"> <TR> <TD class="bg2"> <B>${m.key.displayName}</B> </TD> </TR> <j:forEach var="mvnbld" items="${m.value}"> <j:set var="artifacts" value="${mvnbld.artifacts}" /> <j:if test="${artifacts!=null and artifacts.size()&gt;0}"> <TR> <TD> <j:forEach var="f" items="${artifacts}"> <li> <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a> </li> </j:forEach> </TD> </TR> </j:if> </j:forEach> </j:forEach> </TABLE> <BR /> </j:if> <!-- JUnit TEMPLATE --> <j:set var="junitResultList" value="${it.JUnitTestResult}" /> <j:if test="${junitResultList.isEmpty()!=true}"> <TABLE width="100%"> <TR> <TD class="bg1" colspan="2"> <B>${project.name} Functional Tests</B> </TD> </TR> <j:forEach var="junitResult" items="${it.JUnitTestResult}"> <j:forEach var="packageResult" items="${junitResult.getChildren()}"> <TR> <TD class="bg2" colspan="2">Name: ${packageResult.getName()} Failed: ${packageResult.getFailCount()} test(s), Passed: ${packageResult.getP assCount()} test(s), Skipped: ${packageResult.getSkipCount()} test(s), Total: ${packageResult.getPassCount()+packageResult.getFailCount()+packageResult.getSkipCount()} test(s)</TD> </TR> <j:forEach var="failed_test" items="${packageResult.getFailedTests()}"> <TR bgcolor="white"> <TD class="test_failed" colspan="2"> <B> <li>Failed: ${failed_test.getFullName()} <br /> <pre> ${failed_test.errorDetails} </pre></li> </B> </TD> </TR> <TR bgcolor="white"> <TD class="test_failed" colspan="2"> <B> <li>StackTrace: ${failed_test.getFullName()} <br /> <pre> ${failed_test.errorStackTrace} </pre></li> </B> </TD> </TR> </j:forEach> </j:forEach> </j:forEach> </TABLE> <BR /> </j:if> <!-- COBERTURA TEMPLATE --> <j:set var="coberturaAction" value="${it.coberturaAction}" /> <j:if test="${coberturaAction!=null}"> <j:set var="coberturaResult" value="${coberturaAction.result}" /> <j:if test="${coberturaResult!=null}"> <table width="100%"> <TD class="bg1" colspan="2"> <B>Cobertura Report</B> </TD> </table> <table width="100%"> <TD class="bg2" colspan="2"> <B>Project Coverage Summary</B> </TD> </table> <table border="1px" class="pane"> <tr> <td>Name</td> <j:forEach var="metric" items="${coberturaResult.metrics}"> <td>${metric.name}</td> </j:forEach> </tr> <tr> <td>${coberturaResult.name}</td> <j:forEach var="metric" items="${coberturaResult.metrics}"> <td data="${coberturaResult.getCoverage(metric).percentageFloat}">${coberturaResult.getCoverage(metric).percentage}% (${coberturaResult.ge tCoverage(metric)})</td> </j:forEach> </tr> </table> <j:if test="${coberturaResult.sourceCodeLevel}"> <h2>Source</h2> <j:choose> <j:when test="${coberturaResult.sourceFileAvailable}"> <div style="overflow-x:scroll;"> <table class="source"> <thead> <tr> <th colspan="3">${coberturaResult.relativeSourcePath}</th> </tr> </thead>${coberturaResult.sourceFileContent}</table> </div> </j:when> <j:otherwise> <p> <i>Source code is unavailable</i> </p> </j:otherwise> </j:choose> </j:if> <j:forEach var="element" items="${coberturaResult.childElements}"> <j:set var="childMetrics" value="${coberturaResult.getChildMetrics(element)}" /> <table width="100%"> <TD class="bg2" colspan="2">Coverage Breakdown by ${element.displayName}</TD> </table> <table border="1px" class="pane sortable"> <tr> <td>Name</td> <j:forEach var="metric" items="${childMetrics}"> <td>${metric.name}</td> </j:forEach> </tr> <j:forEach var="c" items="${coberturaResult.children}"> <j:set var="child" value="${coberturaResult.getChild(c)}" /> <tr> <td>${child.xmlTransform(child.name)}</td> <j:forEach var="metric" items="${childMetrics}"> <j:set var="childResult" value="${child.getCoverage(metric)}" /> <j:choose> <j:when test="${childResult!=null}"> <td data="${childResult.percentageFloat}">${childResult.percentage}% (${childResult})</td> </j:when> <j:otherwise> <td data="101">N/A</td> </j:otherwise> </j:choose> </j:forEach> </tr> </j:forEach> </table> </j:forEach> </j:if> <BR /> </j:if> <!-- HEALTH TEMPLATE --> <div class="content"> <j:set var="healthIconSize" value="16x16" /> <j:set var="healthReports" value="${project.buildHealthReports}" /> <j:if test="${healthReports!=null}"> <h1>Health Report</h1> <table> <tr> <th>W</th> <th>Description</th> <th>Score</th> </tr> <j:forEach var="healthReport" items="${healthReports}"> <tr> <td> <img src="${rooturl}${healthReport.getIconUrl(healthIconSize)}" /> </td> <td>${healthReport.description}</td> <td>${healthReport.score}</td> </tr> </j:forEach> </table> <br /> </j:if> </div> <!-- CONSOLE OUTPUT --> <j:getStatic var="resultFailure" field="FAILURE" className="hudson.model.Result" /> <j:if test="${build.result==resultFailure}"> <TABLE width="100%" cellpadding="0" cellspacing="0"> <TR> <TD class="bg1"> <B>CONSOLE OUTPUT</B> </TD> </TR> <j:forEach var="line" items="${build.getLog(100)}"> <TR> <TD class="console">${line}</TD> </TR> </j:forEach> </TABLE> <BR /> </j:if> </BODY> </j:jelly> <!-- BRANCH --> <TD>Subversion Repo:</TD> <TD>${build.scm}</TD> </TR> does not work, and i am not sure which argument to use with build object to get subversion url. outside jelly script, i can get the Subversion URL, using: Subversion URL: ${ENV, var="SVN_URL"}

    Read the article

  • How to enable synergy 24800 (or some other port) through firewalld

    - by ndasusers
    After upgrading to Fedora 18, Synergy, the keyboard sharing system was blocked by default. The culprit was firewalld, which happily ignored my previous settings made in the Fedora GUI, backed by iptables. ~]$ ps aux | grep firewall root 3222 0.0 1.2 22364 12336 ? Ss 18:17 0:00 /usr/bin/python /usr/sbin/firewalld --nofork david 3783 0.0 0.0 4788 808 pts/0 S+ 20:08 0:00 grep --color=auto firewall ~]$ Ok, so how to get around this? I did sudo killall firealld for several weeks, but that got annoying every time I rebooted. It was time to look for some clues. There were several one liners, but they did not work for me. They kept spitting out the help text. For example: ~]$ sudo firewall-cmd --zone=internal --add --port=24800/tcp [sudo] password for auser: option --add not a unique prefix Also, posts that clamied this command worked also stated it was temporary, unable to survive a reboot. I ended up adding a file to the config directory to be loaded in on boot. Would anyone be able to have a look at that and see if I missed something? Though synergy works, when I run the list command, I get no result: ~]$ sudo firewall-cmd --zone=internal --list-services ipp-client mdns dhcpv6-client ssh samba-client ~]$ sudo firewall-cmd --zone=internal --list-ports ~]$

    Read the article

  • PostgreSQL pg_hba.conf with "password" auth wouldn't work with PHP pg_connect?

    - by tftd
    I've recently experimented with the settings in pg_hba.conf. I read the PostgreSQL documentation and I though that the "password" auth method is what I want. There are many people that have access to the server PostgreSQL is working on so I don't want the "trust" method. So I changed it. But then PHP stopped working with the database. The message I get is "Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "myuser" in /my/path/to/connection/class.php on line 35". It is kind of strange because I can connect via phppgadmin without any problems and also I can connect from my home computer with psql - again without any problems. This is my pg_hba.conf: # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all password # IPv4 local connections: host all all 127.0.0.1/32 password # IPv6 local connections: host all all ::1/128 password The connection string I'm using with pg_conenct is: $connect_string = "host=localhost port=5432 dbname=mydbname user=auser password=apassword"; $dbConnection = pg_connect($connection_string); Does anybody know why is this happening ? Did I misconfigured something ?

    Read the article

  • java connectivity with mysql error

    - by abson
    I just started with the connectivity and tried this example. I have installed the necessary softwares. Also copied the jar file into the /ext folder.Yet the code below has the following error import java.sql.*; public class Jdbc00 { public static void main(String args[]){ try { Statement stmt; Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/mysql" DriverManager.getConnection(url,"root", "root"); //Display URL and connection information System.out.println("URL: " + url); System.out.println("Connection: " + con); //Get a Statement object stmt = con.createStatement(); //Create the new database stmt.executeUpdate( "CREATE DATABASE JunkDB"); stmt.executeUpdate( "GRANT SELECT,INSERT,UPDATE,DELETE," + "CREATE,DROP " + "ON JunkDB.* TO 'auser'@'localhost' " + "IDENTIFIED BY 'drowssap';"); con.close(); }catch( Exception e ) { e.printStackTrace(); }//end catch }//end main }//end class Jdbc00 But it gave the following error D:\Java12\Explore>java Jdbc00 java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at Jdbc11.main(Jdbc00.java:11) Could anyone please guide me in correcting this?

    Read the article

1