Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,286,168 | 1 | null | null | 1 | 1,063 | How to let someone post on his/her friends' walls via facebook API, similar to instagr.am iPhone application lets you post on your own wall?
- -

| How to post both text, image and link at once on friends' walls via facebook API | CC BY-SA 2.5 | 0 | 2011-03-12T23:03:54.140 | 2011-08-05T11:45:45.820 | null | null | 11,895 | [
"iphone",
"ios",
"api",
"facebook"
]
|
5,286,553 | 1 | 5,290,506 | null | 4 | 4,951 | I have a "legacy" VB.NET application (winforms) written for .NET 1.1, and re-compiled under 2.0 that produces a report in HTML via a custom `XmlTextWriter` wrapper that is suited for HTML. The user then would print the report into pdf if they wanted to.
That was 2003, and now technology has changed a bit, especially within the C#/VB.NET world, and customers want to skip the HTML part, and go to PDF directly. What are my options for open source, or low cost PDF libraries that work well with .NET and must support (generated bitmaps from code) and text.
Here is screen shot of the resulting html rendering

Obviously this needs some cleaning up, tidying it and stuff, but I am interested on known which technology to pursue in this project.
This related [question](https://stackoverflow.com/q/1141350/380384) might be what I need, or it may be out of date by now. I don't have any data sources that will provide all the information I want displayed. Currently it is collected from various classes within the application in order to be displayed as html.
anybody have direct experience with [iTextSharp](http://sourceforge.net/projects/itextsharp/) or [SharpPDF](http://sourceforge.net/projects/sharppdf/) ?
Thanks for any advice.
found possible duplicate [here](https://stackoverflow.com/q/2899237/380384).
| What options do I have to produce a PDF report from code in .NET for scientific data (winforms) | CC BY-SA 2.5 | 0 | 2011-03-13T00:19:04.477 | 2019-01-28T12:57:54.107 | 2017-05-23T12:30:38.833 | -1 | 380,384 | [
"c#",
"vb.net",
"winforms",
"pdf-generation"
]
|
5,286,663 | 1 | 5,286,671 | null | 148 | 269,012 | The HTML shown below,
```
<input type="text"/>
```
is displayed in a browser like so:

---
When I add the following text,
> The quick brown fox jumped over the lazy dog.
Using the HTML below,
```
<input type="text" value="The quick brown fox jumped over the lazy dog."/>
```
it is displayed in a browser like so:

---
But I would like it to be displayed in a browser like so:

---
I want the text in my input element to wrap.
Can this be accomplished without a textarea?
| Wrapping text inside input type="text" element HTML/CSS | CC BY-SA 2.5 | 0 | 2011-03-13T00:45:12.303 | 2023-02-15T15:11:02.350 | null | null | 552,067 | [
"html",
"input",
"word-wrap"
]
|
5,286,672 | 1 | null | null | 0 | 1,764 | ```
<s:List xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
mouseOver="scroller_mouseOver(event)"
height="308" width="110">
```
As seen above, I have a Spark List with the MouseOver event:
```
protected function scroller_mouseOver(e:MouseEvent):void {
CursorManager.removeAllCursors(); // Remove all previous Cursors
if (mouseX > 24 && mouseX < 143) {
if (mouseY > 220) {
CursorManager.setCursor(downCursorSymbol); // Down Cursor
} else if (mouseY < 87) {
CursorManager.setCursor(upCursorSymbol); // Up Cursor
}
// Scroll as its Mouse Overed
this.addEventListener(Event.ENTER_FRAME, scrollViaY);
}
}
private function scrollViaY(e:Event):void {
if (mouseX > 24 && mouseX < 143) {
if (mouseY > 220) {
this.layout.verticalScrollPosition += (mouseY - 220)*0.5;
}
else if (mouseY < 87) {
this.layout.verticalScrollPosition += (mouseY -86)*0.5;
}
}
}
```
The following picture describes the area I would like to track hovering.

When I hover the upper (red) part of the List (I would like to have the List scroll downward, the higher the mouse position is, the faster it should scroll). Similarly, If the mouse hovers over the bottom (red) part, the List scrolls upwards, and the lower the mouse is hovered, the faster the list would scroll. The current code does work - Though, the trace outs make it obvious that:
this.layout.verticalScrollPosition += (mouseY - 220)*0.5;
or
this.layout.verticalScrollPosition += (mouseY -86)*0.5;
...are giving jumping effects, is there a way to make these values change more linearly or smoother?
I created an AnimateProperty, but that works well only if I would like to scroll to a selectedIndex, In this case, I would like the scroller to keep scrolling linearly as the mouse is hovered to a particular red area, and increase in speed when I scroll to either extremity.
While the mouse is over the Bottom (red part )of the List, the verticalScrollPosition scrolls faster as it gets farther than the center of the ticket list... yet there is jumping effect going on, I suppose due to the EnterFrame. the Same with Upper Part... the higher the cursor is, the faster the List should scroll.
I feel this is a common problem to Flash CSx developers.
| Spark List scrolling by mouse position | CC BY-SA 2.5 | null | 2011-03-13T00:48:18.013 | 2011-11-01T13:41:54.230 | 2011-03-18T18:54:16.480 | null | 219,763 | [
"apache-flex",
"list",
"scroll",
"mouse"
]
|
5,287,002 | 1 | 5,343,295 | null | 3 | 7,713 | I have some graph, which I want to display using [JUNG2](http://jung.sourceforge.net/) like in the image below.

I've played with some layouts of JUNG2, but I'm always getting an image like this:

Is it possible to lay out the graph as I wish without writing a new layout?
Thanks in advance
Dmitri
UPD: Here is the code I used for visualizing the graph:
```
private Embedded createSampleGraph() {
Embedded imageComponent = null;
try {
final DocumentBuilderFactory docBuilderFactory =
DocumentBuilderFactory
.newInstance();
final DocumentBuilder docBuilder =
docBuilderFactory.newDocumentBuilder();
final Document document = docBuilder.newDocument();
final Element svgelem = document.createElement("svg");
document.appendChild(svgelem);
final SVGGraphics2D graphic2d = new SVGGraphics2D(document);
final Graph<String, String> graph = createGraph();
final VisualizationImageServer<String, String> server =
createServer(graph);
server.printAll(graphic2d);
final Element el = graphic2d.getRoot();
el.setAttributeNS(null, "viewBox", "0 0 350 350");
el.setAttributeNS(null, "style", "width:100%;height:100%;");
final ByteArrayOutputStream bout = new ByteArrayOutputStream();
final Writer out = new OutputStreamWriter(bout, "UTF-8");
graphic2d.stream(el, out);
final JungResource source = new JungResource(bout);
TPTApplication.getCurrentApplication().addResource(source);
imageComponent = new Embedded("", source);
imageComponent.setWidth(DEFAULT_WIDTH_PIXELS, UNITS_PIXELS);
imageComponent.setHeight(DEFAULT_HEIGHT_PIXELS, UNITS_PIXELS);
imageComponent.setMimeType("image/svg+xml");
addComponent(imageComponent);
} catch (final UnsupportedEncodingException exception) {
LOGGER.error(ErrorCodes.M_001_UNSUPPORTED_ENCONDING, exception);
} catch (final SVGGraphics2DIOException exception) {
LOGGER.error(ErrorCodes.M_002_SVG_GRAPHICS_2D_IO, exception);
} catch (final ParserConfigurationException exception) {
LOGGER.error(ErrorCodes.M_003_PARSER_CONFIGURATION, exception);
}
return imageComponent;
}
private VisualizationImageServer<String, String> createServer(
final Graph<String, String> aGraph) {
final Layout<String, String> layout = new FRLayout<String, String>(
aGraph);
layout.setSize(new Dimension(300, 300));
final VisualizationImageServer<String, String> vv =
new VisualizationImageServer<String, String>(
layout, new Dimension(350, 350));
vv.getRenderContext().setVertexLabelTransformer(
new ToStringLabeller<String>());
return vv;
}
private Graph<String, String> createGraph() {
final Graph<String, String> graph =
new DirectedSparseMultigraph<String, String>();
final String vertex1 = "IE";
final String vertex2 = "P1";
final String vertex3 = "P2";
final String vertex4 = "P3";
final String vertex5 = "FE";
graph.addVertex(vertex1);
graph.addVertex(vertex2);
graph.addVertex(vertex3);
graph.addVertex(vertex4);
graph.addVertex(vertex5);
graph.addEdge("1", vertex1, vertex2, EdgeType.DIRECTED);
graph.addEdge("2", vertex2, vertex3, EdgeType.DIRECTED);
graph.addEdge("3", vertex3, vertex5, EdgeType.DIRECTED);
graph.addEdge("4", vertex1, vertex4, EdgeType.DIRECTED);
graph.addEdge("5", vertex4, vertex5, EdgeType.DIRECTED);
return graph;
}
```
UPD 17.03.2011
Now I can draw a graph like this:

| JUNG layout question | CC BY-SA 2.5 | 0 | 2011-03-13T02:29:53.410 | 2013-02-04T11:05:37.193 | 2011-03-17T09:23:08.043 | 399,457 | 399,457 | [
"java",
"jung"
]
|
5,287,301 | 1 | 5,287,308 | null | 1 | 1,225 | I have a main menu, and in the HTML code, it is in the correct order, but when viewed in the browser, it is reversed. Why?
HTML:
```
<div class="header">
<img src="images/JTS_1_B_FL31.png" alt="J.T.S Logo" class="logo" />
<ul class="menu">
<li class="current"><a href="index.php">Home</a></li>
<li><a href="services.php">Services</a></li>
<li><a href="support.php">Support</a></li>
<li><a href="contact.php">Contact Us</a></li>
<li><a href="myaccount/">My Account</a></li>
</ul>
</div>
```
CSS:
```
.header{
width: 100%;
height: 30px;
background-color: #1D242D;
}
.logo{
padding: 5px 0 0 5px;
float: left;
}
.menu{
float: right:
}
li{
display: inline;
list-style: none;
float: right;
padding: 5px 5px 7px 5px;
}
```
Screenshot:

| Why has the web browser reversed my menu options? | CC BY-SA 2.5 | null | 2011-03-13T03:55:52.373 | 2011-03-13T04:03:00.603 | null | null | null | [
"html",
"css",
"menu"
]
|
5,287,418 | 1 | 5,287,772 | null | 0 | 278 | I have a viewController which is connected to a tabBarItem, and I have set it up correctly in the xib file and that the tabBar displays the correct viewController but for some reason the viewDidLoad method nor the awakeFromNib methods are called when the tabBarItem is selected and the view is displayed.
Why is this?
EDIT: Answer thanks to tato
Image of what should be done.

Set the Class in the Class identity to the class/viewController you want to load with that tabBArItem.
Select the tabBarItem you want to connect the viewController too and the select inspector to get to this image and set the class.
| tabBarItem viewController wont call viewDidLoad or awakeFromNib | CC BY-SA 2.5 | null | 2011-03-13T04:25:59.007 | 2011-03-13T16:00:07.137 | 2011-03-13T16:00:07.137 | 356,387 | 356,387 | [
"iphone"
]
|
5,287,422 | 1 | null | null | 0 | 1,219 | >
[How to split an array into a group of n elements each?](https://stackoverflow.com/questions/3514740/how-to-split-an-array-into-a-group-of-n-elements-each)
I believe I oversimplified this question so I am editing it a bit. From within a .NET 3.5 console application I have a SortedList string,string that will contain an unknown number of key/value pairs. I will get this collection by reading in rows from a table within a Microsoft Word document. The user will then be able to add additional items into this collection. Once the user has finished adding to the collection I then need to write the collection back to a new Microsoft Word document. The difficulty is that the items must be written back to the document in alphabetical order to a multicolumn table, first down the left side of the table and then down the right side of the table and since the output will likely be spread across multiple pages I need to also keep the order across multiple pages. So the first table on the first page may contain A through C on the left side of the table and C through F on the right side of the table then if the table exceeds the page a new table is needed. The new table may contain F through I and the right side L through O.Since the table will likely span multiple pages and I know the maximum number of rows per table per page I can do the math to determine how many tables I will need overall. This image is representative of the output:

For the sake of brevity if a output table can contain a maximum of 7 rows per page and 2 items per row and I have 28 items then I will need to write the output to 2 tables but of course I won't really know how many tables I will need until I read in the data so I can't simply hardcode the number of output tables.
What is the best way to take my SortedList and split it out into n collections in order to create the table structure described?
| split SortedList to multiple lists or arrays | CC BY-SA 2.5 | null | 2011-03-13T04:26:24.053 | 2011-03-13T21:57:51.270 | 2017-05-23T12:01:09.963 | -1 | 312,443 | [
"c#",
".net",
"sortedlist"
]
|
5,287,828 | 1 | 5,288,218 | null | 0 | 252 | i have a [TColorBox](http://docwiki.embarcadero.com/VCL/en/ExtCtrls.TColorBox) component on my form and i want which the user enter directly (type) a value in the component in the same way when i edit a TColor property in the object inspector.
the question is, is posible set the TColorBox to allow to the user edit the color value manually and set the Tcolorbox component to show the value typed in this way?

| Allow to the user enter a value to an TColorBox Component | CC BY-SA 2.5 | null | 2011-03-13T06:10:05.770 | 2011-03-13T08:05:38.077 | null | null | 167,454 | [
"delphi"
]
|
5,287,891 | 1 | 5,287,941 | null | 2 | 482 | I'm learning how to build a photo_gallery using a PHP video book/tutorial. I was able to upload a photo, but in the MySQL database, it's not registering a size of the photo. It just says 0 (see image)
The instructor's Mysql gives the size of the file.
Any idea why the file size wouldn't show up in SQL?

UPDATE... This is the photograph class.
```
<?php
require_once(LIB_PATH.DS.'database.php');
class Photograph extends DatabaseObject {
protected static $table_name="photographs";
protected static $db_fields=array('id', 'filename', 'type', 'caption');
public $id;
public $filename;
public $type;
public $size;
public $caption;
private $temp_path;
protected $upload_dir="images";
public $errors=array();
protected $upload_errors = array(
UPLOAD_ERR_OK => "No errors.",
UPLOAD_ERR_INI_SIZE => "Larger than upload_max_filesize.",
UPLOAD_ERR_FORM_SIZE => "Larger than form MAX_FILE_SIZE.",
UPLOAD_ERR_PARTIAL => "Partial upload.",
UPLOAD_ERR_NO_FILE => "No file.",
UPLOAD_ERR_NO_TMP_DIR => "No temporary directory.",
UPLOAD_ERR_CANT_WRITE => "Can't write to disk.",
UPLOAD_ERR_EXTENSION => "File upload stopped by extension."
);
// Pass in $_FILE(['uploaded_file']) as an argument
public function attach_file($file) {
//perform error checking on the form parameters
if(!file || empty($file) || !is_array($file)){
//error: nothing uploaded or wrong usage
$this->errors[] = "No file was uploaded.";
return false;
} elseif($file['error'] !=0) {
//error: report what PHP says went wrong
$this->errors[] = $this->upload_errors[$file['error']];
return false;
} else {
//set object attributes to the form parameters.
$this->temp_path = $file['tmp_name'];
$this->filename = basename($file['name']);
$this->type = $file['type'];
$this->size = $file['size'];
//don't worry about saving anything to the database yet
return true;
}
}
public function save() {
// a new record won't have an id yet.
if(isset($this->id)) {
//really just to update the caption
$this->update();
} else {
//make sure there are no errors
//Can't save if there are pre-existing errors
if(!empty($this->errors)) {return false; }
//make sure the caption is not too long for the DB
if(strlen($this->caption) > 255) {
$this->error[] = "The caption can only be 255 characters long.";
return false;
}
//Can't save without filename and temp location
if(empty($this->filename) || empty($this->temp_path)){
$this->errors[] = "The file location was not available.";
return false;
}
//Determine the target_path
$target_path = SITE_ROOT .DS. 'public' .DS. $this->upload_dir .DS. $this->filename;
//Make sure a file doesn't already exist
if(file_exists($target_path)) {
$this->errors[] = "The file {$this->filename} already exists.";
return false;
}
//attempt to move the file
if(move_uploaded_file($this->temp_path, $target_path)) {
//success
//save a corresponding entry to the database
if($this->create()) {
//we are done with temp_path, the file isn't there anymore
unset($this->temp_path);
return true;
}
} else {
//failure
$this->errors[] = "The file upload failed, possibly due to incorrect permissions
on the upload folder.";
return false;
}
}
}
//common database methods
public static function find_all(){
return self::find_by_sql("SELECT * FROM ".self::$table_name);
}
public static function find_by_id($id=0) {
global $database;
$result_array = self::find_by_sql("SELECT * FROM ".self::$table_name." WHERE id={$id} LIMIT 1");
return !empty($result_array) ? array_shift($result_array) : false;
}
public static function find_by_sql($sql=""){
global $database;
$result_set = $database->query($sql);
$object_array = array();
while ($row = $database->fetch_array($result_set)) {
$object_array[] = self::instantiate($row);
}
return $object_array;
}
private static function instantiate($record){
$object = new self;
//$object->id = $record['id'];
//$object->username = $record['username'];
//$object->password = $record['password'];
//$object->first_name = $record['first_name'];
//$object->last_name = $record['last_name'];
foreach($record as $attribute=>$value) {
if($object->has_attribute($attribute)) {
$object->$attribute = $value;
}
}
return $object;
}
private function has_attribute($attribute) {
$object_vars = $this->attributes();
return array_key_exists($attribute, $object_vars);
}
protected function attributes() {
//return an array of attribute keys and their values
$attributes = array();
foreach(self::$db_fields as $field) {
if(property_exists($this, $field)) {
$attributes[$field] = $this->$field;
}
}
return $attributes;
}
protected function sanitized_attributes() {
global $database;
$clean_attributes = array();
//sanitize the values before submitting
//Note: does not alter the actual value of each attribute
foreach($this->attributes() as $key=> $value) {
$clean_attributes[$key] = $database->escape_value($value);
}
return $clean_attributes;
}
//replaced with a custom save()
//public function save() {
//return isset($this->id) ? $this->update() : $this->create();
//}
public function create() {
global $database;
$attributes = $this->sanitized_attributes();
$sql = "INSERT INTO ".self::$table_name." (";
$sql .= join(", ", array_keys($attributes));
$sql .= ") VALUES ('";
$sql .= join("', '", array_values($attributes));
$sql .= "')";
if ($database->query($sql)) {
$this->id = $database->insert_id();
return true;
} else {
return false;
}
}
public function update() {
global $database;
$attributes = $this->sanitized_attributes();
$attribute_pairs = array();
foreach($attributes as $key => $value) {
$attribute_pairs[] = "{$key}='{$value}'";
}
$sql = "UPDATE ".self::$table_name." SET ";
$sql .= join(", ", $attribute_pairs);
$sql .= " WHERE id=". $database->escape_value($this->id);
$database->query($sql);
return($database->affected_rows() == 1) ? true : false;
}
public function delete() {
global $database;
$sql = "DELETE FROM ".self::$table_name." ";
$sql .= "WHERE id=". $database->escape_value($this->id);
$sql .= " LIMIT 1";
$database->query($sql);
return($database->affected_rows() == 1) ? true : false;
}
}
```
?>
| MYSQL file size not showing | CC BY-SA 2.5 | 0 | 2011-03-13T06:32:26.850 | 2011-03-13T07:02:52.297 | 2011-03-13T07:02:52.297 | 476,945 | 577,455 | [
"php",
"mysql"
]
|
5,288,014 | 1 | 5,288,041 | null | 1 | 546 | The Cocoa programming for Mac OS X 3rd edition book has the following screen capture at page 85.
How can I get the clock control, and how to use it? I can't seem to find it with Interface Builder.

### ADDED
I got some good examples [here](http://developer.apple.com/library/mac/#samplecode/DatePicker/Introduction/Intro.html%23//apple_ref/doc/uid/DTS10004134).
| clock control in cocoa/objective-c | CC BY-SA 2.5 | null | 2011-03-13T07:08:05.837 | 2011-03-13T20:39:12.660 | 2011-03-13T20:39:12.660 | 260,127 | 260,127 | [
"cocoa",
"interface-builder",
"controls"
]
|
5,288,370 | 1 | 5,288,481 | null | 6 | 34,516 | I am using Eclipse 3.5 and I attached the src.zip to my global settings in Eclipse.
Windows--> Preferences -->Java -->Installed JREs -->rt.jar - Source attachment - ...../jdk/src.zip
I am successfully able to step in the java core library .class files and view the source code. I building a Class which uses the LinkedList and I have set a breakpoint inside the LinkedList class.
When I debug the breakpoints in my source code (my projects) are working good but when I need to step into the java core lib .classes I get the following error in my Eclipse

I checked my complier settings in Preferences and found all options checked true.

It would to great if someone can help me resolve this issue.
Thanks in advance.
| How to debug .class files in ECLIPSE? | CC BY-SA 2.5 | 0 | 2011-03-13T08:51:47.223 | 2011-03-23T17:14:58.973 | 2011-03-23T17:14:58.973 | 324,446 | 324,446 | [
"java",
"eclipse",
"compiler-construction",
"debugging"
]
|
5,288,440 | 1 | 5,289,166 | null | 2 | 1,349 | I guys,
you surely know about the color `grouped tableview background color`(see the screenshot below) or the `view flipside background color`. You can find them in Interface Builder, and they are a sort of "pattern colors".

| Custom color pattern to use in Interface Builder | CC BY-SA 2.5 | 0 | 2011-03-13T09:06:52.397 | 2011-03-13T11:55:29.350 | null | null | 396,133 | [
"iphone",
"macos",
"interface-builder"
]
|
5,288,435 | 1 | 5,366,692 | null | 39 | 21,113 | I'm trying to write my own custom `View` and I have problem with `LayoutParams`.
The idea is to extend `ViewGroup` (`LinearLayout`)
```
public class MyView extends LinearLayout{
public MyView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyView(Context context) {
super(context);
}
public void putContent(){
setOrientation(HORIZONTAL);
LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
for (int i = 0; i < 5; i++){
View view = inflater.inflate(R.layout.item, null);
TextView tv = (TextView)view.findViewById(R.id.item_text);
tv.setText("Item " + i);
addView(view);
}
}
}
```
As you can see `putContent` method inflates an items and adds to my view. Here is an item layout
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF">
<TextView android:text="TextView"
android:id="@+id/item_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#000000"/>
</LinearLayout>
```
And main screen layout
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android_layout_weight="1"
android:text="@string/hello"
/>
<my.test.MyView
android:id="@+id/my_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android_layout_weight="1"
/>
</LinearLayout>
```
And activity code
```
public class Start extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MyView myView = (MyView)findViewById(R.id.my_view);
myView.putContent();
}
}
```
Here is screenshot of what i get

So problem is: attributes of item's root element is ignored
```
android:layout_width="match_parent"
android:layout_height="match_parent"
```
But in result I want to get something like this (I get this result when replace `addView(view);` with this line)
```
addView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1F));
```

So question is: how I can achieve this result without hard coded LayoutParams ?
Thanks for any help!
I also look at the `view` variable fields in debug mode - the `mLayoutParams` is `null`, and became not null when I add inflated `view` into parent with `addView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, 1F));`.

But `mLayoutParams` of child of just-loaded view is not null.
Why LayoutParams of only root element in xml layout are ignored when view inflated?
| Layout params of loaded view are ignored | CC BY-SA 3.0 | 0 | 2011-03-13T09:05:54.600 | 2015-08-11T18:27:27.407 | 2015-08-11T18:27:27.407 | 2,688,755 | 654,369 | [
"android",
"layout",
"layoutparams"
]
|
5,288,693 | 1 | null | null | 0 | 308 | Scenario:

There are three things: UserControls, GridView and a Collection. There is 1:1:1 Mapping between UserControl:Grid Row: Collection Row
The problem is how to bind a single usercontrol to a collection row. So if any object in collection is updated, corresponding GridView row and usercontrol should be updated automatically.
EDIT: The complete UI would is multithreaded. So most of the times the original collection as a whole would never be recreated. Only objects would be added/deleted/updated.
| Binding multiple User Controls to single collection | CC BY-SA 2.5 | null | 2011-03-13T10:08:18.343 | 2011-03-13T10:15:28.683 | 2011-03-13T10:15:28.683 | 213,469 | 213,469 | [
"c#",
"winforms",
"data-binding"
]
|
5,289,328 | 1 | 5,289,462 | null | 51 | 39,422 | How to apply the default Windows style to the standard `MessageBox` in WPF?
For example, when I execute next code:
```
MessageBox.Show("Hello Stack Overflow!", "Test", MessageBoxButton.OKCancel,
MessageBoxImage.Exclamation);
```
I'm getting message box:

But in WinForms everything is OK with style:
```
MessageBox.Show("Hello Stack Overflow!", "Test", MessageBoxButtons.OKCancel,
MessageBoxIcon.Exclamation);
```

| WPF MessageBox window style | CC BY-SA 3.0 | 0 | 2011-03-13T12:27:38.930 | 2020-11-26T01:08:04.747 | 2013-08-25T19:10:05.323 | 438,180 | 438,180 | [
"c#",
"wpf",
"messagebox"
]
|
5,289,386 | 1 | 5,290,778 | null | 5 | 4,325 | I'm using `NSWindowController` to load a window from a NIB. However, when I call `showWindow:`, the window is visually topmost, but the focus remains where it was (instead of moving it to the new window).
It's easy to see this happening when the first window (with keyboard focus) is moved slightly, before creating the new window (via cmd+n). This is the result:

The bottom, focused window is the original window. The unfocused window on top is the newly created window.
This is the relevant code:
AppDelegate.h:
```
- (IBAction)newDocument:(id) sender;
```
AppDelegate.m:
```
- (IBAction)newDocument:(id) sender {
[[[FooController alloc] init] showWindow:self];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
[self newDocument:self];
}
```
FooController.h:
```
@interface FooController : NSWindowController { }
@end
```
FooController.m:
```
- (id)init {
self = [super initWithWindowNibName:@"FooWindow"];
return self;
}
```
FooWindow.xib:
A freshly created Window xib, without modifications.
MainMenu.xib:
The default MainMenu.xib, with its window deleted.
Calling `makeKeyAndOrderFront:` on the window in the controller's `windowDidLoad` method does not appear to focus the new window. Setting the File's owner of FooWindow.xib to `FooController` also did not appear to help.
What is the correct way to load and show a window from a NIB so that it does receive keyboard focus?
It looks like `NSWindowController`'s `window` method returns `nil`, which explains why calling methods on `window` doesn't do anything. But why is it `nil`?
| How to give focus to NSWindow loaded from NIB? | CC BY-SA 2.5 | 0 | 2011-03-13T12:39:52.023 | 2011-03-13T16:41:38.323 | 2011-03-13T16:33:30.780 | 84,560 | 84,560 | [
"cocoa",
"nswindow",
"nswindowcontroller"
]
|
5,289,735 | 1 | 5,289,775 | null | 0 | 175 | After some hours creating a vb.net helper class for unit-tests and integrating moq into the project followed by a smashing hit on the "Run tests" Key-Command and then a Red Light revealed himself.
To save you the trouble of what happened. The answer that explained the problem can be found here :
[Experiences using moq with VB.Net](https://stackoverflow.com/questions/798570/experiences-using-moq-with-vb-net)
So i tough hey lets just write the test in C# ! (type mock is not an option)
After 15 min a shiny green light while the vb.net test still fails.
Would it be recommended to continue writing test in C# with a mocking framework.
Or just implement for each Real-Interface a Fake-Interface in vb.net
Some constraints on the freedom are :
- -
Or is there an alternative approach to this?
Also my apologizes for my not so great English writing style (I am working on it)

| Would it be recommended to write Test in C# and production code in vb.net | CC BY-SA 2.5 | null | 2011-03-13T13:43:31.193 | 2011-03-13T13:50:50.110 | 2017-05-23T12:06:58.140 | -1 | 520,265 | [
"c#",
"vb.net",
"tdd",
"moq"
]
|
5,289,881 | 1 | 5,289,907 | null | 0 | 366 | I want to create something like the windows file browser upper bar.. Like url browser, see the image below. Using visual studio 2008.

Is there any control that can do this? Free or not...
| How to create file browser horizontal tree like windows using visual studio 2008 | CC BY-SA 2.5 | null | 2011-03-13T14:10:22.300 | 2011-03-13T14:21:34.820 | 2011-03-13T14:21:34.820 | 333,786 | 657,534 | [
"winforms",
"visual-studio-2008",
"file-browser"
]
|
5,290,003 | 1 | 5,423,523 | null | 95 | 25,348 | I have a graph of wind speeds against direction which has a huge numeber of points, and so am using alpha=I(1/20) in addition to color=month
Here is a sample of code:
```
library(RMySQL)
library(ggplot2)
con <- dbConnect(...)
wind <- dbGetQuery(con, "SELECT speed_w/speed_e AS ratio, dir_58 as dir, MONTHNAME(timestamp) AS month, ROUND((speed_w+speed_e)/2) AS speed FROM tablename;");
png("ratio-by-speed.png",height=400,width=1200)
qplot(wind$dir,wind$ratio,ylim=c(0.5,1.5),xlim=c(0,360),color=wind$month,alpha=I(1/30),main="West/East against direction")
dev.off()
```
This produces a decent graph, however my issue is that the alpha of the legend is 1/30th also, which makes it unreadable. Is there a way I can force the legend to be 1 alpha instead?
Here is an example:

| How to set legend alpha with ggplot2 | CC BY-SA 2.5 | 0 | 2011-03-13T14:29:36.503 | 2012-03-02T20:21:08.317 | 2011-03-13T14:36:40.553 | 323,225 | 323,225 | [
"r",
"ggplot2"
]
|
5,290,442 | 1 | 5,290,578 | null | 3 | 1,158 | Cancelation of eclipse update would take 3-4 minutes, Why?

Thanks.
| Why the cancelation of eclipse update is so slow? | CC BY-SA 2.5 | null | 2011-03-13T15:49:33.753 | 2011-03-13T16:06:58.017 | null | null | 193,251 | [
"eclipse"
]
|
5,290,733 | 1 | null | null | 0 | 1,373 | I have folder named JPAZZ and in this folder I have the following items:
and . Now the problem is the following. In file, I would like to link some text with the file WITHOUT using a hard link (in HTML I normally use a slash to make it work dynamically..Example: /TEST.pdf)
Currently I am using Action Script 3 in Flash and I am trying to link the text with TEST.pdf by using the Advanced Character Link as shown below:
Any help please?

| Flash: Link Flash .swf with another file on same cd | CC BY-SA 2.5 | null | 2011-03-13T16:33:10.263 | 2011-03-14T04:56:53.750 | null | null | 414,847 | [
"flash",
"actionscript-3",
"actionscript",
"flash-cs5"
]
|
5,291,203 | 1 | 5,315,001 | null | 2 | 1,475 | I am making a UI with Swing, and I want the buttons I am using for my custom dialogs to have the same style as the ones in standard dialogs.
For instance, in the attached image I have a custom dialog and the standard file select dialog. I want the 'OK' and 'Cancel' buttons from the file select dialog to be used for the equivalent buttons in my custom dialog.
I want my application to use the default system look and feel of whatever OS it is running on, so I don't want to try to manually re-create these standard buttons. Using a more rigid Swing class that automatically provides these buttons wouldn't work either, as I'd like to also use them in other, more exotic places in my UI.
Is there an easy solution to this problem?

| Using standard buttons from a Look and Feel | CC BY-SA 2.5 | 0 | 2011-03-13T17:46:12.837 | 2011-03-15T16:46:14.267 | null | null | 284,741 | [
"java",
"swing"
]
|
5,291,265 | 1 | 5,293,115 | null | 17 | 9,651 | I try to remove red border around to completely fill screen my calendar(without padding from left, right and top).
```
margin=0
padding=0
background=@null
```
isn't fix the problem.
I don't use any 9path background image.
what's the problem ?

| Delete border space around GridView | CC BY-SA 2.5 | 0 | 2011-03-13T17:56:45.450 | 2011-04-12T12:13:11.830 | null | null | 273,106 | [
"android",
"gridview",
"border"
]
|
5,291,413 | 1 | 5,291,437 | null | 2 | 1,597 | I have seen some apps with a slightly translucent, black bar at the bottom of the screen with buttons on it and a menu bar in the middle. I was wondering how to create something like this.

| Android: How to create a navigation bar | CC BY-SA 2.5 | 0 | 2011-03-13T18:23:20.163 | 2011-03-13T18:28:56.730 | 2011-03-13T18:24:44.890 | 119,895 | 656,944 | [
"android"
]
|
5,292,278 | 1 | 5,293,167 | null | 1 | 535 | We've probably all seen this guy before - something like a long aqua button, but with lines of different colours inside. They grow larger and change colours depending on some sort of volume. They are apparently called Audio Bars, as I found out by sniffing around the system art using ThemePark. In case you're still confused, I mean something like this (in iChat):

Is there any ready-made control that will give me this, either in the system itself, a library, or otherwise? I'm guessing I'd have to implement it myself, but I'm not entirely sure how. These images are all small capsules that can be stretched, using pieces I suppose, but I don't want to fill my app up with 3 pieces for each one of the different bar states.
| Cocoa Volume Bar | CC BY-SA 2.5 | null | 2011-03-13T20:47:44.203 | 2011-03-13T23:19:26.630 | null | null | 219,515 | [
"cocoa",
"macos",
"audio"
]
|
5,292,291 | 1 | 5,379,013 | null | 166 | 70,382 | I recently upgraded to Xcode 4 (which is a great upgrade) but now I'm getting some warnings that I did not get before. I have looked through forums and other SO posts but have not come across how to fix this.
The warnings I get are project level warnings for a missing file. The files that are being shown have been deleted from the project navigator view (also choosing to delete from file system). However it still seems to be showing up as somehow linked to the project, even though the file no longer appears in the Project navigator.
I have looked around and not found how I can tell Xcode that these files are gone, stop giving me warnings. Here's a screenshot that I get in Xcode4, but never got in Xcode 3.

| Missing file warnings showing up after upgrade to Xcode 4 | CC BY-SA 3.0 | 0 | 2011-03-13T20:50:04.840 | 2018-04-09T18:15:27.733 | 2018-04-09T18:15:27.733 | 1,265,393 | 311,525 | [
"xcode",
"ios4",
"xcode4"
]
|
5,292,323 | 1 | 5,292,815 | null | 3 | 1,836 | I am working on an Android game similar to the Rush Hour/Traffic Jam/Blocked puzzle games. The board is a square containing rectangular pieces. Long pieces may only move horizontally, and tall pieces may only move vertically. The object is to free the red piece and move it out of the board. This game is only my second ever programming project in any language, so any tips or best practices would be appreciated along with your answer.
I have a class for the game pieces called Pieces that describes how they are sized and drawn to the screen, gives them drag-and-drop functionality, and detects and handles collisions.
I then have an activity class called GameView which creates my layout and creates Pieces objects to add to a RelativeLayout called Board. I have considered making Board its own class, but haven't needed to yet.
Here's what my work in progress looks like:

Most of this works perfectly fine except for my collision handling. It seems to be detecting collisions well but instead of pushing the pieces outside of each other when there is a collision, it frantically snaps back and forth between (what seems to be) where the piece is being dragged to and where it should be. It looks something like this:

Another oddity: when the dragged piece collides with a piece to its left, the collision handling seems to work perfectly. Only piece above, below, and to the right cause problems.
Here's the collision code:
```
@Override
public boolean onTouchEvent(MotionEvent event){
float eventX = event.getX();
float eventY = event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
//check if touch is on piece
if (eventX > x && eventX < (x+width) && eventY > y && eventY < (y+height)){
initialX=x;
initialY=y;
break;
}else{
return false;
}
case MotionEvent.ACTION_MOVE:
//determine if piece should move horizontally or vertically
if(width>height){
for (Pieces piece : aPieces) {
//if object equals itself in array, skip to next object
if(piece==this){
continue;
}
//if next to another piece,
//do not allow to move any further towards said piece
if(eventX<x&&(x==piece.right+1)){
return false;
}else if(eventX>x&&(x==piece.x-width-1)){
return false;
}
//move normally if no collision
//if collision, do not allow to move through other piece
if(collides(this,piece)==false){
x = (eventX-(width/2));
}else if(collidesLeft(this,piece)){
x = piece.right+1;
break;
}else if(collidesRight(this,piece)){
x = piece.x-width-1;
break;
}
}
break;
}else if(height>width){
for (Pieces piece : aPieces) {
if(piece==this){
continue;
}else if(collides(this,piece)==false){
y = (eventY-(height/2));
}else if(collidesUp(this,piece)){
y = piece.bottom+1;
break;
}else if(collidesDown(this,piece)){
y = piece.y-height-1;
break;
}
}
}
invalidate();
break;
case MotionEvent.ACTION_UP:
// end move
if(this.moves()){
GameView.counter++;
}
initialX=x;
initialY=y;
break;
}
// parse puzzle
invalidate();
return true;
}
```
This takes place during onDraw:
```
width = sizedBitmap.getWidth();
height = sizedBitmap.getHeight();
right = x+width;
bottom = y+height;
```
My collision-test methods look like this with different math for each:
```
private boolean collidesDown(Pieces piece1, Pieces piece2){
float x1 = piece1.x;
float y1 = piece1.y;
float r1 = piece1.right;
float b1 = piece1.bottom;
float x2 = piece2.x;
float y2 = piece2.y;
float r2 = piece2.right;
float b2 = piece2.bottom;
if((y1<y2)&&(y1<b2)&&(b1>=y2)&&(b1<b2)&&((x1>=x2&&x1<=r2)||(r1>=x2&&x1<=r2))){
return true;
}else{
return false;
}
}
private boolean collides(Pieces piece1, Pieces piece2){
if(collidesLeft(piece1,piece2)){
return true;
}else if(collidesRight(piece1,piece2)){
return true;
}else if(collidesUp(piece1,piece2)){
return true;
}else if(collidesDown(piece1,piece2)){
return true;
}else{
return false;
}
}
```
should my x,y,right,bottom,width,height variables be ints instead of floats like they are now?
Also, any suggestions on how to implement things better would be greatly appreciated, even if not relevant to the question! Thanks in advance for the help and for sitting through such a long question!
I have gotten it working almost perfectly with the following code (this doesn't include the code for vertical pieces):
```
@Override
public boolean onTouchEvent(MotionEvent event){
float eventX = event.getX();
float eventY = event.getY();
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
//check if touch is on piece
if (eventX > x && eventX < (x+width) && eventY > y && eventY < (y+height)){
initialX=x;
initialY=y;
break;
}else{
return false;
}
case MotionEvent.ACTION_MOVE:
//determine if piece should move horizontally or vertically
if(width>height){
for (Pieces piece : aPieces) {
//if object equals itself in array, skip to next object
if(piece==this){
continue;
}
//check if there the possibility for a horizontal collision
if(this.isAllignedHorizontallyWith(piece)){
//check for and handle collisions while moving left
if(this.isRightOf(piece)){
if(eventX>piece.right+(width/2)){
x = (int)(eventX-(width/2)); //move normally
}else{
x = piece.right+1;
}
}
//check for and handle collisions while moving right
if(this.isLeftOf(piece)){
if(eventX<piece.x-(width/2)){
x = (int)(eventX-(width/2));
}else{
x = piece.x-width-1;
}
}
break;
}else{
x = (int)(eventX-(width/2));
}
```
The only problem with this code is that it only detects collisions between the moving piece and one other (with preference to one on the left). If there is a piece to collide with on the left and another on the right, it will only detect collisions with the one on the left. I think this is because once it finds a possible collision, it handles it without finishing looping through the array holding all the pieces. How do I get it to check for multiple possible collisions at the same time?
| Collision problems with drag-n-drop puzzle game | CC BY-SA 2.5 | 0 | 2011-03-13T20:55:36.753 | 2012-07-11T12:52:42.710 | 2011-03-16T00:07:27.183 | 431,327 | 431,327 | [
"java",
"android",
"drag-and-drop",
"collision-detection"
]
|
5,292,471 | 1 | 5,292,495 | null | 1 | 219 | I send to the javascript an array like:

```
$.each(data, function (value, name) {
$('#visitStart').append($('<option></option>').val(value).html(value));
});
```
and as a result I see that the visitStart input is filled by values from 0 to 241. Why ?
| jQuery: A problem with .each function | CC BY-SA 2.5 | null | 2011-03-13T21:19:21.037 | 2012-10-20T10:24:02.467 | null | null | 106,616 | [
"jquery"
]
|
5,292,616 | 1 | null | null | 0 | 200 | Here is my table schema:

Here is my controller:
```
public ActionResult Register()
{
return View();
}
[HttpPost]
public ActionResult Register(FormCollection formValues)
{
return View();
}
```
And here is my Register view:
```
@model LocalizationWebsite.Models.SiteUser
@{
ViewBag.Title = "Localization | Create Account";
}
<h2>Create Your Account</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<div class="editor-label">
@Html.LabelFor(model => model.Username)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Username)
@Html.ValidationMessageFor(model => model.Username)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Password)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Password)
@Html.ValidationMessageFor(model => model.Password)
</div>
<div class="editor-label">
@Html.EditorFor(model => model.Password)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Password)
@Html.ValidationMessageFor(model => model.Password)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Email)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Email)
@Html.ValidationMessageFor(model => model.Email)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.AvatarPath)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.AvatarPath)
@Html.ValidationMessageFor(model => model.AvatarPath)
</div>
<p>
<input type="submit" value="Create" />
</p>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
```
How do you suggest I check if the same password was written in both fields? If possible, I'd like to do this automatically as the user is typing in.
Thank you for the help.
| How can I validate if a user has written in the same two passwords correctly in my view? | CC BY-SA 2.5 | null | 2011-03-13T21:38:49.810 | 2011-03-20T05:10:19.117 | null | null | null | [
"c#",
"asp.net-mvc-3"
]
|
5,292,682 | 1 | 5,292,710 | null | 0 | 3,350 | I have one more question(first one is here: [html, css with center div problem](https://stackoverflow.com/questions/5291783/html-css-with-center-div-problem))
So, I have three columns on my web page and when I put image in one of the and I want to shrink window(browser), image is "going" behind the other div. This is pretty ok, but I would like that this div stop shrinking and to weight of the image become weight of the div, or something like that.
Sorry I don't know to explain it in English, so I will try in images :)
maximized:

at this point, it should stop:

and not to do this:

html part
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="styl.css">
<title>Title goes here</title>
</head>
<body>
<div id="cela">
<div id="header">
<p>hlavicka</p>
</div>
<div id="container3">
<div id="container2">
<div id="container1">
<div id="lavy"><p><img src="http://akiscode.com/projects/SOS/chuck_norris_random_fact_generator_6_3957_2224_image_2561.jpg", width="150"/ > Etiam ante est, tempus vitae adipiscing ac, luctus ut massa. Vestibulum malesuada,</p><div class="clear"></div>
</div>
<div id="stredny"><p>Mauris orci erat, </p></div>
<div id="pravy"><p></p></div>
</div>
</div>
</div>
<div id="footer">
<p>footer</p>
</div>
</div>
</body>
</html>
```
css part
```
img
{
float: right;
margin: 0 0 10px 10px;
border: 1px solid #666;
padding: 2px;
}
.clear {
clear:both;
width:100%;
}
#cela {
width: 80%;
margin-left: auto;
margin-right: auto;
border: 1px #110000 solid;
}
#header
{
padding:20px;
background:#008000;
}
#footer
{
clear: both;
padding:20px;
background:#008000;
}
#container3 {
float:left;
width:100%;
background:#CCFFCC;
overflow:hidden;
position:relative;
}
#container2 {
float:left;
width:100%;
background:#66FF66;
position:relative;
right:30%;
}
#container1 {
float:left;
width:100%;
background:#00FF00;
position:relative;
right:40%;
}
#container0 {
float:left;
width:100%;
background:white;
position:relative;
right:0%;
}
#lavy
{
float:left;
width:28%;
position:relative;
left:72%;
overflow:hidden;
}
#stredny
{
float:left;
width:38%;
position:relative;
left:74%;
}
#pravy
{
float:left;
width:28%;
position:relative;
left:76%;
}
```
i have tried to use overflow: scroll, but the result is not very aesthetic
| html, css img to stop shrinking <div> :) | CC BY-SA 3.0 | null | 2011-03-13T21:50:40.770 | 2013-03-26T09:11:36.570 | 2017-05-23T12:30:36.930 | -1 | 657,820 | [
"html",
"css",
"image",
"border"
]
|
5,292,878 | 1 | 5,292,886 | null | 6 | 14,572 | The possible outline styles that I know of are shown below.
- - - - - - - -
None of these puts an outline around an input element like shown below:

With what CSS stylling can someone style an input element like shown above?
| CSS for fuzzy outline around input elements | CC BY-SA 2.5 | 0 | 2011-03-13T22:22:30.443 | 2012-04-23T07:39:38.830 | null | null | 552,067 | [
"input",
"css",
"styling"
]
|
5,293,119 | 1 | null | null | 3 | 3,048 |  represented by 9
 represented by 7
represented by 8
represented by 6
 2d array the -1 is empty region and 0 is grass full
this is the code i am using to render the view
```
//map class
private int[][] terrain = new int[20][20];
}
//constructor
protected Drawable[] tiles = new Drawable[10];
tiles[GameMap.GRASS] = getResources().getDrawable(R.drawable.grass);
tiles[GameMap.GRASS_WU] = getResources().getDrawable(R.drawable.grass_wu);
tiles[GameMap.GRASS_WD] = getResources().getDrawable(R.drawable.grass_wd);
tiles[GameMap.GRASS_EU] = getResources().getDrawable(R.drawable.grass_eu);
tiles[GameMap.GRASS_ED] = getResources().getDrawable(R.drawable.grass_ed);
protected void onDraw(Canvas canvas) {
//move_Unit();
for (int x=0;x<map.getWidthInTiles();x++) {
for (int y=0;y<map.getHeightInTiles();y++) {
if(map.getTerrain(x,y) != -1){
tiles[map.getTerrain(x,y)].setBounds(x*16,y*16,(x*16) + 16,(y*16) + 16);
if (map.getUnit(x,y) != 0) {
tiles[map.getUnit(x,y)].setBounds(x*16,y*16,(x*16) + 16,(y*16) + 16);
}
tiles[map.getTerrain(x, y)].draw(canvas);
tiles[map.getUnit(x, y)].draw(canvas);
}
}
}
}
}
```
why does my view appear like this and how do i fix it?
| android rpg game isometric view | CC BY-SA 2.5 | 0 | 2011-03-13T23:05:30.950 | 2013-12-08T12:52:42.253 | 2011-03-14T21:51:52.603 | 657,981 | 657,981 | [
"android"
]
|
5,293,367 | 1 | 5,301,815 | null | 1 | 410 | I need to show some data in a textview coming from coredata (like this for example),

I imagine a possible solution (dont know if is the right one or how to do it, please advice),
so bring the data from coredata to a string, appending all the data neeeded in the string with the equivalent of "\n" for new line where needed; then show the data in the text view,
(please refer to example image to know what is needed)
- -
Thanks a lot!!
| iphone textview showing data coming from coredata | CC BY-SA 2.5 | 0 | 2011-03-13T23:52:04.977 | 2011-03-15T11:08:00.110 | 2011-03-14T00:11:43.807 | 523,507 | 523,507 | [
"iphone",
"core-data",
"formatting",
"textview"
]
|
5,293,602 | 1 | 5,294,058 | null | 0 | 1,888 | The source code is like this:
```
<div id="contact">
<div class="form">
<form action="contact.php" method="post" name="contact-us">
<div class="right">
<div class="labeled">
<label for="text">body</label>
</div>
<textarea id="text" name="text" cols="20" rows="5"></textarea>
</div>
</form>
</div>
</div>
```
And this is css block for textarea and related objects :
```
div.right {
float: right;
margin: 5px 0;
}
div.labeled {
width: 150px;
float: right;
}
div.right div.form textarea#text, textarea#text {
background: #A2A2A2;
border: 1px solid #811D1D;
height: 50px;
margin-right: 20px;
width: 220px;
color: #FFFFFF;
font-family: Tahoma, Geneva, sans-serif;
font-size: 11px;
}
```
in FF all things are correct but in IE the textarea hasn't been styled and remains Intact.
You can see difference in below image too :

Also as you can see the label tag styled true in FF and remains intact in IE!
How could I fix these?
Regards...
| IE Incompatibility with form css styling | CC BY-SA 2.5 | null | 2011-03-14T00:42:48.790 | 2011-03-14T02:11:05.707 | null | null | 190,929 | [
"html",
"css",
"internet-explorer",
"forms",
"textarea"
]
|
5,293,607 | 1 | 5,293,645 | null | 0 | 1,195 | Hello I'm a college student studying Java. I'm working on a android application. It compiles and shows no error. However when it runs, there's a unexpected close error.


Here's my application. When you click on the calculate ws you purpose to change to this screen.
Here's my code:
```
package com.warhammerdicerrolleralpha;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
public class myMain extends Activity
{
EditText enternumberofdice;
final TextView textGenerateNumber = (TextView) findViewById(R.id.text4);
private EditText text, text2, text3;
private Button btutorial1;
int number1 = Integer.parseInt(text.getText().toString());
int number2 = Integer.parseInt(text2.getText().toString());
ImageView i = new ImageView(this);
{
i.setAdjustViewBounds(true);
}
private int myFaceValue;
int myNum;
/**
* Called when the activity is first created.
*
* @return
*/
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
public void go()
{
while (myNum > 0)
{
// TODO Auto-generated method stub
textGenerateNumber.setText(String.valueOf(enternumberofdice));
--myNum;
return;
}
}
public int roll()
{
int val = (int) (6 * Math.random() + 1); // Range 1-6
setValue(val);
return val;
}
{
try
{
myNum = Integer.parseInt(enternumberofdice.getText().toString());
}
catch (NumberFormatException nfe)
{
enternumberofdice.setText("Does not work");
}
}
public int getValue()
{
return myFaceValue;
}
public void setValue(int myFaceValue)
{
this.myFaceValue = myFaceValue;
}
{
switch (myFaceValue)
{
case 5:
i.setImageResource(R.drawable.dicefive);
break;
case 1:
i.setImageResource(R.drawable.diceone);
break;
case 3:
i.setImageResource(R.drawable.dicethree);
break;
case 2:
i.setImageResource(R.drawable.dicetwo);
break;
case 4:
i.setImageResource(R.drawable.dicefour);
break;
case 6:
i.setImageResource(R.drawable.dicesix);
break;
default:
i.setImageResource(R.drawable.error);
break;
}
text = (EditText) findViewById(R.id.editText1);
text2 =(EditText) findViewById(R.id.editText2);
text3 = (EditText) findViewById(R.id.editText3);
btutorial1 = (Button) findViewById(R.id.button1);
btutorial1.setOnClickListener((OnClickListener) this);
Button buttonGenerate = (Button) findViewById(R.id.button1);
enternumberofdice = (EditText) findViewById(R.id.enternumberofdice);
Button buttonGenerate2 = (Button) findViewById(R.id.battlecalculate);
buttonGenerate2.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
setContentView(R.layout.main2);
}
});
buttonGenerate.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
// TODO Auto-generated method stub
go();
roll();
}
});
}
public void onClick(View view)
{
switch (view.getId())
{
case R.id.button1:
if (number1 > number2)
{
text3.setText("Three and above");
return;
}
else if (number1 < number2)
{
text3.setText("Five and above");
return;
}
else if (number1 == number2)
{
text3.setText("Four and above");
return;
}
else
{
text3.setText("Not Working");
return;
}
}
}
}
```
| My android app says source not found when i'm debugging it | CC BY-SA 2.5 | null | 2011-03-14T00:43:24.640 | 2011-03-14T00:58:10.000 | 2011-03-14T00:58:10.000 | 29,995 | 516,805 | [
"java",
"android",
"xml",
"eclipse"
]
|
5,293,736 | 1 | 5,844,916 | null | 41 | 61,811 | Does anyone know how to achieve skew like this:

Using CSS's new transform property?
As you can see I'm trying to skew both corners, anyone know if this is possible?
| CSS Transform Skew | CC BY-SA 4.0 | 0 | 2011-03-14T01:06:42.903 | 2019-06-27T13:31:14.517 | 2019-06-27T13:31:14.517 | 8,620,333 | 658,082 | [
"css",
"css-transforms",
"css-shapes",
"skew"
]
|
5,293,831 | 1 | 5,293,996 | null | 10 | 6,791 | I have added a label to the jquery ui progressbar using [this demo](http://jsbin.com/ohiyo).
What I want to do is change the text color depending on if the progress bar is behind the letter.
How can I tell if that has happened?
| jquery ui.progressbar label - Change text color on background passing letter | CC BY-SA 2.5 | 0 | 2011-03-14T01:25:20.840 | 2011-09-13T02:38:38.140 | 2011-09-13T02:38:38.140 | 497,356 | 383,759 | [
"jquery",
"jquery-ui",
"progress-bar",
"jquery-ui-progressbar"
]
|
5,293,846 | 1 | 5,293,964 | null | 2 | 544 | I'm trying to implement AES cryptography using the AES machine instructions (basing it on Intel's [white paper](http://software.intel.com/file/24917)) available on my Sandy Bridge. Unfortunately, I've come to a halt in the phase of generating the round keys for decryption. Specifically, the instruction `aesimc` (applying the operation) returns an incorrect result.
In their paper they have an example:

So with input:
```
48 69 28 53 68 61 79 29 5B 47 75 65 72 6F 6E 5D
```
I get the following using `_mm_aesimc_si128()`:
```
2D BF F9 31 99 CD 3A 37 B7 C7 81 FD 7D E0 3D 8E
```
It should have returned:
```
62 7A 6F 66 44 B1 09 C8 2B 18 33 0A 81 C3 B3 E5
```
Not the same result.
If you want to reproduce it, I tested it with the code below (remember the arguments `-maes -msse4` when compiling):
```
#include <wmmintrin.h>
#include <iostream>
using namespace std;
void print_m128i(__m128i data) {
unsigned char *ptr = (unsigned char*) &data;
for (int i = 0; i < 16; i++) {
int val = (int) ptr[i];
if (val < 0xF) {
cout << "0";
}
cout << uppercase << hex << val << " ";
}
cout << endl;
}
int main() {
unsigned char *data = (unsigned char*)
"\x48\x69\x28\x53\x68\x61\x79\x29\x5B\x47\x75\x65\x72\x6F\x6E\x5D";
__m128i num = _mm_loadu_si128((__m128i*) data);
__m128i num2 = _mm_aesimc_si128(num);
print_m128i(num2);
return 0;
}
```
The example in Intel's white paper was wrong. As Hans suggested, my chip is little-endian so byte-swapping is necessary - to and fro.
| aesimc instruction gives incorrect result | CC BY-SA 2.5 | 0 | 2011-03-14T01:29:50.030 | 2011-03-14T11:22:51.620 | 2011-03-14T11:22:51.620 | 642,148 | 642,148 | [
"c++",
"aes",
"encryption",
"instruction-set",
"machine-instruction"
]
|
5,293,956 | 1 | 5,294,019 | null | 1 | 91 | Hey... I have this database and I need to create a function that returns the percentage of students that passed a subject but I don´t know what I did wrong... Could you help me please??? Here is my diagram and here is my function...
```
create function fnPassedStudents(@Semester varchar(7),@CodSubjects varchar(5))
returns @Passed
TABLE (
Semester varchar(7),
Cod_Subjects varchar(5),
Name_Subjects varchar(80),
Nro_Students int,
Nro_Passed float,
Nro_Failed float,
PercentagePassed varchar(4))
as
begin
declare @NroPassed float
select @NroPassed = count(M.Cod_Student)
from Matricula M inner join Subjects A on M.Cod_Subjects = A.Cod_Subjects
Where M.Semester=@Semester and M.Cod_Subjects = @CodSubjects and M.Grade>=10
insert into @Passed
select M.Semester, A.Cod_Subjects, A.Name_Subjects, COUNT(M.Cod_Student) as Total,
@NroPassed as Passed, (COUNT(M.Cod_Student) - @NroPassed) as Failed,
((@NroPassed * 100)/(count(M.Cod_Student))) as PercentagePassed
from Matricula M inner join Subjects A on M.Cod_Subjects = A.Cod_Subjects
Group by M.Semester, A.Cod_Subjects, A.Name_Subjects
return
end
go
```
I´m not sure if this information is enough... but please be patient and I´ll add anything you need... Thanks!!!
| I don´t know what´s wrong with this function | CC BY-SA 2.5 | null | 2011-03-14T01:51:12.410 | 2011-03-14T02:03:43.400 | null | null | 647,399 | [
"sql",
"database",
"function"
]
|
5,294,123 | 1 | 5,294,774 | null | 0 | 857 | Hi All,
I have stuck in an error for a long time and cant figure out what it is . I am using CMarkup class (xml Parser) for parsing XML files which works perfectly in VC++ . When I move that into QT it started throwing some strange error which is hard for me to fix.It says
```
iconv.h: no such file or director
expected; before cd , etc.
```
I checked the CMArkup website where it says
> The MARKUP_ICONV mode is currently
automatically selected in g++ based
on the predefined macro.
Again, you can turn off iconv usage
by adding MARKUP_STDCONV to your
project preprocessor definitions, or
on the command line with
-DMARKUP_STDCONV.
g++ main.cpp Markup.cpp MarkupTest.cpp -DMARKUP_STDCONV
I tried everything but still probem exist. Have anyone got into similar problem who can help me fixing this .
| QT CMarkUp(XMLParser) error . iconv.h: no such file or director | CC BY-SA 2.5 | null | 2011-03-14T02:24:18.387 | 2011-03-15T00:25:00.013 | 2011-03-15T00:25:00.013 | 357,037 | 357,037 | [
"c++",
"xml",
"qt",
"visual-c++",
"markup"
]
|
5,294,416 | 1 | null | null | 2 | 574 |   
I run the following code with the left and the right images and get the strange result. I'm not exactly sure what I'm doing wrong. First of all, why is it cropped and why is the disparity all one color?
```
CvStereoBMState *BMState = cvCreateStereoBMState();
assert(BMState != 0);
BMState->preFilterSize=41;
BMState->preFilterCap=31;
BMState->SADWindowSize=41;
BMState->minDisparity=-64;
BMState->numberOfDisparities=128;
BMState->textureThreshold=10;
BMState->uniquenessRatio=5;
CvMat* disp = cvCreateMat(image_pyramid[0][0]->height, image_pyramid[0][0]->width, CV_16S);
CvMat* vdisp = cvCreateMat(image_pyramid[0][0]->height, image_pyramid[0][0]->width, CV_8U);
cvFindStereoCorrespondenceBM(image_pyramid[0][0], image_pyramid[1][0], disp, BMState);
cvNormalize(disp, vdisp, 0, 256, CV_MINMAX);
cvSaveImage("wowicantbelieveitsnotbutter.jpg", vdisp);
```
| Cannot get the proper stereo from L/R pair | CC BY-SA 2.5 | 0 | 2011-03-14T03:25:43.060 | 2012-05-29T11:15:49.757 | null | null | 592,667 | [
"opencv",
"computer-vision",
"stereo-3d"
]
|
5,294,442 | 1 | 5,294,837 | null | 1 | 787 | I'm looking for a buffer switcher plugin for vim. It's shown in the following screenshot. Can anyone tell me what it is and how to get it?

| Buffer switcher plugin for vim | CC BY-SA 3.0 | 0 | 2011-03-14T03:32:23.137 | 2012-07-31T19:53:04.300 | 2012-07-31T19:53:04.300 | 122,607 | 334,966 | [
"vim",
"buffer",
"vim-plugin"
]
|
5,294,465 | 1 | 5,294,831 | null | 0 | 714 | EDIT
I am still baby in writing Javascript and I need your help in understanding how it works so please bear with me.
Say, if I want to have "Singapore" append to the textfield on the webpage automatically when the user picks "Singapore" in country select dropdown, how or where do I need to append the "Singapore" text to the state/city textfields on webpage? See image example.


```
function appendtoText(){
var country = document.getElementById("billing_country_select");
var state = document.getElementById("billing_province_input");
var city = document.getElementById("billing_city");
if (country.value == "Singapore"){
state.value = state.append("Singapore");
alert(state.value);
city.append("Singapore");
}
```
}
I am not sure where I went wrong with this. State and City don't show the appended text: Singapore. So please correct me if I went wrong in coding.
Thanks for the help in advance
| Javascript/Jquery - how to append the state/city fields? | CC BY-SA 2.5 | null | 2011-03-14T03:37:02.577 | 2011-03-15T03:11:53.067 | 2011-03-15T03:10:47.797 | 524,666 | 524,666 | [
"javascript",
"jquery",
"append",
"textfield"
]
|
5,294,614 | 1 | null | null | 0 | 175 | Work on C#.I have a list named as .From this list I have to search Some string.After search I want to select all item between the search parameter.Bellow picture discribe in detail.

Collection :

After read the I store data in dataset then,convert the dataset as .From this collection i want to get valuse between the search parameters.
I write the bellow syntax but result can not satisfy me.
```
var InputList = (from p in ds.Tables["InputFile"].Rows.Cast<DataRow>().ToArray() select p.ItemArray).ToList();
var r3 = (from c in InputList
where c.Any(e => e.ToString().Contains("Loading"))
select c).ToList();
```
If have any query plz ask.Thanks in advance.
| how to get items between the search parameters | CC BY-SA 2.5 | null | 2011-03-14T04:08:12.910 | 2012-02-15T09:49:02.530 | null | null | 336,100 | [
"c#",
".net",
"windows",
"linq",
"linq-to-objects"
]
|
5,294,817 | 1 | null | null | 0 | 648 | We are in process of upgrading from Telerik Q3 2010 asp.net mvc extensions to Q1 2011. Previously, in grid editing disabled values were not posted in the form but now they are posted as null values. I asked the Telerik team and they confirmed that this is expected behavior and they will be posting all the model back to controller.
What is bothering me is that a null value for a field is making Modelstate invalid even though the field is nullable and I'm not decorating it with Required attribute.
Here is my view model:
```
public class VMDoctorHospital
{
[HiddenInput(DisplayValue = false)]
public int DrHospitalID { get; set; }
[HiddenInput(DisplayValue = false)]
public int DoctorID { get; set; }
[DisplayName("Personal Clinic?")]
public bool PersonalClinic { get; set; }
[DisplayName("Clinic Name")]
public string ClinicName { get; set; }
[DisplayName("Hospital"), UIHint("IntStrEditor")]
public int? HospitalID { get; set; }
[DisplayName("Doctor's Position")]
//ohter fields
}
```
in the Model PersonalClinic flag dictates which input (Clinic name or HospitalID) will be disabled and hidden.


Now, even if they are posting null value for HospitalID when personalClinin checkbox is checked, it perfectly makes sense and on controller side HospitalID should be accepting null value as it is nullable and not REQUIRED but in reality I receive "The value "null" is not valid for HospitalID" in ModelstateDictionary.
I have no idea what is making it behave in this way.
| Telerik grid posted values making Modelstate invalid | CC BY-SA 4.0 | null | 2011-03-14T04:43:07.057 | 2021-09-12T23:04:25.247 | 2021-09-12T23:04:25.247 | 472,495 | 331,174 | [
"asp.net-mvc-2",
"telerik",
"data-annotations",
"telerik-grid",
"telerik-mvc"
]
|
5,295,230 | 1 | 5,295,270 | null | 3 | 547 | I've been a programmer for a few years now, but I've never to understand low-level operations involving bytes. It interests me however, and I would like to understand more about working with bytes.
In the below code I'm reading a text file that contains only the words "hi there".
```
FileStream fileStream = new FileStream(@"C:\myfile.txt", FileMode.Open);
byte[] mybyte = new byte[fileStream.Length];
fileStream.Read(mybyte, 0, (int)fileStream.Length);
foreach(byte b in mybyte)
Console.Write(b);
Console.ReadLine();
```
In this case, the mybyte variable contains numeric values that appear to represent the ASCII decimal counterpart. However, I thougth bytes represent bits, which in turn represnt binary values. When reading a byte I would expect to see a binary value like '0001010', not '104' which is the ascii character for 'h'.
In the case of reading an image, when reading the image into a byte array I once again see numbers in the array, and from a low-level persepctive I would expect binary values. I know that these numbers obviously don't map to Ascii, but I'm confused why when reading a string they would map to ascii numbers and when reading an image stream it does something else (I'm not actually sure what the numbers represent in the case of reading an image).
I know understanding what the numbers mean in a byte array isn't critical, but it greatly interests me.
Could someone please shed a light on bytes in the .net framework when reading from a text file and when reading binary (i.e. image). Thank You


| C# - Reading bytes, what are they and what's going on. I expect binary values, not decimal numbers | CC BY-SA 2.5 | 0 | 2011-03-14T05:53:52.163 | 2011-03-14T06:29:33.167 | 2011-03-14T06:01:15.347 | 175,057 | 175,057 | [
"c#",
".net",
"byte"
]
|
5,295,576 | 1 | null | null | 0 | 180 | I made a table for showing list of data. This table contains merging two rows which is I really need it to look that way. The tricky problem came when I try to highlight a single row.
It turns out that single TR is highlighted

script
```
<script type="text/javascript">
var preEl ;
var orgBColor;
var orgTColor;
function HighLightTR(el, backColor,textColor){
if(typeof(preEl)!='undefined') {
preEl.bgColor=orgBColor;
try{ChangeTextColor(preEl,orgTColor);}catch(e){;}
}
orgBColor = el.bgColor;
orgTColor = el.style.color;
el.bgColor=backColor;
try{ChangeTextColor(el,textColor);}catch(e){;}
preEl = el;
}
function ChangeTextColor(a_obj,a_color){ ;
for (i=0;i<a_obj.cells.length;i++)
a_obj.cells(i).style.color=a_color;
}
```
html
```
<tr onClick="HighLightTR(this,'#c9cc99','cc3333');" >
</tr>
```
How Can I highlighted the whole rows (the second column has two rows)
Thank your for your helps... ^_^
| Is it possible to create the selected row event though it has merge cell? | CC BY-SA 3.0 | null | 2011-03-14T06:48:10.803 | 2017-08-13T15:13:48.370 | 2017-08-13T15:13:48.370 | 4,370,109 | 410,307 | [
"javascript",
"html",
"html-table",
"onclick",
"highlight"
]
|
5,295,838 | 1 | 5,295,954 | null | 20 | 23,161 | I have a Form like this.
UserID has to be validated when user clicks "Check Availability" and "Submit"
Hence "UserID" required field validator has to be assigned two grops.
As if now it is assigned only Group1
```
<asp:RequiredFieldValidator ID="UserIDRequiredFieldValidator" runat="server" ErrorMessage="Enter UserID"
ControlToValidate="txtUserID" ValidationGroup="Group1"></asp:RequiredFieldValidator>
```
So is it possible to assign "Group1" and "Group2" to UserIDRequiredFieldValidator
I have already gone through
[How to validate against Multiple validation groups?](https://stackoverflow.com/questions/2509369/how-to-validate-against-multiple-validation-groups)
which talks about validating Group1 and Group2 when user clicks "Submit" which is a good alternate solution .
Thanks in Advance
| Is it possible to assign Multiple Validation Groups to a single Validation Control? | CC BY-SA 2.5 | null | 2011-03-14T07:25:42.490 | 2017-02-15T09:43:50.767 | 2017-05-23T12:17:42.737 | -1 | 277,087 | [
"c#",
"javascript",
".net",
"asp.net",
"validation"
]
|
5,296,116 | 1 | 5,296,140 | null | 0 | 1,402 | It is simple to understand after this pic.

I add fewtextfields in tableview
I already set the keyboard style is number pad.
Now the problems is
???ex. `UITextField *ip1,ip2,ip3,ip4....`or just set different tag for textfield ?
(even the keyboard is set number pad,but it might can paste words...)
<1>If IP1 is 0~223 , IP2 need to be set 0~255,IP3,IP4 both are 0~255
<2>If IP1 is 172 ,IP2 is set 16~31.IP3,IP4 both are 0~255;
If IP1 is 192 ,IP2 must be 168.IP3 IP4 are 0~255
<3>Netmask set default 255.255.255.0
<4>Router 0~223 ,0~255 ,0~255 ,0~255
This IP setting rules is my friends tech me this ...I not sure the rules is right or not?
Oh....Sorry , I need to add more information about is static IP
This static IP setting is set up for some hardware device ,ex IP cam
so it won't need to paste a URL
| iphone SDK: How to check user set up a valid IP , Netmask , Router? | CC BY-SA 2.5 | null | 2011-03-14T08:06:01.190 | 2011-03-14T08:37:41.027 | 2011-03-14T08:37:41.027 | 437,132 | 437,132 | [
"iphone",
"ios",
"sdk",
"uitextfield",
"ip"
]
|
5,296,515 | 1 | 5,300,263 | null | 2 | 1,783 | I have the following two 8-tap filters:
```
h0 ['-0.010597', '0.032883', '0.030841', '-0.187035', '-0.027984', '0.630881', '0.714847', '0.230378']
h1 ['-0.230378', '0.714847', '-0.630881', '-0.027984', '0.187035', '0.030841', '-0.032883', '-0.010597']
```
Here they are on a graph:

I'm using it to obtain the (lower subband of an image). This is `a(m,n)` in the following diagram:

I got the coefficients and diagram from the book [Digital Image Processing, 3rd Edition](http://www.imageprocessingplace.com/DIP-3E/dip3e_main_page.htm), so I trust that they are correct. The symbol denotes convolution (either over rows or over columns). The down arrow denotes downsampling in (either over rows, or columns).
My problem is that the filter coefficients for `h0` and `h1` sum to greater than 1 (approximately 1.4 or sqrt(2) to be exact). Naturally, if I convolve any image with the filter, the image will get brighter. Indeed, here's what I get (expected result on right):
 
Can somebody suggest what the problem is here? if the convolution filter coefficients sum to greater than 1?
I have the source code, but it's quite long so I'm hoping to avoid posting it here. If it's absolutely necessary, I'll put it up later.
What I'm doing is:
1. Decompose into subbands
2. Filter one of the subbands
3. Recompose subbands into original image
Note that the point isn't just to have a displayable subband-decomposed image -- I have to be able to perfectly reconstruct the original image from the subbands as well. So if I scale the filtered image in order to compensate for my decomposition filter making the image brighter, this is what I will have to do:
1. Decompose into subbands
2. Apply intensity scaling to approximation subband
3. Filter one of the subbands
4. Apply inverse intensity scaling to approximation subband
5. Recompose subbands into original image
Step 2 performs the scaling. This is what @Benjamin is suggesting. The problem is that then step 4 becomes necessary, or the original image will not be properly reconstructed. This longer method work. However, the textbook explicitly says that . Of course, it's possible that the textbook is wrong. However, what's more possible is I'm misunderstanding something about the way this all works -- this is why I'm asking this question.
I wrote to the author of the book for a confirmation. He said that you have to perform the scaling, despite of what is being said in the book.
| Subband decomposition using Daubechies filter | CC BY-SA 3.0 | null | 2011-03-14T08:58:47.287 | 2017-11-29T14:16:46.050 | 2011-07-08T08:18:10.013 | 356,020 | 356,020 | [
"image-processing",
"wavelet"
]
|
5,296,533 | 1 | null | null | 3 | 1,136 | I am thinking of using a Java web application to create a customised website,
1. so a user can specify the background image, css, etc
2. user can specify other options
2. and at the end of the process, the user can download the WAR file, ready to be deployed wherever they wish.
So, what is the easiest way to programmatically create a Java web application to be deployed into Tomcat ?
Is there a framework that I can use or should I start from scratch ?
The following screenshots are taken from ArcGIS Server 10, where a user can create a new web application on the fly.



| Creating Java Web Application programmatically | CC BY-SA 2.5 | 0 | 2011-03-14T09:00:59.013 | 2011-04-15T06:53:09.127 | 2011-03-14T09:57:11.797 | 115,988 | 115,988 | [
"java",
"web-applications",
"tomcat"
]
|
5,296,572 | 1 | 5,297,559 | null | 8 | 1,889 | Right now I use the following code to create a uniform distribution of integers with a range. (I took out the seeding code)
```
int random(int min, int max)
{
static std::mt19937 gen;
std::uniform_int<int> dist(min, max);
return dist(gen);
}
```
I am trying to modify it to give a distribution that favors twords the min value, and almost never produces nears the max value. I can see all of the pre-made distributions, but none of them are integer. And also I can't tell which one fits my needs based on any of the documentation. The closest I have come is the chi squared distribution as shown on wikipedia, where k=2

But I can't figure out, based on the [documentation](http://msdn.microsoft.com/en-us/library/ff926121.aspx) how to use it with integers, let alone set the k value.
How can I set up my function to use an appropriate non-uniform, integer distribution?
---
still working on choosing the correct distro: here are the results of `std::poisson_distribution<int> dist((max - min) * .1);` from 0 to 20:

not quite there yet, as 0 should be more frequent than 1, but it should help the next person out, will post more results as they come.
---
well my final solution became a combination of methods:
```
int randomDist(int min, int max)
{
static std::mt19937 gen;
std::chi_squared_distribution<double> dist(2);
int x;
do
{
x = (int)(max*dist(gen)/10) + min;
}
while (x > max);
return x;
}
```
giving the result of:

| creating a non-uniform, integer distribution using tr1 <random> | CC BY-SA 2.5 | 0 | 2011-03-14T09:05:03.787 | 2011-03-14T23:53:31.747 | 2011-03-14T23:53:31.747 | 625,444 | 625,444 | [
"c++",
"random",
"distribution"
]
|
5,297,154 | 1 | 5,297,257 | null | 0 | 835 | 
I want to create an UI as shown in the figure, not exactly, though, but similar. How can I implement this?
| How can I implement this UI in Android | CC BY-SA 2.5 | 0 | 2011-03-14T10:06:07.687 | 2012-01-10T22:51:24.783 | 2011-03-14T10:16:44.230 | 40,342 | 596,364 | [
"java",
"android",
"uiview"
]
|
5,297,152 | 1 | 5,297,565 | null | 10 | 7,699 | does one usually put aggregating associations between interfaces?
Example:

Here, I feel that one aggregation is redundant. The one between the interfaces is more important, because that's what the clients of the classes will be using. BMW and LuxuryWheel will always be used through ICar and IWheel. However, ICar does not really aggregate IWheel, as it is an interface and contains no actual logic. BMW does clearly aggregate LuxuryWheel but that is almost an implementation detail.
How would you model this? Is there a way in UML to mark an aggregation (or association) as abstract, or to-be-implemented?
| Interface Aggregation in UML Class Diagrams | CC BY-SA 2.5 | 0 | 2011-03-14T10:05:39.997 | 2011-03-14T10:49:28.927 | null | null | 86,891 | [
"uml",
"modeling",
"aggregation"
]
|
5,297,392 | 1 | 5,297,439 | null | 0 | 933 | I am using JSON framework (SBJson) for my applicaition.
parsing the value by
```
NSDictionary *results = [responseString JSONValue] ;
```
For parsing first time in controller with this code has no problem. when i call again for same controller it shows thousands of memory leaks.
I went through many forums but in vain. can anybody please tell me what i went wrong?
Full Code:
```
NSString *response = [[NSString alloc] initWithData:webData encoding:NSUTF8StringEncoding];
//NSDictionary *results =[[response JSONValue] retain] ;
if (results) {
[results release];
results=nil;
}
results =[[response JSONValue] retain] ;
[response release];
```
Thanks in advance
Regards,
Sathish

| Thousands of memory leaks when using sbjson framework on repeated usage | CC BY-SA 2.5 | 0 | 2011-03-14T10:33:19.723 | 2011-03-14T11:42:15.457 | 2011-03-14T11:42:15.457 | 384,150 | 384,150 | [
"memory",
"ios4",
"json-framework"
]
|
5,297,716 | 1 | null | null | 1 | 430 | I want to add a task of my application in the android native menu.
Suppose if my app is for creating notes I want to provide a "add new note"
menu item here in the default menu of android.
Is it possible to do so. If yes then how?

| Can we add some menu item to the Android's native Menu | CC BY-SA 3.0 | 0 | 2011-03-14T11:04:49.953 | 2013-11-04T06:32:24.117 | 2013-11-04T06:32:24.117 | 881,229 | 395,661 | [
"android"
]
|
5,297,755 | 1 | 5,309,748 | null | 0 | 658 | I am not sure of which represents model,view and controller. If i take an example of a tablecontroller based app can i say tableview (xib) is the view and the model(some other .m file with data for this tablecell) ? and the controller is the .m file ?
I took this image from this apple's [link](http://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html#//apple_ref/doc/uid/TP40002974-CH6-SW22)

| in mvc design pattern who represents model,view, controller? | CC BY-SA 2.5 | null | 2011-03-14T11:08:54.243 | 2011-03-15T09:27:18.303 | null | null | 154,352 | [
"iphone",
"objective-c",
"model-view-controller"
]
|
5,297,783 | 1 | 5,305,946 | null | 0 | 723 | I am using the LinkedIn iOS SDK using oAuth in my IPhone application.
Its integarted successfully but After login it goes to Success Authrized Screen as in images


I have 2 issue
- -
| Linkedin Successfull Authrized Interface on Iphone | CC BY-SA 2.5 | 0 | 2011-03-14T11:11:56.650 | 2011-03-31T15:48:34.027 | 2011-03-14T12:28:34.133 | 488,506 | 488,506 | [
"api",
"iphone-sdk-3.0",
"linkedin"
]
|
5,298,024 | 1 | 5,298,325 | null | 3 | 14,958 | I can create a "confirm box" in Ext JS like this:

with this code:
```
...
listeners: {
'afterrender' : function(p) {
p.header.on('click', function(e, h) {
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to EDIT this?', function(btn) {
var button_answer = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'you clicked the ' + btn + ' button for EDIT',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, button_answer, true);
});
}, p, {
delegate: '.panel_header_icon2',
stopEvent: true
});
},
...
```
, e.g. how can I put this code inside a popup with dimmed background?
```
new Ext.FormPanel({
frame:true,
labelWidth: 90,
labelAlign: 'right',
title: 'Orderer Information',
bodyStyle:'padding:5px 5px 0',
width: 300,
height: 600,
autoScroll: true,
itemCls: 'form_row',
defaultType: 'displayfield',
items: [{
fieldLabel: 'Customer Type',
name: 'customerType',
allowBlank:false,
value: 'Company'
},{
fieldLabel: 'Company',
name: 'company',
value: 'The Ordering Company Inc.'
},{
fieldLabel: 'Last Name',
name: 'lastName',
value: 'Smith'
}]
});
```
| How to display a Ext.FormPanel in a popup in Ext JS? | CC BY-SA 2.5 | null | 2011-03-14T11:37:09.603 | 2020-12-30T22:16:28.263 | null | null | 4,639 | [
"javascript",
"extjs",
"popup"
]
|
5,298,042 | 1 | 5,298,081 | null | 1 | 388 | I am trying to create a search bar for my forms.
I have an area which is 792px and I usually put a series of labels and fields I use for search purposes. Usually I put each element in a `<div>` and set the style of it to `float:left` and define the width of it. I've never really liked it but, since I am not an expert with CSS, I've learned to accept it.
Now I need to add a few more fields than usual and I would like an element to go on the second line (Label4 and it's field) but I am having troubles doing that.
What is the best, simplest solution to implement something like this considering that I would like to avoid using tables?

| css and alignment for a search bar with multiple fields | CC BY-SA 2.5 | 0 | 2011-03-14T11:38:41.650 | 2011-03-14T11:58:26.213 | 2011-03-14T11:58:06.337 | 20,578 | 219,406 | [
"html",
"css"
]
|
5,298,152 | 1 | 5,351,535 | null | 4 | 23,803 | I'm configuring a jenkins to build my XCode project on MacOS 10.6.6. For this purpose i have installed latest tomcat container and latest jenkins as ROOT.war. All works fine except adding subversion integration :(. After creating a new project in jenkins i selected "subversion" in "Source Code Management" and entered my repository URL same way i use in command-line subversion tool:
```
https://svn.mydomain.local/main/project/trunk
```
Unfortunately, it is not working with a strange error "authentication cancelled":

The 'details' log looks like this:
```
Unable to access https://svn.mydomain.local/main/project/trunk : svn: authentication cancelled
org.tmatesoft.svn.core.SVNCancelException: svn: authentication cancelled
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:37)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:32)
at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getNextAuthentication(DefaultSVNAuthenticationManager.java:257)
at hudson.scm.FilterSVNAuthenticationManager.getNextAuthentication(FilterSVNAuthenticationManager.java:39)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:552)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:275)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:263)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:516)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:98)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1001)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.testConnection(DAVRepository.java:97)
at hudson.scm.SubversionSCM$DescriptorImpl.checkRepositoryPath(SubversionSCM.java:1842)
```
The most strange thing: if i click "enter credentials" and enter my login and password, Jenkins reports back "Authentication was successful. Information is stored in Hudson now." but it's still red "unable to access" and checkout error on build :(.
Command-line `svn co` works fine for both user and root accounts with all credentials cached. Maybe anyone who has a hudson on macos experience can drop a few hints what to do?
| How to correctly configure SVN for hudson (jenkins) continous integration system? | CC BY-SA 2.5 | 0 | 2011-03-14T11:50:16.197 | 2012-12-10T18:14:21.253 | 2011-09-28T13:09:58.970 | 104,219 | 69,882 | [
"macos",
"hudson",
"jenkins"
]
|
5,298,230 | 1 | 5,298,753 | null | 2 | 3,415 | i cannot retrieve the new identity value from an inserted record(via DataAdapter.Update) in my DataRow.
I'm using a strong typed Dataset as DAL. The table i want to update is joinded with other tables in the SelectCommand, hence the designer cannot automatically generate the insert-/update-/delete-commands and also it cannot "Refresh the DataTable" automatically(s. [http://msdn.microsoft.com/de-de/library/dex7k4dw%28v=VS.100%29.aspx](http://msdn.microsoft.com/de-de/library/dex7k4dw%28v=VS.100%29.aspx)).
I've tried to set AutoIncrement=true/false on the primary-key's DataColumn but the result is the same: last MAX-ID+1 instead of the actual ID the database generated(SQL-Server 2005 EP; pk datatype:int, Is identity:yes, Identity Increment:1).
This will be the wrong value f.e if another instance of the application inserted a record that the first instance yet not knows and therefore generates an ID that already exists.
To retrieve the new identity from db i've appended following to my insert-command's CommandText:
```
;SELECT CAST (SCOPE_IDENTITY() AS int) AS newIdRMA
```
Also i've tried to add an Output-Parameter to it's parameter-collection:

This is part of my code that updates the database and sets the new ID(that doesn't work):
```
Me.dsRMA.RMA.AddRMARow(newRMA) ' adding new row to the (strong typed) DataTable '
numRowsUpdated = daRMA.Update(Me.dsRMA.RMA) ' update via DataAdapter and insert the new record in DB '
DirectCast(Page, Services).IdRma = newRMA.IdRMA ' this is not the actual value from DB but old Max-ID +1 '
```
Edit:
this is a screenshot of my TableAdapter's InsertCommand and it's parameter-collection:

Thanks in advance.
| Retrieve identity value from inserted record's primary key | CC BY-SA 2.5 | null | 2011-03-14T11:58:00.227 | 2011-03-14T14:35:59.677 | 2011-03-14T14:35:59.677 | 284,240 | 284,240 | [
".net",
"asp.net",
"sql-server",
"ado.net",
"strongly-typed-dataset"
]
|
5,298,337 | 1 | 5,298,937 | null | 2 | 1,672 | i am plotting the attached graph using following script and data set:
```
set term postscript enhanced color solid
set output "speedup_v1.ps"
set title "Speedup"
set key left top
set yrange[0:128]
set xtics (0,1,2,4,8,16,32,64,128)
set xlabel 'Processes'
set ylabel 'Speedup'
plot 'speedup_v1.dat' using 1:2 title "Speedup" with linespoints, \
'speedup_v1.dat' using 1:3 title "Speedup (linear)" with linespoints
0 0 0
1 1 1
2 1,692 2
4 3,675 4
8 7,739 8
16 9,840 16
32 18,61 32
64 42,77 64
128 82,43 128
```
I would like to remain the graph like it is right now but the data points on the x axis should have the same distance between each other. Right now `64p -> 128p` eats up half of the screen, i want it to be `1/8`. Thanks in advance!

| gnuplot move data point on x axis | CC BY-SA 2.5 | null | 2011-03-14T12:07:35.433 | 2011-03-14T21:35:13.430 | null | null | 477,872 | [
"gnuplot"
]
|
5,298,348 | 1 | 5,298,534 | null | 0 | 223 | I'm working on my website and I can't seem to figure out why it's doing what it is doing. The issue is that the text in the content area is stretching beyond the wrapper. I'm sure it's a very simple mistake that I'm overlooking and I'm hoping some fresh eyes can spot my mistake. I highlighted in the image where it overflows. Thanks! Garrett
Site: [http://thinkgarrett.com/hello/index.php](http://thinkgarrett.com/hello/index.php)
Here's a screenshot:

| Content is stretching beyond the wrapper's boundaries... (HTML/CSS) | CC BY-SA 2.5 | null | 2011-03-14T12:08:13.267 | 2011-12-11T10:15:26.617 | 2011-03-14T12:18:10.493 | 287,047 | 658,739 | [
"html",
"css"
]
|
5,299,027 | 1 | 5,299,140 | null | 1 | 9,850 | I have this code:
```
<div style="background-image: url('images/middle.png'); height: 390px; width: 900px; margin-top:190px; color:#000000;">
</div>
```
which produces this:

But when i put text in the div, no matter how much margins or anything i put on it does this:

But i want the text be on the white image.
Any ideas?
| Getting my text to go over the background image | CC BY-SA 2.5 | null | 2011-03-14T13:14:09.830 | 2014-07-14T07:25:27.333 | 2011-03-14T13:15:15.460 | 34,397 | 383,691 | [
"html",
"css"
]
|
5,299,260 | 1 | null | null | 2 | 5,035 | Ok Folks I decided to try this developer thing, and after about a dozen tutorials, ended up with the following Hello World type program:
```
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);}
}
```
Simple enough, So I go to compile it and I get this
> [2011-03-14 00:11:25 - HelloAndroid] Android Launch![2011-03-14 00:11:25 - HelloAndroid] adb is running normally.[2011-03-14 00:11:25 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch[2011-03-14 00:11:25 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'[2011-03-14 00:11:25 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'[2011-03-14 00:11:30 - HelloAndroid] New emulator found: emulator-5554[2011-03-14 00:11:30 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
Or if I have the emulator already up, I get this
> [2011-03-14 08:23:09 - HelloAndroid] Android Launch![2011-03-14 08:23:09 - HelloAndroid] adb is running normally.[2011-03-14 08:23:09 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch[2011-03-14 08:23:09 - HelloAndroid] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'my_avd'[2011-03-14 08:23:09 - HelloAndroid] WARNING: Application does not specify an API level requirement![2011-03-14 08:23:09 - HelloAndroid] Device API version is 7 (Android 2.1-update1)[2011-03-14 08:23:09 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'[2011-03-14 08:23:09 - HelloAndroid] Installing HelloAndroid.apk...[2011-03-14 08:23:26 - HelloAndroid] Success![2011-03-14 08:23:27 - HelloAndroid] Starting activity com.example.helloandroid.HelloAndroid on device emulator-5554
And then the emulator comes up everytime with just this blank screen, with the text "android" on it. And it sits there for about 3 minutes until it goes to another blank black screen with "android" except its animated. I have looked around and can't seem to find anyone who has the same problem. Its like the emulator does not even recognize anything I am doing. Here is a nice screenshot of the blank nothingness:

So, any ideas what I did wrong?
| Android Emulator is not responding to program | CC BY-SA 3.0 | 0 | 2011-03-14T13:34:06.917 | 2014-02-21T08:50:50.813 | 2020-06-20T09:12:55.060 | -1 | 658,868 | [
"java",
"android",
"eclipse",
"android-emulator"
]
|
5,299,300 | 1 | null | null | 0 | 1,632 | I am having an SSL issue, but it only appears to be happening in Google Chrome.
I've checked with Firefox, Safari and Internet Explorer and there fine.
Does anyone know what is wrong? I've tried it on a BLANK page and Chrome still says there is an issue. Screenshot:

If anyone can help that would be much appreciated!
| SSL Issue only in Google Chrome | CC BY-SA 3.0 | null | 2011-03-14T13:37:49.363 | 2014-07-27T22:07:15.887 | 2014-07-27T22:07:15.887 | 2,732,991 | 658,876 | [
"iis",
"google-chrome",
"ssl",
"ssl-certificate"
]
|
5,299,452 | 1 | 5,300,896 | null | 7 | 11,288 | I need to combine three images the way I represent in attached file:

1) One image is background. It is 'solid' in sense it has no alpha channel.
2) Another one is sprite. Sprite lies upon background. Sprite may have its own alpha channel, background has to be visible in places where sprite is transparent.
3) There's a number of masks: I apply new mask to Sprite every frame. Mask isn't rectangular.
In other words, visible pixel =
pixel of background, if cropping mask corresponding color is white OR sprite is transparent;
pixel of sprite otherwise (for example, corresponding mask's pixel is black).
I'm working with cocos2d-iphone. Can I make such combination with cocos2d-iphone or with OpenGL ES 1.1? If any answer is YES, working code would be appreciated. If both answers is NO, is there another technology on iOS to make what I want (maybe Quartz2d or OpenGL ES 2.0) ?
Mask format is not obligatory black for Sprite and white for Background. I can make Mask of required format, such as transparency for Background and white for Sprite if needed.
P.S. There's another unanswered question of same kind:
[Possible to change the alpha value of certain pixels on iPhone?](https://stackoverflow.com/questions/787783/possible-to-change-the-alpha-value-of-certain-pixels-on-iphone)
| How can I crop an Image with mask and combine it with another image (background) on iPhone? (OpenGL ES 1.1 is preferred) | CC BY-SA 3.0 | 0 | 2011-03-14T13:50:00.667 | 2012-11-12T13:35:50.463 | 2017-05-23T10:32:45.030 | -1 | 612,705 | [
"iphone",
"objective-c",
"ios",
"opengl-es",
"cocos2d-iphone"
]
|
5,299,525 | 1 | 5,303,316 | null | 2 | 853 | I want the "blue" container to always be 70px high, while the previous "green" div always max out the height available when the div is resized with javascript.
I've played around with it for a while without finding a proper solution. Help will be appreciated.

| Nested divs with mixed height mode (% & px) Keep the '%' div fill out space not used by the 'px' div | CC BY-SA 2.5 | null | 2011-03-14T13:55:12.770 | 2011-03-14T19:17:35.940 | null | null | 358,788 | [
"html",
"css"
]
|
5,299,539 | 1 | 5,299,742 | null | 4 | 9,846 | 
I want to create a table view which looks like this image! Who can tell me an example or say how can I do this ?
| Grouped TableView | CC BY-SA 3.0 | 0 | 2011-03-14T13:56:35.393 | 2015-02-18T23:45:16.670 | 2012-10-31T09:25:56.240 | 1,173,513 | 612,606 | [
"iphone",
"slider",
"switch-statement",
"tableview"
]
|
5,299,733 | 1 | null | null | 0 | 424 | I have a UIToolbar in IB with a custom UIBarButtonItem that is set to an image. The image height is larger than the UIToolbar height. The image does not load for some reason. Attached is a screenshot.

| Unable to add oversized button in UIToolbar | CC BY-SA 2.5 | 0 | 2011-03-14T14:11:33.330 | 2011-03-14T14:16:51.063 | null | null | 19,875 | [
"iphone",
"objective-c",
"interface-builder",
"uibarbuttonitem",
"uitoolbar"
]
|
5,300,128 | 1 | 5,300,465 | null | 1 | 4,120 | I'm using facebook-android-sdk to post a message on facebook using the bundle shown below.
The message is displayed correctly, but the icon is not shown, and I can't find a way to get something like the image below.

Is this the correct way to set an icon?
How ca I add in the bundle something like "Get Spotify" as seen in the image?
Thanks.
```
Bundle params = new Bundle();
params.putString("message", "icon please");
params.putString("link", "http://www.digital-farm.org");
params.putString("name", "whip'em");
params.putString("description", "description");
params.putString("picture", "http://lib.store.yahoo.net/lib/yhst-17155638221985/img-twitter.gif"); //used for testing
params.putString("icon", "http://photos-c.ak.fbcdn.net/photos-ak-snc1/v27562/74/174829003346/app_2_174829003346_2760.gif"); //used for testing
mAsyncRunner = new AsyncFacebookRunner(mFacebook);
mAsyncRunner.request("me/feed", params, "POST", new PostRequestListener(), null);
```
| How to set an icon and add an action in a facebook post using facebook api? | CC BY-SA 2.5 | 0 | 2011-03-14T14:42:12.680 | 2011-03-14T15:07:56.190 | 2011-03-14T15:02:12.493 | 326,849 | 326,849 | [
"android",
"facebook",
"post",
"request"
]
|
5,300,411 | 1 | null | null | 11 | 1,545 | Are there any commercial or open source Java Swing widgets that implement a rule/predicate editor UI? As an example of what I'm looking for, this image shows Cocoa's (excellent) [NSPredicateEditor](http://developer.apple.com/library/mac/#documentation/cocoa/reference/NSPredicateEditor_class/Reference/NSPredicateEditor.html) UI for editing a predicate expression:

| Commercial or Open Source Java Swing rule/predicate editor widget? | CC BY-SA 2.5 | 0 | 2011-03-14T15:03:42.567 | 2012-06-19T14:31:53.970 | 2011-03-18T19:29:04.793 | 2,140 | 2,140 | [
"java",
"swing"
]
|
5,300,415 | 1 | 6,893,049 | null | 1 | 2,678 | I've got a basic ASP.NET Charting control set to a pie chart, using the "Bright Pastel" palette and I'd like to link the colours used in the chart to a gridview elsewhere on the page (which is effectively acting as a legend, but will have some more fields in too, once I've got this working).
I can't find anywhere in the control where it references the actual colours used in each section of the pie, all of the BackgroundColor properties are 0. I could manually assign the colours, but it'll really complicate things if I have to do that.
Screenshot if it helps visualise what I'm trying to do:

| Find colour assigned to point in ASP.NET pie chart when using Palettes | CC BY-SA 2.5 | 0 | 2011-03-14T15:03:57.857 | 2019-08-12T03:06:59.427 | 2017-02-08T14:31:46.307 | -1 | 90,587 | [
"asp.net",
"charts",
"asp.net-charts"
]
|
5,300,556 | 1 | 5,300,604 | null | 0 | 334 | i am using jRating plugin. Everything works fine, thing is... the images of the star does not appear despite the fact that my url to the images are correct and i have already tested with other similar image content that works well using the same conventional url such as "images/stars.png"
When i mouse over the url using firebug under style, the rest of my other contents' images appear but only the star.png will keep loading and does not appear.
anyone knows what is wrong? the image below is a sample of what i am referring to.

| jRating plugin stars do not load at all | CC BY-SA 2.5 | null | 2011-03-14T15:16:09.207 | 2011-03-14T15:20:07.737 | null | null | 494,505 | [
"jquery",
"rating"
]
|
5,300,544 | 1 | 5,302,635 | null | 1 | 2,389 | Can anyone tell me how I can get this little margin between the `tbar` and `FormPanel` to disappear? I want the toolbar to fit snug up on the form in which it appears.

Code:
```
var form_customer_contact = new Ext.FormPanel({
frame:true,
labelWidth: 90,
labelAlign: 'right',
title: 'Customer Contact',
bodyStyle:'padding:0',
width: 300,
height: 600,
autoScroll: true,
itemCls: 'form_row',
defaultType: 'displayfield',
tbar: [{
text: 'save',
iconCls: 'icon_green_check',
handler: function(){
window_wrapper.hide();
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'customer contact saved',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}, '-', {
text: 'send protocol to customer',
iconCls: 'icon_arrow_box_upper_right',
handler: function(){
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'protocol sent to customer',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}],
items: [{
fieldLabel: 'Customer Type',
name: 'customerType',
allowBlank:false,
value: 'Company'
},{
fieldLabel: 'Item 20',
name: 'item20',
value: 'test'
}, {
fieldLabel: 'Item 21',
name: 'item21',
value: 'test'
}, {
xtype: 'button',
text: '<span style="color:red">Cancel Order</span>',
anchor: '100%',
handler: function() {
var show_button_click_result = new Ext.Panel({
title: 'Invoice Address',
width: 290,
height: 200,
html: 'You cancelled the order.',
frame: true,
border: true,
header: true
});
replaceComponentContent(small_box_upper_left, show_button_click_result, true);
}
}
]
});
```
# Addendum
Thanks to @Johnathan the margin is out, here is the code that works and what it looks like:
```
#form_customer_information .x-panel-ml,
#form_customer_information .x-panel-mr,
#form_customer_information .x-panel-mc
{
padding:0px;
}
```

| How can I get the margin between an Ext JS Form and its toolbar to disappear? | CC BY-SA 2.5 | null | 2011-03-14T15:15:06.257 | 2011-03-16T07:56:16.087 | 2011-03-16T07:56:16.087 | 4,639 | 4,639 | [
"javascript",
"forms",
"extjs",
"tbar"
]
|
5,300,770 | 1 | 5,301,556 | null | 11 | 15,685 | How to check from .net code whether "" is enabled or not for an Excel application?
Manually I can check it from Excel application-

| How to check from .net code whether "Trust access to the VBA project object model" is enabled or not for an Excel application? | CC BY-SA 2.5 | 0 | 2011-03-14T15:33:47.730 | 2019-02-07T23:25:53.533 | null | null | 212,823 | [
"vba",
"excel",
"export-to-excel"
]
|
5,300,814 | 1 | 5,300,964 | null | 4 | 1,683 | I was wondering if Apple provides standard controls for the up/down arrow keys for the toolbar? All the other familiar buttons are present in Interface Builder, but not the arrow keys.

Is there a way to show them programmatically?
| How to display standard up/down controls in iOS toolbar | CC BY-SA 2.5 | 0 | 2011-03-14T15:36:29.060 | 2011-04-04T02:08:41.193 | 2011-04-04T02:08:41.193 | 560,496 | 560,496 | [
"cocoa-touch",
"ios",
"interface-builder"
]
|
5,300,888 | 1 | 5,301,814 | null | 4 | 9,062 | I am learning OpenGL and having a problem with gluPerspective. Here is the code I use in Init()
```
// Calculate The Aspect Ratio Of The Window
// The parameters are:
// (view angle, aspect ration of the width to the height,
// The closest distance to the camera before it clips,
// FOV, Ratio, The farthest distance before it stops drawing)
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000.0f);
```
My scene works right.. but as soon as I go a little bit away from my objects they dissapear (As the red balls in image). : 
[Web where I took graph from](http://www.lighthouse3d.com/opengl/viewfrustum/)
I understand that red balls are outside of view and won't be shown. So what I want is to increase the distance where it stops drawing. I tried increasing 3000.0f but is not working!.
```
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000000.0f);
```
So my question is :
Some pics about the problem:
[Pic1](http://i1188.photobucket.com/albums/z416/cad_vga/Attraction/Capt1.png)
[Pic2](http://i1188.photobucket.com/albums/z416/cad_vga/Attraction/Capt2.png)
| How can I increase distance (zfar/gluPerspective) where openGL stops drawing objects? | CC BY-SA 2.5 | 0 | 2011-03-14T15:41:57.993 | 2011-03-14T17:02:09.517 | 2011-03-14T16:59:21.003 | 90,608 | 90,608 | [
"opengl",
"glut",
"glu"
]
|
5,300,924 | 1 | 10,189,519 | null | 0 | 1,471 | This task doesn't seem too tough, but it has been blocking me for the last couple hours. I am doing a stacked bar chart, and I want the labels to be horizontally and vertically centered within each Bar Segment. The labels are set to be "inside". Such, you can easily center the label horizontally by setting label-align:middle, but there doesn't seem to be anything that can handle the vertical aspect.
Next approach was to create a custom component of the Bar Chart, but that go extremely messy when I was messing with the rendering functions. I thought it would be just modifying this line: `v.labelY=v.y + barSeries.seriesRenderData.renderedYOffset - barSeries.seriesRenderData.renderedHalfWidth;` but it hasn't worked.
Anyways, if anyone has any ideas how to do this, it would be greatly appreciated.
Attached is what the bar chart looks like now. And just to clarify, I would like these labels(manual in the picture) to be vertically centered.

| BarChart - Vertically Center Labels | CC BY-SA 2.5 | null | 2011-03-14T15:44:44.733 | 2012-04-17T10:42:38.710 | null | null | 527,235 | [
"apache-flex",
"bar-chart",
"flex-charting"
]
|
5,301,027 | 1 | null | null | 0 | 456 | i'm using uitextview for searching the contact details from address book. i.e., like uisearchbar search the contact details while text edit change in uitextview.

i'm using uitextview if i tap 'a', the list of the contacts from address book will be display in table view
please give me the solution
| how to search contact from address book using uitextview in iphone? | CC BY-SA 2.5 | null | 2011-03-14T15:52:18.313 | 2011-06-01T07:16:42.333 | 2011-03-14T17:10:55.737 | null | 2,224,519 | [
"iphone",
"uitextview",
"addressbook"
]
|
5,301,268 | 1 | 5,333,301 | null | 0 | 201 | I'm trying to disconnect a project from a subversion repository but the disconnect option is not showing up in the submenu. There are conflicts (from when I tried to do an earlier synchronization) but I don't care about resolving the conflicts. I just want to remove the local copy and re-update from the repository. Here's a screen shot of the folder in question (site) in eclipse:

| Disconnect menu option not showing up in subclipse | CC BY-SA 2.5 | null | 2011-03-14T16:12:01.090 | 2011-03-17T00:06:48.950 | null | null | 549,226 | [
"eclipse",
"svn",
"subclipse"
]
|
5,301,482 | 1 | 5,301,596 | null | 0 | 456 | I don't know the reason of the crash.
```
package com.tct.soundTouch;
//imports ();;;;;;;
public class Main extends Activity implements OnClickListener{
private MediaPlayer mp;
private MotionEvent event;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
final ImageButton zero = (ImageButton) this.findViewById(R.id.button);
zero.setOnClickListener(this);
mp = MediaPlayer.create(this, R.raw.sound);
}
public void onClick(View v) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
mp.setLooping(true);
mp.start();
break;
case MotionEvent.ACTION_UP:
mp.pause();
break;
}
}
}
```
the log

thanks
| Application crash on android | CC BY-SA 3.0 | null | 2011-03-14T16:31:05.370 | 2017-07-23T08:25:48.597 | 2017-07-23T08:25:48.597 | 1,033,581 | 564,979 | [
"java",
"android",
"button",
"crash",
"onclick"
]
|
5,301,559 | 1 | 5,775,771 | null | 3 | 2,968 | I recently upgraded to xcode 4. My application utilizes tabbarcontroller. In old xcode 3.x, you were able to change the tabs to different types per this screenshot:

From what I gather in researching this issue, xcode 4 no longer offers this functionality. Am I missing something? From what I researched we are now suppose to delete/add tabs then change attributes to get the desired effect. So, to that end in xcode 4, I've added a new tab item and made the class a UINavigationController fully expecting the ability to toggle the "Shows Navigation Bar" with a checkbox. But, the "Navigation Controller" grouping never appears. What am I missing?
Thanks for your help.
| has uitabbarcontroller changed in xcode 4 | CC BY-SA 2.5 | 0 | 2011-03-14T16:39:02.033 | 2011-07-11T02:13:13.827 | null | null | 418,549 | [
"uitabbarcontroller",
"xcode4"
]
|
5,301,849 | 1 | 5,302,042 | null | 1 | 3,691 | i am using jquery star rating [plugin](http://www.wbotelhos.com/raty/). I have a very problem: i ask for 5 stars - the html page would display 10 stars (apparently they repeat themselves)
i use the following scripts:
```
$('#rating').raty({
readOnly: true,
// number: 5,
start: 0
});
```
and i went through the javascript, the default is also set to 5. Hence whether or not i set it to five it will automatically be five. But, on the html page: the number of stars are 10 to my surprise.
image from my fire bug: in this case, i ask for 4 stars, turnout to have 8 stars.

is this bug from the plugin itself or has to do with my codes?
| jquery star rating - raty plugin bug | CC BY-SA 2.5 | null | 2011-03-14T17:05:17.173 | 2014-05-08T07:35:08.097 | 2011-03-14T17:15:55.660 | 494,505 | 494,505 | [
"jquery",
"rating"
]
|
5,301,872 | 1 | 5,302,130 | null | 1 | 165 | For same strange reason icons in different groups of my listview appear on top of one another... any ideas what might be causing it?

Thanks!
edit:
no, originally the view was set to SmallIcons. When I try setting it to Details, it looks perfect, only the names get cut short. :)

| C#, ListView icons appear one on another | CC BY-SA 2.5 | null | 2011-03-14T17:06:43.413 | 2011-03-14T17:38:45.347 | 2011-03-14T17:38:45.347 | 651,418 | 651,418 | [
"c#"
]
|
5,301,957 | 1 | 5,302,210 | null | 2 | 1,381 | Is there a simple way to automatically position the overlapping nested dialog like this (suppose the blue dialog is created first, then the red one, then the yellow one), each time the dialog is created:

| JQuery: nested dialogs positioning | CC BY-SA 2.5 | 0 | 2011-03-14T17:13:02.763 | 2011-03-14T17:39:16.670 | 2011-03-14T17:18:23.690 | 139,010 | 602,289 | [
"jquery",
"dialog"
]
|
5,301,976 | 1 | 5,302,986 | null | 1 | 1,503 | I have `Gridview` like this.

Here is my last column `Gridview` code;
```
<EditItemTemplate>
<asp:TextBox ID="txtTNOT" runat="server" Height="35" TextMode="MultiLine" DataSourceID="SqlDataSource8"></asp:TextBox>
<asp:SqlDataSource ID="SqlDataSource8" runat="server"
ConnectionString="<%$ ConnectionStrings:SqlServerCstr %>"
SelectCommand="SELECT [T_NOT] FROM [TAKIP] WHERE T_HESAP_NO = @T_HESAP_NO ">
<SelectParameters>
<asp:Parameter Name="T_HESAP_NO" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</EditItemTemplate>
```
My last column has a Textbox.
When i import to excel with this code;
```
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=TahTakip.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
GridView1.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
}
```
Still i have a `Textbox` in my `Excel` file.

How can i delete `Textbox` [NOT VALUE INSIDE COLUMN] when i exporting to `Excel`?
| Textbox in Excel | CC BY-SA 2.5 | 0 | 2011-03-14T17:14:53.827 | 2011-03-14T18:48:18.763 | null | null | 447,156 | [
"c#",
"asp.net",
"excel",
"gridview"
]
|
5,302,022 | 1 | 5,302,236 | null | 1 | 1,496 | I have a screen attached here and I need to know how I can convert the list to a list of Longs?
```
var x = SchedulerMatrixStorage.Resources.Items.Select(col => col.Id);
```
Where, Id is of type `Object`

| Convert this var to a list of longs? | CC BY-SA 2.5 | null | 2011-03-14T17:18:30.020 | 2011-03-15T08:52:01.427 | null | null | 481,656 | [
"c#",
"winforms",
"linq-to-sql",
".net-4.0"
]
|
5,302,041 | 1 | 5,353,153 | null | 5 | 3,671 | I have a homework in MATLAB. I must use 3 image processing techniques. So I should make a task and then solve it using 3 techniques(for example, thresholding, segmentation, morphology, restoration, histogram equalization, noise remove...). I need some idea and how to solve it, will you help me? :)
Thank you.
-
I have found this in some book....Do you have any idea? Is it possible to restore picture to picture ?
: Some solution is indicated below.But to tell the truth I didn't understand :( Can you explain it to me?

| Digital image processing with MATLAB using 3 techniques | CC BY-SA 2.5 | 0 | 2011-03-14T17:20:13.613 | 2011-04-10T23:07:44.993 | 2011-03-17T10:01:46.247 | 445,540 | 445,540 | [
"algorithm",
"image",
"matlab",
"image-processing"
]
|
5,302,230 | 1 | null | null | 2 | 2,608 | I'm trying to provision a .xsl file with custom styles to be applied to a `Content Query Web Part` in SP 2007 MOSS. I want to deploy it in a feature.
So far any attempt has failed as I cannot retrieve my .xsl in the Style Library.
```
<!-- Feature.xml -->
<ElementManifests>
<ElementManifest Location="Elements.xml" />
<ElementFile Location="Test.xsl" />
</ElementManifests>
<!-- Elements.xml -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Test" Url="Style Library/XSL Style Sheets" Path="" RootWebOnly="FALSE">
<File Url="Test.xsl" Type="GhostableInLibrary"/>
</Module>
</Elements>
```
My solution structure:

There are no errors in the log files. For what I've seen on the web, this should work but it doesn't.
| Sharepoint - Provisioning xsl Style Files | CC BY-SA 2.5 | null | 2011-03-14T17:41:10.873 | 2011-03-15T20:01:19.350 | null | null | 42,636 | [
"sharepoint"
]
|
5,302,263 | 1 | 5,380,361 | null | 3 | 4,134 | We are seeing the following error when trying to perform a command-line `svn merge` with Subversion 1.6.9 under 32 bit Windows XP.
> Out of memory - terminating application.This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Inspecting Windows task manager around this time reveals the following memory usage

The peak memory usage of the `svn.exe` process is in excess of 1.8GB.
As an aside, we get the same result when trying to perform the merge using TortoiseSVN.
We are trying to perform the merge from the root level of our repository. The total file size (on a developer machine) of the repository is around 3GB.
This is the first time that we are attempting a root-level merge. Are we hitting an internal svn limit?
## Edit
After some trial-and-error investigation I've found that this problem seems to be caused by one specific folder in our repository. This folder contains 1,500 SQL scripts. Performing a merge on just this folder results in the same out of memory error (although it takes longer to blow up).
| "out of memory - terminating application" error when performing an svn merge | CC BY-SA 2.5 | null | 2011-03-14T17:44:24.877 | 2011-03-21T16:11:02.240 | 2011-03-21T09:20:02.040 | 39,709 | 39,709 | [
"windows",
"svn"
]
|
5,302,282 | 1 | null | null | 1 | 736 | I use the NetBeans profiler (which is actually an embedded VisualVM) to monitor the memory consumption of my Java applications. I use the view, the view, and to track memory leaks.
The heap view shows the total of used memory, but it's a bit chaotic, due to the way the garbage collector manages the memory. The graph is essentially sawtooth-shaped, and thus not particularly readable. Sometimes, I force the GC to happen, so that I can have a more precise value of the real memory consumption.
I was wondering : is there a garbage collector which is more appropriate for memory profiling, and which would yield a heap graph closer to the real memory usage ? Or more generally, what JVM settings (`-XX` options or other) can I use in order to efficiently track memory leaks ?

| Which GC to use when profiling memory? | CC BY-SA 2.5 | 0 | 2011-03-14T17:45:49.400 | 2011-03-14T17:50:20.243 | null | null | 112,053 | [
"java",
"memory-leaks",
"garbage-collection",
"profiling",
"visualvm"
]
|
5,302,325 | 1 | 5,302,569 | null | 0 | 2,320 | I've imported an image asset (Background.jpg) to my Flash CS5 library and exported it to ActionScript as class Bitmap with a base type of BitmapData.
the following code returns the following error:
```
backgroundTexture = new Shape();
backgroundTexture.graphics.beginBitmapFill(Background);
backgroundTexture.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
backgroundTexture.graphics.endFill();
```
> 1067: Implicit coercion of a value of
type Class to an unrelated type
flash.display:BitmapData.

so what's the error?
| ActionScript - BeginBitmapFill With BitmapData Library Asset? | CC BY-SA 3.0 | null | 2011-03-14T17:49:47.307 | 2016-01-16T23:25:56.983 | 2016-01-16T23:25:56.983 | 4,370,109 | 336,929 | [
"actionscript-3",
"flash",
"bitmap",
"assets"
]
|
5,302,411 | 1 | 5,302,666 | null | 0 | 325 | I recently received an e-mail saying my site looked weird in Chrome. Usually, this is due to people having their text zoom on the browser set to something other than 100%. I checked with the person to see if that was the case, and it was not. Here is the screen shot they sent me of this URL:
[Visual Trace Route Site](http://www.yougetsignal.com/tools/visual-tracert/)

And here is what I see:

They say they are running Chrome on Win 7 x64, and I am running the same. How do I go about troubleshooting this? They don't have any non-standard plug-ins installed.
| Troubleshooting Site Displaying Differently in the Same Browser and OS on Different Computers | CC BY-SA 2.5 | null | 2011-03-14T17:56:27.600 | 2012-04-09T17:26:08.687 | 2012-04-09T17:26:08.687 | 106,224 | 102,635 | [
"css",
"google-chrome"
]
|
5,302,544 | 1 | null | null | 7 | 2,600 | I have the next process:
```
- draw background
- draw objects and blend with background (1)GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA
- draw particle effect with blending (2)GL10.GL_SRC_ALPHA, GL10.GL_ONE in order to highlight overlapping particles
```
Problem - when I draw particle they are additionally blended with background and becomes very bright.
Simply what I need is to blend particles with (2) and than all together to blend with background using (1).
Not working solutions:
- -
Here is screen to show the difference. On the right desired result, on the left particles are blended with background.
img:

I will appreciate any help...
I was able to get the color I want...but... (Seems this way will move me nowhere)
I have rendered background with alpha = 0 and than use blend Function from GL11Ext:
glBlendFuncSeparate(GL10.GL_SRC_ALPHA, GL10.GL_DST_ALPHA, GL10.GL_ONE, GL10.GL_ONE);
GL10.GL_SRC_ALPHA, GL10.GL_DST_ALPHA - the colors are blended only if they have alpha(bg dont have now)
GL10.GL_ONE, GL10.GL_ONE - alpha is set to maximum for all written particles to simulate additive blending

It works fine as you can see...except the black color filling area where particles image has alpha 0..and whats bad that in result image that black color has alpha 1 so I can not replace it in any way...
General problem in simple words: I need to draw a red(0xff0000) glowing(additive blending) effect. On black background it is ok, but if I would take green(0x00ff00) than the result color would be close to 0xffff00
Any ideas?
| OpenglES blending particles but not background | CC BY-SA 2.5 | 0 | 2011-03-14T18:08:10.227 | 2011-03-25T15:34:57.343 | 2011-03-18T13:48:55.850 | 659,301 | 659,301 | [
"android",
"opengl-es",
"blending"
]
|
5,302,567 | 1 | 5,309,131 | null | 2 | 831 | I'm trying to create a custom component looking like a rectangle radio dial:

As a base I'm taking the custom [ScrollableImageField.java](http://supportforums.blackberry.com/t5/Java-Development/Create-a-scrollable-image-field/ta-p/444955) component and passing it an image from project resources in my Screen:
```
_dial = new FMRadioDial(EncodedImage.getEncodedImageResource("big_dial.png"));
_dial = new FMRadioDial(bmp);
add(_dial);
```
This works well and I can scroll an image by the optical touch pad and also by swiping the Torch screen.
Then I'm trying to generate a white rectangle image myself:
```
Bitmap bmp = new Bitmap(Display.getWidth()*4, Display.getHeight()/2);
_dial = new FMRadioDial(bmp);
add(_dial);
```
this compiles, but I get a black image.
So my question is: how to generate an image (should I use Bitmap or maybe EncodedImage here?) from the code and how can I paint a white rectangle, a gradient and some text into it?
Thank you!
Alex
| BlackBerry 6: creating white rectangle image with text and gradient | CC BY-SA 2.5 | null | 2011-03-14T18:10:03.260 | 2011-03-15T08:27:01.680 | null | null | 165,071 | [
"image",
"blackberry",
"bitmap",
"paint"
]
|
5,302,611 | 1 | 9,959,301 | null | 16 | 8,583 | Based on the data model below

And based on user input I create a NSSet of managedObjects of entity Tag called .
---
## My problem:
```
[NSPredicate predicateWithFormat:@"ANY entryTags IN %@", selectedTags];
```
... this will return Entry with at least one entryTag that is in the selectedTags set.
I want something along the lines of:
```
[NSPredicate predicateWithFormat:@"ALL entryTags IN %@", selectedTags];
```
... notice the only change is the "ANY" to "ALL". This illustrates what I want, but does not work.
To formulate the outcome I expect:
I'm looking for a solution that will return only Entries who's entryTags are all in the selectedTags list (but at the same time, if possible, not necessarily the other way around).
To further illustrate:
(tag)Mom
(tag)Dad
(tag)Gifts
(entry)she is a she.....(tag)mom
(entry)he is a he........(tag)dad
(entry)gifts for mom...(tags:)mom, gifts
(entry)gifts for dad.....(tags:)dad, gifts
If selectedTags contains "mom" and "gifts", then the entry "gifts for dad" will show up, since it has the tag "gifts". I'd rather have it not show :)
| How to use the "ALL" aggregate operation in a NSPredicate to filter a CoreData-based collection | CC BY-SA 3.0 | 0 | 2011-03-14T18:15:16.897 | 2013-11-24T19:37:04.017 | 2011-10-16T01:58:54.947 | 3,847 | 659,310 | [
"objective-c",
"ios",
"core-data",
"nspredicate"
]
|
5,302,618 | 1 | null | null | 2 | 597 | I'm having a strange problem while debugging my Blackberry Application on a real device (BB Bold 9700). When I debug the same application within the BB emulator, the app runs fine, but when I run it on the real device, the app behaves differently (). What's even worse is that my Eclipse environment seems to be unable to view live objects correctly while being at a break point (debug time).
I've added a screenshot to illustrate the strange behaviour:

As you can see, the app stops at the breakpoint within the IF statement, but the Variables pane says that the variable "methodName" equals null. Moreover, when I want to look at the variable "methodArguments" which is of type , it says "".
Does anyone know what's going on here? My app works great on the emulator, but it's currently useless on the real device.
Thanks in advance!
| Eclipse - Blackberry SDK - Debugging on device: "details unavailable - not supported by VM" | CC BY-SA 2.5 | null | 2011-03-14T18:15:35.863 | 2011-11-24T09:21:53.053 | null | null | 591,217 | [
"eclipse",
"json",
"debugging",
"blackberry"
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.