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,803,352 | 1 | 5,805,474 | null | 10 | 4,344 |
I have a UITabBarController and I have set up its delegate method `didSelectViewController`, as I am interested in the index of the tab that is being selected.
However, I noticed that the `didSelectViewController` method doesn't get called when the user is in the "More" section (when there are more tabs than can be shown in the tabbar):

Is there a way for me to get notified of the items the user selects from the table that is being automatically created?
|
didSelectViewController not getting called when in "More" section
|
CC BY-SA 3.0
| 0 |
2011-04-27T11:31:28.923
|
2018-09-05T09:37:43.210
|
2011-04-27T11:42:11.597
| 361,230 | 361,230 |
[
"ios",
"delegates",
"uitabbarcontroller"
] |
5,803,410 | 1 | 5,885,361 | null | 1 | 508 |
I have an application that writes text with image asynchronously to the RixhTextBox. All works fine, except when i minimize window then restore it to check progress and all images after minimizing and before restoring are not floated to the next line. It looks like this:

Red line shows what happened while window was minimized.
Code that inserts text:
```
txtLog.AppendText(" ");
txtLog.InsertImage(Resources.OK);
txtLog.AppendText(" " + message + Environment.NewLine);
```
Dont understand what difference between minimized\maximized writing to RTB and how to resolve this.
|
Images issue in WinForms RichTextBox
|
CC BY-SA 3.0
| 0 |
2011-04-27T11:36:00.580
|
2011-05-04T14:51:11.273
| null | null | 344,895 |
[
".net",
"winforms",
"image",
"richtextbox",
"rtf"
] |
5,803,547 | 1 | 5,803,941 | null | 1 | 3,759 |
I am designing an admin interface where invite mails will be sent to users. My Invitation model is ready & in my invitation admin interface I am able to see my added users for which the admin can send email invites. 
now I want to customize this a bit. I want to add for each row a `SEND` button which will actually send an email to that user. Sending email function etc. are all ready. I am not getting as to how I can customize this admin template to add a `send` button. Can someone help ?? or atleast point me in the right direction...
it need not be a send button, it could be part of "action" dropdown where for the selected users I can jointly send emails.
|
Django Admin Customizing
|
CC BY-SA 3.0
| 0 |
2011-04-27T11:46:49.883
|
2011-04-27T12:21:29.793
| null | null | 147,019 |
[
"python",
"django",
"django-admin",
"django-templates",
"customization"
] |
5,803,663 | 1 | null | null | 2 | 2,877 |
Here is my code. First I recorded an audio file and started playing it. For playing the audio file
```
/**
*
* play the recorded audio
*
*/
public void playAudio() {
try {
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
Uri data = Uri.parse(path);
intent.setDataAndType(data, "audio/mp3");
startActivity(intent);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
// TODO: handle exception
}
}
```
and the output is calling the default media player of device. Here I need to show an image in that media player in the place of album image.
Here is an image of what I need:

|
Display an image in default media player of Android
|
CC BY-SA 4.0
| null |
2011-04-27T11:55:06.270
|
2020-02-08T15:10:27.093
|
2020-02-08T15:10:27.093
| 472,495 | 548,218 |
[
"android"
] |
5,803,863 | 1 | 5,884,987 | null | 5 | 1,171 |
The JTableHaeder has no 'pressed' highlighting by default. (Nimbus)
[NimbusDefaults](http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html) says it has a default [Pressed] background painter.
What should I do, to see this when i click on the TableHeader?

---
The `NimbusStyle.getExtendedState` returns the PRESSED on mouseDown correctly. But the `NimbusStyle.getBackgroundPainter(SynthContext)` returns `null` cause there is an `null` in the `NimbusStyle.Values` cache for the CacheKey with this state.
What is wrong there?
---
My example shows a JTableHeader and a JScrollBar with an 'Pressed Behavior'.
For the JScrollBar my `putClientProperty( "Nimbus.State" )` works with a repaint problem.
```
public class Header extends JPanel{
public Header() {
super(new BorderLayout());
JTableHeader header = new JTable(5, 3).getTableHeader();
JScrollBar scroll = new JScrollBar(JScrollBar.HORIZONTAL);
add(header, BorderLayout.NORTH);
add(scroll, BorderLayout.SOUTH);
scroll.addMouseListener( new PressedBehavior() );
header.addMouseListener( new PressedBehavior() );
}
static public void main( String[] s ) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
SwingUtilities.invokeLater( new Runnable() {
@Override
public void run() {
JFrame f = new JFrame("Nimbus Pressed Example");
f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
f.setBounds( 150, 150, 300, 200 );
f.getContentPane().add( new Header() );
f.setVisible( true );
}
});
} catch( Exception fail ) { /*ignore*/ }
}
private class PressedBehavior extends MouseAdapter {
@Override
public void mouseReleased( MouseEvent e ) {
JComponent source = (JComponent)e.getComponent();
source.putClientProperty( "Nimbus.State", null );
}
@Override
public void mousePressed( MouseEvent e ) {
JComponent source = (JComponent)e.getComponent();
source.putClientProperty( "Nimbus.State", "Pressed" );
//source.invalidate();
//source.repaint();
}
}
}
```
|
Nimbus TableHeader was not highlighted as 'pressed'
|
CC BY-SA 3.0
| 0 |
2011-04-27T12:11:04.980
|
2013-08-30T13:19:55.260
|
2013-08-30T13:19:55.260
| 203,657 | 307,767 |
[
"java",
"swing",
"look-and-feel",
"nimbus",
"jtableheader"
] |
5,803,909 | 1 | 5,804,220 | null | 0 | 67 |
I have the following model in my database, but I'm a bit confused on what I should do.
If I have the Seat table how it is, it will end up creating so many rows, A - 1, A - 2 etc
How can I have this data split so it doesn't do this? I wanted the seatRow and seatNumber separate so I can easily match the values around the program.
Thanks

|
Entity Model Help
|
CC BY-SA 3.0
| null |
2011-04-27T12:14:47.350
|
2011-04-28T01:29:47.803
| null | null | 251,671 |
[
"sql",
"database",
"database-design",
"entity-relationship",
"entities"
] |
5,804,256 | 1 | 5,804,278 | null | 699 | 219,996 |
Why in the [following code](http://jsfiddle.net/BZeLR/4/) the height of the `div` is bigger than the height of the `img` ? There is a gap below the image, but it doesn't seems to be a padding/margin.
```
#wrapper {
border: 1px solid red;
width:200px;
}
img {
width:200px;
}
```
```
<div id="wrapper">
<img src="http://i.imgur.com/RECDV24.jpg" />
</div>
```

|
Image inside div has extra space below the image
|
CC BY-SA 3.0
| 0 |
2011-04-27T12:40:35.840
|
2022-05-26T12:21:07.223
|
2016-01-22T17:54:19.367
| 1,811,992 | 247,243 |
[
"html",
"css",
"image"
] |
5,804,411 | 1 | 5,806,863 | null | 3 | 1,525 |
Ive got a container div with overflow:scroll;. It contains a tiled background div (width:100%; height: 100%;) with lots of draggable divs over the top.
When the draggable divs make the container div overflow, how do I get the tiled background to cover the overflow as well?

Thanks!
|
Scroll background-image with content when div overflows
|
CC BY-SA 3.0
| 0 |
2011-04-27T12:52:43.503
|
2011-04-27T15:47:28.923
| null | null | 473,141 |
[
"css",
"background",
"overflow"
] |
5,804,422 | 1 | null | null | 0 | 845 |
We have an ASP.net MVC Application deployed to Win Server 2008 R2 and IIS 7.5.
The problem is that application stopped writing events to event log
when we changed App Pool framework to 4.
But application still writes warnings and errors to event log from localhost.
Probably this section of our has to be changed.
```
<customErrors defaultRedirect="~/" mode="RemoteOnly" />
<compilation debug="false">
```
Also our App pool settings:

|
Web Application writes events to event log only from localhost
|
CC BY-SA 3.0
| null |
2011-04-27T12:53:09.937
|
2011-04-27T14:38:03.693
| null | null | 296,494 |
[
"web-applications",
"iis-7",
"event-log",
"application-pool",
"custom-errors"
] |
5,804,431 | 1 | 5,805,238 | null | 1 | 3,877 |
i have a simple structure for IPAD with an AppDelegate that include a view from a viewController :
```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
ClockVC *clockVC = [[ClockVC alloc]init];
clockVC.view.frame = CGRectMake(100, 100, clockVC.view.bounds.size.width, clockVC.view.bounds.size.height);
[self.window addSubview:clockVC.view];
[self.window makeKeyAndVisible];
return YES;
}
```
clockVC has a viewDidLoad defined by this code :
```
- (void)viewDidLoad {
[super viewDidLoad];
self.view.autoresizingMask = UIViewAutoresizingNone;
self.view.autoresizesSubviews = UIViewAutoresizingNone;
}
```
Bounds of clockVC are defined by IB and override in application:didFinishLaunching...
Width and Height are respectively 200 and 150.
ClockVC implements method for one-step auto-rotation :
/
```
/ Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
[UIView animateWithDuration:0.5
animations:^{self.view.alpha = 0;}
];
}
-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
[UIView animateWithDuration:1
animations:^{self.view.alpha = 1;}
];
}
```
At the first load the page is correctly viewed and clockVC view is in position.
When i rotate clockVC view (whose autoResizeMask is set to UIViewAutoresizingNon)resize to take the entire screen.
Why ?? i'd like to mantain initial size.
Here screenshots of my problem.
Before rotation:

After Rotation:

|
UIViewAutoresizingNone: Resize after rotation
|
CC BY-SA 3.0
| null |
2011-04-27T12:53:40.313
|
2011-04-27T13:53:32.227
| null | null | 499,990 |
[
"objective-c",
"ios",
"ipad",
"autoresizingmask"
] |
5,804,441 | 1 | 5,808,765 | null | 15 | 26,850 |
I have a rendering error in this website which I haven't seen anywhere else. The website renders in all modern browsers and validates fine although I can't figure out why is it not displaying the full background image (see screenshots below). I am using Yahoo CSS Reset and the background image is declared in the body like this:
```
background: url("back.jpg") #033049;
```
You can also visit the website: [http://xaviesteve.com/](http://xaviesteve.com/)


Let me know if I should provide any more details.
Any help/hint is appreciated, thank you.
I have found very few people reporting this issue around the Internet:
1. Another SO question: White space showing up on right side of page when background image should extend full length of page Suggested applying overflow-x:hidden but it crops the website.
2. In an iPad forum: http://www.ipadforums.net/ipad-development/9954-mobile-safari-doenst-show-background-image-when-page-slided-left.html No replies
I've been investigating and trying different ways to solve this and found that adding the background image to the `<html>` tag fixed the problem. Hope this saves some time to other devs.
```
body {background:url('images/back.jpg');}
```
```
html, body {background:url('images/back.jpg');}
```
|
Website body background rendering a right white margin in iPhone Safari
|
CC BY-SA 3.0
| 0 |
2011-04-27T12:54:22.197
|
2015-06-14T02:25:24.613
|
2017-05-23T12:30:38.833
| -1 | 217,180 |
[
"html",
"css",
"mobile-safari",
"iphone"
] |
5,804,468 | 1 | 5,806,123 | null | 13 | 15,035 |
I would like to draw a circular graph of nodes where certain nodes have a link between them. Here are a few examples from social network graphs:
[](https://i.stack.imgur.com/s1bTP.jpg)
[wrightresult.com](http://wrightresult.com/wp-content/uploads/social-network-circle5-lg.jpg)

[](https://i.stack.imgur.com/R33vn.jpg)
[twit88.com](http://twit88.com/blog/wp-content/uploads/2008/07/windowslivewriterjung-ed84jung-2.jpg)
How can this be done with MATLAB? Is it possible without installing a separate package?
|
Drawing a network of nodes in circular formation with links between nodes
|
CC BY-SA 4.0
| 0 |
2011-04-27T12:56:30.563
|
2019-08-10T07:42:12.680
|
2019-08-10T07:42:12.680
| 4,751,173 | 410,975 |
[
"matlab",
"graph",
"plot",
"graph-theory",
"graph-visualization"
] |
5,804,622 | 1 | 5,804,685 | null | 2 | 1,473 |
I'm developing an app with Arabic text in it.. My phone supports Arabic so the text gets displayed correctly.. the weird problem is that: if I copy an Arabic text that i want from a.txt file and put it into an EditText, the EditText displays weird characters, but if I write the SAME text manually (not copy-paste), the text gets displayed normally!!
Here is a picture showing what I mean, the first EditText is the text I wrote manually, and the second is the text I copy-pasted from the .txt file..

Here is the code of the app:

xml file:
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<EditText android:text="EditText" android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText>
<EditText android:text="EditText" android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content"></EditText>
</LinearLayout>
```
I hope you get what I mean, since it wasnt easy to explain this weird (stupid) problem. Thanks.
|
Certain Arabic text gets incorrectly shown while other Arabic text gets showed normally?
|
CC BY-SA 3.0
| null |
2011-04-27T13:08:37.817
|
2013-05-13T11:36:48.763
|
2013-05-13T11:36:48.763
| 527,702 | 668,082 |
[
"android",
"arabic",
"byte-order-mark",
"mojibake"
] |
5,804,713 | 1 | 6,036,391 | null | 0 | 974 |
I asked this over at the jQuery Tools official forum last week, but it's definitely not as active as stackoverflow, so thought I would ask over here as well.
On our project detail pages, we're dynamically loading content in that uses a vertical scroller to navigate through. Problem is that the height of the vertical scroller always seems to be one item too tall. I cannot find any way to affect this programmatically.
If I set it circular to true, it seems to have the correct height, but we don't want it to be continuous/circular.
Example here:
[http://www.centerline.net/projects/detail/?p=21](http://www.centerline.net/projects/detail/?p=21)
Unminified JS is here:
[http://www.centerline.net/lib/js/site-unmin.js](http://www.centerline.net/lib/js/site-unmin.js)
Any ideas?
Here's the view of what it should look like when scrolled to the last item (down arrow disappears, and does not allow a blank area below the last thumbnail.

|
jQuery Tools - Vertical Scroller One Item Too Long
|
CC BY-SA 3.0
| null |
2011-04-27T13:15:49.883
|
2011-05-17T20:00:33.800
|
2011-04-27T14:46:47.577
| 675,592 | 675,592 |
[
"javascript",
"jquery",
"css"
] |
5,804,844 | 1 | 5,806,795 | null | 32 | 50,268 |
I want to create a depth first search which I have been somewhat successful in.
Here is my code so far (Except my constructor, note the Vertex and Edge classes only contain properties, nothing important to post here):
```
private Stack<Vertex> workerStack = new Stack<Vertex>();
private List<Vertex> vertices = new List<Vertex>();
private List<Edge> edges = new List<Edge>();
private int numberOfVertices;
private int numberOfClosedVertices;
private int visitNumber = 1;
private void StartSearch()
{
// Make sure to visit all vertices
while (numberOfClosedVertices < numberOfVertices && workerStack.Count > 0)
{
// Get top element in stack and mark it as visited
Vertex workingVertex = workerStack.Pop();
workingVertex.State = State.Visited;
workingVertex.VisitNumber = visitNumber;
visitNumber++;
numberOfClosedVertices++;
// Get all edges connected to the working vertex
foreach (Vertex vertex in GetConnectedVertices(workingVertex))
{
vertex.Parent = workingVertex;
workerStack.Push(vertex);
}
}
}
private List<Vertex> GetConnectedVertices(Vertex vertex)
{
List<Vertex> vertices = new List<Vertex>();
// Get all vertices connected to vertex and is unvisited, then add them to the vertices list
edges.FindAll(edge => edge.VertexSource == vertex && edge.VertexTarget.State == State.Unvisited).ForEach(edge => vertices.Add(edge.VertexTarget));
return vertices;
}
```
Its working in the way that all vertices get visited, but not in the right order.
Here is a comparison of how mine gets visited compared to wikipedia:

Its seems mine is turned around and is beginning from right to left.
Do you know what causes it? (Also any advice on my implementation would be greatly appreciated)
EDIT: I got my answer, but still wanted to show the end result for the GetConnectedVertices method:
```
private List<Vertex> GetConnectedVertices(Vertex vertex)
{
List<Vertex> connectingVertices = new List<Vertex>();
(from edge in edges
where edge.VertexSource == vertex && edge.VertexTarget.State == State.Unvisited
select edge).
Reverse().
ToList().
ForEach(edge => connectingVertices.Add(edge.VertexTarget));
return connectingVertices;
}
```
|
Implementing Depth First Search into C# using List and Stack
|
CC BY-SA 4.0
| 0 |
2011-04-27T13:25:37.510
|
2019-09-20T19:26:49.540
|
2019-09-20T19:26:49.540
| 2,756,409 | 668,521 |
[
"c#",
"search",
"vertex",
"depth",
"edges"
] |
5,804,982 | 1 | 5,805,029 | null | 1 | 687 |
In , if I want to render the following shape:

I have to do something like:
```
var paper = Raphael("notepad", 320, 200);
var rect = paper.rect(...);
var line1 = paper.path(...);
var line2 = paper.path(...);
```
which create elements: `rect`, `line1`, `line2`.
BUT, I would like to treat the rendered shape as in other js code insteand of three. In Raphael, how can I create this shape which returns me just not three?
|
Raphael.js newbie question: how to create a rectangular and lines as ONE object?
|
CC BY-SA 3.0
| null |
2011-04-27T13:33:32.630
|
2011-04-28T16:31:03.150
|
2020-06-20T09:12:55.060
| -1 | 475,850 |
[
"javascript",
"raphael"
] |
5,804,972 | 1 | 5,816,122 | null | 2 | 453 |
I'm writing a jQuery plugin and I need to keep objects through my plugin method calls. So I tried to use `.data()` as recommended here : [http://docs.jquery.com/Plugins/Authoring](http://docs.jquery.com/Plugins/Authoring)
but I'm unable to retrieve my stored objects, here my code :
```
(function($) {
var methods = {
init : function(options) {
return this.each(function() {
var $this = $(this);
var geocoder = new google.maps.Geocoder();
var settings = {
'geocodeSearch': {address: 'France'}
};
// Merge default settings with user ones
if (options) {
$.extend(settings, options);
}
function drawMap(geocodeResult) {
var mapSettings = {
center: geocodeResult[0].geometry.location,
mapTypeControl: true,
mapTypeId: google.maps.MapTypeId.SATELLITE,
overviewMapControl: false,
panControl: true,
scaleControl: true,
streetViewControl: false,
zoom: 6,
zoomControl: true,
zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL }
};
var element = document.getElementById($this.attr("id"));
var map = new google.maps.Map(element, mapSettings);
var cluster = new MarkerClusterer(map);
cluster.setGridSize(100);
$this.data('eventsmap', {
cluster: cluster,
map: map
});
}
geocoder.geocode(settings.geocodeSearch, drawMap);
});
},
restrictZoom : function(minimalZoom, maximalZoom) {
return this.each(function() {
var $this = $(this);
console.log($this.data());
console.log($this.data('eventsmap'));
//google.maps.event.addListener(map, 'zoom_changed', function() {
// if (map.getZoom() > maximalZoom) {
// map.setZoom(maximalZoom);
// }
// if (map.getZoom() < minimalZoom) {
// map.setZoom(minimalZoom);
// }
//});
//cluster.setMaxZoom(maximalZoom-1);
});
}
};
$.fn.eventsMap = function(method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.eventsMap' );
}
};
})(jQuery);
```
When I call restrictZoom method, $this.data() (line 48) returns data from the DOM but if I try to get the 'eventsmap' attribute as set during the init method, I got undefined ($this.data('eventsmap') line 49).
I'm sure it's the right DOM object and my objects are because I can see them trhough my browser debugger :

I dunno what to do.
Edited : html :
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us" >
<head>
<title>Map tool | Django site admin</title>
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/ui-darkness/jquery-ui.css" />
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="/static/admin/css/ie.css" /><![endif]-->
<script type="text/javascript">window.__admin_media_prefix__ = "/static/admin/";</script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.js"></script>
<script type="text/javascript" src="/static/earthquake/js/markerclusterer.js"></script>
<script type="text/javascript" src="/static/earthquake/js/map.js"></script>
<meta name="robots" content="NONE,NOARCHIVE" />
</head>
<body class="eventsmap">
<!-- Container -->
<div id="container">
<!-- Header -->
<div id="header">
<div id="branding">
<h1 id="site-name">Events database</h1>
</div>
<div id="user-tools">
Welcome,
<strong>admin</strong>.
<a href="/admin/doc/">Documentation</a> /
<a href="/admin/password_change/">
Change password</a> /
<a href="/admin/logout/">
Log out</a>
</div>
</div>
<!-- END Header -->
<div class="breadcrumbs">
<a href="/admin/">Home</a> › <a href="/admin/events">Events</a> › Map tool
</div>
<!-- Content -->
<div id="content" class="colM">
<div id="eventsmap" style="width: 100%;"></div>
<script>
$(document).ready(function() {
var mapCanvas = $("#eventsmap");
// Cleanup and prepare HTML from Django
$("#footer").remove();
$("html").height("100%");
$("body").height("100%");
$("body").css("overflow-y", "hidden");
$("#content").css('margin', 0);
mapCanvas.height($(document).height()-57);
mapCanvas.eventsMap({
geocodeSearch: {address: 'France'}
});
mapCanvas.eventsMap('restrictZoom', {
minimalZoom: 2,
maximalZoom: 9
});
});
</script>
<br class="clear" />
</div>
<!-- END Content -->
<div id="footer"></div>
</div>
<!-- END Container -->
</body>
</html>
```
|
jQuery and .data()
|
CC BY-SA 3.0
| 0 |
2011-04-27T13:32:56.283
|
2015-11-15T23:52:16.230
|
2015-11-15T23:52:16.230
| 4,370,109 | 135,010 |
[
"javascript",
"jquery",
"jquery-data"
] |
5,805,100 | 1 | null | null | 0 | 2,544 |
I am trying to add web part under pagelayout. So I clicked on "WebPart" menu under ribbon control. Under this i can not see my web part. Feature is activate and web parts gallary also have web parts.
Earlier this was working fine but now I can not see my custom web parts.

|
Could not see custom web part under SharePoint Designer
|
CC BY-SA 3.0
| null |
2011-04-27T13:42:49.837
|
2013-04-05T16:10:56.520
| null | null | 130,948 |
[
"sharepoint-2010",
"sharepoint-designer"
] |
5,805,098 | 1 | 5,805,215 | null | 3 | 1,176 |
As a homework assignment for my introductory programming course I have to design and implement a program that generates a random number(1-100), then gives the player 7 guesses to correctly guess the number. I've come up with this algorithm:

However, I can't work out how to translate this conceptual representation of the algorithm into control structures. (We're using Pascal, so the structures available are if statements, pre-order loops, and post-order loops). Neither pre-order nor post-order looping fits for the inner loop, as the loop condition is in the middle of the loop and there are two exit points!
Could anybody give me a pointer on how to structure this more clearly?
|
How can I restructure this control flow to avoid use of goto?
|
CC BY-SA 3.0
| null |
2011-04-27T13:42:35.953
|
2011-04-27T14:00:35.333
| null | null | 183,458 |
[
"goto",
"flowchart",
"control-flow"
] |
5,805,222 | 1 | 5,805,510 | null | 0 | 168 |
I've made a JPQL to bring me one Object with a List of other Objects.
The thing that's happening is.
I've got 2 items in Novidade(DB).
I've got 2 items in ComentarioNovidade(DB).
1 of the items from Novidade, connects to all 2 items from ComentarioNovidade. The other has no ComentarioNovidade related.
JPQL returns a List of Novidade (it's supposed to be)
It's returning 3 Objects containing Novidade and ComentarioNovidade separated.

My JPQL is like this:
```
from Novidade as n left outer join n.comentariosNovidade
```
The class Novidade:
```
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="CodNovidade")
private Integer codNovidade;
@Column(name="Mensagem")
private String mensagem;
@Column(name="CodigoCidade")
private int codCidade;
@Column(name="CodigoBairro")
private int codBairro;
@Column(name="MesmoBairro")
private String mesmoBairro;
@OneToMany
@JoinColumn(name="CodNovidade")
private List<ComentarioNovidade> comentariosNovidade;
```
The class ComentarioNovidade:
```
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="CodComentarioNovidade")
private Integer codComentarioNovidade;
@Column(name="Comentario")
private String comentario;
@ManyToOne
@JoinColumn(name="CodNovidade")
private Novidade novidade;
@ManyToOne
@JoinColumn(name="CodUsuario")
private Usuario usuario;
```
|
Left join bringing 2 different objects
|
CC BY-SA 3.0
| null |
2011-04-27T13:52:40.503
|
2011-04-27T14:12:32.233
|
2011-04-27T14:00:06.287
| 509,865 | 509,865 |
[
"java",
"sql",
"hibernate",
"jpa",
"jpql"
] |
5,805,259 | 1 | 5,807,654 | null | 2 | 1,208 |
Using the .NET Micro Framework 4.1
I'm adding the following string keys (and string values, not relevant here) to a hashtable:
```
"eth::address"
"eth::netmask"
"eth::gateway"
"eth::dns"
"eth::port"
"com::baudrate"
"com::parity"
"com::databits"
"com::stopbits"
"com::handshake"
"com::read-timeout"
"com::write-timeout"
"drv::led-firmware-file"
"scr::width"
"scr::height"
"scr::colors"
```
When adding these to the HashTable no errors are thrown.
However, when looking at the properties & content of the hashtable
I can see the following:
16 buckets, but 6 of them have a null key and null value.
It's always the same ones.
What could be causing this?
Update:
There's not much code to post:
```
var settings = new HashTable(16);
settings.Add("eth::address", "192.168.1.1");
//Keep adding the settings mentioned above
```
No exceptions are thrown, in the end there are 16
items in the hashtable, starting with 3 valid ones, then a few null ones, then a few valid ones, etc....
There's nothing else involved as this is a simply a test case

If I try to get one of the values that "got lost",
an exception is thrown:
```
var x = settings["eth::port"];
```
Will result in:
```
A first chance exception of type 'System.Exception' occurred in mscorlib.dll
An unhandled exception of type 'System.Exception' occurred in mscorlib.dll
enter code here
```
|
What can cause keys added to a Hashtable to be null?
|
CC BY-SA 3.0
| null |
2011-04-27T13:54:44.083
|
2011-04-27T16:53:01.130
|
2011-04-27T14:20:55.543
| 28,149 | 28,149 |
[
"c#",
".net",
".net-micro-framework"
] |
5,805,372 | 1 | 5,805,443 | null | 11 | 29,210 |
I am trying to assign an image(Image1) a picture at Run-time.
Since I can't set a property to load from resource. So I need to load at run time.
I have the code
```
procedure TForm1.FormCreate(Sender: TObject);
var RS:Tresourcestream ;
begin
RS := TResourceStream.Create(HInstance,'Splashscreen_Background', RT_RCDATA);
image1.Picture.Bitmap.LoadFromResourcename(HInstance,'splashscreen_background');
end;
```
But it just loads the forms with a blank Image. aswell as:
```
procedure TForm1.FormCreate(Sender: TObject);
BitMap1 : TBitMap;
begin
BitMap1 := TBitMap.Create;
BitMap1.LoadFromResourceName(HInstance,'Live');
image1.Picture.Bitmap.Assign(Bitmap1);
end;
```
I have no idea if the bottom one would work at all, guess not. Just something I tried.

|
Load image from embedded resource
|
CC BY-SA 3.0
| 0 |
2011-04-27T14:02:04.307
|
2014-06-18T00:14:58.743
|
2020-06-20T09:12:55.060
| -1 | 700,519 |
[
"image",
"delphi",
"resources",
"embedded-resource"
] |
5,805,364 | 1 | null | null | 0 | 387 |
I want to write CustomTraceListener which writes all data to SQL Server DB.
Here's the stub for it:
```
public class SqlTraceListener : TraceListener
{
public SqlTraceListener()
: base()
{ }
public SqlTraceListener(String name)
: base(name)
{ }
protected override string[] GetSupportedAttributes()
{
List<string> attributes = new List<string>();
attributes.Add("connectionString");
attributes.Add("actionFilter");
attributes.Add("hostFilter");
return base.GetSupportedAttributes();
}
public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
{ }//Other empty methods...
}
```
In overridden method TraceData I want to catch SOAP messages sent to my WCF service. But when I check what is in "data" parameter I get this: :

But according to standard XmlWriterTraceListener I should get this:

How to configure TraceListener not to eliminate SOAP messages?
My config is here:
```
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml"/>
<add name="sql"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="C:\logs\StockPriceService.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="xml"/>
<add type="SqlTraceListener.SqlTraceListener, SqlTraceListener" name="sql"/>
</sharedListeners>
<trace autoflush="true"/>
```
|
SOAP message is empty when catching MessageLoggingTraceRecords with CustomTraceListener
|
CC BY-SA 3.0
| null |
2011-04-27T14:01:41.747
|
2011-08-12T18:41:48.453
| null | null | 188,919 |
[
"wcf",
"soap",
"trace",
"tracelistener"
] |
5,805,563 | 1 | 5,811,067 | null | 0 | 852 |
After downloading IE9, I found that running any Silverlight page breaks (only in IE9).
After clicking "yes" to debug, I was amused to see that the Silverlight.js file is choking on some JavaScript that was put in as a hack to work with previous versions of IE.

What would the fastest way to fix this be? Is there an updated Silverlight.js file I can download from somewhere? Should I use a meta tag to tell IE to render as though it were version 7 or 8?
Thanks!
|
Silverlight.js file broken in IE9?
|
CC BY-SA 3.0
| null |
2011-04-27T14:16:03.323
|
2011-04-27T21:53:10.953
|
2011-04-27T18:58:02.183
| 352,552 | 352,552 |
[
"silverlight",
"silverlight-4.0",
"internet-explorer-9"
] |
5,805,566 | 1 | 5,814,432 | null | 6 | 411 |
I am seeing run-time errors in local language of windows which is annoying (pic below). I have changed regional settings to English from Windows settings, and also international language from Visual Studio environments settings also added globalization `uiCulture="en-US"` into `web.config` but still no success, is there something I am missing?

|
how to change runtime errors into english
|
CC BY-SA 3.0
| 0 |
2011-04-27T14:16:16.227
|
2011-04-28T06:18:30.913
|
2011-04-27T14:23:20.957
| 16,487 | 436,782 |
[
"c#",
".net",
"visual-studio-2008"
] |
5,805,884 | 1 | 5,806,659 | null | 0 | 74 |
I am unsure as to what to use for the `YourNameVariable`. I think it needs to be an instance of Routine (or maybe the name property of Routine) but how do I create this? I am using a UITableView.
```
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Exercise" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
[request setPredicate: [NSPredicate predicateWithFormat: @"routineExercises = %@", yourVariableNameHere]];
NSLog(@"After managedObjectContext: %@", managedObjectContext);
NSError *error = nil;
NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
if (mutableFetchResults == nil) {
// Handle the error.
}
[mutableFetchResults release];
[request release];
```
Here is my data model:

And also, should I be putting this in viewDidLoad or in the fetchResultsController's method?
|
Need Help Setting Up Fetch Predicate
|
CC BY-SA 3.0
| null |
2011-04-27T14:38:53.130
|
2011-04-27T15:33:19.643
|
2011-04-27T15:22:51.787
| null | null |
[
"iphone",
"objective-c",
"core-data"
] |
5,805,956 | 1 | null | null | 114 | 42,278 |
My website has always run smoothly with IE8, IE7, FF, Chrome and Safari. Now I'm testing it on IE9 and I'm experiencing a strange problem: in some pages, some tabular data renders incorrectly.
The HTML source is correct and all, and the row giving the problem changes every time I refresh the page (to tell the truth, the problem itself appears only in some refresh, not all).

Using the F12 Tool of IE, the table structure appears correct, there should be no empty TD after the TD containing M08000007448, but still it renders like this.

Moreover, if I use the F12 tool, with "select element by click" tool in the toolbar, and I try to click on the empty space between M08000007448 and 19 , it selects the TR, not a "hidden td".
I'm having this table rendering problem also in some other table in the application, anyone experiencing something like this? It happens only in IE9 :(
I don't know if it's important, but the page is made with ASPNET (webforms) and use Jquery and some other JS plugin.
I tried to save the page (with images) and open it in local with IE9, but the problem never occurs. (Of course I checked all the table structure and it's ok. Header and all rows have the eact same number of TD's, with the right number of colspan when necessary).
|
Internet Explorer 9 not rendering table cells properly
|
CC BY-SA 3.0
| 0 |
2011-04-27T14:44:16.247
|
2016-06-16T09:55:31.803
|
2012-11-21T08:02:07.867
| 106,224 | 509,256 |
[
"jquery",
"asp.net",
"internet-explorer-9",
"html-table"
] |
5,805,992 | 1 | null | null | 3 | 418 |
I have an image that represents a projection. I am going to explain the problem with an example:
>
The thing that I would like to know is this:
Given one point of the line that passes for these two points, is there a way to calculate the z distance data that it should have?
What if the z distance is not a linear function but is some logarithmic function?
If it's not clear ask me everything,

Cheers
|
Finding Projection and z distance
|
CC BY-SA 3.0
| null |
2011-04-27T14:46:41.387
|
2011-04-27T20:37:48.003
|
2011-04-27T16:41:53.137
| 321,505 | 727,515 |
[
"math",
"distance",
"kinect",
"projective-geometry"
] |
5,806,019 | 1 | 5,806,152 | null | 0 | 1,750 |
I'd like to open the page in the image below, but only showing the green part in the new window. Hiding the menu and the header to the user.

```
function openNewWindow() {
var pr = window.open("Page.aspx", "page", "width=700, height=400");
pr.onload() = function() {
pr.document.getElementById("header").style.display = 'none';
}
}
```
Is it possible to set some kind of offset for the page in the new window? Like `left:-40px` and `top:-20px` or something similar? I know `top` and `left` positions the new window rather than its content, but is there something I can do to change the position of the actual content?
Is there a work-around or another solution with the same result?
When I click `<a href="javascript:openNewWindow(); return false;">Click</a>` I want Page.aspx (image above) to open in a new window, but without menu and header showing.
|
Show part of page in new window
|
CC BY-SA 3.0
| null |
2011-04-27T14:48:19.633
|
2011-05-14T16:26:41.867
|
2011-04-29T08:28:07.100
| 536,610 | 536,610 |
[
"javascript",
".net",
"new-window"
] |
5,806,120 | 1 | null | null | 24 | 5,664 |
I'm new to DDD and I'm stuck with many-to-many relationships. E.g. we have two aggregate roots - Tasks and Workers.
Contract is definitely not aggregate root, because it has no sense without Task and Worker. So, it should be part of some aggregate. But which aggregate should it belong to? We need to know both summary costs of all task contracts and summary costs of all worker contracts. And it's natural for me to have contracts collection both in Task and in Worker.
Well, I can move Costs calculation to domain service, but I afraid it's a step forward to anemic model. Is there common way to deal with many-to-many relationships and preserve reach domain model?
Thanks!

|
Many-to-many relationships in DDD
|
CC BY-SA 3.0
| 0 |
2011-04-27T14:54:24.103
|
2011-04-28T16:36:07.590
|
2011-04-27T15:14:52.030
| 231,290 | 470,005 |
[
"c#",
"domain-driven-design"
] |
5,806,329 | 1 | 6,014,247 | null | 3 | 740 |
i am creating own framework api (telephone services related api) i am creating one library app this library app to create myjar.jar i am developing another application just i am adding asset folder this myjar.jar and configure this jar adding buildpath
in coding importing the package
this application run into real device:
```
MacTesting mp = new MacTesting();
mp.getMacAddress();
Log.v("1111","this is mac add"+ mp.getMacAddress());
```
result is null
```
public class MacIdTesting extends Activity implements Parcelable
{
public static final String KEY_WIFI_MAC_ADDRESS = null;
public static final String READ_PHONE_STATE = null;
/** Called when the activity is first created. */
public String mMacAddress;
public String phonenumber;
void setMacAddress(String macAddress) {
this.mMacAddress = macAddress;
}
public String getMacAddress() {
return mMacAddress;
}
public String getLine1Number()
{
ContextWrapper mContext = null;
mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE");
MacIdTesting mPhone = null;
return mPhone.getLine1Number();
}
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = manager.getConnectionInfo();
String MACAddress = wifiInfo.getMacAddress();
System.out.println("macsddress "+MACAddress);
}
@Override
public int describeContents()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags)
{
// TODO Auto-generated method stub
dest.writeString(mMacAddress);
}
}
```
see this screenshot

how can solve this problem
|
Implementing activity how to use methods in jar in android
|
CC BY-SA 3.0
| 0 |
2011-04-27T15:08:12.250
|
2011-05-16T08:07:03.353
|
2011-05-09T12:41:28.760
| 408,863 | 254,790 |
[
"android",
"api",
"jar"
] |
5,806,492 | 1 | 6,025,227 | null | 1 | 2,860 |
I am having some trouble getting the graph created with jqplot to print with proper alignment in IE 7 & 8. It looks great on the screen, but once I click print preview it get's all messed up.
Help me please
Alignment in IE 9, Firefox and Chrome is perfect. Any help would be greatly appreciated

|
IE 7 & 8 jqplot misalignment while printing
|
CC BY-SA 3.0
| null |
2011-04-27T15:20:41.113
|
2012-04-16T13:08:30.847
| null | null | 109,849 |
[
"javascript",
"css",
"jqplot"
] |
5,806,558 | 1 | 5,817,807 | null | 0 | 810 |
I have prepared a simple test case to demonstrate my problem.
It is just 1 file which will run instantly when added to a new project.
I would like to have a MainScreen displaying an editable list of items:

and when leaving this screen, the user should be asked - if she wants to save the modified list to persistent storage, by presenting the standard Save/Discard/Cancel-dialog:

I have added setDirty(true) to my menu items and the standard dialog does come up okay.
I don't know how to clear the dirty flag after saving - in my current code the Save/Discard/Cancel-dialog comes again and again, even if I just view the ListField, without editing it.
```
package mypackage;
import java.util.*;
import net.rim.device.api.collection.*;
import net.rim.device.api.collection.util.*;
import net.rim.device.api.system.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.decor.*;
import net.rim.device.api.util.*;
public class MyList extends UiApplication implements FieldChangeListener {
MyScreen myScreen = new MyScreen();
public static void main(String args[]) {
MyList app = new MyList();
app.enterEventDispatcher();
}
public MyList() {
MainScreen titleScreen = new MainScreen();
titleScreen.setTitle("Click the button:");
ButtonField myButton = new ButtonField("Show the list", ButtonField.CONSUME_CLICK) ;
myButton.setChangeListener(this);
titleScreen.add(myButton);
pushScreen(titleScreen);
}
public void fieldChanged(Field field, int context) {
pushScreen(myScreen);
}
}
class MyScreen extends MainScreen {
ObjectListField myList = new ObjectListField();
static PersistentObject myStore;
static Vector myData;
static {
myStore = PersistentStore.getPersistentObject(0xb77f8e453754f37aL);
myData = (Vector) myStore.getContents();
if (myData == null) {
myData = new Vector();
myData.addElement("String 1");
myData.addElement("String 2");
myData.addElement("String 3");
myStore.setContents(myData);
}
}
public MyScreen() {
setTitle("Edit the list below:");
add(myList);
addMenuItem(addItem);
addMenuItem(editItem);
addMenuItem(removeItem);
}
// load data from persistent store into the ListField
private void loadData() {
// clear the ListField
myList.setSize(0);
// copy data from the Vector to the ListField
for (int i = myData.size() - 1; i >= 0; i--)
myList.insert(0, myData.elementAt(i));
}
// save data from the ListField into the persistent store
private void saveData() {
// clear the Vector
myData.removeAllElements();
// copy data from the ListField to the Vector
for (int i = myList.getSize() - 1; i >=0; i--)
myData.addElement(myList.get(myList, i));
synchronized(PersistentStore.getSynchObject()) {
myStore.commit();
}
}
protected void onUiEngineAttached(boolean attached) {
if (attached) {
loadData();
}
}
public void save() {
saveData();
// UPDATE: when I call setDirty(false); here, then
// the app starts displaying Save/Discard/Cancel dialog
// on its exit - so there must be a better way...
}
private final MenuItem addItem = new MenuItem("Add Item", 0, 0) {
public void run() {
String[] buttons = {"Add", "Cancel"};
Dialog myDialog = new Dialog("Add Item", buttons, null, 0, null);
EditField myEdit = new EditField("Item: ", "");
myDialog.add(myEdit);
if (myDialog.doModal() == 0) {
myList.insert(0, myEdit.getText());
setDirty(true);
}
}
};
private final MenuItem editItem = new MenuItem("Edit Item", 0, 0) {
public void run() {
String[] buttons = {"Save", "Cancel"};
Dialog myDialog = new Dialog("Edit Item", buttons, null, 0, null);
int index = myList.getSelectedIndex();
if (index == -1) {
return;
}
String selectedItem = (String) myList.get(myList, index);
EditField myEdit = new EditField("Item: ", selectedItem);
myDialog.add(myEdit);
if (myDialog.doModal() == 0) {
myList.set(index, myEdit.getText());
setDirty(true);
}
}
};
private final MenuItem removeItem = new MenuItem("Remove Item", 0, 0) {
public void run() {
String[] buttons = {"Delete", "Cancel"};
Dialog myDialog = new Dialog("Remove Item", buttons, null, 0, null);
int index = myList.getSelectedIndex();
if (index == -1) {
return;
}
String selectedItem = (String) myList.get(myList, index);
LabelField myLabel = new LabelField("Really delete " + selectedItem + "?");
myDialog.add(myLabel);
if (myDialog.doModal() == 0) {
myList.delete(index);
setDirty(true);
}
}
};
}
```
Please share your Blackberry 6 experience, advices in regard to persistent storage are also welcome.
In my real program I'm using [KeywordFilterField for viewing a SortedReadableList](https://stackoverflow.com/questions/5677260/blackberry-change-sorting-of-a-keywordfilterfield), so from reading Blackberry docs I suppose, that I must always copy data between SortedReadableList and Vector - because the latter is persistable and the former is not?
|
Blackberry: saving ListField content and dirty state management
|
CC BY-SA 3.0
| null |
2011-04-27T15:25:08.167
|
2015-04-16T09:08:25.427
|
2017-05-23T11:48:23.740
| -1 | 165,071 |
[
"blackberry",
"persistent",
"listfield"
] |
5,806,913 | 1 | 5,806,966 | null | 18 | 56,849 |
I want to place text at center and at the bottom of the cell in table. How can I do this?
This is what I want:

|
Keeping text at center bottom in a cell of table
|
CC BY-SA 4.0
| null |
2011-04-27T15:50:56.700
|
2020-02-14T15:36:17.697
|
2019-01-24T17:00:12.027
| 4,370,109 | 648,138 |
[
"html",
"css",
"css-tables"
] |
5,806,891 | 1 | null | null | 1 | 1,085 |
I have created a simple `webview` with two `buttons` below it. If I press one of the button the view seems to create a new view called "web" then the page loads and I still have my buttons below but they don't function. If I use the back button on the phone it takes me to the opening view blank page and the buttons work again? Sorry I am new..
I just want it to load in the original view and have the buttons continue to function.
Do I have to suppress the creation of a new view somehow?
Kind Regards,
-Mike
** and I am not sure why my code always has extra crap when I post it because it does't when I copy it to the clipboard. **

Webscreen Class
```
package com.example.cam;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class Webscreen <URL> extends Activity {
WebView webview1;
public static final String URL = "";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String turl = getIntent().getStringExtra(URL);
webview1 = (WebView)findViewById(R.id.webview01);
webview1.clearCache(true);
webview1.loadUrl(turl);
}
}
```
cam Class
```
package com.example.cam;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class cam extends Activity implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Add Click listeners for all buttons
View firstButton = findViewById(R.id.button1);
firstButton.setOnClickListener(this);
View secondButton = findViewById(R.id.button2);
secondButton.setOnClickListener(this);
}
// Process the button click events
public void onClick(View v) {
switch(v.getId()){
case R.id.button1:
Intent j = new Intent(this, Webscreen.class);
j.putExtra(com.example.cam.Webscreen.URL,
"http://m.yahoo.com");
startActivity(j);
break;
case R.id.button2:
Intent k = new Intent(this, Webscreen.class);
k.putExtra(com.example.cam.Webscreen.URL,
"http://m.google.com");
startActivity(k);
break;
}
}
}
```
|
Webview buttons stop working after website loads
|
CC BY-SA 4.0
| null |
2011-04-27T15:49:25.937
|
2018-09-14T10:17:18.607
|
2018-09-14T10:17:18.607
| 5,180,572 | 724,209 |
[
"android",
"button",
"webview"
] |
5,807,133 | 1 | 5,809,307 | null | 3 | 4,796 |
I've been using FFmpeg to convert a movie I need to play in MP4, however in Quicktime the following error is presented;

(Error -2041: an invalid sample description was found in the movie (output.mp4)).
I used the following FFmpeg command parameters to convert the file;
> C:\Temp\EOBTemp>ffmpeg -i input.mp4 -y
-acodec libmp3lame -ab 96k -vcodec libx264 -vpre lossless_slow -crf 22
-threads 0 output.mp4
Now this file plays absolutely fine, in Windows Media Player, and VideoLAN (FFmpeg based, so no surprise here. I using the latest build from [HawkEye's FFmpeg Windows Builds](http://hawkeye.arrozcru.org/)
(FFmpeg git-a304071 32-bit Static (Latest)).
I really hope this isn't a AAC problem, as I've been trying to get FFmpeg to use the libfaac.dll library (in the same folder as the FFmpeg.exe) with the command;
> -acodec libfaac
Help! I'm at a loss!
|
FFmpeg converted mp4 file fails to load in Quicktime
|
CC BY-SA 3.0
| 0 |
2011-04-27T16:05:31.407
|
2015-12-21T11:22:41.180
|
2012-09-14T04:37:11.060
| 32,453 | 271,200 |
[
"ffmpeg",
"quicktime"
] |
5,807,253 | 1 | 6,031,957 | null | 1 | 381 |
I'm developing a Label Printing application for our company that will include support for Black & White and Color Printers.
To simplify development on my part, I'm creating a WinForm with various labels on it that I can position, size, and color as needed. If the End User's printer is Non-Color, all Pens and Brushes will be black. Otherwise, I will be setting my drawing colors based on the Label control's color.
I'd like to develop my labels using basic colors that are found in the standard color printer cartridge, so that I don't wind up causing our company to throw away a cartridge simply because Color Tank #2 has run out (trying to reduce waste and help the environment where I can).
What are the Colors in the tanks? Black, Magenta, Yellow, and Cyan?
If I designed my Labels using these four (4) colors, would I be making good use of the color cartridges or should I stick to combination colors like Red, Blue & Green?
I'd be interested in looking at a simple algorithm that calculates how much color is used, too, if someone knows how to do that.

|
C#: Label Designing for Color Printers
|
CC BY-SA 3.0
| null |
2011-04-27T16:15:49.620
|
2011-05-17T14:02:00.793
| null | null | 153,923 |
[
"c#",
"winforms",
"visual-studio-2008",
"printing"
] |
5,807,351 | 1 | 5,821,442 | null | 0 | 365 |
I just can't seem to get this working its been weeks I've been trying.
It seems like I fix one, thing, and something else crashes, its like a back and forth process with no end.
This table shows objects of entity "Exercise" for each object "Routine".
My data model: 
I'm just posting my full code if anyone sees anything that may be causing problems.
```
- (void)viewDidLoad
{
[super viewDidLoad];
self.routineTableView.delegate = self;
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(exerciseChooser)];
self.navigationItem.rightBarButtonItem = addButton;
[addButton release];
if (managedObjectContext == nil)
{
managedObjectContext = [(CurlAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
[managedObjectContext retain];
}
[self loadData];
}
-(void)loadData
{
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Exercise" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
NSManagedObject *selectedObject = [entityArray objectAtIndex:indexPath.row];
//Set Predicate
NSLog(@"After managedObjectContext: %@", managedObjectContext);
NSError *error = nil;
NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
if (mutableFetchResults == nil) {
// Handle the error.
}
self.entityArray = mutableFetchResults;
[request setPredicate: [NSPredicate predicateWithFormat: @"routineExercises = %@", selectedObject]];
[mutableFetchResults release];
[request release];
}
-(void)addExercise
{
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(exerciseChooser)];
self.navigationItem.rightBarButtonItem = addButton;
[addButton release];
if (managedObjectContext == nil)
{
managedObjectContext = [(CurlAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
[managedObjectContext retain];
}
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Exercise" inManagedObjectContext:managedObjectContext];
[request setEntity:entity];
NSError *error = nil;
NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy];
if (mutableFetchResults == nil) {
// Handle the error.
}
Exercise *exercise = (Exercise *)[NSEntityDescription insertNewObjectForEntityForName:@"Exercise" inManagedObjectContext:managedObjectContext];
exercise.name = selectedExercise;
NSMutableSet *exercises = [NSSet setWithObjects:exercise,nil];
Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:managedObjectContext];
routine.routineExercises = exercises;
if (![managedObjectContext save:&error])
{
// Handle the error.
}
NSLog(@"%@", error);
[self.routineTableView reloadData];
[mutableFetchResults release];
[request release];
}
- (NSFetchedResultsController *)fetchedResultsController
{
if (fetchedResultsController != nil)
{
return fetchedResultsController;
}
// Create the fetch request for the entity.
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
// Edit the entity name as appropriate.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Exercise" inManagedObjectContext:self.managedObjectContext];
[fetchRequest setEntity:entity];
// Set the batch size to a suitable number.
[fetchRequest setFetchBatchSize:20];
// Edit the sort key as appropriate.
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:NO];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
// Edit the section name key path and cache name if appropriate.
// nil for section name key path means "no sections".
NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"];
aFetchedResultsController.delegate = self;
self.fetchedResultsController = aFetchedResultsController;
[aFetchedResultsController release];
[fetchRequest release];
[sortDescriptor release];
[sortDescriptors release];
NSError *error = nil;
if (![self.fetchedResultsController performFetch:&error])
{
/*
Replace this implementation with code to handle the error appropriately.
abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
*/
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
return fetchedResultsController;
}
```
Update: updated addExercise method (still not working though, its crashing)
```
-(void)addExercise
{
UIBarButtonItem *addButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(exerciseChooser)];
self.navigationItem.rightBarButtonItem = addButton;
[addButton release];
NSError *error = nil;
Exercise *exercise = (Exercise *)[NSEntityDescription insertNewObjectForEntityForName:@"Exercise" inManagedObjectContext:managedObjectContext];
exercise.name = selectedExercise;
[theSelectedRoutine addRoutineExercisesObject: exercise];
if (![managedObjectContext save:&error])
{
// Handle the error.
}
NSLog(@"%@", error);
[self.routineTableView reloadData];
}
```
|
Cant Get My Table Loaded Using Core Data
|
CC BY-SA 3.0
| null |
2011-04-27T16:23:41.267
|
2011-04-28T15:52:31.797
|
2011-04-27T21:05:07.137
| null | null |
[
"iphone",
"objective-c",
"cocoa-touch",
"core-data"
] |
5,807,411 | 1 | 5,814,769 | null | 19 | 7,752 |
Right now, the selecter just shows the data being selected. I want it to have a word after the selected value, the same way the iPhone clock app has "hours" and "min" at the selector.

|
How can I make my UIPickerView show labels after the selected value?
|
CC BY-SA 3.0
| 0 |
2011-04-27T16:29:49.070
|
2013-07-03T11:31:34.563
|
2013-07-03T11:31:34.563
| 2,420,516 | null |
[
"iphone",
"ios",
"objective-c",
"cocoa-touch"
] |
5,807,650 | 1 | 5,827,392 | null | 9 | 1,972 |
I'm using Xcode 4 and in Build Settings all drop down lists have gone away.
Instead of the drop down lists, I have text boxes.
See this image, for example:

I'm totally puzzled: how can I enable drop down lists again?
|
Xcode 4 missing drop down lists in Build Settings
|
CC BY-SA 3.0
| 0 |
2011-04-27T16:49:17.500
|
2016-01-04T15:33:22.023
|
2016-01-04T15:33:22.023
| 5,086 | 19,808 |
[
"iphone",
"xcode",
"ios4"
] |
5,807,762 | 1 | 5,808,091 | null | 0 | 4,356 |
I try to use `GridLayout`, to have 4 text views (different string length) being displayed as same size, within same row of `TableLayout`.
Here is my XML code.
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<ImageView
android:id="@+id/color_label"
android:layout_width="12dip"
android:layout_height="fill_parent"
android:layout_marginRight="6dip"
android:background="#ffffff" />
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:stretchColumns="1">
<TableRow>
<TextView
android:id="@+id/toptext"
android:gravity="left"
/>
<TextView
android:id="@+id/bottomtext"
android:gravity="right"
/>
</TableRow>
<View android:layout_height="2dip"
android:background="#FF909090" />
<TableRow>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myGrid"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:numColumns="4"
/>
</TableRow>
</TableLayout>
</LinearLayout>
```
and here are my adapter code for the row of list view.
```
package org.yccheok.jstock.widget;
import java.util.ArrayList;
import org.yccheok.jstock.activity.R;
import org.yccheok.jstock.portfolio.Order;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.GridView;
import android.widget.TextView;
public class OrderAdapter extends ArrayAdapter<Order> {
private ArrayList<Order> items;
public OrderAdapter(Context context, int textViewResourceId, ArrayList<Order> items) {
super(context, textViewResourceId, items);
this.items = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.custom_row_view, null);
}
Order o = items.get(position);
if (o != null) {
TextView tt = (TextView) v.findViewById(R.id.toptext);
TextView bt = (TextView) v.findViewById(R.id.bottomtext);
if (tt != null) {
tt.setText(o.getOrderName());
}
if (bt != null) {
bt.setText(o.getOrderStatus());
}
}
GridView grid = (GridView) v.findViewById(R.id.myGrid);
grid.setAdapter(new ImageAdapter(this.getContext()));
return v;
}
private class ImageAdapter extends BaseAdapter {
private Context mContext;
public ImageAdapter(Context c) {
mContext = c;
}
public int getCount() {
return 4;
}
public Object getItem(int position) {
return null;
}
public long getItemId(int position) {
return 0;
}
// create a new ImageView for each item referenced by the Adapter
public View getView(int position, View convertView, ViewGroup parent) {
TextView textview = new TextView(mContext);
textview.setText("Hello");
return textview;
}
}
}
```
However, I am getting pretty strange result. (Highlight in red)

What my expectation is something like this. (Highlight in red)

Does this mean I can't use `GridLayout` in the row of `TableLayout`?
|
Having multiple columns within a single row of TableLayout
|
CC BY-SA 3.0
| null |
2011-04-27T16:59:37.357
|
2011-04-27T17:26:25.500
|
2011-04-27T17:18:00.177
| 72,437 | 72,437 |
[
"android",
"android-layout"
] |
5,808,060 | 1 | 5,819,947 | null | 0 | 1,358 |
I want to bind every node of a tree to a xtragrid like in the image attached. At this time i have a usercontrolpanel which has the Xtragrid and i am planning to show the usercontrol panel on the form each time a node is clicked and bind the node related data to the grid dynamically. Any change in the grid should update the corresponding datasource of the grid as well as that of the node. How do i go about this?

|
How to bind a node in Xtratreelist to a Xtragrid in DevExpress
|
CC BY-SA 3.0
| 0 |
2011-04-27T17:24:38.170
|
2011-04-28T14:08:17.067
| null | null | 670,337 |
[
"devexpress",
"xtragrid",
"xtratreelist"
] |
5,808,200 | 1 | null | null | 0 | 332 |
i need help with this...plz ?

this photo from facebook
the "older posts" button.......how can i make some thing like that for my site...i want to load news from database without refreshing the whole page...
thanks
|
load info from database without refreshing the whole page
|
CC BY-SA 3.0
| null |
2011-04-27T17:36:42.250
|
2011-04-27T18:44:53.060
|
2011-04-27T18:44:53.060
| 650,492 | 725,473 |
[
"php",
"mysql"
] |
5,808,484 | 1 | 5,809,001 | null | 2 | 1,559 |
Ok, bear with me folks, the setup on this one is long.
I have a simple page. It loads an iframe. Inside that iframe is a form. I want the form inside the iframe to interact with the parent page via jQuery.
This works correctly in Firefox, Chrome, and Safari. See for yourself here:
[http://dl.dropbox.com/u/58785/iframe-example/index.htm](http://dl.dropbox.com/u/58785/iframe-example/index.htm)
However, in Internet Explorer 6/7/8/9, it does not work. The load event fires, but jQuery cannot get a handle on elements inside the iframe.
I'm using the second 'context' argument of the jQuery function to set the context of the selector, like this: `var form = $('#myform'), this.contentDocument)`
. Using the F12 Developer Tools in IE9, I can set a breakpoint in my JavaScript and look at how IE is evaluating the JavaScript. If I hover over `this`, I can see that it does have a `contentDocument` property. , if I hover over `this.contentDocument`, it tells me it's undefined.


Because it's undefined, the jQuery selector returns no elements. Again, this is only in IE. And the IFRAME is on the same domain, so it's not a same-origin issue.
Any pointers?
|
In IE, when binding to the 'load' event of an IFRAME, this.contentDocument is undefined
|
CC BY-SA 3.0
| 0 |
2011-04-27T18:00:47.303
|
2011-04-27T18:49:02.357
|
2017-02-08T14:32:03.807
| -1 | 1,690 |
[
"javascript",
"jquery",
"internet-explorer",
"iframe"
] |
5,808,699 | 1 | null | null | 0 | 2,045 |
I'm trying to recover after accidentally deleting my .m file. Does anyone see what I'm doing wrong that is causing my cells to all render blank?
## .h
```
#import <UIKit/UIKit.h>
@interface FirstViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
}
@end
```
## .m
```
#import "FirstViewController.h"
#import "Shared.h"
#import "Message.h"
@implementation FirstViewController
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
// Dequeue or create a cell of the appropriate type.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = @"Foo";
return cell;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
NSLog([NSString stringWithFormat:@"Number of rows %i", [[Shared sharedInstance].messages count]]);
//this comes back as 10
return [[Shared sharedInstance].messages count];
}
```
Update:
I have it pinned down to a weird problem. In the following, i logs out as 10, but if I return i the rows show blank. If I return 10 as shown below, it works.
```
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
#warning Incomplete method implementation.
// Return the number of rows in the section.
NSInteger i = [[Shared sharedInstance].messages count];
NSLog([NSString stringWithFormat:@"Number of rows %i", i]);
return 10;
}
```
Another update:
Ok, I've gotten closer. It seems that although reloaddata is getting called when I walk through with debugger, it doesn't seem to be properly reloading. That's why the hard coded number worked if I used a hardcoded sample string for each row. The first time it gets loaded, the number of rows would be zero and since reloaddata isn't working, the next time it gets loaded it didn't update to 10 rows.
In case someone wonders if I'm connected to delegate and datasource.

|
UITableView cells blank
|
CC BY-SA 3.0
| null |
2011-04-27T18:22:32.167
|
2011-04-28T02:36:01.570
|
2011-04-28T02:36:01.570
| 576,955 | 576,955 |
[
"objective-c",
"ios",
"ios4"
] |
5,808,947 | 1 | 5,809,421 | null | 0 | 377 |
I have set up a program that adds new rows when the checkbox at the end is checked. My problem is with the autoscroll. When the rows get passed the edge of the window, it creates the next row, but it looks like it sets the origin to the previous row's starting point.
Here is some of the code:
```
private void AddRow(object sender, EventArgs e)
{
bool check = ((CheckBox)sender).Checked;
if (check)
{
proj[i] = new Label();
proj[i].Text = "Proj #";
proj[i].Width = 50;
proj[i].Location = new Point(10, (i * 22) + 50);
...
split[i] = new CheckBox();
split[i].Text = "";
split[i].Location = new Point(430, (i * 22) + 50);
split[i].CheckedChanged += new EventHandler(AddRow);
}
this.Controls.Add(proj[i]);
}
```
And here are a couple screenshots:


How can I fix this problem?
|
How do I fix the autoscroll from moving my point of origin in a Forms based program?
|
CC BY-SA 3.0
| null |
2011-04-27T18:45:10.520
|
2011-04-27T19:23:39.717
| null | null | 400,636 |
[
"c#",
"forms",
"controls"
] |
5,809,628 | 1 | 5,809,673 | null | 1 | 598 |
I use Symfony (v1.4) debug toolbar a lot for troubleshooting and optimizing things. One part of it continues to puzzle me and I haven't found a description anywhere online.
The Timers section includes a % time column which seems horribly inaccurate. Adding the things there nearly always results in a total that is way over 100%. Once I had a result that was about 500%. Is this just a bug or is it a percentage of something other than it seems to imply? Thanks.
Here's a screenshot of a typical result for me:

edit: Also, I have seen some results where adding all the time(%) column is significantly LESS than 100%.
|
Why does the timer (profiler) in Symfony Debug Toolbar exceed 100% time?
|
CC BY-SA 3.0
| null |
2011-04-27T19:41:16.483
|
2011-04-27T20:08:59.637
|
2011-04-27T20:08:59.637
| 721,206 | 721,206 |
[
"php",
"symfony1",
"profiling",
"symfony-1.4"
] |
5,809,682 | 1 | 5,809,727 | null | 0 | 107 |
I've asked a very similar question before, but this time is not about VB syntax, but rather the best approach. I'm making a method that, when passed a component, will recolor it and all components contained within it. Below is the code I have so far, but it is not recoloring all components, instead only a mere few. My main problem is buttons staying in their "3D" styles and not becoming "flat".
```
If TypeOf comp Is System.Windows.Forms.ButtonBase Then
Dim c As System.Windows.Forms.ButtonBase
c = comp
c.FlatStyle = Windows.Forms.FlatStyle.Flat
c.BackColor = getColor(style, PART_BOX)
c.ForeColor = getColor(style, PART_TEXT)
comp = c
End If
```
The component passed is `comp`, and the `getColor` method looks into a database and returns a color corresponding to the `part` parameter passed to the method. This works for all low-level components and all simple components like labels.

As you can see, this is not my preferred outcome. Again, I need the button to end up being .
|
Selective recursive component recoloring in VB
|
CC BY-SA 3.0
| null |
2011-04-27T19:46:39.157
|
2011-05-29T03:02:24.483
|
2011-05-29T03:02:24.483
| 234,954 | 453,435 |
[
"vb.net",
"button",
"recursion",
"colors",
"flat"
] |
5,809,740 | 1 | 5,809,899 | null | 3 | 9,338 |
I am trying to position a span element relative to the upper-right corner of a table object.
This table may be wider or move around based on what the user does on the tool, so I was looking for something simpler than the jQuery.position method. I was hoping to do something elegant with CSS.
I've built a small example of my dilemma in jsfiddle: [http://jsfiddle.net/xerf/ZSGfc/](http://jsfiddle.net/xerf/ZSGfc/)
```
<div>
<table>
<thead>
<tr>
<th colspan="3">Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>Stuff 1</td>
<td>Stuff 2</td>
<td>Stuff 3</td>
</tr>
<tr>
<td>Stuff 1</td>
<td>Stuff 2</td>
<td>Stuff 3</td>
</tr>
<tr>
<td>Stuff 1</td>
<td>Stuff 2</td>
<td>Stuff 3</td>
</tr>
</tbody>
</table>
<span>×</span>
</div>
```
Below are the CSS Styles
```
body
{
font-family:sans-serif;
}
table
{
border-collapse: collapse;
border: 1px solid black;
margin: 20px;
}
th
{
padding: 6px;
}
td
{
padding: 3px;
border: 1px solid black;
}
```
Added some images to show required positions:

Needs to be where the red Square appears above
|
CSS solution to positioning Span element on a Table element
|
CC BY-SA 3.0
| 0 |
2011-04-27T19:52:07.290
|
2011-04-27T20:19:53.377
|
2011-04-27T20:11:16.180
| 5,203 | 5,203 |
[
"html",
"css",
"position"
] |
5,809,817 | 1 | null | null | 1 | 3,672 |
I have sort of the reverse problem expressed here [in this S.O. question](https://stackoverflow.com/questions/4297176/how-do-i-turn-the-system-volume-overlay-back-on-after-using-mpvolumeview)
In my case, I (iPhone 4.3 GM) and a tester (iPhone 4.3.1) are seeing the behavior that when we adjust the volume with our finger on the MPVolumeView or with the physical volume switches, the speaker volume overlay is always appearing (see screenshot).

Here is the code where I create the MPVolumeView. I think it is totally generic and standard:
```
MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:volumeSlider.bounds] autorelease];
[volumeSlider addSubview:volumeView];
```
*volumeSlider is simply an outlet to a plain UIView that I put on in IB.
The one other thing I can think of is that in IB, the volumeView view is checked as hidden. Then I unhide it when my audio starts playing (it is an audio streaming app).
Thank you for any help!
|
System volume speaker icon always appears when using MPVolumeView
|
CC BY-SA 3.0
| 0 |
2011-04-27T20:00:04.347
|
2014-01-06T13:37:30.177
|
2017-05-23T12:01:16.000
| -1 | 558,789 |
[
"iphone",
"ios",
"mpvolumeview"
] |
5,810,207 | 1 | 5,810,436 | null | 0 | 211 |
How do I 'include' a jar inside an android project, instead of just referencing it? For example, below is a picture of my tree view for a project.

This is fine if I want to test this app on this machine, and it even works when I deploy, however if I try to check out the project through SVN, I get a message saying "The project cannot be built until build path errors are resolved". Also missing lib messages such as:
etc.
I've checked the build path and checked all jars in the 'Order and Export', but it does not do what I think it does apparently.
How does one 'package' jars so they are transportable, and not left behind?
|
Android and Eclipse - Exporting local jars through SVN
|
CC BY-SA 3.0
| null |
2011-04-27T20:32:49.690
|
2011-04-27T20:53:29.097
| null | null | 434,400 |
[
"java",
"android",
"eclipse"
] |
5,810,285 | 1 | 5,815,977 | null | 0 | 1,801 |
I have an interesting problem, i'm trying to insert nested data using l2s, all is ok if i don't try to insert an entity with fk also to root parent, sample schema:

All id's are pk identity
Testing code:
```
Models.testdbDataContext db = new Models.testdbDataContext();
List<string> data = new List<string>();
data.Add("kkkk1");
data.Add("kkkk2");
data.Add("kkkk3");
data.Add("kkkk4");
data.Add("kkkk5");
foreach (var item in data)
{
nested1 n1 = new nested1();
n1.name1 = "test1";
db.nested1.InsertOnSubmit(n1);
foreach (var item2 in data)
{
nested2 n2 = new nested2();
n2.name2 = "test2";
n1.nested2.Add(n2);
foreach (var item3 in data)
{
nested3 n3 = new nested3();
n3.name3 = "test3";
n2.nested3.Add(n3);
}
}
}
db.SubmitChanges(); <-- error here (duh)
```
Error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_nested3_nested1". The conflict occurred in database "TESTDB.MDF", table "dbo.nested1", column 'id'.
The statement has been terminated."
Problem is that if table nested3 has also fk to nested1 id this error happens, when nested3 has fk only
to its parent nested2 id there is no problem, it seems that l2s can't get the identity from nested1 only from previous parent.
|
Foreign key problem with nested linq to sql insert
|
CC BY-SA 3.0
| 0 |
2011-04-27T20:38:34.437
|
2011-04-28T13:03:22.557
|
2011-04-28T13:03:22.557
| 287,815 | 287,815 |
[
"c#",
"asp.net",
"linq-to-sql",
"insert",
"foreign-keys"
] |
5,810,332 | 1 | 5,810,498 | null | 1 | 753 |
i'm getting this error message popping up with strange styling. Where in my application is it coming from? I'm using the simple form gem.

|
Where is this error message coming from? Simple_form?
|
CC BY-SA 3.0
| null |
2011-04-27T20:43:27.047
|
2011-04-27T21:01:40.847
|
2011-04-27T21:01:40.847
| 311,941 | 421,109 |
[
"ruby-on-rails",
"html",
"simple-form"
] |
5,810,661 | 1 | 5,810,712 | null | 0 | 393 |
I have this html:
```
<div id="details">
In the meantime,
<a href="http://www.twitter.com/iDreamStill" target="_blank"><img src="http://twitter-badges.s3.amazonaws.com/follow_me-c.png" alt="Follow iDreamStill on Twitter"/></a>
or
<a href="http://twitter.com/share" class="twitter-share-button" data-text="DreamStill, a social music platform, is launching soon! Check it out!" data-count="none" data-via="iDreamStill" data-related="JustinMeltzer:Founder">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> us.
</div>
```
The result is this:

How do I get the text and buttons all centered vertically?
|
How do I get the buttons line up vertically with the text?
|
CC BY-SA 3.0
| null |
2011-04-27T21:12:50.127
|
2011-04-27T21:37:46.313
| null | null | 421,109 |
[
"html",
"css",
"center",
"vertical-alignment"
] |
5,810,682 | 1 | 5,810,785 | null | 0 | 6,668 |
I am trying out Android. Initially I had this:

I created an extra button called "Reset". I lined them up in a row by using the layout Table Row, which looks like the following:

The "Calculate" has been assigned to the string "clickHandler", and its clickable property is also assigned to "clickHandler".
I basically got this tutorial off here
[Tutorial site](http://www.vogella.de/articles/Android/article.html#first)
So far my code looks like this
```
package ywong02.android.temperature;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.Toast;
import android.widget.Button;
public class Convert extends Activity {
/** Called when the activity is first created. */
private EditText text;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
text = (EditText)findViewById(R.id.editText1);
}
public void myClickHandler(View view){
RadioButton celsiusButton = (RadioButton)findViewById(R.id.radio0);
RadioButton fahrenheitButton = (RadioButton)findViewById(R.id.radio1);
Button resetButton = (Button)findViewById(R.id.button2);
switch(view.getId()){
case R.id.button1:
if(text.getText().length() == 0){
Toast.makeText(this, "Please enter a number to convert", Toast.LENGTH_LONG).show();
return;
}
float inputValue = Float.parseFloat(text.getText().toString());
// second attempt: make Reset button onClick to False initially
// resetButton.isClickable();
if(celsiusButton.isChecked()){
text.setText(String.valueOf(convertFahrenheitToCelsius(inputValue)));
}
else{
text.setText(String.valueOf(convertCelsiusToFahrenheit(inputValue)));
}
// switch to the other button
if(fahrenheitButton.isChecked()){
fahrenheitButton.setChecked(false);
celsiusButton.setChecked(true);
}
else {
fahrenheitButton.setChecked(true);
celsiusButton.setChecked(false);
}
break; // don't forget to break at each case!!!
case R.id.button2: // reset button
fahrenheitButton.setChecked(false);
celsiusButton.setChecked(true);
//text.setText("");
//text.setText(null);
break;
}
return;
}
private float convertFahrenheitToCelsius(float fahrenheit) {}
private float convertCelsiusToFahrenheit(float celsius) {}
}
```
The first attempt:
1. (1) assign both buttons clickable to Default (from properties) [main.xml]
2. (2) with and without the setText in the the second switch case
Result: Error Msg from Android --> Application was forced to stopped
Second attempt:
1. assign the reset button's clickable property to False
2. add the extra resetButton.isClickable() to the java source code
3. with / without the setText
Result: Reset has no effect (I can't even click on
it. it doesn't seem like it is
clickable!!)
My real problem is to how to get the reset button working.
Is it wrong to assign both button to the same "onClick" (in this case, it is called myclickHandler)??
If the answer to the previous question is YES, then I must create two separate classes, one handles the reset, and the other handles the calculate button. Am I right??
Thanks!
---
Update (posting XML - this one assign both buttons to Clickable (Default))
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/bgColor">
<EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="numberDecimal|numberSigned"></EditText>
<RadioGroup android:id="@+id/radioGroup1" android:layout_width="wrap_content" android:layout_height="wrap_content">
<RadioButton android:text="@string/toCelsius" android:layout_width="wrap_content" android:id="@+id/radio0" android:checked="true" android:layout_height="wrap_content"></RadioButton>
<RadioButton android:text="@string/toFahrenheit" android:layout_width="wrap_content" android:id="@+id/radio1" android:layout_height="wrap_content"></RadioButton>
</RadioGroup>
<TableRow android:id="@+id/tableRow1" android:layout_width="match_parent" android:layout_height="wrap_content">
<Button android:id="@+id/button1" android:layout_width="wrap_content" android:onClick="myClickHandler" android:text="@string/pressToCalc" android:layout_height="wrap_content"></Button>
<Button android:layout_height="wrap_content" android:id="@+id/button2" android:layout_width="wrap_content" android:onClick="myclickHandler" android:text="@string/clickToReset"></Button>
</TableRow>
</LinearLayout>
```
|
two buttons with the same "onClick" - Android
|
CC BY-SA 3.0
| null |
2011-04-27T21:14:50.547
|
2011-04-27T21:32:26.720
|
2011-04-27T21:28:13.450
| 230,884 | 230,884 |
[
"java",
"android"
] |
5,810,734 | 1 | null | null | 0 | 1,778 |
I have searched far and wide without success...
I am trying to accomplish what is more clearly described in the image....Which is create a blurred/semi-transparent drop shadow on a graphics object during a paint event.
The ultimate solution is a blurred/semi-transparent Pen, that I could pass to a path, but as I understand it, that is not possible.
Here is the image:

