Rui Carneiro
is a 24 year-old software engineer that lives in OPorto, Portugal.
Profile
Summary
Experience
- Jul 2009 - PresentSoftware Engineer / Portugalmail SADeveloping and maintaining the current webmail client of Portugalmail.
- Mar 2009 - PresentIntern / Portugalmail SABuild a Dovecot[1] plugin to add document search capability when using Solr[2] as the indexing service. [1] http://www.dovecot.org/ [2] http://lucene.apache.org/solr/
- Sept 2008 - PresentTrainer / Núcleo Universitário IEEETrainer at "Linux and Networks Workshop"
Education
-
2004 - 2009Faculdade de Engenharia da Universidade do PortoMaster's degree in Computer Science
-
1999 - 2004Escola Secundária de Ermesinde
Additional Information
Posts
As T.J said, your markup is invalid. With the correct markup you can achieve this with only HTML and CSS.
Something like this:
HTML
<li id="231" class="main">
<label class="name">David</label>
<div class="hidden" id="231" >
<p>Some Msg!!<p>
</div>
</li>
CSS
div.hidden {
display: none;
}
li.main:hover div.hidden {
display: block;
}
Example: http://jsfiddle.net/MWbS4/
Did you already considered using a template engine for PHP?
Some years ago I used smarty on one of my projects but it should be a ton on template engines out there.
I was trying to use the Holo Light theme with dark action bars as recommended on android guidelines.
This is my themes.xml file:
<resources>
<style name="Theme.MyApp" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/Widget.MyApp.ActionBar</item>
</style>
<style name="Widget.MyApp.ActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">@android:drawable/dark_header</item>
<item name="android:titleTextStyle">@style/MyApp.ActionBar.TextAppearance</item>
</style>
<style name="MyApp.ActionBar.TextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@android:color/primary_text_dark</item>
</style>
</resources>
The result without using the search interface is the expected, but when I use the SearchView the background is from Holo.Light theme:
There is any way to change the SearchView default style on the ActionBar?
A negative margin or position: absolute will fix your problem.
I think you cannot achieve that without javascript.
The better I can get is this: http://jsfiddle.net/QeWz2/2/
I used display: inline-block and vertical-align: top to get that behaviour
Update
I think Columnizer is the jQuery plugin you are looking for.
I have no idea if it is possible to disable event bubbling is this case.
However in these cases I make a inverted event bubbling:
while(targ != null) {
if (targ.nodeName.toLowerCase() === 'button') {
alert(targ.nodeName.toLowerCase());
break;
}
targ = targ.parentElement;
}
Fiddle: http://jsfiddle.net/jVeMw/1/
Is not perfect for performance but since you are restricting the click event to the vidCommentBoard div it should not be a problem.
Just another option:
$('#myGallery0 img').slice(1)
I think changing the source code for "styling reasons" is a bad idea.
You can easily change the default CSS by changing the default skin (v2 skin I think) or by adding a custom skin to CKEditor.
Form (with firebug highlight hover the td):
Label column CSS:
width: auto;
padding: 0;
margin: 0;
The problem:
Why my left columns have that invisible "padding-right"? It's not possible to shrink columns to fit their content?
--EDIT--
The problem was the table itself. I defined table with "width: 100%". Removed that and the problem is gone.
I am not familiar with jquery tools, but if your z-index is not working you must need a !important tag or making it position:relative or position:absolute
From what I understand from your long post you just need to remove all select child's before starting to append the new option from the AJAX request.
Try something like this before your for loop:
$('#group').html('');
There is several ways to read a XML in Android. My first option is DocumentBuilder since do not create an API version restriction (is available since API Level 1).
An example from one of my projects:
public Document parseXML(InputSource source) {
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(false);
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
return db.parse(source);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
How do you read the file and access the document values after this, well, its pretty basic, just Google it.
I cannot tell you the reason but if you force the container div to have 100% width the behaviors of the two cases are identical.
#calendar {
display: table;
height:900px;
width: 100%;
}
Updated version: http://jsfiddle.net/DLjnH/1/
The problem is that, by default, Prototype library can’t access anything in the iframe.
There is some workarounds I found (e.g example) but no one provides full support for protytpe/iframes. Does anyone know a way to do that?
PS: not using iframes is not an option :)
In my current project I need to index all e-mails and their attachments from multiple mailboxes.
I will use Solr, but I don't know what is the best approach to build my index's structure. My first approach was:
<fields>
<field name="id" require="true"/>
<field name="uid" require="true"/>
//A lot of other fields
<dynamicField name="attachmentName_*" require="false">
<dynamicField name="attachmentBody_*" require="false">
</fields>
But now I am not really sure if it is the best structure. I don't think I can search for one term (e.g stackoverflow) and know where the term was (e.g. *attachmentBody_1* or *_2* or *_3* etc) with a single query.
Anyone have a better suggestion to my index's structure?
Why do you use width and height 100%? Those values are too buggy on IE. Use just the fixed values:
#ajax-overlay {
z-index:9999;
display:none;
position:fixed;
top:0;
left:0;
bottom: 0;
right: 0;
background:#000;
opacity:0.8;
}
With this code you will get the ajax-overlay div filling the screen no matter what happens on the rest of the page.
I think the answer is: No
You will need to use the URL hash. They were created just to do that.
In JavaScript, the fragment identifier of the current HTML or XHTML page can be accessed in the "hash" property location.hash — note that Javascript can be also used with other document types. With the rise of AJAX, some websites use fragment identifiers to emulate the back button behavior of browsers for page changes that do not require a reload, or to emulate subpages.
Still, I don't get it. What is your problem with hashes anyway?
-edit-
The question do not says it all. :)
It may run on Unix and it will be used for email searching (Dovecot, Postfix and maildir).
Lucene is not a problem, im just analyzing some alternatives.
This is not your answer, but you should take a look, really...
I want to be able to read the content of pdf files. I need to do that with C on Linux.
The closer i can get to this was here but I think Haru can only create pdf and is not able to read them (not 100% sure).
PS: I only need the plain text from pdf
You could "reset" your repository to any commit you want (e.g. 1 month ago).
Use git-reset for that:
git clone [remote_address_here] my_repo
cd my_repo
git reset --hard [ENTER HERE THE COMMIT HASH YOU WANT]
You could do this with javascript on client side:
HTML
<input type="text" id="username">
Javascript
var input = $('#username');
if (input.defaultValue != input.value) {
//Do stuff if different
} else {
//Do stuff if equal
}
The problem is when I try to set height: 20px to all rows this breaks the natural width: 100% from a block element. This bug only occurs on IE7 (tested on FF, Chrome and IE8).
HTML
<div id="container">
This must be adjusted to content
<div class="row">row 1</div>
<div class="row">row 2</div>
<div class="row">row 3</div>
<div class="row">row #</div>
</div>
CSS
#container {
border: 1px solid black;
position: absolute;
top: 10px;
left: 10px;
padding: 5px;
}
.row {
border: 1px solid blue;
margin-top: 2px;
height: 20px;
}
Demo
Notes
- I'm testing on IE8 with compatability mode for IE7
- Setting a fixed width to container and set
width: 100%for rows is not an option.
Can you create files on root?
Symbolic link
You could create a symbolink link on your root directory:
ln -s /folder/ index.php
Use background-image instead:
#itemA {background-image: url('images/btnA.png');}
#itemB {background-image: url('images/btnB.png');}
#itemC {background-image: url('images/btnC.png');}
#itemD {background-image: url('images/btnD.png');}
Or change your hover:
#itemA:hover, #itemB:hover, #itemC:hover, #itemD:hover {
background-position: 0 -51px;
}
The problem with your code is that #itemA is more specific than .menu a.menu:hover or any other combination you have on your tests. So even if you specify the hover effect the browser will ignore it unless you remove the background position that you use on background or make your hover clause more specific.
if (...) {
header('Location: http://www.example.com/');
exit 0;
}
Just make a proper if clause.
http://php.net/manual/en/function.header.php
PS: Ty Michael
You can try one of these:
Try this:
<a class="button" href="#" onclick="parent.history.back();return false;">
I'm trying to install Tomcat + Solr on my Ubuntu machine. I was using ubuntu repo:
http://packages.ubuntu.com/intrepid/web/solr-tomcat5.5
http://packages.ubuntu.com/intrepid/tomcat5.5
When i launch tomcat, solr do not work:
sudo service tomcat5.5 start
The webpanel do not find solr, and give me this error:
HTTP Status 404 - /solr/admin
Does anyone have any idea what this may be?
Thank you in advance
From my experience the main issues on prototype are these:
$$ selectors
Try to use $ selector with down or select instead.
observes
Don't use to many observes. If you want a click handler for more than one element use ids and a global document observe:
document.observe('click', this.clickHandler.bindAsEventListener(this));
clickHandler: function(e)
{
var elt = e.element();
while (Object.isElement(elt)) {
switch (elt.id) {
//do your stuff here
}
elt = elt.up(); //Bubbling
}
}
CSS selectors with unsupported features on IE
This code will work, but performance will decrease.
<input type="checkbox"/> //HTML
$$('[type=checkbox]') //Prototype
Using a class name will increase performance in this situation:
<input class="checkbox" type="checkbox"/> //HTML
$$('.checkbox') //Prototype
Search on DOM tree
Anything else that require DOM tree search.
Please consider to add some HTML as example or a jsfiddle with the iteration that you are trying to achieve
@CQM here is any kind of pattern on this behavior?
I know that answer @DidierGhys: Nothing
Which one worked? !imporant I guess.
Glad I could help at last :P
I don't get it, when you say "select multiple" its something like this? jsfiddle.net/57TYu
Which windows git client are you using (if any)?
Duplicated maybe? stackoverflow.com/questions/7073121/… and stackoverflow.com/questions/5799050/…
Nice reading (+1 for that). But I still don't see a problem on the hash use if we use it wisely.
Already answer here: stackoverflow.com/questions/2931953/…
@Steve true! +1
Create a demo with jsfiddle.net for example.
Funciona! It works! :)
Posts
Shared by Nuno SalvaterraIn Focus, a news photography blog on the official site of The Atlantic Magazine.
Fantastic 20-part WWII photo retrospective.
Duetos Improváveis
Submitted by: 100t
Posted at: 2011-10-26 10:02:05
See full post and comment: http://9gag.com/gag/417376
Submitted by: bennybb
Posted at: 2011-10-25 07:46:40
See full post and comment: http://9gag.com/gag/411012
O Capitão Nascimento de Tropa de Elite está em Portugal para chefiar uma operação secreta internacional para apanhar os políticos mentirosos e corruptos e não parece muito contente com Pedro Passos Coelho.
Submitted by: weed13
Posted at: 2011-10-26 09:30:24
See full post and comment: http://9gag.com/gag/417283
Shared by Mário
we like our shit as it is. don't pull a facebook on us, google folks! :(
The announcement that Nexus One users won’t be getting upgraded to Android 4.0 Ice Cream Sandwich led some to justifiably question Google’s support of their devices. I look at it a little differently: Nexus One owners are lucky. I’ve been researching the history of OS updates on Android phones and Nexus One users have fared much, much better than most Android buyers.
I went back and found every Android phone shipped in the United States1 up through the middle of last year. I then tracked down every update that was released for each device - be it a major OS upgrade or a minor support patch - as well as prices and release & discontinuation dates. I compared these dates & versions to the currently shipping version of Android at the time. The resulting picture isn’t pretty - well, not for Android users:
Other than the original G1 and MyTouch, virtually all of the millions of phones represented by this chart are still under contract today. If you thought that entitled you to some support, think again:
- 7 of the 18 Android phones never ran a current version of the OS.
- 12 of 18 only ran a current version of the OS for a matter of weeks or less.
- 10 of 18 were at least two major versions behind well within their two year contract period.
- 11 of 18 stopped getting any support updates less than a year after release.
- 13 of 18 stopped getting any support updates before they even stopped selling the device or very shortly thereafter.
- 15 of 18 don’t run Gingerbread, which shipped in December 2010.
- In a few weeks, when Ice Cream Sandwich comes out, every device on here will be another major version behind.
- At least 16 of 18 will almost certainly never get Ice Cream Sandwich.
Also worth noting that each bar in the chart starts from the first day of release - so it only gets worse for people who bought their phone late in its sales period.
Why Is This So Bad?
This may be stating the obvious but there are at least three major reasons.
Consumers Get Screwed
Ever since the iPhone turned every smartphone into a blank slate, the value of a phone is largely derived from the software it can run and how well the phone can run it. When you’re making a 2 year commitment to a device, it’d be nice to have some way to tell if the software was going to be remotely current in a year or, heck, even a month. Turns out that’s nearly impossible - here are two examples:
The Samsung Behold II on T-Mobile was the most expensive Android phone ever and Samsung promoted that it would get a major update to Eclair at least. But at launch the phone was already two major versions behind — and then Samsung decided not to do the update after all, and it fell three major OS versions behind. Every one ever sold is still under contract today.
The Motorola Devour on Verizon launched with a Megan Fox Super Bowl ad, while reviews said it was “built to last and it delivers on features.” As it turned out, the Devour shipped with an OS that was already outdated. Before the next Super Bowl came around, it was three major versions behind. Every one ever sold is still under contract until sometime next year.
Developers Are Constrained
Besides the obvious platform fragmentation problems, consider this comparison: iOS developers, like Instapaper’s Marco Arment, waited patiently until just this month to raise their apps’ minimum requirement to the 11 month old iOS 4.2.1. They can do so knowing that it’s been well over 3 years since anyone bought an iPhone that couldn’t run that OS. If developers apply that same standard to Android, it will be at least 2015 before they can start requiring 2010’s Gingerbread OS. That’s because every US carrier is still selling - even just now introducing2 - smartphones that will almost certainly never run Gingerbread and beyond. Further, those are phones still selling for actual upfront money - I’m not even counting the generally even more outdated & presumably much more popular free phones.
It seems this is one area the Android/Windows comparison holds up: most app developers will end up targeting an ancient version of the OS in order to maximize market reach.
Security Risks Loom
In the chart, the dashed line in the middle of each bar indicates how long that phone was getting any kind of support updates - not just major OS upgrades. The significant majority of models have received very limited support after sales were discontinued. If a security or privacy problem popped up in old versions of Android or its associated apps (i.e. the browser), it’s hard to imagine that all of these no-longer-supported phones would be updated. This is only less likely as the number of phones that manufacturers would have to go back and deal with increases: Motorola, Samsung, and HTC all have at least 20 models each in the field already, each with a range of carriers that seemingly have to be dealt with individually.
Why Don’t Android Phones Get Updated?
That’s a very good question. Obviously a big part of the problem is that Android has to go from Google to the phone manufacturers to the carriers to the devices, whereas iOS just goes from Apple directly to devices. The hacker community (e.g. CyanogenMod, et cetera) has frequently managed to get these phones to run the newer operating systems, so it isn’t a hardware issue.
It appears to be a widely held viewpoint3 that there’s no incentive for smartphone manufacturers to update the OS: because manufacturers don’t make any money after the hardware sale, they want you to buy another phone as soon as possible. If that’s really the case, the phone manufacturers are spectacularly dumb: ignoring the 2 year contract cycle & abandoning your users isn’t going to engender much loyalty when they do buy a new phone. Further, it’s been fairly well established that Apple also really only makes money from hardware sales, and yet their long term update support is excellent (see chart).
In other words, Apple’s way of getting you to buy a new phone is to make you really happy with your current one, whereas apparently Android phone makers think they can get you to buy a new phone by making you really unhappy with your current one. Then again, all of this may be ascribing motives and intent where none exist - it’s entirely possible that the root cause of the problem is just flat-out bad management (and/or the aforementioned spectacular dumbness).
A Price Observation
All of the even slightly cheaper phones are much worse than the iPhone when it comes to OS support, but it’s interesting to note that most of the phones on this list were actually not cheaper than the iPhone when they were released. Unlike the iPhone however, the “full-priced” phones are frequently discounted in subsequent months. So the “low cost” phones that fueled Android’s generally accepted price advantage in this period were basically either (a) cheaper from the outset, and ergo likely outdated & terribly supported or (b) purchased later in the phone’s lifecycle, and ergo likely outdated & terribly supported.
Also, at any price point you’d better love your rebates. If you’re financially constrained enough to be driven by upfront price, you can’t be that excited about plunking down another $100 cash and waiting weeks or more to get it back. And sometimes all you’re getting back is a “$100 Promotion Card” for your chosen provider. Needless to say, the iPhone has never had a rebate.
Along similar lines, a very small but perhaps telling point: the price of every single Android phone I looked at ended with 99 cents - something Apple has never done (the iPhone is $199, not $199.99). It’s almost like a warning sign: you’re buying a platform that will nickel-and-dime you with ads and undeletable bloatware, and it starts with those 99 cents. And that damn rebate form they’re hoping you don’t send in.
Notes on the chart and data
Why stop at June 2010?
I’m not going to. I do think that having 15 months or so of history gives a good perspective on how a phone has been treated, but it’s also just a labor issue - it takes a while to dredge through the various sites to determine the history of each device. I plan to continue on and might also try to publish the underlying table with references. I also acknowledge that it’s possible I’ve missed something along the way.
Android Release Dates
For the major Android version release dates, I used the date at which it was actually available on a normal phone you could get via normal means. I did not use the earlier SDK release date, nor the date at which ROMs, hacks, source, et cetera were available.
Outside the US
Finally, it’s worth noting that people outside the US have often had it even worse. For example, the Nexus One didn’t go on sale in Europe until 5 months after the US, the Droid/Milestone FroYo update happened over 7 months later there, and the Cliq never got updated at all outside of the US.
Thanks primarily to CNET & Wikipedia for the list of phones.↩
Yes, AT&T committed to Gingerbread updates for its 2011 Android phones, but only those that had already been released at the time of the July 25 press release. The Impulse doesn’t meet that criterion. Nor does the Sharp FX Plus.↩
A couple of samples just from the past week: 1, 2 - in comments.↩
Shared by Rui
Suicidal Bunnies, melhores commics de sempre :D
Submitted by: furkey
Posted at: 2011-10-23 14:49:15
See full post and comment: http://9gag.com/gag/401337
Shared by Rui
True story :)
Barcelona… looks like simcity ;)
O Grande Mestre e mentor de Passos Coelho, Ângelo Darth Sidious Correia, já veio dizer que se solidariza com os cidadãos que vão ficar sem subsídios de férias e de Natal (sinto-me tocado por tal gesto altruísta), mas que se recusa a prescindir da subvenção vitalícia, porque é um "direito adquirido". Impressionado - e comovido - por tal repentino assomo de esquerdismo, fui procurar confirmação ao blogue mais bem informado do momento e claro, descobri um texto muito interessante, por sinal publicado no órgão oficial dos seus novos compagnons de route, o Avante, no qual Ângelo Correia afirma que, cito e abro aspas, "os direitos adquiridos são uma burla". Portanto, Sidious Correia revela ao mundo que se prepara para burlar o Estado português, ao não abdicar do seu "direito adquirido". Será que a PJ costuma ler jornais e ouvir rádio? O anúncio de um crime não é assim uma coisa tão comum. Aproveitem!
Beaming a video with a single tap or unlocking a device with only a smile sounds like science fiction. Now, you can actually do these things (and more) with a phone that fits in the palm of your hand.
Wednesday morning in Hong Kong—together with Samsung—we unveiled Galaxy Nexus, the first phone designed for the latest release of Android 4.0, also known as Ice Cream Sandwich.
With a super slim profile, Galaxy Nexus features a 4.65” Contour Display with true high definition (720p) resolution and a lightning-fast dual core 1.2ghz processor combined with 4G LTE or HSPA+ technology. Galaxy Nexus also features the latest in software: Ice Cream Sandwich makes Android simple and beautiful, and takes the smartphone to beyond smart.
Beauty and simplicity
With Ice Cream Sandwich, our mission was to build a mobile OS that works on both phones and tablets, and to make the power of Android enticing and intuitive. We created a new font that’s optimized for HD displays and eliminated all hardware buttons in favor of adaptable software buttons. We also dramatically improved the keyboard, made notifications more interactive and created resizable widgets.
The desktop-class browser is significantly faster, featuring a refined tab manager and the ability to sync your bookmarks with Google Chrome. Ice Cream Sandwich also features the best mobile Gmail experience to date, with a new design that lets you quickly swipe through your inbox and search messages even when you’re offline. Calendar boasts a clean new look and you can zoom into your schedule with a pinch.
Connect and share
People are at the heart of Ice Cream Sandwich. We rethought how you browse your contacts with the new People app, which combines high-resolution photos and updates from Google+ and other social services. It’s also easier to capture and share your life with family and friends. Galaxy Nexus sports a high-end camera with zero shutter lag, automatic focus, top notch low-light performance and a simple way to capture panoramic pictures. Shoot amazing photos or 1080p video, and then edit and share them directly from your phone.
Beyond smart
Galaxy Nexus isn’t just a smartphone—it’s beyond smart. Ice Cream Sandwich gives you complete control over the amount of mobile data you use by helping you better understand and manage it. We’re also introducing Android Beam, which uses near field communication (NFC) to instantly share webpages, YouTube videos, maps, directions and apps by simply tapping two phones together. Face Unlock uses state-of-the-art facial recognition technology to unlock your phone with nothing more than a smile.
This weekend marks the third birthday of the G1, the first-ever Android phone. Nine releases later, more than 550,000 Android devices are activated daily.
Starting in November, Galaxy Nexus will be available in the United States, Canada, Europe and Asia. Check out the Nexus website for a product tour and more info.
Posted by Andy Rubin, Senior Vice President, Mobile
Recent tracks
-
Shimmy by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}44 minutes ago
-
Science by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}46 minutes ago
-
ATWA by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}49 minutes ago
-
Forest by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}53 minutes ago
-
Bounce by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}55 minutes ago
-
Chop Suey! by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}59 minutes ago
-
X by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}61 minutes ago
-
Jet Pilot by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}63 minutes ago
-
Deer Dance by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}66 minutes ago
-
Needles by {u'mbid': u'cc0b7089-c08d-4c10-b6b0-873582c17fd6', u'#text': u'System of a Down'}69 minutes ago
Top artists
Updates
-
Assim não tem tanta piada :\3 weeks ago
-
Boa Sergio Ramos, muito boa...4 weeks ago
-
A melhor equipa do mundo não vai ganhar nada este ano... curioso...4 weeks ago
-
Diable 3 Beta, Downloading...4 weeks ago
-
Mesmo não podendo estar na FNAC, estou a ouvir Anaquim ao vivo pelo telemóvel! Viva as chamadas de borla :D7 weeks ago
-
Quatro equipas entram em campo para disputar os quartos-finais da Liga dos Campeões: SLB, R.Madrid, APOEL e Chelsea. Apenas uma delas não tem qualquer português na equipa durante o jogo, conseguem adivinhar qual delas é?8 weeks ago
-
SPOOORRTEEMMM!!!!!2 months ago
-
Não tem que saber, 3 jogos, 3 lances iguais: Livre de James, golo de Maicon2 months ago
-
Dexter: Oh God5 months ago