i have a username= LICTowner.
i need to get the prefix from the word LICTowner i.e LICT.
how to split the word and get the 4 letter prefix.
in asp.net using C#
thanks for yout time helping on this ;)
I'm new to SQL and wish to solve somethign in just one query and i dont know how to do it.-
Basically I've a table of products, a table of users and a table of comments, linked by products.id - comments.pid and user.id - comments.uid ,
i wish to know what is the best practice to create just 1 query and get all products with child comments, including username.
A few days ago, I posted this question and this question asking about how to post "Hello World" to twitter. I've gotten helpful responses, which have propelled me further along, but I'm still lost.
I need to use OAuth because (as I read it) using username and password is going to be deprecated soon.
I need an example as simple as updating the status with the string constant 'Hello World!'.
My client is specifying that I must use C#.
I am doing a query with three tables, the problem was one table has many occurrences of id of another.
sample data:
users: id
answers:
id:1
user_answer :1
id:1
user_answer :2
id:1
user_answer :3
Questions:
id:1
answers :answer description
id:2
answers :answer description
id:3
answers :answer description
How can I get all user information and all answer and its description, I used GROUP by user.id but it only returns only one answer.
I want to return something like this list all of users answer:
Name Q1 Q2
USERNAME ans1,ans2 ans1,ans2 comma separated description of answer here
I got a simple form and it works fine in ie but not working in firefox
onclick="login('loginuser','../private/loginuser.php?username='+email.value+'&pass='+passw.value,'loginresult');"
Any help appreciated.
I just want open a mapped network drive from C# code ,it is apssword protected, so when i try to launch directly it gives exception. Can some one throw light on providing username password while opening the this drive
Hello I am a little confused with regards to models in mvc 4 and thought someone may be able to point me in the right direction. This would be most appreciated.
For example if i have a table that has the following fields
[StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 5)]
public string UserName { get; set; }
[Required(ErrorMessage="Email Address is Required")]
[StringLength(15, ErrorMessage = "Email Address must be between {0} and {1} in size",MinimumLength = 5 )]
[DataType(DataType.EmailAddress)]
[Display(Name="Email")]
public string Email { get; set; }
[MaxLength(25)]
[Display(Name="Mobile Telephone Number")]
public string Mobile {get;set;}
[MaxLength(500)]
[Display(Name="Headline")]
public string Headline {get;set;}
[Required]
[StringLength(200)]
[Display(Name = "First Name")]
public string FirstName {get;set;}
[Required]
[StringLength(200)]
[Display(Name="Surname")]
public string Surname { get; set;}
public virtual int? DayOfBirthId { get; set; }
public virtual DayOfBirth DayOfBirth { get; set; }
public virtual int? MonthOfBirthId { get; set; }
public virtual MonthOfBirth MonthOfBirth { get; set; }
public virtual int? YearOfBirthId { get; set; }
public virtual YearOfBirth YearOfBirth{get;set;}
This is my user profile table in the database. However I would like a form that the user registers to the site with. When they first register i do not need all the details such as telephone all i really need is there username, email address and password. Do i create another model for this. Or do i have one model and on the controller set the fields to null or empty string that are not required on registration. I have validation also so would this be set for data that has not been entered on the form.
My question is ultimately should all forms represent models- should the database be redesigned to meet this required. Or should the controller set the values that are not required. Or should there be another model that represents the form be created which maps to this table.
I am a little confused on this and clarification of anyone would be most appreciated.
here we got a positional parameter:
SELECT
u
FROM ForumUser u
WHERE u.id = ?1
and here a named parameter:
SELECT
u
FROM ForumUser u
WHERE u.username = :name
this is DQL (doctrine query language) but i think the concept is the same.
could someone please explain what these mean and do?
hi i am new to zend and i installed zend server in my local machine, i found phpmyadmin on my instalation directory and i copied it on htdocs.
while running http://localhost/phpmyadmin it appears login page and when i enter username and password it does not redirects to the main page.
insteda it gives "internal server error"
thanks in advance
Hello everyone!
What I would like to do is retrieve the contents of a PHP file and insert it into a div every 60 seconds, basically refreshing the dynamic div. I've come up with the following code so far, however it doesn't seem to be working. The code is just like this, nothing extra, apart from the MYSQL login.
PHP to grab:
<?php
$time = date("m/d/Y h:i:s a", time());
mysql_query("UPDATE djs SET requesttime='{$time}' WHERE username='{$djs['username']}'")
or die(mysql_error());
$request_db = mysql_query("SELECT * FROM requests
WHERE haveplayed='0'") or die(mysql_error());
echo "<table style=\"border:1px solid;width:99%;margin-left:auto;margin-right:auto;\" border=\"1\">";
echo "<tr><th>Title</th><th>Artist</th><th>Dedicated To...</th></tr>";
while($request = mysql_fetch_array( $request_db )) {
echo "<tr><td style=\"width:33%;padding:1px;\">";
echo $request['SongName'];
echo "</td><td style=\"width:33%;\">";
echo $request['Artist'];
echo "</td><td style=\"width:33%;\">";
echo $request['DedicatedTo'];
echo "</td></tr>";
}
echo "</table>";
?>
The original PHP code is just the same, enclosed in a div with an id attribute of 'ajax_table'.
The JavaScript is:
// JavaScript Document
var xmlHttp_moniter
function moniter()
{
xmlHttp_moniter = GetXmlHttpObject_parcel()
if(xmlHttp_moniter == null)
{
alert("browser does not support HTTP Request")
return
}
var url="ajax_table.php?random=" + Math.random()
xmlHttp_moniter.onreadystatechange = stateChanged
xmlHttp_moniter.open("GET",url,true)
xmlHttp_moniter.send(null)
}
function stateChanged()
{
if(xmlHttp_moniter.readyState==4 || xmlHttp_moniter.readyState == "complete")
{
document.getElementById("ajax_table").innerHTML = xmlHttp_moniter.responseText
setTimeout('ajax_table()',60000);
}
}
function GetXmlHttpObject_parcel()
{
var xmlHttp_moniter=null;
try
{
xmlHttp_moniter=new XMLHttpRequest();
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp_moniter=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp_moniter=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp_moniter;
}
and that is on the page that is requesting the other php page.
Hi there,
I am developing an iPhone app, which now can update Twitter account with GPS coordinates in real-time, by the Twitter API link: http://username:[email protected]/statuses/update.xml , and I am looking at how to make my own database to accept updates from iPhone, via a similar API page.
It seems a .php page can serve as the API, and MySQL can serve as the database.
What are the good ways of doing it? Any template code and tutorial please?
Does anyone knows?
My web server requiring auth, while uploading a file i've got window with auth. Even if I'll put username and pass application is crashed.
i want to put validation in ruby on rails that my username should not contain special characters like !@#$%^*()_-+=/<?:'";.
Please tell me how can i implement it in my code.
Hi all,
I am learning how to use JQuery validation plugin,
I got a simple input text field like this:
<input type="text" name="username">
But I don't know how to use this plugin to do some data availability tasks.
Could you help me please?
I am doing an iphone application in which i need to provide autoshare option to share automatically the text in an UIView in facebook when we click save button. i will save the facebook username and password of the user in datbase and retrived and want to assign for facebook and password without FBDialog... is it possible? Can anyone help me?
Hi!
I would like implement spring acl for my object fields.
does anyone has an idea what do i have to implment for it?
for example, i have Purchase object.
i would like admin_role to have read on all the fields, and secretary_role to have read only on username and address field
am i using the wamp,
For phpmyadmin Database username is root and no password, and host is localhost
i downloaded the mysql query browser from mysql.com ,
i have downloaded this mysql-gui-tools-noinstall-5.0-r17-win32 ,
when i try to connect the query browser ,
it through the error like,
what i do now ?
where is the step by step sol for my prob..
What's the simplest way, if any, to search Twitter for replies to any username that includes <string?
eg, how to search at the same time for replies to @google, @googletech, @firstgooglers, @nogoogle ?
I'm not a competent developer with any language but I can handle some easy JS or PHP or regex & Bash scripting...snippets welcome.
Ok so, Im using jQuery to do username and email checks before a signup...
this sets a variable true or false depending on the response from php.
$(document).ready(function() {
if (usr_checked == true) {
if (em_checked == true) {
$("#registerbttn").removeAttr("disabled");
}
}
else {
$("#registerbttn").attr("disabled", "disabled");
}
});
How exactly do i get it to watch those variables live?
Thanks :D
The title pretty much sums up my question, I would like to find all commits I have ever done to the subversion repository. Not just commits in current snapshot. More importantly, I would like to organize the file lists by the SVN comment used while committing.
Thank you
Edit: I am thinking maybe a python or shell script that would parse the output of
svn log | grep username
to extract revisions and then pipes the output to
svn log -r [revision numbers go here]
Maybe some scripting gurus can help me out..
When we have a column that will store a username that will only accept letters and numbers we always do validation on this input field using javascript or even server validation from code .. but i want to know if is there any way that can allow me make this validation on the Table column itself even some one try to enter data from any place it don't accept and throw exception ?
Hi all,
I have a login form sitting in an iframe to $_POST the username/pwd to the parent window. But it seems the $_POST data is not being sent. I need this as the form logic sits in a Codeigniter controller and CI will also handle the loggedin view.
regards
Is the following a secure way of protecting a user only area?
if(!isset($_SESSION['username'])){redirect(SITE_ROOT . 'st_pages/login/');}
using:
function redirect($url)
{
header('Location: ' . $url);
exit('<a href="' . $url . '">Redirecting you to: ' . $url . '</a>');
}
Hi!
I´m trying to write a log system for my CakePHP intranet. What i need is to store de username/datetime whene someone tryes to login.
My login code is on the clients_controller and i need to store the data on a model called log (i have the model, controller, view... but they are not related)
how can i achive that?
thank you
Is there any way that i can access the email accounts that are saved
in the default email client of android.
Basically i want to access the inbox and display their mails without
asking for username and password.
Does AccountManager class thats available in android version 2 answer
my query? and if yes then is there any alternative for v1.5 or v1.6.