I can imagine one case, in which the input parameter could be NULL so that pass-by-pointer is preferred but not pass-by-reference?
Can anybody add more cases?
I am converting from YUI to jQuery and can't see a way to load the results of the autocomplete into a div or other such container.
I want to be able to populate a div with formatted results, including an image based on the return, not just a simple drop down from the input.
I was trying to use TextInfo.ToTitleCase to convert some names to proper case. it works fine for strings in lowercase and mixed case but for strings with all characters in Upper case, it returns the input string as is.
Nothing about this behavior is mentioned in MSDN documentation, any insights?
Here's the code:
this.Form.find("input[type=checkbox]").click(function(event) {
if ($(this).is(":checked")) {
console.log("checked");
}
else {
console.log("unchecked");
}
});
If the checkbox is not checked, and I click with the mouse, I get "checked". If I trigger it programmatically like $("#someCheckbox").click(), I get "unchecked". How to make the two behave the same way?
I need to get a list of tags in a text, make their contents bold, and remove them. Can't figure out how to make it.
E.g. with the following input:
foo [b]bar[/b]
The result should be:
foo bar
I use the following code to extract the tags:
Dim matches = Regex.Matches(OriginalRich.Text, String.Format("(\[{0}\])(.*?)(\[/{0}\])", tag), RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Any help would be appreciated.
I would like to write a small module that can check if anything is connected to my computer's HDMI input, and if so write a frame of video to bitmap once in a while.
Can anyone point me to resources regarding grabbing audio/video from HDMI on windows?
Anyone know if ffmpeg does asynchronous file io? That is, the input file is read in a separate thread as to avoid io blocking the processing thread?
Basically what I want to figure out is whether or not i need to do calls to "av_read_frame" inside a separate thread (to avoid blocking) or if ffmpeg alrdy handles this issue?
How might I figure this out? I've tried downloading the ffmpeg source but haven't been able to find anything useful.
I'm trying to change the src of an image form submit button using an onclick, but it doesn't seem to be working correctly. Am I missing something?
<input class="submit_image" id="my_form_button" onclick="$('my_form_button').src='/images/buttons/submitting.gif'" src="/images/buttons/submit.gif" type="image" />
I've also tried using the same JS on the form tag using onsubmit with no luck.
I use this code for drawing text in a panel:
Graphics g = panel1.CreateGraphics();
g.DrawString(...);
So I want to know how many pixels the input text will take in the panel?
I am completely new to this game, so please be gentle ;-)
I made an example program in Fortran 90, lets call it 'program.f90'.
I compile it:
g95 program.f90
It creates an executable called a.out
How do I run this? It is supposed to print something to the screen, and get input from me, but I cannot figure out how to!
I cant for the life of me get the contents of a string array (well its not strictly typed but all the items in the array are strings) to become a table, i am trying to use ConvertTo-HTML.
For example:
$arr = @("One", "Two")
$arr | ConvertTo-HTML
I have tried -As List, using fragments, even using InputObject, is it even possible ?
Edit: i simply want to know if there is anyway to use an array as the input for the ConvertTo-HTML cmdlet, all it does is make a table with the length property of the strings.
I have simple form for editting site content:
- a text input for title
- a textarea for content
When adding content, there is no problem, allthings add normally:
$chead = mysql_real_escape_string(stripslashes($_POST['chead']));
$ctext = mysql_real_escape_string(stripslashes($_POST['ctext']));
But when edittig the article that containig the
$chead = 'sdsfsf' "sdgsdgs"ggdsfsdg
The $chead = 'sdsfsf'
and the "sdgsdgs"ggdsfsdg will be lost!!!
What is the problem with mysql_real_escpae_string?
Thanks
Input integer array:
a[8] = { a1, a2, a3, a4, b1, b2, b3, b4 }
Output array:
a[8] = { a1, b1, a2, b2, a3, b3, a4, b4 }
Forget all corner cases, make sure your solution works for any int array of size 2n. You can use one or two temp variables for looping or anything, but you shouldn't use any temp arrays/stacks/queues etc to store entire array or part of array.
I'm able to get answer in O(n*log n), but I'm looking for better solution.
I hope this isn't too difficult, obviously you can call HTML tags such as fieldset, label and legends and also textboxes. However how does one call an asp:textbox, i have tried just textbox, asp:textbox, input.textbox but nothing seems to work. This is something that should be really straight forward to do and I can't waste any more time figuring it out.
Thanks.
I'm using twitter bootstrap in my application. i gave e.preventDefault for link button in $(document).reday(), but it is not working.
Here is my code:
Master page:
<a id="lnkLogout" href="javascript:void(0);" onclick="PageLogout();"><i class="icon-off">
</i>Logout</a>
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#lnkLogout').click(function (e) { e.preventDefault(); });
});
function PageLogout() {
//Code for logout from the application....
}
</script>
SampleDefaultPage.aspx :
<div class="row-fluid">
<div class="form-horizontal">
<h4 class="header blue bolder smaller">
Contact</h4>
<div class="control-group">
<label for="form-field-email" class="control-label">
Email</label>
<div class="controls">
<input type="text" style="width:200px;" data-val="true" data-val-required="Mobile Number is required." id="txtEmail">
<div class="space-3">
</div>
<span data-valmsg-replace="true" data-valmsg-for="txtEmail" class="field-validation-valid text-warning red"></span>
</div>
</div>
<div class="control-group">
<label for="form-field-website" class="control-label">
Phone Number</label>
<div class="controls">
<input type="text" style="width:200px;" id="txtPhno">
</div>
</div>
</div>
I have given txtEmail as mandatory field. if i left that field blank and click on Logout button in Master page, it says txtEmail is required. i dint do any validation in Logout onclick event. I have given preventDefault for Logout link. But still facing an issue. I should be able to logout even though txtEmail is left blank.
Thank you all in advance for your response.
I am setting up a dns lookup form using dns_get_record. I set it up to check the A Record and MX Records of the domain that is input. However, I would like it to also display the IP address of the displayed MX Records. Is this possible?
In many prototype scripting cases, it's easier to just stick every form item (such as an input or textarea) in its own form tag. Is there anything wrong that could happen from having lots (like 1000) form tags in a page?
if not (i_ReLaunch = 1 and (dt_enddate is not null))
How this epression will be evaluated in Oracle 10g
when the input value of the i_ReLaunch = null and the value of the dt_enddate is not null
it is entering the loop.
according to the rules in normal c# and all it should not enter the loop as
it will be as follows with the values.
If( not(false and (true))
= if not( false)
=if( true) which implies it should enters the loop
But it is not happening
Can someone let me know if i am wrong at any place
I am using estimateRigidTransform with about two vectors of 100 points and is working FINE.
But somehow getAffineTransform doesn't work.
I know that findHomography finds the best matrix using RANSAC and getPerspectiveTransform needs only 4 points.
My question is what happens if I give more inputs in estimateRigidTransform or getAffineTransform?
Does it take only 4 points from input matrix? Or do some kind of RANSAC?
Hi everyone!
Out of curiosity about reverse engineering, I am thinking of writing a simple program (in C++) that takes an executable as input and produces the names of all the functions that were a part of source program of that executable.
Any pointers on how should I go about it?
Step-by-step approach would be much appreciated!
I have a problem with "pairing" arrays into one (by index). Here is an example:
INPUT:
inputArray = [ [0, 1, 2, 3, 4], [2, 3, 5, 7, 8], [9, 6, 1] ]
OUTPUT:
outputArray = [
[0,2,9],
[1,3,6],
[2,5,1],
[3,7,chooseRandom()],
[4,8,chooseRandom()]]
Questions:
1) How to avoid out of range problem
2) How to write chooseRandom() to choose N neighbour
I'm using python but feel free to share your thoughts in any language.
i have this encryption algorithm written in C++ , but the values that has to be encrypted are being taken input and stored in a file by a python program . Thus how can i call this c++ program from python?
i need to design a report that will print text on specified x,y coordinates
for example, i will input (50,50), (60,60), (70,70) and i will have my program print text at those specific coordinates on the report. in total there will be about 50 different coordinates.
how do i achieve this? should i be using a label control or a textbox? should i be creating the controls dynamically or should i already have controls set at the specified regions?
I have an error message like this:
<span class="errorMessage">Your input sucks!</span>
and I need to determine when it changes. the validation framework I'm using sets the text when there's an error and removes it when it's complete. I'm hoping to tap into that by watching for changes to the text property of the element using jquery. Any idea of how to go about doing this?
Thanks!