|
How do I create blurred/semi-transparent pen effect in GDI+
|
CC BY-SA 3.0
| null |
2011-04-27T21:19:01.553
|
2012-02-14T19:09:09.720
|
2012-02-14T19:09:09.720
| 719,186 | 728,132 |
[
"c#",
"gdi+",
"dropshadow"
] |
5,810,769 | 1 | 5,812,112 | null | 5 | 2,367 |
Probably a confusing question title.
The Grid with the Red Rectangle is an example of how it should look.
The Grid with the Blue Rectangle (not appearing in the image) has a margin that forces the second grid to be smaller than I've explicitly set it. Which appears to cause WPF to flip out and hide everything outside of it's arranged bounds.

I've tried setting the Clip to be larger than the Grid.
The only way I've been able to avoid this is to write a custom panel that measures it's children with a constraint of PositiveInfinity, but then arranges the children with the correct width. That method has lots of problems. It's not good to lie to your children.
Anyway, here's the code:
```
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="NegativeMarginTooMuchClipping.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640"
Height="400">
<Grid>
<StackPanel Width="600" Height="300">
<Grid Margin="40,50,60,50" Background="#FFB8B8B8" Width="500" Height="50">
<Rectangle Fill="Red" HorizontalAlignment="Left" Height="50" VerticalAlignment="Top" Width="50" Margin="0,-50,0,0"/>
</Grid>
<Grid Margin="40,50,61,50" Background="#FFB8B8B8" Width="500" Height="50">
<Rectangle Fill="Blue" HorizontalAlignment="Left" Height="50" VerticalAlignment="Top" Width="50" Margin="0,-50,0,0"/>
</Grid>
</StackPanel>
</Grid>
```
Known issue? Am I doing it wrong? Need more clarification?
|
Why do my panels clip all the way around the panel when made smaller than the explicit size?
|
CC BY-SA 3.0
| 0 |
2011-04-27T21:21:47.457
|
2011-04-27T23:59:54.293
| null | null | 271,536 |
[
"wpf",
"layout",
"panel",
"margin",
"clipping"
] |
5,810,775 | 1 | 5,815,778 | null | 6 | 2,470 |
I am trying to get my head around the tree construction operators (^ and !) in ANTLR.
I have a grammar for flex byte arrays (a UINT16 that describe number of bytes in array, followed by that many bytes). I've commented out all of the semantic predicates and their associated code that does validate that there are as many bytes in the array as indicated by the first two bytes...that part isn't what I'm having problems with.
My issue is with the tree that is generated after parsing some input. All that happens is that each character is a sibling node. I was expecting that the AST generated would be similar to the tree that you can see in Interpreter window of ANTLRWorks 1.4. As soon as I try to change how the tree would be made using a ^ character, I get an exception of the form:
```
Unhandled Exception: System.SystemException: more than one node as root (TODO: make exception hierarchy)
```
Here's the grammar (currently targeting C#):
```
grammar FlexByteArray_HexGrammar;
options
{
//language = 'Java';
language = 'CSharp2';
output=AST;
}
expr
: array_length remaining_data
//the amount of remaining data must be equal to the array_length (times 2 since 2 hex characters per byte)
// need to check if the array length is zero first to avoid checking $remaining_data.text (null reference) in that situation.
//{ ($array_length.value == 0 && $remaining_data.text == null) || ($remaining_data.text != null && $array_length.value*2 == $remaining_data.text.Length) }?
;
array_length //returns [UInt16 value]
: uint16_little //{ $value = $uint16_little.value; }
;
hex_byte1 //needed just so I can distinguish between two bytes in a uint16 when doing a semantic predicate (or whatever you call it where I write in the target language in curly brackets)
: hex_byte
;
uint16_big //returns [UInt16 value]
: hex_byte1 hex_byte //{ $value = Convert.ToUInt16($hex_byte.text + $hex_byte1.text); }
;
uint16_little //returns [UInt16 value]
: hex_byte1 hex_byte //{ $value = Convert.ToUInt16($hex_byte1.text + $hex_byte.text); }
;
remaining_data
: hex_byte*
;
hex_byte
: HEX_DIGIT HEX_DIGIT
;
HEX_DIGIT : ('0'..'9'|'a'..'f'|'A'..'F')
;
```
Here's kind of what I thought the AST would be:

Here's the program in C# I was using to get a visual (actually textual, but then I put it thru GraphViz to get picture) representation of the AST:
```
namespace FlexByteArray_Hex
{
using System;
using Antlr.Runtime;
using Antlr.Runtime.Tree;
using Antlr.Utility.Tree;
public class Program
{
public static void Main(string[] args)
{
ICharStream input = new ANTLRStringStream("0001ff");
FlexByteArray_HexGrammarLexer lex = new FlexByteArray_HexGrammarLexer(input);
CommonTokenStream tokens = new CommonTokenStream(lex);
FlexByteArray_HexGrammarParser parser = new FlexByteArray_HexGrammarParser(tokens);
Console.WriteLine("Parser created.");
CommonTree tree = parser.expr().Tree as CommonTree;
Console.WriteLine("------Input parsed-------");
if (tree == null)
{
Console.WriteLine("Tree is null.");
}
else
{
DOTTreeGenerator treegen = new DOTTreeGenerator();
Console.WriteLine(treegen.ToDOT(tree));
}
}
}
}
```
Here's what the output of that program put into GraphViz looks like:

The same program in Java (in case you want to try it out and don't use C#):
```
import org.antlr.*;
import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
public class Program
{
public static void main(String[] args) throws Exception
{
FlexByteArray_HexGrammarLexer lex = new FlexByteArray_HexGrammarLexer(new ANTLRStringStream("0001ff"));
CommonTokenStream tokens = new CommonTokenStream(lex);
FlexByteArray_HexGrammarParser parser = new FlexByteArray_HexGrammarParser(tokens);
System.out.println("Parser created.");
CommonTree tree = (CommonTree)parser.expr().tree;
System.out.println("------Input parsed-------");
if (tree == null)
{
System.out.println("Tree is null.");
}
else
{
DOTTreeGenerator treegen = new DOTTreeGenerator();
System.out.println(treegen.toDOT(tree));
}
}
}
```
|
ANTLR - trouble getting AST hierarchy setup
|
CC BY-SA 3.0
| 0 |
2011-04-27T21:22:38.080
|
2011-04-29T13:51:54.350
| null | null | 352,349 |
[
"antlr",
"abstract-syntax-tree",
"antlrworks"
] |
5,810,967 | 1 | 5,812,392 | null | 0 | 947 |
I have
```
UIButton *home = [UIButton buttonWithType:UIButtonTypeContactAdd];
[home addTarget:self action:@selector(addNewRoute:) forControlEvents:UIControlEventTouchDown];
UIBarButtonItem *cancelButton = [[[UIBarButtonItem alloc]
initWithCustomView:home] autorelease];
self.navigationItem.rightBarButtonItem = cancelButton;
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.15 green:0.15 blue:0.49 alpha:1.0];
```
which do rotate:
```
- (void) addNewRoute:(id) sender
{
if (!routeAddIsActive) {
[UIView transitionFromView:self.addRoutesView.view toView:self.view duration:1.0 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil];
} else {
[UIView transitionFromView:self.view toView:self.addRoutesView.view duration:1.0 options:UIViewAnimationOptionTransitionFlipFromLeft completion:nil];
}
routeAddIsActive = !routeAddIsActive;
}
```
here is a view for rotation:
```
if (!addRoutesView) {
addRoutesView = [[AddRoutesTableViewController alloc] initWithStyle:UITableViewStylePlain];
addRoutesView.managedObjectContext = self.managedObjectContext;
}
```
when i start a rotation from view :

i have a strange change for new UIView position:
looks like iphone decide to move down view.
Returning is ok, everything work fine.

Now i have problem out by this code:
setup view:
```
if (!addRoutesView) {
addRoutesView = [[AddRoutesTableViewController alloc] initWithStyle:UITableViewStylePlain];
addRoutesView.destinationsPushListView = self;
addRoutesView.managedObjectContext = self.managedObjectContext;
if (!addRoutesNavigationView) {
addRoutesNavigationView = [[UINavigationController alloc] initWithRootViewController:addRoutesView];
```
change view in destinationsPushListView
```
- (void) addNewRoute:(id) sender
{
self.addRoutesNavigationView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:addRoutesNavigationView animated:YES];
```
change view in addRoutesView
```
- (void) addNewRoute:(id) sender
{
self.destinationsPushListView.navigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:destinationsPushListView.navigationController animated:YES];
```
Everything work fine, view changed, all correct, changed back, and then, when i clicked again, function addNewRoute called, and application stop and freeze without any errors and logs.
I have to keep navigation bar inside, this is maybe a best way to control rotate.
|
UIView transitionFromView:toView with two tableview controllers - strange location bug
|
CC BY-SA 3.0
| null |
2011-04-27T21:41:45.613
|
2011-04-28T07:53:07.127
|
2011-04-28T07:53:07.127
| 493,920 | 493,920 |
[
"iphone",
"cocoa-touch"
] |
5,811,007 | 1 | 5,811,152 | null | 2 | 14,184 |
I have a custom class
```
class RouteStop
{
public int number;
public string location;
public string street;
public string city;
public string state;
public string zip;
public RouteStop(int INnumber, string INlocation, string INstreet, string INcity, string INstate, string INzip)
{
this.number = INnumber;
this.location = INlocation;
this.street = INstreet;
this.city = INcity;
this.state = INstate;
this.zip = INzip;
}
}
```
Then I have a list where I store RouteStop items
```
private List<RouteStop> routeStops = new List<RouteStop>();
```
What I am trying to archive is to load all objects from list into a listbox.
So far it does it's job but instead of actual address it just writes object name into a list such like shown below 
How can I make it shows let's say number + location + street + city instead of object name?
Also in future I will need to add OnSelect event to open a new window to edit each object's data. How would I pass information about which item is selected?
Thank you very much everyone. Each answer helped. So what I did so far is changed data source to the list, overwrote ToString method to display full address in list, added new item to RouteStop with unique id and set the DisplayMember to the uniqe id so I can access selected item in future by id as well.
Thank you very much once again
|
How to list class objects in listbox using C#?
|
CC BY-SA 3.0
| 0 |
2011-04-27T21:46:52.777
|
2015-07-16T09:59:34.543
|
2011-04-27T22:09:24.643
| 558,785 | 621,033 |
[
"c#",
"winforms",
"listbox"
] |
5,811,165 | 1 | null | null | 0 | 120 |
I added some files on my local machine last night and I thought that I am going to see the option of adding then to the source safe but I am not seeing that option at all.
I am attaching the screenshot for your reference.

|
Adding local files to source control
|
CC BY-SA 3.0
| null |
2011-04-27T22:03:15.787
|
2011-12-18T04:29:03.687
|
2011-12-18T04:29:03.687
| 3,043 | 280,772 |
[
".net",
"visual-studio-2010",
"tfs"
] |
5,811,353 | 1 | 5,811,392 | null | 1 | 304 |
Hey. Been running into a rash of problems trying to make projects version controlled. Here is a picture of my eclipse set up on my main dev pc. Everything works fine here.

I decide to check out a copy onto my laptop and here is what I get:

There are errors everywhere because apparently 'something' isn't looking for class files until it reaches the end of a 'dot path', or something like that.
What exactly is going on with this dot hell?
|
Android, Eclipse, and SVN - How does source folder naming affect transmission?
|
CC BY-SA 3.0
| null |
2011-04-27T22:22:53.000
|
2011-04-27T22:28:00.513
| null | null | 434,400 |
[
"java",
"android",
"eclipse",
"svn"
] |
5,811,352 | 1 | 5,811,697 | null | 2 | 4,815 |
I have setup fullcalendar to load a number of google calendar events but was wondering if there is any way to load the or other data from the event other than the title and times?
I'd like to grab the 'description' and 'where' fields froom google calendar events and display them in a tooltip in fullcalendar.
I was thinking of trying to parse the event.url results but it doesn't work due to cross-domain ajax requests. I suppose it may be possible through a proxy php script or the crossframe jquery thing, but I'm wondering if fullcalendar provides any access to this data more cleanly? (or if anyone has a better idea)

|
fullcalendar jQuery - Possible to retrieve description from Google Calendar events?
|
CC BY-SA 3.0
| null |
2011-04-27T22:22:38.880
|
2017-08-09T10:27:11.257
|
2013-12-09T16:05:28.303
| 881,229 | 436,014 |
[
"jquery",
"html",
"fullcalendar",
"google-calendar-api"
] |
5,811,566 | 1 | 5,812,033 | null | 0 | 7,010 |
I'm using ObjectListView and I'm trying to wrap the text in a column.
I have 2 columns and have set the WordWrap property of the second column to true. It doesn't appear to work.
In the image below the last line should wrap

I have searched SO and tried all the suggestions including setting OwnerDraw to true but nothing helps.
Any ideas?
|
How to wrap the text in a column using ObjectListView
|
CC BY-SA 3.0
| null |
2011-04-27T22:49:00.960
|
2011-04-27T23:47:16.610
|
2011-04-27T22:52:31.650
| 351,385 | 4,149 |
[
"c#",
"winforms",
"objectlistview"
] |
5,811,589 | 1 | 6,015,206 | null | 4 | 1,665 |
my question is a bit tricky and I'm not really sure if it is possible, but I think I have a memory of doing it before or seeing it somewhere.
So, I am making a horisontal menu. I have a div block of size 980x36px. It has a background image:

Inside I have links `<a href="/">text</a>`) which I made block elements (`display: block;`) and floated left. So now it would look more like this:

Now I want all active links and all links that are mouse-overed to have a different background, like this:

The problem here is that my background image (on hover) is again 980x36 px and is different in the different horisontal positions just like the first background, blue on the left and red on the right:

So, now when I hover on a link I must set the background position some negative horisontal value, for example for the third link I should set something like background-position: -233px 0px; so the colors of the two backgrounds would fit.
My question is how can this be acomplished automaticaly? Here is the tricky part: I don't know the width of all links since they are text and should support multi-language (so they obviously cannot be pre-made images). I don't want to use PNG (I could easily make a semi-transparent 'glass' which would overlay with the first background and create the same effect) - because of.. guess who, yes IE6. And finally I want this to be done with a nice, clean and widely supported technique, so JavaScript is out of the question (I know it's easy, I can make it, I just don't want to use it).
The thing that is familiar in this situation is the `background-attachment: fixed;` method. In this case it would be great if I could fix the position of the background of each link to the position of the container div. That would be perfect! Just what I need! Each link will be on it's place, but the background would render as if it was on the container div! Well, that's the problem, if anyone knows a good solution.. If not I should consider the less pain, which in my opinion, currently is to try the PNG way with some IE fixer maybe?
|
CSS background-position fixed to parent
|
CC BY-SA 3.0
| null |
2011-04-27T22:51:48.560
|
2011-05-16T09:11:15.817
|
2011-04-27T23:02:54.390
| 52,724 | 728,244 |
[
"css",
"image",
"background",
"position",
"fixed"
] |
5,812,178 | 1 | 5,812,217 | null | 0 | 232 |
I am looking to update the field 'prefix' in my course table to just have the FIRST letter capitalized and not the whole prefix.
Is there any easy way to do this is SQL?? Sample Output could look like 'Aadm' in the database for 'prefix'.
My table looks like:

