Search Results

Search found 155 results on 7 pages for 'manuel navarro'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • What would you do if you coded a C++/OO cross-platform framework and realize its laying on your disk

    - by Manuel
    This project started as a development platform because i wanted to be able to write games for mobile devices, but also being able to run and debug the code on my desktop machine too (ie, the EPOC device emulator was so bad): the platforms it currently supports are: Window-desktop WinCE Symbian iPhone The architecture it's quite complete with 16bit 565 video framebuffer, blitters, basic raster ops, software pixel shaders, audio mixer with shaders (dsp fx), basic input, a simple virtual file system... although this thing is at it's first write and so there are places where some refactoring would be needed. Everything has been abstracted away and the guiding principle are: mostly clean code, as if it was a book to just be read object-orientation, without sacrifying performances mobile centric The idea was to open source it, but without being able to manage it, i doubt the software itself would benefit from this move.. Nevertheless, i myself have learned a lot from unmaintained projects. So, thanking you in advance for reading all this... really, what would you do?

    Read the article

  • How to access a XML file in a maven project so it stays available when packaged

    - by Manuel
    I currently started working on a maven web-app project that needs to be launched with the jetty:run-exploded goal for development/debugging in eclipse. Now, I have an XML file which contents I need to access at runtime. My problem is: where to put the file so that the code that does the reading works both in "exploded" and packaged (i.e. in the WAR) mode? Putting the file in src/main/java (so as to be in the classpath) won't cut it since maven filters out all non-java files on packaging. When the file is in src/main/resources, one mean would be to figure out the root path of the project (during eclipse development) and look into that directory - but this won't be the case anymore when the project will be packaged. Of course I could go into writing code that tries to read the file from both locations, but this seems rather cumbersome. Any suggestions?

    Read the article

  • Datatypes for physics

    - by Juan Manuel Formoso
    Hi, I'm currently designing a program that will involve some physics (nothing too fancy, a few balls crashing to each other) What's the most exact datatype I can use to represent position (without a feeling of discrete jumps) in c#? Also, what's the smallest ammount of time I can get between t and t+1? One tick? EDIT: Clarifying: What is the smallest unit of time in C#? [TimeSpan].Tick?

    Read the article

  • How do I show an embedded excel file in a WebPage?

    - by Juan Manuel Formoso
    I want to allow an Excel report to be viewed embedded in a WebPage... is there a way? I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application. I don't want users to download and then open it. Using an iframe wouldn't be a problem, but my preliminary tests weren't successful Any ideas? Is it at all possible?

    Read the article

  • How can I get the assembly last modified date?

    - by Juan Manuel Formoso
    I want to render (for internal debugging/info) the last modified date of an assembly, so I know when was a certain website deployed. Is it possible to get it though reflection? I get the version like this, I'm looking for something similar: Assembly.GetExecutingAssembly().GetName().Version.ToString(); ie: I don't want to open the physical file, get its properties, or something like that, as I'll be rendering it in the master page, and don't want that kind of overhead.

    Read the article

  • How to programmatically set the text of a cell of database in VB.Net?

    - by manuel
    I have a Microsoft Access database file connected to VB.NET. In the database table, I have a 'No.' and a 'Status' column. Then I have a textbox where I can input an integer. I also have a button, which will change the data cell in 'Status' where 'No.' = txtTitleNo.Text(), when I click it. Let's say I want the 'Status' cell to be changed to "Reserved". What codes should I put in the BtnReserve_Click? Here is the code: Public Class theForm Dim con As New OleDb.OleDbConnection Dim ds As New DataSet Dim daTitles As OleDb.OleDbDataAdapter Private Sub theForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=|DataDirectory|\db1.mdb" con.Open() daTitles = New OleDb.OleDbDataAdapter("SELECT * FROM Titles", con) daTitles.Fill(ds, "Titles") DataGridView1.DataSource = ds.Tables("Titles") DataGridView1.AutoResizeColumns() End Sub Private Sub BtnReserve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnReserve.Click Dim daReserve As OleDb.OleDbCommand For i As Integer = 1 TReservedo DataGridView1.RowCount() If i = Val(txtTitleNo.Text()) Then daReserve = New OleDb.OleDbCommand("UPDATE Titles SET Status = 'Reserved' WHERE No = '" & i & "'", con) daReserve.ExecuteNonQuery() End If Next Dim cb As New OleDb.OleDbCommandBuilder(daTitles) daTitles.Update(ds, "Titles") End Sub This code still does not change the 'Status'. What should I do?

    Read the article

  • How to refer to a text in an Ms Access table?

    - by manuel
    I want to refer to a data cell, which if it is equals to some string, it will do something. The codes: If ds.Tables(0).Rows(i)("Status") = "Reserved" Then MessageBox.Show("Can't reserve") End If Is this the correct way to do this? Because I failed doing so..

    Read the article

  • Twitter api and retweets

    - by Juan Manuel
    I'm trying to get the last tweet from the people I follow using the twitter api (http://api.twitter.com/1/statuses/friends.json&screen_name=[username]), but I noticed that if the user's last tweet is a retweet, the json data does not contain a "status" element. Using the "user timeline" api does not work either, the last tweet is the last non retweeted tweet. Is there a way to get the real last status, even if it's a RT, through the twitter API?

    Read the article

  • Reliably converting C preprocessor macros to python code

    - by manual-manuel
    Hi, I have a bunch of C macros the operation of which I need to simulate in python. I saw some pointers to pygccxml or ctypeslib etc. Are these the ways to go ? Or is there something out there that is better ? The C macros if and when they change, I would like the python implementation to be auto generated rather than having to make manual modifications. Hence the question. <my_c_header.h> /* #defines type 1 */ #ifdef OS #define NUM_FLAGS (uint16_t)(3) #define NUM_BITS (uint16_t)(8) #else #define NUM_FLAGS (uint16_t)(6) #define NUM_BITS (uint16_t)(16) #endif #define MAKE_SUB_FLAGS (uint16_t)((1<<NUMFLAGS) -1) #define MAKE_TOTAL_FLAGS(x) (uint16_t)((x & MAKE_SUB_FLAGS) >> NUM_BITS) /* #defines type 2 */ #ifdef OS #DO_SOMETHING(X) os_specifc_process(x) #else #DO_SOMETHING(x) #endif /* #defines type 3 */ enum { CASE0, CASE1, CASE2 } #define MY_CASE_0 ((uint16_t)CASE0) #define MY_CASE_1 ((uint16_t)CASE1) #define MY_CASE_2 ((uint16_t)CASE2) #define /*End of file <my_c_header.h> */ Thanks M

    Read the article

  • addthis sharing buttons adblocker workaround

    - by Manuel
    I just integrated the addthis sharing buttons into my website. I'd like to use the addthis buttons in reason of their tracking and reporting functionality. However they are blocked by adblock plus and other adblockers. Considering that nowaday 30% of internet users use an adblocker I thought of making a work around for those. I integrated manual sharing buttons into my website. So far so good. Do you have any idea on how to hide my manual sharing buttons if the addthis buttons are shown. Or better said, don't hide them if the addthis buttons are removed by a addblocker? Is it possible to detect an adblocker through js? thx, I really appreciate your help!

    Read the article

  • push(ing)_back objects pointers within a loop

    - by Jose Manuel Albornoz
    Consider the following: I have a class CDevices containing, amongst others, a string member class CDevice { public: CDevice(void); ~CDevice(void); // device name std::string Device_Name; etc... } and somewhere else in my code I define another class that contains a vector of pointers to CDevices class CDevice; class CServers { public: CServers(void); ~CServers(void); // Devices vector vector<CDevice*> Devices; etc... } The problem appears in the following lines in my main.c pDevice = new CDevice; pDevice->Device_Name = "de"; Devices.push_back(pDevice); pDevice->Device_Name = " revolotiunibus"; Devices.push_back(pDevice); pDevice->Device_Name = " orbium"; Devices.push_back(pDevice); pDevice->Device_Name = " coelestium"; Devices.push_back(pDevice); for(int i = 0; i < (int)Devices.size(); ++i) cout << "\nLoad name = " << Devices.at(i)->Device_Name << endl; The output I get is " coelestium" repeated four times: each time I push_back a new element into the vector all of the already existing elements take the value of the one which has just been added. I have also tried using iterators to recover each element in the vector with the same results. Could someone please tell me what's wrong here? Thankx

    Read the article

  • MySQL, delete and index hint

    - by Manuel Darveau
    I have to delete about 10K rows from a table that has more than 100 million rows based on some criteria. When I execute the query, it takes about 5 minutes. I ran an explain plan (the delete query converted to select * since MySQL does not support explain delete) and found that MySQL uses the wrong index. My question is: is there any way to tell MySQL which index to use during delete? If not, what ca I do? Select to temp table then delete from temp table? Thank you!

    Read the article

  • Error in Android's clearCheck() for RadioGroup?

    - by Manuel R. Ciosici
    I'm having an issue with RadioGroup's clearChecked(). I'm displaying a multiple choice question to the user and after the user selects an answer I check the answer, give him some feedback and then move to the next question. In the process of moving to the next question I clearCheck on the RadioGroup. Can anyone explain to me why the onCheckedChanged method is called 3 times? Once when the change actually occurs (with the user changes), once when I clearCheck(with -1 as the selected id) and once in between (with the user changes again)? As far as I could tell the second trigger is provoked by clearCheck. Code below: private void checkAnswer(RadioGroup group, int checkedId){ // this makes sure it doesn't blow up when the check is cleared // also we don't check the answer when there is no answer if (checkedId == -1) return; if (group.getCheckedRadioButtonId() == -1) return; // check if correct answer if (checkedId == validAnswerId){ score++; this.giveFeedBack(feedBackType.GOOD); } else { this.giveFeedBack(feedBackType.BAD); } // allow for user to see feedback and move to next question h.postDelayed(this, 800); } private void changeToQuestion(int questionNumber){ if (questionNumber >= this.questionSet.size()){ // means we are past the question set // we're going to the score activity this.goToScoreActivity(); return; } //clearing the check gr.clearCheck(); // give change the feedback back to question imgFeedback.setImageResource(R.drawable.question_mark); //OTHER CODE HERE } and the run method looks like this public void run() { questionNumber++; changeToQuestion(questionNumber); }

    Read the article

  • nhibernate sessionfactory instance more than once on web service

    - by Manuel
    Hello, i have a web service that use nhibernate. I have a singleton pattern on the repositorry library but on each call the service, it creates a new instance of the session factory wich is very expensive. What can i do? region Atributos /// <summary> /// Session /// </summary> private ISession miSession; /// <summary> /// Session Factory /// </summary> private ISessionFactory miSessionFactory; private Configuration miConfiguration = new Configuration(); private static readonly ILog log = LogManager.GetLogger(typeof(NHibernatePersistencia).Name); private static IRepositorio Repositorio; #endregion #region Constructor private NHibernatePersistencia() { //miConfiguration.Configure("hibernate.cfg.xml"); try { miConfiguration.Configure(); this.miSessionFactory = miConfiguration.BuildSessionFactory(); this.miSession = this.SessionFactory.OpenSession(); log.Debug("Se carga NHibernate"); } catch (Exception ex) { log.Error("No se pudo cargar Nhibernate " + ex.Message); throw ex; } } public static IRepositorio Instancia { get { if (Repositorio == null) { Repositorio = new NHibernatePersistencia(); } return Repositorio; } } #endregion #region Propiedades /// <summary> /// Sesion de NHibernate /// </summary> public ISession Session { get { return miSession.SessionFactory.GetCurrentSession(); } } /// <summary> /// Sesion de NHibernate /// </summary> public ISessionFactory SessionFactory { get { return this.miSessionFactory; } } #endregion In wich way can i create a single instance for all services?

    Read the article

  • Can I add a spring mvc filter using jetty with a jar file?

    - by Juan Manuel
    I have a simple web application disguised as a java application (as in, it's a .jar instead of a .war), and I'd like to use a filter for my requests. If it was a .war, I could initialize it with a WebAppContext and specify a web.xml file where I'd have my filter declaration like this <filter> <filter-name>myFilter</filter-name> <filter-class>MyFilterClass</filter-class> </filter> <filter-mapping> <filter-name>myFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> However, I'm using a simple Context to initialize my application with Spring. Server server = new Server(8082); Context root = new Context(server, "/", Context.SESSIONS); DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setContextConfigLocation("classpath:application-context.xml"); root.addServlet(new ServletHolder(dispatcherServlet), "/*"); server.start(); Is there a way to programmatically specify filters for the spring servlet, without using a web.xml file?

    Read the article

  • send() always interrupted by EPIPE

    - by Manuel Abeledo
    I've this weird behaviour in a multithreaded server programmed in C under GNU/Linux. While it's sending data, eventually will be interrupted by SIGPIPE. I managed to ignore signals in send() and treat errno after each action because of it. So, it has two individual sending methods, one that sends a large amount of data at once (or at least tries to), and another that sends a nearly similar amount and slices it in little chunks. Finally, I tried with this to keep it sending data. do { total_bytes_sent += send(client_sd, output_buf + total_bytes_sent, output_buf_len - total_bytes_sent, MSG_NOSIGNAL); } while ((total_bytes_sent < output_buf_len) && (errno != EPIPE)); This ugly piece of code does its work in certain situations, but not always. I'm pretty sure it's not a hardware or ISP problem, as this server is running in six european servers, four in Germany and two in France. Any ideas? Thanks in advance.

    Read the article

  • using AutoCompleteTextField in wicket without String as the generic type

    - by Manuel
    Hi! This question follows this: handling to onchange event of AutoCompleteTextField in wicket I'm trying to use the AutoCompleteTextField with a custom class as the generic type, and to add an AjaxFormComponentUpdatingBehavior. What I mean is I want to have a AutoCompleteTextField<SomeClass> myAutoComplete = ...; and after that add a AjaxFormComponentUpdatingBehavior: myAutoComplete.add(new AjaxFormComponentUpdatingBehavior("onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { System.out.println( "Value: "+getValue() ); } }); The problem is that for some reason, adding that behavior makes the form try to set the model object with a String (even though the AutoCompleteTextField has a generic type of SomeClass), causing a ClassCastException when the onchange event fires. Is there a way to use AutoCompleteTextField without it being AutoCompleteTextField<String>? I couldn't find any example. Thanks for your time! and thanks to the user biziclop for his help in this matter.

    Read the article

  • Can someone help me understand why this is happening?

    - by Juan Manuel Formoso
    I just run into the weirdest thing I've ever encounter. Consider this test page: <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <script language=javascript> function test(myParameter) { alert(myParameter); } </script> </head> <body> <input type="button" value="Strange" onclick="javascript: test(044024);" /> <input type="button" value="Ok" onclick="javascript: test('044024');" /> </body> </html> If I click the "strange" button, I get 18452, if I click the "ok" button I get 044024 Does anyone know what is happening and explain it to me?

    Read the article

  • how to use ByteArrayOutputStream and DataOutputStream simultaneously (Java)

    - by Manuel
    Hi! I'm having quite a problem here, and I think it is because I don't understand very much how I should use the API provided by Java. I need to write an int and a byte[] into a byte[] I thought of using a DataOutputStream to solve the data writing with writeInt(int i) and write(byte[] b), and to be able to put that into a byte array, I should use ByteArrayOutputStream's method toByteArray(). I understand that this classes use the Wrapper pattern, so I had two options: DataOutputStream w = new DataOutputStream(new ByteArrayOutputStream()); or ByteArrayOutputStream w = new ByteArrayOutputStream(new DataOutputStream()); but in both cases, I "loose" a method. in the first case, I can't access the toByteArray method, and in the second, I can't access the writeInt method. How should I use this classes together?

    Read the article

  • Extract specific files in a tar archive using a wildcard

    - by AdrieanKhisbe
    I'm tring for a script to extract only jpeg pictures from an archive containing maky kind of files. To do so I tried first to use: tar -xf MyTar.tar *.jpg but it failed (*.jpg not found) and suggest me to use "--wildcard". So I tried tar -xf MyTar.tar --wildcard *.jpg I did that, but then the same error and a different warning saying yo me that the option "--wildcard" is ambigious. I've been over the manuel pages for tar, but didn't find a clue about the problem thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >