Search Results

Search found 175 results on 7 pages for 'joao rodrigo leao'.

Page 7/7 | < Previous Page | 3 4 5 6 7 

  • waiting for 2 different events in a single thread

    - by João Portela
    component A (in C++) - is blocked waiting for alarm signals (not relevant) and IO signals (1 udp socket). has one handler for each of these. component B (java) - has to receive the same information the component A udp socket receives. periodicaly gives instructions that should be sent through component A udp socket. How to join both components? it is strongly desirable that: the changes to attach component B to component A are minimal (its not my code and it is not very pleasent to mess with). the time taken by the new operations (usually communicating with component B) interfere very little with the usual processing time of component A - this means that if the operations are going to take a "some" time I would rather use a thread or something to do them. note: since component A receives udp packets more frequently that it has component B instructions to forward, if necessary, it can only forward the instructions (when available) from the IO handler. my initial ideia was to develop a component C (in C++) that would sit inside the component A code (is this called an adapter?) that when instanciated starts the java process and makes the necessary connections (that not so little overhead in the initialization is not a problem). It would have 2 stacks, one for the data to give component B (lets call it Bstack) and for the data to give component A (lets call it Astack). It would sit on its thread (lets call it new-thread) waiting for data to be available in Bstack to send it over udp, and listen on the udp socket to put data on the Astack. This means that the changes to component A are only: when it receives a new UDP packet put it on the Bstack, and if there is something on the Astack sent it over its UDP socket (I decided for this because this socket would only be used in the main thread). One of the problems is that I don't know how to wait for both of these events at the same time using only one thread. so my questions are: Do I really need to use the main thread to send the data over component A socket or can I do it from the new-thread? (I think the answer is no, but I'm not sure about race conditions on sockets) how to I wait for both events? boost::condition_variable or something similar seems the solution in the case of the stack and boost::asio::io_service io_service.run() seems like the thing to use for the socket. Is there any other alternative solution for this problem that I'm not aware of? Thanks for reading this long text but I really wanted you to understand the problem.

    Read the article

  • Difficulty with sql query

    - by João Madureira Pires
    I have the following tables: TableA (id, tableB_id, tableC_id) TableB (id, expirationDate) TableC (id, expirationDate) I want to retrieve all the results from TableA ordered by tableB.expirationDate and tableC.expirationDate. How can I do this?

    Read the article

  • how to use use case relations - uml

    - by joao alves
    Heys guys! Im have been study UML and im trying to to design the use case diagram of a problem. Lets supose my app consists in this: Two Requesites: - create teams - create players This is the deal: A user can create a team, and after create a team he can create players for that team(not required). But in this app there are multiple users, and a user can create a team and other user can create players. The only constraint is that to create players must exist alreay a team. I research and i end up a little confuse. If i get the concepts of relations on use case diagrams right, i think i should have the folowwing two use cases: [use case - create team] <-------extends---- [use case - create player] I need opinions,Is this the proper solution? or should i have two not related use cases? Thanks in advance, and im sorry my english.

    Read the article

  • Difficults on sql query

    - by João Madureira Pires
    I have the following tables: TableA (id, tableB_id, tableC_id) TableB (id, expirationDate) TableC (id, expirationDate) I want to retrieve all the results from TableA ordered by tableB.expirationDate and tableC.expirationDate. thanks

    Read the article

  • Shopping Cart with multiple orders in ASP

    - by Joao Heleno
    I'm building an e-commerce website in ASP.Net/C# and I'm having some difficulties with my shopping cart... I want my costumers to be able to say "I want X boxes, and each box carries Y items". Let's say, for instance, my website sells flowers. A client logs in and then chooses X bouquets and then for each bouquet he adds flowers from the catalog. Can you point me out some links or tips in order to achieve this behaviour? Thanks

    Read the article

  • Bash script to (more or less) reliably check if the internet is up

    - by João Portela
    I need a bash script to put in a cron job that every minute checks if the internet is up. This is how I did it: #! /bin/sh host1=google.com host2=wikipedia.org curr_date=`date +"%Y%m%d%H%M"` echo -n "${curr_date};" ((ping -w5 -c3 $host1 || ping -w5 -c3 $host2) > /dev/null 2>&1) && echo "up" || (echo "down" && exit 1) How would you do it? Which hosts would you ping? Thanks in advance.

    Read the article

  • Warn user when new data is inserted on database

    - by João Menighin
    I don't know how to search about this so I'm kinda lost (the two topics I saw here were closed). I have a news website and I want to warn the user when a new data is inserted on the database. I want to do that like here on StackOverflow where we are warned without reloading the page or like in facebook where you are warned about new messages/notifications without reloading. Which is the best way to do that? Is it some kind of listener with a timeout that is constantly checking the database? It doesn't sounds efficient... Thanks in advance.

    Read the article

  • Pass Success variable to code

    - by João Dias
    How can I pass a variable that has been calculated in the success callback of an ajax function, to the document.ready ? I have this code function loadActions() { var countDiv; $.ajax({ type: "POST", cache: false, url:"modules/actions/actions.php", success : function (data) { $("#actions-container").html(data); $('.action-details').hide(); countDiv = $('.action-tab-odd').length + $('.action-tab-even').length ; } }); return countDiv; } $(document).ready(function(){ var count = loadActions(); }); But count is allways undefined. How can I get this to work? Thank you

    Read the article

  • Oracle ACEs / ACE Directors in the OTN Lounge - JavaOne Latin America 2012

    - by Bob Rhubart
    What's an Oracle ACE? Oracle ACEs and Oracle ACE Directors are community members who have demonstrated both community leadership and expertise with Oracle technologies. You'll get a chance to interact with several Oracle ACEs and Oracle ACE Directors in the mini theater in the OTN Lounge this week during JavaOne Latin America 2012 in São Paulo, Brazil. Tuesday, 4 December 2012 Presentation Presenter Presenter title and company 4:30 – 4:50 Co-existence between Applications' Unlimited and Fusion Applications Gustavo Gonzales, Oracle ACE Director CTO, IT Convergence 4:50 – 5:10 Pipeline Table Functions Marcelo Ochoa, Oracle ACE CTO, Scotas.com 5:10 - 5:30 Automatic Diagnostic Repository (ADR) Day-to-Day Rodrigo Almeida, Oracle ACE CDS - Condomínio de Soluções Corporativas Wednesday, 5 December 2012 Presentation Presenter Presenter title and company 4:30 – 4:50 TBA 4:50 – 5:10 Oracle VM Template - Facilitating the Construction Environment. David Siqueira, Oracle ACE CDS Condominio de Soluções 5:10 – 5:30 Database Migration with Minimal Downtime Marcus Vinicius Miguel Pedro, Oracle ACE Discover

    Read the article

  • Remove gap in wordpress posts in IE

    - by Martin Ingolf
    I'm using a modified version of Modern Clix by Rodrigo Galindez on my website, and I've encountered a problem with gaps on top of every one of my posts in IE. The gap is the size of my left-hand sidebar and doesn't appear in firefox. Ex.: http://martiningolf.dk/?page%5Fid=273 If anyone knows how to solve this problem, It'd make me happy.

    Read the article

  • Which command would replace IDENTITY INSERT ON/OFF from SQLServer in Oracle?

    - by rodrigoq
    Hello, I have to migrate this query (simplified here) from T-SQL to ORACLE SET IDENTITY_INSERT table ON INSERT INTO table (id, value) VALUES (1, 2) SET IDENTITY_INSERT table OFF id being an Identity field in SQLServer. I have the same table with a sequence in ORACLE, I couldn't find a snippet that shows how to disable the sequence and set it to start again with the MAX(id) + 1. Any ORACLE expert can help me with this? Thanks, Rodrigo.

    Read the article

  • Vista Enterprise doesn't find logon servers in a network with 802.1x authentication

    - by jneves
    In a network with 802.1x configuration and a samba server configured in the domain, I have a radius server that delegates the authentication against the samba domain for users (using LDAP). The radius defines which VLAN the user is supposed to have access. I'm trying to put a Windows Vista Enterprise in the same network, but it attempts to logon the domain before authenticating against the network in 802.1x and it doesn't find any logon servers. In the radius logs I see the machine trying to authenticate with 'host/'. Does Vista enterprise require that I put it in a network with access to the logon server at that point? Thanks in advance, João Miguel Neves

    Read the article

  • Java Spotlight Episode 35: JVM Performance and Quality

    - by Roger Brinkley
    Tweet Interview with Vladimir Ivanov, Ivan Krylov, Sergey Kuksenko on the JDK 7 Java Virtual Machine performance and quality. Joining us this week on the Java All Star Developer Panel are Dalibor Topic, Java Free and Open Source Software Ambassador, and Alexis Moussine-Pouchkine, Java EE Developer Advocate. Right-click or Control-click to download this MP3 file. You can also subscribe to the Java Spotlight Podcast Feed to get the latest podcast automatically. If you use iTunes you can open iTunes and subscribe with this link: Java Spotlight Podcast in iTunes. Show Notes News Java 7 Launch Event GlassFish 3.1.1 re-planning done, first RC on July 7th, lots of component updates following customer and community feedback Mojarra 2.1.2 is here, just a little ahead of the GlassFish 3.1.1 release. In other JSF-related news, JSF 2.0 has a first expert draft New OpenJDK Project proposed: JDK 7 Update Events June 20-23 JAX, San Jose, CA June 21 Java + MySQL Webinar at 9:00 AM PDT June 21-23 JaZoon, Zurich, Switzerland June 22nd and 28th GlassFish Webinars (one in Portuguese) June 29-July 2 12th Forum Internatioal Software Livre, Porto Alegre, Brazil July 3, Sao Jose do Rio Preto, Brazil July 5, Brasilia, Brazil (DFJUG) July 6, Goiania, Brazil (GOJava) July 6-10 The Developers Conference, Sao Paulo, Brazil July 7 Java 7 Launch Event live in Redwood Shores, CA; Sao Paulo, BR; London, England. July 9, Joao Pessoa, Brazil (PBJUG) July 11, Natal, Brazil (JavaRN) July 14, Fortaleza, Brazil (CEJUG) July 16, Salvador, Brazil (JavaBahia) July 19, Toledo, Brazil (UNIPAR) July 21, Maringa, Brazil (RedFoot) Feature interview This weeks feature interview is with Vladimir Ivanov, HotSpot JVM Quality Engingeer;  Ivan Krylov, Licensee Engineering;  and Sergey Kuksenko, Java SE Performance Team on the JDK 7 Java Virtual Machine peformance and quality. What's Cool Ongoing OpenJDK Bylaws ratification results Show Transcripts Transcript for this show is available here when available

    Read the article

  • links for 2011-03-04

    - by Bob Rhubart
    Joao Oliveira: Forms and Reports 11g Fusion Startup Script "After Fusion Middleware 11g Linux installation (Weblogic, Forms, Reports, Discoverer and Portal or others) probably most of the newcomers will wonder how to create a startup script to start the Weblogic managed Servers when the server starts up or reboots." (tags: oracle fusionmiddleware weblogic) Anthony Shorten: SOA Suite Integration: Part 3: Loading files Anthony says: "One of the most common scenarios in SOA Integration is the loading of a file into the product from an external source. In Oracle SOA Suite there is a File Adapter that can process many file types into your BPEL process." (tags: oracle otn soa soasuite) Francisco Munoz Alvarez: Playing with Oracle 11gR2, OEL 5.6 and VirtualBox 4.0.2 (1st Part) Oracle ACE Francisco Munoz Alvarez kicks off a tutorial on creating an Oracle Database 11gR2 instance using Oracle VirtualBox and OEL. (tags: oracle database virtualbox virtualization) ORACLENERD: VirtualBox and Shared Folders Oracle ACE Chet Justice shares some tips. (tags: oracle otn oracleace virtualization virtualbox) Chris Muir: Check out the ADF content at this year's ODTUG KScope11 conference Oracle ACE Director Chris Muir shares information on this year's ODTUD Kaleidoscope event in Long Beach, CA, June 26-30. (tags: oracle otn oracleace odtug adf) Edwin Biemond: Setting a virtual IP on a specific Network interface with WebLogic 10.3.4 PS3 Edwin says: "If you want High Availability in WebLogic you need to enable the WebLogic server migration, configure the nodemanager, use a virtual / floating IP in your managed servers and channels." (tags: oracle otn oracleace highavailability weblogic virtualization) Markus Eisele: High Performance JPA with GlassFish and Coherence - Part 3 Markus says: "In this third part of my four part series I'll explain strategy number two of using Coherence with EclipseLink and GlassFish. This is all about using Coherence as Second Level Cache (L2) with EclipseLink." (tags: oracle otn oracleace glassfish coherence) Michel Schildmeijer: Set Oracle ESB montoring with Enterprise Manager Grid Control "Monitoring your Oracle SOA Suite environment...can be very complicated, but if you are using Grid Control, Oracle provides you the SOA Management Pack. Unfortunately this SOA Management Pack has pretty detailed OOTB info about BPEL, but for ESB you won’t find any OOTB metrics." (tags: oracle otn soa grid servicebus)

    Read the article

  • Banco Espírito Santo Increases Sales Campaign Success Rate with Siebel CRM

    - by Tony Berk
    Banco Espírito Santo (BES), founded in 1869, is the second-largest private financial institution in Portugal with a 20.3% domestic market share, 2.1 million customers, and more than 700 in-country branches. It also has a strong international presence with operations in 23 countries and four continents. With strong growth in its major markets, BES needed a modern, cost-effective, scalable, and reliable customer relationship management (CRM) solution for its retail operations. The bank wanted to optimize client relationship management and integrate all customer touch points and service channels to improve the success of its sales and marketing initiatives. BES implemented the same CRM solution as many other leading banks: Oracle's Siebel CRM. With Siebel CRM 8.1 and other Oracle solutions, BES significantly increased sales of its new financial products across all channels by up to 25%, and it expects to increase annual revenue by up US$4 million annually. It also improved the success rate of bank branch sales, marketing, and lead generation campaigns by nearly 10%. “We are very happy with Oracle’s Siebel CRM applications. We already knew that this was the best solution available, but it has surpassed our best expectations,” said João Manaças, Customer Relationship Management Manager, Personal Marketing Department, Banco Espírito Santo. Click here to learn more about BES's use of Siebel CRM.

    Read the article

  • Making an Ajax request to a page method in ASP.NET MVC 2

    - by JLago
    I'm trying to call a page method belonging to a MVC Controller from another site, by means of: $.ajax({ type: "GET", url: "http://localhost:54953/Home/ola", data: "", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { console.log(data.Name); } }); the method code is as follows, really simple, just to test: public ActionResult ola() { return Json(new ActionInfo() { Name = "ola" },JsonRequestBehavior.AllowGet); } I've seen this aproach being suggested here, and I actually like it a lot, should it work... When I run this, firebug gets a 200 OK, but the data received is null. I've tried a lot of different approaches, like having the data in text (wish grants me "(an empty string)" instead of just "null") or returning string in the server method... Can you tell me what am I doing wrong? Thank you in advance, João

    Read the article

  • hello-1.mod.c:14: warning: missing initializer (near initialization for '__this_module.arch.unw_sec_init')

    - by Sompom
    I am trying to write a module for an sbc1651. Since the device is ARM, this requires a cross-compile. As a start, I am trying to compile the "Hello Kernel" module found here. This compiles fine on my x86 development system, but when I try to cross-compile I get the below error. /home/developer/HelloKernel/hello-1.mod.c:14: warning: missing initializer /home/developer/HelloKernel/hello-1.mod.c:14: warning: (near initialization for '__this_module.arch.unw_sec_init') Since this is in the .mod.c file, which is autogenerated I have no idea what's going on. The mod.c file seems to be generated by the module.h file. As far as I can tell, the relevant parts are the same between my x86 system's module.h and the arm kernel header's module.h. Adding to my confusion, this problem is either not googleable (by me...) or hasn't happened to anyone before. Or I'm just doing something clueless that anyone with any sense wouldn't do. The cross-compiler I'm using was supplied by Freescale (I think). I suppose it could be a problem with the compiler. Would it be worth trying to build the toolchain myself? Obviously, since this is a warning, I could ignore it, but since it's so strange, I am worried about it, and would like to at least know the cause... Thanks very much, Sompom Here are the source files hello-1.mod.c #include <linux/module.h> #include <linux/vermagic.h> #include <linux/compiler.h> MODULE_INFO(vermagic, VERMAGIC_STRING); struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { .name = KBUILD_MODNAME, .init = init_module, #ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module, #endif .arch = MODULE_ARCH_INIT, }; static const struct modversion_info ____versions[] __used __attribute__((section("__versions"))) = { { 0x3972220f, "module_layout" }, { 0xefd6cf06, "__aeabi_unwind_cpp_pr0" }, { 0xea147363, "printk" }, }; static const char __module_depends[] __used __attribute__((section(".modinfo"))) = "depends="; hello-1.c (modified slightly from the given link) /* hello-1.c - The simplest kernel module. * * Copyright (C) 2001 by Peter Jay Salzman * * 08/02/2006 - Updated by Rodrigo Rubira Branco <[email protected]> */ /* Kernel Programming */ #ifndef MODULE #define MODULE #endif #ifndef LINUX #define LINUX #endif #ifndef __KERNEL__ #define __KERNEL__ #endif #include <linux/module.h> /* Needed by all modules */ #include <linux/kernel.h> /* Needed for KERN_ALERT */ static int hello_init_module(void) { printk(KERN_ALERT "Hello world 1.\n"); /* A non 0 return means init_module failed; module can't be loaded.*/ return 0; } static void hello_cleanup_module(void) { printk(KERN_ALERT "Goodbye world 1.\n"); } module_init(hello_init_module); module_exit(hello_cleanup_module); MODULE_LICENSE("GPL"); Makefile export ARCH:=arm export CCPREFIX:=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-linux- export CROSS_COMPILE:=${CCPREFIX} TARGET := hello-1 WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-sign-compare -Wno-unused -Werror UNUSED_FLAGS := -std=c99 -pedantic EXTRA_CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} KDIR ?= /home/developer/src/ltib-microsys/ltib/rpm/BUILD/linux-2.6.35.3 ifneq ($(KERNELRELEASE),) # kbuild part of makefile obj-m := $(TARGET).o else # normal makefile default: clean $(MAKE) -C $(KDIR) M=$$PWD .PHONY: clean clean: -rm built-in.o -rm $(TARGET).ko -rm $(TARGET).ko.unsigned -rm $(TARGET).mod.c -rm $(TARGET).mod.o -rm $(TARGET).o -rm modules.order -rm Module.symvers endif

    Read the article

  • Community Launch: Londrina

    - by anobre
    Hoje (20/03/2010) fizemos o evento Community Launch em Londrina. O dia começou às 09:00h com abertura online realizada pela Microsoft (Rodrigo Dias, Fabio Hara e Rogério Cordeiro), apresentando a Copa Microsoft de Talentos, informações sobre o Road Show <LINK> e produtos Microsoft que estarão no foco deste ano. Após a abertura, alguns influenciadores Microsoft da região apresentaram algumas palestras técnicas, mais voltadas a DEV, sobre os assuntos: As Novidades da Plataforma .NET (André Nobre) - Download Entity Framework 4 (Carlos dos Santos) Silverlight 4 (Marcio Althmann) A minha apresentação foi focada em 3 novidades que podem ser aplicadas no dia-a-dia dos participantes, algo bem pontual, envolvendo web forms, paralelismo e Dynamic Language Runtime. O destaque (IMHO) fica para o paralelismo, algo totalmente aplicável nas aplicações, que nos dá um resultado incrível. Apesar de já existir anteriormente, o fato de estar embutido na plataforma incentiva a rápida adoção da tecnologia. Apenas para formalizar, nos próximos dias vamos lançar localmente as reuniões presenciais para discussões técnicas do grupo Sharpcode. Se você tem interesse, e está na região de Londrina, participe! Abraços!

    Read the article

  • Roadshow Microsoft – Primeira Parada: Londrina, PR

    - by anobre
    Hoje (23/03) tivemos aqui em Londrina a primeira parada do Roadshow Microsoft, com apresentação de diversos produtos com aplicação em cenários técnicos. Como já é de costume, o evento reuniu alguns dos melhores profissionais de DEV e INFRA, com informações extremamente úteis sobre .NET Framework 4, Entity Framework, Exchange, Sharepoint, entre outras tecnologias e produtos. Na minha visão, o evento conseguiu atender a expectativa dos participantes, através dos cenários técnicos criados para a ficticia Adventure Works (acho que eu conheço esta empresa… :). Através da participação ativa de todos, as tracks de DEV e INFRA tiveram o sucesso aparente no comentário do pessoal nos intervalos e almoço. Depois das palestras, lá por 19h, tivemos um jantar com o pessoal da Microsoft e influenciadores da região, onde, até as 21h, discutimos muita coisa (até Commerce Server!). Esta aproximação com o time de comunidades da Microsoft, além de alguns “penetras” como o próprio Alex disse, é extremamente importante e útil, visto que passamos conhecemos a fundo as intenções e futuras ações da Microsoft visando as comunidades locais. Para concluir, algo que sempre digo: participe de alguma comunidade técnica da sua região. Entre em contato com influenciadores, conheça os grupos de usuários perto de você e não perca tempo. Ter o conhecimento perto de você, contribuir e crescer profissionalmente não tem preço. Obrigado novamente a todo time, em especial a Fabio Hara, Rodrigo Dias, Alex Schulz, Alvaro Rezende, Murilo e Renato Haddad. Abraços. OBS.: Lembre-se: em Londrina e região, procure o Sharpcode! :) OBS. 2: Se você é de Londrina e não participou, não perca mais oportunidades. Alias, se o seu chefe não deixa você ir, se você tem que participar de sorteio para ter uma chance de ir, ou se a sua empresa nem fica sabendo de eventos como este, acho que tá na hora de você pensar em outros opções né? :)

    Read the article

  • SQL Contest – Result of Cartoon Contest

    - by pinaldave
    Earlier we had an excellent contest ran with the help of Embarcadero Technologies. We had two different contests on the same day sponsored by the kind folks at Embarcadero. Here are the details of the winners. 1) Win USD 25 Amazon Gift Cards (10 Units) We had announced that we will award USD 25 Amazon Gift Cards to 10 lucky winners who will download the DB Optimizer between Nov 29 to Dec 8. Here is the name of the winners. Winners will get Amazon Gift Cards USD 25 in the next 5 days of this blog post to their registered email address. If you do not receive the card, do send me email (Pinal at sqlauthority.com) and I will follow up on the details. Name of the winners: Ramdas Narayanan Krishna Uppuluri Donna Kray Santosh Gupta Robert Small Samit Bhatt Bernd Baumanns Rodrigo Oriola Jim Woodin Alfred Sandou 2) Win Star Wars R2-D2 Inflatable R/C We had cartoon contest. If you have not read the cartoon – I suggest you go over this cartoon story one more time. The task was to give the correct answer with some interesting note along with it. We selected a few good quotes and put them together. We later on picked the winner by using random algorithm. The winner gets fantastic Star Wars R2-D2 Inflatable R/C. Name of the winner: Aadhar Joshi. He wins R2-D2. You can read his comment over here. Thank you all for participating in the contest – this was fun – if you have liked it do let me know and we will come up with something new for you next time. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • GWT - ListBox - pre-selecting an item

    - by rgoytacaz
    Hey there Stackoverflow, I got a doubt regarding pre-selecting(setSelectedIndex(index)) an item in a ListBox, Im using Spring + GWT. I got a dialog that contains a painel, this panel has a flexpanel, in which I've put a couple ListBox, this are filled up with data from my database. But this painel is for updates of an entity in my database, thus I wanted it to pre-select the current properties for this items, alowing the user to change at will. I do the filling up in the update method of the widget. I tried setting the selectedItem in the update method, but it gives me an null error. I've searched a few places and it seems that the listbox are only filled at the exact moment of the display. Thus pre-selecting would be impossible. I thought about some event, that is fired when the page is displayed. onLoad() doesnt work.. Anyone have something to help me out in here? Thx in advance, Rodrigo Dellacqua

    Read the article

  • Jquery mobile function calls before Ajax Request end

    - by rpmlins
    Here is my problem. When My Home page shows, I call the LoadUser functions, which on success, sets the globalUser variable with the returned json, and after it loads I call the alert function but it says globalUser is undefined. I have tried many other work arounds, but I always get the undefined mesage. If I call the alert(globalUser); on the success function, it works as expected alerting the object. $('#Home').live('pageshow', function(event) { $.when(LoadUser()).done(function(a1) { alert(globalUser); }); }); function LoadUser() { $.ajax({ // connects with the web service and validate de user input url: "http://localhost:51396/Icademy.asmx/GetUser", contentType: "application/json; charset=utf-8", data: { "userName": "'rodrigo'" }, dataType: "jsonp", success: function(json) { globalUser = JSON.parse(json.d); return globalUser; }, error: function(ret) { alert("Um erro ocorreu, tente novamente mais tarde."); } }); }

    Read the article

  • Differentiate Between UITableView Editing States?

    - by Josh Kahane
    I have been looking at trying to differentiate between editing states in my UITableView. I need to call a method only when in editing mode after tapping the edit button, so when you get your cell slide in and you see the little circular delete icons but NOT when the user swipes to delete. Is there anyway I can differentiate between the two? Thanks. EDIT: Solution thanks to Rodrigo Both each cell and the entire tableview has an 'editing' BOOL value, so I loop through all the cells and if more than one of them is editing then we know the whole table is (the user tapped the edit button), however if only one is editing then we know that the user has swiped a cell, editing that individual one, this lets me deal with each editing state individually! - (void)setEditing:(BOOL)editing animated:(BOOL)animated { [super setEditing:editing animated:animated]; int i = 0; //When editing loop through cells and hide status image so it doesn't block delete controls. Fade back in when done editing. for (customGuestCell *cell in self.tableView.visibleCells) { if (cell.isEditing) { i += 1; } } if (i > 1) { for (customGuestCell *cell in self.tableView.visibleCells) { if (editing) { // loop through the visible cells and animate their imageViews [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; cell.statusImg.alpha = 0; [UIView commitAnimations]; } } } else if (!editing) { for (customGuestCell *cell in self.tableView.visibleCells) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.4]; cell.statusImg.alpha = 1.0; [UIView commitAnimations]; } } }

    Read the article

< Previous Page | 3 4 5 6 7