INSERT INTO sites(host) VALUES('hacksrus.net') 1045: Access denied for user 'www-data'@'localhost' (using password: NO) hacksrus.net Estimated Worth $473,418 - MYIP.NET Website Information
Welcome to MyIP.net!
 Set MYIP as homepage      

  
           

Web Page Information

Title:
Meta Description:
Meta Keywords:
sponsored links:
Links:
Images:
Age:
sponsored links:

Traffic and Estimation

Traffic:
Estimation:

Website Ranks

Alexa Rank:
Google Page Rank:
Sogou Rank:
Baidu Cache:

Search Engine Indexed

Search EngineIndexedLinks
 Google:
 Bing:
 Yahoo!:
 Baidu:
 Sogou:
 Youdao:
 Soso:

Server Data

Web Server:
IP address:    
Location:

Registry information

Registrant:
Email:
ICANN Registrar:
Created:
Updated:
Expires:
Status:
Name Server:
Whois Server:

Alexa Rank and trends

Traffic: Today One Week Avg. Three Mon. Avg.
Rank:
PV:
Unique IP:

More ranks in the world

Users from these countries/regions

Where people go on this site

Alexa Charts

Alexa Reach and Rank

Whois data

Who is hacksrus.net at net.whois-servers.net

Domain Name: HACKSRUS.NET

Registry Domain ID: 655652186_DOMAIN_NET-VRSN

Registrar WHOIS Server: whois.your-server.de

Registrar URL: http://www.hetzner.de

Updated Date: 2016-11-03T07:33:37Z

Creation Date: 2006-11-02T13:15:04Z

Registry Expiry Date: 2017-11-02T12:15:04Z

Registrar: Hetzner Online GmbH

Registrar IANA ID: 828

Registrar Abuse Contact Email: abuse

Registrar Abuse Contact Phone: +49 9831 5050

Domain Status: ok https://icann.org/epp#ok

Name Server: ns.second-ns.com

Name Server: ns1.your-server.de

Name Server: ns3.second-ns.de

DNSSEC: unsigned

URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/

>>> Last update of whois database: 2017-08-28T17:29:24Z <<<



For more information on Whois status codes, please visit https://icann.org/epp



NOTICE:
The expiration date displayed in this record is the date the

registrar's sponsorship of the domain name registration in the registry is

currently set to expire. This date does not necessarily reflect the expiration

date of the domain name registrant's agreement with the sponsoring

registrar. Users may consult the sponsoring registrar's Whois database to

view the registrar's reported date of expiration for this registration.



TERMS OF USE:
You are not authorized to access or query our Whois

database through the use of electronic processes that are high-volume and

automated except as reasonably necessary to register domain names or

modify existing registrations; the Data in VeriSign Global Registry

Services' ("VeriSign") Whois database is provided by VeriSign for

information purposes only, and to assist persons in obtaining information

about or related to a domain name registration record. VeriSign does not

guarantee its accuracy. By submitting a Whois query, you agree to abide

by the following terms of use: You agree that you may use this Data only

for lawful purposes and that under no circumstances will you use this Data

to:
(1) allow, enable, or otherwise support the transmission of mass

unsolicited, commercial advertising or solicitations via e-mail, telephone,

or facsimile; or (2) enable high volume, automated, electronic processes

that apply to VeriSign (or its computer systems). The compilation,

repackaging, dissemination or other use of this Data is expressly

prohibited without the prior written consent of VeriSign. You agree not to

use electronic processes that are automated and high-volume to access or

query the Whois database except as reasonably necessary to register

domain names or modify existing registrations. VeriSign reserves the right

to restrict your access to the Whois database in its sole discretion to ensure

operational stability. VeriSign may restrict or terminate your access to the

Whois database for failure to abide by these terms of use. VeriSign

reserves the right to modify these terms at any time.



The Registry database contains ONLY .COM, .NET, .EDU domains and

Registrars.

Front Page Thumbnail

