Search Results

Search found 350 results on 14 pages for 'paulo manuel santos'.

Page 2/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • JS: I'm not getting the scope

    - by Manuel
    Hi there, I'm trying to modify CouchDB's JS API to work asynchronous, but there is an error I cannot solve: Please find my JS API find at pastebin. If I call (new CouchDB("dbname")).designDocs() (line 193) I get an error because the okCallback function is not defined in the callback function. I don't know why; it should be defined in this scope.. Any hints are very welcome! Cheers, Manuel

    Read the article

  • SQL SERVER – Subquery or Join – Various Options – SQL Server Engine Knows the Best – Part 2

    - by pinaldave
    This blog post is part 2 of the earlier written article SQL SERVER – Subquery or Join – Various Options – SQL Server Engine knows the Best by Paulo R. Pereira. Paulo has left excellent comment to earlier article once again proving the point that SQL Server Engine is smart enough to figure out the best plan itself and uses the same for the query. Let us go over his comment as he has posted. “I think IN or EXISTS is the best choice, because there is a little difference between ‘Merge Join’ of query with JOIN (Inner Join) and the others options (Left Semi Join), and JOIN can give more results than IN or EXISTS if the relationship is 1:0..N and not 1:0..1. And if I try use NOT IN and NOT EXISTS the query plan is different from LEFT JOIN too (Left Anti Semi Join vs. Left Outer Join + Filter). So, I found a case where EXISTS has a different query plan than IN or ANY/SOME:” USE AdventureWorks GO -- use of SOME SELECT * FROM HumanResources.Employee E WHERE E.EmployeeID = SOME ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) -- use of IN SELECT * FROM HumanResources.Employee E WHERE E.EmployeeID IN ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) -- use of EXISTS SELECT * FROM HumanResources.Employee E WHERE EXISTS ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) When looked into execution plan of the queries listed above indeed we do get different plans for queries and SQL Server Engines creates the best (least cost) plan for each query. Click on image to see larger images. Thanks Paulo for your wonderful contribution. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, Readers Contribution, SQL, SQL Authority, SQL Joins, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • UPK Basics Hands On Lab at Oracle Open World Latin America

    - by user581320
    Orrcle Open World Latin America 2012 will be in Sao Paulo, Brazil December fourth through the sixth. There's so much to see and learn from at Oracle OpenWorld : keynotes, technical sessions, Oracle and partner demonstrations, hands-on labs, networking events, and more.  I will be presenting a hands-on lab at the show this year, Introduction to Oracle User Productivity Kit - Learn the Basics in the afternoon on Tuesday December 4th.  This nonstop one hour lab covers topics from Getting Started with UPK to the basics of creating an outline, some typical content and concluding with publishing some of the many outputs UPK is capable of.   If you are planning on attending the show, come by the lab and see what UPK is all about.  I’ll be in Sao Paulo all week to fulfill my need to extend California’s summer by another week (trip bonus) and to meet and discuss all things UPK with our customers and partners.  If you’re not registered for the show there is still time. Check out the Oracle Open World Latin America 2012 web site for all the details. I look forward to seeing you in Sao Paulo!  Peter Maravelias Principal Product Strategy Manager, Oracle UPK 

    Read the article

  • A Panorama of JavaOne Latin America

    - by reza_rahman
    As you know, JavaOne Latin America 2012 was held at the Transamerica Expo Center in Sao Paulo, Brazil on December 4-6. It was a resounding success with a great vibe, excellent technical content and numerous world class speakers, both local and international. Various folks like Tori Wieldt, Steve Chin, Arun Gupta, Bruno Borges and myself looked at the conference from slightly different colored lenses. It's interesting to put them all together in a panoramatic collage: Tori wrote about the Sao Paulo Geek Bike Ride held the Saturday before the conference here (enjoy the photos and video). She also discusses the keynotes in great detail here. Steve looked at it from the viewpoint of someome instrumental to putting the event together. Read his thoughts here (he has more geek bike ride photos as well as material for his JavaFX/HTML 5 talk). Arun had a more holistic view of the conference. He covers the geek bike ride, the GlassFish party (organized by Bruno Borges), his Java EE talks, and more. Check out the cool photos as well as the technical material. Bruno provides the critical local perspective in his 7 reasons you had to be at JavaOne Latin America 2012. He discusses the OTN Lounge, the hands-on-lab, the Java community keynote, Java EE technical sessions and of course the GlassFish party! I covered the GlassFish booth, the lab and my technical sessions (as well as Sao Paulo's lively metal underground) here.

    Read the article

  • What are the best ways to cope with «one of those days»? [closed]

    - by Júlio Santos
    I work in a fast-paced startup and am absolutely in love with what I do. Still, I wake up to a bad mood as often as the next guy. I find that forcing myself to play out my day as usual doesn't help — in fact, it only makes it worse, possibly ruining my productivity for the rest of the week. There are several ways I can cope with this, for instance: dropping the current task for the day and getting that awesome but low-priority feature in place; doing some pending research for future development (i.e. digging up ruby gems); spending the day reading and educating myself; just taking the day off. The first three items are productive in themselves, and taking the day off recharges my coding mana for the rest of the week. Being a young developer, I'm pretty sure there's a multitude of alternatives that I haven't come across yet. How can programmers cope with off days? Edit: I am looking for answers related specifically to this profession. I therefore believe that coping with off days in our field is fundamentally different that doing so in other areas. Programmers (especially in a start-up) are a unique breed in this context in the sense that they tend to have a multitude of tasks at hand on any given moment, so they can easily switch between these without wreaking too much havoc. Programmers also tend to work based on clear, concise objectives — provided they are well managed either by themselves or a third party — and hence have a great deal of flexibility when it comes to managing their time. Finally, our line of work creates the opportunity — necessity, if you will — to fit a plethora of tasks not directly related to the current one, such as research and staying on top of new releases and software updates.

    Read the article

  • Is Oracle WebCenter 11g a big SharePoint ?

    - by Guilherme J Santos
    Hi there. I have some experience with SharePoint. Now my company will use Oracle WebCenter to create a internal portal. Nobody of IT team have experience with Oracle WebCenter, and I think we could use SharePoint, as we did until now. So, what are the advantages to use Oracle WebCenter? Wich are your experiences with Oracle WebCenter 11g? And how much it is different from SharePoint. What can I do with Oracle WebCenter that I cannot do with Microsoft SharePoint?

    Read the article

  • Dell XPS L502Xnot detecting monitor-TV

    - by Guilherme Z. Santos
    I'm running Ubuntu 12.04 LTS on a Dell XPS L502X and when I connect the HDMI cable from the TV to the computer Ubuntu detects nothing at all, It works perfectly fine in Windows 7 though. I've already went to the Display control, plugged and unplugged the TV, clicked the Detect Displays button, and nothing. Do I have to activate the HDMI output or something? Because I used another computer with a VGA output and it worked perfectly.

    Read the article

  • Am I allowed to display a small image on top of a Google Maps Static Api map?

    - by Fábio Santos
    I am the webmaster to my company's website. I was asked to make the Google Map on this page smaller, but the interactive map doesn't work well at all at 300x200. I was asked to place a screenshot there but since that seems to be a violation of Google's terms I decided to use the Static Maps API. As you can see, on the page, I have a custom pointer icon. I don't want to lose it, so I intend to use HTML and CSS to place the pointer over the map, thus replacing the original pointer on the client side. Am I allowed to do that?

    Read the article

  • How does key-based caching work?

    - by Dominic Santos
    I recently read an article on the 37Signals blog and I'm left wondering how it is that they get the cache key. It's all well and good having a cache key that includes the object's timestamp (this means that when you update the object the cache will be invalidated); but how do you then use the cache key in a template without causing a DB hit for the very object that you are trying to fetch from the cache. Specifically, how does this affect One to Many relations where you are rendering a Post's Comments for example. Example in Django: {% for comment in post.comments.all %} {% cache comment.pk comment.modified %} <p>{{ post.body }}</p> {% endcache %} {% endfor %} Is caching in Rails different to just requests to memcached for example (I know that they convert your cache key to something different). Do they also cache the cache key?

    Read the article

  • Is it a good idea to put all assembly: WebResource in the same cs file?

    - by Guilherme J Santos
    I have a .NET library, with some WebControls. These webControls have Embed Resources. And we declare them like it, in all webcontrols for each cs file: Something like this: [assembly: WebResource("IO.Css.MyCSS.css", "text/css")] namespace MyNamespace.MyClass { [ParseChildren(true)] [PersistChildren(false)] [Designer(typeof(MyNamespace.MyClassDesigner))] public class QuickTip : Control, INamingContainer { //My code... } } Would it be a good idea to create a cs file and include all WebResource declarations there? Example a cs file with just: [assembly: WebResource("IO.Css.MyCSS.css", "text/css")] [assembly: WebResource("IO.Image.MyImage.png", "image/png")] //And many other WebResources of all WebControls of the Assembly

    Read the article

  • Abierta la temporada Otoñal de Eventos en Oracle

    - by Sofia Santos
    Muchas son las sorpresas que hemos preparado para los próximos meses. Con mucha ilusión, desde Oracle os enseñaremos TODO lo que hay de nuevo en Aplicaciones y sí, para todos los gustos!!! Para empezar y estar al tanto de todo, debéis guardar esta URL: events.oracle.com. Allí encontraréis lo último en eventos Oracle, desde el internacional y espectacular Oracle Open World, hasta los eventos que estamos realizando por toda Europa. Una atención especial para los eventos de España: Oracle Customer Experience y Oracle Citizen Experience, 10 de Octubre, no lo puedes perder!!! Hay que inscribirse ya porque las plazas son limitadas y ya tenemos mucha gente inscrita. Más sobre Oracle Customer Experience aquí. En Octubre también estamos preparando unos desayunos exclusivos sobre Oracle DRM y no sólo para Madrid, en Barcelona también podéis asistir… Llega Noviembre y a principios de mes, tenemos dos eventos Exclusivos, uno es el Oracle Aplications Strategy Day, un evento en el que se atiende sólo por invitación y dónde hablaremos de estrategia además de hacer una entrega de premios a nuestros clientes de Aplicaciones. El segundo es el Oracle HCM Summit que tiene lugar en París, un evento único especialmente dedicado a los Directores de Recursos Humanos. El Oracle Performance Management Summit se realiza en el día 20 de Noviembre. Se trata de un evento dedicado a los Directores Financieros y que viene con nuevo formato que engloba una sesión plenaria, mesas redondas (Solvencia, Fatca, Planing y Cierre), además de los testimonios de nuestros clientes en vivo, listos para contestar vuestras preguntas. Hay que esperar unos días y ya veréis la agenda publicada… Nos quedamos por aquí, porque toda la pagina no llegaría para exponer todo lo que vamos a hacer. No dejes de inscribirte, nuestros eventos son gratuitos pero como siempre… las plazas son limitadas. Allí os esperamos!!!

    Read the article

  • Stuck With grub rescue> console

    - by rej santos
    Here is the background of my issue: I just recently installed the latest version of Ubuntu along side with Windows 8 Enterprise. However upon checking the disk size, it seems that some of the portions of the hd memory were gone so I decided to check the disk partition and have seen that is was being used by another file system. Thinking that the Ubuntu takes it boots stuff from my drive C: , I deleted that partition and formated so I can use it to store some movies, music etc. Now, as I switch on my machine, I am stucked with: error: unknown filesystem grub rescue> I googled a lot and saw the following command which seems no to me like sudo, chainloader etc, all of these command only returns unknown command in the console. What I just wanted is to boot from my Windows 8 OS. Just to add, I can't open the BIOS menu so I could choose what media to boot. As I open my machine it automatically takes me to grub rescue console. Here are the thing I already have: Ubuntu Installation Disk Windows 8 System repair Disk I just don't know how to boot into these things. Let me know what to do.

    Read the article

  • Finding a mentor online [closed]

    - by Athena Santos
    Possible Duplicate: How to find programming mentor? I'm a programming intern, but I want to "transition" into a product manager role after graduation. I just know that I will never be a super A++ Rockstar programmer, but from my internship I know that I can be a great program manager..one of those presumably rare people who can code well (enough)/speak programmer-ese and management-ese. Being a girl, I am looking for both male and female mentors. Female, because they know what its like to be a minority, and male, because..well, you guys are tough, and I believe to succeed in tech, a girl's gotta know how to act like a man (when appropriate). I've found some really amazing people I'd like to ask to be my mentor (in blogs, magazines, etc), but sadly, I live far, far away from them. Will be awkward/rude if I shoot them an email about being a mentor? What is the best way to establish a relationship with people like these that I admire? Any volunteers? :) Thank you in advance, and I hope you all have a great day/night.

    Read the article

  • When must I turn my business idea into a formal Company? [closed]

    - by Sony Santos
    I'm a programmer, I have an idea, I know how to implement it, it will be a website, and that site will be my business. My question is very basic: where in timeline must I register my business as an official Company (ie, according Government laws)? Here there are some options to debate or to help answer me: Now - or as soon as I have the idea; When looking for investors (e.g., when a prototype or business plan is ready); When implementing the website; At site's launch; I must launch the website as a personal informal business and, when the business gets success and turns into a more solid and self-running one, only then I must formalize it; It doesn't matter; I can create the company when I want. Nobody talks about that. If I just have an idea, must I run into an office to create a Company? I don't think so. When I'll look for investors, the Company must to pre-exist? Or will the Company be formed with the investor? I'm looking for a generic, country-independent answer, but may the answer for your country can be useful to me. I'm Brazilian, and I believe that the country doesn't matter to this question. (Sorry if this is off-topic, but I coudn't find a batter stackexchange site to ask this.)

    Read the article

  • Oracle Announces Oracle Cloud Office and Oracle Open Office 3.3

    - by Paulo Folgado
    Oracle today introduced Oracle Cloud Office and Oracle Open Office 3.3, two complete, open standards-based office productivity suites for the desktop, web and mobile devices - helping users significantly improve productivity, reduce costs and achieve greater innovation across the enterprise.Oracle Cloud Office 1.0 is a web and mobile office suite that enables web 2.0-style collaboration and mobile document access. Compatibility with Microsoft Office and integration with Oracle Open Office enable rich and seamless offline editing of complex presentations, text and spreadsheet documents. Oracle Open Office 3.3 includes new enterprise connectors to Oracle Business Intelligence, Oracle E-Business Suite, other Oracle Applications and Microsoft Sharepoint, to allow for fast, seamless integration into existing enterprise software stacks. In addition, it adds increased stability, compatibility and performance at up to five times lower license cost compared to Microsoft Office. Based on the Open Document Format (ODF) and open web standards, Oracle Office enables users to share files on any system as it is compatible with both legacy Microsoft Office documents and modern web 2.0 publishing. The Oracle Office APIs and open standards-based approach provides IT users with flexibility, lower short and long-term costs and freedom from vendor lock-in - enabling organizations to build a complete Open Standard Office Stack. If you're interested to learn more, read our today's press release or visit oracle.com/office.

    Read the article

  • C# 4.0: Dynamic Programming

    - by Paulo Morgado
    The major feature of C# 4.0 is dynamic programming. Not just dynamic typing, but dynamic in broader sense, which means talking to anything that is not statically typed to be a .NET object. Dynamic Language Runtime The Dynamic Language Runtime (DLR) is piece of technology that unifies dynamic programming on the .NET platform, the same way the Common Language Runtime (CLR) has been a common platform for statically typed languages. The CLR always had dynamic capabilities. You could always use reflection, but its main goal was never to be a dynamic programming environment and there were some features missing. The DLR is built on top of the CLR and adds those missing features to the .NET platform. The Dynamic Language Runtime is the core infrastructure that consists of: Expression Trees The same expression trees used in LINQ, now improved to support statements. Dynamic Dispatch Dispatches invocations to the appropriate binder. Call Site Caching For improved efficiency. Dynamic languages and languages with dynamic capabilities are built on top of the DLR. IronPython and IronRuby were already built on top of the DLR, and now, the support for using the DLR is being added to C# and Visual Basic. Other languages built on top of the CLR are expected to also use the DLR in the future. Underneath the DLR there are binders that talk to a variety of different technologies: .NET Binder Allows to talk to .NET objects. JavaScript Binder Allows to talk to JavaScript in SilverLight. IronPython Binder Allows to talk to IronPython. IronRuby Binder Allows to talk to IronRuby. COM Binder Allows to talk to COM. Whit all these binders it is possible to have a single programming experience to talk to all these environments that are not statically typed .NET objects. The dynamic Static Type Let’s take this traditional statically typed code: Calculator calculator = GetCalculator(); int sum = calculator.Sum(10, 20); Because the variable that receives the return value of the GetCalulator method is statically typed to be of type Calculator and, because the Calculator type has an Add method that receives two integers and returns an integer, it is possible to call that Sum method and assign its return value to a variable statically typed as integer. Now lets suppose the calculator was not a statically typed .NET class, but, instead, a COM object or some .NET code we don’t know he type of. All of the sudden it gets very painful to call the Add method: object calculator = GetCalculator(); Type calculatorType = calculator.GetType(); object res = calculatorType.InvokeMember("Add", BindingFlags.InvokeMethod, null, calculator, new object[] { 10, 20 }); int sum = Convert.ToInt32(res); And what if the calculator was a JavaScript object? ScriptObject calculator = GetCalculator(); object res = calculator.Invoke("Add", 10, 20); int sum = Convert.ToInt32(res); For each dynamic domain we have a different programming experience and that makes it very hard to unify the code. With C# 4.0 it becomes possible to write code this way: dynamic calculator = GetCalculator(); int sum = calculator.Add(10, 20); You simply declare a variable who’s static type is dynamic. dynamic is a pseudo-keyword (like var) that indicates to the compiler that operations on the calculator object will be done dynamically. The way you should look at dynamic is that it’s just like object (System.Object) with dynamic semantics associated. Anything can be assigned to a dynamic. dynamic x = 1; dynamic y = "Hello"; dynamic z = new List<int> { 1, 2, 3 }; At run-time, all object will have a type. In the above example x is of type System.Int32. When one or more operands in an operation are typed dynamic, member selection is deferred to run-time instead of compile-time. Then the run-time type is substituted in all variables and normal overload resolution is done, just like it would happen at compile-time. The result of any dynamic operation is always dynamic and, when a dynamic object is assigned to something else, a dynamic conversion will occur. Code Resolution Method double x = 1.75; double y = Math.Abs(x); compile-time double Abs(double x) dynamic x = 1.75; dynamic y = Math.Abs(x); run-time double Abs(double x) dynamic x = 2; dynamic y = Math.Abs(x); run-time int Abs(int x) The above code will always be strongly typed. The difference is that, in the first case the method resolution is done at compile-time, and the others it’s done ate run-time. IDynamicMetaObjectObject The DLR is pre-wired to know .NET objects, COM objects and so forth but any dynamic language can implement their own objects or you can implement your own objects in C# through the implementation of the IDynamicMetaObjectProvider interface. When an object implements IDynamicMetaObjectProvider, it can participate in the resolution of how method calls and property access is done. The .NET Framework already provides two implementations of IDynamicMetaObjectProvider: DynamicObject : IDynamicMetaObjectProvider The DynamicObject class enables you to define which operations can be performed on dynamic objects and how to perform those operations. For example, you can define what happens when you try to get or set an object property, call a method, or perform standard mathematical operations such as addition and multiplication. ExpandoObject : IDynamicMetaObjectProvider The ExpandoObject class enables you to add and delete members of its instances at run time and also to set and get values of these members. This class supports dynamic binding, which enables you to use standard syntax like sampleObject.sampleMember, instead of more complex syntax like sampleObject.GetAttribute("sampleMember").

    Read the article

  • Is Your ASP.NET Development Server Not Working?

    - by Paulo Morgado
    Since Visual Studio 2005, Visual Studio comes with a development web server: the ASP.NET Development Server. I’ve been using this web server for simple test projects since than with Visual Studio 2005 and Visual Studio 2008 in Windows XP Professional on my work laptop and Windows XP Professional, Windows Vista 64bit Ultimate and Windows 7 64bit Ultimate at my home desktop without any problems (apart the known custom identity problem, that is). When I received my new work laptop, I installed Windows Vista 64bit Enterprise and Visual Studio 2008 and, for my surprise, the ASP.NET Development Server wasn’t working. I started looking for differences between the laptop environment and the desktop environment and the most notorious differences were: System Laptop Desktop SKU Windows Vista 64bit Enterprise Windows Vista 64bit Ultimate Joined to a Domain Yes No Anti-Virus McAffe ESET After asserting that no domain policies were being applied to my laptop and domain user and nothing was being logged by the ant-virus, my suspicions turned to the fact that the laptop was running an Enterprise SKU and the desktop was running an Ultimate SKU. After having problems with other applications I was sure that problem was the Enterprise SKU, but never found a solution to the problem. Because I wasn’t doing any web development at the time, I left it alone. After upgrading to Windows 7, the problem persisted but, because I wasn’t doing any web development at the time, once again, I left it alone. Now that I installed Visual Studio 2010 I had to solve this. After searching around forums and blogs that either didn’t offer an answer or offered very complicated workarounds that, sometimes, involved messing with the registry, I came to the conclusion that the solution is, in fact, very simple. When Windows Vista is installed, hosts file, according to this contains this definition: 127.0.0.1 localhost ::1 localhost This was not what I had on my laptop hosts file. What I had was this: #127.0.0.1 localhost #::1 localhost I might have changed it myself, but from the amount of people that I found complaining about this problem on Windows Vista, this was probably the way it was. The installation of Windows 7 leaves the hosts file like this: #127.0.0.1 localhost #::1 localhost And although the ASP.NET Development Server works fine on Windows 7 64bit Ultimate, on Windows 7 64bit Enterprise it needs to be change to this: 127.0.0.1 localhost ::1 localhost And I suspect it’s the same with Windows Vista 64bit Enterprise.

    Read the article

  • CodeIt.Right Code File Header Template For StyleCop Rules

    - by Paulo Morgado
    I like to use both StyleCop and CodeIt.Right to validate my code – StyleCop because it’s free and CodeIt.Right because it’s really good. While StyleCop provides only validation, CodeIt.Righ provides both validation and correction of violations. Unfortunately, CodeIt.Right’s supplied template for code file headers does not conform to StyleCop rules. Fortunately, CodeIt.Right allows us to define our own template. Here’s the one I use: <#@ template language="C#" #> //----------------------------------------------------------------------- // <copyright file="<#= System.IO.Path.GetFileName(Context.DestinationFile) #>" // project="<#= Context.ProjectName #>" // assembly="<#= Context.AssemblyName #>" // solution="<#= Context.SolutionName #>" // company="<#= Context.GetGlobalProperty("CompanyName") #>"> // Copyright (c) <#= Context.GetGlobalProperty("CompanyName") #>. All rights reserved. // </copyright> // <author id="<#= Context.GetGlobalProperty("UserID") #>"><#= Context.GetGlobalProperty("UserName") #></author> // <summary></summary> //-----------------------------------------------------------------------

    Read the article

  • Uploading documents to WSS (Windows Sharepoint Services) using SSIS

    - by Randy Aldrich Paulo
    Recently I was tasked to create an SSIS application that will query a database, split the results with certain criteria and create CSV file for every result and upload the file to a Sharepoint Document Library site. I've search the web and compiled the steps I've taken to build the solution. Summary: A) Create a proxy class of WSS Copy.asmx. B) Create a wrapper class for the proxy class and add a mechanism to check if the file is existing and delete method. C) Create an SSIS and call the wrapper class to transfer the files.   A) Creating Proxy Class 1) Go to Visual Studio Command Prompt type wsdl http://[sharepoint site]/_vti_bin/Copy.asmx this will generate the proxy class (Copy.cs) that will be added to the solution. 2) Add Copy.cs to solution and create another constructor for Copy() that will accept additional parameters url, userName, password and domain.   public Copy(string url, string userName, string password, string domain) { this.Url = url; this.Credentials = new System.Net.NetworkCredential(userName, password, domain); } 3) Add a namespace.     B) Wrapper Class Create a C# new library that references the Proxy Class.         C) Create SSIS SSIS solution is composed of:   1) Execute SQL Task, returns a single column rows containing the criteria. 2) Foreach Loop Container - loops per result from query (SQL Task) and creates a CSV file on a certain folder. 3) Script Task - calls the wrapper class to upload CSV files located on a certain folder to targer WSS Document Library Note: I've created another overload of CopyFiles that accepts a Directory Info instead of file location that loops thru the contents of the folder. Designer View Variable View

    Read the article

  • C# 4.0: Named And Optional Arguments

    - by Paulo Morgado
    As part of the co-evolution effort of C# and Visual Basic, C# 4.0 introduces Named and Optional Arguments. First of all, let’s clarify what are arguments and parameters: Method definition parameters are the input variables of the method. Method call arguments are the values provided to the method parameters. In fact, the C# Language Specification states the following on §7.5: The argument list (§7.5.1) of a function member invocation provides actual values or variable references for the parameters of the function member. Given the above definitions, we can state that: Parameters have always been named and still are. Parameters have never been optional and still aren’t. Named Arguments Until now, the way the C# compiler matched method call definition arguments with method parameters was by position. The first argument provides the value for the first parameter, the second argument provides the value for the second parameter, and so on and so on, regardless of the name of the parameters. If a parameter was missing a corresponding argument to provide its value, the compiler would emit a compilation error. For this call: Greeting("Mr.", "Morgado", 42); this method: public void Greeting(string title, string name, int age) will receive as parameters: title: “Mr.” name: “Morgado” age: 42 What this new feature allows is to use the names of the parameters to identify the corresponding arguments in the form: name:value Not all arguments in the argument list must be named. However, all named arguments must be at the end of the argument list. The matching between arguments (and the evaluation of its value) and parameters will be done first by name for the named arguments and than by position for the unnamed arguments. This means that, for this method definition: public static void Method(int first, int second, int third) this call declaration: int i = 0; Method(i, third: i++, second: ++i); will have this code generated by the compiler: int i = 0; int CS$0$0000 = i++; int CS$0$0001 = ++i; Method(i, CS$0$0001, CS$0$0000); which will give the method the following parameter values: first: 2 second: 2 third: 0 Notice the variable names. Although invalid being invalid C# identifiers, they are valid .NET identifiers and thus avoiding collision between user written and compiler generated code. Besides allowing to re-order of the argument list, this feature is very useful for auto-documenting the code, for example, when the argument list is very long or not clear, from the call site, what the arguments are. Optional Arguments Parameters can now have default values: public static void Method(int first, int second = 2, int third = 3) Parameters with default values must be the last in the parameter list and its value is used as the value of the parameter if the corresponding argument is missing from the method call declaration. For this call declaration: int i = 0; Method(i, third: ++i); will have this code generated by the compiler: int i = 0; int CS$0$0000 = ++i; Method(i, 2, CS$0$0000); which will give the method the following parameter values: first: 1 second: 2 third: 1 Because, when method parameters have default values, arguments can be omitted from the call declaration, this might seem like method overloading or a good replacement for it, but it isn’t. Although methods like this: public static StreamReader OpenTextFile( string path, Encoding encoding = null, bool detectEncoding = true, int bufferSize = 1024) allow to have its calls written like this: OpenTextFile("foo.txt", Encoding.UTF8); OpenTextFile("foo.txt", Encoding.UTF8, bufferSize: 4096); OpenTextFile( bufferSize: 4096, path: "foo.txt", detectEncoding: false); The complier handles default values like constant fields taking the value and useing it instead of a reference to the value. So, like with constant fields, methods with parameters with default values are exposed publicly (and remember that internal members might be publicly accessible – InternalsVisibleToAttribute). If such methods are publicly accessible and used by another assembly, those values will be hard coded in the calling code and, if the called assembly has its default values changed, they won’t be assumed by already compiled code. At the first glance, I though that using optional arguments for “bad” written code was great, but the ability to write code like that was just pure evil. But than I realized that, since I use private constant fields, it’s OK to use default parameter values on privately accessed methods.

    Read the article

  • C# Proposal: Compile Time Static Checking Of Dynamic Objects

    - by Paulo Morgado
    C# 4.0 introduces a new type: dynamic. dynamic is a static type that bypasses static type checking. This new type comes in very handy to work with: The new languages from the dynamic language runtime. HTML Document Object Model (DOM). COM objects. Duck typing … Because static type checking is bypassed, this: dynamic dynamicValue = GetValue(); dynamicValue.Method(); is equivalent to this: object objectValue = GetValue(); objectValue .GetType() .InvokeMember( "Method", BindingFlags.InvokeMethod, null, objectValue, null); Apart from caching the call site behind the scenes and some dynamic resolution, dynamic only looks better. Any typing error will only be caught at run time. In fact, if I’m writing the code, I know the contract of what I’m calling. Wouldn’t it be nice to have the compiler do some static type checking on the interactions with these dynamic objects? Imagine that the dynamic object that I’m retrieving from the GetValue method, besides the parameterless method Method also has a string read-only Property property. This means that, from the point of view of the code I’m writing, the contract that the dynamic object returned by GetValue implements is: string Property { get; } void Method(); Since it’s a well defined contract, I could write an interface to represent it: interface IValue { string Property { get; } void Method(); } If dynamic allowed to specify the contract in the form of dynamic(contract), I could write this: dynamic(IValue) dynamicValue = GetValue(); dynamicValue.Method(); This doesn’t mean that the value returned by GetValue has to implement the IValue interface. It just enables the compiler to verify that dynamicValue.Method() is a valid use of dynamicValue and dynamicValue.OtherMethod() isn’t. If the IValue interface already existed for any other reason, this would be fine. But having a type added to an assembly just for compile time usage doesn’t seem right. So, dynamic could be another type construct. Something like this: dynamic DValue { string Property { get; } void Method(); } The code could now be written like this; DValue dynamicValue = GetValue(); dynamicValue.Method(); The compiler would never generate any IL or metadata for this new type construct. It would only thee used for compile type static checking of dynamic objects. As a consequence, it makes no sense to have public accessibility, so it would not be allowed. Once again, if the IValue interface (or any other type definition) already exists, it can be used in the dynamic type definition: dynamic DValue : IValue, IEnumerable, SomeClass { string Property { get; } void Method(); } Another added benefit would be IntelliSense. I’ve been getting mixed reactions to this proposal. What do you think? Would this be useful?

    Read the article

  • Visual Studio 2010 Service Pack 1 And .NET Framework 4.0 Update

    - by Paulo Morgado
    As announced by Jason Zender in his blog post, Visual Studio 2010 Service Pack 1 is available for download for MSDN subscribers since March 8 and is available to the general public since March 10. Brian Harry provides information related to TFS and S. "Soma" Somasegar provides information on the latest Visual Studio 2010 enhancements. With this service pack for Visual Studio an update to the .NET Framework 4.0 is also released. For detailed information about these releases, please refer to the corresponding KB articles: Update for Microsoft .NET Framework 4 Description of Visual Studio 2010 Service Pack 1 Update: When I was upgrading from the Beta to the final release on Windows 7 Enterprise 64bit, the instalation hanged with Returning IDCANCEL. INSTALLMESSAGE_WARNING [Warning 1946.Property 'System.AppUserModel.ExcludeFromShowInNewInstall' for shortcut 'Manage Help Settings - ENU.lnk' could not be set.]. Canceling the installation didn’t work and I had to kill the setup.exe process. When reapplying it again, rollbacks were reported, so I reapplied it again – this time with succes.

    Read the article

  • LINQ: Single vs. First

    - by Paulo Morgado
    I’ve witnessed and been involved in several discussions around the correctness or usefulness of the Single method in the LINQ API. The most common argument is that you are querying for the first element on the result set and an exception will be thrown if there’s more than one element. The First method should be used instead, because it doesn’t throw if the result set has more than one item. Although the documentation for Single states that it returns a single, specific element of a sequence of values, it actually returns THE single, specific element of a sequence of ONE value. One you use the Single method in your code you are asserting that your query will result in a scalar result instead of a result set of arbitrary length. On the other hand, the documentation for First states that it returns the first element of a sequence of arbitrary length. Imagine you want to catch a taxi. You go the the taxi line and catch the FIRST one, no matter how many are there. On the other hand, if you go the the parking lot to get your car, you want the SINGLE one specific car that’s yours. If your “query” “returns” more than one car, it’s an exception. Either because it “returned” not only your car or you happen to have more than one car in that parking lot. In either case, you can only drive one car at once and you’ll need to refine your “query”.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >