Search Results

Search found 351 results on 15 pages for 'albert diego'.

Page 10/15 | < Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Magento - Mage::getModel not working on remote server

    - by Diego
    I'm struggling with an issue for which I can't find an explanation. I have two development environments that I use for my projects. I created a simple module for Magento and I tested it on one environment. After overcoming all Magento's complications, the module works as expected. This is on XAMPP. I then copied the module to the development Linux environment, on a hosted server, and it crashes miserably. I did some debugging, and I found out that a call to Mage::getModel() returns bool(false) instead of the instance of the Model I requested. I double checked all files and directories, and they match. Database is not involved (not from my side, at least, I don't need tables) and both environments have only me as a User, with Admin permissions. Any suggestion on where should I start looking is welcome, thanks.

    Read the article

  • GridView to excel after create send mail c#

    - by Diego Bran
    I want to send a .xlsx , first I created (It has html code in it) then I used a SMTP server to send it , it does attach the file but when I tried to open it " It says that the file is corrupted etc" any help? Here is my code try { System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); // Render grid view control. gvStock.RenderControl(htw); // Write the rendered content to a file. string renderedGridView = sw.ToString(); File.WriteAllText(@"C:\test\ExportedFile.xls", renderedGridView); // File.WriteAllText(@"C:\test\ExportedFile.xls", p1); } catch (Exception e) { Response.Write(e.Message); } try { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("server"); mail.From = new MailAddress("[email protected]"); mail.To.Add("[email protected]"); mail.Subject = "Test Mail - 1"; mail.Body = "mail with attachment"; Attachment data = new Attachment("C:/test/ExportedFile.xls"); mail.Attachments.Add(data); SmtpServer.Port = 25; SmtpServer.Credentials = new System.Net.NetworkCredential("user", "pass"); // SmtpServer.EnableSsl = true; SmtpServer.UseDefaultCredentials = false; SmtpServer.Send(mail); } catch( Exception e) { Response.Write(e.Message); }

    Read the article

  • How can I control UISlider Value Changed-events frequncy?

    - by Albert
    I'm writing an iPhone app that is using two uisliders to control values that are sent using coreBluetooth. If I move the sliders quickly one value freezes at the receiver, presumably because the Value Changed events trigger so often that the write-commands stack up and eventually get thrown away. How can I make sure the events don't trigger too often? Edit: Here is a clarification of the problem; the bluetooth connection sends commands every 105ms. If the user generates a bunch of events during that time they seem to que up. I would like to throw away any values generated between the connection events and just send one every 105ms. This is basically what I'm doing right now: -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } What I'm asking is how to implement something like -(IBAction) sliderChanged:(UISlider *)sender{ static int8_t value = 0; if (105msHasPassed) { int8_t new_value = (int8_t)sender.value; if ( new_value > value + threshold || new_value < value - threshold ) { value = new_value; [btDevice writeValue:value]; } } }

    Read the article

  • Python subprocess.Popen hangs in 'for l in p.stdout' until p terminates, why?

    - by Albert
    I have that code: #!/usr/bin/python -u localport = 9876 import sys, re, os from subprocess import * tun = Popen(["./newtunnel", "22", str(localport)], stdout=PIPE, stderr=STDOUT) print "** Started tunnel, waiting to be ready ..." for l in tun.stdout: sys.stdout.write(l) if re.search("Waiting for connection", l): print "** Ready for SSH !" break The "./newtunnel" will not exit, it will constantly output more and more data to stdout. However, that code will not give any output and just keeps waiting in the tun.stdout. When I kill the newtunnel process externally, it flushes all the data to tun.stdout. So it seems that I can't get any data from the tun.stdout while it is still running. Why is that? How can I get the information? Note that the default bufsize for Popen is 0 (unbuffered). I can also specify bufsize=0 but that doesn't change anything.

    Read the article

  • Python program to search for specific strings in hash values (coding help)

    - by Diego
    Trying to write a code that searches hash values for specific string's (input by user) and returns the hash if searchquery is present in that line. Doing this to kind of just learn python a bit more, but it could be a real world application used by an HR department to search a .csv resume database for specific words in each resume. I'd like this program to look through a .csv file that has three entries per line (id#;applicant name;resume text) I set it up so that it creates a hash, then created a string for the resume text hash entry, and am trying to use the .find() function to return the entire hash for each instance. What i'd like is if the word "gpa" is used as a search query and it is found in s['resumetext'] for three applicants(rows in .csv file), it prints the id, name, and resume for every row that has it.(All three applicants) As it is right now, my program prints the first row in the .csv file(print resume['id'], resume['name'], resume['resumetext']) no matter what the searchquery is, whether it's in the resumetext or not. lastly, are there better ways to doing this, by searching word documents, pdf's and .txt files in a folder for specific words using python (i've just started reading about the re module and am wondering if this may be the route, rather than putting everything in a .csv file.) def find_details(id2find): resumes_f=open("resume_data.csv") for each_line in resumes_f: s={} (s['id'], s['name'], s['resumetext']) = each_line.split(";") resumetext = str(s['resumetext']) if resumetext.find(id2find): return(s) else: print "No data matches your search query. Please try again" searchquery = raw_input("please enter your search term") resume = find_details(searchquery) if resume: print resume['id'], resume['name'], resume['resumetext']

    Read the article

  • Threads are blocked in malloc and free, virtual size

    - by Albert Wang
    Hi, I'm running a 64-bit multi-threaded program on the windows server 2003 server (X64), It run into a case that some of the threads seem to be blocked in the malloc or free function forever. The stack trace is like follows: ntdll.dll!NtWaitForSingleObject() + 0xa bytes ntdll.dll!RtlpWaitOnCriticalSection() - 0x1aa bytes ntdll.dll!RtlEnterCriticalSection() + 0xb040 bytes ntdll.dll!RtlpDebugPageHeapAllocate() + 0x2f6 bytes ntdll.dll!RtlDebugAllocateHeap() + 0x40 bytes ntdll.dll!RtlAllocateHeapSlowly() + 0x5e898 bytes ntdll.dll!RtlAllocateHeap() - 0x1711a bytes MyProg.exe!malloc(unsigned __int64 size=0) Line 168 C MyProg.exe!operator new(unsigned __int64 size=1) Line 59 + 0x5 bytes C++ ntdll.dll!NtWaitForSingleObject() ntdll.dll!RtlpWaitOnCriticalSection() ntdll.dll!RtlEnterCriticalSection() ntdll.dll!RtlpDebugPageHeapFree() ntdll.dll!RtlDebugFreeHeap() ntdll.dll!RtlFreeHeapSlowly() ntdll.dll!RtlFreeHeap() MyProg.exe!free(void * pBlock=0x000000007e8e4fe0) C BTW, the param values passed to the new operator is not correct here maybe due to optimization. Also, at the same time, I found in the process Explorer, the virtual size of this program is 10GB, but the private bytes and working set is very small (<2GB). We did have some threads using virtualalloc but in a way that commit the memory in the call, and these threads are not blocked. m_pBuf = VirtualAlloc(NULL, m_size, MEM_COMMIT, PAGE_READWRITE); ...... VirtualFree(m_pBuf, 0, MEM_RELEASE); This looks strange to me, seems a lot of virtual space is reserved but not committed, and malloc/free is blocked by lock. I'm guessing if there's any corruptions in the memory/object, so plan to turn on gflag with pageheap to troubleshoot this. Does anyone has similar experience on this before? Could you share with me so I may get more hints? Thanks a lot!

    Read the article

  • [Android] Show default selection color for custom listview

    - by Diego
    Hello, I have a listview with a custom BaseAdapter. Each row of the listview has a TextView and a CheckBox. The problem is when I click (or touch) any row, the textview foreground becomes gray, instead of the default behavior (background - green, textview foreground - white). Here is the code: row.xml: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" style="@style/layout"> <TextView android:id="@+id/main_lv_item_textView" style="@style/textViewBig" android:layout_alignParentLeft="true"/> <CheckBox android:id="@+id/main_lv_item_checkBox" style="@style/checkBox" android:layout_width="wrap_content" android:layout_alignParentRight="true"/> </RelativeLayout> Custom Adapter: public class CustomAdapter extends BaseAdapter { private List<Profile> profiles; private LayoutInflater inflater; private TextView tvName; private CheckBox cbEnabled; public CustomAdapter(List<Profile> profiles) { this.profiles = profiles; inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } public int getCount() { return profiles.size(); } public Object getItem(int position) { return profiles.get(position); } public long getItemId(int position) { return position; } public View getView(final int position, View convertView, ViewGroup parent) { View row = inflater.inflate(R.layout.main_lv_item, null); final Profile profile = profiles.get(position); tvName = (TextView) row.findViewById(R.id.main_lv_item_textView); registerForContextMenu(tvName); cbEnabled = (CheckBox) row.findViewById(R.id.main_lv_item_checkBox); tvName.setText(profile.getName()); if (profile.isEnabled()) { cbEnabled.setChecked(true); } tvName.setOnClickListener(new OnClickListener() { public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString(PROFILE_NAME_KEY, profile.getName()); Intent intent = new Intent(context, GuiProfile.class); intent.putExtras(bundle); startActivity(intent); } }); tvName.setOnLongClickListener(new OnLongClickListener() { public boolean onLongClick(View v) { selectedProfileName = ((TextView) v).getText().toString(); return false; } }); cbEnabled.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (!profile.isEnabled()) { for (Profile profile : profiles) { if (profile.isEnabled()) { profile.setEnabled(false); Database.getInstance().storeProfile(profile); } } } profile.setEnabled(isChecked); Database.getInstance().storeProfile(profile); updateListView(); } }); return row; } } Any help would be appreciated.

    Read the article

  • SQL Script To Generate a Database Dictionary **With Linked Fields**

    - by Albert
    I would like to generate a Data Dictionary for a SQL Server 2008 database that has one row for each field, and the following columns: table_name field_name data_type link_table (for when the field in question is a foreign key) link_field (for when the field in question is a foreign key) I can get the first 3 columns with something like the SQL script below...but I don't know how to get the last two columns of foreign key information. INFORMATION_SCHEMA.TABLE_CONSTRAINTS gets close, but doesn't have the data I'm looking for. Can someone help with this point? SELECT TABLE_NAME,COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS Secondarily if anyone has any suggestions on additional fields which would be helpful please post.

    Read the article

  • git: better way for git revert without additional reverted commit

    - by Albert
    I have a commit in a remote+local branch and I want to throw that commit out of the history and put some of them into an own branch. Basically, right now I have: D---E---F---G master And I want: E---G topic / D master That should be both in my local and in the (there is only one, called origin) remote repository. Which is the cleanest way to get that? Also, there are also other people who have cloned that repo and who have checked out the master branch. If I would do such a change in the remote repo, would 'git pull' work for them to get also to the same state?

    Read the article

  • How a web app identify if a click came from another web app via code?

    - by Diego
    Hi, we have a web application that users can take online reports from ou ERP system data... And we have another web application that is used by our teachers and employees. We can't change the ERP web app because its a closed DLL, in this case we made some extended functionality in our custom internal web app and we are willing to put this functionality on the "menu" of the ERP web app. I need to integrate the two applications in the following way: When I click in the menu of the ERP web app, I want that our internal web app assert that the click have come from our ERP web app and not typed in the URL, this is possible?

    Read the article

  • hibernate connection tomcat

    - by willson albert
    I was working in a web site (production) in Tomcat 7, so now I created a copy of this website and change the hibernate.cfg.xml to work with another database ( testing ). <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/test</property> <property name="hibernate.connection.username">fake</property> <property name="hibernate.connection.password">fake</property> However, when I open the new new site, everything is ok, but, is still working with the production database even when I changed the connection string. Anybody knows if I need to change another thing?. I missing something?. I am quite new in tomcat. Thanks in advance.

    Read the article

  • How is the default constructor of System.Drawing.Graphics removed?

    - by Albert Iordache
    When I try to create an object of Graphics, why doesn't the following work? System.Drawing.Graphics graphicsObj = new System.Drawing.Graphics(); (I am aware that I could create a private System.Windows.Forms.Panel Obj; and then do CreateGraphics() if I wanted it to work) I tried to find a custom constructor for Graphics, but I couldn't find one. Where did Microsoft define it, or how did it block it?

    Read the article

  • what are the differences in the WebKit nightly build binary and in the Safari binary?

    - by Albert
    I know what the projects are about: Safari is Apples browser. WebKit is the engine used in Safari (and in many other browsers) which is open source. The WebKit source code contains also code to compile it as a standalone application. You can download the nightly build of WebKit here: http://nightly.webkit.org/ I have compared some of those nightly builds of WebKit to the official Safari application. And besides the slightly different logo and the different name, I haven't really seen any difference. Are there any? Or is it just the branding? Edit: I just tried again with the current nightly build of today and it even names itself "Safari" now.

    Read the article

  • How to avoid concurrent execution of a time-consuming task without blocking?

    - by Diego V
    I want to efficiently avoid concurrent execution of a time-consuming task in a heavily multi-threaded environment without making threads wait for a lock when another thread is already running the task. Instead, in that scenario, I want them to gracefully fail (i.e. skip its attempt to execute the task) as fast as possible. To illustrate the idea considerer this unsafe (has race condition!) code: private static boolean running = false; public void launchExpensiveTask() { if (running) return; // Do nothing running = true; try { runExpensiveTask(); } finally { running = false; } } I though about using a variation of Double-Checked Locking (consider that running is a primitive 32-bit field, hence atomic, it could work fine even for Java below 5 without the need of volatile). It could look like this: private static boolean running = false; public void launchExpensiveTask() { if (running) return; // Do nothing synchronized (ThisClass.class) { if (running) return; running = true; try { runExpensiveTask(); } finally { running = false; } } } Maybe I should also use a local copy of the field as well (not sure now, please tell me). But then I realized that anyway I will end with an inner synchronization block, that still could hold a thread with the right timing at monitor entrance until the original executor leaves the critical section (I know the odds usually are minimal but in this case we are thinking in several threads competing for this long-running resource). So, could you think in a better approach?

    Read the article

  • Set global maxRequestLength value in web.config- for all pages

    - by Albert
    I currently have my web.config location section set up like this <location path="page1.aspx"> <system.web> <httpRuntime maxRequestLength="65536" executionTimeout="3600"/> </system.web> </location> <location path="page2.aspx"> <system.web> <httpRuntime maxRequestLength="65536" executionTimeout="3600"/> </system.web> </location> etc with one entry for each page. How can I set the maxRequestLength for all pages, instead of one at a time?

    Read the article

  • character_set_filesystem not present in show variables

    - by Diego
    I'm a little worried about the absence of this variable when I execute the show variables command. This is what I get when I execute show variables like 'char%': character_set_client utf8 character_set_connection utf8 character_set_database utf8 character_set_results utf8 character_set_server utf8 character_set_system utf8 character_sets_dir /usr/share/mysql/charsets/ I wonder why this is happening. What does it mean? can I just add it to the my.cnf file? Thank you... Edit: Sorry, I recently noted that I didn't specify which variable we're talking about (though I said it in the title). The variable is character_set_filesystem. Thanks.

    Read the article

  • sql statement to access sql

    - by Mitch Albert
    SELECT eventID, eventRedacteur, eventEvenement, eventGenreId, eventDatum, eventLocatieId, eventLocatieNaam, eventPlaatsId, eventBijzonderheden, eventBezoekers, lokId, lokNaam, lokUrl, pltsId, (SELECT pltsNaam FROM tblAgendaPlaatsen WHERE pltsId=tblAgendaPunten.eventPlaatsId) AS eventPlaatsNaam, (SELECT genreNaam FROM tblAgendaGenre WHERE genreId=tblAgendaPunten.eventGenreId) AS eventGenre, lokadres, lokhuisnr FROM tblAgendaPunten LEFT JOIN tblAgendaLocaties ON eventLocatieId=tblAgendaLocaties.lokId i get a join not supported error. I also tryed to remake the sql in access, but no luck. Anyone can help?

    Read the article

  • include and Get not working on index

    - by diego
    I have a problem with my index.php, i have this small script that decides what content to deliver <?php $clase = $_GET['clase']; if ($clase == empresa) {include ("empresa.php");} elseif ($clase == productos) {include("productos.php");} else {include ($_SERVER['DOCUMENT_ROOT']."/inicio.html"); } ?> it works when i go to www.mysite.com/index.php but when i go to www.mysite.com it doesnt and i cant just figure our why.

    Read the article

  • AppEngine Outage? What's happening?

    - by Albert
    I'm getting a lot of 500 errors recently (both static and dynamic requests). Making my application unavailable. The logs say the following: A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. (Error code 121) The same code has been working well for quite some time. What's happening now? I'm using the High Replication Datastore and Python 2.5.

    Read the article

  • Subversion Question - How to skip a revision...

    - by Albert
    So say I have the three latest revisions of an aspx file: 55,56, and 57. Revision 56 added a feature that I want to remove, but I also want to have the new features deployed in version 57. Is there any way I can merge version 55 with 57, leaving revision 56 out of the picture? If it matters, I'm using Tortoise SVN and Visual SVN, but I normally just use Tortoise. Thanks for any ideas.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15  | Next Page >