Development question - error resource file has much lines - Pebble

Hey buddies. On my app to pebble, on IDE CloudPebble, I created a new resource, is a simple txt file, but this file have 3000 lines. If I cut some lines, the app install normally(example 500 lines), but I want that it read all txt(the 3000 lines). To read, I use the recomended functions of Developer GetPebble, after I add the strings to a array 'n execute a function, after this array is cleaned, to read a new line of strings. Exists a configuration to resolve this? I really want read all lines. I don't wanna install it app into pebble smartwatch, I created it app only to test, before use into watch without read the resource file, only capturing data of accelerometer.
Language C.
Resource type: Raw Binary Blob.
This file has 78,5 kb. Thanks!

Related

Text Editor

Hi,
I need a text editor that can do the following things:
- I have 2 files, let's say file abc.txt and def.txt
cat abc.txt:
[HKEY_CURRENT_USER\ABC]
A=1
B=2
C=3
cat def.txt:
[HKEY_CURRENT_USER\ABC]
A=1
B=2
C=3
[HKEY_LOCAL_MACHINE\DEF]
D=4
E=5
F=6
- def.txt is superset of abc.txt
- I want to make the content of abc.txt as a base search for abc.txt and if there is a similar entries in file def.txt then it prompt and ask if I want to delete the entries in def.txt.
Basically I want to compare abc.txt and def.txt and delete the content inside def.txt that similar to file abc.txt.
I did a searching and so far found nothing on the text editor that can do what I want.
Cheers,
Vibranze
im not aware of anything that does this. The only thing I can suggest is to get a second notepad program so you can open two text files at once, and then do your searching and editing manually.
Hi Neptune,
Yeah, this is what I thought too, no such tools exist and I need to do eye balling
Cheers,
Vibranze
While talking to a friend about dealing with two text files he mentioned this program:
http://www.pdalive.com/seymour.php
Allows you to split your screen into two allowing you to view to applications at once. Maybe this will help speed up the aforementioned process of editing text files.
well the pocketVI which is free have a "c" "compiler" in it
maybe it could be used
might help
http://www.ultraedit.com/index.php?name=Content&pa=showpage&pid=34
I swear by UltraEdit (from the same people as UltraCompare), but I've never gotten on with UltraCompare....for comparing, merging and updating files and folders, I use "Beyond Compare (See HERE) from ScooterSoftware - it's not free, but it's a small price to pay (IMHO!!) for the features it offers....
See what you think...
Mark.
Thanks all for the reply.
Can the comparison software compare two files and show me the line containing same entries and options to delete the line from the superset file (def.txt)?
Or if I sort both files, then I paste content of abc.txt into def.txt and use text editor to search and highligh for duplicate entries within def.txt so I can delete it, is there any text editor that can search for duplication inside the file?
Appreciated the feedback given. Thanks.
Cheers,
Vibranze

Start Menu Customisation

