|
Hi
I want to ask what's the best practice for html5 design?
Should I use the , , <footers>, etc or I should just make all as ?
What's your advise?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
That's highly dependent on policy and your operating environment.
If your page is meant to be scraped, it might be good to use the tags in order to refine the pertinent content. Outside of that scenario, it could be looked at as an organizational technique.
Coming from a world of templates and containers, I personally don't think it adds much value and would not include it as a best practice.
My advice is that if it helps you to organize your design, then use it.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Instructions
1.Print the numbers 1..100
2.For multiples of 3, print "Red" instead of the number
3.For multiples of 5, print "Star" instead of the number
4.For multiples of 3 and 5, print "RedStar" instead of the number
5.Print it out as html/css so if we run it on a web server, it'll work.
|
|
|
|
|
OK, I have done that. Now, do you have a question?
|
|
|
|
|
Could you please do my homework too?
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
It is very rude to post your homework and not even ask a question. Shame shame.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I am developing store finder functionality in AngularJS. My requirements are 1. remove # from URL and 2. user can bookmark a page. I would explain about second requirement because for first requirement I got a solution but not for second. Lets say I have a store finder page where based on geo-location user get to see list of different stores near by, and on click of a particular store its details will be displayed. Now when user clicks on a particular store details my URL looks something like http://<my machine IP>/store-finder/stores/<storeNumber>/<name-of-store>.
All this works fine when you are in the application flow but when user bookmarks a particular store details and opens next day or in new instance of a browser then everything goes for toss.
I tried URL Rewrite using IIS but when I run the book mark, it fails to load my CSS, JS files with reference to store number directory, which is not possible because there is no physical directory for a store.
Please let me know if anyone faced similar kind of scenario and how you fixed it.
Thanks
|
|
|
|
|
Well, for starters you want to use ui-router so that you introduce state into the Angular application.
After that, you need to setup your page with the primary Angular app to be served as a default page. I'm afraid I've only done this in OWIN/Katana, but URL rewrite should work. For instance, if you have your primary view and .js loads in index.html, you should push index.html for unresolved requests.
The idea is to push the SPA down the pipe to the client, and then let the ui-router state engine determine what should be displayed based on the client-side URL.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
In a vb.net 2010 web form application, I believe that I am getting an internal server error 500 message since
the size of the file may be too large for the browsers I have been using.
When I look at the length of one record for a particular student I find the following sizes:
1. The htmltable.length = 43,016 and
2. jason.tostring.length = 82,523.
I have been trying to use internet explorer 11 and Firefox.
However I am wondering if you can tell me the following:
1. Is there a broswer that allows the size of files that I need to display in the browser? If so, what browser and version would that be?
2. If the the size files I listed above are too large, is there a broswer that I can extend its limit on my workstation to meet my size limits? If so, what browser could I extend the size limits on and how would I accomplish that goal?
3. If I can not meet the size limits that I need, what browser and what version of that browser can I use to meet the highest size limits that I am looking for?
|
|
|
|
|
|
There are two places in the machine.config file where we can change the transaction time out settings
1. Added the following section in the machine.config
<configuration>
<system.transactions>
<machineSettings maxTimeout=”01:00:00″ />
</system.transactions>
</configuration>
2. modify the System.Transactions section in machine.config
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
Can anyone help me, what's the difference between these. Which is the best place to set the timeout settings
|
|
|
|
|
Hi,
I am facing an error of above mentioned subject, when I try to select the csv file of 3.9mb. Other way, when i select small file like 90kb then it works perfect..
See my following code:
if ($_FILES["file"]["error"] > 0)
{
echo "Problem in file! " . "<br>";
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
$this_filename = $_FILES["file"]["tmp_name"];
$csvfile = fopen($this_filename, 'r');
|
|
|
|
|
The error message is quite clear:
The content of $_FILES["file"]["tmp_name"] is empty.
So check your code where that is set. If it is set for small files but not for large ones there must be some conditional statement in your code that does not set the name in some cases.
|
|
|
|
|
|
Also - consider that the large file does not yet exist on the server when because your code migh be doing the file-copy asynchronously.
If this is the case, since it's not there yet, the name may not yet exist int the $_FILES["file"] array. You see how a large file may not be done whilst a small one will be transmitted very quickly.
If other attempts at finding the problem fail, add a delay to your application between the upload and the access steps and see if that fixes things.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Hi All,
I'm totally new to this forum, kindly bear me if this is not the right place to ask questions
I am trying to test a web service using SOAP UI 5.2.1.
Crated a SOAP project and added the WSDL but when I'm testing the service by entering the input parameters , I'm getting access denied error .
Have installed SOAP UI in the same server where web service is deployed .
Any help will be really appreciated
Here is the error log
-------------------------------------------------------------
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/27/2016 7:21:30 AM
Event time (UTC): 3/27/2016 1:51:30 AM
Event ID: 2cd853bc553340288de4f32f9426c2f1
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/IntegrationServices-1-131035170822874864
Trust level: Full
Application Virtual Path: /IntegrationServices
Application Path: C:\Program Files\ICE\IntegrationServices\
Machine name: ICETest
Process information:
Process ID: 5536
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: HttpException
Exception message: Server cannot append header after HTTP headers have been sent.
Request information:
Request URL: http://ICETest/IntegrationServices/MI_EQUIP000.asmx
Request path: /IntegrationServices/MI_EQUIP000.asmx
User host address: 197.148.44.123
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM
Thread information:
Thread ID: 3
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.HttpResponse.AppendHeader(String name, String value)
at Meridium.Integration.Services.BasicAuthenticationModule.OnEndRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
Regards,
Prasanth
|
|
|
|
|
From the error message:
Quote: Server cannot append header after HTTP headers have been sent. It seems, you are sending the data (or the credentials details) after the request/response has been sent.
Besides, from the content you provide it is not enough to know where you may generating two responses; a possible redirect after download or response generation. Read this thread for more on this: "Server cannot append header after http headers have been sent"[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
How to sync database offline and online application
|
|
|
|
|
Depends on what database you are using and how you did everything.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
If you want to keep it synchronized, there is no sense in keeping the application offline.
Offline applications are meant to keep a fraction of database content, and the updated content is kept offline in the databases, until application is online. Then the data is synchronized. Thus, your question makes very less sense because both are contradiction to each other.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hi, I don't know if this is the appropriate forum for my question but here goes. I've heard many people and read many posts that claim that since Entity Framework is both a unit of work and a repository rolled into one, there is no need to create separate layers and write codes for them in N-Tier applications.
After reading posts arguing against this claim that we do not need Repository and UnitOfWork patterns when using EF, I want to know what the verdict in the community is on this.
If we do need to use Repository and UnitOfWork patterns can someone please point me to a good tutorial(WebForm and MVC) on how to implement them in an N-Tier app. Thanks in advance.
modified 26-Mar-16 0:52am.
|
|
|
|
|
MadDashCoder wrote: there is no need to create separate layers and write codes for them in N-Tier applications.
Here's a contrary opinion, with a pretty good explanation:
Repository Pattern with C# and Entity Framework, Done Right - YouTube[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i got the eroor
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\test1\register.php on line 54
Heres my code:
<?php
session_start();
if(isset($_SESSION['tbl_info'])!="")
{
header("Location: home.php");
}
include_once 'dbconnect.php';
if(isset($_POST['btn-signup']))
{
$username = mysql_real_escape_string($_POST['username']);
$email = mysql_real_escape_string($_POST['email']);
$password = md5(mysql_real_escape_string($_POST['pass']));
$LastName = mysql_real_escape_string($_POST['LastName']);
$FirstName = mysql_real_escape_string($_POST['FirstName']);
$MidName = mysql_real_escape_string($_POST['MidName']);
$Age = mysql_real_escape_string($_POST['Age']);
$Bdate = mysql_real_escape_string($_POST['Bdate']);
$Address = mysql_real_escape_string($_POST['Address']);
$Contact = mysql_real_escape_string($_POST['Contact']);
$FathersName = mysql_real_escape_string($_POST['FathersName']);
$FOccupation = mysql_real_escape_string($_POST['FOccupation']);
$MothersName = mysql_real_escape_string($_POST['MothersName']);
$MOccupation = mysql_real_escape_string($_POST['MOccupation']);
$ElemSchool = mysql_real_escape_string($_POST['ElemSchool']);
$YearGradElem = mysql_real_escape_string($_POST['YearGradElem']);
$HighSchool = mysql_real_escape_string($_POST['HighSchool']);
$YearGradhs = mysql_real_escape_string($_POST['YearGradhs']);
$username = trim($username);
$email = trim($email);
$password = trim($password);
$LastName = trim($LastName);
$FirstName = trim($FirstName);
$MidName = trim($MidName);
$Age = trim($Age);
$Bdate = trim($Bdate);
$Address = trim($Address);
$Contact = trim($Contact);
$FathersName = trim($password);
$FOccupation = trim($password);
$MothersName = trim($password);
$MOccupation = trim($password);
$ElemSchool = trim($password);
$YearGradElem = trim($password);
$HighSchool = trim($password);
$YearGradhs = trim($password);
$query = "SELECT email FROM tbl_info WHERE email='$email'";
$result = mysql_query($query);
$count = mysql_num_rows($result);
if($count == 0){
if(mysql_query("INSERT INTO tbl_info (username,email,password,LastName,FirstName,MidName,Age,Bdate,Address,Contact,FathersName,FOccupation,MothersName,MOccupation,ElemSchool,YearGradElem,HighSchool,YearGradhs) VALUES('$username','$email','$password','$LastName','$FirstName','$MidName','$Age','$Bdate','$Contact','$FathersName','$FOccupation','$MothersName','$MOccupation','$ElemSchool','$YearGradElem','$HighSchool','$YearGradhs)"))
{
?>
<script>alert('successfully registered ');</script>
<?php
}
else
{
?>
<script>alert('error while registering you...');</script>
<?php
}
}
else{
?>
<script>alert('Sorry Email ID already taken ...');</script>
<?php
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<center>
<div id="login-form">
<form method="post">
<table align="center" width="30%" border="0">
<tr>
<td><input type="text" name="username" placeholder="User Name" required /></td>
</tr>
<tr>
<td><input type="email" name="email" placeholder="Your Email" required /></td>
</tr>
<tr>
<td><input type="password" name="password" placeholder="Your Password" required /></td>
</tr>
<tr>
<td><input type="text" name="LastName" placeholder="Your Last Name" required /></td>
</tr>
<tr>
<td><input type="text" name="FirstName" placeholder="Your First Name" required /></td>
</tr>
<tr>
<td><input type="text" name="MidName" placeholder="Your Middle Name" required /></td>
</tr>
<tr>
<td><input type="text" name="Age" placeholder="How old are you?" required /></td>
</tr>
<tr>
<td><input type="text" name="Bdate" placeholder="Your Birthday" required /></td>
</tr>
<tr>
<td><input type="text" name="Address" placeholder="Where do you live?" required /></td>
</tr>
<tr>
<td><input type="text" name="Contact" placeholder="Your Contact Info" required /></td>
</tr>
<tr>
<td><input type="text" name="FathersName" placeholder="Your Father's name" required /></td>
</tr>
<tr>
<td><input type="text" name="FOccupation" placeholder="Occupation" required /></td>
</tr>
<tr>
<td><input type="text" name="MothersName" placeholder="Your Mother's name" required /></td>
</tr>
<tr>
<td><input type="text" name="MOccupation" placeholder="Occupation" required /></td>
</tr>
<tr>
<td><input type="text" name="ElemSchool" placeholder="Elem School" required /></td>
</tr>
<tr>
<td><input type="text" name="YearGradElem" placeholder="Year Graduated" required /></td>
</tr>
<tr>
<td><input type="text" name="HighSchool" placeholder="HighSchool" required /></td>
</tr>
<tr>
<td><input type="text" name="YearGradhs" placeholder="Year Graduated" required /></td>
</tr>
<tr>
<td><button type="submit" name="btn-signup">Sign Me Up</button></td>
</tr>
<tr>
<td><a href="index.php">Sign In Here</a></td>
</tr>
</table>
</form>
</div>
</center>
</body>
</html>
|
|
|
|
|
I am not a PHP dev
according to your question , i googled mysql_query and reached php api reference site[^]
Under Return Values paraparaph , i saw the following info
Quote: For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error.
So in short that function fails and returns FALSE (boolean) , This means something was wrong in query string or somewhere else
You should check the $result variable whether it is a boolean or resource
here is the sample from api page
$result = mysql_query('SELECT * WHERE 1=1');
if (!$result) {
die('Invalid query: ' . mysql_error());
}
|
|
|
|
|
I have a table with a couple rows. Ech row has a class of either black or blue. Black rows have black background, blue rows have blue background. Currently when the cursor hovers over any row, its background turns purple.
When the mouse cursor leaves a row, its background reverts back to what it was.
The functionality that I cannot get to work is when a new row is clicked. When a new row is clicked I would like the background of the old row which was previously clicked to revert back to its original color.
I want the clicked row to remain gray until another row is clicked or when the cursor hovers over it but it is not working.
<style>
body { font-family: San-Serif; color:white;}
table { border-collapse: collapse;}
th { text-align: left; }
tr.black { background-color: black; }
tr.blue { background-color:blue;}
</style>
<style>
.markedBlack, .markedBlue{background:gray}
</style>
<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$(document).ready(function() {
$("tbody tr").mouseover(function() {
$(this).css("background","purple");
});
$(".black").mouseout(function() {
$(this).css("background","black");
});
$(".blue").mouseout(function() {
$(this).css("background","blue");
});
$(".black").click(function(){
$(this).removeClass("black").addClass("markedBlack");
});
$(".blue").click(function(){
$(this.blue").removeClass("blue").addClass("markedBlue");
});
$(".markedBlack").click(function(){
$(".markedBlack").removeClass("markedBlack").addClass("black");
$(this).addClass("markedBlack");
});
$(".markedBlue").click(function(){
$(".markedBlue").removeClass("markedBlue").addClass("blue");
$(this).addClass("markedBlue");
});
});
</script>
<table>
<thead>
<tr>
<th>Title1</th><th>Title2</th><th>Title3</th>
</tr>
</thead>
<tbody>
<tr class="blue">
<td>blue</td> <td>blue</td> <td>blue</td>
</tr>
<tr class="black">
<td>black</td> <td>black</td> <td>black</td>
</tr>
<tr class="blue">
<td>blue</td> <td>blue</td> <td>blue</td>
</tr>
<tr class="black">
<td>black</td> <td>black</td> <td>black</td>
</tr>
</tbody>
</table>
modified 21-Mar-16 15:56pm.
|
|
|
|
|