Search Results

Search found 426 results on 18 pages for 'bb'.

Page 9/18 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Parse 2 dimensional JSON array in Javascript

    - by MrG
    I have a two dimensional JSON array where each element contains several attributes. The example below is intentionally simplified: var map_data = { "1": {"1":{"name":"aa"},"2":{"name":"bb"}}, "2": {"1":{"name":"cc"},"2":{"name":"dd"}} }; I try to parse the data but .length doesn't work: for(x=1; x<=map_data.length; x++) { for(y=1; y<=map_data[x].length; y++) { // CODE } } Many, many thanks!

    Read the article

  • how to import the parent model on gae-python

    - by zjm1126
    main:. +-a ¦ +-__init__.py ¦ +-aa.py +-b ¦ +-__init__.py ¦ +-bb.py +-cc.py if i am in aa.py , how to import cc.py ? this is my code ,but it is error : from main import cc what should i do . thanks updated in normal python file (not on gae),i can use this code : import os,sys dirname=os.path.dirname path=os.path.join(dirname(dirname(__file__))) sys.path.insert(0,path) import cc print cc.c but on gae , it show error : ImportError: No module named cc

    Read the article

  • python gio waiting for async operations to be done

    - by pygabriel
    I have to mount a WebDav location and wait for the operation to be finished before to proceed (it's a script). So I'm using the library in this way: location = gio.File("dav://server.bb") location.mount_enclosing_volume(*args,**kw) # The setup is not much relevant location.get_path() # Returns None because it's not yet mounted since the call is async How to wait until the device is mounted?

    Read the article

  • jad for blackberry non-midlet application

    - by Durgesh
    Hi Experts, I am writing a regular application for Blackberry. I want to know, is there anything similiar to JAD for pure native blackberry application (no j2me) ? If JAD is applicable to regular BB app then please guide me to use JAD for it. Kind Regards -Durgesh O Mishra

    Read the article

  • Finding what makes strings unique in a list, can you improve on brute force?

    - by Ed Guiness
    Suppose I have a list of strings where each string is exactly 4 characters long and unique within the list. For each of these strings I want to identify the position of the characters within the string that make the string unique. So for a list of three strings abcd abcc bbcb For the first string I want to identify the character in 4th position d since d does not appear in the 4th position in any other string. For the second string I want to identify the character in 4th position c. For the third string it I want to identify the character in 1st position b AND the character in 4th position, also b. This could be concisely represented as abcd -> ...d abcc -> ...c bbcb -> b..b If you consider the same problem but with a list of binary numbers 0101 0011 1111 Then the result I want would be 0101 -> ..0. 0011 -> .0.. 1111 -> 1... Staying with the binary theme I can use XOR to identify which bits are unique within two binary numbers since 0101 ^ 0011 = 0110 which I can interpret as meaning that in this case the 2nd and 3rd bits (reading left to right) are unique between these two binary numbers. This technique might be a red herring unless somehow it can be extended to the larger list. A brute-force approach would be to look at each string in turn, and for each string to iterate through vertical slices of the remainder of the strings in the list. So for the list abcd abcc bbcb I would start with abcd and iterate through vertical slices of abcc bbcb where these vertical slices would be a | b | c | c b | b | c | b or in list form, "ab", "bb", "cc", "cb". This would result in four comparisons a : ab -> . (a is not unique) b : bb -> . (b is not unique) c : cc -> . (c is not unique) d : cb -> d (d is unique) or concisely abcd -> ...d Maybe it's wishful thinking, but I have a feeling that there should be an elegant and general solution that would apply to an arbitrarily large list of strings (or binary numbers). But if there is I haven't yet been able to see it. I hope to use this algorithm to to derive minimal signatures from a collection of unique images (bitmaps) in order to efficiently identify those images at a future time. If future efficiency wasn't a concern I would use a simple hash of each image. Can you improve on brute force?

    Read the article

  • Strings Generation

    - by sikas
    Hi,I would like to know how can I create various string from some given characters eg: given characters: a, b I would like to generate the following strings: aa ab ba bb What I have thought of is having (for 2 inputs only) two for-loops one inside another, and then loop each to the number of inputs which in this case is 2 and the output strings will be 2*2 = 4 strings and as the number increases the number of output strings will increase by multiplying n*n (n-times)

    Read the article

  • BlackBerry - How to add content to the Home Screen? (Today plugin?)

    - by Devguy
    Hi guys, in the WinMobile world you can create a so called Today plugin to add content to the phone's main screen, the one where you see the number of missed calls, unread sms and upcoming events. Is it possible to do something similar on the BB? I'd like to show some important info there, so that they are as visible and easily reachable as possible. I hope this is something that can be done with Java and the JDK...

    Read the article

  • UI template with big controls

    - by Bumble Bee
    Im not sure if this question is appropriate to go in here but after some hard effort in google I had no option but to post this here. I'm in the process of doing some UIs for a touch screen, but not sure how the template should look like. e.g. how big the buttons/text/labels should be. If anyone has experience in doing s similar stuff, pls share some references you have. thanks BB

    Read the article

  • How to achieve a hidden status bar using three20 framework

    - by Angelfilm Entertainment
    I'm using the TTThumbsViewController section of the three20 framework, and I have the status bar hidden throughout my application. When the user views the full size image, taps the screen(hiding the controls), when they tap again the controls reappear but the status bar is there too. I've searched through the whole library and been unable to isolate the section where this is happening. I'd love it if someone could point me in the right direction. Thanks, BB

    Read the article

  • Stings Generation

    - by sikas
    Hi,I would like to know how can I create various string from some given characters eg: given characters: a, b I would like to generate the following strings: aa ab ba bb What I have thought of is having (for 2 inputs only) two for-loops one inside another, and then loop each to the number of inputs which in this case is 2 and the output strings will be 2*2 0 4 strings and as the number increases the number of output strings will increase by multiplying n*n (n-times)

    Read the article

  • for x in y, type iteration in python. Can I find out what iteration I'm currently on?

    - by foo
    Hi, I have a question about the loop construct in Python in the form of: for x in y: In my case y is a line read from a file and x is separate characters. I would like to put a space after every pair of characters in the output, like this: aa bb cc dd etc. So, I would like to know the current iteration. Is it possible, or do I need to use a more traditional C style for loop with an index?

    Read the article

  • Auto-resize large images with JavaScript?

    - by Yegor
    I have an application that allows people to post images on each others profiles with bb code. Problem is, some post very large images, which cover other parts of the site when are viewed. How can I scale down images, client-side, so they are no bigger than x by y dimensions?

    Read the article

  • Download HTML content that require authorization?

    - by NVA
    I use WebClient from System.Net Namespace of Visual Studio 2008 to download the HTML content. It done well with normal website but with some 4rum that require authorization such as warez-bb.org, it always return the HTML of the login page. I wonder if there is a way to send the username and password to the WebClient?

    Read the article

  • Blackberry - Programmatically extract/open zip file

    - by KKlucznik
    I have looked online with mixed results, but is there a way to programmatically extract a zip file on the BB? Very basic my app will display different encrypted file types, and those files are delivered in a zip file. My idea was to have the user browse to the file on their SDCard, select it, and I extract what i need as a stream from the file. is this possible?

    Read the article

  • Which messaging interfaces can BlackBerry apps modify?

    - by humble coffee
    Does the native Blackberry API allow for the modification of any messaging interface? For example, I'd like to be able to build an app that added a button at the bottom of a received message which says 'translate this'. I've heard that this kind of thing is possible using J2ME plus the native BlackBerry API. Can this be done for all kinds of messages, eg SMS, email and BB messaging? The translation aspect is not relevant, it just provides the context for the kind of feature I'm after.

    Read the article

  • Converting a C++ Checksum function to Java

    - by user1897599
    I'm trying to convert this C++ checksum to Java but for the time being I've failed. What am I doing wrong? What is it supposed to do? It is supposed to return a positive checksum for a buffer in OpenGL Here's the C part. DWORD QuickChecksum(DWORD *data, int size){ if(!data) { return 0x0; } DWORD sum; DWORD tmp; sum = *data; for(int i = 1; i < (size/4); i++) { tmp = data[i]; tmp = (DWORD)(sum >> 29) + tmp; tmp = (DWORD)(sum >> 17) + tmp; sum = (DWORD)(sum << 3) ^ tmp; } return sum; } And here is what I have tried in Java. As far As I know DWORD is 32bit so I use int in a long to get a unsigned int which should be done in java with ? I've been looking at this problem so much now that I've grown blind to it. public static long getChecksum(byte[] data, int size) { long sum, tmp; sum = getInt(new byte[]{data[0], data[1], data[2], data[3]},true) & 0xFF; for(int I = 4; I < data.length; I += 4) { tmp = getInt(new byte[]{data[I],data[I+1],data[I+2],data[I+3]},true) & 0xFF; tmp = (sum >>> 29) + tmp; tmp = (sum >>> 17) + tmp; sum = (sum << 3) ^ tmp; } return sum & 0xFF; } private static int getInt(byte[] bytes, boolean big) { ByteBuffer bb = ByteBuffer.wrap(bytes); return bb.getInt(); } Thank you all for your help!

    Read the article

  • MySQL - generate numbers for a group of results

    - by FreeIX
    I need a query to return this result: +---------+-----+-------+ | ref_nid | nid | delta | +---------+-----+-------+ | AA | 97 | 1 | | BB | 97 | 2 | | CC | 97 | 3 | | DD | 98 | 1 | | EE | 98 | 2 | | FF | 98 | 3 | +---------+-----+-------+ However, I do not have the delta column. I need to generate it for each nid group. In other words, I need an auto incremented number for each group of the result.

    Read the article

  • BlackBerry - Handle and translate messages (sms/email/pim/pin)?

    - by humble coffee
    Does the native Blackberry API allow for the modification of any messaging interface? For example, I'd like to be able to build an app that added a button at the bottom of a received message which says 'translate this'. I've heard that this kind of thing is possible using J2ME plus the native BlackBerry API. Can this be done for all kinds of messages, eg SMS, email and BB messaging? The translation aspect is not relevant, it just provides the context for the kind of feature I'm after.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >