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,555,100 | 1 | 5,556,321 | null | 0 | 152 |
I am having a problem with BorderBrush and Background. They both are set to the same gradient but as border starts higher, they don't match. How do I make it match? These are 5 buttons in the image:

Edited: I need border for rounded corners. It's not in the picture but I need 'em.
|
BorderBrush and Background not match
|
CC BY-SA 2.5
| null |
2011-04-05T16:22:15.767
|
2011-04-05T18:01:46.327
|
2011-04-05T17:27:49.043
| 553,941 | 553,941 |
[
"c#",
"visual-studio-2010",
"background",
"gradient",
"brush"
] |
5,555,136 | 1 | 5,561,198 | null | 1 | 1,402 |
I am trying to create a tab-control that have the tab-buttons aligned from right-to-left, in Win32/c++. The WS_EX_LAYOUTRTL flag doesn't help me, as it mirrors the drawing completely both for the tab items and the tab page contents. The application itself handles the mirroring automatically (it's a cross platform UI solution), which is also a reason for us not to use WS_EX_LAYOUTRTL flag (we have mirroring implemented in a generic way for all UI frameworks/platforms).
One solution would be to override TCM_GETITEMRECT and TCM_HITTEST in the subclassed TabCtrls window procedure. This enables me to move the buttons allright, but the mouse events still acts on the positions that the control "knows" the buttons really are at (ie. mouseover on the first button invalidates the leftmost button - the coordinates are not mirrored).
So that seems to be a dead end for me.
Another possibility would be to insert padding before the first tab button, to push them all to the right edge. I haven't been able to figure out how to do that, though. Visual Studio sports this little dialog:

How did they put the buttons in front of the first tab page? Knowing this would enable me to solve this problem.
The solution to my problem is to use the built-in RTL support. For this to work, the tab control must have both the flags. That will preserve the function of all existing drawing code while only the TabCtrl buttons are mirrored. I didn't realize that the ES_EX_NOINHERITLAYOUT flag goes on the parent (the TabCtrl), which is why I was looking for the workaround originally described.
|
Right-aligned tab items in Win32 tab control
|
CC BY-SA 2.5
| 0 |
2011-04-05T16:24:51.580
|
2011-04-06T09:52:35.060
|
2011-04-06T09:52:35.060
| 16,909 | 16,909 |
[
"c++",
"winapi",
"tabcontrol"
] |
5,555,400 | 1 | null | null | 1 | 710 |
is it possible to declare an NSArray withobjects of view controllers?
I'm trying to use two buttons to call an array that will loop through and count through 20 different views.
Right now, my array works in calling and displaying multiple images in a single view application.
what would i do to create an nsarray of view controllers, so that every time the "next" action method is called, a new view is loaded, and essentially, counted through the array?
This is currently what I have listed in my array
-(IBAction)getNextView {
```
imageArray=[[NSArray arrayWithObjects:
[firstViewController.view],
[secondViewController.view],
[thirdViewController.view];
```
}
But I think i am missing a valid point of updating the mainview with the elements in the array...
Thanks!
UPDATE :
This is what I am trying to achieve...

|
ipad NSArray of ViewControllers
|
CC BY-SA 3.0
| null |
2011-04-05T16:46:32.907
|
2012-05-31T03:10:52.963
|
2012-05-31T03:10:52.963
| 807,400 | 693,376 |
[
"ipad",
"view",
"controller",
"nsarray"
] |
5,555,444 | 1 | 5,556,091 | null | 3 | 1,346 |
The final code that worked for me was:
```
<canvas id="bg-admin-canvas" width="500" height="500" style="margin:15px; background:#09F;"></canvas>
<script>
var postit = function(width,height,angle){
var canvas = document.getElementById("bg-admin-canvas");
var ctx = canvas.getContext("2d");
var radians = angle * Math.PI / 180;
var move = width*Math.sin(radians);
if(angle < 0 ){ ctx.translate(0,-move); }else{ ctx.translate(move,0); }
ctx.rotate(radians);
var gradient = ctx.createLinearGradient(0,height,width/2,height/2);
gradient.addColorStop(0.05,"rgba(0,0,0,0)");
gradient.addColorStop(0.5,"rgba(0,0,0,0.3)");
ctx.fillStyle = gradient;
ctx.fillRect(0,0,width,height);
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(width, 0);
ctx.lineTo(width,height);
ctx.lineTo(width-width*.8,height-height*.02);
ctx.quadraticCurveTo(0+width*.02,height-height*.02,0+width*.02,(height - height*.2));
ctx.closePath();
var gradient = ctx.createLinearGradient(0,height,width/2,height/2);
gradient.addColorStop(0,'#f7f8b9');
gradient.addColorStop(1,'#feffcf');
ctx.fillStyle = gradient;
ctx.fill();
ctx.beginPath();
ctx.moveTo(width-width*.8,height-height*.02);
ctx.quadraticCurveTo(0+width*.02,height-height*.02,0+width*.02,(height - height*.2));
ctx.quadraticCurveTo(width*.05,height-height*.05,width*.1,height-height*.1);
ctx.quadraticCurveTo(width*.1,height-height*.07,width-width*.8,height-height*.02);
ctx.closePath();
ctx.fillStyle = '#ffffff';
ctx.fill();
var gradient = ctx.createLinearGradient(0,height,width*.1,height-height*.1);
gradient.addColorStop(0,"rgba(222,222,163,0.8)");
gradient.addColorStop(1,'#feffcf');
ctx.fillStyle = gradient;
ctx.fill();
}
postit(300, 300, 10);
</script>
```
---
Hi,
I made a quick and dirty "post-it" note with html5's canvas and some js.
I want to be able to rotate them anyway I want so I tried to use the translate. The example below I have a translate of 0,250 just so you could see the whole thing.
Ideally, I know if my canvas was 300,300 then I would
ctx.translate(150,150);
ctx.rotate(-30);
ctx.translate(-150,-150);
Of course since I'm rotating a square it gets cut off.
How would I rotate the square and move it on the canvas so the whole thing is showing but at the very top left edge of the canvas?
I added an image with my thinking of just getting the height of a triangle and moving it that much, but when translated, it doesn't seem to work just right.
I'll paste my whole function so you can look at it, but if you have any ideas, I would appreciate it. This isn't important, just messing around today.
```
var postit = function(width,height,angle){
var canvas = jQuery("#bg-admin-canvas").get(0);
var ctx = canvas.getContext("2d");
/*var area = (width*width*Math.sin(angle))/2;
var h = (area*2) / width + 30;
ctx.translate(0,h);
*/
//ctx.translate(150,150);
ctx.translate(0,250);
ctx.rotate(angle*Math.PI / 180);
//ctx.translate(-150,-150);
var gradient = ctx.createLinearGradient(0,height,width/2,height/2);
gradient.addColorStop(0.05,"rgba(0,0,0,0)");
gradient.addColorStop(0.5,"rgba(0,0,0,0.3)");
ctx.fillStyle = gradient;
ctx.fillRect(0,0,width,height);
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(width, 0);
ctx.lineTo(width,height);
ctx.lineTo(width-width*.8,height-height*.02);
ctx.quadraticCurveTo(0+width*.02,height-height*.02,0+width*.02,(height - height*.2));
ctx.closePath();
var gradient = ctx.createLinearGradient(0,height,width/2,height/2);
gradient.addColorStop(0,'#f7f8b9');
gradient.addColorStop(1,'#feffcf');
ctx.fillStyle = gradient;
ctx.fill();
ctx.beginPath();
ctx.moveTo(width-width*.8,height-height*.02);
ctx.quadraticCurveTo(0+width*.02,height-height*.02,0+width*.02,(height - height*.2));
ctx.quadraticCurveTo(width*.05,height-height*.05,width*.1,height-height*.1);
ctx.quadraticCurveTo(width*.1,height-height*.07,width-width*.8,height-height*.02);
ctx.closePath();
ctx.fillStyle = '#ffffff';
ctx.fill();
var gradient = ctx.createLinearGradient(0,height,width*.1,height-height*.1);
gradient.addColorStop(0,"rgba(222,222,163,0.8)");
gradient.addColorStop(1,'#feffcf');
ctx.fillStyle = gradient;
ctx.fill();
}
postit(300, 300, -35);
```

---
MORE INFO
Phrog, I think you know what I'm trying to do. This image shows what I want to do:

Now, the only thing is, I want to be able to pass in any width and height and angle and make the adjustment on the fly.
As an example with the following code:
```
var canvas = document.getElementById("bg-admin-canvas");
var ctx = canvas.getContext("2d");
ctx.arc(0,0,3,0,360,true); ctx.fill();
ctx.translate(50, 50);
ctx.arc(0,0,3,0,360,true); ctx.fill();
ctx.translate(-25, -25);
ctx.arc(0,0,3,0,360,true); ctx.fill();
```
I get the following image:

Now, if I add a rotate in there like this:
```
var canvas = document.getElementById("bg-admin-canvas");
var ctx = canvas.getContext("2d");
ctx.arc(0,0,3,0,360,true); ctx.fill();
ctx.translate(50, 50);
ctx.arc(0,0,3,0,360,true); ctx.fill();
ctx.rotate(30*Math.PI/180);
ctx.translate(-25, -25);
ctx.arc(0,0,3,0,360,true); ctx.fill();
```
I now have a sloped coordinates as the result is:

