Daily Archives

Articles indexed Thursday January 6 2011

Page 17/36 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Will a mulitouch touch screen equipped PC allow me to simulate real Android UI's without an Android device ?

    - by Scott Davies
    Hi, I have recently purchased a Samsung Galaxy Tab as an Android 2.x testbed (I am aware that 2.3 might not run on it, but it appears to be a good 1.x - 2.x device with a large enough screen to approximate the variety of screens on different phones). I would wait for Honeycomb equipped devices (such as the Motorola XOOM mentioned at CES 2011), but these are slated for some time in Q1 (likely end of Q1 for the Canadian market). If I get a multitouch capable PC and install the Android SDK and simulator, will I be able to use the multitouch functionality of the PC with the simulator to approximate a real device ? Does anyone use a multitouch touch screen PC for Android development ? I assume that this would work as the PC would recognize my fingers like the mouse, but I'd like to find out before purchasing the PC. Thanks for your help, Scott

    Read the article

  • Dynamic "OR" conditions in Rails 3

    - by Ryan Foster
    I am working on a carpool application where people can search for lifts. They should be able to select the city from which they would liked to be picked up and choose a radius which will then add the cities in range to the query. However the way it is so far is that i can only chain a bunch of "AND" conditions together where it would be right to say "WHERE start_city = city_from OR start_city = a_city_in_range OR start_city = another_city_in_range" Does anyone know how to achive this? Thanks very much in advance. class Search < ActiveRecord::Base def find_lifts scope = Lift.where('city_from_id = ?', self.city_from) #returns id of cities which are in range of given radius @cities_in_range_from = City.location_ids_in_range(self.city_from, self.radius_from) #adds where condition based on cities in range for city in @cities_in_range_from scope = scope.where('city_from_id = ?', city) #something like scope.or('city_from_id = ?', city) would be nice.. end end

    Read the article

  • How to instantiate JQuery UI widget by string?

    - by limcheekin
    Hi there, Do you know how to instantiate JQuery UI widget by string? Let's illustrate it with some sample code. Given the html link element below: <a id="testLink" href="#">Test Link</a> Normally, we can make it into button using code below: $('#testLink').button(); What if I want to instantiate the button with string, for example: var widget='button'; $('#testLink').[widget](); Of course the code block above is not working (It is just for illustration purpose only), otherwise you will not see this question. Please advice. Thanks, Chee Kin

    Read the article

  • Examples of ISO C++ code that is not valid C++/CLI

    - by Johannes Schaub - litb
    I've seen contradictory answers on the internet with regard to whether C++/CLI is a superset of C++ or not. The accepted answer on this question claims that "technically no", but doesn't provide an examples of non-C++/CLI code that conforms to ISO C++. Another answer on that question cites a book that says the opposite. So, can you please provide accurate answers with example code that fails on C++/CLI or cite a trusted source (MSDN for example) on this matter? I had someone this topic come up today and thought I would like to inform myself, but I didn't find any clear answer elsewhere!

    Read the article

  • pagecontrol indicator custom image instead of Default

    - by iphonecool
    How i change the color of pagination dots of UIPageControl? In this link the sample code is given.But it shows 3 errors for me... 1'st ERROR: Line:CGRect currentBounds = self.bounds; Error:requst for member 'bounds' in something not a structure or union Method:-(void)drawRect: 2nd Err: same error with same line in touchesBegan method. 3rd Err:@protocol PageControlDelegate @optional (void)pageControlPageDidChange:(PageControl *)pageControl; @end Error:Expected ')' before 'PageControl' .These are the three errors occurs for me...Please help me out to solve this.. I want to change the pagecontrol indicator(dot) color... Thanks & Regards, Renuga

    Read the article

  • Using the Google Analytics Export API to get a websites trend

    - by Doug
    hi there, i am working on an application that uses the Google Analytics Export API and i am trying to get the "Trend" result that Google shows against each of your site accounts as a percentage ie UP 35.04% or DOWN 16.02% How/where do they get this figure and is it available in the API somewhere. i have tried comparing averages of last month to this month/first week of the period vs last week of the period etc, but i cannot seem to get the same numbers that Google provides. any ideas? thanks in advance Doug

    Read the article

  • Silverlight authentication during startup - how to mimic syncronous behavior?

    - by jkohlhepp
    I have a Silverlight app that is using the MVVM pattern. I have a WCF service which will allow me to authenticate users (I don't have direct control over that service - assume it is a black box that just returns me the user info and a list of privileges the user has). So, when the app starts up, I want to pull security data from that service. Right now, when I do this, my views and view models can end up getting initialized before the service returns with the security data. This causes problems because the view models need to disable buttons and make things visible/invisible based on the user having certain privileges. Is there a pattern that allows me to prevent the initialization of the views / view models until the WCF call has returned? How would you go about solving this problem as elegantly as possible?

    Read the article

  • Block copy PDF document

    - by Wiliam Witter
    hello Gentlemen, I would like block copy (ctrl+c ctrl+v) PDF document using java. I have a code that build a PDF document with JasperReport... //seta o caminho dos arquivos jasper String pathLote = ScopeSupport.getServletContext().getRealPath("priv/sgc/relatorios/AtaPregaoLotePageReport.jasper"); String pathCabecalho = ScopeSupport.getServletContext().getRealPath("priv/sgc/relatorios/CabecalhoPageReport.jasper"); String pathRodape = ScopeSupport.getServletContext().getRealPath("priv/sgc/relatorios/rodapePageReport.jasper"); String imagemDir = ScopeSupport.getServletContext().getRealPath("/priv/comum/img"); //HashMap parametros passa o parametro usado na query e o caminho da imagem HashMap<String,Object> parametros = new HashMap<String,Object>(); parametros.put("idPregao", idPregao); parametros.put("idLote", idLote); parametros.put("IMAGEM_DIR", imagemDir + "/"); parametros.put("USUARIO", "NomeUsuario" ); parametros.put("texto", texto); parametros.put("numeroAta", numAta); if(numAta != null && numAta > 0) parametros.put("relatorio", "Ata "+numAta); HashMap<String,Object> parametrosSub = new HashMap<String,Object>(); parametrosSub.put("CabecalhoPageReport", pathCabecalho); parametrosSub.put("rodapePageReport", pathRodape); parametrosSub.put("AtaPregaoPorLotePageReport", pathLote); for(String element : parametrosSub.keySet()){ parametros.put(element, (JasperReport) JRLoader.loadObject((String) (parametrosSub.get(element)))); } JasperReport report = (JasperReport) JRLoader.loadObject( pathLote ); JasperPrint printRel = JasperFillManager.fillReport( report, parametros, getJDBCConnection() ); byte[] bytes = JasperExportManager.exportReportToPdf(printRel); httpResponse.setHeader("Content-Disposition","attachment; filename=\""+ report.getName() + ".pdf" +"\";"); httpResponse.setContentLength(bytes.length); httpResponse.setContentType("application/pdf"); ServletOutputStream ouputStream = httpResponse.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.flush(); ouputStream.close(); Who can help me with this?

    Read the article

  • C# DllImport with c++ const char* not working correctly

    - by Shammah
    I have the following function in a C++ DLL extern "C" __declspec(dllexport) bool Exist(const char* name) { //if (g_Queues.find(name) != g_Queues.end()) // return true; //else // return false; return false; } Inside my C# class I have the following: [DllImport("Whisper.dll", EntryPoint="Exist", CallingConvention=CallingConvention.Cdecl)] public static extern bool Exist(string name); Yet, whenever I call my function it ALWAYS returns true, even when I commented out my little function and made it return false. I have the feeling there is something wrong with my calling convention or any other issue with P/Invoking my DLL, probably corresponding with the string and const char*, but for now I am completely clueless. What am I doing wrong? Why does it return true instead of false? EDIT: I have figured out this has nothing to do with the const char* or string, because the problem persists with an empty function. I've tried changing the calling convention between Cdecl and StdCall and neither work correctly. I've also managed to debug my DLL and it's being called correctly and does indeed return false, but once back into C# it somehow is true. Changing the CharSet also had no effect. I've made sure I've supplied my C# program with the latest and correct version of my DLL each time, so that shouldn't be an issue aswell. Again, I am completely clueless on why the result is true when I'm in fact returning false. EDIT2: SOReader provided me with a suggestion which fixes another important issue, see my comment. Sadly, it does not fix the return issue.

    Read the article

  • Expressionengine 2 and git (version control)

    - by Danny
    Hey guys I’m looking to move over to using git to make my EE development a lot easier and more manageable. I’m already aware of the guides posted on devotee and a few othersites but after scanning over them they seem a little old and seem to be specifically for ee 1.x, I was wondering if anyone had been successful with ee 2. I’ve only recently made the transition from svn to git, previously I found that using ee via svn was a ballache, so many confit conflicts, wrong urls, and all versions of the site were using the same database. I’m basically looking for the best or should I say the ideal way to setup both git and ee to work in harmony together. I’d like to also learn how to branch other sites I develop with ee from this too, if anyone has experience with this that’d be great! Also if it’s any use I’m hosted by dreamhost, As far as I understand they support git, I’ve looked over their knowledge base on how best to set things up, would anyone reccomend their way of doing things? And has anyone had a successful experience whilst doing so?  I look forward to hearing your responses! Thanks Sent from my iPhone, whilst falling asleep so excuse the possible typos!a

    Read the article

  • What is the fastest way for reading huge files in Delphi?

    - by dummzeuch
    My program needs to read chunks from a huge binary file with random access. I have got a list of offsets and lengths which may have several thousand entries. The user selects an entry and the program seeks to the offset and reads length bytes. The program internally uses a TMemoryStream to store and process the chunks read from the file. Reading the data is done via a TFileStream like this: FileStream.Position := Offset; MemoryStream.CopyFrom(FileStream, Size); This works fine but unfortunately it becomes increasingly slower as the files get larger. The file size starts at a few megabytes but frequently reaches several tens of gigabytes. The chunks read are around 100 kbytes in size. The file's content is only read by my program. It is the only program accessing the file at the time. Also the files are stored locally so this is not a network issue. I am using Delphi 2007 on a Windows XP box. What can I do to speed up this file access?

    Read the article

  • find controls from dynamically created table

    - by tina
    hi, i wrote a function to create dynamic table in code behind on selectedindexchanged of checkbox, that is when user will check 2 checkboxex 2 tables will be generated with textboxes, Then on button click i want insert values of these textboxes in database, for that i want to find textbox using findcontrol,but i could not find it, So i called same function of table creation on page load, but then it shows error that textbox is having duplicate id Plz tell me solution for this. thanks

    Read the article

  • php sessions not working

    - by Elwhis
    Hey guys, I have a problem, tried to google some sollutions but without success. I am working with wamp2.0 - PHP 5.3, apache 2.2.11 but my sessions are not storing data. I have a page that accepts a parameter, which (simplified version) I wanna store in a session, so I when I come to www.example.com/home.php?sessid=db_session_id the script looks like: session_start(); $sessid = @$_GET['sessid']; if ($sessid) { $_SESSION['sessid'] = $sessid; } var_dump($_SESSION); and outputs: array(1) { [0]=> string(13) "db_session_id" } which is fine, but then, when I go to www.example.com/home.php (without the sessid parameter) the $_SESSION array is empty. I've event tried to comment the $_SESSION['sessid'] = $sessid; line before going to the page without the parameter, but still it didin't work. I've checked the session_id() output and the session id remains the same. Session settings from phpinfo() Session Support enabled Registered save handlers files user Registered serializer handlers php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly Off Off session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.hash_bits_per_character 5 5 session.hash_function 0 0 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path c:/wamp/tmp c:/wamp/tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies On On session.use_trans_sid 0 0 EDIT: $_SESSION and $_COOKIE var dumps right after session_start() Session: array(1) { ["sessid"]=> string(0) "" } Cookie: array(6) { ["ZONEuser"]=> string(10) "3974260089" ["PHPSESSID"]=> string(26) "qhii6udt0cghm4mqilctfk3t44" ["__utmz"]=> string(91) "1.1294313834.54.3.utmcsr=u.cz|utmccn=(referral)|utmcmd=referral|utmcct=/registered/packages" ["__utma"]=> string(48) "1.1931776919.1287349233.1294266869.1294313834.54" ["__utmc"]=> string(1) "1" ["__utmb"]=> string(18) "1.49.10.1294313834" }

    Read the article

  • Problem with routes in functional testing

    - by Wishmaster
    Hi, I'm making a simple test project to prepare myself for my test. I'm fairly new to nested resources, in my example I have a newsitem and each newsitem has comments. The routing looks like this: resources :comments resources :newsitems do resources :comments end I'm setting up the functional tests for comments at the moment and I ran into some problems. This will get the index of the comments of a newsitem. @newsitem is declared in the setup ofc. test "should get index" do get :index,:newsitem_id => @newsitem assert_response :success assert_not_nil assigns(:newsitem) end But the problem lays here, in the "should get new". test "should get new" do get new_newsitem_comment_path(@newsitem) assert_response :success end I'm getting the following error. ActionController::RoutingError: No route matches {:controller=>"comments", :action=>"/newsitems/1/comments/new"} But when I look into the routes table, I see this: new_newsitem_comment GET /newsitems/:newsitem_id/comments/new(.:format) {:action=>"new", :controller=>"comments"} Can't I use the name path or what I'm doing wrong here? Thanks in advance.

    Read the article

  • How to configure fetchmail to send messages from remote smtp server to Gmail?

    - by ifesdjeen
    Hi, I've been trying to setup email forwarding through fetchmail from remote smtp server to Gmail account, although messages are constantly coming to my local address and accessible via "mail" command. SMTP connection works perfectly, but emails do not go anywhere. System: debian, fetchmail Config: poll smtp.server protocol imap username “user” password “pass” smtpname “[email protected]” ssl Thank you!

    Read the article

  • Cannot get Backup Exec to backup Exchange.

    - by Shawn Gradwell
    I have a media server, Windows Server 2008 SP2 running Backup Exec 2010 R2. The SQL and other Windows agents work but I cannot backup the Exchange 2010 server running Windows Server2008 R2. I have the correct license for the Exchange agent - installed on the media server, and I installed Exchange Management tools on the media server. The 'Microsoft Exchange Database Availability Group' option is greyed out and if I select the server under a new backup job I can expand the 'Microsoft Information Store' option and see the mail database name but showing 0Kb. When I try to back it up it gives an error displaying: The job failed with the following error: Backup Exec attempted to back up an Exchange database according to the job settings. The database was not found, however. Update the selection list and run the job again.

    Read the article

  • VSFTPD: Cannot figure this thing out...

    - by A Wizard Did It
    Alright, I've been giving this the best that I can, reading through various tutorials on google, but I cannot seem to get vsftpd running the way I want. For a short while I had it working with one account, but then that stopped and I haven't been able to get it to work since. I've since reformated and reinstall Ubuntu 10.04 LTS. I used apt-get install vsftpd and that's where I am now... I'd really appreciate if anyone could help me understand exactly how this is supposed to work... How do I add FTP accounts and set their home directory to something like /var/www/public_html?

    Read the article

  • Distributing entropy to virtual machines.

    - by Louis
    Dear All, I'm interested in generating secret keys for SSL on virtual machines using true randomness. By true randomness I mean the same level of entropy that can be generated by UNIX's dev/random and entropy gathering daemon (EGD). Is there a "general knowledge" recipe to route entropy from the physical layer to the virtual machines via the hypervisor regardless of the Hypervisor/Guest OS combination? Example: suppose one "hypervises" with VMware VSphere and instantiates Windows Guest OS. Can this hypervisor collect entropy from its peripherals (like dev/random/ would) and distribute it to these guest Windows OS? When considering the big vendors (VMware, Hyper-V, Citrix, etc), do they have entropy pools that gather entropy that can easily be pushed to their respective virtual machines? Louis

    Read the article

  • Windows server 2008 r2 console stuck at "waiting for user profile service"

    - by support
    Hi, I have a windows 2008 R2 server, running on dell poweredge t300. Using hyper-v to run a windows 2008 R2 server also. Suddenly, today, my virtual console (on the virtual copy of windows 2008 server r2) will not let me login as administrator. It starts to login but then sticks at the message: Please wait for the User profile Service and is unresponsive to keypresses (incl ctrl-alt-del). The only way out is a crash. It starts up in safe mode without networking ok but not in safe mode with networking. Any suggestions on how to fix this would be appreciated Thanks

    Read the article

  • Modern monitor technologies - need to find a new monitor

    - by Michal Minicki
    I'm preparing to change my old LCD monitor for a new one. I have an old NEC 20WGX2 Pro based on an IPS panel. I'm looking for a screen that gives good color output but is very good at gaming at the same time (since it is its primary service). I tend to switch monitors between my different computers at home so it has to be multi purpose, hence IPS technology before. Now, where can I read on newest monitor technologies so I can make an informed decision? I need to find a best fit for myself and I have a very outdated knowledge at the moment. So any hints are greatly appreciated, be it info on technologies, web sources, links to other questions, etc.

    Read the article

  • Does disabling BIOS shadowing increase free RAM space?

    - by user32569
    Hi, I know in these days this is very stupid question, but for study purposes. I read that when PC starts, CPU is set to read adress just under the 4GB. There should BIOS be mapped to by memory controller. My question is, in old days, had disabling BIOS shadowing actually freed some RAM for you? I mean, even when BIOS was not shadowed to RAM directly, still adresses for BIOS MMIO access were wasted. And when you cant adress it, its like there is no extra space gained.

    Read the article

  • Convert video files for Maemo (Nokia N900) using ffmpeg/mencoder

    - by Vikrant Chaudhary
    I'm a newbie in video encoding so I'm looking for some expert advice. I'm looking to transcode media files with ffmpeg or mencoder (or something other) on Ubuntu for my Nokia N900 running Maemo. I'd prefer mencoder, because of ffmpeg's crazy dependencies. Video output should be AVC/H.264 (probably hardware accelerated on device). Audio output in AAC (should have preferred Vorbis but not supported natively and requires .mkv which is also not completely supported). Output video should retain the original aspect ratio. Resolution of screen is 800x480 (16:10). (Explanation of why-this-value-is-chosen would be really appreciated). Thanks.

    Read the article

  • Is there a way to disable beeps in chm browser and what's causing them?

    - by iuiui
    When browsing a .chm file, in search tab, when I click on each result I get a beep. I don't think there should be a beep every time I click on a search result. In any case, I'd like to just disable them. I know there is a way to disable the beeps system-wide, but I don't require that. It's not the "Start navigation" sound like used in Internet Explorer. This is truly a beep, like the one resulting when the pc is not responding, and one keeps pressing various keys on the keyboard, with each key press generating a beep. Besides, I have the windows "no sounds" scheme, meaning there shouldn't be event driven sounds.

    Read the article

  • Sync file system changes in a folder to server on LAN (via SSH or NFS) automatically

    - by Peter Farsinsen
    Hi, I'm looking for a solution that'll automatically sync file system changes in "/folder1" to "/folder2". Any change should be synced (deleted files, new folders etc.) without any confirmation. Preferably the changes will happen to "/folder2" instantly. "/folder1" is on my hdd "/folder2" is on a server on the LAN (can be accessed via SSH or NFS) I'm on OS X 10.6. I can't seem to find just the right tool. Does anyone

    Read the article

  • Set resolution of unattached display in OS X?

    - by Brad
    I have an HDTV that I'm hooking up via DVI to HDMI from my Mac mini. In my struggle to eliminate overscan I managed to set the screen resolution to something not supported by the tv. How do I change the resolution without that screen attached? Specifically my tv says it's "720p and 1366 x 768 Resolution". The 720p resolution option in OS X made for a ton of overscan (couldn't see menubar or dock at all). So I tried something x 768 and managed to shoot myself in the foot with an unsupported resolution. I thought it was okay to experiment since a resolution change times out if you don't accept it. Apparently that didn't happen for some reason. I've already deleted the com.apple.windowserver.plist in /Library/Preferences as I saw suggested in other places, with no effect.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >