PHP Date Time Examples #Software Development #Web Development #Root #By Sayed Ahmed

You can use the following code where users can select a date range from a drop down with quick dates. Very often, you will also need a date range calendar; you can use jquery date picker tool for the purpose.

if ($quickDates==”today”){
$dateFrom = date(“Y-m-d”);
$dateTo = date(“Y-m-d”, time() + 60 * 60 * 24);
}else if ($quickDates==”yesterday”){
$dateFrom = date(“Y-m-d”, time() – 60 * 60 * 24);
$dateTo = date(“Y-m-d”);
}else if ($quickDates==”lastWeek”){
$dateFrom = date(“Y-m-d”, time() – 7*60 * 60 * 24);
$dateTo = date(“Y-m-d”);
}else if ($quickDates==”thisMonth”){
$dateFrom = date(“Y-m-1”);
$dateTo = date(“Y-m-d”,strtotime(“+1 months”));
}else if ($quickDates==”lastMonth”){
$dateFrom = date(“Y-m-d”,strtotime(“-1 months”));
$dateTo = date(“Y-m”);
}else if ($quickDates==”allTime”){
$dateFrom = “all”;
$dateTo = “all”;
}

You can utilize this range in a query as follows

$dateFilter = “”;
if ($dateFrom != “all”){
$dateFilter = ” where ( date >= ‘$dateFrom’ and date < ‘$dateTo’) “;
}

$sql = ” select * from table $dateFilter order by date desc”;

HTML for a quick date selector can be as folows:

