Hi folks,
I have a translucent toolbar over the bottom of my UIWebView. The trouble is, if there is a link at the bottom of the page, I can't press it because the webview will always bounce back down to the bottom.
I don't want to shrink the webview and use a solid colour toolbar, and UIWebViews interface doesn't open much up.
What I would like to do, ideally, is to actually increase the size of the web page by one toolbar height, so that I can scroll that extra bit and have all the content above the toolbar, but when scrolling down I will be able to see the page content through the toolbar. I could use the stringByEvaluatingJavaScriptFromString: function of UIWebView.
I'm very rusty on JavaScript- is it possible for me to do this? Increase the window height or something?
I tried:
[webView stringByEvaluatingJavaScriptFromString: [NSString stringWithFormat:@"window.resizeBy(0,%d);", TOOLBAR_HEIGHT] ];
but it didn't do anything.
Any pointers welcome.
Thanks.
I am trying to parse this array data that way generated from JQuery and JSON.
Array
(
[d] = Array
(
[0] = Array
(
[order] = 1
)
[1] => Array
(
[order] => 2
)
[2] => Array
(
[order] => 3
)
[3] => Array
(
[order] => 4
)
[4] => Array
(
[order] => 5
)
)
)
I am trying to save the above date into a mysql table, but cannot seem to parse the data properly to be inserted into the database.
Can anyone help?
how does one use code to do this:
produce 15 random numbers that are not in any order, and that only occur once
eg.
1 4, 2, 5, 3, 6, 8, 7, 9, 10, 13, 12, 15, 14, 11
rand() or arc4rand() can repeat some, which is not what im after.
Thanks
Im trying to add to existing decimal value in table, for which im using the sql below:
UPDATE Funds SET Funds = Funds + :funds WHERE id = :id
Im using a pdo class to handle my db calls, with the method below being used to update the db, but i couldnt figure out how to amend it to output the above query, any ideas ?
public function add_to_values($table, $info, $where, $bind="") {
$fields = $this->filter($table, $info);
$fieldSize = sizeof($fields);
$sql = "UPDATE " . $table . " SET ";
for($f = 0; $f < $fieldSize; ++$f) {
if($f > 0)
$sql .= ", ";
$sql .= $fields[$f] . " = :update_" . $fields[$f];
}
$sql .= " WHERE " . $where . ";";
$bind = $this->cleanup($bind);
foreach($fields as $field)
$bind[":update_$field"] = $info[$field];
return $this->run($sql, $bind);
}
I very curious about making a handwriting recognition application in a web browser. Users draw a letter, ajax sends the data to the server, neural network finds the closest match, and returns results. So if you draw an a, the first result should be an a, then o, then e, something like that.
I'm don't know much about neural networks. What kinda data would I need to pass to the NN. Could it be an array of the x/y coordinates where the user has drawn on a pad. Or what type of data is the neural network expecting or would produce the best results for handwriting?
Say, for example, I've got this simple class:
public class MyClass
{
public String MyProperty { get; set; }
}
The way to get the PropertyInfo for MyProperty would be:
typeof(MyClass).GetProperty("MyProperty");
This sucks!
Why? Easy: it will break as soon as I change the Name of the Property, it needs a lot of dedicated tests to find every location where a property is used like this, refactoring and usage trees are unable to find these kinds of access.
Ain't there any way to properly access a property? Something, that is validated on compile time?
I'd love a command like this:
propertyof(MyClass.MyProperty);
I'm trying to pull some data from MySQL using an Array that was fetch from a first query.
Everything's fine all the way to the implode after that, it's been a headache for me.
Can someone help me?
<?php
$var = 'somedata';
include("config/conect.php");
$zip="SELECT * FROM table WHERE firstcol LIKE '%$var%' ORDER BY seconcol";
$results = $connetction->query($zip);
while ($row = $results->fetch_array()){
$mycode[]=$row['zip'];
}
array_pop($mycode);
$mycode = implode(', ',$mycode);
//print_r ($mycode);
echo '<br /><br /><br />';
$usr="SELECT * FROM reg_temp WHERE zip IN('".join("','", $mycode)."')";
$results = $asies->query($usr);
while ($row = $results-> fetch_arra())
{
$name = $row['name'];
echo $name;
}
?>
hi all,i have a desktop application that install and start a service,i know a process can get the explorer.exe token and lunch another process with the tkoen,it means the second process will run us logged on account, my question is this that can i start my service by explorer.exe token too ? is there is an example in delphi?
thx for ur time
Is it possible to position: absolute a <div /> over a Flash banner without adding wmode="transparent" to the banner?
I have a lightbox that needs to appear above my ads but I can't directly modify the banners as they come from a third party.
I've been assigned the project of creating a simple console app. that models brownian motion in a 2D plane. I wasn't given much information on how to do so (and I'm hoping that it's a pretty popular assignment so that I could get some insight) just that it relies on random number generation. I researched brownian motion for a little bit and saw some formulas that looked complicated, but by the description is just seems to have to move randomly within a certain number interval. Can anyone clarify? Am I to create a program that continually creates a random number in an interval and then modify the particles "x" and "y" coordinate or is there more to it?
Thanks for any help.
What is GUI anchor? All i have heard is that a person can hold a lock on the GUI for some lenght of time , say 2 hours, and in that peiord no otherr person can access that GUI, beacause if allowed access there can be discrepancy.....
To save both client download time and network usage, is it possible to use the localStorage feature of HTML5 to store contents of linked stylesheets, javascript files and binary data (e.g. images), rather than hitting the server each time?
Would that just complicate things - since I assume you would have to add the linked asset via JavaScript rather than just a script or link element, breaking the page for those without JavaScript enabled)? Unless you can parse the content (using HEAD requested to check last modified date and other headers) before the browser downloads it.
Or best just to stick with 304 Not Modified and eTag headers?
The answer to this must be somewhere but I'm not finding it -- can anyone help me understand why in Gedit, if I have a page of code there is no extra trailing blank line, but then when I do a file comparison for my svn commit it shows an extra line being added at the end of the file?
I have a feeling that Gedit is automatically adding an ending line break. But why, I have no idea...
say I have layout like so:
<div id="main">
<div id="NormalContent">
{some content which is a fixed length list}
</div>
<div id="FeaturedContent">
{some content which may contain a long list}
</div>
</div>
and I want to place FeaturedContent above NormalContent.
Can I do this with CSS? I assume I can with Javascript?
Hi Guys,
I have Visual 2010, I am trying to generate dal from my database.
I create a classlibrary project
I add reference to Subsonic
I add reference to mysql
create generated file in directory
I add a App.config file and fill it as this:
I create the external tools button and run it,
it generates the CS files, but doesnt appear in generate files,
what to do next to use these files in my application??
thanks
Hey all,
why is this code throwing an out of memory error, when there is only 1 row in the database..
$request_db = mysql_query("SELECT * FROM requests
WHERE haveplayed='0'") or die(mysql_error());
$request = mysql_fetch_array( $request_db );
echo "<table border=\"1\" align=\"center\">";
while ( $request['haveplayed'] == "0" ) {
echo "<tr><td>";
echo $request['SongName'];
echo "</td><td>";
echo "<tr><td>";
echo $request['Artist'];
echo "</td><td>";
echo "<tr><td>";
echo $request['DedicatedTo'];
echo "</td><td>";
}
echo "</table>";
Thanks.
$(document).ready(function () {
//create the div
var div = $("<div></div>").css("position", "absolute").text("a short message").appendTo("body");
//attach the mousemove event
$("body").bind('mousemove', function(evt) {
div.css({
"left": evt.pageX + "px",
"top": evt.pageY + "px"
});
});
});
what im trying to do is replace a short message with an iframe, what do i do?
Hi,
I'm working on a vb.net application which imports from an Excel spreadsheet.
If rdr.HasRows Then
Do While rdr.Read()
If rdr.GetValue(0).Equals(System.DBNull.Value) Then
Return Nothing
Else
Return rdr.GetValue(0)
End If
Loop
Else
I was using string value to store the double values and when preparing the database statement I'd use this code:
If (LastDayAverage = Nothing) Then
command.Parameters.AddWithValue("@WF_LAST_DAY_TAG", System.DBNull.Value)
Else
command.Parameters.AddWithValue("@WF_LAST_DAY_TAG", Convert.ToDecimal(LastDayAverage))
End If
I now have some data with quite a few decimal places and the data was put into the string variable in scientific notation, so this seems to be the wrong approach. It didn't seem right using the string variable to begin with.
If I use a double or decimal type variable, the blank excel values come across as 0.0.
How can I preserve the blank values?
Thanks
I would like to create a time counter in my app that shows the user how many minutes the app has been running the current session and total. How do I create such time counter and how do I save the value to the phone? I'm new to app developement.
Hi all, having an issue generating random numbers in a loop. Can get around it by using Thread.Sleep but after a more elegant solution.
for ...
Random r = new Random();
string += r.Next(4);
Will end up with 11111... 222... etc.
Suggestions?
If I have the following Delphi code
type TFormatArgs = array of TVarRec;
procedure DelphiGodsGiveMeTheAnswerPrettyPlease;
var
iMyAge: integer;
iMyIQ: integer;
sCode: string;
sText: string;
begin
iMyAge := 5;
iMyIQ := -5;
sCode := 'Format(''My age is %d and my IQ is %d'', [iMyAge, iMyIQ])';
sText := FormatThis(sCode, iMyAge, iMyIQ);
end;
function FormatThis(sFormatCode: string; iVar1: integer; iVar2: integer): string;
var
sFormatString: string;
arFormatArgs: TFormatArgs;
begin
sFormatString := GetFormatString(sFormatCode); // I can implement this function
arFormatArgs := ConstructFormatArgs(iVar1, iVar2); // NEED HELP HERE!
result := SysUtils.Format(sFormatString, arFormatArgs);
end;
How can I implement my ConstructFormatArgs function in Delphi (not Assembly)? I'm afraid the assembly code in SysUtils.WideFormatBuf is just a little bit beyond my comprehension skills! Any ideas? I'm seeking divine assistance. Even if you can contribute just a little hint here and there on how to improve it or help me progress with this exercise. TIA.
When I bring my server down and make an ajax request to it, firebug shows that the request is aborted a few seconds after making the request, and my success handler gets called.
Why does the success handler get called, shouldn't it be the error handler? And how can I reliably detect that it wasn't actually a success?