As I found, this is because the coordinates are no longer horizontal and vertical.
So, with this rotated coordinate structure, I can't figure out how to move my square (which could be any size and rotated at any angle) back to the left and top (so it fits in as little space as possible)
Does that make sense?
|
Rotate 'note' on the canvas to always touch the upper left corner
|
CC BY-SA 2.5
| 0 |
2011-04-05T16:50:05.450
|
2023-02-13T20:34:28.503
|
2011-04-06T09:04:25.643
| 266,763 | 266,763 |
[
"javascript",
"html",
"canvas"
] |
5,555,528 | 1 | 5,557,626 | null | 0 | 176 |
I have a form that requires the user to input their project's outcome.
They are required to input at least one outcome, and each outcome has a requirement of at least 2 measures associated with it.
So I need the ability to present the user with the initial outcome field, with two measure fields associated with it, with the ability to add more measures to its related outcome.
I sketched up what it would look like if the user were to have two outcomes. 
The dotted lines are the actions of each button.
I would like to accomplish this using jQuery, but I have never done anything more than just displaying/hiding a field based on what the user clicks.
Any help is appreciated.
Just to sum it up, they are required to provide one outcome, each outcome has at least two measures.
EDIT: Began proofing it here: [http://jsfiddle.net/bkmorse/FW6s8/4/](http://jsfiddle.net/bkmorse/FW6s8/4/) - but the add measure button is not working properly.
|
need to display extra text inputs when selecting add button, also need to remove fields
|
CC BY-SA 2.5
| null |
2011-04-05T16:58:10.900
|
2011-04-05T20:26:56.213
|
2011-04-05T19:22:57.703
| 26,130 | 26,130 |
[
"javascript",
"jquery",
"html",
"forms"
] |
5,555,574 | 1 | 5,556,929 | null | 0 | 744 |
I'm trying to display a TextField and a ListField below it:

And I would like to filter (aka "live search") the number of displayed rows, while the user is typing a word into the TextField.
I've tried calling [ListField.setSearchable(true)](http://www.blackberry.com/developers/docs/4.6.0api/net/rim/device/api/ui/component/ListField.html#setSearchable%28boolean%29) but it doesn't change anything, even if I type words while having the ListField focussed.
And by the way I wonder which TextField to take. I've used AutoCompleteField because it looks exactly as I want the field to be (white field with rounded corners), but it is probably not the best choice (because I don't need AutoCompleteField's drop down list while typing).
Here is my current code -
```
private ListField presetListField = new ListField();
private MyList presetList = new MyList(presetListField);
private MyScreen() {
int size;
getMainManager().setBackground(_bgOff);
setTitle("Favorites");
BasicFilteredList filterList = new BasicFilteredList();
String[] days = {"Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", "Sunday"};
int uniqueID = 0;
filterList.addDataSet(uniqueID, days, "days",
BasicFilteredList.COMPARISON_IGNORE_CASE);
// XXX probably a bad choice here?
AutoCompleteField autoCompleteField =
new AutoCompleteField(filterList);
add(autoCompleteField);
presetListField.setEmptyString("* No Favorites *", DrawStyle.HCENTER);
add(presetListField);
presetList.insert("Monday");
presetList.insert("Tuesday");
presetList.insert("Wednesday");
for (int i = 0; i < 16; i++) {
presetList.insert("Favorite #" + (1 + i));
}
}
```
```
public class MyList implements ListFieldCallback {
private Vector _preset = new Vector();
private ListField _list;
public MyList(ListField list) {
_list = list;
_list.setCallback(this);
_list.setRowHeight(-2);
// XXX does not seem to have any effect
_list.setSearchable(true);
}
public void insert(String str) {
insert(str, _preset.size());
}
public void insert(String str, int index) {
_preset.insertElementAt(str, index);
_list.insert(index);
}
public void delete(int index) {
_preset.removeElementAt(index);
_list.delete(index);
}
public void drawListRow(ListField listField,
Graphics g, int index, int y, int width) {
Font f = g.getFont();
Font b = f.derive(Font.BOLD, f.getHeight() * 2);
Font i = f.derive(Font.ITALIC, f.getHeight());
g.setColor(Color.WHITE);
g.drawText((String)_preset.elementAt(index), Display.getWidth()/3, y);
g.setFont(i);
g.setColor(Color.GRAY);
g.drawText("Click to get frequency",
Display.getWidth()/3, y + g.getFont().getHeight());
g.setFont(b);
g.setColor(Color.YELLOW);
g.drawText(String.valueOf(100f + index/10f), 0, y);
}
public Object get(ListField list, int index) {
return _preset.elementAt(index);
}
public int indexOfList(ListField list, String prefix, int start) {
return _preset.indexOf(prefix, start);
}
public int getPreferredWidth(ListField list) {
return Display.getWidth();
}
}
```
Thank you!
Alex
|
BlackBerry 6: ListFieldCallback.indexOfList() - how to filter while typing?
|
CC BY-SA 2.5
| null |
2011-04-05T17:00:50.850
|
2011-11-22T06:08:35.643
| null | null | 165,071 |
[
"blackberry",
"listfield"
] |
5,555,718 | 1 | 5,556,238 | null | 1 | 267 |
The company that I work for has been using FileMaker since v5, I believe. For some reason, in our database, we can't seem to widen any layouts beyond something like 615px - not even if I create a blank layout from scratch. However, if I create a new database, everything is as it should be. Here's a screenshot of what's going on, for clarification:

I don't get an option to drag it over or anything, but I can drag the layout up and down just as far as I please. Google's gotten me nowhere, and I've spent long enough hunting through settings and coming back empty-handed.
|
FileMaker 11: Can't widen layout?
|
CC BY-SA 2.5
| null |
2011-04-05T17:12:34.567
|
2011-04-05T17:54:40.880
| null | null | 459,726 |
[
"filemaker"
] |
5,555,938 | 1 | 8,235,163 | null | 17 | 28,953 |
I have a JTable with a custom cell renderer. The cell is a JPanel that contains a JTextField and a JButton. The JTextField contains an integer, and when the user clicks on the JButton the integer should be increased.
The problem is that the JButton can't be clicked when I have it in a JTable cell. How can I make it click-able?

Here is my test code:
```
public class ActiveTable extends JFrame {
public ActiveTable() {
RecordModel model = new RecordModel();
model.addRecord(new Record());
JTable table = new JTable(model);
EditorAndRenderer editorAndRenderer = new EditorAndRenderer();
table.setDefaultRenderer(Object.class, editorAndRenderer);
table.setDefaultEditor(Object.class, editorAndRenderer);
table.setRowHeight(38);
add(new JScrollPane(table));
setPreferredSize(new Dimension(600, 400));
pack();
setDefaultCloseOperation(EXIT_ON_CLOSE);
setTitle("Active Table");
setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new ActiveTable();
}
});
}
class RecordModel extends AbstractTableModel {
private final List<Record> records = new ArrayList<Record>();
@Override
public int getColumnCount() {
return 1;
}
@Override
public int getRowCount() {
return records.size();
}
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
return records.get(rowIndex);
}
public void addRecord(Record r) {
records.add(r);
fireTableRowsInserted(records.size()-1, records.size()-1);
}
}
class Record {
private int count = 1;
public int getCount() { return count; }
public void increase() { count = count + 1; }
}
class CellPanel extends JPanel {
private Record record;
private final JTextField field = new JTextField(8);
private final Action increaseAction = new AbstractAction("+") {
public void actionPerformed(ActionEvent e) {
record.increase();
field.setText(record.getCount()+"");
JTable table = (JTable) SwingUtilities.getAncestorOfClass(JTable.class, (Component) e.getSource());
table.getCellEditor().stopCellEditing();
}
};
private final JButton button = new JButton(increaseAction);
public CellPanel() {
add(field);
add(button);
}
public void setRecord(Record r) {
record = r;
field.setText(record.getCount()+"");
}
public Record getRecord() {
return record;
}
}
class EditorAndRenderer extends AbstractCellEditor implements TableCellEditor, TableCellRenderer {
private final CellPanel renderer = new CellPanel();
private final CellPanel editor = new CellPanel();
@Override
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
renderer.setRecord((Record) value);
return renderer;
}
@Override
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column) {
editor.setRecord((Record) value);
return editor;
}
@Override
public Object getCellEditorValue() {
return editor.getRecord();
}
@Override
public boolean isCellEditable(EventObject ev) {
return true;
}
@Override
public boolean shouldSelectCell(EventObject ev) {
return false;
}
}
}
```
|
How to make a JButton in a JTable cell click-able?
|
CC BY-SA 3.0
| 0 |
2011-04-05T17:28:32.280
|
2021-01-02T08:56:48.400
|
2021-01-02T08:56:48.400
| 213,269 | 213,269 |
[
"java",
"swing",
"jtable"
] |
5,555,990 | 1 | 5,619,447 | null | 1 | 826 |
I have the following ValidationRule class in WPF
```
public class EmptyFieldValidationRule: BaseValidationRule
{
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
{
var fieldValue = (string)value;
if (fieldValue.Trim().Length == 0)
{
return new ValidationResult(false, "Field Is Empty");
}
else
{
return new ValidationResult(true, null);
}
}
}
```
NOTE - extends the normal class.
This is really just a test validation class because I wanted to start off easier.
I am attempting to bind this to a textbox in my XAML, and it is reading in the BaseValidationRule class fine, it is even giving me it in Intellisense, but when I go to run the program and it hits that part of the application, it tells me an XMLParseException.
I am defining an ErrorMessage property in the XAML, which is inherited in the EmptyFieldValidationRule class from the BaseValidationRule.
The XAML for the ValidationRule Binding looks like the following

The Error Message I am getting is the following.
I have made the reference available to the ValidationRule assembly, and the intellisense is reading in the ValidationRule fine in my XAML, is there something else I need to do?
|
WPF ValidationRule Binding is throwing XMLParseException
|
CC BY-SA 2.5
| null |
2011-04-05T17:32:22.793
|
2011-12-19T05:18:22.697
|
2011-12-19T05:18:22.697
| 3,043 | 180,253 |
[
"c#",
"wpf",
"visual-studio"
] |
5,556,083 | 1 | 5,558,156 | null | 1 | 46 |
In the image below, what's the term for the "Boulder Farmers' Market" label for a particular marker? Is there information somewhere on how to create this for each marker via the Google Maps API?

|
How do I access this part of the Google Maps via the API?
|
CC BY-SA 2.5
| null |
2011-04-05T17:41:24.380
|
2011-04-05T20:33:31.800
|
2011-04-05T20:16:30.547
| 506,236 | 506,236 |
[
"google-maps"
] |
5,556,122 | 1 | null | null | 14 | 47,299 |
I had installed SQL Server 2008 R2, the installation was succesful. But I can't open the Management Studio because this error is shown:
```
Package 'Microsoft SQL Management Studio Package' failed to load.
```
Any idea? Thanks.

|
Error: Package 'Microsoft SQL Management Studio Package' failed to load. In SQL Server Management Studio
|
CC BY-SA 3.0
| 0 |
2011-04-05T17:45:01.933
|
2018-06-28T06:08:43.593
|
2017-11-18T07:22:48.607
| 330,315 | 536,707 |
[
"sql-server",
"sql-server-2008",
"ssms"
] |
5,556,357 | 1 | 5,557,325 | null | 0 | 8,889 |
Here's the script I have currently:

To test I created four work order records in the date range I'm using. In this script I'm telling it to omit one of the work orders from the find, but it still says "4" for the value of gNumRequestOpened.
Am I misunderstanding how to script a find? Is there a better way to do a find an omit records with certain criteria?
|
FileMaker Script - How to perform a find and omit certain records
|
CC BY-SA 2.5
| 0 |
2011-04-05T18:04:45.487
|
2011-04-05T19:23:24.167
| null | null | 13,009 |
[
"filemaker"
] |
5,556,623 | 1 | 5,557,559 | null | 11 | 1,698 |
I'm calculating shortest path of a robot on a plane with polygonal obstacles. Everything works well and fast, no problems there. But, how to smoothen the path so it becomes curvy ?
Below is a picture of a path connecting vertices with a straight line.
P.S
Robot is just a circle.

|
Smoothing path of a robot
|
CC BY-SA 2.5
| 0 |
2011-04-05T18:26:05.897
|
2013-12-31T22:30:25.830
|
2011-04-05T19:47:13.080
| 20,471 | 661,797 |
[
"java",
"robot"
] |
5,556,676 | 1 | 5,556,793 | null | 4 | 2,182 |
I have an app that uses MKMapView to display a map. I also have a UITableView in which it displays a small snippet image of the map to the left of each rows. It looks something like this:

I want to be able to generate that image to the left from my MKMapView. The size is 40x40. I know the given latitude and longitude as the center of a particular location where I want to get the image. How do I do this?
|
generate UIImage from MKMapView at a given latitude and longitude
|
CC BY-SA 2.5
| 0 |
2011-04-05T18:31:27.560
|
2011-04-05T23:13:28.913
|
2011-04-05T18:51:31.850
| 95,265 | 95,265 |
[
"iphone",
"objective-c",
"uiimage",
"mkmapview"
] |
5,556,685 | 1 | 5,556,801 | null | 0 | 60 |
See image here :

I get error in `setContentView(R.layout.main);` Where is my problem?
|
Why am I getting an error in my main.xml?
|
CC BY-SA 3.0
| null |
2011-04-05T18:32:02.140
|
2013-12-24T15:07:19.910
|
2013-12-24T15:07:19.910
| 1,829,219 | 438,158 |
[
"android"
] |
5,556,914 | 1 | null | null | 2 | 2,930 |
I need to create a graph representing a extendable hashing structure. So far I have had success with creating graphs in graphviz (using the dot tool)... I am however having trouble making top labels representing the number of bits for each bucket... What I want to do is something similar to this:

What I cannot get done are the small 2's and 1's representing bits.. Can anybody explain how I would go around doing this?
My graph so far looks like this:
```
digraph G {
nodesep = 0.5;
rankdir = LR;
node [shape=record];
node0[label = "<f0>0 | <f1>1"];
node1[label = "0010 | |", toplabel="1"];
subgraph cluster_0 {
style=filled;
color=white;
node [style=filled,color=white];
node0;
label = "i = 1";
}
node0:f0->node1;}
```
[](https://i.stack.imgur.com/DASj2.png)
|
Create top labels for nodes using graphviz (dot)
|
CC BY-SA 3.0
| null |
2011-04-05T18:50:31.517
|
2016-10-22T11:44:47.593
|
2016-10-22T11:44:47.593
| 4,370,109 | 693,581 |
[
"hash",
"graphviz",
"dot"
] |
5,556,953 | 1 | 5,557,249 | null | 8 | 26,108 |
I'm getting the same error as seen in [this question](https://stackoverflow.com/questions/2513495/why-google-is-not-defined-when-i-load-google-js-api) to which there is no answer. To elaborate, I'm trying to load [this demo](http://code.google.com/apis/visualization/documentation/gallery/intensitymap.html) in my code. I've altered it slightly in that I am not including their code in any header tag - this particular code fragment will be loaded in by jQuery. Anyway, so my code looks like this:
```
<script type='text/javascript'
src='https://www.google.com/jsapi?key=ABQIAAAAKl2DNx3pM....'>
</script>
<script type='text/javascript'>
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', '', 'Country');
data.addColumn('number', 'Population (mil)', 'a');
data.addColumn('number', 'Area (km2)', 'b');
data.addRows(5);
data.setValue(0, 0, 'CN');
data.setValue(0, 1, 1324);
data.setValue(0, 2, 9640821);
data.setValue(1, 0, 'IN');
data.setValue(1, 1, 1133);
/* ... */
var chart = new google.visualization.IntensityMap(
document.getElementById('chart_div'));
chart.draw(data, {});
}
$(document).ready(function() {
google.load('visualization', '1', {packages:['intensitymap']});
google.setOnLoadCallback(drawChart);
});
</script>
```
This section of code lies in a div whose visibility is toggled as needed. The whole lot (the entire page here) is returned as the result of an ajax call.
The theory here being using jQuery's `$(document).ready()` handler means that google should be loaded when the document is ready.
However, I'm getting this:

Regardless of whether that section is inside `ready()` or not. Now here's the real kicker: in the dom explorer, I can find said object:

Can anyone please explain to me firstly why this is happening and then what I do to fix it?
Being a naive kind of javascript developer, I tried including the google scripts in my head tags. That then produced something like [this question](https://stackoverflow.com/questions/3249030/is-not-defined-error-using-jquery-and-google-code-repository) ($ not defined) except that we're not loading jQuery from google, we're hosting it locally.
We successfully load a number of other jQuery extensions inline this way as well as extra parts of jQuery code, so to my mind this should work. I do not know whether jQuery is getting in the way of Google/vice versa but they shouldn't be.
Thoughts?
|
Google is not defined using Google Visualization API; possibly jQuery's fault
|
CC BY-SA 2.5
| 0 |
2011-04-05T18:52:45.290
|
2012-11-27T21:39:37.633
|
2017-05-23T12:00:17.993
| -1 | null |
[
"javascript",
"jquery",
"google-api"
] |
5,557,135 | 1 | 5,557,749 | null | 14 | 31,575 |
Where I live (Copenhagen, Denmark) there is a taxi company which offers to send you an SMS when the car you ordered is about to arrive.
The SMSs are unlike any I have received on my iPhone in that they appear fullscreen and are not saved to the SMS application. See this screenshot:

As soon as you press "Dismiss" the message is completely gone. No trace of it in the SMS application.
I was thinking that the ability to do this could be useful for apps in some way. Perhaps offered instead of a regular push notification for super important things. But most of all I am curious to learn what's going on.
- Is this a regular SMS or some sort of cell network alert?- How can these be sent? Is it content formatting which triggers this special display or is it a protocol feature?- How would they appear on other phones?- If it is not a regular SMS but some sort of network alert would it be possible to send one to a 3G-enabled iPad?
|
Sending fullscreen, disappearing SMSs to an iPhone
|
CC BY-SA 2.5
| 0 |
2011-04-05T19:08:45.603
|
2015-05-26T03:20:41.733
| null | null | 469,015 |
[
"iphone",
"mobile",
"sms",
"notifications",
"mobile-phones"
] |
5,557,206 | 1 | null | null | 0 | 870 |
So, I've seen several instances of padding being a problem in a custom title bar but this seems to be unique and I would love to see if anyone could shed some light on it.
Here's what I have:

There's padding to the right of the configure button that shouldn't be. I want a little bit of padding in the end but, to prove a point, this is with no padding set. Here's the layout for the custom title bar.
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFF" >
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageView
android:id="@+id/titleImage"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:paddingLeft="8dip"
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:src="@drawable/icon" />
<TextView android:id="@+id/customtitlebar"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="COMPANY"
android:textSize="20dip"
android:textColor="#205cc7"
android:textStyle="bold"
android:paddingTop="15px" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:paddingTop="8dip"
android:paddingBottom="8dip"
android:src="@drawable/configure" />
</LinearLayout>
</RelativeLayout>
```
I thought maybe the layout I gave a dummy id "container" was being cut off as well and the problem was outside this layout, but, when I change its background to red, it takes up the whole screen.

Does anyone have a solution short of hiding the OS title bar and making it a header for every screen layout?
|
Android -- Title bar invisible padding
|
CC BY-SA 2.5
| null |
2011-04-05T19:14:32.463
|
2011-04-06T17:03:01.850
|
2011-04-05T19:23:51.733
| 591,042 | 591,042 |
[
"android"
] |
5,557,872 | 1 | 5,558,350 | null | 0 | 846 |
I am creating a custom control in WPF 4.0 that is going to look something like the image below. It basically consists of "swim lanes". Each ItemsControl has elements that can be dragged and dropped, with a visual render of the item, within the same row on every element except for the row header. There are a fixed number of columns and a variable number of rows.

I was thinking of two different approaches to this problem:
1. Use a DataGrid and heavily modify it so that it will support this behaviour.
2. Create a grid with a dynamic number of rows and implement each item as group of 5 controls (one for each column).
Considerations:
Using MVVM, the whole thing should be able to bind to a list.
What would be the most reasonable approach in this situation?
Please comment if anything is unclear!
|
Custom WPF control
|
CC BY-SA 2.5
| null |
2011-04-05T20:11:17.803
|
2011-04-05T20:50:36.257
| null | null | 668,272 |
[
"c#",
"wpf",
"mvvm",
".net-4.0",
"custom-controls"
] |
5,557,889 | 1 | 5,557,919 | null | 51 | 37,202 |
When running a small piece of C# code, when I try to input a long string into `Console.ReadLine()` it seems to cut off after a couple of lines.
Is there a max length to Console.Readline(), if so is there a way to increase that?

|
Console.ReadLine() max length?
|
CC BY-SA 3.0
| 0 |
2011-04-05T20:12:42.523
|
2018-09-15T18:46:28.557
|
2013-10-01T13:17:23.027
| 639,455 | 107,156 |
[
"c#"
] |
5,558,118 | 1 | 5,587,680 | null | 38 | 11,930 |
Chrome and Firefox 4, among other applications, now put some of their user interface in the title bar. In Windows, the OS normally controls the entire title bar. An application can create a custom title bar by removing the OS title bar and drawing a "fake" title bar instead (like WinAmp), but only the OS knows how to draw the non-customized elements of the title bar (e.g. Close/Minimize/Maximize), which vary by OS version.
By what mechanism do apps like Chrome and Firefox "share" the title bar with the OS (put custom elements in the title bar while keeping the original OS visual theme)?

|
Tabs in title bar: what's the secret?
|
CC BY-SA 2.5
| 0 |
2011-04-05T20:29:32.450
|
2014-04-04T09:38:26.550
|
2011-04-05T21:17:43.983
| 22,820 | 22,820 |
[
"windows",
"user-interface",
"titlebar",
"custom-titlebar"
] |
5,558,112 | 1 | 5,559,034 | null | 3 | 2,514 |
I am running gVim on WinXP.
I open a folder, select two files, and click "Diff with Vim". Screenshot:

The gVim GUI starts up, with each of the files in its own tab. I notice that each tab is in DIFF mode. However, there is no comparison being made between the two tabs. Both files are completely different, yet there is no highlighting, nothing - just a gray line on the left, which I interpret to be the 'DIFF' mode:

What is going on? Is my not working or is it something else?
---
Earlier, when I needed to [Open files in multiple tabs using the Windows Context Menu](http://vim.wikia.com/wiki/Open_files_in_multiple_tabs_using_the_Windows_Context_Menu), I followed a poster's advice and added the following line to my file: `:autocmd BufReadPost * tab ball`
While that allowed me to open two files in separate tabs in a single Vim window, I lost the ability to diff the two files, if I wanted to. The solution to turn on both these features is to enable the `autocmd` above only in the case where I do not want to the two files, which happens when `&diff==0`. Thus, when I modified the code in my file to the below, I regained my functionality:
```
if (&diff==0)
:autocmd BufReadPost * tab ball
endif
```
I've also added this solution to the comments portion of the [Vim Wikia link](http://vim.wikia.com/wiki/Open_files_in_multiple_tabs_using_the_Windows_Context_Menu) mentioned above.
|
Why doesn't "Diff with Vim" command work?
|
CC BY-SA 3.0
| null |
2011-04-05T20:28:57.277
|
2011-04-11T18:22:52.140
|
2011-04-11T18:22:52.140
| 564,664 | 564,664 |
[
"windows-xp",
"vim",
"vimdiff"
] |
5,558,318 | 1 | 5,559,954 | null | 0 | 2,551 |
I am having some problems with my DIV, it wont display over a a DIV that has a web user control in it. Below you can find my css. I believe I have done everything right and am hoping that someone can maybe see an error that I have made and help me out. If you need any other code let me know. I also wonder if its just IE rendering it wrong? Thanks for looking.

The Popup CSS:
```
{
background: #ececec;
position:absolute;
top: 236px;
left: 201px;
height: auto;
width: 280px;
border: solid 1px gray;
z-index: 50;
text-align:left;
padding-left: 5px;
padding-top: 5px;
padding-bottom: 15px;
font-size: 8pt;
}
```
The Activity DIV (same the div above just changed position)
```
{
border: solid 2px #A9C5EB;
position: absolute;
top: 353px;
left: 290px;
width: 710px;
height: 227px;
font-size: small;
overflow: scroll;
overflow-x: hidden;
background-color: #F8FBFE;
z-index: 2;
}
```
|
Div Hidden behind another DIV with Web User Control in it
|
CC BY-SA 2.5
| null |
2011-04-05T20:47:04.510
|
2011-04-05T23:49:56.970
| null | null | 595,208 |
[
"asp.net",
"css",
"html"
] |
5,558,594 | 1 | 5,558,787 | null | 0 | 4,187 |
I'm having trouble running my spring project from inside Eclipse.
This is the error I get:
```
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
```
Here are the Tomcat settings:

I don't understand why it's not working, the spring classes are included in the classpath.
|
Can't run spring project from eclipse, ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
|
CC BY-SA 2.5
| null |
2011-04-05T21:12:31.153
|
2011-12-20T12:45:26.297
| null | null | 28,351 |
[
"java",
"eclipse",
"spring",
"m2eclipse"
] |
5,558,773 | 1 | 5,703,141 | null | 16 | 14,388 |
[Original title: )
IE 9 is rendering the text in my application very poorly. The problem is not in my monitor's Clear Type settings, since IE 9 in compatibility mode, Firefox, and Chrome all render text nicely. Here's a side-by-side comparison of how the text is rendered with IE 9, IE 9 in compatibility mode, and Chrome:



I tried applying [this answer](https://stackoverflow.com/questions/778208/jquery-fadein-leaves-text-not-anti-aliased-in-ie7/1719198#1719198), but it doesn't seem to apply to anything after IE 7. Does anybody know of any workarounds we can apply to our site to fix IE 9's bad text rendering?
I've boiled down the problem page to the bare essentials. As you can see, it doesn't take much to reproduce. Be sure that IE has a browser mode if IE9 and document mode of IE9 standards:
```
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="background-color: rgb(30, 34, 59); color: rgb(255, 85, 0); font-size: 20px">
Home
</body>
</html>
```
|
IE 9 does not use sub-pixel antialiasing under certain conditions
|
CC BY-SA 3.0
| 0 |
2011-04-05T21:29:21.383
|
2012-06-20T05:03:59.753
|
2017-05-23T12:13:26.330
| -1 | 119,549 |
[
"internet-explorer-9",
"antialiasing",
"cleartype",
"text-rendering"
] |
5,558,990 | 1 | null | null | 8 | 26,845 |
I need to set the menu icon programmatically (Not through a layout file), and also I need to load the icon file from file:///android_asset/ (Not load as a compiled Drawable). I found the size of the displayed icon is relatively smaller. It looks like android resize it or something, and I do not want to achieve the same effect with out code.
As you can see in the in the attached screen shot, the menu "globe-36", "globe-48" and "globe-72" is populated using code like, and their image are 36x36, 48x48 and 72x72 : (This is the way I load my icon in my app, I have to)
```
MenuItem mi = menu.add(Menu.NONE, i++, i++, icon);
Drawable d = Drawable.createFromStream(getAssets().open(icon + ".png"), icon);
mi.setIcon(d);
```
And, the menu "globe-aset" and "barcode-asset" are populated like:
```
MenuItem mi = menu.add(Menu.NONE, i++, i++, "globe-asset");
mi.setIcon(R.drawable.globe);
```

|
android menu icon size
|
CC BY-SA 2.5
| 0 |
2011-04-05T21:50:17.653
|
2020-09-22T10:07:30.040
|
2011-04-05T23:21:45.197
| 80,425 | 428,024 |
[
"android",
"menu",
"icons",
"menuitem"
] |
5,559,073 | 1 | 5,559,101 | null | 4 | 1,150 |
Why a slash is changed into dash while providing explicit date format (screen below) ?

|
DateTime format issue
|
CC BY-SA 2.5
| null |
2011-04-05T21:59:40.883
|
2011-04-05T22:07:09.427
|
2011-04-05T22:01:44.063
| 54,727 | 270,315 |
[
"c#",
".net"
] |
5,559,062 | 1 | 5,559,603 | null | 1 | 372 |
I admit the title is mostly a catch 22, but it's entirely relevant, so please bear with me for a while...
### Background
As some may know, I'm working on a PHP framework whose major selling point is that of bridging functionality between different CMSes/systems.
From a developer perspective, there's an extensive error handling and logging mechanism.
Right now, there are two settings, `DEBUG_MODE` and `DEBUG_VERBOSE`, which control debug output.
The mode describes the medium and verbose controls the amount of detail.
To make it short, there's a mode called "console" which basically dumps debug info into the javascript console (which is now available in a major web browser near you).
### The Issue
This [debug system] works great for development servers, but you absolutely cannot use it on a production one since debug details (which include DB credentials etc) . And in all honesty, who ever migrated from a to a server flawlessly each time?
### Solutions
Therefore, I've been trying to figure out a way to fix this. Among my proposed solutions are:
- - - `current_user_can('manage_options')`- `$user=&JFactory::getUser() && ($user->usertype=='Super Administrator') || ($user->usertype=='Administrator')`- `$_SERVER['REMOTE_ADDR']=='123.124.125.126'`-
So, do you think `eval()` should be up to it? I'll ensure it still performs well by only doing this once per page load/request.
```
if(DEBUG_MODE!='none')echo 'Debug'; // this is how it is now
if(DEBUG_MODE!='none' && $USER_CONDITION)echo 'Debug'; // this is how it should be
```
The `$USER_CONDITON` allows stuff such as running `is_admin()` to allow all admins to see debug info, or, `getUser()->id==45` to enable it for a specific user. Or by IP, or whatever.

|
Using eval() to enhance security
|
CC BY-SA 2.5
| 0 |
2011-04-05T21:58:36.003
|
2011-04-05T23:29:33.383
|
2011-04-05T23:29:33.383
| 314,056 | 314,056 |
[
"php",
"security",
"debugging",
"eval",
"k2f"
] |
5,559,095 | 1 | 5,559,433 | null | 3 | 195 |
I develop "Hebrew Calendar extension" ([https://addons.mozilla.org/en-us/firefo](https://addons.mozilla.org/en-us/firefo) ... -calendar/) and under FF4 extension shows transparent popup menu

Could you help me to understand how to fix the issue.
Thank you,
Igor.
|
How to prevent FF4 popup menu from being transparent?
|
CC BY-SA 3.0
| 0 |
2011-04-05T22:01:47.973
|
2015-01-24T18:21:50.450
|
2015-01-24T18:21:50.450
| 219,166 | 339,384 |
[
"javascript",
"firefox",
"firefox-addon",
"firefox4"
] |
5,559,704 | 1 | 5,559,975 | null | 5 | 5,577 |
I have a .NET ListView control in which I display stack traces. I used the ListView since I needed to manipulate the font/colors of certain lines.
However, it seems there is some kind of maximum regarding the width of the columns, either the number of characters displayed, or the number of pixels a column can be.
Here is a simple [LINQPad](http://linqpad.net) example that shows the problem:
```
void Main()
{
using (var fm = new Form())
{
ListView lv = new ListView();
fm.Controls.Add(lv);
lv.Dock = DockStyle.Fill;
lv.View = View.Details;
lv.Columns.Add("C", -1, HorizontalAlignment.Left);
string line = new string('W', 258) + "x";
lv.Items.Add(line);
line = new string('W', 259) + "x";
lv.Items.Add(line);
lv.AutoResizeColumn(0, ColumnHeaderAutoResizeStyle.ColumnContent);
lv.Columns[0].Width.Dump();
fm.ShowDialog();
}
}
```
Screenshot:

As you can see, the line containing 258 W's + an X, shows the x, whereas the next line containing one additional W, does not show the x.
The output of the width calculation there shows that the current width of the column is 2864 pixels.
The question is this: Is there anything I can tweak on the ListView to work around this limitation?
|
.NET ListView, max number of characters, or maximum column width? Possible to override/expand?
|
CC BY-SA 2.5
| 0 |
2011-04-05T23:19:07.747
|
2011-04-05T23:51:51.900
|
2011-04-05T23:25:07.093
| 267 | 267 |
[
".net",
"listview",
"max",
"column-width"
] |
5,559,857 | 1 | null | null | 0 | 276 |
I have (3) tables: Professor, Comment, Course
I'm trying to get a few columns to display the professor with all the courses and all the comments they have.
My tables



SQL:
```
SELECT prefix, code, info, date
FROM Course, Comment
JOIN Professor ON Professor.pID = Comment.pID
AND JOIN Course ON Course.cID = Comment.cID
WHERE Comment.pID = ?
```
Throws error:
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN Course ON Course.cID = Comment.cID WHERE Comment.pID = '273'' at line 4
|
mySql Error in Query
|
CC BY-SA 2.5
| null |
2011-04-05T23:36:37.257
|
2011-04-05T23:45:20.537
|
2011-04-05T23:38:45.947
| 135,152 | 700,070 |
[
"mysql",
"sql",
"mysql-error-1064"
] |
5,560,012 | 1 | 5,560,110 | null | 2 | 544 |
How do i get this effect with a menulet application. I just want the window effect nothing else.
##
My current app looks like this. please if someone could shed some light it would be appreciated. Thanks.

|
How do I get my menulet to look like this
|
CC BY-SA 2.5
| 0 |
2011-04-05T23:59:19.850
|
2015-12-14T22:37:42.400
| null | null | 680,778 |
[
"cocoa",
"nsmenuitem",
"nsstatusitem"
] |
5,560,486 | 1 | 5,564,669 | null | 2 | 8,317 |
thanks for your interest, first I believe image is worth thousand word, so here you go

Unfortunately I am not in possession of mouse right now, so its drawn using IBM TrackPoint, but the main idea should be clear.
I called it horizontal tree because usually tree view is vertical, you would only see one directory on one line and on the left hand side of the directory name would be just vertical lines showing how deeply nested this directory is. I am trying to have "directories" listed next to each other.
Think of it as of algorithm diagram with IFs and ENDIFs and they will always have exactly two outputs or inputs.
Here is html that should generate similiar picture:
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IFs and ENDIFs</title>
<style>
ul, li, div{
margin: 0px;
padding: 0px;
border: 0px;
}
ul.left{
border: 1px solid red;
margin: 2px;
padding: 2px;
list-style-type:none;
width: 150px;
float:left;
}
ul.right{
border: 1px solid green;
margin: 2px;
padding: 2px;
list-style-type:none;
width: 150px;
float:left;
}
}
li.parent{
border: 1px solid blue;
background-color:#CC9;
margin: 2px;
padding: 2px;
min-width: 350px;
display:block;
overflow-style:marquee-block;
}
</style>
</head>
<body>
<div id="root">
<ul>
<li class="parent">
<div class="label">1</div>
<ul class="left">
<li>
<div class="label">1.L1</div>
</li>
<li>
<div class="label">1.L2</div>
</li>
<li class="parent">
<div class="label">1.L3</div>
<ul class="left">
<li>
<div class="label">1.L3.L1</div>
</li>
</ul>
<ul class="right">
<li>
<div class="label">1.L3.R1</div>
</li>
<li>
<div class="label">1.L3.R2</div>
</li>
</ul>
</li>
</ul>
<ul class="right">
<li>
<div class="label">1.R1</div>
</li>
<li>
<div class="label">1.R2</div>
</li>
<li class="parent">
<div class="label">1.R3</div>
<ul class="left">
<li>
<div class="label">1.R3.L1</div>
</li>
<li>
<div class="label">1.R3.L2</div>
</li>
<li>
<div class="label">1.R3.L3</div>
</li>
<li>
<div class="label">1.R3.L4</div>
</li>
</ul>
<ul class="right">
<li>
<div class="label">1.R3.R1</div>
</li>
<li>
<div class="label">1.R3.R2</div>
</li>
</ul>
</li>
</ul>
</li>
<li>
<div class="label">2</div>
</li>
<li>
<div class="label">3</div>
</li>
</ul>
</div>
</body>
</html>
```
Here is what it looks like so far :( (nothing near the result i hope for, also this is probably 7th iteration of me trying to figure this out) So if anyone could point me in the right direction I would really appreciate it.

|
How can one create horizontal tree view using CSS and HTML?
|
CC BY-SA 2.5
| 0 |
2011-04-06T01:21:14.457
|
2011-04-06T10:10:21.983
| null | null | 486,332 |
[
"javascript",
"css",
"html"
] |
5,560,579 | 1 | 5,561,011 | null | 2 | 1,259 |
I'd like to make a convex hull of a set of 2D points (in python). I've found several examples which have helped, but I have an extra feature I'd like that I haven't been able to implement. What I want to do is create the convex hull but allow it to pick up interior points if they are sufficiently "close" to the boundary. See the picture below -> if theta < x degrees, then that interior point gets added to the hull.

Obvious this can make things a bit more complex, as I've found out from my thoughts and tests. For example, if an interior point gets added, then it could potentially allow another further interior point to be added.
Speed is not really a concern here as the number of points I'll be working with will be relatively small. I'd rather have a more robust algorithm then a quick one.
I'm wondering if anyone knows of any such example or could point me in the right direction of where to start. Thanks.
|
Python - Convex Hull with Some Permissible Interior Points
|
CC BY-SA 2.5
| 0 |
2011-04-06T01:35:37.913
|
2013-05-26T08:51:52.907
|
2011-04-06T02:05:47.310
| 675,568 | 563,299 |
[
"python",
"algorithm",
"geometry",
"convex-hull"
] |
5,560,631 | 1 | null | null | 1 | 768 |
I have been asked to create an image map something I havent needed to do in I dont know how long :)
The base image is a circle with areas left out for the overlays 
There are 2 states of the icon images (on/off) Below is an example .All 3 images are the same size the icon related images are the same just a different shade over colour for a hover affect.

How is my best way to achieve this?
I have created this so far
```
<map name="Map" id="Map">
<area shape="rect" coords="242,47,376,104" href="#" id="availiblity-manager" class="a-am"/>
<area shape="rect" coords="259,124,385,176" href="#" id="capicaty-manager" class="a-capm"/>
<area shape="rect" coords="201,204,324,260" href="#" id="configuration-manager" class="a-confm" />
```
Some basic query to apply an on state to area class like
```
$('.a-am').hover(function () {
$(this).addClass('on');
}, function () {
$(this).removeClass('on');
});
```
I think its the .css where I am a little stuck as I am not sure how to align each of the area shapes
```
#Map .a-am
{
display:block;
background:url("../Content/Images/map2.png");
background-position:-256px -58px;
height:33px;
width:109px;
}
#Map .a-am.on
{
display:block;
background:url("../Content/Images/map3.png");
background-position:-256px -58px;
height:33px;
width:109px;
}
```
Can someone suggest how I should be aligning the icon images over the circle?
|
Old school Image map with a 2 overlay states
|
CC BY-SA 2.5
| null |
2011-04-06T01:47:13.087
|
2011-04-06T18:42:17.343
| null | null | 293,545 |
[
"jquery",
"html"
] |
5,560,636 | 1 | 5,560,701 | null | 0 | 334 |
I am using Cocoanetic's implementation of `EGOTableViewPullRefresh`.
It's a cinch to implement. Love it:
- [http://www.cocoanetics.com/2009/12/how-to-make-a-pull-to-reload-tableview-just-like-tweetie-2/](http://www.cocoanetics.com/2009/12/how-to-make-a-pull-to-reload-tableview-just-like-tweetie-2/)
The only problem I'm having is with rotation. When the view rotates, the refresh header doesn't adjust for landscape mode. It sits left aligned, 320.0f units wide.

I have tried everything I can think of to adjust this properly. I set it as a property in `PullToRefreshTableViewController` and tried to set the frame the same way it is done in init. This failed. I tried to do it in this same controller in `viewWillAppear`. Failed.
Beyond this, I tried about 6 other methods not worth detailing. The problem seems to be that I'm using the wrong bounds, even though I'm making them relative to the view.
Nothing I do replicates what is seemingly easy in `viewDidLoad`:
```
refreshHeaderView = [[EGORefreshTableHeaderView alloc] initWithFrame:
CGRectMake(0.0f, 0.0f - self.view.bounds.size.height,
320.0f, self.view.bounds.size.height)];
```
It seems all I really need to do is increase the width. I tried something along the lines of this:
```
refreshHeaderView.frame = CGRectMake(refreshHeaderView.frame.origin.x, refreshHeaderView.frame.origin.y, 480.0f, refreshHeaderView.frame.size.height);
```
No luck.
The link at the top has the full, unmodified source code for what I'm using.
|
EGOTableViewPullRefresh and landscape orientation
|
CC BY-SA 3.0
| null |
2011-04-06T01:48:14.833
|
2017-08-01T18:21:23.787
|
2017-08-01T18:21:23.787
| 1,033,581 | 334,457 |
[
"iphone",
"objective-c",
"ios4",
"iphone-sdk-3.0",
"landscape"
] |
5,560,653 | 1 | 5,560,967 | null | 2 | 4,574 |
I'm new to WPF, facing a problem in locating an image file on a button.
It's not working when I put a relative path, as shown(Window1.xaml):
```
<Button Height="23" HorizontalAlignment="Right" Margin="0,33,38,0" Name="button1" VerticalAlignment="Top" Width="24" Background="AliceBlue" OpacityMask="Cyan" Grid.Column="1" Click="button1_Click">
<Image Source="Folder-icon.png"></Image>
</Button>
```
However, it's working when i put an absolute path:
```
<Button Height="23" HorizontalAlignment="Right" Margin="0,33,38,0" Name="button1" VerticalAlignment="Top" Width="24" Background="AliceBlue" OpacityMask="Cyan" Grid.Column="1" Click="button1_Click">
<Image Source="D:\Folder-icon.png"></Image>
</Button>
```
I try to describe my folder structure in picture.

Hope someone can guide me to load the image to the button within the same workspace using relative path.
|
Image Source does not locate image file in working directory
|
CC BY-SA 2.5
| null |
2011-04-06T01:51:16.040
|
2011-04-06T02:56:12.790
| null | null | 281,843 |
[
"c#",
"wpf",
"image"
] |
5,560,712 | 1 | 5,560,774 | null | 1 | 167 |
Do i need to setting the foreign key for this situation ?
i'm weak in database design, especially in mysql.. may i know if i want to setting foreign keys for them, what should i setting for them ? in case if the people delete... all referral to people_id will delete together, is it possible to set while the table is too many ?
Thx for reply

|
MySQL Foreign keys: should i set it up?
|
CC BY-SA 2.5
| 0 |
2011-04-06T02:05:27.013
|
2011-04-06T02:28:19.350
|
2011-04-06T02:16:57.037
| 235,119 | 235,119 |
[
"database",
"database-design",
"foreign-keys",
"relational-database",
"foreign-key-relationship"
] |
5,560,757 | 1 | 5,561,574 | null | 2 | 729 |
I'm having trouble understanding the algorithm being used in this FPGA circuit. It deals with redundant versus non-redundant number format. I have seen some mathematical (formal) definitions of non-redundant format but I just can't really grasp it.
Excerpt from this paper describing the algorithm:
> Figure 3 shows a block diagram of the scalable Montgomery multiplier. The kernel contains w-bit PEs for a total of bit cells. is stored in carry-save redundant form. If PE completes ^0 before PE1 has finished ^(e-1), the result must be queued until PE1 becomes available again. The design in [5] queues the results in redundant form, requiring bits per entry. For large the queue consumes significant area, so we propose converting to nonredundant form to save half the queue space, as shown in Figure 4. On the first cycle, is initialized to 0. When no queuing is needed, the carry-save redundant is bypassed directly to avoid the latency of the carry-propagate adder. The nonredundant result is also an output of the system.
And the diagrams:

And here is the "improved" PE block diagram. This shows the 'improved' PE block diagram - 'improved' has to do with some unrelated aspects.

I don't have a picture of the 'not improved' FIFO but I think it is just a straight normal FIFO. What I don't understand is, does the FIFO's CPA and 3 input MUX somehow convert between formats?
Understanding redundant versus non-redundant formats (in concrete examples) is the first step, understanding how this circuit achieves it would be step 2..
|
What is redundant versus non-redundant number format?
|
CC BY-SA 2.5
| null |
2011-04-06T02:13:22.700
|
2011-04-06T04:46:14.043
|
2011-04-06T02:18:38.127
| 541,686 | 361,312 |
[
"algorithm",
"fpga",
"cpu-architecture"
] |
5,560,777 | 1 | null | null | 1 | 330 |
I turned on my debug toolbar and was surprised to see the stock template where the panels are aligned to the right.
I upgraded to django 1.3 and re-installed most of my requirements via PIP, which is where I imagine my usual toolbar disappeared.
I had always thought it was David Cramer's fork that had the green panel bar docked at the top, which I find insanely more usable (doesn't obstruct anything), plus it had some default default panels like unique SQL counts.
Now that I've cloned both [David's fork](https://github.com/dcramer/django-debug-toolbar) and [Rob's original](https://github.com/robhudson/django-debug-toolbar), I see neither have this green dock.
Am I going insane? Is this a setting I've missed, or perhaps a different fork? I would kill for the workflow I'm used to!
I've looked through the commits, and indeed, there was a version in 2009 that was docked at the top, but had nowhere near the functionality that the version I'm talking about had. The exact commit that moved the toolbar to the right appears to be: [https://github.com/dcramer/django-debug-toolbar/commit/565b100f9d97214043ae93c51d276951a65331e8](https://github.com/dcramer/django-debug-toolbar/commit/565b100f9d97214043ae93c51d276951a65331e8)
But nowhere can I find this awesome version below:
It also claims to be version 0.2 which I find odd too. I will keep going through each commit but any help would be appreciated.

|
Django Debug Toolbar - Which version has the green panel that docks at the top?
|
CC BY-SA 2.5
| null |
2011-04-06T02:20:05.323
|
2011-04-06T03:04:17.617
|
2011-04-06T02:55:50.280
| 267,887 | 267,887 |
[
"django"
] |
5,561,047 | 1 | 5,561,308 | null | 0 | 243 |
I have tried to use the following code to retrieve the data from the webserver (test.asmx.cs) but somehow this is always throw the error to me... does anyone know what is it going wrong?
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace Test
{
/// <summary>
/// Summary description for autocomplete
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class autocomplete : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public static string streetNameSearch(int id)
{
return "Melbourne|North Melbourne|South Melbourne|Richmond|North Richmond";
}
}
}
```
And the following jquery code have placed under pgTest.aspx
```
$("#example").keyup(function () {
$.ajax({
type: "POST",
url: "pgTest.aspx/streetNameSearch",
data: '{"id":"' + 1 + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var returnData = data.d;
alert(returnData)
},
error: function (xhr, ajaxOptions, thrownError) {
alert(ajaxOptions);
},
timeout: function (data) {
alert("time out");
}
});
});
```

|
unable to use ajax to call webserver to get return result in .net c#
|
CC BY-SA 2.5
| null |
2011-04-06T03:14:10.263
|
2011-04-06T05:27:30.657
|
2011-04-06T04:34:04.300
| 441,368 | 52,745 |
[
"c#",
"jquery",
".net",
"ajax"
] |
5,561,222 | 1 | 5,561,285 | null | 1 | 410 |
I'm trying to construct a page layout that will look something like this:

In this case, A, B and C are three divs that house 100% of the page height. The goal is to construct the CSS so that A and C are static heights and B is the variable that fills the space.
What's the best way to go about this?
|
Accordion Page Layout CSS Question
|
CC BY-SA 2.5
| 0 |
2011-04-06T03:47:06.633
|
2019-09-11T06:02:44.293
|
2011-04-06T03:54:12.880
| 346,666 | 346,666 |
[
"html",
"css"
] |
5,561,236 | 1 | null | null | 4 | 6,785 |
Of all the different controls that there are for Win32, is there any basic, Splitter/Splitcontainer control available (meaning one or two C/C++ files )?
I can't seem to find any in the default controls shown in Visual Studio, and everything I find online seems to be for MFC, which I'm not using in my project...

|
Win32 Splitter Control
|
CC BY-SA 2.5
| 0 |
2011-04-06T03:50:40.653
|
2019-07-02T13:42:04.237
| null | null | 541,686 |
[
"winapi",
"controls",
"splitter"
] |
5,561,277 | 1 | null | null | 1 | 1,031 |
I'm working on a library in Visual Studio 2010 that consumes a third party web service as a web reference (not a WCF service reference).
When running in debug mode, if a developer steps into one of the web methods provided by the third party web service Visual Studio will try and attach a remote debugger and step into the server. As expected, this fails.
> Unable to automatically step into the server. Connection to the server machine 'XYZ' failed. The debugger cannot connect to the remote computer. This may be because the remote computer does not exist or a firewall may be preventing communication to the remote computer. Please see Help for assistance.

How can I indicate to the Visual Studio 2010 debugger that is shouldn't attempt to step into this web service?
The easiest approach would be for developers to step over the applicable lines rather than into them, but I'd like to find a more reliable solution.
I've tried using the [System.Diagnostics.DebuggerHidden] and [System.Diagnostics.DebuggerStepThrough] attributes on the methods that invoke the web methods but the error still occurs.
|
Prevent Visual Studio 2010 attempting remote debugging of a web service
|
CC BY-SA 2.5
| null |
2011-04-06T03:59:00.767
|
2012-09-20T18:44:56.963
|
2011-04-06T08:32:47.523
| 54,026 | 54,026 |
[
"web-services",
"visual-studio-2010",
"debugging"
] |
5,561,357 | 1 | 5,616,003 | null | 4 | 1,185 |
I have a non-straight line defined by a series of x, y coordinate points. I could draw a straight line on-screen directly between these points with no problem. Unfortunately, I have to draw the line in segments of equal length.
Here is an example of how I need to break up a non-straight line with 3 points into an array of several equidistant points. (ignore the final red dot, it is the result when a line does not divide evenly and is also the terminus)

Please notice the red line at the "joint". Consider that I have a line A->B->C with the vectors AB and BC forming some angle. Basically, the line bends at point B.
Segmenting a line between point A and B is no problem up to a point. But when AB does not divide evenly by the segment length, I need to do something special. I need to take that remaining length and consider it as one side of a triangle. The constant segment length is another side of a triangle that connects with the BC segment (the red line above). I need to know the length from point B to this intersection. With this information, I can continue calculating line segments on BC.
[Here is the triangle I am trying to solve](http://upload.wikimedia.org/wikipedia/commons/4/49/Triangle_with_notations_2.svg) (hereafter I will refer to the variables as they appear on this picture)
So far I have broken down the problem to using the law of cosines. c = a + b - 2ab * Cos()
The problem is that I already know c, it is the segment length. I need to solve for a (I can calculate y).
I've gotten as far as writing a polynomial equation, but now I am stuck:
a + b - 2ab * Cos() - c = 0
or Ax + Bx + C (A = 1, B = -2b * Cos(), C = b - c, x = a)
Is this even the right approach? What do I do next? I need to implement this in Actionscript.
EDIT: Duh, I would have to use the quadratic formula. So I now get:
a = b * Cos() +/- SqrRoot(c - b * Sin())
Now how to put this into code...
|
How do I break a non-straight line into even segments?
|
CC BY-SA 2.5
| 0 |
2011-04-06T04:13:10.350
|
2015-03-03T12:23:47.553
|
2015-03-03T12:23:47.553
| 1,118,321 | 602,680 |
[
"actionscript-3",
"geometry",
"polynomial-math",
"trigonometry",
"line-segment"
] |
5,561,541 | 1 | null | null | 0 | 563 |
Error in the following XML :
```
<?xml version="1.0" encoding="utf-8"?>
<VideoView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/videoView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
```
The error shown is :
Multiple annotations found at this line:
- The processing instruction target matching "[xX][mM][lL]" is not
allowed.
- No grammar constraints (DTD or XML schema) detected for the
document.

Request someone to let me know how can i resolve it.
|
videoView XML file is showing error !
|
CC BY-SA 2.5
| 0 |
2011-04-06T04:41:06.827
|
2012-01-05T08:01:36.567
|
2011-04-06T06:23:11.813
| 313,042 | 335,429 |
[
"android"
] |
5,561,789 | 1 | 5,563,580 | null | 2 | 2,134 |
For the system that I'm currently working on, it needs to have a very similar look-n-feel to facebook's wall page for each user. This is how each post look:

A checkbox, Avatar + name, a WC id, categories (user defined), actual text of the post, and a 'link bar' with , etc., (different for each type of post)

However with the styles/layouts that I've been playing with for quite a while, I've been unable to get it to look 'right'. Here is how it lands up looking like (The outer border is only for illustration purposes. For some reason an overlap happens with the unordered list and the post button. Screenshot on Chrome).
Here is the CSS:
```
.listOfPosts{
list-style-type:none;
margin:0px;
padding:0px;
border-style:solid;
border-width:1px;
}
.post {
display:block;
margin-right:35px;
margin-top:10px;
margin-bottom:10px;
padding:3px;
}
.avatarColumn {
text-align:center;
float:left;
margin-right:2px;
}
.avatarColumn a:link, .avatarColumn .authorName a:link {
padding:2px;
text-align:center;
text-decoration:none;
}
.postDetails, .categorizationDetails, .actionsNavBar {
list-style-type:none;
}
.postDetails li {
display:block;
}
.categorizationDetails li, .actionsNavBar li{
display:inline;
float:left;
}
.actionsNavBar li a {
padding:2px;
}
.wcid {
font-weight:bold;
color:black;
}
.category {
background-color:red;
color:white;
font-weight:bold;
margin-left:1px;
margin-right:1px;
}
```
and here is the HTML that I'm trying to style. It need not be represented this way but I of presenting it as such. Suggestions are more than welcome if it should be differently :) (div 'main' is 560px in width and is the center column in a 3 column layout)
```
<div id="main">
<div id="postArea">
<form action="/ezbay/wincondition" method="post" enctype="application/x-www-form-urlencoded" name="winconditionform">
<textarea name="wincondition" id="wincondition"></textarea>
<button id="postwincondition" type="submit">Post</button>
</form>
</div>
<ul class="listOfPosts">
<li class="post">
<div class="avatarColumn">
<a href="#"><img src="defaultavatar.gif" width="86" height="51" /></a>
<div class="authorName"><a href="#">Nupul</a></div>
</div>
<div class="postDetailsContainer">
<ul class="postDetails">
<li>
<ul class="categorizationDetails">
<li class="wcid">WC1</li>
<li class="category">FR</li>
<li class="category">Interface</li>
</ul>
</li>
<li>The posts should be similar in look and feel to that of facebook style wall posts, with the necessary indentation for Issues/options</li>
<li>
<ul class="actionsNavBar">
<li><a href="#" class="actionNavBarLink">Agree</a></li>
<li><a href="#" class="actionNavBarLink">Comment</a></li>
<li><a href="#" class="actionNavBarLink">Raise Issue/Concern/Risk</a></li>
</ul>
</li>
</div>
</li>
</ul>
</div>
```
Any ideas on how to get it 'right' :) For now I didn't add the checkbox nor the 'time elapsed since post' but I guess that shouldn't be difficult once I get the layout right. JQuery-based solutions are fine too :)
Thanks!
PS: Here's the code for the textarea and the button just in case:
```
textarea#wincondition {
min-width:496px;
max-width:496px;
min-height:100px;
resize:none;
border-width:1px;
border-style:solid;
border-color:#999;
overflow:hidden;
}
button#postwincondition {
float:right;
margin-top:4px;
font-weight:bold;
border-width: 2px;
border-style:solid;
border-color: #3B5998;
background-color: #3B5998;
color:#FFF;
width:70px;
}
```
|
Styling for a facebook-like wall with wall posts
|
CC BY-SA 2.5
| null |
2011-04-06T05:19:53.483
|
2011-04-07T04:12:35.150
| null | null | 609,074 |
[
"jquery",
"html",
"css"
] |
5,562,123 | 1 | 5,562,148 | null | 0 | 53 |
I just minified a script using [this](http://closure-compiler.appspot.com/home) tool and noticed the line "The code may also be accessed at default.js". Here's a pic:

How long will this link stay good for? Is it safe for me to use this in my script tags?
|
How long does the closure compiler default.js last for?
|
CC BY-SA 2.5
| null |
2011-04-06T06:08:23.730
|
2013-02-24T19:37:44.327
| null | null | 465,546 |
[
"javascript"
] |
5,562,122 | 1 | 5,562,418 | null | 2 | 8,426 |
I am trying to install Microsoft visual studio Professional 2010 on my Windows XP SP3 edition. I am getting the error "vs_setup.msi could not be open" :

I have seen some forums mentioning the same problem for different reasons, and mostly because of having a previous version of Microsoft visual studio installed, but this is the first time for me to install it.
Note: The actual setup files are in the path "G:\Visual Studio 2010 Professional". I do not know why the setup is trying to look for vs_setup.msi inside the "G:" directly ! Of course it is not there.
|
Error while installing Microsoft visual studio Professional 2010
|
CC BY-SA 2.5
| null |
2011-04-06T06:08:23.210
|
2015-12-07T18:50:49.687
| null | null | 147,381 |
[
"visual-studio-2010",
"installation"
] |
5,562,180 | 1 | 5,562,389 | null | 1 | 926 |
I have this image link:
```
<%= link_to image_tag(comment.user.profile.photo.url(:tiny)), profile_path(comment.user.profile), :class => "comment_image" %>
```
and I want to wrap a div containing 1. text and 2. a list with a link and text around that image link. I want the image to be on the left, and the div to be on the right wrapping around the image.

|
How do you get this div to wrap around an image link?
|
CC BY-SA 2.5
| null |
2011-04-06T06:15:55.470
|
2011-04-06T07:12:57.950
|
2011-04-06T06:44:47.563
| 421,109 | 421,109 |
[
"ruby-on-rails",
"css",
"ruby",
"ruby-on-rails-3",
"positioning"
] |
5,562,650 | 1 | 5,563,220 | null | 0 | 185 |
In my project i am having two forms BillEntry and CustomerEntry.
In CustomerEntry new customers are added.

Here when new button is pressed i am opening a new form of CustomerEntry, here BillEntry form is already open at the back of the CustomerEntry form. I dont want my BillEntry form to close..
Here the Customer combobox will not take the new customer entered in customerentry..
I am binding the customer combobox in the constructor of the BillEntry form with LINQ...
And binding combobox on combobox enter event is also not working..
Please show me the way how can i do it...
linq query or the code is not the problem.
the problem is where can i call the binding method which binds the combobox?
```
public BillEntry()
{
InitializeComponent();
Customer_Binding();
}
private void Customer_Binding()
{
DataClasses1DataContext db = new DataClasses1DataContext();
cbx_customer.DisplayMember = "CustomerName";
cbx_customer.ValueMember = "CustomerID";
cbx_customer.DataSource = db.Customers;
}
```
|
how to bind a combobox automatically when Customer is entered in CustomerEntry form
|
CC BY-SA 2.5
| null |
2011-04-06T07:08:45.943
|
2011-04-06T08:05:12.483
|
2011-04-06T07:51:28.340
| 406,427 | 406,427 |
[
"c#",
"winforms",
"binding"
] |
5,562,681 | 1 | 5,562,780 | null | 0 | 3,119 |
I cant even get to work the [PrimeFaces showcase](http://www.primefaces.org/showcase/ui/treeTable.jsf) code at all. What is the type of the Document` in the JavaBean code? In the older version of the free User Guide there is a different type of implementation for this TreeTable component.

Which implementation is correct? Is the Showcase showing wrong code?
|
PrimeFaces TreeTable is not working
|
CC BY-SA 2.5
| null |
2011-04-06T07:11:31.340
|
2011-08-07T11:25:21.603
| null | null | 569,497 |
[
"primefaces"
] |
5,562,791 | 1 | null | null | -1 | 286 |
how to create a customized audio player.like the pic tagged below...in genral if i am to play an audio..i get the default audio player..

|
play audio in iphone
|
CC BY-SA 2.5
| null |
2011-04-06T07:24:54.320
|
2011-04-06T07:32:30.847
| null | null | 652,878 |
[
"objective-c",
"xcode"
] |
5,562,939 | 1 | 5,563,035 | null | 3 | 1,039 |
I have a code like this;
```
GridView1.FooterRow.Cells[11].Text = String.Format("{0:c}", sumKV)
```
In my computer this code gives a result like that;

But when I upload this code to my virtual machine it looks like this;

means Turkish Liras. But I don't want to show the currency. I just want numbers.
I also don't want to change the formating of numbers. (Like 257.579,02)
How can I only delete in this code?
|
String.Format Same Code Different View
|
CC BY-SA 3.0
| null |
2011-04-06T07:39:16.363
|
2014-06-14T13:20:13.547
|
2014-06-14T13:20:13.547
| 320,120 | 447,156 |
[
"c#",
"asp.net",
"string-formatting",
"currency",
"money-format"
] |
5,562,967 | 1 | 5,564,077 | null | 0 | 2,065 |
I have a Rounded Border containing a ComboBox as follow:

As soon as my mouse hover on the ComboBox, I get this

I want to get rid of the button-like background. I tried setting background to white or null in , , ... everything with Mouse but still I can't get rid of the default button background on the ComboBox. Does anyone has a clue?
Code below:
```
/* XAML */
<Border CornerRadius="11" BorderThickness="1" Height="24" Width="70"
Grid.Column="1" Margin="5,5,5,5" VerticalAlignment="Center"
HorizontalAlignment="Left" Background="White">
<ComboBox x:Name="comboBox1" BorderBrush="{x:Null}"
Background="{x:Null}" Width="70" MouseMove="MouseHover"
MouseEnter="MouseHover"
</ComboBox>
</Border>
/* C# code */
private void MouseHover(object sender, RoutedEventArgs e)
{
comboBox1.Background = null;
}
```
|
How to change ComboBox's Background Property during Mouse Hover
|
CC BY-SA 3.0
| null |
2011-04-06T07:42:01.483
|
2013-07-08T06:18:20.267
|
2013-07-08T06:18:20.267
| 1,484,900 | 529,310 |
[
"c#",
"wpf",
"combobox"
] |
5,563,071 | 1 | 5,569,645 | null | 0 | 819 |
I have j2ee web project in IntelliJ IDEA with complex web resource directory structure

Where to find analogue of this setting in Eclipse?
|
Intelliji idea to eclipse migration. Where to find same settings for IntelliJ IDEA's "Web Resource Directory Path Dialog" in Eclipse?
|
CC BY-SA 2.5
| null |
2011-04-06T07:50:01.473
|
2011-04-06T16:12:47.197
|
2011-04-06T11:47:03.930
| 575,350 | 575,350 |
[
"eclipse",
"web-applications",
"jakarta-ee",
"intellij-idea",
"web-project"
] |
5,563,178 | 1 | 5,563,251 | null | 0 | 2,633 |
how to detect sql data changes to refresh cache data?i have cache algorith . i know caching . But i want to need some special usage to detect any changes in sql. How to make it below?BUT I NEED some advice and performance

|
how to detect sql data changes to refresh cache data?
|
CC BY-SA 2.5
| 0 |
2011-04-06T08:00:59.240
|
2011-04-06T08:08:33.737
| null | null | 298,875 |
[
"c#",
".net",
"sql-server",
"visual-studio"
] |
5,563,279 | 1 | 5,565,173 | null | 0 | 92 |
This one is related to my [previous question on the performance of Arrays and Hashes in Ruby](https://stackoverflow.com/questions/5551168/performance-of-arrays-and-hashes-in-ruby).
### Prerequisites
I know that using Hashes to store lots of Objects leads to significant performance increase because of the lookup.
Now let's assume I had two classes, namely `A` and `B` and they can be related to each other, but only if a third class `C` exists (it's sort of a relationship class). To give a practical example, let's say I have `Document`, `Query` and the relationship class `Judgement` (this is from information retrieval, so basically the judgement tells you whether the document is relevant for a query or not).

(I hope I got this right)
### The Problem
In most cases you'd like to find out how many `Judgements` there are for a combination of `Document` and `Query` or if there are any.
In order to find out the latter, I'll iterate over each `Jugdement` ...
```
@judgements.each { |j| return true if j.document == document and j.query == query }
```
Now, this brings us back to a linear search again, which isn't that helpful.
### How to solve it?
I was thinking about a way to have double Hashes - if there's such a thing - so that I could just look up `Judgements` using the `Document` and `Query` I already have.
Or is there any other way of quickly finding out whether a Judgement exists for a given pair of Document and Query?
|
Performance optimization for implementation of relationship classes in Ruby
|
CC BY-SA 2.5
| null |
2011-04-06T08:10:54.793
|
2011-04-06T13:26:27.113
|
2017-05-23T11:48:22.880
| -1 | 435,093 |
[
"ruby",
"performance",
"hash"
] |
5,563,536 | 1 | 5,563,971 | null | 4 | 7,288 |
Does anyone know how to style the background property of a WPF ComboBox when a mouse is hovering on top of it?

I cannot get rid of the blue-ish button like background off the ComboBox.
|
Unable to style WPF ComboBox on Mouse Hover
|
CC BY-SA 2.5
| 0 |
2011-04-06T08:34:24.247
|
2011-04-06T09:10:43.753
| null | null | 529,310 |
[
"c#",
"wpf",
"combobox"
] |
5,563,619 | 1 | 6,126,859 | null | 11 | 1,649 |
I recently uploaded a new application to the Android Market ([this application](https://market.android.com/details?id=de.nichtlustig.android)).
I also uploaded a hi-res application icon, a feature graphic and a promotional graphic.
However, the promotional graphic gets a ugly JPEG compression. This is the image I uploaded:

This is what the Android Market makes out of it:

Interestingly, the Android Market seems to convert it to a JPEG image, but preserves the .png file extension. Is this a bug?
Here is what I tried to solve the problem:
1. Checked that the image has no alpha transparency, is 24bit and has the right resolution (as described here).
2. Created a PNG with optimized palette of 256 colors and uploaded it. It still gets converted to JPEG, although the original PNG file is smaller than the resulting JPEG file.
3. Created a JPEG with low compression and uploaded it - but the problem is the same.
Is anybody having the same problem? What did you do to fix it?
Thanks a lot for helping!
|
How to prevent the Android Market from JPEG-compressing the Promotional Graphic PNG?
|
CC BY-SA 2.5
| 0 |
2011-04-06T08:40:40.660
|
2019-08-10T03:30:31.533
|
2011-04-06T18:54:23.780
| 446,461 | 446,461 |
[
"android",
"google-play"
] |
5,563,828 | 1 | 5,566,397 | null | 3 | 1,505 |
i was trying to parse public json flickr feed into iphone.i m getting an error..
```
-JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x4b43100 {NSLocalizedDescription=Unrecognised leading character}"
).....
```
below is the json feed:
[http://api.flickr.com/services/feeds/photos_public.gne?tags=hackdayindia&lang=en-us&format=json](http://api.flickr.com/services/feeds/photos_public.gne?tags=hackdayindia&lang=en-us&format=json).....
i d be so greatful if you guys could help me out
|
parsing json feeds into iphone
|
CC BY-SA 2.5
| 0 |
2011-04-06T08:58:58.373
|
2011-04-07T04:54:35.837
|
2011-04-07T04:17:49.807
| 652,878 | 652,878 |
[
"objective-c",
"xcode"
] |
5,563,845 | 1 | 5,676,439 | null | 0 | 2,531 |
I'm trying to make a bar chart with two Y-axes. The problem is that the two datasets overlap, like this:

What I want is something like this: (but with the right Y-axis mapped to the second dataset)

I'd like to solve this without using the workaround shown in the demos ( specifically JFreeChart: Dual Axis Demo 5), where you add null values to the datasets to shift the bars into position. This solution would be very complicated to implement with the way I process data into datasets.
Can anyone give me some pointers?
|
Jfreechart: bar chart overlap
|
CC BY-SA 3.0
| 0 |
2011-04-06T09:00:51.723
|
2012-01-03T04:07:05.120
|
2012-01-03T04:07:05.120
| 977,676 | 480,228 |
[
"jfreechart"
] |
5,564,104 | 1 | 5,564,151 | null | 3 | 6,862 |
I have a Rounded Border that contains a ComboBox
```
<Border CornerRadius="10" BorderBrush...>
<ComboBox Background="{x:Null}">
<ComboBoxItem ...>
<ComboBoxItem ...>
</ComboBox>
</Border>
```
When my mouse is not hovering on top of the Combobox, it looks nice and transparent. Like this:

When the mouse hovers on it, it then produce the old, Button-like, background, like this:

I would like the ComboBox to have with a transparent background even when mouse is hoving on top. I tried various ways including writing MouseEnter, MouseLeave, MouseMove to set the background to null, but with no success.
```
private void ComboBox_MouseEnter(object sender, RoutedEventArgs e)
{
comboBox1.Background = null;
}
```
I then try to set the Styling:
```
<Window.Resources>
<Style TargetType="{x:Type ComboBox}" x:Key="HoverBox">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Pink" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
```
that didn't work either. Then I tried modifying the control template:
```
<ControlTemplate TargetType="{x:Type ComboBox}" x:Key="MouseHover">
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Red" />
<Setter Property="Foreground" Value="Green" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
```
Worst, after I modify the Control template the ComboBox disappear, like follow:

I have done everything possible, but I am still getting that ugly button-background on my ComboBox whenever my mouse is hover on it.
Anyone knows what's going wrong here?
|
How to style ComboBox Background on Mouse Hover?
|
CC BY-SA 2.5
| 0 |
2011-04-06T09:21:17.107
|
2015-05-11T17:27:19.390
|
2011-04-06T10:02:48.687
| 529,310 | 529,310 |
[
"c#",
"wpf",
"combobox"
] |
5,564,460 | 1 | null | null | 1 | 791 |
I want to merge or import a column of data from one data table created in VB.NET to another data table's 'same-named' column.
The destination data table has all the required columns created before hand but the source data table contains one column at a time, whose name is the same as that of one of the columns in destination data table.
Whatever coding I have done for the same till now, results in blank rows at starting. The destination data table looks like this:

And I want it to be displayed it as:

Regards
|
Import/Merge a particular column with data from one data table to another
|
CC BY-SA 2.5
| null |
2011-04-06T09:51:53.157
|
2011-04-13T09:34:35.900
|
2011-04-06T09:57:31.447
| 585,255 | 585,255 |
[
"vb.net",
"import",
"merge",
"datatable"
] |
5,564,600 | 1 | 5,570,204 | null | 1 | 181 |
i read many join questions here but unable to understand and create my own to get the right result i want.
i have three tables for now that is ,, friends table have two columns friend_id and member_id
1. all three tables have member_id common primary id of members table
2. now i want to get all the status created by members and member's friends
3. if i have three members with id's 1,2,3
4. friends table have id's 1,2 so these two becomes friends of each other
5. 2 have 5 status updates and 1 have 2 status and 3 have 1 updates in status table
6. if i query against member 2 it should return 7 record...( 5 for 2 and 2 for 1 ) and should not return record of member 3.
7. if i query against member 1 it should return same record as for point 5.
do i need change in my tables structure ? please help how to get the record the way i want

|
join with where condition
|
CC BY-SA 2.5
| null |
2011-04-06T10:04:36.633
|
2011-04-07T00:17:43.700
|
2011-04-06T10:17:02.830
| 646,987 | 55,860 |
[
"mysql",
"join"
] |
5,564,795 | 1 | 5,564,856 | null | 5 | 8,910 |
I hav a `UITableViewCell` and `UITableView` in a single view.Clicking on particular row of `UITableView` ,It navigates to anotherViewController.But I am not able to navigate to otherViewController on clicking `UITableViewCell`.How can i do this??
For `UITableView` I am using this code:
```
-(void)pushView1:(id)sender{
if(edController == nil)
edController = [[EditableDetailCell alloc] initWithNibName:@"EditableDetailCell" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:edController animated:YES];
}
- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
UITableViewCell *tbcel;
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
tbcel.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
tbcel.layer.cornerRadius = 15;
tbcel.text = aBook.Name;
switch(indexPath.section)
{
case 0:
cell.text = aBook.Address;
break;
case 1:
cell.text = aBook.Phone;
break;
case 2:
cell.text = aBook.Purchase;
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(edController == nil)
edController = [[EditableDetailCell alloc] initWithNibName:@"EditableDetailCell" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:edController animated:YES];
}
```

What should I do for UITableViewCell??

|
UITableViewCell and UITableView (did select a row) navigation to otherViewcontroller
|
CC BY-SA 3.0
| null |
2011-04-06T10:20:55.070
|
2018-03-15T08:20:46.333
|
2018-03-15T08:20:46.333
| 8,882,062 | 10,441,561 |
[
"iphone"
] |
5,564,830 | 1 | 5,568,011 | null | 2 | 11,214 |
I'm sure I'm not the only one, but I cannot parse/return anything when jQuery takes a request to lookup an address when the data being requested is the `latitude` and `longitude` so Google can return the data, but it cannot be read by jQuery?
```
http://maps.googleapis.com/maps/api/geocode/json
```
With parameters:
```
latlng=51.276914,1.077252
&sensor=false
```
In Firebug it says `200 OK` but nothing is displayed in the response:

I can see it when I open it: [http://maps.googleapis.com/maps/api/geocode/json?latlng=51.187296,1.229086&sensor=false&_=1302084865163](http://maps.googleapis.com/maps/api/geocode/json?latlng=51.187296,1.229086&sensor=false&_=1302084865163)
What I did was:
```
$.ajax(
{
url: 'http://maps.googleapis.com/maps/api/geocode/json',
data: 'latlng=' + geolocation + '&sensor=false',
dataType: 'json',
cache: false,
success: function(data){ alert(data); }
});
```
That doesn't work... neither `$.get`, `$.getJSON` with the `json` `dataType`.
Why can't jQuery parse/read the response?
|
Parsing Google Geo API (Reverse Geocoding) with jQuery
|
CC BY-SA 3.0
| null |
2011-04-06T10:24:10.373
|
2017-02-20T12:56:48.103
|
2011-09-14T08:45:18.780
| 476,681 | 264,795 |
[
"jquery",
"json",
"geolocation",
"google-maps-api-3"
] |
5,564,884 | 1 | 5,620,190 | null | 0 | 132 |
In Xcode 4, I have detached a new window and configured it to only show the logs via the . I want it to display the log for the current application launch.
Each time I relaunch my application, I have to click on this window to select the most recent log.
How can I tell Xcode to automatically do this for me?
The little clock button at the bottom of this window helps a bit by having only the most recent log entry displayed, but I still need to manually select it.

|
Automatically select most recent log entry in Xcode 4
|
CC BY-SA 2.5
| null |
2011-04-06T10:28:37.543
|
2011-04-11T10:47:43.563
| null | null | 272,342 |
[
"logging",
"xcode4"
] |
5,564,947 | 1 | 5,564,984 | null | -1 | 75 |

I just wondering if one plugin could handle all of this.
Content Filtering, Sorting and Pagination launch Ajax request (then retrrieves DB information) that returns JSON object
The excellent DataTables plugin can manage this, but it's for table and since I don't want to encapsulate my contents in table rows, I don't want to use it. Besides I need something lighter.
|
Any jQuery plugin that handles this kind of User Interface?
|
CC BY-SA 2.5
| 0 |
2011-04-06T10:33:56.337
|
2014-12-01T12:19:44.723
|
2011-04-06T12:26:11.483
| 822,837 | 822,837 |
[
"jquery",
"ajax",
"dom",
"user-interface"
] |
5,565,023 | 1 | 5,565,123 | null | 0 | 486 |
How can i implement this in a TabActivity?

|
Android App UI tab... is this UI possible?
|
CC BY-SA 2.5
| null |
2011-04-06T10:41:04.897
|
2011-05-29T06:26:42.923
|
2011-05-29T06:26:42.923
| 750,987 | 448,005 |
[
"android",
"user-interface"
] |
5,565,103 | 1 | null | null | 1 | 485 |
In Live Templates we can define our own variables. And when creating expression from our live template, cursor "jumps" to the place, where our variable is used, highlighting that place with red borders.
```
private function $NAME$($ARGS$):$RETURN_TYPE$ {
$END$
}
```
Here: `$NAME$`, `$ARGS$`, and `$RETURN_TYPE$`.
Can I define such variable and places in File > Templates? I believe I could because MXML components are created in such a way through file templates.

I looked up MXML Component file templates, but there is just a `${Parent_component}` variable there. But when I try to define such variables, then I'm expected to set their values at text inputs before creating file from template.
|
IntelliJ IDEA 10 file templates
|
CC BY-SA 3.0
| null |
2011-04-06T10:47:50.997
|
2014-05-10T02:58:43.010
|
2014-05-10T02:58:43.010
| 1,079,354 | 592,882 |
[
"intellij-idea"
] |
5,565,311 | 1 | 5,565,785 | null | 0 | 135 |
First of all I want to show how I made this in SQL:

Both the location and environment table will never contain more than those four rows. Each log can only be associated with 4 rows.
What I don't understand is how do I even start writing code that will take whatever the user has chosen, based on state switches etc in my UI and persist this?
Because when the user are done I want to store a "log-record", and the log-record may have location and environment rows associated with it. And what happen when the user let say, choose all the location rows, four times a row....does it add the location to the location "entity" every time? Would I end up with a lot of duplicated data? I would appreciate any help that can show me how to do this. Thank you!
|
Need Core Data help to insert objects
|
CC BY-SA 2.5
| null |
2011-04-06T11:06:04.187
|
2011-04-06T11:44:41.567
| null | null | 454,049 |
[
"iphone",
"core-data"
] |
5,565,303 | 1 | 5,565,417 | null | 0 | 283 |
i am having a view consisting of a tableview and a uibutton like this
when i click on button "add" a new class/xib named "Locsetting" should be open.which i am not able to do.
my code: .h file
```
@interface LocationViewController : UIViewController <UITableViewDelegate,UITableViewDataSource>
{
UITableView *table;
NSMutableArray *menuList;
LocSetting *locSetting;
IBOutlet UIButton *addbutton;
}
@property (nonatomic,retain) NSMutableArray *menuList;
@property (nonatomic,retain) IBOutlet UITableView *table;
@property (nonatomic,retain) LocSetting *locSetting;
@property (nonatomic, retain) IBOutlet UIButton *addbutton;
-(IBAction)gotoLocSetting:(id) sender;
@end
My .m :
@synthesize addbutton;
-(IBAction)gotoLocSetting:(id) sender {
NSLog(@"gotoLocSetting Entered");
locSetting = [[LocSetting alloc]
initWithNibName:@"LocSetting"
bundle:nil];
//locationViewController.menuList = [menuList objectAtIndex:indexPath.row];
[self.navigationController pushViewController:locSetting
animated:YES];
[locSetting release];
}
```
what wrong i am doing?or please guide me!
Thanks
|
Not able to push next view after clicking a uibutton which is on the top right of the view
|
CC BY-SA 2.5
| null |
2011-04-06T11:05:26.270
|
2011-04-06T11:14:58.493
|
2011-04-06T11:10:12.000
| 692,770 | 490,953 |
[
"iphone"
] |
5,565,360 | 1 | 5,565,534 | null | 2 | 2,226 |
I'm sorry I can't be more specific, but I don't know how to describe my problem in the title.. respectively I don't know how to search for similar question.
So here is the deal. I have this table with records:

As you can see, I have data, entered on different months with different type. My goal is to get the last entered amount grouped by type and this should be limited by date.
For example:
> If I specify a date 2011-03-01, the query should return 3 records with amount - 10, 20 and 30, because for type=1 the nearest inserted record to '2011-03-01' is on date 2011-01-01 with amount 10. For type=2 the nearest date to '2011-03-01' is 2011-02-01 with amount 20. And for type=3 the nearest to '2011-03-01' is the '2011-03-01' so it returns amount=30.
So how to form the MySQL query?
|
Get nearest records to specific date grouped by type
|
CC BY-SA 3.0
| null |
2011-04-06T11:10:04.937
|
2017-05-06T12:08:31.230
|
2017-05-06T12:08:31.230
| 1,905,949 | 382,246 |
[
"mysql",
"date",
"group-by",
"records"
] |
5,565,349 | 1 | 5,565,411 | null | 1 | 298 |
I created two threads [here](https://stackoverflow.com/questions/5563466/layout-is-broken-after-uploading-to-web-server) and
[here](https://stackoverflow.com/questions/5563466/layout-is-broken-after-uploading-to-web-server) about that internet explorer works in quirks mode and that broke the layout. After a bit of investigation I found that somehow php make some mess.
For example If I run the code below as html page on web server IE parse it correctly.I`m using small CMS, so if I divide the code in three parts lets say header main footer (CMS combine them) then IE show quirks mode and the layout is broken. The html output from php file is the same as that below.
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body{
font: 11px Tahoma, Verdana, Arial, sans-serif;
color: #707070;
background: #8c2727 url('../img/bgr_red.png') repeat-x;
}
a {
color:#bc2828;
text-decoration:none;
font-weight: bold;
outline: none;
}
#wrapper{
position: relative;
width: 960px;
margin: 70px auto;
background-color: #fff;
border: 1px solid red;
}
</style>
</head>
<body>
<div id="wrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</body>
</html>
```
I belive that the problem is in CMS. But what could broke the doctype ?
EDIT:
Here is screenshot from Fiddler

|
Somehow php broke doctype
|
CC BY-SA 2.5
| null |
2011-04-06T11:09:29.790
|
2011-04-06T11:42:17.103
|
2017-05-23T11:48:22.880
| -1 | 634,072 |
[
"php",
"html",
"css"
] |
5,565,720 | 1 | 5,565,815 | null | 0 | 773 |
I want to create an arrow using CSS only
Example you can see [http://jsfiddle.net/b9Yfc/](http://jsfiddle.net/b9Yfc/)
On
```
<div id="arrow"><div id="arrow-inner"></div></div>
```
I want `arrow-inner` will be place into `arrow` and result should be like

How to achieve my goal?
|
How do I make two arrows in css
|
CC BY-SA 2.5
| null |
2011-04-06T11:40:01.083
|
2011-04-06T13:09:46.047
|
2011-04-06T13:09:46.047
| 468,793 | 520,725 |
[
"html",
"css"
] |
5,565,949 | 1 | 5,566,042 | null | 8 | 20,203 |
Are there any samples similar to this? Android horizontal scroll view... Or how can I go about this?

|
Android UI - Android horizontal scroll view
|
CC BY-SA 3.0
| 0 |
2011-04-06T11:58:00.087
|
2014-01-11T08:12:28.817
|
2014-01-11T08:12:02.830
| 63,550 | 448,005 |
[
"android",
"horizontalscrollview"
] |
5,566,157 | 1 | 5,956,949 | null | 7 | 5,091 |
3I'm changing the width of a file input HTML tag:
```
<input type="file" id="newFilename" name="Filename">
input[type="file"] {width:380px !important}
```
In Firefox 3, Chrome and Safari it works perfectly.
In Firefox 4 I cant get it to work. The width remain the same!
Demo: [http://jsfiddle.net/LwzW9/1/](http://jsfiddle.net/LwzW9/1/)
Checking with Firebug I noticed that the size of the `<input>` changes, but I don't really see the changes: (see image)

Any ideas? Is this a known bug?
Thanks.
|
Firefox 4 file input width bug?
|
CC BY-SA 2.5
| 0 |
2011-04-06T12:15:09.587
|
2011-05-10T21:53:15.840
|
2011-04-06T13:01:18.207
| 63,651 | 63,651 |
[
"html",
"css",
"firefox",
"firefox4"
] |
5,566,390 | 1 | null | null | 2 | 969 |
I need to "stabilize" the text rendering in an application when I use canvas scaling.
I have the following code:
```
<Window x:Class="WpfApplication4.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="356" Width="804">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollViewer
PreviewMouseWheel="ScrollViewer_PreviewMouseWheel" Grid.Row="0">
<Canvas>
<Canvas.LayoutTransform>
<TransformGroup>
<ScaleTransform x:Name="scaleTransform"/>
</TransformGroup>
</Canvas.LayoutTransform>
<TextBlock Canvas.Left="34" Canvas.Top="47" Height="23" Name="textBlock1" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Ideal, Aliased" TextOptions.TextFormattingMode="Ideal" TextOptions.TextRenderingMode="Aliased" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="34" Canvas.Top="81" Height="23" Name="textBlock2" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Ideal, ClearType" TextOptions.TextFormattingMode="Ideal" TextOptions.TextRenderingMode="ClearType" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="35" Canvas.Top="115" Height="23" Name="textBlock3" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Ideal, Grayscale" TextOptions.TextFormattingMode="Ideal" TextOptions.TextRenderingMode="Grayscale" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="310" Canvas.Top="46" Height="23" Name="textBlock4" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Display, Aliased" TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="Aliased" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="309" Canvas.Top="79" Height="23" Name="textBlock5" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Display, ClearType" TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="309" Canvas.Top="112" Height="23" Name="textBlock6" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Display, Grayscale" TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="Grayscale" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Canvas.Left="188" Canvas.Top="157" FontSize="11" Height="23" Name="textBlock11" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Default" FontFamily="Times New Roman" FontWeight="Bold" />
</Canvas>
</ScrollViewer>
<TextBlock Grid.Row="1" Height="23" Name="textBlock8" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Default, static; Times New Roman, 11" FontSize="11" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Grid.Row="2" FontSize="11" Height="23" Name="textBlock9" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; DISPLAY, static; Times New Roman, 11" TextOptions.TextFormattingMode="Display" FontFamily="Times New Roman" FontWeight="Bold" />
<TextBlock Grid.Row="3" Height="23" Name="textBlock7" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; Default, static; Arial, 16" FontSize="16" FontWeight="Bold" />
<TextBlock Grid.Row="4" FontSize="16" Height="23" Name="textBlock10" Text="TK QSDFWPO Aàâéèêëîïôùûüÿçæœ; DISPLAY, static; Arial, 16" TextOptions.TextFormattingMode="Display" FontWeight="Bold" />
</Grid>
</Window>
```
When you paste it in the Visual Studio, press Ctrl and Scroll in designer, you will see, that the default under 15 size is blurry.
And the option `DISPLAY` of the `TextFormattingMode` does is broken if I zoom the canvas.
How to avoid this small text blurriness problem when using `ScaleTransform`?


|
WPF small text rendering and scaling
|
CC BY-SA 2.5
| null |
2011-04-06T12:31:23.743
|
2011-04-06T12:48:21.943
|
2011-04-06T12:48:21.943
| 185,593 | 185,593 |
[
".net",
"wpf",
"text-rendering"
] |
5,566,627 | 1 | 5,566,771 | null | 0 | 988 |
please i would like to change the color of the info Dark button shown in the picture(top right) to be visible.

|
[iPhone]changing the color of the info dark button
|
CC BY-SA 3.0
| null |
2011-04-06T12:50:27.947
|
2014-03-03T00:09:00.247
|
2014-03-03T00:09:00.247
| 1,947,286 | 602,257 |
[
"iphone",
"objective-c",
"cocoa-touch"
] |
5,566,798 | 1 | 5,567,595 | null | 5 | 10,129 |
I have 4 divs with ids A, B, C and D, like below;
```
<div id="A"></div>
<div id="content">
<div id="B"></div>
<div id="C"></div>
</div>
<div id="D"></div>
```
Div A & D have fixed width & height. Div B has fixed width. I want the height of Div B and height + width of Div C calculated automatically. I want to stretch Divs B and C in between div A and D. Also I want to stretch Div c in between div B and right margin. The page thus wont be having any scroll bars and empty space.
My expected layout is like below

How can I make this possible using jquery / css?? Anybody has a solution and pls give me a fiddle / demo ??
Thanks in advance...`:)`
blasteralfred
|
How to auto adjust (stretch) div height and width using jQuery or CSS
|
CC BY-SA 3.0
| 0 |
2011-04-06T13:03:20.983
|
2012-08-11T13:38:16.487
|
2012-08-11T13:38:16.487
| 484,082 | 484,082 |
[
"javascript",
"jquery",
"css"
] |
5,567,004 | 1 | 5,567,936 | null | 0 | 1,475 |
I have a problem when i use the JPA feature "Generate Tables from Entities" in eclipse.
I managed to do all of my ORM mappings for my project, but there is just one that is making me trouble.
The console says this:
> Internal Exception: java.sql.SQLSyntaxErrorException: 'OFFER_ID' is not a column in table or VTI 'COMMENT'.
Error Code: -1
This is an image of how the tables should look like:

...
This is how the entities look like:
The entity comment:
```
@Entity
public class Comment {
// Attributes
@Id
@GeneratedValue
@Column(nullable = false)
private Long id;
...
@ManyToOne
@JoinColumn(name = "OFFER_ID", nullable = false)
private Offer offer;// One comment must belong to one offer
...Getters and setters
```
The entity Offer:
```
@Entity
public class Offer {
//...Other attributes
@OneToMany(mappedBy = "offer")
private List<Coupon> coupons;//One offer can have many coupons
@OneToMany(mappedBy = "offer")
private List<Comment> comments; //One offer can have many comments
... getters and setters
```
In the class Offer on purpose i pasted the relationship the class offer has with another class called coupons, as you see it is exactly the same as the one that offer should have with the class Comment.
So what is the problem?
Why one relationship gets mapped and other no?
Why the new created table in the database COMMENT does not have a column called OFFER_ID?
How can i fix it?
|
Object relational mapping with JPA Tools: Generate Tables from Entities feature
|
CC BY-SA 2.5
| 0 |
2011-04-06T13:18:56.110
|
2011-04-07T05:28:37.467
|
2011-04-06T13:40:15.613
| 614,141 | 614,141 |
[
"java",
"sql",
"orm",
"jpa",
"jakarta-ee"
] |
5,567,021 | 1 | 5,567,698 | null | 3 | 1,674 |
I have wired issues in IE. While I'm browsing my asp.net mvc application which is deployed locally, everything is working as expected. Some annoying differences appears, while I'm browsing my system when it is deployed on different host.
In both cases, I'm using the same instance of IE, installed locally on my primary computer.
Suppose I have defined class in css file:
```
.field-required:before
{
color: red;
content: "*";
font-weight: bold;
}
```
I have also simple label, which uses this class:
```
<label class="field-required" for="UserName"> Username </label>
```
When the system is deployed locally, such code renders this way:
[http://localhost/system/page](http://localhost/system/page)

The same code deployed on remote server (named host2), accessed from second tab of my IE browser installed locally on my primary computer, renders as follows:
[http://host2/system/page](http://host2/system/page)

Why is the red star not shown in the second case? While I'm using firefox everything works as expected. Is there turned on any security policy or something while accessing remote pages in IE, which disables some functionality? Yesterday I had a problem with JSON, which was not recognized, while I was browsing my system deployed remotely. Everything worked when the same system was deployed locally. But still, I'm using the same instance of IE. Since this is the same browser, what is going on?
This is the entire source
```
<!DOCTYPE html>
<html>
<head>
<style>
.field-required:before
{
color: red;
content: "*";
font-weight: bold;
}
</style>
</head>
<body>
<div><label class="field-required" for="UserName">Username</label></div>
<div><input id="UserName" name="UserName" type="text" value="" /></div>
</body>
</html>
```
Caching is not the problem
|
IE - differences in behaviour between system deployed locally and remotely
|
CC BY-SA 3.0
| null |
2011-04-06T13:20:10.337
|
2012-04-06T14:34:07.103
|
2012-04-06T14:34:07.103
| 866,022 | 270,315 |
[
"asp.net",
"css",
"internet-explorer"
] |
5,567,130 | 1 | 5,676,554 | null | 6 | 1,869 |
I have an asp.net web application that I am making available to mobile devices. Im using jQuery and jqMobile for the functionality and styling.
The application works great in safari, google chrome, on the iPhone, iPad, and Android devices but I cant get it working on anything other than the Blackberry torch. I have a requirement to get it working on version 5 and 6 blackberry devices but it seems the ajax request for logging in is always calling the error function and I cant see why.

The application contains a few pages but I cant even get past the login page on the blackberry. Has anyone else managed to get ajax calls working on the blackberry? I dont really want to have a seperate set of pages just for blackberrys'
Here is the code for the login page aspx
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Sicon.Web.WAP.App.Pages.Mobile.Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<link href="../../JavaScripts/jquery.mobile.min.css" rel="stylesheet" type="text/css" />
<script src="../../JavaScripts/jquery.min.js" type="text/javascript"></script>
<script src="../../JavaScripts/jquery.mobile.min.js" type="text/javascript"></script>
</head>
<body>
<form id="login" runat="server" accept-charset="utf-8">
<div id="Invoices" data-role="page" data-theme="b">
<div data-role="header" data-theme="b">
<h1>
WAP - Login</h1>
</div>
<div data-role="content" data-theme="b">
<div align="center">
<img src="Sicon_LogoHz_rgb72.png" />
</div>
<ul data-role="listview" data-inset="true">
<li>
<input type="text" value="" name="username" placeholder="Username" id="username" />
</li>
<li>
<input type="password" value="" name="password" placeholder="Password" id="password" />
</li>
</ul>
<a class="login" data-role="button" data-theme="b">Login</a> <a data-role="button"
data-theme="a">Cancel</a>
</div>
</div>
</form>
<script type="text/javascript">
var _ajaxEnabled = true;
$(document).ready(function()
{
_ajaxEnabled = $.support.ajax;
});
//Get base URL
var baseUrl = "<%= ResolveUrl("~/") %>";
//Function to resolve a URL
function ResolveUrl(url)
{
if (url.indexOf("~/") == 0)
{
url = baseUrl + url.substring(2);
}
return url;
}
//Login form Login link click
$("#login a.login").click(function (e) {
//Get the form
var $form = $(this).closest("form");
//Perform login
return app.login($form);
});
//Login form submit
$("#login").submit(function (e) {
//Get the form
var $form = $(this);
//Perform login
return app.login($form);
});
//class to handle login
var app = {
login: function ($form) {
var $Username = $("#username").val();
var $Password = $("#password").val();
//Call the approve method on the code behind
$.ajax({
type: "POST",
url: ResolveUrl("~/Pages/Mobile/Login.aspx/LoginUser"),
data: "{'Username':'" + $Username + "', 'Password':'" + $Password + "' }", //Pass the parameter names and values
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
error: function (jqXHR, textStatus, errorThrown) {
alert("Error- Status: " + textStatus + " jqXHR Status: " + jqXHR.status + " jqXHR Response Text:" + jqXHR.responseText) },
success: function (msg) {
if (msg.d == true) {
window.location.href = ResolveUrl("~/Pages/Mobile/Index.aspx");
}
else {
//show error
alert('login failed');
}
}
});
return false;
}
}
</script>
</body>
</html>
```
And finally the code behind for the login method:
```
/// <summary>
/// Logs in the user
/// </summary>
/// <param name="Username">The username</param>
/// <param name="Password">The password</param>
/// <returns></returns>
[WebMethod, ScriptMethod]
public static bool LoginUser( string Username, string Password )
{
try
{
StaticStore.CurrentUser = new User( Username, Password );
//check the login details were correct
if ( StaticStore.CurrentUser.IsAuthentiacted )
{
//change the status to logged in
StaticStore.CurrentUser.LoginStatus = Objects.Enums.LoginStatus.LoggedIn;
//Store the user ID in the list of active users
( HttpContext.Current.Application[ SessionKeys.ActiveUsers ] as Dictionary<string, int> )[ HttpContext.Current.Session.SessionID ] = StaticStore.CurrentUser.UserID;
return true;
}
else
{
return false;
}
}
catch ( Exception ex )
{
return false;
}
}
```
|
jQuery blackberry ajax problems
|
CC BY-SA 3.0
| 0 |
2011-04-06T13:27:52.290
|
2013-09-08T05:38:41.057
|
2011-04-12T12:57:59.990
| 428,404 | 428,404 |
[
"asp.net",
"jquery",
"jquery-mobile",
"blackberry-simulator"
] |
5,567,193 | 1 | 5,567,439 | null | 2 | 272 |
I have 2 array's with the same length. array `$gPositionStudents` and array `$gPositionInternships`. Each student is assigned to a different internship, That part works.
Now I want the first element (index 0) of `$gPositionStudent` refer to the second (index 1) element of array `$gPositionInternship`. That implicitly means that the last element of `$gPositionStudents` refer to the first element of `$gPositionInternship`. (I included a picture of my explanation).

My Code is:
```
// Make table
$header = array();
$header[] = array('data' => 'UGentID');
$header[] = array('data' => 'Internships');
// this big array will contains all rows
// global variables.
global $gStartPositionStudents;
global $gStartPositionInternships;
//var_dump($gStartPositionInternships);
$rows = array();
$i = 0;
foreach($gStartPositionStudents as $value) {
foreach($gStartPositionInternships as $value2) {
// each loop will add a row here.
$row = array();
// build the row
$row[] = array('data' => $value[0]['value']);
//if($value[0] != 0 || $value[0] == 0) {
$row[] = array('data' => $gStartPositionInternships[$i]);
}
$i++;
// add the row to the "big row data (contains all rows)
$rows[] = array('data' => $row);
}
$output = theme('table', $header, $rows);
return $output;
```
Now I want that I can choose how many times, we can shift. 1 shift or 2 or more shifts. What I want exists in PHP?
|
shift array without indexOfOutBounds
|
CC BY-SA 2.5
| null |
2011-04-06T13:32:24.197
|
2011-04-06T13:50:10.193
|
2011-04-06T13:49:40.653
| 454,533 | 642,760 |
[
"php",
"arrays"
] |
5,567,292 | 1 | 5,570,425 | null | 2 | 416 |
I have a problem with a custom LinearLayout I'm creating for an application. Basically, the LinearLayout contain items, each item is a horizontal LinearLayout which contains a TextView and a Button. The LinearLayout is populated correctly, however, when I press the button (which has a background a custom background: selector) unexpected behaviour is happening. What's happening is that the button changes is appearance only on the last element of the LinearLayout, which doesn't make any sense.
The code that populates the LinearLayout is as follows:
```
View template = null;
if (items.size() > 0) {
for (int i = 0; i < items.size(); i++) {
template = inflate(getContext(), R.layout.views_custom_list_item, null);
template.setBackgroundDrawable(getProperBackgroundDrawable(i, items.size() - 1));
TextView text = (TextView)template.findViewById(R.id.custom_list_text);
text.setText(items.get(i));
Button button = (Button)template.findViewById(R.id.custom_list_button);
button.setId(i);
button.setBackgroundDrawable(backgroundButton);
button.setOnClickListener(callListener);
addView(template);
template = null;
}
}
```
I'm inflating an XML which contains the layout for each item, and then I set the properties accordingly. All that code is contained in a custom class which inherits from LinearLayout. Do you know where the problem is? thanks
This is my view,

And it doesn't matter what item I presse I get this,

This is the item XML:
`
```
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/custom_list_text"
android:textSize="15sp"
android:textColor="@color/black"
android:paddingLeft="5dip" android:paddingRight="5dip"
android:layout_weight="1"
android:gravity="left" />
<ImageButton android:layout_width="wrap_content" android:layout_height="wrap_content"
android:id="@+id/custom_list_button"/>
```
`
The XML on the main layout:
`<com.example.views.CustomLayoutView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/custom_phone_directory" android:layout_margin="5dip" xx:background_single="@drawable/button_complete" xx:background_top="@drawable/button_top" xx:background_middle="@drawable/button_middle" xx:background_bottom="@drawable/button_bottom" xx:button_background="@drawable/button_phone_selector" /> </LinearLayout>`
|
Unexpected behaviour while clicking a button contained in a custom LinearLayout
|
CC BY-SA 2.5
| null |
2011-04-06T13:39:48.347
|
2011-04-06T17:22:47.040
|
2011-04-06T16:32:36.517
| 694,906 | 694,906 |
[
"android",
"button",
"android-linearlayout"
] |
5,567,307 | 1 | 5,567,422 | null | 3 | 23,487 |
I am trying to reduce the margins between and within a couple of select boxes. So it is the margin between the selects and inside the select. If I shrink the width of the select, it cuts off the selected option but leaves the margin.
```
<html>
<body>
<select>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
</select>
<select>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
</select>
</body>
</html>
```
How can I make this:

Look like this:

|
html: margins in and around select input
|
CC BY-SA 2.5
| null |
2011-04-06T13:40:51.993
|
2013-12-10T10:48:49.950
|
2011-04-06T13:51:09.683
| 464,257 | 374,593 |
[
"html",
"css"
] |
5,567,532 | 1 | 5,567,823 | null | 3 | 5,848 |
I am trying to implement the following background for the application...

For the background image(application background) ... i am setting the image in setContentView(layout)... by adding this line, i am getting a runtime exception...
if i set this background in the subactivities..i wont get the background to fill the full application background.. any idea whats the alternative?
```
public class HMITabActivity extends TabActivity{
private TabHost tabHost = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.background);
tabHost = getTabHost();
tabHost.setOnTabChangedListener(new OnTabChangeListener() {
@Override
public void onTabChanged(String tabId) {
setTabHostColors();
}
});
tabHost.addTab(tabHost.newTabSpec("Tasks")
.setIndicator("Tasks", getResources().getDrawable(R.drawable.icon_task))
.setContent(new Intent(this, Tasks.class)));
tabHost.addTab(tabHost.newTabSpec("HMI")
.setIndicator("HMI", getResources().getDrawable(R.drawable.icon_hmi))
.setContent(new Intent(this, HMI.class)));
tabHost.addTab(tabHost.newTabSpec("Diagnostics")
.setIndicator("Diagnostics", getResources().getDrawable(R.drawable.icon_diagnostics))
.setContent(new Intent(this, Diagnostics.class)));
tabHost.addTab(tabHost.newTabSpec("About")
.setIndicator("About", getResources().getDrawable(R.drawable.icon_info))
.setContent(new Intent(this, Tasks.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
Intent intent = new Intent(BackgroundService.class.getName());
startService(intent);
}
private void setTabHostColors() {
for(int i=0;i<tabHost.getTabWidget().getChildCount();i++) {
tabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.rgb(1, 1, 1)); //unselected
}
tabHost.getTabWidget().getChildAt(tabHost.getCurrentTab()).setBackgroundColor(Color.rgb(50, 120, 160)); // selected
}
}
```
|
Android UI TabActivity issue
|
CC BY-SA 3.0
| 0 |
2011-04-06T13:55:59.937
|
2018-04-16T08:55:49.650
|
2018-04-16T08:55:49.650
| 1,000,551 | 448,005 |
[
"android",
"android-layout",
"tabactivity"
] |
5,567,815 | 1 | 5,568,102 | null | 2 | 118 |
I need to decide on the optimal way to write a C# client application to view the dataset in a number of different views. One, some or all views may be visible at once and must be coherent.
A simplified illustration of the dataset would be something like this, assume around 10000 items.

Based on this dataset a number of aggregates must be calculated, such as the sum of values for each ItemId and for each ClientId. The actual calculations are a bit more complicated, but assume that around 30 different aggregates must be calculated.
There will be around 10 clients that will view the data at any one time. Each user will decide if the data is continuously updated or refreshed automatically.
The data is stored in SQL Server 2008 R2 and all clients have access to this directly and are on the same LAN.
The UI needs to be non-blocking, so that new data can be read in the background and the active views refreshed when all aggregates have been calculated.
1. What architecture/technology/pattern is best suited to this sort of scenario?
2. Should I use WPF, Windows Forms or Silverlight?
3. Should the views be pre calculated on the server or should the client do this processing?
4. Should the client connect directly to the database or via a WCF service?
|
What is the best architectural choice for viewing aggregates of a constantly changing dataset?
|
CC BY-SA 2.5
| null |
2011-04-06T14:15:31.993
|
2011-04-06T20:24:44.767
| null | null | 224 |
[
"c#",
"wpf",
"winforms",
"silverlight",
"architecture"
] |
5,567,911 | 1 | 5,584,756 | null | 3 | 5,580 |
>
[Changing scaling of MATLAB Figure](https://stackoverflow.com/questions/2456027/changing-scaling-of-matlab-figure)
I have an m-size vector f. By calling `plot(f)` MATLAB plots a graph of x=1..m as a function of f:

I would still like a graph of f as a function of 1..m, but I want the numbers on the x axis to be 5,15,25,...,95 (`fake_x = 5:10:95`).
In other words: I want the graph to be exactly the same (f as a function of x=1..m), but the x axis should be `fake_x`, not x.
|
How do I rescale the X axis in MATLAB's plot function?
|
CC BY-SA 2.5
| null |
2011-04-06T14:21:52.133
|
2011-04-07T16:57:17.527
|
2017-05-23T12:30:38.833
| -1 | 110,028 |
[
"matlab",
"plot"
] |
5,568,113 | 1 | null | null | 1 | 1,478 |
When you create a VSTO Workbook project in Visual Studio, VS creates a new Excel (xlsx) file and allows you to edit directly from within Visual Studio. The Excel workbook appears in a new tab, alongside any code or forms:

To support this, Visual Studio needs to run an instance of `EXCEL.EXE` at .
The problem is that unfortunately, instead of always running its own instance, if it finds one already running it will use that one. So if for some reason I had Excel already open on my PC, Visual Studio will reuse that instance.
This causes several problems: if Excel was running a long computation, it will freeze Visual Studio; if in VS I open a modal Excel window (e.g. cell or font properties), it freezes my existing Excel window (the one outside VS). If VS crashes, the Excel.exe still has a handle on the project's excel file, but I can't kill it because of my other open files in Excel. And finally, if I happened to have Excel 2003 open on the PC, and my project is using Excel 2007, VS will attempt to use the 2003 instance currently running, which will then be confused at being asked to open a 2007 file, try to convert it, etc., which results in a complete mess.
The only solution I have found is to close ALL `EXCEL.EXE` instances, only after run VS, open the VSTO project, VS will then find no running instances of excel and run its own, and then I can re-open my previously opened files in new instances which I open myself. This is not always possible though and can be a real pain, so I would like to find a way of making VS open its own, personal new instance every time.
|
VSTO: Visual Studio designer reusing running Excel instance instead of starting its own
|
CC BY-SA 2.5
| 0 |
2011-04-06T14:33:59.907
|
2014-08-07T02:15:00.910
| null | null | 10,786 |
[
"c#",
"excel",
"vsto"
] |
5,568,445 | 1 | 5,568,561 | null | 2 | 390 |
I'm sorry for such a silly question, but I can not fathom the name of this component and no amount of googling is yielding results. It's like a dialog window in a chat that holds views. I it's a standard UI component (possible in a later version of android).

|
What is this Android Widget called?
|
CC BY-SA 3.0
| null |
2011-04-06T14:55:26.033
|
2017-07-13T01:16:56.350
|
2017-07-13T01:16:56.350
| 4,409,409 | 399,390 |
[
"java",
"android",
"user-interface"
] |
5,568,463 | 1 | 5,645,222 | null | 0 | 146 |
I have installed skinr module. In that there is an option to select
I don't have idea how to implement it.
Here is the screenshot below.. Thanks in advance...

|
How to create template file for skinr module in drupal?
|
CC BY-SA 2.5
| null |
2011-04-06T14:56:51.460
|
2011-04-13T06:25:12.030
| null | null | 154,137 |
[
"drupal-6",
"drupal-modules"
] |
5,568,517 | 1 | null | null | 0 | 886 |
My scenario is the following:
I have a workflow (lets call it customActivity1) that do the basic actions for my system. I also have another workflow (customActivity2) that uses customActivity1 and do higher level actions. When I call customActivity1, I must pass on a few parameters, like Boolean or String values. I want to show some of these parameters as a checkbox or combobox (so the developer of customActivity2 can pass on only valid values) and found out that I can do that by setting the argument as PROPERTY (instead of In).
By doing a research, I also found out that you can’t directly use this argument in expressions, so I keep getting errors on my customActivity1.
That said and knowing that I need to narrow what the designer can pass on, how could I do that without using an activity designer or where could I find an answer?
I also attached two pictures, one of what I need and the other of the error I’m getting.


Thanks in advance.
|
WF4 Argument as Property
|
CC BY-SA 2.5
| null |
2011-04-06T14:59:44.467
|
2011-04-06T20:19:47.933
| null | null | 666,708 |
[
"properties",
"workflow-foundation-4",
"variable-assignment",
"arguments"
] |
5,568,579 | 1 | 5,577,880 | null | 2 | 599 |
Here's the component I'm working on:

And here's the component's class:
```
public class PromoPanel extends Canvas
{
private var corner:PromoCorner;
private var text:Text;
private var roundedMask:Sprite;
private var cornerUpdated:Boolean = false;
private var textUpdated:Boolean = false;
private var container:Canvas;
public function PromoPanel()
{
super();
// Defining corner's properties
corner.addEventListener(MouseEvent.Roll_Over, objectHandler);
corner.addEventListener(MouseEvent.Roll_Out, objectHandler);
// Defining text's properties
roundedMask = new Sprite;
roundedMask.mouseChildren = false;
roundedMask.mouseEnabled = false
container = new Canvas;
container.percentWidth = 100;
container.minHeight = 100;
container.maxHeight = 345;
container.setStyle('backgroundColor', 0xffffff);
container.addChild(corner);
container.addChild(text);
container.horizontalScrollPolicy = 'off';
this.addChild(container);
}
public function update():void{
var s:String = 'blabla';
text.addEventListener(FlexEvent.UPDATE_COMPLETE, updateHandler);
text.text = s;
corner.addEventListener(MyEvent.CORNER_UPDATED, updateHandler);
corner.build();
}
private function updateHandler(e:Event):void{
switch(e.type){
case MyEvent.CORNER_UPDATED:
cornerUpdated = true;
corner.removeEventListener(MyEvent.CORNER_UPDATED, updateHandler);
break;
case FlexEvent.UPDATE_COMPLETE:
textUpdated = true;
text.removeEventListener(FlexEvent.UPDATE_COMPLETE, updateHandler);
break;
}
if(cornerUpdated && textUpdated){
roundedMask.graphics.clear();
roundedMask.graphics.beginFill(0xFFFFFF);
roundedMask.graphics.drawRoundRect(0, 0, container.width, container.height, 20, 20);
roundedMask.graphics.endFill();
this.mask = roundedMask;
dispatchEvent(new MyEvent(MyEvent.PROMO_UPDATED));
}
var glow:DropShadowFilter = new DropShadowFilter(0,0,0x2E2E2E,0.6,10,10,0.5,1);
this.filters = [glow];
}
private function objectHandler(e:Event):void{
switch(e.type){
case MouseEvent.ROLL_OUT:
trace('out' + mouseX + '/' + mouseY);
break;
case MouseEvent.ROLL_OVER:
trace('on' + mouseX + '/' + mouseY);
break;
}
}
...
}
```
For more detailed comprehension: corner is the black corner with the (i) and 'Promotion', text is some random text that can be displayed in the white remaining space, container contains corner and text, and finally this class contains container!
What do I need to do?
I need to retrieve the event mouseevent.rollover/rollout from corner .
And what's wrong?
1. When I put the mask on container (container.rawchildren.addchildren + container.mask = mask) and the dropshadowfilter on container (container.filters = [glow]), I cannot detect the mouse events.
2. When I put the mask on the promopanel (this.rawchildren.addchildren + this.mask = mask) and the dropshadowfilter on promopanel (this.filters = [glow]), I cannot detect the mouse events.
3. When I put the mask in a component and the filter in another, it does not work either.
4. If I remove the mask OR the filter, it works!! But I need them both...
So, does anyone has an idea on how to make this work? I've been trying to look for issues with filters, masks and mouseevents but haven't found anything that could enlighten this issue...
Anything would be helpful and feel free to ask questions if something's not clear enough.
Thx!
Regards,
BS_C3
|
Flex 3 - Issues retrieving mouse events when using masks and filters
|
CC BY-SA 2.5
| null |
2011-04-06T15:03:18.597
|
2011-07-17T18:44:31.160
|
2011-04-07T08:02:56.120
| 184,298 | 184,298 |
[
"apache-flex",
"events",
"filter",
"mask"
] |
5,568,610 | 1 | 5,569,424 | null | 1 | 1,022 |
A made some nine-patches for my buttons in Android but they scale in an ulgy way. The weird thing is that they are only ugly in one specific Android project.

I have no idea what cause the nine-patch to scale bad. This is the XML used in the badly scaled project, it is the same in the good scaled project.
```
<Button
android:id="@+id/issueShare"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="5sp"
android:layout_marginRight="5sp"
android:background="@drawable/button"
android:text="Delen" />
```
|
Ugly nine-patches, not scaling right
|
CC BY-SA 2.5
| null |
2011-04-06T15:05:51.800
|
2011-04-06T15:58:45.583
|
2011-04-06T15:21:31.560
| 355,651 | 355,651 |
[
"android",
"nine-patch"
] |
5,568,768 | 1 | 5,568,796 | null | 0 | 81 |
I have this table with some styled tds (I put screenshot because the content of td is pretty big)

Now, I want to add some css to this table so I try to select its td by one if its classes and apply the style like:
```
jQuery(".graTabbedComponentDefaultTabs").parent('table').css('position','relative');
```
But nothing happens....Do you see the problem?
Thanks in advance.
|
why this jQuery does not work?
|
CC BY-SA 2.5
| null |
2011-04-06T15:17:18.847
|
2011-04-06T15:21:44.523
| null | null | 174,349 |
[
"jquery"
] |
5,568,880 | 1 | 5,569,729 | null | 0 | 251 |
I'm trying to understand locating leaked memory using Xcode4 and Instruments but I'm stuck at some point. I started recording the application and Instruments gathered the leaked memory.
So ok, I see the leaked blocks in the lower pane, but how can I understand which leaked block is related to which red bar? I assume that although all the blue bars indicate leaks, reds are the one that need real attention and so I want to know which block causes the red spike. I cannot click on a red bar to get further information about it. When I click on somewhere on the upper pane, all I got is a dashed line.
Need your directions, please.
|
How to understand which red bar is related to which leaked block in Instruments?
|
CC BY-SA 2.5
| null |
2011-04-06T15:25:55.427
|
2011-04-06T16:20:00.067
| null | null | 106,303 |
[
"memory-leaks",
"instruments"
] |
5,568,894 | 1 | null | null | 4 | 3,393 |
I'm having difficulties centering the text within a wx.TextCtrl (as shown in the photoshopped illustration below). -- For some reason, it always prints LEFT aligned, instead of CENTERED.

Could someone please point me to the proper "styles" OR tell me what I'm doing wrong?
```
import wx
class SimplePanel(wx.Panel):
def __init__(self, parent, id):
wx.Panel.__init__(self, parent, id, style=wx.BORDER_SUNKEN)
myTextCtrl = wx.TextCtrl(self, -1,
style=wx.TE_CENTRE,
size=(100, -1), pos=(10, 10))
if __name__ == '__main__':
app = wx.App()
frame = wx.Frame(None, -1, 'Simple Panel')
myPanel = SimplePanel(frame, -1)
frame.Show()
app.MainLoop()
```
|
Centering wx.TextCtrl?
|
CC BY-SA 2.5
| null |
2011-04-06T15:27:09.670
|
2011-05-24T02:10:51.360
|
2011-04-06T16:26:19.127
| 11,760 | 11,760 |
[
"python",
"wxpython"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.