[TUT] How to name and mark a thread. !!Please make sticky!! - MDA Compact II ROM Development

A howto on how to mark threads good.
Because I'm pissed by threads with titles, that say nothing I've done a tutorial on how to name and mark threads right. I use things done in much forums and my own ideas.
Let's start.
First: How to name a thread good.
You have to use a thread that says much, for example “How to change the bootscreen“ and not “bootscreen“ or “question“ or something like that.
Second: How to mark threads.
Let's take the example from before.
The title “How to change the bootscreen“ could be a tutorial, but also a question. Now it is a question.
We use the [] tags for that. In them we write QUE for question. In our example this would be “[QUE] How to change the bootscreen”
You can also use more marks at once.
For example: “[ROM][WM6.1][WWE] Charmer Mobile 6.1”
Now a list of useable forms in the []:
TUT = tutorial
ROM = ROM
WM5 = WindowsMobile5 ROM
WM6 = WindowsMobile6 ROM
WM6.1 = WindowsMobile6.1 ROM
QUE = Question
APP = Application
IDE = Idea
REQ = Request
REF = Reference
THE = Theme
MOD = Moderation
DIS = Discontinued
Lang codes:
WWE = World Wide Edition
ENG = English
GER = German
And so on.
When I've forgotten some please post and I'll add to main thread.
Please make this sticky Vlodeck. Thank you.

Answered on PM.

Related

to all the .cab specialists ;)

