Search Results

Search found 8247 results on 330 pages for 'smart phone'.

Page 132/330 | < Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >

  • NHibernate criteria query question

    - by Chris
    I have 3 related objects (Entry, GamePlay, Prize) and I'm trying to find the best way to query them for what I need using NHibernate. When a request comes in, I need to query the Entries table for a matching entry and, if found, get a) the latest game play along with the first game play that has a prize attached. Prize is a child of GamePlay and each Entry object has a GamePlays property (IList). Currently, I'm working on a method that pulls the matching Entry and eagerly loads all game plays and associated prizes, but it seems wasteful to load all game plays just to find the latest one and any that contain a prize. Right now, my query looks like this: var entry = session.CreateCriteria<Entry>() .Add(Restrictions.Eq("Phone", phone)) .AddOrder(Order.Desc("Created")) .SetFetchMode("GamePlays", FetchMode.Join) .SetMaxResults(1).UniqueResult<Entry>(); Two problems with this: It loads all game plays up front. With 365 days of data, this could easily balloon to 300k of data per query. It doesn't eagerly load the Prize child property for each game. Therefore, my code that loops through the GamePlays list looking for a non-null Prize must make a call to load each Prize property I check. I'm not an nhibernate expert, but I know there has to be a better way to do this. Ideally, I'd like to do the following (pseudocode): entry = findEntry(phoneNumber) lastPlay = getLatestGamePlay(Entry) firstWinningPlay = getFirstWinningGamePlay(Entry) The end result of course is that I have the entry details, the latest game play, and the first winning game play. The catch is that I want to do this in as few database calls as possible, otherwise I'd just execute 3 separate queries. The object definitions look like: public class Entry { public Guid Id {get;set;} public string Phone {get;set;} public IList<GamePlay> GamePlays {get;set;} // ... other properties } public class GamePlay { public Guid Id {get;set;} public Entry Entry {get;set;} public Prize Prize {get;set;} // ... other properties } public class Prize { public Guid Id {get;set;} // ... other properties } The proper NHibernate mappings are in place, so I just need help figuring out how to set up the criteria query (not looking for HQL, don't use it).

    Read the article

  • How to install and use db4o for Android?

    - by Viet
    I have to admit that I'm new to Java and Android. db4o seems to be an excellent DB framework to replace SQLite http://developer.db4o.com/Platforms/Java/Android.aspx. I want to use it for my Android application. I don't know how to: Import/Install/Attach/Upload db4o to Android phone. Where should I put the JAR file db4o-7.12.132.14217-all-java5.jar so that it was uploaded to Android phone and it could be called from the application? Please kindly advise! Many thanks!!!

    Read the article

  • Thunderbird 3: create a single column to display the 'From' field on a received message and the 'Rec

    - by dfree
    If the title doesn't say it all let me know. This would be helpful for IMAP folders within T-bird, when I'm looking through threads on a particular issue, but don't know if I sent the last message to the recipient, or they sent the last message to me. I would be able to quickly scroll in one column and see exactly when the last communication on that issue was. Is there a way to make a 'smart' column that would do this?

    Read the article

  • My Android 2.1 Nexus One, rooted and unlocked and unplugged and unchained! Unfreakinbelievable!

    - by misbell
    So anyway. i fastbooted and superrooted, and all's fine in the merry old land of Oz. So yeah, now I can see /data/data.. in DDMS, both the plugin and the tool, which is great. but when I attach my phone, I still can't see the main drive. All I can see is the SD card. Using OSX, so when I use Disk Utility, I can see the machine then see the SD Card. is the problem that none of the tools I am using, except DDMS and ADB shell, know how to read that main Android drive? It's the same format as the qemu img, right? Someone HAS to come up with a tool that can do this, let me hack my phone and access the main drive via my USB connector, and mount that drive on my native file system. It just can NOT be that hard. Err, can it? All smiles! Michael

    Read the article

  • Combining / deduplicating contacts in Windows 8 People app

    - by Soo Wei Tan
    Is there a way of combining or deduplicating contacts in the Windows 8 People app? For some reason I have double entries of many contacts (with identical names), and the app isn't smart enough to integrate them. I have the following accounts connected: Microsoft (i.e. Hotmail) Google (including Contacts) Facebook Linkedin Twitter The contacts in question have entries from Google contacts as well as Facebook.

    Read the article

  • Opening AFOpenFlowView already in landscape mode

    - by justin
    I'm using the open source CoverFlow replacement from here: http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/ When I detect that a certain view has gone from portrait to landscape mode, I instantiate an AFCoverFlowView and push it onto the navigation stack. If I do so in response to (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation The cover flow view comes up as though the phone were still in portrait mode. If I push the view in response to (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation it works perfectly - the view comes up in landscape mode with the phone in landscape mode Unfortunately, the device doesn't reliable get willRotateToInterfaceOrientation messages. I have tried making sure that [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; is in loadView but that doesn't help with the notificiations. So, my questions are: Is there a way to reliably get willRotateToInterfactOrientation? if not How do I instruct AFCoverFlowView to come up in landscape mode (if the device is already in landscape mode)

    Read the article

  • Skype a-like PlugIn

    - by balexandre
    This is not really a programming question but please bear with me as I just need some push to the right road. What is and what should I search for to create a Skype A-Like plugin? I want to be able to capture the Phone Number (Web Browser, Word and Outlook for starts) and change it to present a link that the user can click to search that Phone Number in the CRM Application, given him the ability to open that client profile or make a call (we have a PBX Dial software). But I have no idea what this technology is called in order to start looking for some ideas on how to accomplish this. Thank you

    Read the article

  • Is it feasible to write a Firefox plugin to make use of ActiveX control on Windows?

    - by Gary B2312321321
    I use an ActiveX control called TAPIEx enabling TAPI phone system integration using MS Access 2000 (+Visual Basic). I want to turn this Access database into a web app with the clients running Firefox (all on internal network). Since Firefox doesnt support ActiveX is it feasible for me to write a Firefox plugin that in turn utilizes the ActiveX control? With regard to how plugins work - Would I be able to call 'functions' of the plugin from page script (eg dial call specifying phone number, check if calls in process)? Would adding these functions to the Firefox right click menu 'globally' inside Firefox be easier? Hope you guys can help. Note I'm not a fulltime programmer; I just need to know how steep the learning curve will be or even if my idea is possible! Ive now found a project to allow using activex controls in firefox that seems to be quite up to date at: http://code.google.com/p/ff-activex-host/

    Read the article

  • enclosing double quotes in array

    - by Jared
    Hi all I might be looking at this the wrong way, but I have a form that does its thing (sends emails etc etc) but I also put in some code to make a simple flatfile csv log with some of the user entered details. If a user accidentally puts in for instance 'himynameis","bob' this would either break the csv row (because the quotes weren't encapsulated) or if I use htmlspecialchars() and stripslashes() on the data, I end up with a ugly data value of 'himynameis&quot;,&quot;bob'. My question is, how can I handle the incoming data to cater for '"' being put in the form without breaking my csv file? this is my code for creating the csv log file. @$name = htmlspecialchars(trim($_POST['name'])); @$emailCheck = htmlspecialchars(trim($_POST['email'])); @$title = htmlspecialchars(trim($_POST['title'])); @$phone = htmlspecialchars(trim($_POST['phone'])); function logFile($logText) { $path = 'D:\logs'; $filename = '\Log-' . date('Ym', time()) . '.csv'; $file = $path . $filename; if(!file_exists($file)) { $logHeader = array('Date', 'IP_Address', 'Title', 'Name', 'Customer_Email', 'Customer_Phone', 'file'); $fp = fopen($file, 'a'); fputcsv($fp, $line); } $fp = fopen($file, 'a'); foreach ($logText as $record) { fputcsv($fp, $record); } } //Log submission to file $date = date("Y/m/d H:i:s"); $clientIp = getIpAddress(); //get clients IP address $nameLog = stripslashes($name); $titleLog = stripslashes($title); if($_FILES['uploadedfile']['error'] == 4) $filename = "No file attached."; //check if file uploaded and return $logText = array(array("$date", "$clientIp", "$titleLog", "$nameLog", "$emailCheck", "$phone", "$filename")); logFile($logText); //write form details to log Here is a sample of the incoming array data: Array ( [0] => Array ( [0] => 2010/05/17 10:22:27 [1] => xxx.xxx.xxx.xxx [2] => title [3] => """"himynameis","bob" [4] => [email protected] [5] => 346346 [6] => No file attached. ) ) TIA Jared

    Read the article

  • XML Return from an Oracle Stored Procedure

    - by Tequila Jinx
    Unfortunately most of my DB experience has been with MSSQL which tends to hold your hand a lot more than Oracle. What I'm trying to do is fairly trivial in tSQL, however, pl/sql is giving me a headache. I have the following procedure: CREATE OR REPLACE PROCEDURE USPX_GetUserbyID (USERID USERS.USERID%TYPE, USERRECORD OUT XMLTYPE) AS BEGIN SELECT XMLELEMENT("user" , XMLATTRIBUTES(u.USERID AS "userid", u.companyid as "companyid", u.usertype as "usertype", u.status as "status", u.personid as "personid") , XMLFOREST( p.FIRSTNAME AS "firstname" , p.LASTNAME AS "lastname" , p.EMAIL AS "email" , p.PHONE AS "phone" , p.PHONEEXTENSION AS "extension") , XMLELEMENT("roles", (SELECT XMLAGG(XMLELEMENT("role", r.ROLETYPE)) FROM USER_ROLES r WHERE r.USERID = USERID AND r.ISACTIVE = 1 ) ) , XMLELEMENT("watches", (SELECT XMLAGG( XMLELEMENT("watch", XMLATTRIBUTES(w.WATCHID AS "id", w.TICKETID AS "ticket") ) ) FROM USER_WATCHES w WHERE w.USERID = USERID AND w.ISACTIVE = 1 ) ) ) AS "RESULT" INTO USERRECORD FROM USERS u LEFT JOIN PEOPLE p ON p.PERSONID = u.PERSONID WHERE u.USERID = USERID; END USPX_GetUserbyID; When executed, it should return an XML document with the following structure: <user userid="" companyid="" usertype="" status="" personid=""> <firstname /> <lastname /> <email /> <phone /> <extension /> <roles> <role /> </roles> <watches> <watch id="" ticket="" /> </watches> </user> When I execute the query itself, replacing the USERID parameter with a string and removing the "into" clause, the query runs fine and returns the expected structure. However, when the procedure attempts to execute the query, passing the results of the XMLELEMENT function into the USERRECORD output parameter, I get the following exception: Error report: ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at "USPX_GETUSERBYID", line 4 ORA-06512: at line 3 01422. 00000 - "exact fetch returns more than requested number of rows" *Cause: The number specified in exact fetch is less than the rows returned. *Action: Rewrite the query or change number of rows requested I'm baffled trying to nail this down, and unfortunately my google-fu hasn't helped. I've found plenty of Oracle SQL|XML examples, but none that deal with XML returns from a procedure. Note: I know that an alternate method of retrieving XML using DBMS methods exists, however, it's my understanding that that functionality is deprecated in favor of SQL|XML.

    Read the article

  • Why did mislav-will_paginate start adding so much garbage to urls between rails 2.3.2 and 2.3.5?

    - by user30997
    I've used will_paginate in a number of projects now, but when I moved one of them to Rails 2.3.5, clicking on any of the pagination links (page number, next, prev, etc.,) went from getting nice URLs like this: http://foo.com/user/1/date/2005_01_31/phone/555-6161 to this: http://foo.com/?options[]=user&options[]=date&options[]=2005_01_31&options[]=phone&options[]=555-6161 I have a route that looks like this that is probably the source of the 'options' keyword: map.connect '/browse/*options', :controller=>'assets', :action=>'browse' It's enough of an annoyance that I'm willing to roll a paginator to get around this if there isn't a way to get back to where I was before. Is there a way to get will_paginate to turn array-style routes into sane urls again? Thanks.

    Read the article

  • Phonegap: Slow response with vibrate notification

    - by jjei
    I created a simple android application with jquery and phonegap. When testing the app with phone, I noticed that vibration effect, that I have used to indicate that user touches a button, comes after a delay of maybe 0,5 seconds. This is way too long delay and just confuses the user. Is this just the downside of using phonegap? Or is there any configuration or additional frameworks which could be used to make the app response and produce the vibration more quickly? I installed the vibration plugin like this: phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git I use the code below to create the vibration effect. navigator.notification.vibrate(200); My phone gap version is 3.0.0-0.14.3

    Read the article

  • Basic doubt about sensor usage

    - by Al
    Suppose I have a cellphone with accelerometer and magnetometer, and want to determine its absolute (wrt North/East/South/West) 3d position. Imagine the phone is laid vertically, with the screen facing me, the "up" vector pointing to the ceil. Whenever I tilt, the accelerometer allows me to get the "up" vector info change. The problem is that if I tilt the device and put it horizontally (screen now facing ceil, and "up" vector pointing to the opposite of where I am), then the up vector doesn't get updated any more if I rotate the phone horizontally on the table. This is something that clearly is detected by the magnetometer now. So, the question is, when to know where to use acc or mag for each case? Is there a generic way to achieve this?

    Read the article

  • Creating Service with Bluetooth activation in Android

    - by Mr. Kakakuwa Bird
    Hi I want to create a service in Android which will initially ask user if they want to start Bluetooth and set the Bluetooth discovery. My question is 1) Can I launch in the service following activities? if (!mBluetoothAdapter.isEnabled()) { Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, 0); } // Set Phone Discoverable for 300 seconds. Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 600); startActivity(discoverableIntent); 2) I want to set discoverabilty of the phone on for lifetime of application. Is it possible? 3) I want to access empty space available on SD card. How should i do it? Thanks in advance.

    Read the article

  • Install McAfee And Nod32

    - by hosseinsinohe
    Hi All I have a computer with windows XP service pack 3 as an operating system.This computer is in a network with McAfee update server.This server will install and update McAfee client in all computers in that network.When I install and running 'Eset Nod32 Smart Security (AntiVirus)',computer is getting hanged. (Not works in Safe Mode). How can I install both Nod32 and McAfee on this network ?

    Read the article

  • Interaction between Java and Android

    - by Grasper
    I am currently trying to research how to use Android with an existing java based system. Basically, I need to communicate to/from an Android application. The system currently passes object data from computer to computer using ActiveMQ as the JMS provider. On one of the computers is a display which shows object data to the user. What we want to do now is use a phone (running Android) as another option to show this object data to a user with wifi/network access. Ideally we would like to have a native application on the Android that would listen to the ActiveMQ topic and publish to another Topic and read/write/display the object data, but from some research I have done, I am not sure if this is possible. What are some other ways to approach this problem? The android Phone needs to be able to send/receive data. I have been using the AndroidEmulator for testing.

    Read the article

  • Regular Expressions, Checking for a range of occurrences

    - by gmcalab
    I have a phone number I want to match against a regular expression. The format of the phone number must match this: (123) 123-4567 x12345 The extension is optional. Also the extension must contain 1-5 numbers. Below is a regular expression I wrote that works. ^\(\d{3}\) \d{3}-\d{4}( x\d\d?\d?\d?\d?)?$ I was wondering if there is a better way to check for the extension instead of x\d\d?\d?\d?\d? Can I say 1-5 occurrences of \d instead of the above some how ?

    Read the article

  • Is it posible to Build & Run on TWO iPhones/iPods at once?

    - by Dimitris
    When I connect two iPhones at the same time to my computer and Build and Run a project the app only installs and plays on one of the devices. Now, with the iPhone 3.0, that supports bluetooth peer-to-peer connectivity, to test a multiplayer project you have to install and run it on two devices at the same time. It would be very helpful to be able to do that with one click instead of: install on one phone, disconnect, connect the other, wait a 10 seconds to recognize the phone and install again and run... Is anyone aware of a method to do such a thing? Thanks

    Read the article

  • How to monitor HTTP(S) traffic / URLs in Android?

    - by Pawel Krakowiak
    I'm interested in whether there is a way to monitor HTTP(S) traffic on an Android phone? What I would like to do is to be able to retrieve all URLs that have been accessed on the phone's browser. I thought that there would be a browser intent for that, but have not seen anything - given I'm green, maybe I just did not know where to look? I followed the question and answer here, but it works only for hyperlinks which were clicked by the user, however I need to catch all URLs - including the ones typed in by the user. Basically I need to know about every single URL that was opened in the web browser. Can I register some kind of a handler with the browser? Is something like that feasible at all?

    Read the article

  • Can obfuscation (proguard) lead to MIDlet malfunction?

    - by eMgz
    Hi, Im trying to obfuscate a Java MIDlet with proguard. It runs ok on the PC, however, when I run it on the phone, the program opens, connects to the server, and then freezes. If I disable obfuscation, it runs ok again on the phone. Ive tryed all the obfuscation levels for apps (7, 8 and 9 at NetBeans), and none of them seems to work properly, and I cant release this app for comercial use without obfuscation. Also, the compiler throws some warnings: Note: duplicate definition of library class [java.io.ByteArrayOutputStream] Note: there were 14 duplicate class definitions. But I dont know if this is realy the problem. Does anyone knows what is wrong? The obfuscator arguments are listed below: Obfuscator Arguments (7): -dontusemixedcaseclassnames -default package '' -keep public class ** { public *; } Obfuscator Arguments (8): same as (7) plus -overloadaggressively. Obfuscator Arguments (9): same as (8) but -keep public class ** extends javax.microedition.midlet.MIDlet { public *; } instead. Thanks.

    Read the article

  • Any good, free ftp client?

    - by paan
    I've been using the free naggy version of Smart FTP for a while. It's very good, but then it became shareware only. So I was wondering, are there any other good FTP clients for Windows? The ones I tried but didn't like was: CoreFTP FileZilla (this one was especially bad :( )

    Read the article

< Previous Page | 128 129 130 131 132 133 134 135 136 137 138 139  | Next Page >