Search Results

Search found 2 results on 1 pages for 'einsteinx2'.

Page 1/1 | 1 

  • Chemical alternatives to caffeine / coffee for mental clarity and alertness? [on hold]

    - by einsteinx2
    Currently I drink about 2 cups of coffee or tea a day (one in the morning and one in the afternoon usually). However I'm very sensitive to stimulants and drinking caffeine regularly keeps my resting heart rate really high, causes occasional heart palpitations, and sometimes trouble sleeping. I've tried going without coffee, and while I can do it, I have trouble concentrating at work and even just enjoying my work. I'm borderline ADD (or possibly full on ADD, but haven't been checked). And I tend to lose focus easily if I don't have some coffee or tea in me. For health reasons, I'd like to cut it out completely, but when I do my work performance seriously suffers. I already work out (cardio and/or weight lifting) 5 - 6 days a week, and get an average of about 8 hours of sleep, but I still can't focus throughout the day without caffeine. Are there any over the counter chemical or supplement alternatives for mental clarity that you've used with success don't cause the additional unwanted physical side effects that come with regular stimulants like caffeine?

    Read the article

  • How to convert an NSString to hex values

    - by einsteinx2
    I'd like to convert a regular NSString into an NSString with the (what I assume are) ASCII hex values and back. I need to produce the same output that the Java methods below do, but I can't seem to find a way to do it in Objective-C. I've found some examples in C and C++ but I've had a hard time working them into my code. Here are the Java methods I'm trying to reproduce: /** * Encodes the given string by using the hexadecimal representation of its UTF-8 bytes. * * @param s The string to encode. * @return The encoded string. */ public static String utf8HexEncode(String s) { if (s == null) { return null; } byte[] utf8; try { utf8 = s.getBytes(ENCODING_UTF8); } catch (UnsupportedEncodingException x) { throw new RuntimeException(x); } return String.valueOf(Hex.encodeHex(utf8)); } /** * Decodes the given string by using the hexadecimal representation of its UTF-8 bytes. * * @param s The string to decode. * @return The decoded string. * @throws Exception If an error occurs. */ public static String utf8HexDecode(String s) throws Exception { if (s == null) { return null; } return new String(Hex.decodeHex(s.toCharArray()), ENCODING_UTF8); }

    Read the article

1