i've absolutely no experience about creating .cab-files, so is it maybe possible to anyone of you creating me one or more .cab's containing a few settings and altering a few reg-keys? i would appreciate beeing able to use this in my sd-config further on an maybe it could be useful for some other german located people using wwe-roms...
so here we go:
first i need a .cab switching my regional settings to german, and activating the connection-wizard using the param's "deutschland" and "Vodafone" , if possible.
second i have some reg tweaks, as there are (i post the altered values only):
HKCU/ControlPanel/Phone/ShowSim : DWORD = 0
HKLM/Software/HTC/Biotouch/ActionScreen/APP_0 : Name = Neue Email
HKLM/Software/HTC/Biotouch/ActionScreen/APP_1 : Name = Neue SMS
HKLM/Software/HTC/Biotouch/ActionScreen/APP_2 : Name = Neue MMS
HKLM/Software/HTC/Biotouch/ActionScreen/APP_3 : Name = Neuer Termin
HKLM/Software/HTC/Biotouch/ActionScreen/APP_4 : Name = Neue Aufgabe
HKLM/Software/HTC/Biotouch/ActionScreen/APP_5 : Name = Neue Notiz
HKLM/Software/HTC/Biotouch/ActionScreen/APP_6 : Name = Neuer Kontakt
HKLM/Software/HTC/Biotouch/APLauncher/App2_2 : Name = Aufgaben
HKLM/Software/HTC/Biotouch/APLauncher/App2_3 : Name = Termine
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_1 : Name = Musik
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_2 : Name = Fotos
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_3 : Name = Videos
would be very great when sombody could do this for me! many many thanks in advance.....
you can use a cab manager to create cabs.
cabs can contain only reg settings while no other files in it.
you can find a 30 day trial one here:
http://www.ocpsoftware.com/download.php?nm=cecabmgr
i don't know any other freeware if there is..
here is a cab containing the reg entries in your post..
didn't test it but it should work,
u can backup those entries before, but i think it's not necessary..
hay, thank you very much for your quick support!!!
i will have a look at the cab-manager right now but allthough anybody can have a look at the regional- and connection-wizard settings? thans to all!
malsehn said:
hay, thank you very much for your quick support!!!
i will have a look at the cab-manager right now but allthough anybody can have a look at the regional- and connection-wizard settings? thans to all!
Click to expand...
Click to collapse
I don't think you can activate the connection-wizard by using a cab. perhaps you can change the default settings, but you will still have to run the Wizard (mannually or by a sort of scripting). If I knew how, I would help you out but unfortunally ... I don't...
You could create a cab that creates a shortcut to the Wizard so that on start up it will be loaded... (It may also be possible using a setup.dll file, but I have no idea how to implement this kind of functionality)
hi folks, sorry for diggin' out this old thread once more
i owned myself an artemis now and so i need a little modification on this settings- cab file once made for my old prophet..
so i asked myself, if one of you would be so kind again...
here are the reg tweaks that i would appreciate to have in one cab for usage in my sdconfig:
HKCU/ControlPanel/Phone/ShowSim : DWORD = 0
HKLM/Software/HTC/Biotouch/ActionScreen/APP_0 : Name = Neue Email
HKLM/Software/HTC/Biotouch/ActionScreen/APP_1 : Name = Neue SMS
HKLM/Software/HTC/Biotouch/ActionScreen/APP_2 : Name = Neue MMS
HKLM/Software/HTC/Biotouch/ActionScreen/APP_3 : Name = Neuer Termin
HKLM/Software/HTC/Biotouch/ActionScreen/APP_4 : Name = Neue Aufgabe
HKLM/Software/HTC/Biotouch/ActionScreen/APP_5 : Name = Neue Notiz
HKLM/Software/HTC/Biotouch/ActionScreen/APP_6 : Name = Neuer Kontakt
HKLM/Software/HTC/Biotouch/APLauncher/App4 : Name = Aufgaben
HKLM/Software/HTC/Biotouch/APLauncher/App5 : Name = Termine
HKLM/Software/HTC/Biotouch/CustAPLauncher/App1 : Name = Rechner
HKLM/Software/HTC/Biotouch/CustAPLauncher/App11 : Name = Softreset
HKLM/Software/HTC/Biotouch/CustAPLauncher/App2 : Name = Radio
HKLM/Software/HTC/Biotouch/CustAPLauncher/App5 : Name = Dateien
HKLM/Software/HTC/Biotouch/CustAPLauncher/App6 : Name = Livesuche
HKLM/Software/HTC/Biotouch/CustAPLauncher/App8 : Name = Notizen
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_1 : Name = Musik
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_2 : Name = Fotos
HKLM/Software/HTC/Biotouch/MediaHubMini/App1_3 : Name = Videos
i've made my changes to the previous version in red, so maby you only have to modify the old cab attached above...
many many thanks in advise to that, i never get through to making cab files myself..
Here is the new cab modified with settings in RED based on the old.
thank you for your very quick support!!! this is a cab now with all the old settings and with the red ones changed respectively added on it, to get you right? wow, that's great!!! many many thanks!!! im very happy now and so the next hardreset can come for me...
For networkwizard setting;
Put new on the registry:
\HKLM\Software\Microsoft\RIL\OperatorNames
new key such as:
xxxyy and the value of the Brand of your GSM operator
where xxx is MCC and yy is MNC (Five digit number)
And for Vodafone there are three Vodafone operator on Germany so you could put the key such as:
"26202"="deutschland" (or "Vodafone" which ever you like)
"26204"="deutschland" (or "Vodafone" which ever you like)
"26209"="deutschland" (or "Vodafone" which ever you like)
Then tap networkwizard.
Hope this will help you.

[REF][SUGGESTION] clean up your codes for OC/UV and old kernel codes if possible

