hi,
anyone know how to create a suggestion box in ruby on rails? all the materials i found so far are about observe some text field and update some list in other , not related to suggestion box...
Thanks!
I'm using Stripes and I am validating the values of a drop down box to ensure the user selects an option.
On initial load all data is present, but once the validation kicks in the form loses the data that was set up in the action bean on load. This includes the original list I am validating against.
I'm simply using in the jsp, and annotating the field in the action bean as @Validate(required=true).
Am I missing something simple?
Cheers
I am using this plugin: http://wiki.github.com/augustl/live-validations/ to check if the form field entered is valid or not. How do i disable the live validation for keypress and instead make it only fire when the submit button is clicked?
I have text box ...If i type in textbox like
"C,C++,ASP.net,4-5Years" then every word should be checked by database whether that name exits or not in table field of the database..It should be check separately of every word ..It just like Search engin...How can i do in asp.net
Hello everyone.
I have a problem in my asp.net 3.5 application (C#) when I try to render in my pages characters like 'è' which are shown in a very strange manner (if i'm lucky i get a ? mark in my web page). in fact Expression Web, when i open my web site, substitutes the è char with �...
How can I tell asp.net that I want to use a particular charset so that i can write in the html source letters like è without using hexadecimal codes??????
I tried in the web.config this:
inside the system.web namespace of the file but nothing works....
Can anyone tell me how to do? THANKS in advance
Hi, I search the forum and see this codes:
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
System.out.println(" and it's a double click!");
wasDoubleClick = true;
} else {
Integer timerinterval = (Integer) Toolkit.getDefaultToolkit().getDesktopProperty(
"awt.multiClickInterval");
timer = new Timer(timerinterval.intValue(), new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (wasDoubleClick) {
wasDoubleClick = false; // reset flag
} else {
System.out.println(" and it's a simple click!");
}
}
});
timer.setRepeats(false);
timer.start();
}
}
but the code runs incorrectly(Sometime it prints out " and it's a single click!" 2 times . It should print out " and it's a double click!"). Can anybody show me why? or can you give me some better ways to do this?
Thank you!
I'm trying to debug a gallery section within a site of mine. Currently the section display a number of thumbnails which visitor select one to view.
Once selected, the main flash loads in an external swf. To make the process smoother, I have a preloader for this process using normal getbytes codes. However for some reasons, the flash works fine in IE but not in Firefox or Chrome.
In these browsers, as soon as you click the thumbnail, the preloader animated away to reveal the holder of the external swf. However as it is still loading, the holder is a blank area.
Would appreciate if anyone can shed some light on why this is so.
Hi,
I am developing an application using PHP but I am new to regular expressions, I could not find a solution to my problem. I want to replace all occurences of #word with a link, i have written a preg_match for this:
$text=preg_replace('~#([\p{L}|\p{N}]+)~u', '<a href="/?aranan=$1">#$1</a>', $text);
The problem is, this regular expression also matches the html character codes like
'
and gives corrupt output. I need to exclude the words starting with &# but i do not know how to do that using regular expressions.
Thanks for your help.
I want to create a token generator that generates tokens that cannot be guessed by the user and that are still unique (to be used for password resets and confirmation codes).
I often see this code; does it make sense?
md5(uniqid(rand(), true));
According to a comment uniqid($prefix, $moreEntopy = true) yields
first 8 hex chars = Unixtime, last 5 hex chars = microseconds.
I don't know how the $prefix-parameter is handled..
So if you don't set the $moreEntopy flag to true, it gives a predictable outcome.
QUESTION: But if we use uniqid with $moreEntopy, what does hashing it with md5 buy us? Is it better than:
md5(mt_rand())
HI,
i am having a Input hidden element like
in my JQuery i am setting the value for the above input type after some ajax call
like
EDIT:::
$.ajax({
type: "POST",
url: "http://localhost/FormBuilder/index.php/forms/saveForm/",
async: false,
data: "formname="+formname+"&status="+status,
success: function(msg){$("#FormID").val(msg); }//success
});//ajax
Now somewhere in the code after this i want to fetch the value of this FIeld.How to get this value on live of value for this input type..
EDIT:::
i am retriving like by var FORMID=$("#FormID").val();//but shows null
How to get the value of it on live of this Input element
I am dynamically creating a report, where I create a worksheet, bring in the records afresh. How can I easily type the field names and copy them to the cells. Without doing one cell per line, there are ~20 columns.
I tried:
dim fieldNames as variant
fieldNames = ("'DS Date', 'A', 'B', 'A','S ASD', 'S','D S','D S', 'S','D S', 'SD', 'S','D'")
Sheets("DATA").Range("C14:W14").Value = Application.WorksheetFunction.Transpose(fieldNames)
But it just posts the whole thing in each cell? Any ideas?
Fault address occurred when i malloc pthread_t to save a newly created thread id and free it in another thread. Codes as follows:
typedef struct _TaskInfo {
// int dummy_int;
pthread_t tid;
} TaskInfo;
void* dummy_task(void* pArg) {
free(pArg);
return NULL;
}
void create_task() {
TaskInfo *pInfo;
pthread_attr_t attr;
// set detached state stuff ...
pInfo = (TaskInfo*) malloc(sizeof(TaskInfo));
pthread_create(&pInfo->tid, &attr, dummy_task, pInfo);
// destroy pthread attribute stuff ...
}
int main() {
int i;
while(i < 10000) {
create_task();
++i;
}
return 0;
}
When I uncomment the member dummy_int of TaskInfo it sometimes ran successfully, but sometimes failed.
My platform is VMWare + Ubuntu 9.10 + ndk r3
Thanks!
I know C++ moderately and have written a few medium sized applications with it. To which field (ex. embedded software, gaming etc.) can i move into? what are the prospects?
I'm trying to modify the data returned from an AJAX call before jqGrid 3.7.2 renders it. I've tried hooking into the loadComplete event but when I modify the data it appears to be after it has already rendered.
I've also tried hooking into the success event on the ajaxGridOptions field of options but that seems to totally override the event and jqGrid doesn't render the data.
How can I modify the data returned from a web service call before jqGrid renders it?
Hello,
I followed this tutorial:
http://www.magento.cc/custom-accountregistration-fields.html
to add fields in the registration form of a customer under Magento, I succeed to run the example with a checkbox in the frontend and the backend.
I had at the backend a text field with 0 or 1 as value, but I would like to have also a checkbox as in the frontend.
Anyone know what changes to do for this?
Thank you.
I am using OpenCV sample code “peopledetect.cpp” to detect and track pedestrians. The code uses HoG for feature extraction and SVM for classification. Please find the reference paper used here.
The camera is mounted on the wall at a height of 10 feet and 45 degree down. There is no restriction on the pedestrian movement within the frame.
I want to track the detected pedestrians’ movement within the frame. The issue I am facing is pedestrians are detected only in the middle region of the frame as most of the features are not visible as soon as the pedestrian enters the frame region.
I want to track each person’s movement in the entire frame region. How to do it? Is tracking required?
Can anyone give any reference to blogs/codes?
Hello everybody.
My current career is in software testing, but I feel that I am wasting my time, maybe because I don't know the future path of this career, and where I will arrive in the future if I continue in this career. And I don't know how can I develop myself in this career. Can I have my own job in this field? Please give me good suggestions and opinion.
Many thanks.
my application is able to upload a document with meta-info. i am using web-services for that. Now i am interested to upload a document with its modifed the created date. I tried to set "
ows_Modified" field value but it wont work.
How to upload file with its original modified and creation dates???
Thanks
There's a field with type of varchar. It actually stores a float point string.
Like 2.0 , 12.0 , 34.5 , 67.50 ...
What I need is a update statement that remove the ending zeros of fields like 2.0 , 12.0 , change them to their integer representation , that is 2 , 12 ...,and leave 3.45 , 67.50 unchanged . How should I do this ? I am using oracle 10.
Hello,
My code contain
SELECT * FROM newchap WHERE company LIKE '%$company%' OR Category LIKE '%$cat%'
It works perfectly however, when the field $company contain empty, it return all result in MYSQL.
How to prevent it?
I created an UITextField in my App. This text field display a long text.
The problem is that when I first open the view containing the UITextField, it is automaticaly show the end of my text. But I want it to show the begining.
I read the UITextFiled Class Reference on Apple dev center, but nothing seem to allow me to change it.
How can I do?
I'd like to have a way to get the sum of a field stored into a variable from inside a dataflow task. The rowcount transform does this, but I can't see how to use any other aggregate functions. Is scripting a transform component my best bet?
For the functions here:
#include <libkern/OSAtomic.h>
there are OSAtomic and OSAtomicBarrier versions.
However, the documentation does not show sample code for:
When is it safe to use just OSAtomic, without the OSAtomicBarrier version
When is it that OSAtomic would be unsafe, but OSAtomiBarrier would be safe.
Can anyone provide explainations + sample codes?
[Random ramblings of "your opinion" without actual code is useless. Readers: please down vote such answers; and vigrously upvote answers with actual code.]
[C/C++ code preferred; Assembly okay too.]
Hi all,
Has anyone seen this odd text rendering issue in VS2005 before?
The first line of using statements actually says "using System;". If I copy the line as it is displayed and paste into notepad, the text appears correctly, so clearly the character codes are correct. In addition, the solution compiles and runs correctly.
I was thinking it might be due to ClearCase using a different character encoding as all the solutions we're using were freshly checked-out yesterday on to a new build machine, but this is only happening in 2 of our ~30 solutions.
Incidentally the same .cs files when opened in VS2008 render correctly on this machine, could this be a corruption in VS2005?
i have an database with the values of latitude and longitude. i would need to search those values depends on the user input. does the quick search box can search only the database value with the type-to-search feature. Else i want to put a separate EditText and then do the the search process.. if QSB is possible then how to do that? i want to search and drop a pin on the map.. please make a note of it. Any Idea, tutorial and sample codes are most thankful?