How would I be able to set the position of a UIBarButtonItem? Like, I would like to set it to be on either the very right of a UIToolbar or the very left depending on a state.
Thank you.
I'm thinking of what would be the right terms to use in the UI of my new program, when referring to graphical data representations - i.e., whether to call them "charts", "plots" or "graphs". I was wondering how these terms are different, and when is it appropriate to use each of them?
Thanks,
Pradyumna
let's assume in vim I have following lines:
all what (strong) people have to do is pushing (heavy) weights
over (and over) again in order to gain muscles
and I need to convert words inside parenthesis to uppercase, what is the most convenient way to do so? How do I tell vim it needs to select everything to the first (!) closing parenthesis? So far I came up with
:%s/\s(.*)\s/\U&/g
unfortunately this will uppercase everything between 'strong' and 'heavy' which is not what I want. Any chance to tell vim it should select the chars to the next closing bracket only? (sorry for the silly example, couldn't think of something more sophisticated... or at least vim related... huh)
Hi,
Struct has default access specifier is public where as class has default access specifier is private. So why can't use struct if change default access specifier as private? why class?
Thanks,
kam
Can anyone explain:
Why the two patterns used below give different results? (answered below)
Why the 2nd example gives a group count of 1 but says the start
and end of group 1 is -1?
public void testGroups() throws Exception
{
String TEST_STRING = "After Yes is group 1 End";
{
Pattern p;
Matcher m;
String pattern="(?:Yes|No)(.*)End";
p=Pattern.compile(pattern);
m=p.matcher(TEST_STRING);
boolean f=m.find();
int count=m.groupCount();
int start=m.start(1);
int end=m.end(1);
System.out.println("Pattern=" + pattern + "\t Found=" + f + " Group count=" + count +
" Start of group 1=" + start + " End of group 1=" + end );
}
{
Pattern p;
Matcher m;
String pattern="(?:Yes)|(?:No)(.*)End";
p=Pattern.compile(pattern);
m=p.matcher(TEST_STRING);
boolean f=m.find();
int count=m.groupCount();
int start=m.start(1);
int end=m.end(1);
System.out.println("Pattern=" + pattern + "\t Found=" + f + " Group count=" + count +
" Start of group 1=" + start + " End of group 1=" + end );
}
}
Which gives the following output:
Pattern=(?:Yes|No)(.*)End Found=true Group count=1 Start of group 1=9 End of group 1=21
Pattern=(?:Yes)|(?:No)(.*)End Found=true Group count=1 Start of group 1=-1 End of group 1=-1
Possible Duplicate:
Turn off Mozilla Firefox warning that there are new Firefox add-ons
Firefox sometimes pops-up stating that there are updates for it, or an Add-on has been updated, etc.
How can make Firefox silent, so that it will only update itself/add-ons in the background, and doesn't pops-up with a message??*1
in the "about:config"
app.update.silent;false
setting this to true? what does it do?
*1 = because non-IT people will use PCs, and they don't know what to do, when a message pops up..
p.s.: Firefox 3.6/Scientific Linux
Consider the following code.
#include <stdio.h>
#include <vector>
#include <iostream>
struct XYZ { int X,Y,Z; };
std::vector<XYZ> A;
int rec(int idx)
{
int i = A.size();
A.push_back(XYZ());
if (idx >= 5)
return i;
A[i].X = rec(idx+1);
return i;
}
int main(){
A.clear();
rec(0);
puts("FINISH!");
}
I couldn't figure out the reason why the code gives a segmentation fault on Linux (IDE used: Code::Blocks) whereas on Windows (IDE used: Visual C++) it doesn't.
When I used Valgrind just to check what actually the problem was, I got this output.
I got Invalid write of size 4 at four different places. Then why didn't the code crash when I used Visual C++?
Am I missing something?
Hi,
I have one entity that contains a set of another entity.
Entity1 contains Set entityTwos
I want to create a search criteria for an "id" field inside entityTwos.
I searched, but didn't get any answers. Anybody have an idea?
Thanks,
Sri
Greetings, using VS2008 and VisualSVN and seems the VisualSVN folks are religious about updating the client (and their VisualSVN server) to the latest Subversion release.
My question is my subversion server is a hosted server and seems to always lag several versions behind the client I use. Should I be concerned about this version "mis-match"?
Is there a general rule of thumb about when it is a point to be concerned (like an entire major release behind)?
Any sort of mechanism build into either the client, the server or the protocol that prevents something horrible from happening between badly 'paired' clients and servers?
The IP addresses logged in by the Drupal 6 core "Statistics" module are not being displayed by the AW statistics displayed by my hosting server (hostgator). I am not able to comprehend why and which statistics are more reliable ? Also I would request some light to be shed on the best practices to monitor a Drupal 6 website. Thanks for your help people.
We are about to release beta version of our website. Lately we have seen that developers have not set setfocusonerror on any of the validaor controls used.We have to set this property.
Now, one solution is to open every page and put this property in place. I am looking for some othe way like some configuration in web.config or some other quick solution.
I have usercontrols and pages. Page derive from base page.Please suggest.
Hi Guys,
a bit of a vague question but I am looking for pointers as to how can I generate String diff vectors in C++. The scenario is such that given a paragraph I want to store the various differences(Edit, cut copy paste etc.) it goes through in a draft mode to review Audit history.
Any hints in this regard will be really appreciated.
What is the best way to set the RGB components of every pixel in a System.Drawing.Bitmap to a single, solid color? If possible, I'd like to avoid manually looping through each pixel to do this.
Note: I want to keep the same alpha component from the original bitmap. I only want to change the RGB values.
I looked into using a ColorMatrix or ColorMap, but I couldn't find any way to set all pixels to a specific given color with either approach.
hiiiiiiiiiiiii
i got Htc Hero. There are 2 kind of Contacts marked as Google and Phone.
Both are stored in phone memory.
If i want to access only Phone Tagged Contact info what should i do?
And if i want to convert Google Tagged Contacts to Phone Tagged Contacts what should i do?
thanks
Something is setting (the incorrect) time on our network- though I don't know what it is (since we have approx 40 servers). We run on a windows network, with AD etc. Not sure where to even begin to start looking- as far as I know, we don't run an NTP server in house.
Any advice?
Thanks
getting started with osgi, i wonder what's the conceptual diffence between bundles and components. And when to use which of them. Any pointers are welcome.
Is there any way to set one job priority higher then other,
In my case there are two jobs those are working on same set of tables,first JOB-A which is running every 12 hr and other JOB-B is every 10 minutes , i think at some time when they run simultaneously JOB-B is getting in to deadlock and get failed,
i google the topic and found sqlgoverner is helpful in such cases
does anyone know how to resolve?
I was under the impression this is valid SQLite syntax:
SELECT
*,
(SELECT amount AS target
FROM target_money
WHERE start_year <= p.bill_year
AND start_month <= p.bill_month
ORDER BY start_year ASC, start_month ASC
LIMIT 1) AS target
FROM payments AS p;
But I guess it's not, because SQLite returns this error:
no such column: p.bill_year
What's wrong with how I refer to p.bill_year?
Yes, I am positive table payments hosts a column bill_year. Am I crazy or is this just valid SQL syntax? It would work in MySQL wouldn't it?? I don't have any other SQL present so I can't test others, but I thought SQLite was quite standardlike.
Consider the following code.
#include <stdio.h>
#include <vector>
#include <iostream>
struct XYZ { int X,Y,Z; };
std::vector<XYZ> A;
int rec(int idx)
{
int i = A.size();
A.push_back(XYZ());
if (idx >= 5)
return i;
A[i].X = rec(idx+1);
return i;
}
int main(){
A.clear();
rec(0);
puts("FINISH!");
}
I couldn't figure out the reason why the code gives segmentation fault on Linux(IDE used: Code::Blocks) whereas on Windows(IDE used : MSVC++) it doesn't.
When I used valgrind just to check what actually the problem was, I got this output.
I got Invalid write of size 4 at four different places. Then why didn't the code crash when I used MSVC++?
Am I missing something?
hi all,
we have to create SharePoint extranet sites by using SharePoint foundation 2010 for clients.we have to use Claims based authentication.So which one is better FBA or SAML authentication.
please tell me which one is better what are the advantages and disadvantages are there for both.
I'm a little confused about which jQuery method and/or selectors to use when trying to select an element, and then remove certain descendant elements from the wrapped set.
For example, given the following HTML:
<div id="article">
<div id="inset">
<ul>
<li>This is bullet point #1.</li>
<li>This is bullet point #2.</li>
<li>This is bullet point #3.</li>
</ul>
</div>
<p>This is the first paragraph of the article</p>
<p>This is the second paragraph of the article</p>
<p>This is the third paragraph of the article</p>
</div>
I want to select the article:
var $article = $('#article');
but then remove <div id="inset"></div> and its descendants from the wrapped set. I tried the following:
var $article = $('#article').not('#inset');
but that didn't work, and in retrospect, I think I can see why. I also tried using remove() unsuccessfully.
What would be the correct way to do this?
Ultimately, I need to set this up in such a way that I can define a configuration array, such as:
var selectors = [
{
select: '#article',
exclude: ['#inset']
}
];
where select defines a single element that contains text content, and exclude is an optional array that defines one or more selectors to disregard text content from.
Given the final wrapped set with the excluded elements removed, I would like to be able to call jQuery's text() method to end up with the following text:
This is the first paragraph of the article.This is the second paragraph of the article.This is the third paragraph of the article.
The configuration array doesn't need to work exactly like that, but it should provide roughly equivalent configuration potential.
Thanks for any help you can provide!
I try advice like this that recommends adding the following to your .profile:
function tabname {
printf "\e]1;$1\a"
}
So you can type tabname brokenbox to name your tab. The problem is as soon as I also type ssh [email protected] and log in, it wipes the tab name. I want a tab name that's as persistent as the tab, not the level of session I happen to be in. Is this possible? I don't even know what layer that data lives in.