hi all,
first of all, i would like to say that i'm no expert in c, and this post is not intended to blame anyone but want to raise this concern only.
since i started to mod i9000's kernel source code, i found some unneeded conditional statements in the original source and modded OC/UV sections which can be avoided very easily and thus consuming less resources.
let's take a look in this example from the original source:
Code:
for (i = 0; i < LOOP_CNT; i++) {
tmp = __raw_readb(iem_base + S5PV310_APC_DBG_DLYCODE);
sum_result += tmp;
hpm[i] = tmp;
}
for (i = 0; i < LOOP_CNT; i++)
printk(KERN_INFO "ASV : hpm[%d] = %d value\n", i, hpm[i]);
the second for loop is definitely unnecessary, and it should be changed to something like:
Code:
for (i = 0; i < LOOP_CNT; i++) {
tmp = __raw_readb(iem_base + S5PV310_APC_DBG_DLYCODE);
sum_result += tmp;
hpm[i] = tmp;
printk(KERN_INFO "ASV : hpm[%d] = %d value\n", i, hpm[i]);
}
let's take a look at another extreme case, taken from the OC/UV section:
Code:
if (index < L6)
{
if (old_index == L0)
index = L1;
if (old_index == L1)
index = L2;
if (old_index == L2)
index = L3;
if (old_index == L3)
index = L4;
if (old_index == L4)
index = L5;
if (old_index == L5)
index = L6;
}
it is obvious that, if old_index=L0, it has to go thru the remaining 5 if statements which shouldnt be. isnt it be nice and more efficient to chg it to something like below or use switch case instead?
Code:
if (index < L6)
{
if (old_index == L0)
index = L1;
else if (old_index == L1)
index = L2;
else if (old_index == L2)
index = L3;
else if (old_index == L3)
index = L4;
...
...
...
...
}
since we all aim at producing better and faster kernels, i think this is a good practice to clean up the codes while we r modding
thx for your kind attention
and this is the most ridiculous part that i've ever seen in my life, which can be found in I9000 source also. if u have 10 frequencies set, then instead of running the loop 10 times, this will run 50 times in total
arch/arm/mach-s5pv310/cpufreq.c, inside static int s5pv310_update_dvfs_table()
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_freq_table[i-1].index = s5pv310_lookup_freq_table.index - 1;
s5pv310_freq_table[i-1].frequency = s5pv310_lookup_freq_table.frequency;
printk(KERN_INFO "index = %d, frequency = %d\n",
s5pv310_freq_table[i-1].index, s5pv310_freq_table[i-1].frequency);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_volt_table[i-1].index = s5pv310_lookup_volt_table.index - 1;
s5pv310_volt_table[i-1].arm_volt = s5pv310_lookup_volt_table.arm_volt;
printk(KERN_INFO "index = %d, arm_volt = %d\n",
s5pv310_volt_table[i-1].index, s5pv310_volt_table[i-1].arm_volt);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
s5pv310_apll_pms_table[i-1] = s5pv310_lookup_apll_pms_table;
printk(KERN_INFO "apll pms_table = 0x%08x\n", s5pv310_apll_pms_table[i-1]);
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
for (j = 0; j < 7; j++) {
clkdiv_cpu0[i-1][j] = clkdiv_cpu0_lookup[j];
printk("%d, ", clkdiv_cpu0[i-1][j]);
}
printk("\n");
}
for (i = 1; i < CPUFREQ_LEVEL_END; i++) {
for (j = 0; j < 2; j++) {
clkdiv_cpu1[i-1][j] = clkdiv_cpu1_lookup[j];
printk("%d, ", clkdiv_cpu1[i-1][j]);
}
printk("\n");
}
Interesting...
Sent from my GT-I9100 using XDA Premium.
This might be right. My C is bad, but some OC/UV patches look really quite 'whatever works' for me. I dont say its bad - having something is better than nothing.
Its always good if some skilled coders do reviews of such patches.
good finding and the samsung programmers are really ............... bad...
joecisd said:
good finding and the samsung programmers are really ............... bad...
Click to expand...
Click to collapse
i think it's not samsung's problem, instead, it should be unsolved/overlooked problems brought forward from linux kernel
yeaaa Hong Kong
Do you want make a kernel for us?
regards
Nice catches
Hope most devs are already taking care of this!
avetny said:
yeaaa Hong Kong
Do you want make a kernel for us?
regards
Click to expand...
Click to collapse
sorry, but maybe u don know me coz i'm a newbie here in the i9100 section
as in the i9000 forum, i usually prefer not to release files, except some quick fixes like sms sent time mod, but i'll tell u guys my findings, dirty tricks, and how to instead
sorry about that
glad to see that some of you guys already fixed, or started to fix those redundant conditional statements
and ultimately, hope that one day these will be collected as a whole and stored somewhere for everyone like our kernel source code repo here
ykk_five said:
glad to see that some of you guys already fixed, or started to fix those redundant conditional statements
and ultimately, hope that one day these will be collected as a whole and stored somewhere for everyone like our kernel source code repo here
Click to expand...
Click to collapse
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
netchip said:
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
Click to expand...
Click to collapse
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
I'm also not an expert in C or kernel development, but i'm quite sure, that gcc is smart enough to check that some code is redundant and do that kind of optimizations in compile time (if you enable the optimize flags).
Feel free to give it a try, i'm also curious, but i think the final assembly code will be pretty much similar.
Sent from my GT-I9100 using xda premium
killerjohn said:
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
Click to expand...
Click to collapse
Okay, I go.do.that
Sent from my GT-I9100
netchip said:
I go try to clean up my code.
I only have a little C++ skills and no C but I give it a try ...
Click to expand...
Click to collapse
yeah, i know. i was learning from your source in github last nite
killerjohn said:
maybe if you upload the code to somewhere (for example into a wiki, or pastebin???) we can check it. Personally I've 20years of programming exp in 4 languages, and I'm sure a lot of people like me is already here We can't make the ROM "a lot faster", but basic structural bugs can be wiped out in a short period of time (like the "if else if else if else" example in the first post).
PS: sry for my english
Click to expand...
Click to collapse
that's great. yes, most of them are structural problems actually
Guiper said:
I'm also not an expert in C or kernel development, but i'm quite sure, that gcc is smart enough to check that some code is redundant and do that kind of optimizations in compile time (if you enable the optimize flags).
Click to expand...
Click to collapse
i know gcc is quite smart but i doubt if it can handle the conditional statements automatically if something like:
if (a is a male) then a is a boy
if (a is a female) then a is a girl
so actually, a should be checked once only coz we all know that in our daily life. but sometimes we need a bit more complicated logics like:
if (a contains red) then color = red
if (a contains green) then color =green
if (a contains blue) then color =blue
if (a contains blue & green & blue) then color = gray/black/white (by assuming the portions of red, green and blue are equal)
perhaps this is not a good example, but i just want to point out that not every set of conditions are redundant sometimes and hence gcc may not be able to handle it, i think (i'm not a gcc expert neither, pls correct me if i'm wrong )
Feel free to give it a try, i'm also curious, but i think the final assembly code will be pretty much similar.
Click to expand...
Click to collapse
but i've modded some smali before and found that even a very simple for loop in java can produce a lot of goto statements in the assembly code which can be clean up also

[Q] Dynamically edit Uri for playing audio-files

I'm trying to play an mp3-file located in res/raw.
Problem is that I have a lot of audio that needs to be played dynamically.
This code does work for "mySound.mp3".
Code:
mPlayer = MediaPlayer.create(main.this, R.raw.mySound);
mPlayer.start();
Whereas this code does NOT work:
Code:
String soundName = "mySound";
Uri uri_soundName = Uri.parse("R.raw." + soundName);
mPlayer = MediaPlayer.create(main.this, uri_soundName);
mPlayer.start();
I've tried various other syntaxes to get the uri right, for instance:
Code:
uri_soundName = Uri.parse("android.resource://com.myProject/myApp/raw/" + soundName);
...but to no avail.
Does anybody have an idea what I'm doing wrong?
Thanks,
Dan
Android Software Development
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

Help with XML NodeList

Im a noob to Android programming but have some experience with xml in other languages, here is what i have....
This is my XML
Code:
<myrooms>
<room type="private" lastupdate="1347500059" roomname="03EBFDF4AB76E9599A979AB1FED4" roomalias="Ryan,,,chronic Chris">
<entry timestamp="1347493468" handle="Ryan" sender="599A979AB1FED4">Entry one</entry>
<entry timestamp="1347499372" handle="Ryan" sender="599A979AB1FED4">entry two</entry>
<entry timestamp="1347500059" handle="Ryan" sender="599A979AB1FED4">entry three</entry>
</room>
</myrooms>
Code:
Document doc_roomlist;
NodeList nodelist_roomlist;
doc_roomlist = WebRequest.XMLfromString(newxml); //newxml contains the above xml
nodelist_roomlist = doc_roomlist.getElementsByTagName("room");
int size = nodelist_roomlist.getLength();
for (int z = 0; z < size; z++) {
mNode=nodelist_roomlist.item(z);
String roomname = mNode.getAttributes()
.getNamedItem("roomname").getNodeValue();
/// so the above is okay i can get all the attributes of the room nodes
/// but i'm having problems getting the entry nodes
NodeList entries=mNode.getElementsByTagName??????? <<< thats what i cant figure out how to get the entries into another nodelist
}
I cannot seem to get the entry nodes into another nodelist any help would really be appreciated.
when i do
NodeList nl = mNode.getChildNodes();
instead of returning the 3 entry nodes
it returns 6 nodes
one called #text and then my node
then #text and my other entry
so why is getChildNodes making two nodes for each <entry> and what is the #text?
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Thanks ✟
Moving to Q&A
really nobody can explain this nodelist thing to me? why there are 2 nodes for every one ??