Sample rows look like:

I have SQL that looks like:
```
WHERE CONCAT(prefix,code) LIKE '%". $keywords . "%'");
```
Is it possible to user LOWER on prefix here?
|
Easy way to update certain field in database that is upper case?
|
CC BY-SA 3.0
| null |
2011-04-28T00:12:39.603
|
2011-04-28T00:42:18.147
|
2011-04-28T00:18:12.337
| 700,070 | 700,070 |
[
"mysql"
] |
5,812,170 | 1 | null | null | 0 | 1,445 |
I'm having a very weird issue with user logins.
I'm building a site where all the content/menus are only available after you login.
I made a 'login' through the Modules and assign it the "userlogin" position.
Now when I go to the home page or any page, the login box comes up, but there's also a second login form. It seems to be coming from com_user.
This com_user login form doesn't work. I can't login using any credentials. If it was working I can simply remove my login module.
Is there a way I can either:
-
or
-
I can hide it from CSS, but I want to know where it's coming from.

|
Joomla mod_login vs com_user
|
CC BY-SA 3.0
| null |
2011-04-28T00:11:10.923
|
2012-07-13T15:25:23.447
|
2012-07-13T15:25:23.447
| 1,448,202 | 638,077 |
[
"authentication",
"joomla",
"components"
] |
5,812,193 | 1 | 5,812,275 | null | 0 | 1,079 |
The issue discussed in [this question](https://stackoverflow.com/questions/1719475/jquery-cycle-firefox-squishing-images) happened to me with a production site, but in addition to Firefox, we saw it in IE.
This is how it should look, with all three fading to different pictures intermittently:

We got these screenshots from clients:
Abmormally small images:

Weird sized images:

We were able to reproduce it reliably with Firefox with a hard refresh (ctrl-f5), but the only one in our office that could reproduce it in IE was running IE8 on Windows 7, and then not reliably. The client was using IE7, I believe on XP.
I fixed it by setting up the slideshow in $(window).load() instead of $(document).ready(), but I never figured out why it was so hard to reproduce in IE. Management is unsettled by the fact that we could not reliably reproduce it in IE or explain why it happened, and I've been asked to investigate.
Does anyone have an idea? Does the same issue discussed in the linked question apply to IE in certain circumstances? All I can say at this point is "we can't always pin down things like this."
UPDATE: I was able to make it happen reliably in IE by not setting the src attributes in the slideshows until after I set up the slideshow in Javascript. I think this proves it was indeed the same timing issue, just happening more rarely because IE is a different rendering engine. Management is still curious what other circumstances intervened, but I'm confident now that it was indeed a timing issue in all browsers, and our production site is safe from further issues.
Also, I asked the same question on jQuery forums [here](http://forum.jquery.com/topic/squished-images-in-jquery-cycle) and was told to explicitly set image sizes in the img elements. This also fixed the issue.
|
jQuery Cycle - squishing images?
|
CC BY-SA 3.0
| null |
2011-04-28T00:15:06.817
|
2011-12-31T23:13:53.937
|
2017-05-23T11:48:23.740
| -1 | 412,107 |
[
"javascript",
"jquery",
"asp.net",
"internet-explorer"
] |
5,812,384 | 1 | 6,003,900 | null | 23 | 13,620 |
I'm measuring the time between frames in a simple WPF animation. Perforator says the app performs at ~60fps, so I expected the time between frames to be ~16.6ms with little deviation.
```
public MainWindow()
{
...
CompositionTarget.Rendering += Rendering;
}
List<long> FrameDurations = new List<long>();
private long PreviousFrameTime = 0;
private void Rendering(object o, EventArgs args)
{
FrameDurations.Add(DateTime.Now.Ticks - PreviousFrameTime);
PreviousFrameTime = DateTime.Now.Ticks;
}
```
Two things surprised me:
- -

Y - Time between frames in ticks (10,000 ticks = 1ms)
X - Frame count
Possible confounding factors
- -
The project I'm using: [SimpleWindow.zip](https://cid-15aa75a570a73bf7.office.live.com/self.aspx/Public/SimpleWindow.zip)
Markus pointed out I could be using RenderingEventArgs.RenderingTime.Ticks instead of DateTime.Now.Ticks. I repeated the run and got very different results. The only difference is timing method:


Data from RenderingEventArgs produced data much closer the expected 16.6ms/frame, and it is consistent.
- -
If the display is updating every 16.6ms and WPF is updating every 14.9ms, we can expect a race condition that would result in tearing. That is to say, roughly every 10th frame WPF will be trying to write its image while the display is trying to read the image.
|
Why is Frame Rate in WPF Irregular and Not Limited To Monitor Refresh?
|
CC BY-SA 3.0
| 0 |
2011-04-28T00:50:13.077
|
2013-05-02T09:20:22.013
|
2011-04-28T17:34:05.460
| 642,282 | 642,282 |
[
"wpf",
"animation"
] |
5,812,530 | 1 | 5,812,591 | null | 3 | 4,865 |
I'm trying to get four divs styled as in this image.

I've tried with using `float:left` but I either get all the divs stuck up on the right side of Div1
or all of them stuck underneath Div1. I believe I need to do a `clear` somewhere, is that right?
NB.
Div2 and Div3 may be different heights.
.
Thankyou for the answers so far, they are almost what I needed. To add to the question, is it possible to get this look when the DivContainer doesnt have a fixed width?
|
How can I style this div layout with css?
|
CC BY-SA 3.0
| 0 |
2011-04-28T01:16:55.797
|
2011-05-02T00:58:51.660
|
2011-04-28T01:48:29.843
| 716,522 | 716,522 |
[
"css",
"html",
"css-float"
] |
5,812,593 | 1 | null | null | 2 | 963 |
Hey, I've got a textured NSWindow, and I'm seeing some strange behaviour with the way it gets textured. If I have an IKImageBrowserView in the window, then there is a full light to dark gradient in both the title bar and the bottom bar of the window, but if I hide the IKImageBrowserView and show my NSBox, then the gradient starts light in the top, and ends dark in the bottom bar. I think screenshots may describe the problem more accurately.
Alternatively, is there a way of placing an NSTextField and an NSProgressIndicator overtop of an ikimagebrowserview? They aren't visible when placed above the ikimagebrowserview for some reason.

|
NSWindow textured gradient fill weirdness
|
CC BY-SA 3.0
| null |
2011-04-28T01:27:16.970
|
2012-07-14T10:13:03.123
| null | null | 112,356 |
[
"cocoa",
"nswindow"
] |
5,812,680 | 1 | 5,812,722 | null | 4 | 537 |
If I have two tables - `table beer` and `table distributor`, each one have a primary key and a third table that have the foreign keys and calls beer_distributor

Is it adequate a new field (primary key) in this table? The other way is with joins, correct? To obtain for example DUVEL De vroliijke drinker?
|
many to many relationship
|
CC BY-SA 3.0
| 0 |
2011-04-28T01:45:32.170
|
2011-05-20T16:35:45.347
|
2011-04-28T01:56:10.733
| 135,152 | 564,979 |
[
"mysql",
"database"
] |
5,812,793 | 1 | 5,817,823 | null | 3 | 150 |
When coding HTML pages (specially with much textual content) one sometimes has the option of using `DIV` or `P` elements. The conceptual rule is: [think semantically, use P for text paragraphs](https://stackoverflow.com/questions/2226562/what-is-the-difference-between-p-and-div).
One problem I have found with that it that the real-world concept of a paragraph does not always plays nice with the HTML restriction that . In the real world, a paragraph sometimes does include text blocks -in particular, quotations. Take for example this text from P. G. Wodehouse:
> The odd part of it was that after the
first shock of seeing all this
frightful energy the thing didn't seem
so strange. I've spoken to fellows
since who have been to New York, and
they tell me they found it just the
same. Apparently there's something in
the air, either the ozone or the
phosphates or something, which makes
you sit up and take notice. A kind of
zip, as it were. A sort of bally
freedom, if you know what I mean, that
gets into your blood and bucks you up,
and makes you feel that and you don't care if you've got odd
socks on. I can't express it better
than by saying that the thought
uppermost in my mind, as I walked
about the place they call Times
Square, was that there were three
thousand miles of deep water between
me and my Aunt Agatha.
The natural (semantical) way to see this, is as paragraph with a child block element. But in HTML, you must opt for
- make three P paragraphs (you should make some tweaks, eg last pseudo-paragraph could have wrong margins or indents - but above all, it would be semantically and structurally incorrect) - code the inside quote as an inline element, a SPAN with several BR (ugly, hard to apply a style to all of it)- make the full paragraph a DIV (unfeasible/inconsistent, if the other paragraphs are coded as P elements)
I don't like either option - and I don't see other; and so the criterion for deciding when P should be used remains rather unsatisfactory for me.
Another similar example, from [another PGW opus](http://www.wodehouse.co.uk/data/pdf/Uncle%20Dynamite.pdf) follows:

Any suggestions for dealing with this scenarios?
|
Suggestion to deal with paragraphs with block content?
|
CC BY-SA 3.0
| null |
2011-04-28T02:04:05.983
|
2011-04-28T11:48:25.293
|
2017-05-23T10:30:21.980
| -1 | 277,304 |
[
"html",
"semantic-markup"
] |
5,812,986 | 1 | 5,813,165 | null | 1 | 613 |
Background: We are launching a event which would be attended by students from various Universities. A web application would report live as to number of students registering for the event.
The basic web layout is

I hope the desired layout is clear. This needs to refresh every 5 mins to display as new students are registered. I have got the refresh part done
using Ajax setTimeout() method.
I have table `Student`. The query I am using is:
```
SELECT UNIV, STUDENT_NAME, STUDENT_EMAIL
FROM STUDENT
ORDER BY UNIV;
```
However, the main issue is identifying when to add new row in the table and displaying the details
Issue 1: Currently, what I am doing is having `$currUniv` variable which refers to the current value of University. If the value of `$currUniv` and current row fetched don't match, I create a new row
Code: in updater.php
```
function updateTable()
{
$currUniv = "";
while($currLine = mysql_fetch_array($results))
{
if (strcmp($currLine[0], $currUniv) != 0)
{
responseHTML .= "<tr id = \"{$currLine[0]}\">";
responseHTML .= "<td id = \"{$GLOBALS["univ"]}\">";
responseHTML .= "{$currLine[0]}";
responseHTML .= "</td>";
$currUniv = $currLine[0];
}
responseHTML .= "<td id = \"{$GLOBALS["studentname"]}\">";
responseHTML .= "{$currLine[1]}";
responseHTML .= "</td>";
responseHTML .= "<td id = \"{$GLOBALS["studentemail"]}\">";
responseHTML /= "{$currLine[2]}";
responseHTML .= "</td>";
if (strcmp($currLine[0], $currUniv) != 0)
{
responseHTML .= "</tr>";
}
}
}
```
Firstly, the table is not displayed. I don't think this is the best algorithm to create the table. Can anyone suggest me any other means of achieving the same?
|
Live Update Web system - Ajax, PHP, MySQL
|
CC BY-SA 3.0
| null |
2011-04-28T02:40:40.507
|
2011-04-28T03:10:13.190
| null | null | 183,717 |
[
"php",
"mysql",
"ajax"
] |
5,813,066 | 1 | 5,813,192 | null | 1 | 838 |
With help from SOers, I was able to make more efficient a hover and fadein/fadeout function to show text divs under this image layout. But I'd like to work with slideToggle because with hover, the text flickers and the divs bounce. How would I adapt this function to use slideToggle where the toggle requires a click on each image?
[http://jsfiddle.net/Ckrtu/11/](http://jsfiddle.net/Ckrtu/11/)
This is an image of what I'm trying to do:

```
$(document).ready(function() {
$("#imagegallerydiv").delegate("dt[class]", "hover", function(e) {
if (e.type === "mouseenter") {
var index = $(this).parent().index();
$("#wide-text-div-under-all-images div").eq(index).fadeIn('fast');
}
if (e.type === "mouseleave") {
var index = $(this).parent().index();
$("#wide-text-div-under-all-images div").eq(index).fadeOut('fast');
}
});
});
```
```
#imagegallerydiv {width: 700px; height:200px; margin:5px; text-align: center;}
dl.gallery {width: 97px; text-align: center; float: left;}
.gallery dt {width: 80px; margin-top:2px; font-size: .7em; text-align:center;}
#wide-text-div-under-all-images div {display: none;}
```
```
<div id="imagegallerydiv">
<dl class="gallery"><dt class="imgone"><img alt="img" src="one.jpg"></dt>
<dt>Image Title One</dt></dl>
<dl class="gallery"><dt class="imgtwo"><img alt="img" src="two.jpg"></dt>
<dt>Image Title Two</dt></dl>
<dl class="gallery"><dt class="imgthree"><img alt="img" src="three.jpg"></dt>
<dt>Image Title Three</dt></dl>
<dl class="gallery"><dt class="imgfour"><img alt="img" src="four.jpg"></dt>
<dt>Image Title Four</dt></dl>
<dl class="gallery"><dt class="imgfive"><img alt="img" src="four.jpg"></dt>
<dt>Image Title Five</dt></dl>
</div>
<div id="wide-text-div-under-all-images">
<div class="textone">Lorem Ipsum One</div>
<div class="texttwo">Lorem Ipsum Two</div>
<div class="textthree">Lorem Ipsum Three</div>
<div class="textfour">Lorem Ipsum Four</div>
<div class="textfive">Lorem Ipsum Five</div>
</div>
```
|
Change jQuery function from hover to slideToggle
|
CC BY-SA 3.0
| null |
2011-04-28T02:52:20.053
|
2011-04-28T13:51:11.720
|
2011-04-28T13:29:17.143
| 85,385 | 85,385 |
[
"jquery",
"hover",
"slidetoggle"
] |
5,813,138 | 1 | 7,999,821 | null | 3 | 1,618 |
I made separate site for Smartphone and now Need to make separate site for other old mobiles.
How to get maximum compatibility with most of the devices of a Mobile Website on old/small screen mobiles?

I'm thinking to use
This doctype for HTML
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
```
AND only selectors and properties which are supported [CSS Mobile Profile 2.0](http://www.w3.org/TR/css-mobile/)
- - - - - - - `width``float`- - `font-family`
I'm not sure on some things?
- - - - - - - -
Are my points good enough?
Although I'm going to read [http://www.w3.org/TR/mobile-bp/](http://www.w3.org/TR/mobile-bp/) in details and I also checked [http://html5boilerplate.com/mobile/](http://html5boilerplate.com/mobile/) but it's for all including Smartphones+ but some things are useful
[https://spreadsheets.google.com/spreadsheet/ccc?authkey=CJPSkfwO&pli=1&hl=en&key=tLen0XZBVTziVZBzwwQFxlw&hl=en&authkey=CJPSkfwO#gid=0](https://spreadsheets.google.com/spreadsheet/ccc?authkey=CJPSkfwO&pli=1&hl=en&key=tLen0XZBVTziVZBzwwQFxlw&hl=en&authkey=CJPSkfwO#gid=0)
[http://cartoonized.net/cellphone-screen-resolution.php](http://cartoonized.net/cellphone-screen-resolution.php)
|
How to get maximum compatibility with most of the devices for a Mobile Website?
|
CC BY-SA 3.0
| 0 |
2011-04-28T03:05:15.813
|
2011-11-03T18:13:09.883
|
2011-04-28T03:35:28.523
| 84,201 | 84,201 |
[
"css",
"xhtml",
"mobile",
"mobile-website",
"mobile-phones"
] |
5,813,238 | 1 | 5,813,306 | null | 1 | 241 |
I created a 200x200 square div and created a dashed border to define it.
The problem is that the div right above it, completely unrelated, is also getting a dashed border applied to it. If I add other divs, they do not experience the problem. Just my title text.
Here is an image!

[http://i.stack.imgur.com/4qod6.png](https://i.stack.imgur.com/4qod6.png)
And here is the HTML/CSS
```
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="index.css" type="text/css" />
</head>
<body>
<div id="main">
<h1>Test Text</h1>
</div>
<div id="dropbox">
<p>Drag and drop your file here!</p>
<img src="spinner.gif" />
</div>
</body>
</html>
html {
height: 100%;
}
body {
height: 100%;
font-family: "HelveticaNeue-Light", sans-serif;
background: -webkit-gradient(linear, 0 0, 0 15%, from(#2B2B2B), to(#383838));
background: -moz-linear-gradient(100% 100% 90deg, #2B2B2B, #383838);
margin: 0;
background-repeat: no-repeat;
}
#main h1{
border: none;
padding-top: 4em;
text-align: center;
margin-left: auto;
margin-right: auto;
font-size: 250%;
text-decoration: none;
color: #ffffff;
-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), color-stop(50%, rgba(0,0,0,0)), to(rgba(0,0,0,1)));
-webkit-text-stroke: 1px white;
text-shadow: 2px 2px 1px #292929;
}
#dropbox {
border-style:dashed;
border-width:5px;
width:200px;
height:200px;
font-family: Georgia, "HelveticaNeue-Light", sans-serif;
font-color: #222;
font-size:105%;
text-shadow: 0px 1px 1px #555;
text-align: center;
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
```
|
CSS Border Being Applied to Unwanted Element (Have tried everything to remove it)
|
CC BY-SA 3.0
| null |
2011-04-28T03:22:30.953
|
2011-12-01T07:46:23.560
|
2011-12-01T07:46:23.560
| 234,976 | 728,477 |
[
"css",
"html",
"border"
] |
5,813,322 | 1 | 5,884,673 | null | 0 | 1,093 |
I have a web page with a form tag. Outside the form tag (in the body) I wanted to set a background image to the left of the form tag (the goal of that background image is to gradient from the back-color of the body which is black to the form color which is Grey)
My problem is that when 'zooming in' the browser, (obviously the zoom goes toward the form), I expect the image to be out of the screen gradually, but the fact is that the image is still displayed but it goes darker as I zoom in. At the end the left edge of the screen becomes black. I looks like the image does not accept to leave the screen.
Before Zooming in:

After Zooming in:

The image that is used:

My code:
```
table cellspacing="0" cellpadding="0" class="myTable">
<tr>
<td class="TopLeft">
</td>
<td class="Top">
</td>
<td class="TopRight">
</td>
</tr>
<tr>
<td class="Left">
</td>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mTop" colspan="3">
</td>
</tr>
<tr>
<td class="mLeft">
</td>
<td class="middle">
<form id="Form1" runat="server">
<div class="page">
<div class="main">
ASDFGGH
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
</div>
</form>
</td>
<td class="mRight">
</td>
</tr>
<tr>
<td class="mBottom" colspan="3">
</td>
</tr>
</table>
</td>
<td class="Right">
</td>
</tr>
<tr>
<td class="BottomLeft">
</td>
<td class="Bottom">
</td>
<td class="BottomRight">
</td>
</tr>
```
And I will put only the CSS of the class: "Left"
```
.Left
{
width: 113px;
height: 761px;
background-image: url('../Images/L.jpg');
}
```
Thank you...
|
Keeping the image properly displayed when zooming (HTML)
|
CC BY-SA 3.0
| null |
2011-04-28T03:37:22.643
|
2011-05-04T14:05:50.207
| null | null | 465,495 |
[
"html",
"css",
"background-image",
"zooming"
] |
5,813,728 | 1 | 5,815,746 | null | 1 | 111 |
[http://www.antisweden.no/](http://www.antisweden.no/)
I love the menu and i want to be able to do it...any ideas?
Thanks
|
Trying to make a menu like this...one
|
CC BY-SA 3.0
| 0 |
2011-04-28T04:46:32.410
|
2011-04-28T11:59:35.853
|
2011-04-28T05:17:19.730
| 470,567 | 470,567 |
[
"jquery",
"css"
] |
5,813,908 | 1 | 5,815,586 | null | 0 | 490 |
I have Made one TableView in Which i want to Set the Each and Every Contain in the middle of the every row and there are multiple textview in the one row then how to set it. . . ?
The code is As below :
```
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:stretchColumns="1">
<TableRow>
<TextView android:text="Name" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="Address" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="E-Mail" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="Phone No." android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<View android:layout_height="3dip" android:background="#FF909100" />
<TableRow>
<TextView android:text="Shreyash" android:textColor="#FF778899"
android:gravity="center" />
<TextView android:text="Godhra" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="sbm_mahajan" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="9825056129" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<View android:layout_height="2dip" android:background="#FF909060" />
</TableLayout>
```
see the Below Image:

|
Set the Layout in the TableView
|
CC BY-SA 3.0
| 0 |
2011-04-28T05:12:33.370
|
2011-04-29T14:10:06.253
|
2011-04-29T14:10:06.253
| 4,596 | null |
[
"android",
"android-layout"
] |
5,814,164 | 1 | null | null | 3 | 840 |
I like quiet and undisturbed color gamut and lighting of 3D plots in 5.
Is it possible to style 3D plots in 7 exactly as it was in 5?
```
Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, ImageSize -> 360]
<< Version5`Graphics`
Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, ImageSize -> 360]
```

---
This code allows to compare easily visual appearance of version 5 and version 7 graphics:
```
v5style = {{"Ambient", RGBColor[{0.356, 0.294, 0.4}]}, {"Directional",
RGBColor[{0.56, 0., 0.}],
ImageScaled[{2, 0, 2}]}, {"Directional", RGBColor[{0., 0.56, 0.}],
ImageScaled[{2, 2, 2}]}, {"Directional",
RGBColor[{0., 0., 0.56}], ImageScaled[{0, 2, 2}]}};
PostScriptGraphics /: MakeBoxes[PostScriptGraphics[str_String], _] :=
Cell[GraphicsData["PostScript", str], CellAutoOverwrite -> True,
CellBaseline -> Center]
v5vsv7[\[Theta]_] := {Developer`LegacyGraphics[];
v5Graphics =
Graphics`Legacy`Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi},
ImageSize -> 360,
ViewPoint -> RotationTransform[\[Theta], {0, 0, 1}][{3, 0, 3}]];
v5PostScript = ExportString[v5Graphics, "APS"];
Developer`SymbolicGraphics[];
PostScriptGraphics[v5PostScript],
Graphics3D[First@Graphics3D@v5Graphics,
FilterRules[Last@Graphics3D@v5Graphics, Options[Graphics3D]],
ViewPoint -> RotationTransform[\[Theta], {0, 0, 1}][{3, 0, 3}],
PlotRangePadding -> None,
ImageSize -> 360] /. (Lighting -> _) -> (Lighting -> v5style)};
Grid@Table[v5vsv7[\[Theta]], {\[Theta], 0, 2 Pi, Pi}]
```
|
Styling 3D plots as it was in Mathematica 5
|
CC BY-SA 3.0
| null |
2011-04-28T05:46:38.857
|
2011-04-29T06:40:03.550
|
2011-04-29T06:40:03.550
| 590,388 | 590,388 |
[
"wolfram-mathematica",
"mathematica-frontend"
] |
5,814,386 | 1 | 5,814,480 | null | 0 | 56 |
I am looking for a way to retrieve the URLs of the get requests from a specific website / link that I do not have any affiliation with. I've been using PHP and its really not working out. I am pretty sure the code below is getting the information of the index page itself. Not the get requests because the page needs to load to even initiate get requests, and I don't know of a way to "load" a page without actually going to it in a browser... If you give me any lead within any programming language it would be a great help.
```
$url = 'http://apple.com';
echo "<pre>";
print_r(get_headers($url, 1));
echo "</pre>";
```
This is what I want an array of (just the URL's / filenames):

With certain things like [Simple HTML Dom Parser](http://simplehtmldom.sourceforge.net/) and [cURL](http://php.net/manual/en/book.curl.php) I was thinking there might be a way. If there is another language that can do this I would love to know.
|
Retrieve array of get requests
|
CC BY-SA 3.0
| null |
2011-04-28T06:13:22.493
|
2011-04-28T06:25:05.953
|
2011-04-28T06:25:05.953
| 340,688 | 340,688 |
[
"php",
"any"
] |
5,814,416 | 1 | null | null | 0 | 929 |
I have recorded audio in 3gp format and keep it in sd card.. this is my code and it run sucessfull.. I need to add an image to that audio file so that the added image will be the album cover & when i try to play the recorded audio taken from the sd card location in default media player of android..like this..

the image shown in the picture is the album cover i have to give it to my recorded audio file
```
/**
* Starts a new recording.
*/
public void start() throws IOException {
String state = android.os.Environment.getExternalStorageState();
if (!state.equals(android.os.Environment.MEDIA_MOUNTED)) {
throw new IOException("SD Card is not mounted. It is " + state
+ ".");
}
// make sure the directory we plan to store the recording in exists
File directory = new File(path).getParentFile();
if (!directory.exists() && !directory.mkdirs()) {
throw new IOException("Path to file could not be created.");
}
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
System.out.println("audio_file_path : = " + path);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start(); // Recording is now started
}
```
|
Record audio in Android
|
CC BY-SA 3.0
| 0 |
2011-04-28T06:16:47.130
|
2011-04-28T06:50:58.673
| null | null | 548,218 |
[
"android",
"audio-recording",
"albumart"
] |
5,814,437 | 1 | null | null | 0 | 129 |
I'm developing in IE6. I have a simple combobox with three options (the empty default one, and two others).
Sometimes, this combo shows the options in the right way, like this: 
But other times, the combo has the same options, but it doesn't show them, like this: 
The options are provably there because I can put the mouse in the combo and, with the mouse wheel, I can go up and down and make a selection. But the combo doesn't open (or drilldown, I don't know the right verb).
Other combos in the same view show their options well, they have a CSS class like this:
```
.myStyle { width: 170px; padding:1px 0px 1px 0px; }
```
This 'rebel' combo also has this style. What am I doing wrong? Is this a CSS issue?
Note that the combo is inside a cell in a table. The code is:
```
<select id="mySelect" class="myStyle">
<option value="0"> </option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
</select>
```
In the JavaScript section, if I don't use this jQuery code, the combo options are never shown:
```
$("#mySelect").css("width","auto");
```
Because of this, at least sometimes, the combo options can be shown.
|
Combo doesn't show his options
|
CC BY-SA 3.0
| null |
2011-04-28T06:18:45.290
|
2015-08-13T22:58:03.587
|
2015-08-13T22:58:03.587
| 442,945 | 543,320 |
[
"html",
"combobox",
"internet-explorer-6"
] |
5,814,664 | 1 | 5,814,689 | null | 3 | 1,807 |

How to do this effects for `<option>` and `<button>` with CSS and JS?
|
Drop-down box and buttons like in gmail
|
CC BY-SA 3.0
| 0 |
2011-04-28T06:42:38.683
|
2011-04-28T12:02:21.260
|
2011-04-28T12:02:21.260
| 664,157 | 531,272 |
[
"javascript",
"html",
"css"
] |
5,814,765 | 1 | 5,816,222 | null | 16 | 7,082 |
If you copy files under Windows 7, you will see the of the copy in a sort of of the application.
Can this be achieved using Delphi 7 ?
I have some lengthy operation which would be ideally suited to show it's progress this way.
.
|
How do I show progress in status/task bar button using Delphi 7?
|
CC BY-SA 3.0
| 0 |
2011-04-28T06:53:05.817
|
2017-08-25T09:22:27.440
|
2011-04-28T22:09:30.267
| 91,299 | 231,181 |
[
"delphi",
"progress-bar",
"delphi-7"
] |
5,815,142 | 1 | 5,826,766 | null | 6 | 2,950 |
Math has come on my way again and has defeated me. I need your help to regroup and attack again.

I've got a surfaceview and a circle as a bitmap. I need to rotate the bitmap as the user moves the finger around the circle edge. The faster the user slides, the more I need to rotate the image. Seems simple but not really easy to implement.
I need to calculate the angle on which to rotate the image on onDraw event. From what I've thought so far I need two things:
- the angle between new touched point and the old one. I've done a simple function that takes care of this:
```
private int getAngleBetweenTwoTouchedPoints(double oldX, double oldY, double newX, double newY)
{
return (int) Math.abs(Math.atan2(newY - oldY, newX - oldX));
}
```
the angle returned by this varies from 0 to 1 and I believe it is correct. By incrementing the image rotation matrix angle by this value I get a slow rotation, basically by 1 unit. So, there is a chance to work, but not ok yet.
- so, the second thing I may need is the speed with which the user slides the finger around the screen. So basically something like this:
rotationAngle += angleBetweenTouches+speed
Speed, or velocity as I saw it named is the problem in my case, considering that I don't move only on X or Y but around the circle. I have no idea how to calculate it. I saw VelocityTracker on Android help but I don't know how it could help.
So to recap: I need to be able to rotate the image as the user moves the finger around the image border. Even simpler, when the user stops sliding, the pixel of the image that was below the finger on slide start should be the same when the slide stops.
Any help is greatly appreciated. Thank you
|
Find angle and speed for user touch event around a circle on Android
|
CC BY-SA 3.0
| 0 |
2011-04-28T07:25:12.103
|
2011-04-29T00:59:49.637
| null | null | 379,865 |
[
"android",
"velocity",
"geometry"
] |
5,815,156 | 1 | 5,815,691 | null | 2 | 2,533 |
I am new to the .
I created a and I want to .
like

please help........
Thanks in advance..
|
How create text background in zend pdf
|
CC BY-SA 3.0
| 0 |
2011-04-28T07:25:50.650
|
2011-05-24T07:51:46.647
|
2011-05-24T07:51:46.647
| 578,156 | 726,990 |
[
"php",
"zend-framework",
"zend-pdf"
] |
5,815,158 | 1 | 5,817,485 | null | 3 | 877 |
I have a list of dynamically generated divs that represent panels for selecting various options. There are two types of divs, regular ones and short ones. The height of the regular divs is set with javascript to te height of the tallest one. Additionally, if the height of te short div is less than half of the maximum it is set to half of that height, otherwise it is set to the full height.
What I would want to do now (preferably with CSS) is to list those items in such a way that if there is enough space, to put one short div below another sort div.
Here are some illustrations to hopefully make things clearer:


|
How to float divs left with shorter divs one below anoter
|
CC BY-SA 3.0
| null |
2011-04-28T07:25:52.503
|
2012-05-03T12:05:50.583
|
2011-04-29T14:37:30.933
| 396,680 | 396,680 |
[
"css",
"html"
] |
5,815,209 | 1 | 5,815,241 | null | 1 | 154 |
I am having following database schema, I want to fetch name of all categories with no of quotes related to that category . The query that i wrote giving me one row only can u please tell me the resource efficient query.

|
How to use mySQL count using joins?
|
CC BY-SA 3.0
| 0 |
2011-04-28T07:30:37.457
|
2011-04-28T07:48:25.443
|
2011-04-28T07:43:31.897
| 147,776 | 395,661 |
[
"mysql",
"sql"
] |
5,815,208 | 1 | 5,816,534 | null | 1 | 686 |
I've got a weird CSS float problem in IE6 and IE7.
My HTML is:
```
<fieldset style="float:left">
<legend>Summary</legend>
<div class="display-label">Recruitment type</div>
<div class="display-field">Permanent Labour</div>
<div class="display-label"># resources</div>
<div class="display-field">2</div>
<div class="display-label">Request Created</div>
<div class="display-field">4/28/2011</div>
<div class="display-label">Requested by</div>
<div class="display-field">1066594</div>
<div class="display-label">Status</div>
<div class="display-field">Active</div>
</fieldset>
```
and my CSS is:
```
.display-label, .display-field
{
padding: 0.35em 0.25em;
float: left;
}
.display-label
{
width: 13em;
text-align: right;
clear : left;
font-weight: bold;
}
.display-field
{
margin-left: 1em;
}
```
IE 8+ and Firefox display this correctly like this:

IE6 and 7 , though, display the following:

How can I fix this?
|
CSS float issue in IE6/7
|
CC BY-SA 3.0
| 0 |
2011-04-28T07:30:28.067
|
2014-01-14T15:47:13.327
|
2014-01-14T15:47:13.327
| 881,229 | 377,639 |
[
"css",
"internet-explorer-7",
"css-float",
"internet-explorer-6"
] |
5,815,230 | 1 | 5,815,294 | null | 1 | 118 |
The background color of `<ol`> list is not displayed properly. This problem started after I floated label left and input right. How to fix this. The expected result is:

Here is my result: [http://fiddle.jshell.net/WZ3nM/1/](http://fiddle.jshell.net/WZ3nM/1/)
Similarly I've problem with the `div .wrapper`. The shadow should be way below the content and there should be a white color background beneath `<div class=.col-2>`.
|
Background not visible due to positioning
|
CC BY-SA 3.0
| 0 |
2011-04-28T07:33:00.090
|
2011-04-28T07:42:58.003
|
2011-04-28T07:39:14.523
| 398,242 | 728,783 |
[
"html",
"css",
"position"
] |
5,815,369 | 1 | null | null | 2 | 939 |
how to add custom search source in Android google search

|
how to add custom search source in Android google search
|
CC BY-SA 3.0
| null |
2011-04-28T07:50:57.580
|
2011-04-28T08:44:27.570
|
2011-04-28T07:52:04.080
| 473,070 | 305,945 |
[
"android"
] |
5,815,486 | 1 | 5,817,391 | null | 3 | 4,910 |

I want that if none of the RadioButtons are selected , then ,when the Next button is pressed, then it should give an alert that PLEASE CHOSE ATLEAST ONE ITEM, and it should not go to the next Dialog.
Also, I want that if the user selects the option : UPDATE EXISTING SOFTWARE, then only some files are copied, and if the other radiobutton is selected , then all files are copied,
Is this possible using sections or functions have to be used? can i call a Section, like if RadioButton 1 is chosen, then SECTION CREATEALLFILES is called, else SECTION CREATEONLYTWOFILES is called?
According to me, i think i want the code to HOW TO HOLD THE ids of these two RadioButtons and use them accordingly , to call different sections or functions. What would be the code? Please help?
Also, after pressing NEXT on this page, the next dialog will come as in image below: i want to show a LABEL , whether DEMO is done, or UPDATE is running, for this i will add a Label using Resource Hacker, but how to display that Label and hide it according to user choice of RadioButton

|
using nsis installer, adding custom radiobuttons, calling sections according to radiobutton chosen
|
CC BY-SA 3.0
| null |
2011-04-28T08:00:47.963
|
2020-09-05T21:27:05.647
|
2020-09-05T21:27:05.647
| 2,370,483 | 613,929 |
[
"installation",
"custom-controls",
"nsis",
"nsis-mui"
] |
5,815,625 | 1 | 5,831,706 | null | 18 | 31,812 |
I've installed JDK, Android SDK and Mono Android for Visual Studio 2010, I've created an empty solution and I got the emulator up and running with Android 2.3.3 - so far so good.
When I try to deploy (F5) the app to the emulator, it connects to the emulator, and all goes fine until it starts "Installing the platform framework". Then it loads for several minutes, and finally throws an exception that looks like this:

I have tried googlin' it, but the INSTALL_FAILED_MEDIA_UNAVAILABLE doesn't seem to be described anywhere else.
I don't know if this is an important detail, but on my PC I have remapped my home folders (Documents, Favorites, Desktop, etc.) to folders like "D:\Mikkel\Dokumenter". It seemed to cause some problems when starting the emulator initially, but after adding the environment variable "ANDROID_SDK_HOME" pointing to "D:\Mikkel.android" the emulator started up with no problems.
Please advise.
|
Failure INSTALL_FAILED_MEDIA_UNAVAILABLE
|
CC BY-SA 3.0
| 0 |
2011-04-28T08:13:48.157
|
2016-05-10T18:45:14.030
| null | null | 285,853 |
[
"xamarin.android"
] |
5,815,768 | 1 | 5,815,794 | null | 16 | 11,236 |
I am creating a layout as follows and when I emulate it in the AVD. It doesn't Scroll down to see the conten below the fold.
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TextView android:text="@string/UserFormWelcome"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:textSize="20px" android:gravity="center" />
<TextView android:text="@string/name" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:textStyle="bold"
android:paddingTop="20px" android:paddingLeft="10px" />
<TableLayout android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TableRow android:layout_height="wrap_content"
android:layout_width="match_parent" android:paddingTop="20px">
<TextView android:text="@string/firstname"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:width="100px" android:paddingLeft="10px" />
<EditText android:id="@+id/LastName" android:width="200px"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</TableRow>
<TableRow android:layout_height="wrap_content"
android:layout_width="match_parent">
<TextView android:text="@string/lastname"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:paddingLeft="10px" />
<EditText android:id="@+id/LastName" android:width="200px"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
<TextView android:text="@string/dob" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textStyle="bold"
android:paddingTop="20px" android:paddingLeft="10px" />
<TableLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:stretchColumns="3"
android:paddingTop="20px" android:paddingLeft="10px">
<TableRow>
<TextView android:text="@string/date" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="0" />
<TextView android:text="@string/month" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="1" />
<TextView android:text="@string/year" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="2" />
</TableRow>
<TableRow>
<Spinner android:id="@+id/spinnerDate" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="0" />
<Spinner android:id="@+id/spinnerMonth" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="1" />
<Spinner android:id="@+id/spinnerYear" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_column="2" />
</TableRow>
</TableLayout>
<LinearLayout android:id="@+id/linearLayout1"
android:orientation="vertical" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:paddingLeft="10px">
<TextView android:text="@string/sex" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textStyle="bold"
android:paddingTop="20px" />
<RadioGroup android:id="@+id/radioGroup1"
android:orientation="horizontal" android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RadioButton android:text="Male" android:id="@+id/rdbMale"
android:layout_height="wrap_content" android:layout_width="wrap_content"
android:paddingRight="20px" android:checked="true" />
<RadioButton android:text="Female" android:id="@+id/rdbFemale"
android:layout_height="wrap_content" android:layout_width="wrap_content" />
</RadioGroup>
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:paddingLeft="10px">
<TextView android:text="@string/city" android:id="@+id/textView3"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textStyle="bold" android:paddingTop="20px"
android:paddingBottom="10px" />
<Spinner android:id="@+id/citySpiner" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Spinner>
</LinearLayout>
</LinearLayout>
```

|
Android Emulator doesn't Scroll down
|
CC BY-SA 4.0
| 0 |
2011-04-28T08:27:42.397
|
2019-02-24T11:20:03.990
|
2019-02-24T11:20:03.990
| 1,033,581 | 155,196 |
[
"android",
"android-layout",
"scroll",
"tablelayout",
"android-linearlayout"
] |
5,815,791 | 1 | null | null | 2 | 407 |
The iPhone Contacts app has a nice interface for saving addresses. When you change the country, the fields change to be specific to that country's address fields. For example, the US has a "Zip" field, where other countries have a "Postal Code".

Is there any method to get these fields, possibly by passing a country code?
|
Address fields by country
|
CC BY-SA 3.0
| 0 |
2011-04-28T08:29:35.783
|
2011-04-28T09:27:32.870
| null | null | 74,118 |
[
"iphone",
"cocoa-touch",
"abaddressbook"
] |
5,815,858 | 1 | 5,815,973 | null | 2 | 4,127 |
I have a `DataGrid` () that binds to a `DataTable` ().
The code runs fine and `DataGrid` is showing the Data in `DataTable` correctly.
But, if I `Clear()` the `DataTable`, the `DataGrid` is also clear but left with one single empty row, which I don't know how to get rid of. I have already cleared the DataTable. Where is this empty row come from?
```
SqlCeDataAdapter da = new SqlCeDataAdapter();
string sqlStr = @"SELECT * FROM FooTable";
da.SelectCommand = new SqlCeCommand(sqlStr, conn);
da.Fill(ds, "FooTable");
/* get data table reference */
dt = ds.Tables["FooTable"];
DataRow newRow = dt.NewRow();
newRow["FooName"] = "Donkey";
dt.Rows.Add(newRow);
dg1.ItemsSource = ds.Tables[0].DefaultView;
dt.Clear();
```

|
DataGrid show an empty row when DataTable is empty
|
CC BY-SA 3.0
| null |
2011-04-28T08:35:47.970
|
2011-04-28T09:12:44.730
|
2011-04-28T08:42:13.513
| 529,310 | 529,310 |
[
"c#",
"wpf",
"datatable"
] |
5,815,952 | 1 | 10,484,023 | null | 10 | 7,947 |
We have had our glassfish instance go down every two weeks for a while with a `java.lang.OutOfMemoryError: PermGen space`. I increased the PermGen space to 512MB and startet dumping memory usage with `jstat -gc`. After two weeks I came up with the following graph that shows how the PermGen space is steadily increasing (the units on the x-axis are minutes, y-axis are KB).

I tried googling around for some kind of profiling tool that could pinpoint the error and a thread here on SO mentioned jmap, which proved to be quite helpful. Out of the approximately 14000 lines dumped from `jmap -permstats $PID`, approximately 12500 contained `groovy/lang/GroovyClassLoader$InnerLoader`, pointing to some kind of memory leak from either our own Groovy code or Groovy itself. I have to point out that Groovy constitues less than 1% of the relevant codebase .
Example output below:
```
class_loader classes bytes parent_loader alive? type
<bootstrap> 3811 14830264 null live <internal>
0x00007f3aa7e19d20 20 164168 0x00007f3a9607f010 dead groovy/lang/GroovyClassLoader$InnerLoader@0x00007f3a7afb4120
0x00007f3aa7c850d0 20 164168 0x00007f3a9607f010 dead groovy/lang/GroovyClassLoader$InnerLoader@0x00007f3a7afb4120
0x00007f3aa5d15128 21 181072 0x00007f3a9607f010 dead groovy/lang/GroovyClassLoader$InnerLoader@0x00007f3a7afb4120
0x00007f3aad0b40e8 36 189816 0x00007f3a9d31fbf8 dead org/apache/jasper/servlet/JasperLoader@0x00007f3a7d0caf00
....
```
So how can I proceed to find out more about what code is causing this?
From [this article](http://groovy.dzone.com/news/groovyshell-and-memory-leaks) I infer that our Groovy code is dynamically creating classes somewhere. And from the the dump from jmap I can see that most of the dead objects/classes(?) have the same parent_loader, although I am unsure what that means in this context. I do not know how to proceed from here.
## Addendum
For latecomers, it's worth pointing out that the . It simply extends the period needed before rebooting with a tenfold by not storing so much class info. What actually fixed our problems was getting rid of the code that generated it. We used the validation (Design by contract) framework [OVal](http://oval.sourceforge.net/) where one could script custom constraints using Groovy as annotations on methods and classes. Removing the annotations in favor of explicit pre- and post-conditions in plain Java was boring, but it got the job done. I suspect each time an OVal constraint was being checked a new anonymous class was being created and somehow the associated class data was causing a memory leak.
|
Locating code that is filling PermGen with dead Groovy code
|
CC BY-SA 3.0
| 0 |
2011-04-28T08:44:50.287
|
2015-04-18T12:13:46.533
|
2015-04-18T12:13:46.533
| 200,987 | 200,987 |
[
"java",
"memory-leaks",
"profiling",
"permgen",
"jmap"
] |
5,816,032 | 1 | 5,816,229 | null | 1 | 349 |
I have table1 with ID column and table2 with ID number column. ID format for example is "aac557z". I want to compare those ID's by the piece where is number.
Table1:

And Table2:

I want to select rows from table1 where the piece of the word is "567" in column ID. Numbers may be different.
Maybe someone has an idea?
I'm using MS Access 2010.
Thanks in advance.
|
SQL: How to compare two words by the pieces of them?
|
CC BY-SA 3.0
| 0 |
2011-04-28T08:51:42.770
|
2011-04-28T09:08:41.693
|
2011-04-28T09:05:38.163
| 307,138 | 572,853 |
[
"sql",
"ms-access",
"compare"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.