Search Results

Search found 52 results on 3 pages for 'rui pacheco'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • SQl function in android

    - by rui.pereira
    Cursor cursor = db.rawQuery("SELECT COUNT(rat) FROM "+ TABLE_NAME_EXTRA +" apkid=\""+apkid, null); cursor.moveToFirst(); int somatotal = cursor.getInt(0); I'm trying to do a SQL function like count and sum, but this code returns a exception saying "emptyvalues". anyone know why?

    Read the article

  • DotNetNuke + XPath = Custom navigation menu DNNMenu HTML render

    - by Rui Santos
    I'm developing a skin for DotNetNuke 5 using the Component DNN Done Right menu by Mark Alan which uses XSL-T to convert the XML sitemap into an HTML navigation. The XML sitemap outputs the following structure: <Root > <root > <node id="40" text="Home" url="http://localhost/dnn/Home.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="0" > <node id="58" text="Child1" url="http://localhost/dnn/Home/Child1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="1" > <keywords >Child1</keywords> <description >Child1</description> <node id="59" text="Child1 SubItem1" url="http://localhost/dnn/Home/Child1/Child1SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child1 SubItem1</keywords> <description >Child1 SubItem1</description> </node> <node id="60" text="Child1 SubItem2" url="http://localhost/dnn/Home/Child1/Child1SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="0" only="0" depth="2" > <keywords >Child1 SubItem2</keywords> <description >Child1 SubItem2</description> </node> <node id="61" text="Child1 SubItem3" url="http://localhost/dnn/Home/Child1/Child1SubItem3.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child1 SubItem3</keywords> <description >Child1 SubItem3</description> </node> </node> <node id="65" text="Child2" url="http://localhost/dnn/Home/Child2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="1" > <keywords >Child2</keywords> <description >Child2</description> <node id="66" text="Child2 SubItem1" url="http://localhost/dnn/Home/Child2/Child2SubItem1.aspx" enabled="1" selected="0" breadcrumb="0" first="1" last="0" only="0" depth="2" > <keywords >Child2 SubItem1</keywords> <description >Child2 SubItem1</description> </node> <node id="67" text="Child2 SubItem2" url="http://localhost/dnn/Home/Child2/Child2SubItem2.aspx" enabled="1" selected="0" breadcrumb="0" first="0" last="1" only="0" depth="2" > <keywords >Child2 SubItem2</keywords> <description >Child2 SubItem2</description> </node> </node> </node> </root> </Root> My Goal is to render this XML block into this HTML Navigation structure only using UL's LI's, etc.. <ul id="topnav"> <li> <a href="#" class="home">Home</a> <!-- Parent Node - Depth0 --> <div class="sub"> <ul> <li><h2><a href="#">Child1</a></h2></li> <!-- Parent Node 1 - Depth1 --> <li><a href="#">Child1 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem2</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child1 SubItem3</a></li ><!-- ChildNode - Depth2 --> </ul> <ul> <li><h2><a href="#">Child2</a></h2></li> <!-- Parent Node 2 - Depth1 --> <li><a href="#">Child2 SubItem1</a></li> <!-- ChildNode - Depth2 --> <li><a href="#">Child2 SubItem2</a></li> <!-- ChildNode - Depth2 --> </ul> </div> </li> </ul> Can anyone help with the XSL coding? I'm just starting now with XSL..

    Read the article

  • How to open email by x-gm-msgid in Gmail with Javascript

    - by Rui J
    I'm writing an extension which surfaces links to gmail messages. As the UI loads right in Gmail, I should be able to click on one of these links and have Gmail load it (without refreshing). I have "x-gm-msgid" available and theoretically, I should just be able to navigate to "https://mail.google.com/mail/u/0/#inbox/[x-gm-msgid]". I've tried using location.hash = "#inbox/[x-gm-msgid]" I've tried using history.pushState(null, null, "/mail/u/0/#inbox/[x-gm-msgid]") Neither of which works. Gmail just thwarts any attempt to change the URL (unless it is done via user interaction) Any thoughts on how to get around this restriction?

    Read the article

  • Generate dynamic UPDATE command from Expression<Func<T, T>>

    - by Rui Jarimba
    I'm trying to generate an UPDATE command based on Expression trees (for a batch update). Assuming the following UPDATE command: UPDATE Product SET ProductTypeId = 123, ProcessAttempts = ProcessAttempts + 1 For an expression like this: Expression<Func<Product, Product>> updateExpression = entity => new Product() { ProductTypeId = 123, ProcessAttempts = entity.ProcessAttempts + 1 }; How can I generate the SET part of the command? SET ProductTypeId = 123, ProcessAttempts = ProcessAttempts + 1

    Read the article

  • Content boundary with rounded corners

    - by Rui Carneiro
    I am using CSS rounded corners for firefox and I have the following problem with content boundaries: Code <html> <head> <style> #outter { width: 200px; margin: auto; text-align: center; border: 1px solid #333; -moz-border-radius: 15px; } #inner { background: red; opacity: 0.5; } </style> </head> <body> <div id="outter"> <div id="inner">text</div> </div> </body> </html> Effect I can avoid this problem by defining -moz-border-radius for each outter's child. There is any other way I am missing?

    Read the article

  • How to get the selected index of a dropdowlist with javascript

    - by rui martins
    I have a table with several @Html.dropdowlistfor in it. I was trying to read the selected value of using javascript, but all read is the html generated. How can I read it?? for (var i = 0; i < oTable.length; i++) { **userModel.Id = oTable[i][0];** regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Id": "", "Name": "", "Users": []}; } TABLE <table class="tbl" id="tbl"> <thead> <tr> <th> Region </th> <th> Owner </th> </tr> </thead> <tbody> @if (Model != null) { foreach (var item in Model.Regions) { <tr> <td> @Html.DisplayTextFor(i => item.Name) </td> <td> @Html.DropDownListFor(i => item.Users, new SelectList(item.Users, "Id", "Name")) </td> </tr> } } </tbody> CODE function ProcessSave() { // Step 1: Read View Data and Create JSON Object var userModel = { "User": "", "Name": ""}; var regionModel = {"Region" : "","Name": "", "Users": []}; var processModel = { "User": "", "Description": "", "Code": "", "Regions": []}; processModel.Name = $("#Name").val(); processModel.Code = $("#Code").val(); processModel.Description = $("#Description").val(); var oTable = $('.tbl').dataTable().fnGetData(); for (var i = 0; i < oTable.length; i++) { regionModel.Name = oTable[i][0]; userModel.User = oTable[i][1]; userModel.Name = oTable[i][1]; regionModel.Users.push(userModel); processModel.Regions.push(regionModel); userModel = { "Id": "", "Name": ""}; regionModel = { "Name": "", "Users": []}; } // Step 1: Ends Here // Set 2: Ajax Post // Here i have used ajax post for saving/updating information $.ajax({ url: '/Process/Create', data: JSON.stringify(processModel), type: 'POST', contentType: 'application/json;', dataType: 'json', success: function (result) { if (result.Success == "1") { window.location.href = "/Process/Index"; } else { alert(result.ex); } } }); } MODELS namespace TestingTool.ViewModels { public partial class ProcessModel { public string Name { get; set; } public string Description { get; set; } public string Code { get; set; } public virtual ICollection<RegionModel> Regions { get; set; } } } namespace TestingTool.ViewModels { public class RegionModel { public int Region { get; set; } public string Name { get; set; } public virtual ICollection<UserModel> Users { get; set; } } } namespace TestingTool.ViewModels { public class UserModel { public int User{ get; set; } public string Name { get; set; } } }

    Read the article

  • From Java Object class to C++

    - by Rui
    Hi, I'm relative new to C++ and my background is in Java. I have to port some code from Java to C++ and some doubts came up relative to the Object Java's class. So, if I want to port this: void Algorithm::setInputParameter(std::string name, Object object) { ..... } I believe I should use void* type or templates right? I don't know what's the "standard" procedure to accomplish it. Thanks

    Read the article

  • How to hide canvas content from parent rounded corners in any webkit for Mac?

    - by Jose Rui Santos
    I have a parent div with rounded corners that contains a canvas: <div id="box"> <canvas width="300px" height="300px"></canvas> </div>? #box { width: 150px; height: 150px; background-color: blue; border-radius: 50px; overflow: hidden; }? The canvas renders a red rectangle that overflows the parent. As expected, this is what I get in all browsers: The problem: However, for webkit browsers running in Mac OS lion (I tested Safari 5.1.5 and Chrome 19), the canvas is still visible in the round corners: Interestingly, this problem seems to happen only when the inner element is a canvas. For any other child element, the content is correctly hidden. One workaround would be to apply the same rounded corners to the canvas itself, but unfortunately this is not possible, since I need to animate the canvas relative position. Another workaround that should work, is to redraw the canvas in a clipped region that resembles the rounded corners shape, but I would prefer a cleaner CSS3 solution. So, does one know how to fix this for Safari and Chrome on Mac? EDIT: Problem also happens in Chrome on Win7 jsFiddle here

    Read the article

  • MSN XMPP API fails to connect

    - by Rui
    I'm trying to use MSN XMPP API via Actionscript, but connection to MSN always fails. I can identify this error on logs: I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 12 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 I DONT KNOW HOW TO HANDLE DER stuff of TYPE 22 (..) > <stream:error > xmlns:stream="http://etherx.jabber.org/streams"><see-other-host > xmlns="urn:ietf:params:xml:ns:xmpp-streams">BY2MSG4020608.gateway.edge.messenger.live.com</see-other-host></stream:error> </stream:stream> Anyone knows what is this related to?

    Read the article

  • How to display inline several <li> with 100% width?

    - by Rui
    Hi, I have the following html: <div id="container"> <ul> <li>element 1</li> <li>element 2</li> </ul> </div> applied with a css as follows: #container { width:100%; overflow:auto; } #container ul { width: 100%; } #container li { width: 100%; } So now I would like to have an indeterminate number of elements (<li>) all with 100% width (so they can adjust accordingly to the browser's window size) but all side by side, displaying the horizontal scroll bar in the container. I have tried putting "display:inline" on ul's css, and "float:left" on li's css, but with no success. Any suggestions? Also, try to consider I'm trying to make this as "cross-browser compatible" as possible. Thanks in advanced;

    Read the article

  • Moving abroad - Relocation advice

    - by Tim Koekkoek
    Oracle offers graduates from different European countries the opportunity to start their career abroad. Some already have experience with living abroad as they have done an exchange semester or internship in another county, for others it is the first time they will move abroad. Rui started in October 2011 as a Business Development Consultant in Dublin and moved from Portugal to Dublin, Ireland to start his career. For those planning to leave their home country and who desire to work abroad, he will share some tips and tricks in this article. When you’re faced with an opportunity like this, there are lots of things that will come to your mind. Sometimes it can be either very exciting, or even stressful. 1. First of all, try to relax. If you are certain you are moving abroad, all you need to do is some research about the country where you’re going to live, get to know its culture (gastronomy, important dates and events, its economy and effective ways to keep you in touch with your family and friends – such as mobile companies and Internet services), and start to understand the best locations (with good access) you could/should live in are. Don’t forget that initially you can be limited by transport and therefore it is important to explore the ideal places for you. During this time, Oracle provides everything you’ll need (papers, documents, etc.) to cross borders. 2. When you arrive, you understand that you are in a new country, in a new place, where all things (or most) are unknown to you. Before you panic, try to see it as a new challenge where new opportunities will come. Sometimes, it’s not easy I know, but the very best a new place has to give to you, is the opportunity to understand a new culture, get to know other people, other ways of working, and grow both as a person and professionally. So, you have nothing to lose in this kind of experiment. 3. When you arrive at Oracle, there’s a fantastic team that will help you with settling in, HR, Payroll, Relocation, IT. In my case, Oracle helped me with the relocation, they supported me to arrange everything such as helping out with all the paperwork and finding a new apartment. As you can see they will do their best to help you to be successful! 4. Engage with your new co-workers. Going to a place where you don’t know anyone can be tough sometimes but see it as an opportunity to meet people from all over the world and share experiences. Embrace it. 5. Plan ahead, try to get the most information possible and use it. Oracle is a multinational enterprise that will allow you to get to know a new labour market and give you the flexibility you need to understand your view of employment and occupation, giving you the very best opportunities to join different teams and working areas, so that you can work where you fit best. Good luck! If you’re thinking about starting a career abroad, read the following article: http://www.overseasdigest.com/movingtips.htm it can be very useful to you. Interested in starting your career at Oracle like Rui has? Please have a look at https://campus.oracle.com for all of our latest vacancies.

    Read the article

  • Python - Code snippet not working on Python 2.5.6, using IDLE

    - by Francisco P.
    Hello, everyone I am using a piece of self-modifying code for a college project. Here it is: import datetime import inspect import re import sys def main(): # print the time it is last run lastrun = 'Mon Jun 8 16:31:27 2009' print "This program was last run at ", print lastrun # read in the source code of itself srcfile = inspect.getsourcefile(sys.modules[__name__]) f = open(srcfile, 'r') src = f.read() f.close() # modify the embedded timestamp timestamp = datetime.datetime.ctime(datetime.datetime.now()) match = re.search("lastrun = '(.*)'", src) if match: src = src[:match.start(1)] + timestamp + src[match.end(1):] # write the source code back f = open(srcfile, 'w') f.write(src) f.close() if __name__=='__main__': main() Unfortunately, it doesn't work. Error returned: # This is the script's output This program is last run at Mon Jun 8 16:31:27 2009 # This is the error message Traceback (most recent call last): File "C:\Users\Rui Gomes\Desktop\teste.py", line 30, in <module> main() File "C:\Users\Rui Gomes\Desktop\teste.py", line 13, in main srcfile = inspect.getsourcefile(sys.modules[__name__]) File "C:\Python31\lib\inspect.py", line 439, in getsourcefile filename = getfile(object) File "C:\Python31\lib\inspect.py", line 401, in getfile raise TypeError('{!r} is a built-in module'.format(object)) TypeError: <module '__main__' (built-in)> is a built-in module I'd be thankful for any solutions.

    Read the article

  • Consuming OData based Rest service in C# [en-US]

    - by ruimachado
    Nowadays comunication between applications is an active topic with daily usage and a large amount of pratical appliances. While developing an app in witch I had to consume an OData I found out that combining Linq with my code made this operation pretty easy.The algorithm to consume OData starts with adding a service reference to Visual Studio:After adding the service reference in wich you define the uri to the service, we start building our code.In your code the algorithm is the following:Define the Uri to your OData ServiceDefine the context of your odata, wich contains all entities exposed by the service.Query the context using LinqPrint the resultEasy and simple.Example code:01public static void Main(string[] args){02 03        Uri serviceUri= newUri("http://example.host.odataservice.net/service.svc", UriKind.Absolute);04        ODataService.ServiceEntities context = newODataService.ServiceEntities (serviceUri);05 06        context.Credentials = newSystem.Net.NetworkCredential(Username,Password);07 08         var query = from ServiceObject in context.YourEntity09                     select ServiceObject ;10 11        foreach (var myObject in query)12        {13            Console.WriteLine("\n Field1: {0} | Field2: {1}",14            myObject .Field1, myObject .Field2);15 16        }17}That’s it.Thank you,Rui Machadorpmachado.wordpress.com

    Read the article

  • What's the best webserver software for video?

    - by sopppas
    Hi, we have a collection of FLV files, to be displayed by FlowPlayer flash-app in a website. The scripts and handling of data are done with Apache/MySQL/PHP. As the video files are static files they should be served by a more static oriented webserver like lighttpd or nginx, like it's done with photos. What's the best webserver for serving video? A static files oriented webserver should be good? thanks in advance regards, rui

    Read the article

  • Nullable types and ?? operator C# [en-US]

    - by ruimachado
    Nullable types vs Non-nullable types   While developing our C# projects its frequent the null comparison operation to avoid null exceptions. This simple operation is mainly coded using the "var x = null" code example inside an if clause. However not all types of variables are nullable, which means that setting a variable to null is not allowed in every cases, it depends on what kind of type are you defining. But what if there was an extension to your non-nullable type that would convert your variable types to nullable? This extension really exists. As I said before in C# you have nullable types which represent all the values of an underlying type, and an additional null value and can be declared easily using "T?", where T is the type of the variable and for example the normal int type cannot be null, so its a non-nullable type, however if you define a "int?" your variable can be null, what you do is convert a non-nullable type to a nullable type. Example: int x=null;     Not allowed     int? x=null;   Allowed     While using nullable types you can check if a variable is null the same way you do it with nullable types:     But what about setting a default value when a certain variable is null?   In this cases the c# .net framework let you set a default value when you try to assign a nullable type to a non-nullable type, using the ?? operator. If you don't use this operator you can still catch the InvalidOperationException which is throw in this cases. For example  without the ?? operator :     Using the ?? operator your code becomes cleaner and more easy to read and you get a bonus, you can set a default value for multiple variables using the ?? in a chain set.     That’s it,   Thanks, Rui Machado rpmachado.wordpress.com

    Read the article

  • Silverlight Cream for January 03, 2011 -- #1021

    - by Dave Campbell
    In this all-Submittal Issue: Gill Cleeren(-2-), Brian Noyes, Brian Genisio, René Schulte, and Andy Schwam(-2-). Above the Fold: Silverlight: "The INavigationContentLoader interface in Silverlight 4" Gill Cleeren WP7: "Sending Windows Phone Screenshots in an Email" René Schulte WCF RIA Services: "WCF RIA Services Part 10 - Exposing Domain Services To Other Clients" Brian Noyes Shoutouts: Want to know what it takes to be an MVP? Check out René Schulte's recap of 2010: Goodbye 2010 - Hello 2011 ... awesome, René! Rui Marinho sent me this post... it's WPF, but wow... WPF and Kinect! Kinect & WPF From SilverlightCream.com: The INavigationContentLoader interface in Silverlight 4 Gill Cleeren has a couple posts up... this first is a break-out of the INavigationContentLoader... what all can be done with it, in addition to the flow of the page load process broken out. Working with the RaiseCanExecuteChanged in MVVM Light (Silverlight) Gill Cleeren' latest post is a discussion of the Silverlight ICommand interface and Laurent Bugnion's RaiseCanExecuteChanged in MVVM Light, with example code. WCF RIA Services Part 10 - Exposing Domain Services To Other Clients Brian Noyes has Part 10 in his WCF RIA Services Tutorial series up at SilverlightShow ... with info on, for example, exposint an OData, SOAP, or REST/JSON endpoint, or how to consume them. Cross-Training in Silverlight & Flex–MVVM vs Presentation Model Brian Genisio finished the year off with this post in his on-going Silverlight/Flex seris comparing MVVM vs Presentation Model .. lots of good MVVM/ViewModel tips and code in this post. Sending Windows Phone Screenshots in an Email René Schulte is the perfect guy to be doing this... how about emailing a screenshot directly from inside an app, for instance Laurent's taking a screenshot from inside an app... too cool, Rene! Windows Phone 7 Application Development Tips Andy Schwam has a post up with tips he learned while creating his first WP7 app... lots of good tips, Gestures, Camera, ISO... check it out, could save you some time and tears :) WP7 Tip: Using the CameraCaptureTask for Windows Phone 7 Andy Schwam's most recent post is WP7 dev as well, and has a bunch of tips and code for using the camera, such as capturing an image, resizing, saving... good stuff. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

< Previous Page | 1 2 3  | Next Page >