Search Results

Search found 22 results on 1 pages for 'josemalive'.

Page 1/1 | 1 

  • android listview button control

    - by Josemalive
    Hi, I have an android listview filled with items. Every item has a button. This is the template of the my listview. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:paddingBottom="6dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingLeft="5px" android:paddingTop="5px" android:paddingRight="5px" android:gravity="left"> <TextView android:id="@+id/TextView_test1" android:layout_width="200dip" android:paddingLeft="0px" android:layout_height="wrap_content"/> <TextView android:id="@+id/TextView_test2" android:layout_width="250dip" android:paddingLeft="0px" android:layout_height="wrap_content" android:layout_weight="1"/> <TextView android:id="@+id/TextView_test3" android:layout_width="400dip" android:paddingLeft="0px" android:layout_height="wrap_content" android:layout_weight="1"/> <Button android:id="@+id/Button_buttontest" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/Button_buttontest"/> </LinearLayout> How could i handle the click of each button in the activity code? Each button has the same id "Button_buttontest"? Thanks in advance. Best Regards. Jose

    Read the article

  • Android: List View Selected item -1

    - by Josemalive
    Hi, Im getting a -1 value when i try to get the selected item position on my listview that is already populated. list.setOnItemClickListener ( new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView adapterView, View view,int arg2, long arg3) { int selectedPosition = adapterView.getSelectedItemPosition(); ShowAlert(String.valueOf(selectedPosition)); } } ); To fill my list view i use the following code: SimpleAdapter mSchedule = new SimpleAdapter( this, mylist, R.layout.listviewtest, new String[] {"test1", "test2", "test3"}, new int[] {R.id.TextView_websitename, R.id.TextView_keywords, R.id.TextView_backlink}); Any idea? Thanks in advance. Best Regards. Jose.

    Read the article

  • Asp net MVC controllers and widgets

    - by Josemalive
    Hi, I have some doubts about ASP.Net MVC, and i would like to ask few questions. If i understood well, a controller/action is selected from a httprequest. As one request is used to get one web page, could we call to these controllers "page controllers"? My other question is about the widgets and RenderPartial method. If a widget represent a classic asp.net webcontrol or usercontrol, and i want to render this widget in a lot of pages, how could avoid repeat the logic of the widget if this logic is in the "page controller"? Any help would be appreciated. Thanks in advance. Best Regards. Jose

    Read the article

  • Messing with Encoding and XslCompiledTransform

    - by Josemalive
    Hello, im messing with the encodings. For one hand i have a url that is responding me in UTF-8 (im pretty sure thanks to firebug plugin). Im opening the url reading the content in UTF-8 using the following code: StreamReader reader = new StreamReader(response.GetResponseStream(),System.Text.Encoding.UTF8); For other hand i have a transformation xslt sheet with the following code: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="xml" indent="yes"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> <br/> hello </xsl:copy> </xsl:template> </xsl:stylesheet> This xslt sheet is saved in UTF-8 format too. I use the following code to mix the xml with the xslt: StringWriter writer = new StringWriter(); XslCompiledTransform transformer = new XslCompiledTransform(); transformer.Load(HttpContext.Current.Server.MapPath("xslt\\xsltsheet.xslt"); XmlWriterSettings xmlsettings = new XmlWriterSettings(); xmlsettings.Encoding = System.Text.Encoding.UTF8; transformer.Transform(xmlreader, null, writer); return writer; Then after all im render in the webbrowser the content of this writer and im getting the following error: The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. Switch from current encoding to specified encoding not supported. Error processing resource 'http://localhost:2541/Results.... <?xml version="1.0" encoding="utf-16"?> Im wondering where is finding the UTF-16 encoding take in count that: All my files are saved as UTF-8 The response from the server is in UTF-8 The way of read the xslt sheet is configured as UTF-8. Any help would be appreciated. Thanks in advance. Best Regards. Jose.

    Read the article

  • Jquery get attribute of few ul to create another attribute

    - by Josemalive
    Hello, I have the following HTML: <ul actualpage=0> <li/> <li/> .... </ul> <ul actualpage=0> <li/> <li/> .... </ul> Im trying to get the value of actualpage of each ul and create a new attribute. Its easy but not in one jquery sentence... Its possible? Until now i have the following line (between ## simbols the missing part that i need. /* select all uls with attribute actualpage and create a new attribute on each with the current actualpage value */ $('ul[actualpage]').attr('newactualpage',##Current value of actualpage attr of UL##);

    Read the article

  • Installing visual studio express 2010

    - by Josemalive
    Hello, I would like to create some test web applications with visual studio 2010 express. I installed Microsoft Visual C# 2010 Express, but i dont have type of project web application mvc 2. What should i install if i want to create a web mvc 2 application? Thanks in advance. Best Regards. Jose

    Read the article

  • Fck editor problem

    - by Josemalive
    Hi, Im using FCK Editor control instead a textarea element. I installed it without problems. But when i want to validate it with a Custom validator of ASP.Net 2.0, im not getting the result expected. These lines are the code that i have: <textarea style="width:30px;height:20px;" class="ckeditor" id="txtdescription" runat="server" name="txtdescription" cols="5" rows="10"></textarea> <asp:CustomValidator id="descval" runat="server" ControlToValidate="txtdescription" EnableClientScript="true" Enabled="true" ValidateEmptyText="true" Display="Dynamic" ClientValidationFunction="ValidateTextDesc" Text="*" ErrorMessage="*"/> <asp:Button ID="buttonadd" runat="server" Text="Add text" OnClick="buttonadd_Click" /> And my javascript code that executes the CustomValidator client function is: function ValidateTextDesc(source, args) { var descriptiontext = document.getElementById("txtdescription"); if ((descriptiontext.value.indexOf("<script") != -1) || (descriptiontext.value.length==0)) { args.IsValid=false; } else { args.IsValid = true; } return args.IsValid; } My problem is that i have to click twice my submit button to execute this Client function: Do you know why this issue is happening? Thanks in advance. Regards. Josema.

    Read the article

  • SEM/SEO tasks doubts

    - by Josemalive
    Hello, Actually i think that i have an strong knowledge of SEO, but im having some doubts about the following: I will have to increase the position in Google of certain product pages of a company in the next months. I supposed that not only will be sufficient the following tasks: Improve usability of those pages. Change the pages title. Add meta description and keywords. Url's in a REST way. 301's http header to dont lose page rank for the new URLS Optimizing content for Google. Configure links of the website (follow and no follow attributes) Get more inbounds links (Link building tasks). Create RSS. Put main website in Twitter (using twitter feed) using the RSS. Put main website in Facebook. Create a Youtube channel. Invest in Adwords. Invest in other online advertising companies. Use sitemap.xml and Google Webmaster tools. Use Google Trends to analyze the volume of searches of certain keywords. Use Google Analytics to analyze weak points and good points of your site, and find new oportunities in keywords. Use tools to find new keywords related with your content. Do you have some internet links, or knowledge about all the tasks that a SEO Expert should do? Could you share some knowledge about what kind of business could be do with another companies (B2B) to increase the search engine position of those product pages. Do you know more tecniques about how to get more inbound links? (i only know the link interchange) Thanks in advance. Best Regards. Jose.

    Read the article

  • Sql simple query

    - by Josemalive
    Hello, I have the following table Persons_Companies that shows a relation between persons and companies knowns by these persons: PersonID | CompanyID 1 1 2 1 2 2 3 2 4 2 Imaging that company 1="Google" and company 2 is ="Microsoft", i would like to know the query to have the following result: PersonID | Microsoft | Google 1 0 1 2 1 1 3 1 0 4 1 0 Until this moment i have something similar: select PersonID, case when CompanyID=1 then 1 else 0 end as Google, case when EmpresaID=2 then 1 else 0 end as Microsoft from Persons_Companies My problem is with the persons that knows both companies, i cant imagine how could this query be. Could you give me a hand? Thanks in advance. Best Regards. Josema.

    Read the article

  • Asp net aspx page and webcontrol issue

    - by Josemalive
    Hello, I have a class that inherits from Page, called APage. public abstract class APage: Page { protected Repeater ExampleRepeater; .... protected override void OnLoad(EventArgs e) { if (null != ExampleRepeater) { ExampleRepeater.DataSource = GetData(); ExampleRepeater.DataBind(); } base.OnLoad(e); } } For other hand i have an aspx page called Default that inherits from this APage: public partial class Default : APage { } on the design part of this Default page, i have a repeater: <asp:Repeater ID="ExampleRepeater" runat="server"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem, "Name") %><br/> </ItemTemplate> </asp:Repeater> This repeater is datasourced at the base APage load event, but at this level this web control is null. Do you have any idea why the control is null in the base page? Thanks in advance. Best Regards. Jose.

    Read the article

  • How to display a two column ListView in Android?

    - by Josemalive
    Hi, I have an android application that shows a grid view that shows: 1 2 3 4 GridView gridview=(GridView)findViewById(R.id.GridView_test); DataBaseHelper dbhelper=new DataBaseHelper(this); ArrayList<String> test=new ArrayList<String>(5); backlinksadapter.add("1"); backlinksadapter.add("2"); backlinksadapter.add("3"); backlinksadapter.add("4"); ArrayAdapter mAdapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, test); gridview.setAdapter(mAdapter); By the moment is working, but i would like to show foreach line of the grid, 2 columns with the values of a 2 dimensional array (something like the GridView in ASP.Net - as datasource -). I would like to show: 1 | Person 1 2 | Person 2 3 | Person 3 4 | Person 4 Any idea?

    Read the article

  • Trying to use an Xslt for an xml in asp.net

    - by Josemalive
    Hello, i have the following xslt sheet: <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="nhits" select="Answer[@nhits]"></xsl:variable> <xsl:output method="html" indent="yes"/> <xsl:template match="/"> <div> <xsl:call-template name="resultsnumbertemplate"/> </div> </xsl:template> <xsl:template name="resultsnumbertemplate"> <xsl:value-of select="$nhits"/> matches found </xsl:template> </xsl:stylesheet> And this is the xml that im trying to mix with the previous xslt: <Answer xmlns="exa:com.exalead.search.v10" context="n%3Dsl-ocu%26q%3Dlavadoras" last="9" estimated="false" nmatches="219" nslices="0" nhits="219" start="0"> <time> <Time interrupted="false" overall="32348" parse="0" spell="0" exec="1241" synthesis="15302" cats="14061" kwds="14061"> <sliceTimes>15272 </sliceTimes> </Time> </time> </Answer> Im using a xslcompiledtransform and that's working fine: XslCompiledTransform transformer = new XslCompiledTransform(); transformer.Load(HttpContext.Current.Server.MapPath("xslt\\" + requestvariables["xslsheet"].ToString())); transformer.Transform(xmlreader, null, writer); My problems comes when im trying to put into a variable the "nhits" attribute value placed on the Answer element, but i'm not rendering anything using my xslt sheet. Do you know what could be the cause? Could be the xmlns attribute in my xml file? Thanks in advance. Best Regards. Jose

    Read the article

  • Android simple question

    - by Josemalive
    Hi, I have an android application that shows a grid view that shows: 1 2 3 4 GridView gridview=(GridView)findViewById(R.id.GridView_test); DataBaseHelper dbhelper=new DataBaseHelper(this); ArrayList<String> test=new ArrayList<String>(5); backlinksadapter.add("1"); backlinksadapter.add("2"); backlinksadapter.add("3"); backlinksadapter.add("4"); ArrayAdapter mAdapter=new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, test); gridview.setAdapter(mAdapter); By the moment is working, but i would like to show foreach line of the grid, 2 columns with the values of a 2 dimensional array (something like the GridView in ASP.Net - as datasource -). I would like to show: 1 | Person 1 2 | Person 2 3 | Person 3 4 | Person 4 Any idea? Thanks in advance. Jose.

    Read the article

  • issue with a xmlns

    - by Josemalive
    Hello, I have an xml file and an xslt file. The xml file has a xmlns="exa:com.test" attribute. If i remove this attribute in the xml the xpath sentences in my xslt works. But if i leave it, doesnt work. Im using the following code to mix xml and xslt: XslCompiledTransform transformer = new XslCompiledTransform(); transformer.Load(HttpContext.Current.Server.MapPath("xslt\\searchresults.xslt")); transformer.Transform(xmlreader, null, utf8stringwriter); What im doing wrong? How could i mix xml and xslt if the xml has the xmlns attribute on top? Thanks in advance. Best Regards. Jose

    Read the article

  • Android Asyncronous calls

    - by Josemalive
    Hi, Im making an asyncronous call from a client class to a server class. From this client class i call the method "execute", and in background the server class call the "doInBackground" method. How could i know from the client class when the "doInBackground" is finished? Should i implement an event on the server class and suscribe to it from the client one? Thanks in advance. Best Regards. Josema.

    Read the article

  • Android: How to find the position clicked from the context menu

    - by Josemalive
    Hi, I have a list view filled with data. I set up a context menu for the listview using the following code: list.setOnCreateContextMenuListener ( new View.OnCreateContextMenuListener() { public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo) { AdapterContextMenuInfo mi =(AdapterContextMenuInfo) menuInfo; menu.add(0, 0, 0, "Delete item"); } } ); I have the following method override to control de contextmenu menuitem selected: @Override public boolean onContextItemSelected(MenuItem item) { switch(item.getItemId()) { case 0: ShowAlert("hello from delete item"); break; default: return super.onContextItemSelected(item); } return true; } In this overrided method, how could i find the item of the list view that was clicked? Thanks in advance. Best Regards. Jose

    Read the article

  • SVN delete file

    - by Josemalive
    Hi, My question is simple, if i delete a file in a trunk of an svn repository, could i get the file if i ask for a previous version or the file was deleted forever? Thanks. Best Regards. Jose

    Read the article

  • Regular expression quantifier questions

    - by Josemalive
    Hello, Im trying to find a regular expression that matches this kind of URL: http://sub.domain.com/selector/F/13/K/100546/sampletext/654654/K/sampletext_sampletext.html and dont match this: http://sub.domain.com/selector/F/13/K/10546/sampletext/5987/K/sample/K/101/sample_text.html only if the number of /K/ is minimum 1 and maximum 2 (something with a quantifier like {1,2}) Until this moment i have the following regexp: http://sub\.domain\.com/selector/F/[0-9]{1,2}/[a-z0-9_-]+/ Now i would need a hand to add any kind of condition like: Match this if in the text appears the /K/ from 1 to 2 times at most. Thanks in advance. Best Regards. Josema

    Read the article

  • Starting with asp.net MVC

    - by Josemalive
    Hello, Actually im doing a home page that only have an action called Index() that returns the view Index.ascx. This index page will be composed by lastest news and lastest registered users, i think that create two partial views is the best idea (this way i could use it in other views). for other hand i have a data access class that calls to database for get stuff (get last news, get last users, etc...) My question is simple, should i call to the this data access class in the Index() action of my HomeController, and add to the ViewData the data obtained? I think that this index() action shouldnt be the responsable of passing this data to the partial views, right? Could you give me a hand? im messing too much? ;-) Thanks in advance. Best Regards. Jose

    Read the article

  • Render an url of type ?x=1&y=2 with xslt

    - by Josemalive
    Hello, Im trying to print, using a xslt sheet a url but im having problems with the chars = and &: This is the url that i want to render: <a href="whatever.aspx?x=1&y=2">whatever</a> Im getting that "=" is an unexpected token. How should i have to put the = and the & in a xslt sheet? Thanks in advance. Regards. Jose

    Read the article

1