Hi,
I have developed an iPhone app on iphone 3G. How can I test it on iphone 3GS, iPad etc? Is there a service online that lets me access 3GS or iPad remotely?
Thanks.
John
I have a ASP.NET web service decorated with System.Web.Script.Services.ScriptService() so it can return json formatted data. This much is working for me, but ASP.Net has a requirement that parameters to the web service must be in json in order to get json out.
I'm using jquery to run my ajax calls and there doesn't seem to be an easy way to create a nice javascript object from the form elements. I have looked at serialiseArray in the json2 library but it doesn't encode the field names as property name in the object.
If you have 2 form elements like this
<input type="text" name="namefirst" id="namefirst" value="John"/>
<input type="text" name="namelast" id="namelast" value="Doe"/>
calling $("form").serialize() will get you the standard query string
namefirst=John&namelast=Doe
calling JSON.stringify($("form").serializeArray()) will get you the (bulky) json representation
[{"name":"namefirst","value":"John"},{"name":"namelast","value":"Doe"}]
This will work when passing to the web service but its ugly as you have to have code like this to read it in:
Public Class NameValuePair
Public name As String
Public value As String
End Class
<WebMethod()> _
Public Function GetQuote(ByVal nvp As NameValuePair()) As String
End Function
You would also have to wrap that json text inside another object nameed nvp to make the web service happy. Then its more work as all you have is an array of NameValuePair when you want an associative array.
I might be kidding myself but i imagined something more elegant when i started this project - more like this
Public Class Person
Public namefirst As String
Public namelast As String
End Class
which would require the json to look something like this:
{"namefirst":"John","namelast":"Doe"}
Is there an easy way to do this? Obviously it is simple for a form with two parameters but when you have a very large form concatenating strings gets ugly. Having nested objects would also complicate things
The cludge I have settled on for the moment is to use the standard name value pair format stuffed inside a json object. This is compact and fast
{"q":"namefirst=John&namelast=Doe"}
then have a web method like this on the server that parses the query string into an associate array.
<WebMethod()> _
Public Function AjaxForm(ByVal q As String) as string
Dim params As NameValueCollection = HttpUtility.ParseQueryString(q)
'do stuff
return "Hello"
End Sub
As far a cludges go this one seems reasonably elegant in terms of amount of code, but my question is: is there a better way? Is there a generally accepted way of passing form data to asp.net web/script services?
I'm trying to write the next function:
1) Send SMS to a service number
2) Read the response SMS content (the service's auto sent-back message that tells me if I succeed/failed to turn on the service)
3) Delete the service's auto-sent SMS
I know how to do the first step, and I should be able to do the second with both:
getMessageBody ()
getOriginatingAddress ()
but:
1) how can I refer the last incoming message to use the above functions?
2) how can I delete that specific message?
Thanks,
John
I have this Factory:
Factory.define :email_address do |e|
e.sequence(:address) { |n| "factory_#{n}@example.com" }
e.validated true
end
When I run my specs with rake spec, it works fine.
When I run autospec, it fails right away, claiming that the email address is being used twice in two different objects (there is a validation which restricts this).
Why is it behaving differently under autospec?
Thanks,
John
I have a situation where after performing a migration-upgrade of our TFS2008 server to a new domain, I have a bunch of straggling users from the old domain that never created anything inside the 2008 server, nor need access anymore.
Does anyone know how do fully delete these old domain users from TFS2010 post-migration?
Thanks,
John
I have a free app published in Android market. I have lost the certificate used to sign the current version but I want to publish an updated version. Android market refuses to accept my upgrade because it is signed by a new certificate. I realize the users will have to uninstall the current version to get the upgrade but it's not clear how to get the updated version into the market so that the current users will find it.
What are my options?
Thanks,
John
I am trying to write an application (console based),in which one thread reads information from console and another thread prints the same information back to console.
I am stuck in implementing the synchronization logic .
Can anyone refer me some samples.
john
Hello,
I made a comment on a Wordpress blog and I noticed that after I submitted the comment, the top of the browser was flush with the top of my comment. In other words, the web page was auto-scrolled down to the top of my comment.
How can I do this? I am using a comment system with PHP / MySQL.
Thanks in advance,
John
Hello, I've recently started learning PHP, but I have a wide knowledge on C++. I've been wondering how to make a web bot and now, I would greatly like to make one. I won't be using this robot for spamming or anything, just as a test of what PHP/C++ can do online. I was wondering how I could go about doing this and if you have any articles/tutorials that would be helpful.
Thanks,
John
Hello,
I am using a PHP/MySQL login script that sends a new user an activation email. When a new user registers, the info is put into MySQL pretty much instantly, but then it takes about 4 minutes for the activation email to arrive in the new user's inbox.
It seems like sites like Facebook and Twitter can get out an activation email instantly when a new user registers. Is there anything that I could do to make the activation email that I'm using arrive instantly or really fast?
Thanks in advance,
John
Hello,
For the code below, I would like to make a new variable called totalScore2 that equals days + totalScore.
How can I do this?
Thanks in advance,
John
$sqlStr = "SELECT
l.loginid,
l.username,
l.created,
DATEDIFF(NOW(), l.created) AS days,
COALESCE(s.total, 0) AS countSubmissions,
COALESCE(c.total, 0) AS countComments,
COALESCE(s.total, 0) * 10 + COALESCE(c.total, 0) AS totalScore
Hello,
For the HTML table column below, the $count++ displays in the middle of the row. How can I get it to display at the top of the row?
Thanks in advance,
John
Code:
echo '<td class="commentnamecount">'.$count++.'.</td>';
CSS:
.commentnamecount { width: 20px;
overflow:hidden !important;
color: #000000;
vertical-align:
}
Is there anybody who can help me making pixels of an png picture transparant, such like: MakePixelTransparant(const png:TPngImage; x,y:integer; perc:integer); and what else do I have to do to makes thinks works (with values do i have to change to make the png object transparant, so i can use it in for example PhotoShop).
Thanks, John Duinmeijer.
Hi,
I´m trying to get hold of the addresses to the currently used DNS-servers in my application, either I´m connected thru Wifi or mobile.
The DhcpInfo object should provide this but how can I get hold of a valid DhcpInfo object?
Best regards
John
Hello,
When I add a comment using the variable below, apostrophes are printed with a backslash in front of them. How can I get rid of the backslashes?
Thanks in advance,
John
Example of printed result:
My roommate\'s brother\'s ex-girlfriend\'s aunt drive a Toyota.
$comment = mysql_real_escape_string($_POST['comment']);
Hello,
In the code below, I would like to make the word that prints out as the variable "$submittor" a hyperlink to "http://www...com/.../members/index.php?profile=$submittor" .
I can't get it to work; I think I'm doing the formatting wrong.
How can I do it?
Thanks in advance,
John
echo '<div class="sitename3name">Submitted by '.$submittor.' on '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>';
Hi,
I am trying to write a C++ Console based application which collects and populates each characters typed in the console to a std::vector asynchronously without blocking the user
Can anyone help me in how to populate each char entered in std::vector .
John
Hello,
For the code below, how could I put 5 spaces between "Submissions:" and $row1["countSubmissions"] ?
Thanks in advance,
John
echo '<td class="sitename5">Submissions: '.$row1["countSubmissions"].'</td>';
Hi,
When I create a new Silverlight project in Visual Studio it creates a new web project in the same solution and wires it up to run in a local server when developing and debugging.
Some demo projects I have downloaded just run directly from the test page on disk. When developing what are the benefits of running via a server? What would you lose by just running from the disk?
John
Hallo all,
In my institute, Tortoise is employed for the purpose of version control.
I find, if a mdb file which belongs to the working copy of a project reporitory is opened thru Access, the ordinary will be labelled with an explamation mark. Since the database has not been modified, I don't unterstand why Tortoise regards the opening as a kind of modification.
Thanks in advance for any tips.
John
Hello,
I have profile page where the profile is retrieved via GET. The index file has this:
$profile = $_GET['profile'];
When I log in on the profile page, the $profile variable disappears. Here is the form action on the login function:
<form name="login-form" id="login-form" method="post" action="./index.php">
(The $profile variable is separate of the login username.)
How could I make the page retain the $profile variable?
Thanks in advance,
John
Visual Studio 2008 has a Copy Web Site tool that remembers previous FTP locations that files have been copied to. There is a "Connections" drop down where they are listed. I'd like to remove some old listings from that, but I can't find where they're stored.
I've looked at the solution file, and there's nothing there.
John
Hallo all,
My director told me that there is a Unit Test framework for Visual Studio from Microsoft, but didn't know what is the name of this tool. Could anyone of you give a hint on it?
Thanks in advance,
John
Hallo all,
short question:
Does SSTab1.TabPages.Item(?) start from 0 or from 1? How could I find out which tab corresponds to which item()?
Thanks in advance,
John