When a UITextField with custom frame (200 × 54 px) loses focus, the text looks a little bit blurry.
example screenshot
Is this a common problem? Any workaround / solution or am I doing something wrong?
Im pretty sure this has a simplesolution. I am using jCarousellite, and i want to change the behaviour of built in nav buttons to fire on hover over.
$("#carousel").jCarouselLite({
vertical: true,
btnNext: ".btn-down",
btnPrev: ".btn-up",
visible:6,
circular: false
});
$("#carousel .btn-down").hover(function() {
$("#carousel .btn-down").click();
});
but it only fires once when mouseover, i need it to fire continueously while mouseover.
I have a 'validate_on_create' statement in one of my controllers that I would like all of my seed data to skip. What are some solutions so that the create statement in my seeds file skips this validation. My current solution is commenting out the validation each time I run rake db:seed. Anything a little more clever?
Hi all,
I want to get tokens appearance in UITextField as we have in NSTokenField ie.
as soon as user enters some name in
UITextField it gets enclosed within a
token.
We have this control in to-cc fields in mail in iPhone / iPod and I want to get similar feature in my application.
Can anyone suggest me some solution for it??
Thanks,
Miraaj
The following source file will not compile with the MSVC compiler (v15.00.30729.01):
/* stest.c */
#ifdef __cplusplus
extern "C" {
#endif
struct Test;
extern struct Test make_Test(int x);
struct Test { int x; };
extern struct Test make_Test(int x)
{
struct Test r;
r.x = x;
return r;
}
#ifdef __cplusplus
}
#endif
Compiling with cl /c /Tpstest.c produces the following error:
stest.c(8) : error C2526: 'make_Test' : C linkage function cannot return C++ class 'Test'
stest.c(6) : see declaration of 'Test'
Compiling without /Tp (which tells cl to treat the file as C++) works fine. The file also compiles fine in DigitalMars C and GCC (from mingw) in both C and C++ modes. I also used -ansi -pedantic -Wall with GCC and it had no complaints.
For reasons I will go into below, we need to compile this file as C++ for MSVC (not for the others), but with functions being compiled as C. In essence, we want a normal C compiler... except for about six lines. Is there a switch or attribute or something I can add that will allow this to work?
The code in question (though not the above; that's just a reduced example) is being produced by a code generator.
As part of this, we need to be able to generate floating point nans and infinities as constants (long story), meaning we have to compile with MSVC in C++ mode in order to actually do this. We only found one solution that works, and it only works in C++ mode.
We're wrapping the code in extern "C" {...} because we want to control the mangling and calling convention so that we can interface with existing C code. ... also because I trust C++ compilers about as far as I could throw a smallish department store. I also tried wrapping just the reinterpret_cast line in extern "C++" {...}, but of course that doesn't work. Pity.
There is a potential solution I found which requires reordering the declarations such that the full struct definition comes before the function foward decl., but this is very inconvenient due to the way the codegen is performed, so I'd really like to avoid having to go down that road if I can.
My question may be a noob one but:
I want to execute a php script when a user timeout. The only way I found to do so is to make the server execute a script every second or minute for instance, get the last activity of every user and execute a script when the last activity is older than (now() - timeout).
is this the appropriate solution? Is this will slow the website significantly?
Many thanks in advance!
Hi folks. I was kindly helped by fudgey earlier. Unfortunately the solution doesn't work in IE. Here is the original post:
http://stackoverflow.com/questions/2768141/expand-div-with-focus-jquery
and here is his demo (also doesn't work in IE):
http://pastebin.me/6561cd9a033a5f16940ae12f813e938c
Any idea on how to make this work there?
Thanks!
I have a project which can be compiled with Visual Studio, GCC and with some embedded compilers. Sources are shared, but each platform requires separate makefiles, project files, solutions etc. There are two ways I can organize them:
Intermixed in a single hierarchy of folders
With separate folders for platform-dependent files
The first solution creates some confusion about which file belongs to which platform, but the second causes some repetition of the folders structure (some compilers require each project to have a separate folder).
Which do you think is better?
We use iframes to show ads on our site.
Iframes are used to allow us to keep the ad generation code and other site modules separate.
As we track ad views on our site, and need to be able to keep an accurate count of which pagetype gets what views, I must ensure that users can't simply copy-paste the iframe in which the ad is loaded onto another site. This would cause ad count to become inflated for this page, and the count would not match the view count of the page the iframe "should" be displayed in.
Before anyone says so: no I can't simply compare the page view count with the ad view count, or use the page view count * number of ads per page, as # of ads per page will not necessarily be static.
I need to come up with a solution that will allow ads to be shown only for iframes that are generated dynamically and are shown on our pages.
I am not familiar with PHP sessions, but from what little reading I have had time to do, the following seems to be to be an acceptable solution:
Add "s = session_id()" to the src of the ad's iframe.
In the code that receives and processes ad requests, only return (and count) and ad if s == session_id().
Please correct me if I'm wrong, but this would ensure:
Ads would only be returned to iframes whose src was generated alongside the rest of the page's content, as is the case during normal use.
We can return our logo to ad calls with an invalid session_id.
So a simple example would be:
One of our pages:
<?php session_start(); ?>
<div id="someElement">
<!-- EVERYONE LOVES ADS -->
<iframe src="http//awesomesite.com/ad/can_has_ad.php?s=<?php echo session_id(); ?>></iframe>
</div>
ad/can_has_ad.php:
<?php session_start(); ?>
if($_GET['s'] == session_id()){
echo 'can has ad';
}
else{
echo '<img src="http://awesomesite.com/images/canhaslogo.jpg"/>';
}
And finally, copied code with static 's' parameter:
<!-- HAHA LULZ I WILL SCREW WITH YOUR AD VIEW COUNTS LULZ HAHA -->
<iframe src="http//awesomesite.com/ad/can_has_ad.php?s=77f2b5fcdab52f52607888746969b0ad></iframe>
Which would give them an iframe showing our awesome site's logo, and not screw with our view counts.
I made some basic test cases: two files, one that generates the iframe and echos it, and one that the iframe's src is pointed to, that checks the 's' parameter and shows an appropriate message depending on the result. I copied the iframe into a file and hosted it on a different server, and the correct message was displayed (cannot has ad).
So, my question is:
Would this work or am I being a PHP session noob, with the above test being a total fluke?
Thanks for your time!
Edit:
I'm trying to solve this without touching the SQL server
I have a very complex graph, and there is no way that I can show it all and understand it. I need to make simplified versions of it showing only some nodes and not others. I don't just want the other nodes to be invisible, but to really be absent (so that the graph is simplified).
The solution would be to make a graph with only some layers. But is that possible? What other options are there?
Thanks,
Pietro
Hi
I've got a Flex 3 project. I'm having a problem with XML in Internet Explorer only. Pls see the problem lines below:
_clickURL = [email protected]();
_mediaSource = [email protected]();
These variables are coming up "" in IE. But, they grab the data in Safari and Firefox.
Any suggestions as to what the problem might be? Possible solution?
Thank you.
-Laxmidi
I am working in Haskell and frequently come across code similar to the following:
func i j | i == j = i
| otherwise = j
I want to align on the '=' character using align-regexp but don't have the elisp knowhow. I have tried just doing " = " without the quotes, but this inserts an unwanted space character before each '='. I have found a proposed solution here but I can't seem to get that to do anything at all.
Please help me write a function or hard-coded macro that will allow me to set a keybinding for this.
Hi,
I have to customise the multiple upload functionalityof sharepoint:
Requirement:
On multiple upload I want the system to trigger a single email (containing names of all the files uploaded)at the end of all uploads. The emails ids,subject and body of the mail muct be editable to the user(must appear as a UI)
Can someone please suggest a solution for the same.
Thanks!
Payal Smriti
Hello Everyone,
I have UI which provide the facility to create own format by using drag and drop utility. I have also xml file which contains the data. Now task is how to automatically generate the .xsl file of the dynamically designed format for the data stored in xml form.
If you have any idea about the solution of the above problem.
I will thankful for any help regarding this…
Thanks
B. Kumar
I was going to use the scuttle solution on: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html for handling searches on my website. I was wondering how I could take the search input from a user and turn it into a single query.
For instance, let's say a user inputted 'blue dogs' in their search query... How could I dynamically update the query to include ('blue', 'dogs') in union and intersection queries?
Trying to create a profile using content provider.I want to add the gender to the table when the radio button corresponding to the male or female is clicked. Any solution?
My Code:
$('#myTextArea').one('focus', function() {
$('#myTextArea')[0].selectionStart = 2;
$('#myTextArea')[0].selectionEnd = 6;
$('#myTextArea')[0].focus();
});
The code works fine, on focus (only once), it selects from index 2 to 6.
The problem: since this function is called on focus, it does the custom focus, but then it calls focus AGAIN and I lose focus of the selected text. Any possible solution?
I have legacy system where all date fields are maintained in YMD format. Example:
20101123
this is date: 11/23/2010
I'm looking for most optimal way to convert from number to date field.
Here is what I came up with:
declare @ymd int
set @ymd = 20101122
select @ymd, convert(datetime, cast(@ymd as varchar(100)), 112)
This is pretty good solution but I'm wandering if someone has better way doing it
I've been given the task of working with SAML to implement an SSO solution between my company and a third party provider. My only issue is that I can't seem to find how to implement SAML in C# 2.0. I've been able to find a few examples for .Net 3.0 and 3.5, but none for 2.9 (and the classes they use don't appear to be available in 2.0). Does anyone know of any oline examples using SAML and C# 2.0?
Is there any solution to make snippets, templates and maybe resources of MODx site available to edit with external editor? Besides this hack which make site less "native".
Thanks!
I have a form and I've passed its handle to the OpenGL class to draw. I want to get keyboard commands from the user but it seems the procedures for getting the keys doesn't run (I've tested it). Although, I am using OnMouseDown with no problem at all.
Is there anything I am missing here? Anyone has a solution?
I have an array that I am constructing in PHP which I am serializing then returning to Flex through AMFPHP. Can someone point me towards a solution for unserilizing said data once it gets into Flex via ActionScript 3?
I am trying to figure this out. Basically, I'd like to reconcile my local emails with a users list of friends.
I can see after OAuth token is established that I can get a list of users friends via http://graph.facebook.com/me/friends
Would the solution be to keep track of a list of users friends over time and then reconcile with our local ids (in other words, i can know my id) and then use the friends API call to see if your friends are the same in local db?
hi friends....
I have got one problem with the UITableViewController... The viewWillAppear method is not getting invoked when i try to push the The table view controller in to a navigationcontroller...
can anyone provide a solution for this ....
Does anyone know of an app that implemented an in-app subscription?
I thought about how the subscription model can be implemented and always ends up with more problems to every possible solution I can think of, so I'm wondering if anyone knows of an app that actually does that.
Thanks