Daily Archives

Articles indexed Tuesday March 16 2010

Page 28/130 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Writing photos (and other things) to disk and getting them later in iphone

    - by ebabchick
    I'm trying to write an image to disk: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString* savePath = [documentsPath stringByAppendingPathComponent:@"photo"]; BOOL result = [data writeToFile:savePath atomically:YES]; if(result) NSLog(@"Save of photo success!"); Then, later, I try to retrieve for a table view cell image: NSData* getPhoto = [NSData dataWithContentsOfFile:[leaf content]]; UIImage* myImage = [UIImage imageWithData:getPhoto]; cell.imageView.image = myImage; Yes, I checked to make sure the [leaf content] returns the same NSString as savePath. What else could be the problem? [NSData dataWithContentsOfFile:[leaf content]]; returns nil.... Thanks guys

    Read the article

  • connect to ssh server thru 80 via HTTP proxy?

    - by im_chc
    Hi, Please help: I want to connect to my ssh server at home However, I'm behind a corporate (CORP) firewall, which blocks almost all ports (443, 22, 23 etc). But it seems that 80 is not blocked, coz I am able to surf the web after I login (i.e. IE sets to CORP's proxy server, and start IE - displayed CORP intranet portal - type in google.com - dialog pops up for userid + pwd - login successful, and surf without restrictions) My ssh server listens at 443. My question is: Is there a way to connect from a computer behind the CORP firewall to the ssh server thru the 80 port, with the ssh server still listening on port 443? Changing the ssh server to listen to port 80 is not an option, coz my home ISP blocks 80. Can I use a public proxy which listens at 80? After some research on google I found that there is something called "connect to SSH thru an HTTP proxy" using the Cockscrew software. Is it useful? Or is there some other way to solve the problem?

    Read the article

  • Software to manage "application profiles", which services are running, etc., on Windows?

    - by Lasse V. Karlsen
    I am looking for a particular type of program. I use my computers in various "modes", like gaming, programming, just plain surfing, etc. What I'd like to find is a program that can help me manage these modes. For instance, while programming I might use SQL Server, but while gaming I don't want those services running, but perhaps I'd like Steam to run instead. Basically, the program type I'm looking for is a visual program that allow me to quickly switch modes, and when I do, the program would start and stop the necessary services and applications in order to leave one mode and enter another. I've looked at the programs related to startup management, and I haven't found one that lets me do what I want. At the moment I have batch files, but they're not very good at conveying problems or other things, I'd like a more visual program.

    Read the article

  • Identifying the version of ATI Catalyst drivers

    - by snark
    I have bought a new video card based on the ATI Radeon HD 5670 chipset. I couldn't make it work with the latest ATI Catalyst drivers found on their website, only the drivers found on the CD delivered with the card worked. How can I know the version of Catalyst that is installed on my PC (running Windows 7 64-bits)? The ATI Catalyst Control Center returns the following information: Driver Packaging Version 8.673-091110a-092263C Provider ATI Technologies Inc. 2D Driver Version 8.01.01.973 2D Driver File Path /REGISTRY/MACHINE/SYSTEM/ControlSet001/Control/CLASS/{4D36E968-E325-11CE-BFC1-08002BE10318}/0000 Direct3D Version 8.14.10.0708 OpenGL Version 6.14.10.9120 Catalyst™ Control Center Version 2009.1110.2225.40230 I do not recognize anything pointing to a "marketing version". The website says the current version of Catalyst is 10.2.

    Read the article

  • Do you know of a C dictionary that supports COW transactions?

    - by Tim Post
    I'm looking for a key - value dictionary library written in C that supports a theoretically unlimited number of cheap transactions. I'd like to have one dictionary in memory, with hundreds of threads starting transactions, possibly modifying the dictionary, ending (completing) the transaction or potentially aborting the transaction. Only 50% of the time will these threads actually modify the dictionary. Most dictionary transaction implementations that I've seen copy always, instead of copying on write, whenever a transaction is started. Given the expected size ( 1GB) of the dictionary, I'm hoping to find something that COWs only when something is actually changed during a transaction. I'm also hoping for something that is packaged by most major GNU/Linux distributions. Any suggestions or links are very much appreciated.

    Read the article

  • How to use Android's CacheManager?

    - by punnie
    I'm currently developing an Android application that fetches images using http requests. It would be quite swell if I could cache those images in order to improve to performance and bandwidth use. I came across the CacheManager class in the Android reference, but I don't really know how to use it, or what it really does. I already scoped through this example, but I need some help understanding it: /core/java/android/webkit/gears/ApacheHttpRequestAndroid.java Also, the reference states: "Network requests are provided to this component and if they can not be resolved by the cache, the HTTP headers are attached, as appropriate, to the request for revalidation of content." I'm not sure what this means or how it would work for me, since CacheManager's getCacheFile accepts only a String URL and a Map containing the headers. Not sure what the attachment mentioned means. An explanation or a simple code example would really do my day. Thanks! Update Here's what I have right now. I am clearly doing it wrong, just don't know where. public static Bitmap getRemoteImage(String imageUrl) { URL aURL = null; URLConnection conn = null; Bitmap bmp = null; CacheResult cache_result = CacheManager.getCacheFile(imageUrl, new HashMap()); if (cache_result == null) { try { aURL = new URL(imageUrl); conn = aURL.openConnection(); conn.connect(); InputStream is = conn.getInputStream(); cache_result = new CacheManager.CacheResult(); copyStream(is, cache_result.getOutputStream()); CacheManager.saveCacheFile(imageUrl, cache_result); } catch (Exception e) { return null; } } bmp = BitmapFactory.decodeStream(cache_result.getInputStream()); return bmp; }

    Read the article

  • JPA 2.0 Eclipse Link ... Composite primary keys

    - by Parhs
    I have two entities(actually more but it doenst matter) Exam and Exam_Normals Its a oneToMany relationship... The problem is that i need a primary key for Exams_Normals PK (Exam_ID Item) Item should be 1 2 3 4 5 etc.... But cant achieve it getting errors An alternative would be to: I cound use an IDENTITY and a ManyToOne relationship at Exam_Normals but that should be like PK(Exam_Normals_ID) and a reference to Exam and an extra collumn Item to keep an order.. SO 3 collumns But to avoid the alternative tried I tried with @IdClass and got errors Tried @EmbeddedID everything nothing works Any idea??

    Read the article

  • What are the best programming and development related Blogs?

    - by Christopher Cashell
    There are lots of great resources available on the Internet for learning more about programming and improving your skills. Blogs are one of the best, IMO. There's a wealth of knowledge and experience, much of it covering topics not often found in traditional books, and the increased community aspect helps to bring in multiple viewpoints and ideas. We're probably all familiar with Coding Horror and Joel on Software (so no need to mention them), but what are the other great ones out there? What are the Blogs that you find yourself following most closely? Where you see the best new ideas, the most interesting or informative ideas, or just the posts that make you sit back and think? One Blog per answer, and then we'll vote up the best so we can all learn from them.

    Read the article

  • javascript form validation - positioning

    - by Holian
    Dear Masters! I have little snippet for validatin' my form. I need help to position the error messages, because now all message appear in the filed, so the user can't see it, and so its very annoying. $(document).ready(function() { jQuery.validator.addMethod("lettersonly", function(value, element) { return this.optional(element) || /^[a-zoöüóúéáuí ]+$/i.test(value); }, "<?php echo $lettersonly; ?>"); $("#regval").validate({ rules: { name: { required: true, minlength: 5, maxlength:30, lettersonly: true }, nick: { required: true, minlength: 3, maxlength:12 }, pass1: { required: true, minlength: 5 }, pass2: { required: true, minlength: 5, equalTo: "#pass1" }, messages: { full: { required: ".....", minlength: "....", maxlength: "...." }, nick: { required: "....", minlength: "....", maxlength: "...." }, pass1: { required: "....", minlength: "..." }, pass2: { required: "....", minlength: "....", equalTo: "...." }, }); }); </script>

    Read the article

  • log4j rootLogger seems to inherit log level of other logger. Why?

    - by AndrewR
    I've got a log4J setup in which the root logger is supposed to log ERROR level messages and above to the console and another logger logs everything to syslog. log4j.properties is: # Root logger option log4j.rootLogger=ERROR,R log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d %p %t %c - %m%n log4j.logger.SGSearch=DEBUG,SGSearch log4j.appender.SGSearch=org.apache.log4j.net.SyslogAppender log4j.appender.SGSearch.SyslogHost=localhost log4j.appender.SGSearch.Facility=LOCAL6 log4j.appender.SGSearch.layout=org.apache.log4j.PatternLayout log4j.appender.SGSearch.layout.ConversionPattern=[%-5p] %m%n In code I do private static final Logger logger = Logger.getLogger("SGSearch"); . . . logger.info("Commencing snapshot index [" + args[1] + " -> " + args[2] + "]"); What is happening is that I get the console logging for all logging levels. What seems to be happening is that the level for SGSearch overrides the level set for the root logger somehow. I can't figure it out. I have confirmed that Log4J is reading then properties file I think it is, and no other (via the -Dlog4j.debug option)

    Read the article

  • code sign error : doesnt match key pair in default keychain

    - by abhiTouchmagic
    *Code Sign error: The identity 'iPhone Developer: XXXXXXXXXX' doesn't match any valid certificate/private key pair in the default keychain.* i am a member in developer profile... i am having theprovisioning profile... what must be the problem sir? Code Sign error: The identity 'iPhone Developer: BD9A19AA-EFEF-41CC-9560-2D97E157380C' doesn't match any valid certificate/private key pair in the default keychain what abt this? what am i supposed to do? i earched a lot but may be i am getting wrong somewhere? help me with this

    Read the article

  • Local Data Cache - How do I refresh the local db when I add fields to remote db?

    - by Chu
    I'm using a Local Data Cache in an ASP.NET 3.5 environment. I made a change in my main database by adding a new field. I double click on my .SYNC file in my project to startup the Local Data Cache wizard again. The wizard starts and I click OK with the hopes that it'll re-query my database and add the new field to the local database file. Instead, I get an error saying "Synchronizing the databae failed with the message: Unable to enumerate changes at the DbServerSyncProvider..." The only way I know to get things working again is to delete the .SYNC file along with the local database and start it from scratch. There's got to be an easier way... anyone know it?

    Read the article

  • sIFR multiple calls don't work :(

    - by roxane
    Hello ! I'm trying to use sIFR on my menu and on my headers... but only one call works... the others that I put after never appear :(... Can somebody help me ? Note : I'm using the r436 and below is my code ... var segoe = { src: 'pathto/segoe.swf', ratios: [7, 1.58, 8, 1.49, 10, 1.5, 11, 1.45, 16, 1.46, 21, 1.44, 22, 1.41, 27, 1.42, 30, 1.41, 32, 1.4, 35, 1.41, 36, 1.4, 38, 1.39, 41, 1.4, 58, 1.39, 65, 1.38, 66, 1.39, 102, 1.38, 104, 1.37, 106, 1.38, 107, 1.37, 108, 1.38, 109, 1.37, 110, 1.38, 112, 1.37, 114, 1.38, 120, 1.37, 121, 1.38, 1.37] }; sIFR.activate(segoe); sIFR.replace(segoe, { selector: '#header ul li a span.title', css: ['.sIFR-root { text-align: center; font-size:13px; letter-spacing:2; font-weight: bold; text-transform:uppercase; cursor: pointer; color:#FFFFFF; background-color:#0C2C39; margin:0 3px; }'], wmode: 'transparent' }); sIFR.replace(segoe, { selector: 'h1', css: ['.sIFR-root { text-align: center; font-size:13px; letter-spacing:2; font-weight: bold; text-transform:uppercase; cursor: pointer; color:#000; background-color:#fff; margin:0 3px; }'] });

    Read the article

  • Apache2 - mod_expire and mod_rewrite not working in httpd.conf - serving content from tomcat

    - by Ankit Agrawal
    Hi, I am using apache2 server running on debian which forwards all the http request to tomcat installed on same machine. I have two files under my /etc/apache2/ folder apache2.conf and httpd.conf I modified httpd.conf file to look like following. # forward all http request on port 80 to tomcat ProxyPass / ajp://127.0.0.1:8009/ ProxyPassReverse / ajp://127.0.0.1:8009/ # gzip text content AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript DeflateCompressionLevel 9 BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Turn on Expires and mark all static content to expire in a week # unset last modified and ETag ExpiresActive On ExpiresDefault A0 <FilesMatch "\.(jpg|jpeg|png|gif|js|css|ico)$" ExpiresDefault A604800 Header unset Last-Modified Header unset ETag FileETag None Header append Cache-Control "max-age=604800, public" </FilesMatch RewriteEngine On # rewrite all www.example.com/content/XXX-01.js and YYY-01.css files to XXX.js and YYY.css RewriteRule ^content/(js|css)/([a-z]+)-([0-9]+)\.(js|css)$ /content/$1/$2.$4 # remove all query parameters from URL after we are done with it RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTP/ RewriteCond %{QUERY_STRING} !^$ RewriteRule .* http://example.com%{REQUEST_URI}? [R=301,L] # rewrite all www.example.com to example.com RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] I want to achieve following. forward all traffic to tomcat GZIP all the text content. Put 1 week expiry header to all static files and unset ETag/last modified header. rewrite all js and css file to certain format. remove all the query parameters from URL forward all www.example.com to example.com The problem is only 1 and 2 are working. I tried a lot with many combinations but the expire and rewrite rule (3-6) do not work at all. I also tried moving these rules to apache2.conf and .htaccess files but it didn't work either. It does not give any error but these rules are simple ignored. expires and rewrite modules are ENABLED. Please let me know what should I do to fix this. 1. Do I need to add something else in httpd.conf file (like Options +FollowSymLink) or something else? 2. Do I need to add something in apache2.conf file? 3. Do I need to move these rules to .htaccess file? If yes, what should I write in that file and where should I keep that file? in /etc/apache2/ folder or /var/www/ folder? 4. Any other info to make this work? Thanks, Ankit

    Read the article

  • XDMCP is slow any ideas? (looking for alternative remote desktops)

    - by peteri
    I've been used to using RDP on Windows to remote to machines, and I've got an asus eee 701 which I want to use to do some *nix programming on. While the eee is a lovely little machine the screen and keyboard are a little small to use for lots of programming. I've tried using Xming (the free version) to remote login into the eee from my desktop using XDMCP (or even using a ssh session as a straight X11 server and no desktop on the eee) the whole thing seems seriously slow over wifi the initial desktop takes at least 5 seconds to paint (might even be 10 seconds I haven't actually timed it). So my real question is what do other folks use for remote control with a GUI for their *nix boxes? I am finding it hard to believe the performance is so bad over a wifi network (It makes the Mac IIs I used to use a college in 1988 seem fast) or is this just a problem with Xming and using say the Cygwin X11 server would be better.

    Read the article

  • SMTP server setup on windows xp, IIS

    - by .mahesh
    I have my domain registered with godaddy. I want to send newsletter to my customers (around 5000). But there is limit to send number of emails per day. Can i setup SMTP server on my home PC (windows XP) for sending these mails. Is there any "open source"/Free newsletter management application (build on ASP.NET, so that i can customize it if needed) which track bounce emails and other analytics. Any issue which i have to take care.

    Read the article

  • Automate GUI tasks?

    - by overtherainbow
    I have a Windows application which is deadware, and it lacks the option of exporting data into a file. The only way to extract data is to copy each line into the clipboard, and paste it in an editor. As a work-around, I'm thinking of recording the action once, and loop through it until it reaches the last line in the application. I know there are quite a few such utilities for Windows, so I'd appreciate it if you could recommend one for this task. Thank you.

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >