|
|
Hi,
I would like to ask about Google Analytics.. I have seen many different ways to implement the tracking code, the standard way, the ga.js, the analytics.js..
what are the difference between these ways and what's best?
Thanks,
Jassim
Technology News @ www.JassimRahma.com
|
|
|
|
|
In my opinion Google analytic code should be on the top of the page, just before the . There is no need to put it in an individual JS file until and unless you are loading that file asynchronously. It would be a little bit pointless to put it in a separate JS file.
|
|
|
|
|
I always put it in my 'footer.php' file, right before the tag, where I put most of my scripts. Putting it at the end let's you load scripts after everything else, instead of holding up the rendering of the rest of the page. Though I know that's not really necessary thanks to some great HTML5 attributes for script tags, I am still in the habit.
I see no reason to include it as an external file. And I include my footer.php file in every page on most sites, anyway. But if I wasn't building a website in pieces like that, and each page had it's own footer, I guess I would consider an external file to make it easier than pasting it on every page.
|
|
|
|
|
|
Hi,
I have just configured the google analytics for my website and I am getting some visit data there but why when I go to the Tracking Code page it says:
Status: Tracking Not Installed
here is the page to check the source of it:
http://www.block338.com/[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
Hello,
I am working in .NET and PHP.
For .NET I am using Visual Studio 20012
For PHP I am using NetBeans 8
Both are great editors, but I found .NET studio is more powerful.
Do you know any editor for PHP which is equivalent powerful to Visual Studio.
Please answer only if you are working with .NET and PHP both.
Thanks
Kartik
|
|
|
|
|
I found Eclipse very good to me...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
I would recommend you to go( or give a try) with Zend studio http://www.zend.com/en[^]. Zend-studio 12 is great for PHP, you will find all the required features and good in performance.
In compare to .Net Visual studio, Zend studio is not equivalent powerful to Visual Studio. However, in my experience, Zend studio is more suitable PHP IDE I worked. Hope this helps.
|
|
|
|
|
Thanks for the suggestion, I am using NetBeans (free open source) and its very similar to Zend Studio. But I need similar as Visual Studio. May be in future someone community will come-up with strong IDE.
|
|
|
|
|
Hello,
I am working on PHP and In my opinion dreamweaver editor is the best one according to my experience.
|
|
|
|
|
Hello,
Here I am going to share my experience and base on that I have a questions.
<b>History</b>
I have started working on ASP in 2001 and on PHP 2004, since then I am working on both languages but more & more on PHP. Since last 2 year (2012) I am working only and only on .NET
<b>Experience To Share</b>
PHP: I have build an application in core PHP, which is hosted on shared server, using by 50 users constantly from 8 am to 7 pm. Couple of scheduler does run. Application code size is 30 MB and Database size till date in 200 MB
.NET: I have build an application in .NET, hosted on VPS, using by hardly 15 users. No scheduler is running, Application Code size is 25 MB and Database size till date is 2 MB for each user.
Please Note: both application are normal applications which keep data records into database.
<b>Unknown Things</b>
PHP: I don't know what memory needs by application to run with 50 users
.NET: I have seen in Task Manager, its going around 70 MB.
<b>Issues </b>
PHP: Application is running fine without any issues, event its running on shared server.
.NET: I have couple of issues here, I am using VPS (2GB Ram, 40GB Space, 1 Core CPU)
1) Session end for no reason.. someone told me that POOL gets recycle, now here I have implemented a setting to recycle at midnight, but sometime I can see it's still getting recycle in between.
2) Pool Stop and shutdown abnormally. I have seen event logs .. but they are far from my understanding.
<b>Questions</b>
1) what configuration we should required on server for .NET application in my case where 1 application is using 70mb memory and I have only 15 users at this stage
2) Due to abnormal shutdown of POOL I am getting 503 error. .. question is:
2.1) Is there any way to get notification on it ?
2.2) Is there any way to restart POOL automatically ?
3) If Microsoft says, they are dam GOOD then why we are facing these type of issues, can't they provide best configured server. Or is this related to service provider, they want charge us for their help & Support..may be here I sound like foolish, but just read my scenario ask yourself.. I am not in favor/against of anyone.
Thanks
Kartik
|
|
|
|
|
Hi,
I am having WCF service with BasicHttpBinding returns data with the connection.
Also in my requirement, we are calling another WCF service url(https://TestServer/ProcessValues.svc) to get some data to process my output with the exising data.
So i have to call this as SSL, while trying to connect, i am getting error like "Argument exception unhandled" The provided URI scheme is "https" is invalid, expected "http" parameter name "via".
This is the error i am getting.
I need to do any webconfig tweaks...?
Appreciated your help!!!
Thanks
Prabakar.
|
|
|
|
|
On the security tag try setting mode="transport
<security mode="Transport">
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
Hi,
I have received a free template from an affiliate marketing program and they have asked me to insert my own text into the template before uploading it.
I have no knowledge of programming and any advice will be much appreciated.
This is a php file below from the template, the php file is called "index" and I
would like to know please where do I insert my own text in this file?.....
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>YOUR TITLE HERE</title>
<meta name="description" content="YOUR DESCRIPTION HERE"/>
<meta name="keywords" content="YOUR KEYWORDS HERE"/>
<script id="pap_x2s6df8d" type="text/javascript" src="scripts/track.php"></script>
</head>
<body>
| Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | | | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
| |
| |
|
</body>
</html>
|
|
|
|
|
1. Replace all the YOUR ... HERE with meaningful text
2. Replace all the Lorem Ipsum paragraphs with true content
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Hi Madaxe1,
This file is called index page and text writen in
and
is the place where you are suppose to add your text which will be displayed to user just put your content there.
If you want to format your text I will suggest you use http://www.quackit.com/html/online-html-editor/[^]
this will help you to format your text and do not forget to put a title, short description and some key words in place of
YOUR TITLE HERE,YOUR DESCRIPTION HERE and YOUR KEYWORDS HERE.
Thats all done!! have fun
|
|
|
|
|
Lets say that I want to develop a website where all pages will be dynamically generated and 'printed' into static HTML files. I will then serve these HTML files from a container (such as an Amazon EC2 instance) that has no server side languages or database running in the background.
I will make a script to have the HTML files automatically refreshed at a set period.
My reasons for doing this would be to decouple the link between traffic to my website and server load (in other words, so my website can scale without any need for additional CPU / RAM on the server).
Here are some benefits that i expect from doing it this way
I want a cheap way to host a high traffic website that can accommodate large spikes in traffic (from viral content)
I want it to load as fast as possible -- without any delay from generating content dynamically for each visitor.
My Questions are as follows:
What are the downsides of structuring a website this way?
Is this flat out a bad idea?
What is this type of architecture called?
My Background
I have made a few simple web apps using PHP / mySQL and am familiar with javascript, hmtl, css--- basically a new / amateur web developer.
Thanks for the input!
|
|
|
|
|
Hi,
I don't see any downside of it. I usually do it for many of my small CMS website (< 50-60 pages).
But you need to check from the hosting provider that how much memory/caching you are allowed to use.
For a huge/biger website, you wish to choose to cache only frequently used pages. There are many caching softwares which handles it itself.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
In a vB.NET 2010 web form application, I am changing an existing web page. I want the user to be able to select various customers
based upon if the first name, last name, or middle names are selected. The idea is for the user to select one, two, and/or three
of the parameters and hit the search key.
The problem is the results only return data based upon only one parameter. If data for more than one paramter is selected, the selection
criteria is ignored.
When I run the sql in sql server management studio, I get the results I want.
Thus can you tell me what I can do to solve the problem?
The code that is having the error is listed below;
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Support.aspx.vb" Inherits="letters_Support" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MPHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MPContent" Runat="Server">
<asp:Panel runat="server" ID="pnlSupport">
<h3 style="text-align: center; border-style:none; ">Support Page</h3>
<table style="width: 100%;">
<tr>
<td>
Last Name:
</td>
<td>
<asp:TextBox ID="lname" runat="server"></asp:TextBox>
</td>
<td>
First Name:
</td>
<td>
<asp:TextBox ID="fname" runat="server"></asp:TextBox>
</td>
<td>
Middle Name:
</td>
<td>
<asp:TextBox ID="mname" runat="server"></asp:TextBox>
</td>
<td>
Search by Name:
</td>
<td>
<asp:Button ID="btnSearch" runat="server" Text="Search" />
</td>
</tr>
</table>
<br />
<asp:GridView ID="GridViewSupport" runat="server" AutoGenerateColumns="False"
PageSize="25"
GridLines="Both"
EnableSortinAndPagingCallbacks="true"
HeaderStyle-CssClass="ui-widget-header"
PagerStyle-CssClass="ui-widget ui-widget-content"
Width="100%"
EmptyDataText="No records were selected."
DataSourceID="sqlTEST" AllowPaging="True" AllowSorting="True" >
<Columns>
<asp:BoundField DataField="lastName" HeaderText="Last Name" SortExpression="lastName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
<asp:BoundField DataField="firstName" HeaderText="First Name" SortExpression="firstName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
<asp:BoundField DataField="middleName" HeaderText="Middle Name" SortExpression="middleName" ItemStyle-HorizontalAlign="Center" ItemStyle-CssClass="ui-widget-content" ControlStyle-CssClass="text required ui-widget-content ui-corner-all"/>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="sqlTEST" runat="server"
ConnectionString="<%$ ConnectionStrings:sqlTEST %>" SelectCommand="SELECT [lastName]
,[firstName]
,[middleName]
,[suffix]
,a.[userid]
from [TEST].[dbo].[Identity]
where ([lastName] like '%' + @lname + '%' and
[firstName] like'%' + @fname + '%' and
[middleName] like'%' + @mname + '%')
or ([lastName] like '%' + @lname + '%' and
[firstName] like'%' + @fname + '%' and
@mname is null)
or ([lastName] like '%' + @lname + '%' and
[middleName] like'%' + @mname + '%' and
@fname is null)
or ([firstName] like '%' + @fname + '%' and
[middleName] like'%' + @mname + '%' and
@lname is null)
or ([lastName] like '%' + @lname + '%' and
@fname is null and
@mname is null)
or (@lname is null and
[firstName] like'%' + @fname + '%' and
@mname is null)
or (@lname is null and
@fname is null and
[middleName] like'%' + @mname + '%')
or (@fname is null and @lname is null and @mname is null)
order by [lastName], [firstName], [middleName]"
CancelSelectOnNullParameter="false" >
<SelectParameters>
<asp:ControlParameter ControlID="lname" Name="lname" PropertyName="Text" ConvertEmptyStringToNull="true" />
<asp:ControlParameter ControlID="fname" Name="fname" PropertyName="Text" ConvertEmptyStringToNull="true" />
<asp:ControlParameter ControlID="mname" Name="mname" PropertyName="Text" ConvertEmptyStringToNull="true" />
</SelectParameters>
</asp:SqlDataSource>
</asp:Panel>
</asp:Content>
|
|
|
|
|
Try simplifying your WHERE clause to:
where ([lastName] like '%' + @lname + '%' Or @lname Is Null)
And ([firstName] like '%' + @fname + '%' Or @fname Is Null)
And ([middleName] like '%' + @mname + '%' Or @mname Is Null)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello i made a module where i parse a bunch of names from the DB and i print em in a dropdownlist in the backend. Then i select some names and that names will be posted in the frontend.
I wanted to add an extra element (textbox) where it will print the count of the names i selected.
I wrote the code but i get a NULL value text box and no errors at consol.log . As the script is running at jsfiddle i suspect i have an error at including the library.
Im searching 2 days now with no luck.Could a joomla developer guru enlight me on what im doing wrong ?
my jquery script
jQuery(document).ready(function($){
var count =$("#jform_params_foreignmanuf :selected").length;
$("#jform_params_manucounter").val(count);
});
Multiselect Dropdown list:
{
protected $type = 'Manulist';
protected function getOptions()
{
$db= JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from('#__virtuemart_manufacturers_en_gb');
$db->setQuery($query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->virtuemart_manufacturer_id , $item->mf_name,$item->slug);
}
}
$options = array_merge(parent::getOptions(), $options);
JHtml::_('script', JUri::root() . 'modules/mod_manufacturers/js/js.js');
}
}
Textbox Counter code:
<?php
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('Text');
class JFormFieldManulist extends JFormFieldText
{
protected $type = 'Countermanu';
protected function getOptions()
{
$doc = JDocument::getDocument();
$js = '
jQuery(document).ready(function($){
var count = $("#jform_params_foreignmanuf :selected").length;
$("#jform_params_manucounter").val(count);
});
';
$doc->addScriptDeclaration($js);
JHtml::_('script', JUri::root() . 'modules/mod_manufacturers/js/js.js');
}
}
|
|
|
|
|
Hi, suppose I have a Div on a page and inside of this Div I have a Span, a List, and another Div.
If the page is displayed in an Iframe and if none of the elements has an ID, how would I go about adding a temporary ID when they are clicked using jQuery?
Each time a new element is clicked if it doesn't have an ID it will be assigned the same temporary ID given to the element that was clicked last. So the ID has to be removed from the previous element and then given to the new element.
Obviously I have to first call the load method to load the Iframe then inside the load method I will get the contents of the Iframe and find the body element when the page is clicked. Thus far the code below is what I have inside the load method but I need help in finishing it.
$(this).contents().find("body").on('click', function (e) {
var ClickedElement = $(e.target);
}
Thanks in advance for your help.
modified 4-Dec-14 2:34am.
|
|
|
|
|
|