Question regarding Vue-native

hello,
I'm working on a Vue-native project. I'm asking the question here because there is a limited community of developers using vue-native.
i'm working on a vue-native project where i need to create a hexadecimal to decimal and decimal back to hexadecimal converter. i have absolutely no clue about this numbering system. Is there any way I can create a converter in javascript or any other language?
Yes, pretty easily actually
JavaScript:
const base = 16;
let decNumber = 1234
let hexNumber = decNumber.toString(base)
console.log(hexNumber)
//"4d2"
typeof hexNumber
//"string"
and the other way around:
JavaScript:
const base = 16;
let hexNumber = "4d2"
let decNumber = parseInt(hexNumber, base)
console.log(decNumber)
//1234
typeof decNumber
//"number"
By changing "base" you can convert to other types:
JavaScript:
base = 2 //binary
base = 8 //octadecimal
base = 16 //hexadecimal
Thanks sir. This piece actually worked. I really appreciate it!..
denzelvieta said:
Thanks sir. This piece actually worked. I really appreciate it!..
Click to expand...
Click to collapse
istir said:
Yes, pretty easily actually
JavaScript:
const base = 16;
let decNumber = 1234
let hexNumber = decNumber.toString(base)
console.log(hexNumber)
//"4d2"
typeof hexNumber
//"string"
and the other way around:
JavaScript:
const base = 16;
let hexNumber = "4d2"
let decNumber = parseInt(hexNumber, base)
console.log(decNumber)
//1234
typeof decNumber
//"number"
By changing "base" you can convert to other types:
JavaScript:
base = 2 //binary
base = 8 //octadecimal
base = 16 //hexadecimal
Click to expand...
Click to collapse
Hello sir,
I just showed the answer to my client and this code does not return the correct answer for the large digits. For example, if i insert this number "1111111111111111" then this code returns "37450626705270707" which the actual answer is "1229782938247303441". My client gave me reference of this tool: https://binarytotext.net/hexadecimal-to-decimal/. Is there any way I can get the correct answer for the larger numbers?
There's nothing wrong with the code. Use Bignumber.js, it is used to handle big numbers in Javascript!!!
denzelvieta said:
Hello sir,
I just showed the answer to my client and this code does not return the correct answer for the large digits. For example, if i insert this number "1111111111111111" then this code returns "37450626705270707" which the actual answer is "1229782938247303441". My client gave me reference of this tool: https://binarytotext.net/hexadecimal-to-decimal/. Is there any way I can get the correct answer for the larger numbers?
Click to expand...
Click to collapse
I'm pretty sure this isn't an error in the code but rather "bug" in javascript.
As per this stackoverflow answer javascript uses IEEE-754 for storing numbers (which is mostly used for storing doubles, not integers). If you want to see what happens when you type in a really big number check out this tool (that's why you don't want to store eg. phone number as an integer).
This stackoverflow answer should probably give you a good idea what to do. This answer works for "1111111111111111".

Categories

Resources