sponsored links:

Front Page Loading Time

Keyword Hits (Biger,better)

Other TLDs of hacksrus

TLDs Created Expires Registered
.com
.net
.org
.cn
.com.cn
.asia
.mobi

Similar Websites

More...
Alexa鏍囬

Search Engine Spider Emulation

Title:Hacks 'R' us | Random thoughts on programming, travelling, and entrepreneurship
Description:
Keywords:
Body:
Hacks #039;R #039; us | Random thoughts on programming, travelling, and entrepreneurship
Hacks #039;R #039; us
Random thoughts on programming, travelling, and entrepreneurship
Menu
Skip to content
Home
A Solution To Swallowed Exceptions In ES6 #8217;s Promises
Leave a reply
You have probably heard about ES6 #8217;s built-in Promises and how they can provide a way out of JavaScript #8217;s callback hell.
While the intend and purpose for Promises is clear very quickly, getting used to them is not as straightforward and the devil lies in the detail.
One thing that bit us quite late during a recent refactoring and has caused a lot of frustration was the fact that Promises #8220;swallow #8221; exceptions by default.
This does include exceptions such as ReferenceError聽so that the following code runs perfectly fine, without ever letting you know that something went wrong:
span style="color: #000066; font-weight: bold;"varspan myPromise span style="color: #339933;"=span Promise.span style="color: #660066;"resolvespanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
myPromise
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 1 quot;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;span
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 2 quot;spanspan style="color: #339933;",span thisNameDoesNotExistspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
What happens here is that the implementation of Promise wraps our function (the onFulfillment handler as it is called in the language specification) in a try-catch block. Instead of throwing the error and causing our interpreter to crash (but print a convenient error message at least), it catches it and marks the promise p as rejected.
Those of you who have worked with Promises before will say that you need an onRejection handler function of course, and you are perfectly right:
span style="color: #000066; font-weight: bold;"varspan myPromise span style="color: #339933;"=span Promise.span style="color: #660066;"resolvespanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
myPromise
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 1 quot;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;span
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 2 quot;spanspan style="color: #339933;",span thisNameDoesNotExistspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #339933;",span span style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanespan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Promise rejected, error: quot;spanspan style="color: #339933;",span espan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
However, this still doesn #8217;t work. What is wrong here? In order to catch errors in the last actual onFulfillment handler in our chain, we need to add another step where nothing but the error catching happens. We could use another .then() with an empty function as its first argument, but a more elegant way is to use .catch() which takes only the onRejection handler for its arguments:
span style="color: #000066; font-weight: bold;"varspan myPromise span style="color: #339933;"=span Promise.span style="color: #660066;"resolvespanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
myPromise
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 1 quot;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;span
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 2 quot;spanspan style="color: #339933;",span thisNameDoesNotExistspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;span
.span style="color: #000066; font-weight: bold;"catchspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanespan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Promise rejected, error: quot;spanspan style="color: #339933;",span espan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
Much better, that will do. In theory. In reality though, it is very easy to forget to specify the .catch() handler at the end, have it in the wrong place etc.
Believe me, that will happen, no matter how careful you are. And if it #8217;s not you who forgets it, it will be some guy on your team.
For that reason, Bluebird, one of the most popular Promise聽libraries, has a #8220;default #8221; onRejection handler which will print all errors from rejected Promises聽to stderr. This is a huge improvement and while it can still result in unexpected behaviour because it doesn #8217;t interrupt execution, it at least gives a hint where things are dodgy.
While that is all well and good, we didn #8217;t feel like using a library, now that we finally got native support for Promises from io.js. And as it turns out, you don #8217;t have to. Because just as there is聽process.on( #8216;unhandledException #8217;, ..), since its 1.4.1 release, io.js also has聽the unhandledRejection event, which is very similar to Bluebird #8217;s default handler, except that you have to specify it yourself:
span style="color: #000066; font-weight: bold;"varspan myPromise span style="color: #339933;"=span Promise.span style="color: #660066;"resolvespanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
process.span style="color: #660066;"onspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;"'unhandledRejection'spanspan style="color: #339933;",span span style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanerrorspan style="color: #339933;",span promisespan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"errorspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;UNHANDLED REJECTION quot;spanspan style="color: #339933;",span error.span style="color: #660066;"stackspanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
myPromise
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 1 quot;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;span
.span style="color: #660066;"thenspanspan style="color: #009900;" #40;spanspan style="color: #000066; font-weight: bold;"functionspanspan style="color: #009900;" #40;spanspan style="color: #009900;" #41;span span style="color: #009900;" #123;span
console.span style="color: #660066;"logspanspan style="color: #009900;" #40;spanspan style="color: #3366CC;" quot;Step 2 quot;spanspan style="color: #339933;",span thisNameDoesNotExistspan style="color: #009900;" #41;spanspan style="color: #339933;";span
span style="color: #009900;" #125;spanspan style="color: #009900;" #41;spanspan style="color: #339933;";span
Do this once in your project and you will never have Promises swallow your exceptions again. Happy debugging!
This entry was posted in Programming on August 18, 2015 by Pascal Ehlert.
A Tale About Antique Protocols And Not-So-Smart NAT Routers
Leave a reply
Digital Signage Remote Control App
At the land-based branch of our company, we recently discovered the Popcorn Hour S-300, for what we thought could be a solid solution to run promotion videos in of our shops. It is Linux-based and has a very simple client that allows remote control and uploading of videos.
The protocol it uses is antique plain FTP which seemed like a horrible design decision in the first place. But after all, it is quite solid, known to work and this is not exactly an application where security matters, so we didn #8217;t care very much.
Continue reading rarr;
This entry was posted in Programming on February 25, 2013 by Pascal Ehlert.
Speed up CtrlP vim plugin and automatically clear it #8217;s cache using guard
Leave a reply
I just changed from the famous Command-T plugin to CtrlP.
Command-T provides a file navigator for vim, such as the modal that popped up in Textmate when you hit 鈱-t. While it worked well for a while, it relied on an external Ruby library, causing issues with rvm as outlined in my previous post. Then recently it refused to work with MacVim entirely, due to a rendering issue that made it unusable.
While I looked for a way to fix the issue, I stumbled upon CtrlP. CtrlP is a native vim replacement which not only makes it cleaner by design but also a bit faster (and most important for me, it actually worked with my setup).
One issue I never really got around however was the fact that a) building the cache took quite a while, causing quite a delay when you bring it up for the first time and b) the cache wasn #8217;t rebuilt automatically when you changed a file.
I couldn #8217;t really accept this and investigated a bit where it stored it #8217;s cache file. When I found it in $HOME/.cache/ctrlp/$ESCAPED_PROJECT_PATH.txt, I realized that it was full of entries like this:
tmp/cache/sass/9e16d302b803e71649858656bd7da287cac6ab9b/_alternating-rows-and-columns.scssc
tmp/cache/assets/D3B/DD0/sprockets%2Fba7a4ad6548c886b0d4054293aec5e07
As I will never need to open these anyway, I would very much prefer to skip them in the indexing process. CtrlP #8217;s README gave an excellent hint:
span style="color: #804040;"setspan span style="color: #668080;"wildignorespanspan style="color: #000000;"+span=span style="color: #000000;"*/spantmpspan style="color: #000000;"/*span,span style="color: #000000;"*.spanspan style="color: #668080;"sospan,span style="color: #000000;"*.spanswp,span style="color: #000000;"*.spanzipspan style="color: #adadad; font-style: italic;" quot; MacOSX/Linuxspan
span style="color: #804040;"setspan span style="color: #668080;"wildignorespanspan style="color: #000000;"+span=span style="color: #000000;"*span\\tmp\\span style="color: #000000;"*span,span style="color: #000000;"*.spanswp,span style="color: #000000;"*.spanzip,span style="color: #000000;"*.spanspan style="color: #804040;"exespanspan style="color: #adadad; font-style: italic;" quot; Windowsspan
Restarting vim and trying to bring up CtrlP immediately showed the effect. The startup time was reduced significantly.
This has only solved one of the issues, however. The reloading issue still existed.
Here is what I came up with to solve it, and it may not be the cleanest or best solution. Just for the record, there likely are better ways which involve using vim #8217;s #8211;remote-send option and others. All I was looking for was a quite and dirty solution and here it is:
I immediately thought of guard which I use to automatically run my tests when files change. In order to be able to execute a command only when a file has been added or removed, I cloned guard-shell to make guard-addremove.
To use it to clean your CtrlP cache, make sure that you add guard and guard-addremove to your project #8217;s Gemfile:
gem span style="color:#996600;"'guard'span
gem span style="color:#996600;"'guard-addremove'span
Now edit your Guardfile so that it has a statement like this in it:
guard span style="color:#996600;"'addremove'span span style="color:#9966CC; font-weight:bold;"dospan
span style="color:#008000; font-style:italic;"# Ignore Vim swap filesspan
ignore span style="color:#006600; font-weight:bold;"/span~$span style="color:#006600; font-weight:bold;"/span
ignore span style="color:#006600; font-weight:bold;"/span^span style="color:#006600; font-weight:bold;" #40;span?:.span style="color:#006600; font-weight:bold;"*spanspan style="color:#006600; font-weight:bold;" #91;span\\\span style="color:#006600; font-weight:bold;"/spanspan style="color:#006600; font-weight:bold;" #93;spanspan style="color:#006600; font-weight:bold;" #41;span?\.span style="color:#006600; font-weight:bold;" #91;span^\\\span style="color:#006600; font-weight:bold;"/spanspan style="color:#006600; font-weight:bold;" #93;spanspan style="color:#006600; font-weight:bold;"+span\.span style="color:#9900CC;"swspanspan style="color:#006600; font-weight:bold;" #91;spanpspan style="color:#006600; font-weight:bold;"-spanzspan style="color:#006600; font-weight:bold;" #93;span$span style="color:#006600; font-weight:bold;"/span
watchspan style="color:#006600; font-weight:bold;" #40;spanspan style="color:#006600; font-weight:bold;"/span.span style="color:#006600; font-weight:bold;"*/spanspan style="color:#006600; font-weight:bold;" #41;span span style="color:#006600; font-weight:bold;" #123;span span style="color:#996600;"`rm ~/.cache/ctrlp/%Users%pascal%Projects%example.txt amp;amp; amp;gt; /dev/null`span span style="color:#006600; font-weight:bold;" #125;span
span style="color:#9966CC; font-weight:bold;"endspan
You will have to take care to get the path to your cache file right. To do this run vim in your project #8217;s directory, open CtrlP and and check out the contents of $HOME/.cache/ctrlp in another window.
I am aware that this can be improved. Someone who is more experienced with vim than I am might also be able to adjust it so that it can be used with NERDTree and others. I would love to see your examples in the comments.
This entry was posted in Programming on October 27, 2012 by Pascal Ehlert.
Post navigation
larr; Older posts
About me
Xing Profile
LinkedIn Profile
pehlert on github
Recent Posts
A Solution To Swallowed Exceptions In ES6 #8217;s Promises
A Tale About Antique Protocols And Not-So-Smart NAT Routers
Speed up CtrlP vim plugin and automatically clear it #8217;s cache using guard
Using vim with the Ruby Version Manager
Capistrano with Rails 3 and bundler
Recent Projects on GitHubpehlert @ GitHubStatus updating...
Proudly powered by WordPress

Updated Time

Updating   
Friend links: ProxyFire    More...
Site Map 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 250 300 350 400 450 500 550 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750
TOS | Contact us
© 2009 MyIP.cn Dev by MYIP Elapsed:80.318ms