Hi,
What's the best way to implement showing a number in a small circle on a UITableView row, much like is seen on the 'Inbox' row in the image below?
Thanks,
Hi,
I'm pretty new to OpenGL. Was playing around with some code but can't figure out why the following will not produce two viewports with the same object view. Heres the code:
glViewport(0, windowHeight/2, windowWidth/2, windowHeight);
glScissor(0, windowHeight/2, windowWidth/2, windowHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective( 45.0, (GLfloat)(windowWidth/2)/(GLfloat)(windowHeight/2), 0.1f,
500.0 );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
drawParticleView();
glViewport(windowWidth/2, 0, windowWidth, windowHeight/2);
glScissor(windowWidth/2, 0, windowWidth, windowHeight/2);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective( 45.0, (GLfloat)(windowWidth/2)/(GLfloat)(windowHeight/2), 0.1f,
500.0 );
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
drawParticleView();
drawParticleView() just draws an array of rectangles. The problem is that the second viewport is a squashed representation of the first. My window width is 1280 and height 960. I'm obviously doing something wrong but what? Thanks
Hi all:
I am working on The ausdcf.org to try adding several banner ads in swf format to the top.
Everything starts to work, but I've got several questions that need your help:
The client chose not to go with Google AdManager, but prefer a "minimal approach" to do this task.
What I am trying to do is sort of "mimicking" the way Google AdManager does for banners, that is, to split the chance of each particular swf to be shown to the visitor evenly among the banner collection.
Definitely I can add some jQuery code to do this from client-side, a random number generator and if-else statement would work - just $.load() it!
However, what if I'd like to make sure those disabled Javascript (is there any now btw?) still be able to see different swfs in each visit.
Any suggestion on how to approach this?
Many thanks in advance.
I tried lightbox-plus, fancybox, etc...
But I couldn't figure how to do it.
Those videos are images posts with a link containing a Youtube video:
<p><a href="http://www.youtube.com/watch?v=zUN826BdvV4">
<img class="alignnone size-thumbnail wp-image-40"
title="Screenshot" src="http://localhost/custom-post-type/
wp-content/uploads/2011/01/Screenshot2-150x150.png"
alt="" width="150" height="150" /></a></p>
Fancybox for Wordpress, for example, let me add a lightbox to images, but if the image links to a Youtube video it doesn't work.
Any suggestions?
I have a issue of displaying information in iPhone screen. Case is as follows.
I crated a view-based application in Xcode name as myView.
Then open myViewViewController.xib interface builder, change back
groung color and added label at top-let (0, 0) of the view.
Then I add new file named as myView2ViewController, which is subclass of UIViewController and corresponding XIB also generated.
Open myView2ViewController in IB and added a label at top-left as previous. Also changed the background color.
In the "applicationDidFinishLaunching" of AppDeligate do following
myView2ViewController *mView = [[myView2ViewController alloc] initWithNibName:@"myView2ViewController" bundle:nil];
[window addSubview:mView.view];
When I run the application, it is shown as upper part of the Label is sheared. It seems as whole UI has been moved 20 px upper (Because, there is a horizontal space in the bottom). I guess this is due to some positioning. But still I could not found any way to fix it.
Hope somebody will help me to identify this issue !!
hello,
in my project i have two form's(form1,form2), form1 is configuration form.
i want to show Form1 and when we click Button1 then show Form2 and free(Release) Form1. how can to i do this?
i use this code. but this project start and then exit automatically.A Friend said because the application message loop never start, and application terminates because main form does not exist. how i can to solve this problem?
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Application.CreateForm(TForm2, Form2);
Release;
end;
///
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Form1:= TForm1.Create(Application);
Application.Run;
end.
Hi,
I have an object $rows
If I use echo $rows the content is displayed in my html page, however I would like to select only some parts of the content but I cannot see inside the variable how it is structured...
thanks
Hi,
I wrote an application and now I'm making a tray-icon. Now I want to set a multi-line tooltiptext to the tray-icon. But I don't know how. I know how to do this with Swing:
component.setToolTipText("<html>Line 1<br>Line2</html>");
But this doesn't work with AWT. Also serarating lines by \n doesn't work.
Any help would be very appreciated.
Thanks
I am sure there is a better way to do what I am doing in my apps. The current one I am trying to improve is a list of military cadences. The way I am doing it now is by loading html files in a web view.
What I would like to be able to do is have one view set up and just be able to add the text portion of what I would be displaying with the html file.
What would be the best method. I know this is probably a pretty simple thing to do with a sting or array but I am at the very beginner level and would need to be pointed in the right direction to do it.
I have a checkboxes on my site that when unchecked, update their row in in the db as unchecked, and if checked,update their row in the db as checked. I am creating an ifstatement that will commence with its command if checked, and not if unchecked. I have echoed the variable and it is holding the proper value (checked or unchecked) but not sure if I am syntactically correct on displaying the state of the row in the db.
This is what I am trying and will not work. I am new at php still and thank you very much for any help.
if($auth->check_prof == 'checked'){// do the stuff in here}
Hi all,
Does anyone here know how to set up a pager_query() to automatically go to the last page of the query when the page is displayed? I'm using theme_pager() to format the page.
I've got a Dictionary<string, string> and would like to have the user to see and edit the content, possibly adding new entries. How should I do that?
Input verification, handling dynamic updates of the source Dictionary and looking nice are a bonus.
I have added some UIButton objects into .xib file, and some UIButton objects with the code.
But now I am facing one problem. While Zooming the UIImageView the UIButtons that are added through code are shown on the UIImageView and those that are added with .xib file are below the UIImageView.
Code for UIButtons added with code:
btnBrightness = UIButton.FromType (UIButtonType.RoundedRect);
btnBrightness.Frame = new RectangleF (540, 20, 95, 37);
btnBrightness.SetTitle ("Brightness", UIControlState.Normal);
More details:
monotouch
I'm after creating a webpage that includes a blog section and it currently displays the whole post on the homepage. I'd like to set it so that it only displays a certain part of the entry i.e 50 words. I'd then like to be able to set it so that I have a read more button below the post that links to the post id. I currently use post.php?=# (# = whatever the post id is).
Here is the homepage:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Blog Name</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<body>
<div id="upper-bar">
<div id="bar-content">
<a href="#">Home</a>
<a href="#">Archives</a>
<a href="#">Contact</a>
<a href="#">About</a>
<a href="#"><img src="images/twitter.png" id="tweet"></a><a href="#"><img src="images/feed.png" id="feed"></a>
</div>
</div>
<div id="clear">
</div>
<div class="main">
<h1>Blog Name</h1>
<div class="post-col">
<?php
mysql_connect ('localhost', 'root', 'root') ;
mysql_select_db ('tmlblog');
$sql = "SELECT * FROM php_blog ORDER BY timestamp DESC LIMIT 5";
$result = mysql_query($sql) or print ("Can't select entries from table php_blog.<br />" . $sql . "<br />" . mysql_error());
while($row = mysql_fetch_array($result)) {
$date = date("l F d Y", $row['timestamp']);
$title = stripslashes($row['title']);
$entry = stripslashes($row['entry']);
$id = $row['id'];
?>
<div id='post-info'><?php echo "<p id='title'><strong><a href=\"post.php?id=". $id . "\">" . $title . "</a></strong></p>"; ?><br /></div>
<div id="post">
<?php echo $entry; ?>
<!--<br /><br />
Posted on <?php echo $date; ?> !-->
</p>
</div>
</p>
</div>
<?php
}
?>
</div>
</div>
</body>
</html>
I have a listview with 200 items. I use a custom view for each row. There is a code that takes some time to calculate, and because of this the list hangs out on scrolling and loads in slow (2-3sec).
I have subclassed SimpleCursorAdapter, and using Filterable and SectionIndexer.
I have in mind to show initially the name of the record, and put in a thread the calculation, and will show up later when it's done.
How do I push back some work, and later update the listview to include the calculated data? This should show up on fly without user interaction.
Hi, I have a site setup that is working fine in ie8 and firefox but as you can see here:
http://i36.tinypic.com/nzq63m.jpg
Is this an issue with some css or a png transparency? Or is this just something with IE7.
Thanks in advance :)
showDescriptionPath is being passed from the previous Tableview. The text shows up, but the entire path prints in the UITextField instead of just the value of "Description" in my plist.
NSString *DescriptionPath = [[NSBundle mainBundle] bundlePath];
NSString *DescriptionInfoPath = [DescriptionPath stringByAppendingPathComponent:showDescriptionInfo];
showDescription.text = [[NSString alloc] initWithFormat:@"%@",DescriptionInfoPath];
Hello All,
it's just my curiosity to know that why phpmyadmin behavior in different manner when we modify query a bit( putting extra space) then headers of query results, sometime comes in Button format( on hover it say sort, but sorting not working at all) and sometimes in blue link
is there any difference for this or it just causing by some othe reason?
i m attaching both images.
Button headers
Link headers
I am trying to run this code on my blakberry simulator, but it will not appear on the main menu. Can anybody please help me out.
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;
public class FirstScreen extends MainScreen implements FieldChangeListener {
ButtonField theButton;
public FirstScreen() {
add(new LabelField("First Screen"));
theButton = new ButtonField("New Screen", ButtonField.CONSUME_CLICK);
theButton.setChangeListener(this);
add(theButton);
}
public void fieldChanged(Field field, int context) {
if (field == theButton) {
UiApplication.getUiApplication().pushScreen(new SecondScreen());
}
}
public class SecondScreen extends MainScreen {
public SecondScreen() {
add(new LabelField("Second Screen"));
}
}
}
For some odd reason the part where objects are shown and hidden in my script doesn't seem to be working. I'm not sure if its the fact firefox doesn't like that or whether its the function-based code I have (to save duplicating lines of code)?
There is a working example here and the javascript is here
All help appreciated