Hello everyone,
In my quest to automate set up post ROM flashing, I have written a Mortscript to set up the start menu and the Manila Program launcher.
Everyone has their own preferred set up, and I was finding it time consuming to move all the shortcuts around to the directories I wanted them in.
I know some installers like Sashimi allow you to place new cabs where you want, but I couldn't find anything to automatically reorganise my menu including existing apps in the ROM.
I tried xml provisioning and SDConfig etc, but I just couldn't get it to work in an acceptable fashion.
Hence the script.
OK, so the script moves all of the program shortcuts (lnk files) to a flat directory on the storage card.
The existing start menu is then deleted (with the exception of settings).
The script reads in a config file (needs to be in the storage card root and called custom.txt but can obviously be editted in the mortscript) and rebuilds the menu.
If no entry is found in the config file for a particular shortcut, then the shortcut is moved to "Program files\unused"
Hopefully the config file layout is self explanatory.
An example entry.....
--,\Windows\Start Menu\PIM
Messaging.lnk
contacts.lnk,
PIM Backup.lnk
iContact.lnk
Calendar.lnk
Tasks.lnk,1
Messaging.lnk
PIM Backup.lnk
ThumbCal.lnk
-- indicates a new directory to be created, in this case \Windows\Start Menu\PIM
The , is a separator between indicating it is a directory to be created and the directory structure itself.
The shortcuts speak for themselves, and will be set up under the directory structure above. If the shortcuts are succeeded by a , and a value between 1 and 18 (e.g. tasks in the example above) the shortcut will be mapped to the manila program launcher.
The spaces before the lnk files don't matter, just makes the config file easier to read.
No reset is required.
In terms of debugging, there is a debug flag in the script. Set the value to 1, and the output will be logged to Storage Card\log.txt
Hope this is useful for some of you.
*Note there are a couple of bugs.....
1) The icon's linked to folders (e.g. the little playing card associated with the games folder) often get deleted.
2) The .net configuration program. For some reason Mortscript doesn't seem to handle files starting with a . very well so there's some hardcoded renaming going on (all in a dedicated subroutine)
Hopefully I'll get those fixed, but no promises.
Enclosed zip has the script, an example of custom.txt and an example of the debug output.
Huge thanks to Mort as ever, as well as a couple of others from whom I have "re-used" ahem, some of their public scripts.
If anyone knows how to do this via provxml or SDConfig, then please post!
Mods - should I add this in to the mortscript examples thread (things do get a little buried on there & hope it's ok to post this here as its relevant to flashing) ?

Something like 'grep' for Android?

I have a few hundred text files in a folder on my SD card, and I need some way of searching across them. For instance, if I search for 'balloon', it needs to returns the names of the files that contain the word 'balloon', not in the filename, but in the text.
Bonus points if it would allow for wildcards, or allow me to open the result files in an editor or viewer.
Does anyone know of something like this? It's basically a frontend to 'grep' along with a simple GUI.
EDIT: Oh, and before someone mentions it...Aurora does NOT do this. It can search the filenames, but not within the text files.
An up from a dusty cupboard
Very old thread, up !
I'm looking for a command in Android shell, to do the same job as "grep" for Linux/UNIX ?
Someone got an alternative ?
Thanks

XML database or Sqlite?

Hi,
I'm trying to create a small DB, at first i thought about using Sqlite, but since my Xposed model doesn't always have context, it seems impossible.
So i thought using XML file (eventually, my DB contains only one table, each row has 2 values). but it seems there' s no good way to manage the XML file (i need to read & write every once in a while)...
What is the best practice?
Thanks,
I don't think there's a "best practice" – you'll just need to see what you want and what's best suited for your use case.
You could try getting a context using AndroidAppHelper.currentApplication().

How do I rename spreadsheet columns and alter app to suit?

I have built an app from a tutorial but I am having problems adapting it to my needs. I need to rename the spreadsheet columns but when I do (and match the names in the app) if fails to get the data.
I'm not sure what spreadsheet you are referring to, but just going off my excel & VBA knowledge, can you check that auto calc is turned on? and/or hit F9 to recalc. How about the name manager section in the tool ribbon in excel? Say for example the column you want is called "variables" and it was originally defined as $A:$A (i.e., all of column A) but you did something and now it's been altered so that it's $A:$B (i.e., is all of columns A & B) then that could cause problems. Similar thing if it the area was smaller, like $A$2:$A$6. If you added a row to cell A7, the name manager is not looking past A6 in this example so your new info won't get a hit.
Hope that helps
I am using a google sheet to hold data for the app, one entry per row. I have tried with the code I have that builds the basic app. The tutorial app has first_name, last_name, email as column headers. I need them to be gridref, fallname, w3w. I have to name the data fields (?) within the app but if I use GridRef it fails but gridref works. can string names not have/be capitalised?
Also if I create a new project called WF the code I'm using works but if I name it waterfalls it fails.
I can rename them in the spreadsheet, there are no calculation fields etc. just simply text in a cell, typed in to be passed over to the app in JSON format.
I can add a new line which displays in tha app as a new entry which is what I want. I will need to add columns at some stage but I'll be happy to get this working first.
I have managed to rename 3 of the four columns but it fails when i change the name of the 4th That may not be a problem but changing last_name to aw3w causes an issue. In the app I think they are called 'holders', are some names reserved by the system?
I have figured this one out.

Categories

Resources