Hello, I seem to have a small problem, in the code below $a_trip is always true, even if $trip!= $admin_trip. Any idea why?
if($trip == $admin_trip)
$a_trip = true;
if($a_trip == true)
$trip = ("~::##Admin##::~");
Can anybody gimme the idea about the JSP custom tag library and the JSP 2 Tag files..
Are this two are alternatives to use....???
If there is any comparision(or merits and demerits) among this please do specify..
And which one of this is better to work with..
I m waiting for the kind suggestions..
Regards,
Vinayak
when i touch whereever in the screen that point will be glow(nothing but like a flash or glittering) for some time. how to do that? any example or idea?? i have to implement to put buttons on it. exactly when i touch the screen it will glow some time and then the button will appear on the point where i touched.
I there
I'm working on a C# app, and I get a string with a date or part of a date and i need to take day, month and year for that string
ex:
string example='31-12-2010'
string day = Regex.Match(example, "REGULAR EXPRESSION FOR DAY").ToString();
string month = Regex.Match(example, "REGULAR EXPRESSION FOR MONTH").ToString()
string year = Regex.Match(example, "REGULAR EXPRESSION FOR YEAR").ToString()
day = "31"
month = "12"
year = "2010"
ex2:
string example='12-2010'
string month = Regex.Match(example, "REGULAR EXPRESSION FOR MONTH").ToString()
string year = Regex.Match(example, "REGULAR EXPRESSION FOR YEAR").ToString()
month = "12"
year = "2010"
any idea?
tks
I have a very little idea about what database file system is.
Can somebody out here explain to me what actually a database file system is, and what its applications are?
How is it different from a conventional file system?
How I can build it?
I am trying to load a table view from a cache very quickly and have the cached data in the table view appear. Then I want download new data, and then reload the table. Right now I am downloading the new data on viewDidAppear, but the view still refreshes before it displays. Any idea how I can do this?
I need to upload large (100 meg max) binairies to server using WCF. I followed instructions from this: http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/fileuploadsilverlightwcf07142009104020AM/fileuploadsilverlightwcf.aspx
it workds for anything less than 50K. going above that I get 415 errors. any idea?
I am using JTextArea in JScrollPane
I want to limit the maximum number of lines possible and the maximum chars in each line.
I need that the string will be exactly like on the screen, each line will end with '\n' (if there another line after it) and the user will be able to insert only X lines and Y chars in each line.
I tried to limit the lines but i don't know exactly how many lines do i have because of the line wrapping, The line wrapping is starting new line visualy on the screen(because of the width of the JTextArea) but in the string of the component it is really the same line with no '\n' to indicate new line. I do not have an idea how to limit the max chars in each line while typing.
There are 2 stages:
The typing of the string- keep that the user will not be able to type more then X lines and Y chars in each line. (even if the line wrap only visualy or the user typed '/n')
Insert the string to the DB- after cliking 'OK' convert the string that every line will end with "/n" even if the user did not typed it and the line was wrapped only visualy.
There are few problems if i will count the chars in the line and insert '/n' in the end of the line, thats why i decided to do it in two stages. In the first stage ehile the user is typing i would rather only limit it visualy and force line wrpping or something similar. Only in the second stage when i save string i will add the '/n' even if the user did not typed it in the end of the lines!
Does anyone have an idea?
I know that i will have to use DocumentFilter OR StyledDocument.
Here is sample code that limit only the lines to 3:(but not the chars in row to 19)
private JTextArea textArea ;
textArea = new JTextArea(3,19);
textArea .setLineWrap(true);
textArea .setDocument(new LimitedStyledDocument(3));
JScrollPane scrollPane = new JScrollPane(textArea
public class LimitedStyledDocument extends DefaultStyledDocument
/** Field maxCharacters */
int maxLines;
public LimitedStyledDocument(int maxLines) {
maxCharacters = maxLines;
}
public void insertString(int offs, String str, AttributeSet attribute) throws BadLocationException {
Element root = this.getDefaultRootElement();
int lineCount = getLineCount(str);
if (lineCount + root.getElementCount() <= maxLines){
super.insertString(offs, str, attribute);
}
else {
Toolkit.getDefaultToolkit().beep();
}
}
/**
* get Line Count
*
* @param str
* @return the count of '\n' in the String
*/
private int getLineCount(String str){
String tempStr = new String(str);
int index;
int lineCount = 0;
while (tempStr.length() > 0){
index = tempStr.indexOf("\n");
if(index != -1){
lineCount++;
tempStr = tempStr.substring(index+1);
}
else{
break;
}
}
return lineCount;
}
}
You know what I'm talking about: for example when you get multiple new emails the notification icon in the status bar is augmented with a little red circle that contains number of unread mails. Twitroid has the same icon. Any idea how it's done? I don't think (or so I hope) there are 10000 similar icons. Is this red circle generated and overlaid the notification icon? If so - any code snippets will be much appreciated.
Hi
For most of records this field is null.
Only some record I need to wake it up.
table are very big , I want to know which record want to wakeup.
I don't want database to seek every row.
Could you example me your Idea?
Hello
It may be quite easy to do, but I can't find out how :
I want to add a vertical index in my sorted tableViewController, like in the "Contacts" application.
Any idea ?
Thks
Martin
I am using avaudioplayer for playing mp3 songs.
The problem is in being able to catch the instance of the player to control it i.e. Stop it, Play it etc. The code by default creates multiple instances of the same player and overlaps the songs. I am being unable to reference the player specifically.
Do you have an idea as to how we can do so?
Thanks
Arun Sharma
Hi
I upgraded an iPhone project from the 2.2.1 SDK to 3.0 SDK recently...
And when I build the project I am getting the following warning:
GCC 4.2 default deployment target 10.6.2 for architecture 'i386' and
variant 'normal' is greater than the maximum value 10.6 for the
Simulator - iPhone OS 3.1.2 SDK
I have the iPhone OS Deployment target set to iPhone OS 3.0
Any idea what could be causing this 'warning' to show up.
Regards
- SY
I am currently using Diskpart to accomplish these functions, but i would like to be able to use P-Invoke and not have to shell out to an external process in my C# app.
The example Diskpart scripts are:
//Online a disk
Select disk 7
disk online
// Reset GPT Identifier
select disk 7
UNIQUEID DISK ID=baf784e7-6bbd-4cfb-aaac-e86c96e166ee
I tried searching pinvoke.net but could only find functions that dealt with volumes, not disks. Any idea on how to accomplish these diskpart commands using Pinvoke?
how to achieve the lazy table concepts which is in iphone. that is the listview with the custom adapter that contains imageview as icon and textview as three rows. when scroll the listview it stacked up to scroll. i want to make it easy. the image content should load only the visible part of the list view. how to do that? Any Idea?
hi,
I am new to Silverlight. I need to develop a Silverlight application along with charts.
Any idea how I should develop this thing? Any articles, code which tell me how to do it
that would be really great. Please share your thoughts how i can achieve this.
thank you
Given two arrays like the following:
a = array([1,2,4,5,6,8,9])
b = array([3,4,7,10])
I would like the output to be:
c = array([1,2,3,4,5,6,7,8,9,10])
or:
c = array([1,2,3,4,4,5,6,7,8,9,10])
I'm aware that I can do the following:
c = sort(unique(concatenate((a,b)))
I'm just wondering if there is a faster way to do it as the arrays I'm dealing with have millions of elements.
Any idea is welcomed. Thanks
Hi all,
Today I'm experimenting with the AJAX Control Toolkit controls, specifically with the ModalPopUpExtender control. Accomplishing basic tasks is really easy with this control but then came an idea...
What if I wanted to dynamically load a WebUserControl into a ModalPopUp? can this be done? if so, how?
Many thanks!
Hi am going to do some project there i need
to show integral , sigma, pie , etc.. so is there any equation edtior controls available. so
I have to integrate to my Asp.Net project
I got one editor ie: LAtex Equation editor but it show the html format in the textbox ,and also it show his site name etc on the Equation popup editor, it not free at all.
Any idea pls..
My Rails application crashes intermittently with the following message:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/utils.rb:52: [BUG] gc_sweep(): unknown data type 0x0(0xbdc2ca0)
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
I am running the app on Nginx / Passenger.
Ruby 1.8.7 Enterprise Edition 2010.10, Rails 2.3.5, Ubuntu 9.10 32bit.
Does anybody have an idea how to fix this?
say I want to make the first row of the excel ss something like this:
.Rows("1:1").Select
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
only I want each individual cells to have the outline, not the entire selection. how can i say for each cell in row 1, do the above idea
Thanks!
For example, these are valid math expressions:
a * b + c
-a * (b / 1.50)
(apple + (-0.5)) * (boy - 1)
And these are invalid math expressions:
--a *+ b @ 1.5.0 // two consecutive signs, two consecutive operators, invalid operator, invalid number
-a * b + 1) // unmatched parentheses
a) * (b + c) / (d // unmatched parentheses
I have no problem with matching float numbers, but have difficulty with parentheses matching. Any idea? If there is better solution than regular expression, I'll accept as well. But regex is preferred.
Can somebody explain me lambda expressions & what they can be used for. I have googled for it & have a rough idea. most of the examples give c# code. How about lambda expressions in plain old C...?
hi all,
i have an address for a location. when i click some button in my app. it should redirect to default google map in android and drop the pin to that particular location. how to do that? Any Idea?