<select id=’cmbQuickDates’ name=’cmbQuickDates’>
<option value=”>Select</option>
<option value=’today’>Today</option>
<option value=’yesterday’>Yesterday</option>
<option value=’lastWeek’>Last week</option>
<option value=’thisMonth’>This month</option>
<option value=’lastMonth’>Last month</option>
<option value=’allTime’>All time</option>
<{/select> From: http://sitestree.com/?p=147
Categories:Software Development, Web Development, Root, By Sayed Ahmed
Tags:PHP, Date
Post Data:2013-01-01 05:52:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

How to Secure Your .Net Applications #Software Development #Web Development #Root #By Sayed Ahmed

How to Secure Your .Net Application

  • Use multiple levels of security: Physical Level (data center security), Network Level (firewall), Operating System Level (accounts, trust level), Web Server Level (use virtual directory), Web Application Level (authentication, authorization), Database Level (different accounts to perform different types of database operations), Data Level (encrypt sensitive data), use Best Practices (prevent SQL Injection and XSS)
  • Use separate database servers than the web server (in general more secure but not the better choice always, you may need to consider pros and cons between performance and security, your future scalability requirements, application requirements).
  • Take security measures in terms of accounts and trust levels on who can access the physical machine and from where and how
  • Control the permissions for the account under which the web-application is running. (Ole DB, Registry, File/IO)
  • Configure IIS for anonymous access. use IIS_machinename system account with limited access
  • Configure web-pages to require authentication whose information you want not to be available publicly
  • Use database based authentication for internet applications
  • Use role level security; also use page level and control level security. Control access to the feature, control access to the page, also control access to the controls
  • For the database operations, based on the user permission level, use separate database accounts to perform database operations. When user has read only access, use a db user that only has read only operation permission on the database.
  • Use database based accounts; do not use windows based authentication
  • Never trust user input, avoid dynamic SQL, do not use the admin account to perform database operations, encrypt the sensitive data stored in the database,
  • Display custom error messages to the user. Do not display system generated error messages to the user
  • Encode and quote user input. Do not provide feature for end users to create dynamic SQLs.
  • Always validate data, check for data types as well.
  • set HTMLEncodeValue = true
  • Use SSL
  • Use POST and Session avoid using Get and Cookies
  • Encrypt URL parameters using key based encryption
  • Do not decrypt data for validation checking but encrypt and compare
  • Encrypt all sensitive data

  From: http://sitestree.com/?p=131
Categories:Software Development, Web Development, Root, By Sayed Ahmed
Tags:.Net, .Net Applications, Secure, security
Post Data:2012-12-11 04:58:19

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Skills required for an Advanced Database Designer/Architect role (or for a data modeler role) #Software Development #Web Development #Root #Miscellaneous #By Sayed Ahmed

ER Studio
ERWin
Powerdesigner
DbVisualizer
star-schemas
snow-flake
3NF relational models
logical modeling
enterprise database design From: http://sitestree.com/?p=357
Categories:Software Development, Web Development, Root, Miscellaneous, By Sayed Ahmed
Tags:
Post Data:2013-08-30 00:07:09

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Configure Netbeans IDE for Debugging [PHP platform] #Software Development #Web Development #Root #PHP #Web Testing #Mobile Development #By Sayed Ahmed

Presentation slides on this topic: click

To enable xdebug debugging in Netbeans IDE php.ini needs some configuration
[You will be able to debug PHP applications the way you do in Visual Studio, Turbo C/C++ IDE]

php.ini configuration Required

;XDEBUG Extension
zend_extension = “c:/wamp/bin/php/php5.4.12/zend_ext/php_xdebug-2.2.3-5.4-vc9-x86_64.dll”

[xdebug]
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir = “c:/wamp/tmp”

Configuration Required in Netbeans IDE:

1. Set the Project URI to the path under your web-server; as you can see the site in a browser; the path shown in the browser address bar. Right click the project, click properties, click run configuration, set the Project URI. Example: http://127.0.0.1:800/example_projects/TodoList/web/

2. Go to Tools->Options->PHP->debugging. see if the parameters are ok, if not fix them. Also, set the properties you want. You may check ‘Watches and Balloon evaluation’


You can set the breakpoints in your project
You can select debug or debug file from menu or from right clicking on the project
Then you can use the Step Over, Step Into, Step Out from debug menu or shortcut keys [better]

You can also check the values of the variables
You can also check the status of the stack
and see all breakpoints listed; there is a window for that

I will add pictures or pdf slides with screen shots to make you understand it better. From: http://sitestree.com/?p=365
Categories:Software Development, Web Development, Root, PHP, Web Testing, Mobile Development, By Sayed Ahmed
Tags:
Post Data:2013-09-07 20:08:46

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Software Time Estimation: What should you consider? #Software Engineering

In a web developer position when you are the only one to do everything, time estimation for a task may need considerations for some or all of the parameters below

Just my 2 cents, Just one way of thinking

There are many extra stuff that you may have to spend time on than actually implementing the task or function. The extra stuff may take more time than implementing actual task. Sometimes the extra tasks can take way more than the actual task. If the actual task is small or trivial but you need tospend time just to justify that the solution (also the feature/task) works with everything.

1. Any considerations for the Architecture? to cope up with the overall architecture of the application. time to adjust with.
2. Any considerations for the Security? if input boxes involved, how much security you want to provide? Do both front end and back end security involved
3. create the user interface [deal with CSS, deal with other stuff on the page or creating a new page]. think and make the interface usable [user friendly]
4. create the required change in the backend database. any considerations for efficiency, query performance
5. think the logic to solve the task at hand [may be think different ways to solve and pick one]
6. write the code
7. debug the code to see the code works as it is supposed to be still the output looks alright
8. testing. testing in multiple browsers. testing in multiple versions. testing in multiple resolutions. Testing for IE Quirk modes
9. testing for load, testing for efficiency
10. to justify does it work with everything else related?
11. does other related pages and functions work accordingly? after you have implemented the task. time required.
12. what about code optimization? do it before or after
13. what about better organizing the code. [the solution works; but if you reorganize the code, something may break; so some time may be required in worst cases to deal with]
14. what about debug as part of whitebox testing?
15. To check: Does it work in the test server? does it work in the integration server?
16. what about creating test cases and executing them [being more formal] [any documentation required or not?]
17. if the project is a big one, dealing with the project [keeping track of what is where, where you are placing what and why, and similar] [you need good memory or good skills to deal with]
18. is unit test code a part of the requirement? will take time…

Sometimes small tasks become big because of these extra considerations. However, without doing these extra stuff,it may be hard to say that the solution will work reasonably if not under all possible scenarios

Depending on the task, it may be possible to account for multiple levels of abstraction at the same time [writing the code while doing a good job in terms of design and architecture without thinking much on them [or spending much time on them]…but not always..]

You may maintain a list that does matter [required to deliver as part of your work] and assign time to each of the individual aspects. Sum them up and get the time estimation…

From: http://sitestree.com/?p=5339
Categories:Software Engineering
Tags:
Post Data:2011-10-20 08:30:23

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Must know for senior software developer positions. #Software Engineering

Must know for senior software developer positions. What do you think? useful resources or not?Though not complete but can provide some ideas. What do you think?Developers planning to go to other software related roles may find the resources useful. what do you think?

From: http://sitestree.com/?p=5254
Categories:Software Engineering
Tags:
Post Data:2009-06-16 19:15:47

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Importance of Requirements Analysis #Software Engineering

“It is widely recognized that incorrect requirements account for up to 60 percent of errors in software products, and yet the majority of software development organizations do not have a formal requirements process. Many organizations appear willing to spend huge amounts on fixing and altering poorly specified software, but seem unwilling to invest a much smaller amount to get the requirements right in the first place” — Mastering the Requirements Process, Second Edition, By: Suzanne Robertson; James Robertson

From: http://sitestree.com/?p=5210
Categories:Software Engineering
Tags:
Post Data:2011-03-25 08:43:43

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Linkedin Answers: We can teach technical skills – we need resources that are people oriented. A common saying. What is your opinion? #Software Engineering

Please check:

From: http://sitestree.com/?p=5044
Categories:Software Engineering
Tags:
Post Data:2010-12-13 18:32:40

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Linkedin Answers: Programming is more arts than science? A saying. What is your opinion. #Software Engineering

From: http://sitestree.com/?p=5043
Categories:Software Engineering
Tags:
Post Data:2007-10-17 02:26:35

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

What is RAD? What is prototyping? #Software Engineering

Please consult the following resources to learn about Rapid Application Development and Software Prototyping:

From: http://sitestree.com/?p=5041
Categories:Software Engineering
Tags:
Post Data:2009-03-23 18:29:49

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada