Categories
General

image

momomomo

Categories
General

How To Stop Windows 8 Updates From Force Restarting Your PC

1: Launch the Local Group Policy Editor by entering gpedit.msc in the Run dialog box.

2:  navigate to:

Computer Configuration\Administrative Templates\Windows Components\Windows Update

3 in No auto-restart with logged on users for scheduled automatic updates installations

 check enabled  

restart  done

Categories
General

why i choose one big table for the same sets of data

– Seek time with proper index, should be exactly the same, no matter how wide”table is.
Apart from performance issues,
this will simplify design and relations with other tables (foreign keys etc).
– code little

Assuming that table B is exact copy of table A, and that all necessary indexes are created, self-join of table A should be a bit faster than join of B with A simply because data from table A and its indexes can be reused from cache in order to perform self-join (this may also implicitly give more memory for self-join, and more rows will fit into working buffers).

If table B is not the same, then it is impossible to compare.

– one more thing wordpress , drupal and joomla uses the same way

Categories
General

db mysql youtube speed performance

Paul Tuckfield of YouTube is giving a keynote. He has been sysadmin for 25 years, Oracle DBA for 15 years and MySQL DBA for 8 months.

For them, MySQL is one (important) piece of scalability. Top reasons for YouTube Scalability includes drinking :).

Top reasons for YouTUbe database scalability include Python, Memcache and MySQL replication. WHat you can do with Python, you can’t do with other scripting languages. The fastest query on the database is that is never sent to the database.

They were doing click tracking on separate MyISAM whereas the read/write was being done on InnoDB. Everything was being written to one master and then being replicated to slaves. There were far fewer writes than reads. Every time replication slows down, you are screwed. Keeping replication going fast was hard.

They had a lot of replicas. One of the things that worked was separating pages for replicas. If you let entire pages built from a replica then there is cache affinity. The most important page is the watch page on YouTube. Most people coming to watch the video and if one thing they could make fast, it was that.

Standardizing on db boxes (they still crash daily)
4x2GHz Opteron core
16GRAM
12x10Krpm scsi
LSI hardware raid 10

Not fun to see corrupt in logs. InnoDB doesn’t recover very fast. When it crashed they had so much in cache that it would take hours to recover. Master for them was a SPOF. How many backups can you restore in 8-10 hours? When you went to switch replicas there are a lot of questions to answer. Did you test the backup? No body does. Are the binlog coordinates correct? They had to promote replicas to master.

Database Failures:
Replication was key to trying different hardware permutations. They got good at re-parenting;/promoting replicas really fast. They they built up ways to clone databases as fast as possible (shutdown and sync) which would make site run again.

Lessons: Go replication. It is an excellent way to test tuning changes or fixes. You can create pools for QOS and cache affinity. You can get good at creating/recreating replicas fast. Get good at re-parenting replicas. Keep intentional lag / stemcell replicas. It stops SQL thread to keep it hours behind. Four kids is when people start saying “You got four kids?”

Trying out 5.0 “mystery cache hits”
They introduced a 5.0 slave for 4.1 master. One of the 5.0 slave was going really fast and other replicas were lacking. they were surprised. If you dump and load in 5.0, you will get more performance than just upgrading because of the compact low format in 5.0. So don’t just upgrade but be sure to dump and load again for 5.0.

Top Heavy:
2×1.5GHz CPU
512M RAM
2x300G disk

Dream upgrade: (Put as much as memory as possible and put as many spindles as possible. Doesn’t matter how fast. The number is really important.
4x4GHz cpu
16G Ram
10x10kRPM disk

If your db fits in ram, that’s great otherwise here is what he says:
cache is king
writes should be cache by raid controller (buffered really) not the OS
only the db should cache reads (not raid and not even linux buffer cache).

Filesystem shouldn’t cache reads, only db should cache it. Hit in db cache means lower caches went unused. Miss in db cache can only miss in other caches since they’re smaller. Keep FS cache smaller than DB cache. RAID cache is even smaller. DB Cache is more useful. Read caching is pointless. Caching reads is worse than useless: they often serialize behind writes. Do not cache reads in the RAID controller.

Write engages 2 spindles (mirrors).

Don’t cache in linux
–innodb_flush_method=O_DIRECT
vm.swappiness = 1-5

Cache in InnoDB

He is concerned about mystery serialization.

Writes are parallel to master but serialized to replicas. They need true horizontal scaling. Starting to run out of bandwidth on master. They want true independent master each with their own set of replicas. How is it going to work? How do you move users from masters? You may screwed up and corrupt it.

EMD = Extreme Makeover: Database (Even more databases :)) codename for horizontal scaling

Slave exacts must serialize to preserve commit order.

oracle (lower case) caching algorithm to predict the future. Manually caching tables by doing selects. Fetch blocks into cache for changes. Replication get great cache hits by using mysqlbinlog + python (it got 3-4 times faster).

“The Diamond”: For golive, play shards binlogs back to original master for fallback.

Some questions I have been wanting to ask Paul:
How many total database servers?
How many Memcache servers?
Read-ahead script for replication?
How many concurrent threads?

Categories
General

ZF2 events

Module Manager

Zend\Module\Manager: loadModules.pre
For every module:
Zend\Module\Manager: loadModule.resolve
Zend\Module\Manager: loadModule
Zend\Module\Manager: loadModules.post
Application

Successful:

Zend\Mvc\Application: bootstrap
Zend\Mvc\Application: route
Zend\Mvc\Application: dispatch
Zend\Mvc\Controller\ActionController: dispatch (if controller extends this class)
Zend\Mvc\Application: render
Zend\View\View: renderer
Zend\View\View: response
Zend\Mvc\Application: finish
On an error in route or dispatch:

Zend\Mvc\Application: dispatch.error
Zend\Mvc\Application: render
Zend\View\View: renderer
Zend\View\View: response
Zend\Mvc\Application: finish
Note that routing and dispatching is also implemented using these registered events, so you can implement “pre” and “post” hooks by changing the priority of the listener that you register.

Categories
General

Free Fast Public DNS Servers List

This is my list of better, fast public dns servers and free dns server (as compare to your ISP / DSL / ADSL / cable DNS service providers dns servers). These dns servers are free to all. I was able to improve my browsing speed with following DNS servers. Use any one of the following provider.

Free Public DNS Server

=> Service provider: Google
Google public dns server IP address:

8.8.8.8
8.8.4.4
=> Service provider:Dnsadvantage
Dnsadvantage free dns server list:

156.154.70.1
156.154.71.1
=> Service provider:OpenDNS
OpenDNS free dns server list / IP address:

208.67.222.222
208.67.220.220
=> Service provider:Norton
Norton free dns server list / IP address:

198.153.192.1
198.153.194.1
=> Service provider: GTEI DNS (now Verizon)
Public Name server IP address:

4.2.2.1
4.2.2.2
4.2.2.3
4.2.2.4
4.2.2.5
4.2.2.6
=> Service provider: ScrubIt
Public dns server address:

67.138.54.100
207.225.209.66

Categories
General

Make your life better in 30 steps

Make your life better in 30 steps

Don’t compare your life to others’. You have no idea what their journey is all about.
Don’t have negative thoughts of things you cannot control. Instead invest your energy in the positive present moment
Don’t overdo; keep your limits
Don’t take yourself so seriously; no one else does
Don’t waste your precious energy on gossip
Dream more while you are awake
Envy is a waste of time. You already have all you need.
Forget issues of the past. Don’t remind your partner of his/her mistakes of the past. That will ruin your present happiness.
Life is too short to waste time hating anyone. Don’t hate others.
Make peace with your past so it won’t spoil the present.
No one is in charge of your happiness except you.
Realize that life is a school and you are here to learn.
Problems are simply part of the curriculum that appear and fade away like algebra class but the lessons you learn will last a lifetime.
Smile and laugh more
You don’t have to win every argument. Agree to disagree.
Community:

Call your family often
Each day give something good to others
Forgive everyone for everything
Spend time with people over the age of 70 & under the age of 6
Try to make at least three people smile each day
What other people think of you is none of your business
Your job will not take care of you when you are sick. Your family and friends will. Stay in touch.
Life:

Put GOD first in anything and everything that you think, say and do.
GOD heals everything
Do the right things
However good or bad a situation is, it will change
No matter how you feel, get up, dress up and show up
The best is yet to come
Get rid of anything that isn’t useful, beautiful or joyful
When you awake alive in the morning, thank GOD for it

Categories
General

HTTP Request GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE Methods

An HTTP request is a class consisting of HTTP style requests, request lines, request methods, request URL, header fields, and body content. The most common methods that are used by a client in an HTTP request are as follows:-

1) GET:- Used when the client is requesting a resource on the Web server.

2) HEAD:- Used when the client is requesting some information about a resource but not requesting the resource itself.

3) POST:- Used when the client is sending information or data to the server—for example, filling out an online form (i.e. Sends a large amount of complex data to the Web Server).

4) PUT:- Used when the client is sending a replacement document or uploading a new document to the Web server under the request URL.

5) DELETE:- Used when the client is trying to delete a document from the Web server, identified by the request URL.

6) TRACE:- Used when the client is asking the available proxies or intermediate servers changing the request to announce themselves.

7) OPTIONS:- Used when the client wants to determine other available methods to retrieve or process a document on the Web server.

8) CONNECT:- Used when the client wants to establish a transparent connection to a remote host, usually to facilitate SSL-encrypted communication (HTTPS) through an HTTP proxy.

The GET Request Method

The GET method is the simplest and the most frequently used request method. It is used to access the static resources, such as HTML documents and images. GET request can be used to retrieve dynamic information by including query parameters in the request URL. For instance, we can send a parameter name with the URL, such as http://www.domain.com?name=Harsh. In this example, Harsh is the dynamic information sent by including a parameter,name, in the request URL. The Web Server can then access this dynamic information through the “name” parameter.

The HEAD Request Method

According to Wikipedia “Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content.” It is used when the client is requesting some information about a resource but not requesting the resource itself. This means that we have a faster way of checking the headers and some server info for a given resource on the server i.e. checking if a given url is serviceable, a given file exists, etc..Sometimes client might only need to view the header of a response (Content-Type or Content-Length). The client can use the HEAD request method to retrieve the header in such cases. The HEAD method is similar to GET method, except that the server does not return a message body (actual page) in response of the HEAD method.

The POST Request Method

The Post method is commonly used for accessing dynamic resources or when a large amount of complex information is to be sent to the server. The Web Server accepts the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI( Uniform Resource Identifier). According to Wikipedia “Submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.” The major difference between GET and POST is that in GET the request parameters are transmitted as a query string appended to the request URL, while in POST the request parameters are transmitted within the body of the request.
The POST request method provides the following functionalities:-
1) Providing annotations of the existing resources.
2) Posting a message to a bulletin board, newsgroup, mailing list, or a similar group of articles.
3) Providing a block of data, such as the result of the submitting a form, to a data-handling process.
4) Extending a database through an append operation.

The PUT Request method

The PUT method stores an entity in the specified Request-URI. The entity is a resource residing on the Web server under the specified Request-URI. If the Request-URI does not point to an existing resource, but is capable of being defined as a new resource by the requesting user, the Web Server can create the resource with that URI. If an existing resource is modified, either the 200(OK) or 204 (No Content) response code should be sent to indicate successful modification of a resource. The Web Server must inform the user via the 201 (Created) responses if a new resource is created. If the resource is not created or modified with the Request-URI, an appropriate error response is generated, which reflects the nature of the problem.

The DELETE Request method

The DELETE method requests the Web server to delete the resource identified by the Request-URI. This method may be overridden by human intervention (or other means) on the Web Server. If the response includes an entity describing the status of deletion, the 200(OK) response code specifies that the resource has been deleted successfully. If the response is 202(Accepted), it specifies that the resource has not yet been deleted. Similarly, if the response code is 204 ( No Content), it specifies that the resource has been deleted but the response code does not include an entity.

The OPTIONS Request method

According to Wikipedia “Returns the HTTP methods that the server supports for specified URL. This can be used to check the functionality of a web server by requesting ‘*’ instead of a specific resource.”
The OPTION method requests for information about the communication options available on the request/response chain identified by a Request-URI. Responses to this method are not cacheable. This method allows the client to determine the options and /or requirements associated with a resource, or the capabilities of a server. If the OPTIONS method includes an entity body, the media type must be indicated by the content-type field.

