|
|
April 21 Yesterday I had an argument exception ("value does not fall within the expected range") within my code. I was submiting some data from a form to a SharePoint custom list when this happened. Debugging the application showed me that the exception was at the line with the expression item[field_name] = value.
I thought "how does this not fall into the expected range?! The field type is text and I'm using a string value for Christ sake!". After a short checking and reflection I thought "Well... maybe it's the name of the field..." and so I checked it. Nope! The name was alright. The column name was "Name" and it was alright!
So I went around and around trying to solve it: web, colleagues,... and suddenly something hit me (not literally). "Wait! I changed the name of the field! The original name is Title!". I changed the name in the item[field_name] and everything started working correctly.
I know this situation may be a lame one, but I think it can help someone with a similar problem. At least is another post about this issue. : )
All the best and good coding! I found in CodeProject this excellent article about the 'using' keyword in C#. Enjoy. April 16 Back again!
I just have read an article about coding best practices that I found really interesting and want to share with you. It is just the first part, but very interesting all the same. Click here to read it.
All the best October 29 The new version of VS Team System comes with some powerful goodies. Here are a few features: - individuals can create visual representations of existing code assets;
- code validation against a visual representation of the architecture;
- testers can follow a set of defined validation steps and create actionable bugs;
- identification of the tests that should be run to validate code changes.
To know more, just click here. August 12 O sistema «Portal do Executivo», implementado pela Câmara Municipal do Porto, deverá fazer poupar a esta edilidade 175 mil páginas de papel todos os anos. Ou seja, o equivalente ao abate de 11 árvores. Graças à solução encontrada para desmaterializar toda a documentação submetida à aprovação, discussão e votação em reuniões de câmara, esses gastos podem agora ser evitados e o trabalho ficou significativamente facilitado... ler maisJune 05 Sentido das Letras / Copyright 2008 - 6/4/2008 3:29 PM  Um estudo levado a cabo pela McAfee, intitulado “Mapping the Mal Web Revisited”, revelou que Hong Kong é o país com o domínio mais perigoso (.hk) e a Finlândia como o mais seguro. O domínio de Hong Kong (.hk) é considerado o local mais perigoso para navegar e pesquisar na Web, de acordo com um novo estudo da McAfee intitulado “Mapping the Mal Web Revisited”. O segundo estudo anual da McAfee sobre os locais na Web mais perigosos e mais seguros revelou que 19,2% de todos os websites que terminam no domínio (.hk) constituem uma ameaça de segurança para os cibernautas. A China (.cn) segue em segundo lugar no ranking com mais de 11%. No lado oposto, a Finlândia (.fi) substitui a Irlanda (.ie) como o domínio mais seguro com 0,05%, seguida do Japão (.jp). O domínio genérico mais perigoso no estudo de 2007 mantém-se em 2008, com 11,8% de todos os websites terminados em (.info) a constituírem uma ameaça de segurança, e a representarem o terceiro domínio mais perigoso em termos gerais, enquanto os websites governamentais (.gov) permanecem como o domínio genérico mais seguro. O domínio mais comum (.com) é o nono domínio mais perigoso em termos gerais. Utilizando a premiada tecnologia do McAfee® SiteAdvisor®, a McAfee analisou 9,9 milhões de websites fortemente visitados, provenientes de 265 domínios diferentes por país (por exemplo, websites terminados em (.pt) correspondentes a Portugal) e genéricos (por exemplo, websites terminados em (.net) ou (.info). May 12 É com orgulho que vejo o produto, nascido de muitos sacrifícios e preserverança de uma talentosa equipa, dar os merecidos frutos. O artigo no jornal Semana Informática é apenas mais uma prova disso. March 18 We were present at TechDays 2008, proud to present our solution for Town Hall Meetings on the Innovation Spotlight event. It facilitates the decision-making process, providing full support for the meeting agenda creation and delivery, as well as for all the attached documentation. Hugo Vicente, one of our cherished co-workers, did a great job presenting it! March 06 Have you ever questioned yourself how you could create a Sharepoint Solution Package and still don't know how to do it? Read this great article by Evgeny Tugarev.
Cheers  February 29 Hello everyone! Long time, no see... 
Last week, SkyDrive team has lauched the last version of their application and it brings some new features:
- we now have 5Gb of available storing space;
- it is available on 38 countries. Previously it was only available on Great Britain, India and U.S. (see this article last paragraph);
- bug fixes and improvements to make the site faster and more reliable.
SkyDrive works just as a remote hard drive (for all those who doesn't know it). You have private and public folders and you can do most of the known file operations, even those related to security (users management and permissions).
Of course, the wonderfull thing about it is that it is accessed from any location where a web connection is available. You should try it...
Countries where SkyDrive is available: Argentina, Australia, Austria, Belgium, Bolivia, Brazil, Canada, Chile, Colombia, Denmark, the Dominican Republic, Ecuador, El Salvador, Finland, France, Guatemala, Honduras, Italy, Japan, Mexico, the Netherlands, New Zealand, Nicaragua, Norway, Panama, Paraguay, Peru, Puerto Rico, Portugal, South Korea, Spain, Sweden, Switzerland, Taiwan, and Turkey. August 20 One of the not so known operator in C# is the ?? operator, but it's a very usefull one. If you're working with null values you'll want to work with this operator for sure...
Observe the following code block:
int? x = null; int y = x;
This will go BOOM with an exception at compile time, but if you do something like this:
int y = x ?? -1;
It'll accept the -1 in case x is null (and doesn't explode). Usefull isn't it? ; )
Check this for more...
May 09 If you're working with a VM and suddenly your mouse gets emprisoned by it just press the right Alt key (Alt Gr) and it'll see freedom :)
Cheers April 11 This piece of code is to all those who scratch their heads thinking about how to do some things in SQL... things that are done in a simple and intuitive way with high level languages. But don't despair! SQL is simple enough, including its syntax. All we have to do is go around some things that are more intuitive in other languages, but as a colleague of mine says: "We can do everything with SQL! All we have to do is to achieve a certain feeling about doing things with it"... and I agree : )
So will you : )
DECLARE @parametros varchar(150) DECLARE @separador char
SET @separador = ','
SELECT @parametros = COALESCE(@parametros + @separador, '') + CAST(parametro AS varchar(5)) FROM tParametros SELECT @parametros Here's a string to get the last day of a month:
SELECT DAY(DATEADD(d,
-DAY(DATEADD(m,1,GETDATE())),DATEADD(m,1,GETDATE())))
February 13 I banged and banged with my head against the wall after browsing the net for clues without any luck... but I'll start from the beginning...
I have an ASP.Net FileUpload control [ <asp:fileupload> ] in a gridview (what was I thinking... : ). Although I had the control found and processed on code-behind, one sole method insisted on returning the value 'false'. It was the HasFile method, wich was... well... WRONG! Nothing I did returned differently until I tried a simple line instead: fileUpload1.PostedFile.ContentLength > 0.
So my happy code looks now like this:
FileUpload fileUpload1 = (FileUpload) GridView1.Rows[0].Cells[0].FindControl("Field1"); if(fileUpload1.PostedFile.ContentLength > 0) { bla, bla, bla... } else { bla, bla, bla somemore }
...and it works just fine!
Hope this helps others : )
Cheers
January 31 To all those who are crazy about shortcut keys, please consult this link. January 30 To download tools, samples, extensions, filters and modules for Microsoft Internet Information Services, try this link IIS Download Center.
|