Hi friends,
I have a website where I am displaying few videos on a .aspx page. Now my requirement is when some one clicks on these videos I want to navigate them to some other URL. Thanks.
Hii,
I want to make my own snmp server and agent.with my own MIB and OID's.
how can i do it??and where to start??
And if i want to use windows SNMP service and extend it and insert my own OID's into its MIB
then ,is it possible??.n if yes,how can i do this??
How would you troubleshoot a page that is rendering slowly in ASP.NET?
This issue is happening on only specific pages with a few user controls. Other pages work fine. Tracing has clarified that the issue is happening between "Begin Render" and "End Render".
I have to send a name and a link from client side to the server. I thought of using AJAX called by Javascript to do this.
This is what I mean. I wished to make an ajax request to a file called abc.php with parameters :-
1. http://thumbs2.ebaystatic.com/m/m7dFgOtLUUUSpktHRspjhXw/140.jpg
2. Apple iPod touch, 3rd generation, 32GB
To begin with, I encoded the URL and tried to send it. But the server says status Forbidden
Any solution to this ?
UPDATE ::
It end up calling to
http://abc.com/addToWishlist.php?rand=506075547542422&image=http://thumbs1.ebaystatic.com/m/mO64jQrMqam2jde9aKiXC9A/140.jpg&prod=Flat%20USB%20Data%20Sync%20Charging%20Charger%20Cable%20Apple%20iPhone%204G%204S%20iPod%20Touch%20Nano
Javascript Code ::
function addToWishlist(num) {
var myurl = "addToWishlist.php";
var myurl1 = myurl;
myRand = parseInt(Math.random()*999999999999999);
var rand = "?rand="+myRand ;
var modurl = myurl1+ rand + "&image=" + encodeURI(storeArray[num][1]) + "&prod=" + encodeURI(storeArray[num][0]);
httpq2.open("GET", modurl, true);
httpq2.onreadystatechange = useHttpResponseq2;
httpq2.send(null);
}
function useHttpResponseq2() {
if (httpq2.readyState == 4) {
if(httpq2.status == 200) {
var mytext = httpq2.responseText;
document.getElementById('wish' + num).innerHTML = "Added to your wishlist.";
}
}
}
Server Code
<?php
include('/home/ankit/public_html/connect_db.php');
$image = $_GET['image'];
$prod = $_GET['prod'];
$id = $_GET['id'];
echo $prod;
echo $image;
?>
As I mentioned, its pretty basics
More Updates :
On trying to send a POST request via AJAX to the server, it says :-
Refused to set unsafe header "Content-length"
Refused to set unsafe header "Connection"
I have a bash script that gets some input as stdin. After processing, I copy a file using "-i" (interactive). However, this never gets executed since (I guess) standard input has not been flushed. To simplify with an example:
#!/bin/bash
while read line
do
echo $line
done
# the next line does not execute
read -p "y/n" x
echo "got $x"
Place this in t.sh, and execute with:
ls | ./t.sh
The read is not executed.
I need to flush stdin before the read. How could it do this?
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("image/jpeg");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "[email protected]" });
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "this is the test");
emailIntent.putExtra(Intent.EXTRA_TEXT, "testing time");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
Hi,
I have a collection of strings and declared the strings individually as arrays using
ArrayList<String> al=new ArrayList<String>();
and called the arrays in the program by using
al=getIntent().getStringArrayListExtra("titles");
Now, instead of declaring each of the arrays i have created SongsArray.java like below...
public class SongsArray {
private String title;
private String movieName;
private String singerName;
private String imagePath;
private String mediaPath;
public String gettitle()
{
return title;
}
public void settitle(String title) {
this.title = title;
}
public String getmovieName() {
return movieName;
}
public void setmovieName(String movieName) {
this.movieName = movieName;
}
public String getsingerName() {
return singerName;
}
public void setsingerName(String singerName) {
this.singerName = singerName;
}
public String getimagePath() {
return imagePath;
}
public void setimagePath(String imagePath) {
this.imagePath = imagePath;
}
public String getmediaPath() {
return mediaPath;
}
public void setmediaPath(String mediaPath) {
this.mediaPath = mediaPath;
}
}
Now i want to call the arrays that i have declared. How can i do that???
I have prepared a Silverlight application and my database is in the server. Its running smoothly for small set of data but for large data set giving an error : Remote Serve returned an error:notFound. How can i resolve it,please any one solve this problem.
I have build it in ASP.NET with C#. So kindly provide the solution in C# if possible.
Hi all,
I am facing problem while i am inserting new record from GUI part to database table. I have created database table Patient with id, name, age etc....id is identity primary key. My problem is while i am inserting duplicate name in table the control should go to else part, and display the message like...This name is already exits, pls try with another name...
but in my coding not getting..... Here is all the code...pls somebody point me out whats wrong or how do this???
GUILayer:
protected void BtnSubmit_Click(object sender, EventArgs e)
{
if (!Page.IsValid)
return;
int intResult = 0;
string name = TxtName.Text.Trim();
int age = Convert.ToInt32(TxtAge.Text);
string gender;
if (RadioButtonMale.Checked)
{
gender = RadioButtonMale.Text;
}
else
{
gender = RadioButtonFemale.Text;
}
string city = DropDownListCity.SelectedItem.Value;
string typeofdisease = "";
foreach (ListItem li in CheckBoxListDisease.Items)
{
if (li.Selected)
{
typeofdisease += li.Value;
}
}
typeofdisease = typeofdisease.TrimEnd();
PatientBAL PB = new PatientBAL();
PatientProperty obj = new PatientProperty();
obj.Name = name;
obj.Age = age;
obj.Gender = gender;
obj.City = city;
obj.TypeOFDisease = typeofdisease;
try
{
intResult = PB.ADDPatient(obj);
if (intResult > 0)
{
lblMessage.Text = "New record inserted successfully.";
TxtName.Text = string.Empty;
TxtAge.Text = string.Empty;
RadioButtonMale.Enabled = false;
RadioButtonFemale.Enabled = false;
DropDownListCity.SelectedIndex = 0;
CheckBoxListDisease.SelectedIndex = 0;
}
else
{
lblMessage.Text = "Name [<b>" + TxtName.Text + "</b>] alredy exists, try another name";
}
}
catch (Exception ex)
{
lblMessage.Text = ex.Message.ToString();
}
finally
{
obj = null;
PB = null;
}
}
BAL layer:
public class PatientBAL
{
public int ADDPatient(PatientProperty obj)
{
PatientDAL pdl = new PatientDAL();
try
{
return pdl.InsertData(obj);
}
catch
{
throw;
}
finally
{
pdl=null;
}
}
}
DAL layer:
public class PatientDAL
{
public string ConString = ConfigurationManager.ConnectionStrings["ConString"].ConnectionString;
public int InsertData(PatientProperty obj)
{
SqlConnection con = new SqlConnection(ConString);
con.Open();
SqlCommand com = new SqlCommand("LoadData",con);
com.CommandType = CommandType.StoredProcedure;
try
{
com.Parameters.AddWithValue("@Name", obj.Name);
com.Parameters.AddWithValue("@Age",obj.Age);
com.Parameters.AddWithValue("@Gender",obj.Gender);
com.Parameters.AddWithValue("@City", obj.City);
com.Parameters.AddWithValue("@TypeOfDisease", obj.TypeOFDisease);
return com.ExecuteNonQuery();
}
catch
{
throw;
}
finally
{
com.Dispose();
con.Close();
}
}
}
Property Class:
public class PatientProperty
{
private string name;
private int age;
private string gender;
private string city;
private string typedisease;
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public int Age
{
get
{
return age;
}
set
{
age = value;
}
}
public string Gender
{
get
{
return gender;
}
set
{
gender = value;
}
}
public string City
{
get
{
return city;
}
set
{
city = value;
}
}
public string TypeOFDisease
{
get
{
return typedisease;
}
set
{
typedisease = value;
}
}
}
This is my stored Procedure:
CREATE PROCEDURE LoadData
(
@Name varchar(50),
@Age int,
@Gender char(10),
@City char(10),
@TypeofDisease varchar(50)
)
as
insert into Patient(Name, Age, Gender, City, TypeOfDisease)values(@Name,@Age, @Gender, @City, @TypeofDisease)
GO
I want to design a search engine for news websites ie. download various article pages from these websites, index the pages, and answer search queries on the index.
I want a short pseudocode to find an appropriate crawling frequency -- i do not want to crawl too often because the website may not have changed, and do not want to crawl too infrequently because index would then be out of date. Assume that crawling code looks as follows
while(1) {
sleep(sleep_interval); // sleep for sleep_interval
crawl(website); // crawls the entire website
diff = diff(currently_crawled_website, previously_crawled_website); // returns a % value of difference between the latest and previous crawls of the website
sleep_interval = infer_sleep_interval(diff, sleep_interval);
}
looking for a pseudocode for the infer_sleep_interval method:
long sleep_interval infer_sleep_interval(int diff_percentage,long previous_sleep_interval) {
...
...
...
}
i want to design method which adaptively alters the sleeping interval based on the update frequency of the website.
Hi,
i have added facebook share button onmy site, by clicking on that button i want to post containt on face book.
how can i do this..?
Please replay..
I have configured a set of interface implementations with EntLib. unity block. The constructor of implementation classes work fine as soon as I run the application:
1. The interface to implement
when I run the application the cctor runs fine, which shows that unity resolution was successful:
But when I try to call a method of this class, the code just passes through without actually invoking the function of the implemented class:
Edit: Added on June 11, 2012
Following is the Unity Configuration I have. (This is all the unity configuration I am doing)
public class UnityControllerFactory : DefaultControllerFactory
{
private static readonly IUnityContainer container;
private static UnityControllerFactory factory = null;
static UnityControllerFactory()
{
container = new UnityContainer();
UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
section.Configure(container);
factory = new UnityControllerFactory();
}
public static UnityControllerFactory GetControllerFactory()
{
return factory;
}
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
return container.Resolve(controllerType) as IController;
}
}
I am unable to step into this code and the implementation simply skips out without executing anything. What is wrong here?
i am using Struts2 in application.
<s:iterator value="listObject">
<s:component template="abc.vm">
<s:param name="text" value="listValue" />
<s:param name="prefix" value="listIndex" />
</s:component>
</s:iterator>
listValue is a values of list. i am using iterator to traverse the list.
now on listValue, i want to put here internationalization concept.so that all the list value can be display based on Locale which store in a list.
please suggest!
Does someone knows how we can combine our current recording into another background playing music? I need some sample code for this. I want to create something like karaoke application in which we can record our voice over an instrumental music.
I want to convert GMT +530 to CET (Central European Time) in iPhone sdk?
does anybody have idea about this? also tell me what is the time difference between these two?
Means if time is 10 am in gmt +530 then what it will be in CET?
Hi,
I am new to iphone dev. I have a Label and a scroll view. I am trying to get data from url and bind it to label and a scroll view. I am able to bind the data to label by using...
UrlValues *asana=[[data yoga]objectAtIndex:i];
self.AsanaName.text = [asana asanatitle];
Similarly i want to bind some other data in the url to a scroll view. The data i want to bind is 4 or 5 sentences. So, can anyone help me how to do it... Any sample code will be really helpful... Thanks
This is probably a really weird question... but is there a non-git Github?
I want a place to post my projects and share my code (like Github) but I don't want to have to works with versions, commits, etc. I don't like having to create a link between my folder and my git repo and then push the changes etc. In addition, I don't want to have to have a local copy to create or add files; I can edit existing files in Github, but to create or add files, I have to do it locally and then commit and push.
I'm not sure if this is the best site to ask on, but I figured someone might have the answer.
Thanks in advance.
Hello everybody,
i am developing a GPS application in which i needs to track the speed of the device/iphone ,i am using the CLCorelocation API's Locate me referral code provided by Apple my problem is that the LocationManager does not updates the current latitude and longitudes thus i am unable to calculate the distance as well as the speed of the device/iphone.
Any kinds of suggestions/code will be highly appreciated please suggest me if i can do something with the Mapkit framework introduced in the sdk 3.0.
thanks in advance
*In eclipse plugin using actionSet
*Here blue icon for some code(using actionset) ,when i click on that it should prompt a window(some popup) which contains two or more link like
web links, when i click 1st link it should perform the 1st action and window should disappear so on...Can anyone help me in this how to do that???*
See the picture below for reference ..like this with ok button ok should perform the selected action plz help me to do this...??
I'm very much interested in building applications for Embedded Devices. I'm in my 3rd year Electrical Engineering and I'm passionate about coding, algorithms, Linux OS, etc. And also by Googling I found out that Linux OS is one of the best OSes for Embedded devices(may be/may not be). I want to work for companies which work on mobile applications. I'm a newbie/naive to this domain & my skills include C/C++ & MySQL. I need help to get started in the domain of Embedded Systems; like how/where to start off, Hardware prerequisites, necessary programming skills, also what kind of Embedded Applications etc. I've heard of ARM, firmware, PIC Micorcontrollers; but I don't know anything & just need proper introduction about them. Thanx.
P.S: I'm currently reading Bjarne Struotsup's lecture in C++ at Texas A&M University, and one chapter in it describes about Embedded Systems Programming.
The new bulkloader added into SDK 1.3.4 works great for models that
have a schema. For models inheriting db.Expando (or loosely defined
schemas) i would like to understand what i would have to do to bulk
upload them.
I defined a custom connector, that implemented the ConnectorInterface
and converted my data to the python dict required. How can i use this
dict to define entities that get uploaded to the data store ?
In the documentation there seems to be a post_import_function that can
be used to return the entities that get uploaded. Is there an example
on how this function is used ?