The TRACE Request method

According to Wikipedia “Echoes back the received request, so that a client can see what (if any) changes or additions have been made by intermediate servers.”
The TRACE method is used to invoke a remote application layer associated with a request message. A TRACE request must not include an entity. A client uses the TRACE method to see the received input at the other end of the request chain and diagnostic or testing information.

Categories
General

طريقة مضمونة ومأمونة ومجربة…لزيادة الدخل ورفع مستوى المعيشي

طريقة مضمونة ومأمونة ومجربة…لزيادة الدخل ورفع مستوى المعيشي

بسم الله الرحمن الرحيم
ربما استغربتم من العنوان :

أنا هنا سأتكلم عن حقيقة مجربة ، وثابتة …

أن لن أتحدث بلغة الموظفين ذوي الدخل المحدود

بل بلغة رجال الأعمال ، ولغة تجار السوق العالمية للاستثمار …

ولكن من مدخل مختلف تماماً .. وأقوى من مدخل السوق العالمية ….

ربما ستدهشون من كلامي … ولكن التجربة خير برهان

طريقة سهلة تزيد من راتبك ودخلك … وتجعلك من أهل الثراء …

صاحب عمارات وفلل وأراضي وأملاك …

لا زلتم تنتظرون …

أتمنى أن تنشر في كل منتدى حتى تصل للجميع

ويخبرني كل واحد فيهم أنه سينقلها إلى 10 على الأقل …

أو سينقلها إلى منتديات أخرى لم أنزل فيها هذا الموضوع …

وللمعلومية كلما جمعت عدداً أكبر كلما زادت نسبتك أكثر !!!

نعم … هذه الطريقة … تجارة تسويق ….

كلما سوقت أكثر كلما ربحت أكثر … وهي شرعياً حلال مائة بالمائة إذا كانت ضمن شروطها …

وهي ممتعة وسهلة ومن بيتك …. وربما برأس مال قليل جداً ..

أرجو أخذ الموضوع بجدية …

وأطلب من كل واحد منكم أن يدعو لي بالتوفيق في هذه الفكرة المطروحة

أنتم تريدونه أليس كذلك ..

إليكم السر الذي وعدتكم به ..

السر الذي من خلاله تكسب الملايين والأراضي والأملاك

يا أخواتي السر ليس بالصعب

كلنا يعرفه …

وقد جربته وجربه غيري ..
وليس من باب التجريب على الله …

إنما ثقة بوعد الله …

فالله عزوجل حين يقول أمراً في القرآن … يكون وعداً منه سبحانه

(( إن الله لا يخلف الميعاد ))

أكيد أنكم تنتظرون بفارغ الصبر ذلك السر العجيب

السر هو في قوله تعالى :

(( فقلت استغفروا ربكم إنه كان غفاراً () يرسل السماء عليكم مدراراً () ويمددكم بأموال وبنين

ويجعل لكم جنات ويجعل لكم أنهاراً )) سورة نوح

إذا استغفرت الله فأنت قد علمت أن لك رباً يغفر الذنب ويأخذ بالذنب فخفت واستغفرت

وقد وعدك ووعده الحق ، ،،،

فقال : استغفروا ياعبادي ,, وسأغفر لكم

وباستغفاركم ، سأرسل السماء عليكم مدراراً حتى ترتووا وترتوي دوابكم

ومن يحب المال فسأمده بالمال وليس المال فقط ، من يحب البنين فسأمده كذلك بالبنين

وليس بالبنين فقط ، ومن يحب الأراضي والأملاك والمزارع والجنان ، والعقار

فكل ذلك مرتبط بالاستغفار …

أرأيتم أحبابنا كيف هي قيمة الاستغفار ؟؟

هل صدقتكم حين كتبت العنوان ؟؟

أم أني أبالغ !!

لم ننته بعد فهناك أمر أهم أيضاً !!

أتحب أن تسوق هذا الأمر وتأخذ على تسويقك أجر وأجره

إليكم تجربتي وهو السر الغريب :

لا أقول هذا السر في كل خطبة ، ومحاضرة ، ودورة ، ولقاء ، وسائل يسأل ، ومشتك من ضيق ذات اليد

