For smart Primates & ROBOTS (oh and ALIENS ).

Wednesday, January 11, 2017

$(...).flexslider is not a function jquery flexslider not working

Are you facing JavaScript flexslider error "$(...).flexslider is not a function" or jquery flexslider not working?


If jquery flexslider is not working or showing error in console ""$(...).flexslider is not a function". 


If you do not want to see this error "$(...).flexslider is not a function" then use one instance of jquery.js file and keep in mind do not use defer or async keyword in below 3 files:

1- jquery.js

2- jquery.flexslider-min.js

3- jquery.prettyPhoto.js --> *if you are also using this file.



Share:

Monday, January 09, 2017

add comment in shopify

How to add comment in shopify

Using comment and endcomment tag you can add any one line multiple lines comments in Shopify code. below is the example:

{% comment %}

This is the comment in shopify

and this will not execute by shopify server because this is comment.

{% endcomment %}


Share:

Saturday, January 07, 2017

Shopify cache issue

Shopify Cache issue

You wondering that while working with Shopify e-commerce site code; your changes are not immediately showing; even your way of change code is right and there are no any error in your code.

No worry and no problem, it is not your fault or not your code issue. this is the issues with Shopify CDN cache. Normally Shopify clear his CDN cache files with in 3 to 4 hours to 1 day; but in some time it could be extends up to 3-4 days also(according to Shopify files). so wait till 4 days. After 4 days you will see your changes.


Share:

Failed to parse the output of adb version

Failed to parse the output of adb version

If you are getting this below error message while compiling Android code:

"Failed to parse the output of 'adb version': standard output was: error output was:
ADB not responding. If you'd like to retry, then please manually kill "adb.exe" and click 'Restart'"


The solution of this error; it is the time to reinstall your Operating system and then install latest version of Android IDE.

Share:

Load mp4 file

How to load .mp4


below is few lines of code:

<video width="640" height="480" controls>
  <source src="4.mp4" type="video/mp4">
   Your browser does not support the video tag.
</video>




Share:

Another way to load JavaScript


Another way to load JavaScript

There are another way to load Javascript file in any page. use below code to load Js file.

<script type="text/javascript">
function dhtml5() {
var eh= document.createElement("script");
eh.src = "a1.js";
document.body.appendChild(eh);
}
setTimeout("dhtml5();",8000);
</script>


Share:

Thursday, September 29, 2016

How to activate gzip or deflate in Nginx Server

How to activate gzip or deflate in Nginx Server

If you have Nginx server and you deployed a site and seeing site is not producing data as gzip or deflate; it's means the gzip or deflate is not active in your nginx server. so how to activate it? 

The server configuration file name is nginx.conf and it's location is "etc\nginx\" folder.

You needed to put some configuration code, it is listed below:

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

After that configuration restart the server and check and still not working then add below lines too.

gzip_proxied any;
gzip_buffers 16 8k;
gzip_types    text/plain application/javascript application/x-javascript text/javascript text/xml text/css;

gzip_vary on;

*Note that It is not a typo, There is a space between 16 8k;










Share:

Monday, August 15, 2016

SQLSTATE 42S02 Base table or view not found 1146 Table doesn't exist

SQLSTATE[42S02]: Base table or view not found: 1146 Table doesn't exist

I have faced the very strange Mysql problem. I have the database name "DAVP" and having various tables. All the tables are existing with few of records.

Now I have queried to select some rows from one of table and surprise query showing error that the table "sark_rec" is not existing. It is wondering that the table "sark_rec" is existing!!. 

I spend lot of time in Google but did not found any solution related to this strange problem. 

So lastly I have solved it myself. I have just added database name just before table name with dot. see below solution sql query.


select *from DAVP.sark_rec;
Share:

Tuesday, June 28, 2016

Object must be of type String while sorting datagridview

Object must be of type String

You are working with DataGridView with  several columns. You want to make sort of one column name "marks". then you will simply use below one line of code:

dataGridView1.Sort(dataGridView1.Columns["marks"], ListSortDirection.Ascending); 


But you may get error message as below:

System.ArgumentException was unhandled
  Message="Object must be of type String."
  Source="mscorlib"
  StackTrace:
       at System.String.CompareTo(Object value)
       at System.Collections.Comparer.Compare(Object a, Object b)
       at 
       .......................................
       .......................................
       at System.Threading.ThreadHelper.ThreadStart()

  InnerException: 

Let me try to understand you why the error message "Object must be of type String." You are getting when sorting "marks".

Very first time You are getting data from database and storing in the your datagridview something like this, note that string marks:

string marks = ds.Tables[0].Rows[grid_sr_no]["marks"].ToString();
dataGridView1.Rows[i].Cells["marks"].Value = mark;


after some processing in the seconds time you are string marks as intereger like this:

int marks = Convert.ToInt32(ds1.Tables[0].Rows[0]["marks"].ToString());
dataGridView1.Rows[i].Cells["marks"].Value = marks;


Then after if you use sorting code as below:
dataGridView1.Sort(dataGridView1.Columns["marks"], ListSortDirection.Ascending); 

You will get error message:
System.ArgumentException was unhandled
 Message="Object must be of type String."


so, to overcome this problem only use similar datatype while storing in datagridview.
alternatively you can use below code:
dataGridView1.Rows[i].Cells["marks"].Value = marks.ToString();






Share:

Software caused connection abort Failed to retrieve directory listing in FileZilla

Software caused connection abort Failed to retrieve directory listing in FileZilla

FileZilla is a Good software for FTP and SFTP to upload and download files in web-server. sometime in a folder having lot of files for ex: >50000 at that time when you want to see those files simply you double click on that folder. but you surprised that you will get below message:

"Network error: Software caused connection abortError: Failed to retrieve directory listing"

to solve above problem you need to set something in your FilZilla. follow below steps:
1- Open FileZilla 
2- Click on Edit menu => Setting 
3- Choose "Connection" and then in right side put 9999 in the box of "Timeout in seconds".

Share:

Ads Inside Post

Powered by Blogger.

Archive