Friday, April 20, 2012

Limit to number of "named ranges" in Range method

I am using the following code:



Dim rng As Range

Set rng = Workbooks("import sheet.xls").Sheets("import").Range("project_name,project_author,project_code,project_breaker,default_fault_ac_mcb,default_fault_ac_mccb,default_fault_dc,default_fault_acb,default_rvdrop,default_svdrop,default_eff,default_pfactor,default_ratio,default_freq,default_sfactor_ac,default_spfactor")

For Each cell In rng.Cells
MsgBox cell
Next cell


Now project_name,project_author are different named ranges in the sheet,the problem is when i add another named range to the above list (already defined) i get a runtime error 1004 (select method of range class failed)



Is there a limit to the number of named ranges u can add to range object ?





Android: How to Remove Selected Tab Highlight Color & On Press Highlight on TabWidget

I am now working with Android TabWidget.
I build this TabWidget based on http://mobileorchard.com/android-app-development-tabbed-activities/

I've already add background to the TabWidget,

but apparently the highlight of selected tab and pressed tab is always visible and I cant turn it off yet.



Here is the picture (sorry cant directly add image because still a newb). :

1. default selected tab : http://postimage.org/image/9ryed6w5b/

2. on pressed tab : http://postimage.org/image/gwg7m83en/



What I want is the default selected tab color and on pressed tab color to be invisible or turned off, so the image background will fully shown, not blocked by those colors.



Any response will be appreciated. Thank you :)



the code:



public void onCreate(Bundle savedInstanceState) {
//hide title bar
BasicDisplaySettings.toggleTaskBar(EpolicyMainActivity.this, false);
//show status bar
BasicDisplaySettings.toggleStatusBar(EpolicyMainActivity.this, true);

super.onCreate(savedInstanceState);
setContentView(R.layout.epolicy);
TabHost tabHost=(TabHost)findViewById(R.id.tabHost);
tabHost.setup();
tabHost.getTabWidget().setBackgroundColor(0);
tabHost.getTabWidget().setBackgroundResource(R.drawable.epolicy_menu_bar);

TabSpec spec1=tabHost.newTabSpec("Tab 1");
spec1.setContent(R.id.tab1);
spec1.setIndicator("",getResources().getDrawable(R.drawable.epolicy_menu_home));

TabSpec spec2=tabHost.newTabSpec("Tab 2");
spec2.setContent(R.id.tab2);
spec2.setIndicator("",getResources().getDrawable(R.drawable.epolicy_menu_nab));

TabSpec spec3=tabHost.newTabSpec("Tab 3");
spec3.setContent(R.id.tab3);
spec3.setIndicator("",getResources().getDrawable(R.drawable.epolicy_menu_contact));

TabSpec spec4=tabHost.newTabSpec("Tab 4");
spec4.setContent(R.id.tab4);
spec4.setIndicator("",getResources().getDrawable(R.drawable.epolicy_menu_agen));




How to split a bitmap by a line

I'm working on a project for android devices. I want to split a bitmap by a line into 2 bitmaps. How do I do. Please help!





Windows 8 Metro Style Apps : Lambda expressions

Are the lambda expressions supported while developing Metro Style Apps using C#/XAML ?
I've tried to define a delegate via lambda expression and got whole bunch of syntax errors.
WHY ? What about anonymous methods ?





Difference between "fuzz testing" and "monkey test"

I have recently been thinking of the difference between fuzz testing and monkey test. According to wiki, it seems monkey test is "only" a unit test and fuzz test isn't. Android has UI/Application Exerciser monkey and it doesn't seems like unit test.



Is there any difference between these testing methods?





jQuery - How to position, resize and move one image over another

What I'm trying to achieve is: position one image over another and be able to move it within the region of the containing image, also to be able to resize the top image, by keeping its ratio. Then I need to know the size (w, h) and position (x, y) of the top image within the containing image container.



What I want is actually something like jCrop, but the highlight region to be a png image, and not a semitransparent rectangle.





Gettext on php/iis/win7, wrong charset

I am refactoring some old app in php 5.2.17 and converting it to UTF-8 charset. App uses gettext, but for some reason, gettext returns data in cp1250 (on win7 witch czech national environment) even if all texts are now UTF-8 and catalog texts too. I did try to create one brand new in UTF-8 from beginning, restarting IIS7.5, but still getting wrong charset (not UTF-8 but cp1250). (I am new in win7, on new pc, maybe it is in some php config, mbstring and iconv has set UTF-8 as internal encoding)



Edit:
This is header of my .po file.I generating .mo every time again:



"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
"X-Poedit-Basepath: ../../../\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Poedit-Language: Czech\n"
"X-Poedit-Country: CZECH REPUBLIC\n"
"X-Poedit-SourceCharset: utf-8\n"
"X-Poedit-SearchPath-0: .\n"


All codes and html header is now utf-8. What about any IIS chache? But restart of IIS hase no efect.



Do you have any idea what can be wrong?
Thank you for answer.