إلا وأنتظر _ حقيقةً _ من الله الرزق … وإذا به لا يتأخر يوماً واحداً ….

نعم … جربت ذلك … ولا يجرب على الله … بل كنت واثقاً بالله … وفي نفس اليوم … يأتيني الرزق

يعني الأمر فيه تسويق – بلغة العصر – أي دعوة لأمر يحبه الله وهو الاستغفار …

حتى أن أحد أصدقائي أخبرني بأنه على زواج .. وأنه في بعض الأحيان يضيق عليه الأمر

فأخبرته بالخلطة السرية – سموها ما شئتم –

وبعد فترة من الزمن فاجأني بالنتيجة …

يقول : إيش الدواء اللي أعطيتني ياه ..؟؟

قلت : أي دواء ؟؟

قال : الاستغفار ؟؟؟

قلت : وكيف كان معك ؟ وأنا واثق من إجابته !!

قال : بصراحة مرة ضاقت علي وكنت محتاج لمبلغ من المال … تذكرت كلامك … وبدأت بالاستغفار

وفعلاً في نفس اليوم …. إذا بالمبلغ اللي أحتاجه وصلني من أحد الإخوة …

فقلت له : ممتاز .. إذا كانت ثقتك بالله إلى هذا الحد … فانشر تجربتك بين أحبابك وأصدقائك

وسترى بكل نشر خيراً ورزقاً حسناً

إذا يا إخوة الأمر سهل ..

انشره بالمنتديات ، بين الأصدقاء ، بين الأحباب … وسينظر له غير المسلمين بالدواء السحري للرزق الحلال

فربما يدخلون في الإسلام بسببه … فيرتفع قدرك عند الله …

وهناك أمر آخر متعلق أيضاً بالرزق :

(( ومن يتق الله يجعل له مخرجاً () يرزقه من حيث لا يحتسب ))

أيضاً اجتناب المعاصي من الأمور التي تجلب الرزق …

أيضاً بر الوالدين والإحسان إليهما ، وتذكرهما بلقمة العيش التي تأكلها ….

أيضاً حسن الظن بالله ، وبأنه هو الرزاق ذو القوة المتين …

وأن رزقك مكتوب في السماء لن يصل إلى أحد غيرك …. ولن تأخذ رزق غيرك ..

وهناك أمور كثيرة أيضاً لا يتسع المجال لذكرها

وأتمنى أن ينقل الموضوع في منتديات أخرى وقروبات أخرى ….

فقط قص و الصق الموضوع .. وطبق الاستغفار … وانتظر الرزق من الله ..

ثم تذكرني بدعوة بظهر الغيب …

وكل من يأتيه رزق من ورائه .. فليكتب تجربته … ليتشجع الآخرون ..

وليكن صادقاً في تجربته … حتى تؤتي ثمارها ..

لأن البعض ربما يستخدم الكذب للتشجيع على الخير فيقع في المحظور دون أن يدري .. فتنبهوا .

وإن شاء الله أنتم صادقون فيما تقولون..
والله يحفظ الجميع بحفظه.

Categories
General

What is the best way to generate a ‘fingerprint’ of user vistor unique ness in PHP?

easiest and best way: use phps session-management – every client is given an id, stored in a cookie (if enabled) or given as a get-variable on every link and form. (alternatively you could set a cookie on your own). but: this only “fingerprints” the browser – if the user changes his browser, deletes his cookies or whatever, you can’t identify it anymore.

identifying every client by ip is usually a bad idea and won’t work. clients that use the same router will have the same ip’s – clients connected through a proxy-pool could have another ip with every page load.

if you need a solution that can’t be manipulated by the client in an easy way, try to do a combination of the following, using all that are supported by the clients browser and compare them on each page-load:

“normal” HTTP Cookies
Local Shared Objects (Flash Cookies)
Storing cookies in RGB values of auto-generated, force-cached PNGs using HTML5 Canvas tag to read pixels (cookies) back out
Storing cookies in and reading out Web History
Storing cookies in HTTP ETags
Internet Explorer userData storage
HTML5 Session Storage
HTML5 Local Storage
HTML5 Global Storage
HTML5 Database Storage via SQLite
there’s an solution called evercookie that implements all of this
http://samy.pl/evercookie/