Hi,
In my app, I want to find/calculate the audio frequency as dynamically when i am recording an audio and no need to save, play and all. Now i am trying to do that with help of an aurioToch sample code. In that sample, inside FFTBufferManager class methods such as GrabAudioData and ComputeFFT,Here I am not able to find where they are calculating frequency value as dynamically depends on the audio sound and I spent more than 5 days.please help me.
i want to get ipaddress of mycomputer in a variable
this statement prints ipaddress of my computer
but i want to assign it in a varible
how can i fetch the value of ipaddress from inet_ntoa(inaddrr(ifr_addr.sa_data)) into an variable ip of char* type .
printf("IP Address: %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));
I want to send the id value of tag to controller when user click on any link.
TempString1.Append("<li><a id="+aa[i].int_FeatureId+" href=../" + aa[i].Feature.vcr_LinkName + ">" + aa[i].Feature.vcr_FeaturesName + "</a></li>");
I have an IF statement. If a cell = n, then do something, else output NULL
=IF(A1=5, "Success", NULL) // #NAME?
=IF(A1=5, "Success", "NULL") // NULL (as in text, not actually NULL!)
=IF(A1=5, "Success", "") // blank but not NULL
=IF(A1=5, "Success", 0) // zero value but not NULL
I have a textbox in my View. I input a number into the textbox, and then i want the controller to multiply the number and put the result into the textbox.
How can I do that?
This is what i have done already.
Let's start with the View:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Index</title>
</head>
<body>
<div>
<h2>Please enter a number</h2>
<% using (Html.BeginForm()) { %>
<%=Html.TextBox("number")%>
<input type="submit" value="Index" name ="Index" />
<% } %>
</div>
</body>
</html>
As you can see I have a simple textbox and button.
This is my controller:
using System.Web.Mvc;
namespace MvcApplication1.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/
public ActionResult Index()
{
return View();
}
[HttpPost]
public ActionResult Index(int number)
{
number = number * 2;
ViewData["id"] = number;
return View(ViewData);
}
}
}
But nothing really happens. Yeah, I see the Post is being done, and the coded steps into public ActionResult Index(int number). I see that the number is taken from the textbox, it's multiplied correctly.
I've tried using ViewData as you can see. I've also used TempData.
This is another code for the textbox in the View I've tried:
<%=Html.TextBox("number", ViewData["number"])%>
But it doesn't matter. The textbox doesn't get updated with the new value. How can I do that?
if you divide 2 / 3 should return 0,66666666666666667 instead i get in double value type 0.0 in decimal 0.
My purpose is to divide even (e.g. 2 / 3) and round to 1 always to the nearest.
Any Help?
Hi All
I have a listview with 2 columns, and when the I double click on an item, i need to display the value of its corresponding sub item in a TextBox control. How can I do this?
I searched Google, but it didn't return anything helpful, probably because I'm not exactly sure what to search for.
Thank you
I have a SQL query in my ASP.net web app that looks like this:
SELECT * FROM [Records] WHERE ([title] LIKE '%' + @title + '%')
@title, of course, is the value of a text box on the page.
My question is, why, when the text box is empty, does this return nothing? And how can I make it return everything, like logic tells me it ought to?
I have a dropdown list (FK) which I would like to set and display a default value based on a login userid. Can you please tell me how to do it? I only want to affect the dropdown filter that appear at the top above the Gridview.
Thanks
Nikos
I have a table view in that i am showing an text fields now my problem is i want to read the data from those text field i am able to get the value but i even want to know its from which text box i want the index of the text box
Hi, I have a problem here. I need to send some value to 'text1 and 'text2'. For example,
text1 =
...and this code below will refer to those values..
FILE *child = _popen("java -jar c:\\simmetrics.jar text1 text2 > c:\\test.txt", "r");
How can achieve it. I have done many ways, and it keep on giving me pointer errors.
say I have a function
function myFunction(myValue) {
// do something
}
How would I return a value from this, say a string type after the method is executed?
simple, but I cant find a quick neat example online
cheers
I need to convert a number to another value based on a range:
ie:
7 = "A"
106 = "I"
I have a range like this:
from to return-val
1 17 A
17 35 B
35 38 C
38 56 D
56 72 E
72 88 F
88 98 G
98 104 H
104 115 I
115 120 J
120 123 K
123 129 L
129 infinity M
The values are fixed and do not change.
I was thinking a lookup table would be required, but is there a way it could be done with a function on an analytics function inside of oracle?
If i have a product.
var p = new Product { Price = 30 };
and i have the following linq query.
var q = repo.Products().Where(x=>x.Price == p.Price).ToList()
In an IQueryable provider, I get a MemberExpression back for the p.Price which contains a Constant Expression, however I can't seem to get the value "30" back from it.
Cheers.
Say I have a structure like:
class SomeObject
Public Name as String
Public Created as Date
...
end class
I have a List(of SomeObject), which has multiple entries for each name with different times. I'd like to select the newest (largest Created value) object for each Name.
Given:
Name Created
A 2010-04-16 *
A 2010-04-15
B 2010-04-12
B 2010-04-13 *
C 2010-04-16 *
I'd like to pick the objects with the * beside them.
Is this possible using LINQ?
Here's my simple query. If I query a record that doesn't exist then I will get nothing returned. I'd prefer that false (0) is returned in that scenario. Looking for the simplist method to account for no records.
SELECT CASE
WHEN S.Id IS NOT NULL AND S.Status = 1 AND (S.WebUserId = @WebUserId OR S.AllowUploads = 1) THEN 1
ELSE 0
END AS [Value]
FROM Sites S
WHERE S.Id = @SiteId
Hi All,
How I can assign a sequence value to a field "UID" which is NUll in existing sqlite table, for example
table: FOO
name UID
A 1
B 2
C 100
D NULL
E NULL
F NULL
what I want is
table: FOO
name UID
A 1
B 2
C 100
D 101
E 102
F 103
Can some body help?
I want to seek an alternative for using autoincrement on my own reason...
thanks!
I currently have a database with over 6 million rows and growing. I currently do SELECT COUNT(id) FROM table; in order to display the number to my users, but the database is getting large and I have no need to store all of those rows except to be able to show the number. Is there a way to select the auto_increment value to display so that I can clear out most of the rows in the database? Using LAST_INSERT_ID() doesn't seem to work.
I have a table called Ads and another Table called AdDetails to store the details of each Ad in a Property / Value style, Here is a simplified example with dummy code:
[AdDetailID], [AdID], [PropertyName], [PropertyValue]
2 28 Color Red
3 28 Speed 100
4 27 Color Red
5 28 Fuel Petrol
6 27 Speed 70
How to select Ads that matches many combinations of PropertyName and PropertyValue, for example :
where PropertyName='Color' and PropertyValue='Red'
And
where PropertyName='Speed' and CAST(PropertyValue AS INT) > 60
I have a .SWF email submit form. The background color is set via:
`<param name="bgcolor" value="#000000" />`
and in the embed:
`<embed src="FILE.swf" flashvars="STUFF" quality="high" **bgcolor="#000000"** width="260" height="32" name="WidgetMailBlack" align="middle" swLiveConnect="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />`
Is it possible either on mouse over of the Object or a containing div to change those values? i.e. to #ffffff
many thanks!
How would I know what the maximum length of an element's attribute value is?
e.g.
<div id="value1..."></div>
What's the maximum allowable length for ID attribute of this div and any other attributes of any elements?
When a user logs in to my site, I create a cookie with some info in it. However, whenever they change page from logging in, the cookie loses it's value. Cookie is still there but it's empty.
I've checked my code and the cookie doesn't get rewritten by anything I've done.
Does anyone have any idea to why the cookie becomes empty when the page is changed?
hi, i am doing c program of binary tree while inserting the node to tree after 2 or 3 nodes the child node having garbage value and crashing i am doing in xcode any idea...
There is a byte at a specific index in a byte string which represents eight flags; one flag per bit in the byte. If a flag is set, its corresponding bit is 1, otherwise its 0. For example, if I've got
b'\x21'
the flags would be
0001 0101 # Three flags are set at indexes 3, 5 and 7
# and the others are not set
What would be the best way to get each bit value in that byte, so I know whether a particular flag is set or not? (Preferably using bitwise operations)