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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4,338,276 | 1 | null | null | 2 | 737 | Some programs like Maya and Wings3D have a menu, which includes a special link on some menu items on the right side (usually a square) that triggers a different feature. For example, Wings3D might have an item called "Cube", which makes a standard cube. However, if you click on the highlightable/selectable box beside the "Cube" item, it will perform a different operation. I attached an image of the Wings3D example.
Is this an easy way to do this using QMenu and QAction? Should I create a special layout for the QMenu or do I need to subclass it to get more fine-grained control?

| Qt: Adding a special item to QMenu | CC BY-SA 2.5 | null | 2010-12-02T18:07:53.547 | 2010-12-02T19:20:34.320 | null | null | 193,418 | [
"qt",
"menu",
"qmenu"
] |
4,338,351 | 1 | 4,338,422 | null | 1 | 111 | [jquerymoble.com](http://jquerymobile.com/) has section headers that look like they wrap around the edge of the page.
This wrapping effect is achieved by having a little triangle above the div containing the text. i .
If you have firebug, go the [this page](http://jquerymobile.com/) and replace (in html edit mode) the entire body tag with this html:
```
<header id="header">
<section id="page">
<p class="flag"><em><a style="color: rgb(0, 0, 0);" href="http://jquerymobile.com/2010/11/jquery-mobile-alpha-2-released/">jQuery Mobile 1.0 Alpha 2 Released!</a></em></p>
</section>
</header>
```
how do they get that wrapping effect on the left?

| cant figure out how jquerymobile.com makes their section headers | CC BY-SA 2.5 | null | 2010-12-02T18:16:20.933 | 2010-12-02T18:25:30.320 | null | null | 26,188 | [
"html",
"css"
] |
4,338,618 | 1 | 4,340,507 | null | 33 | 4,596 | In a post, [Making Long Scrolls on the iPhone Not Suck](http://www.azarask.in/blog/post/solving-the-touch-screen-scroll-problem/), Aza Raskin describes an alternative scrollbar control that's better at getting around on very long pages:

It's not important that the scrollbar "remains for some amount of time" to activate it; I'm fine with simply swiping along the right edge of the iPhone's screen to grab hold of the scrollbar handle. The idea is that if I drag the handle 3/4 of the way down on the physical screen, I'd be 3/4 of the way down on the page.
Tthe Dropbox iPhone app (it's great, btw!) has exactly this kind of scrollbar for long PDF documents. Regular scrolling is done by dragging anywhere but on the handle; dragging the handle moves the view to that location. This seems to have been implemented "from scratch", as I don't think the SDK is flexible enough to customize the behavior of the existing scrollbar.
However, Dropbox uses the native document viewers to show documents on the iPhone, so somehow they add the scrollbar functionality to it. See the scrollbar handle? You can drag that to quickly get somewhere else in the document.


This concept is similar to how index bars work in UITableView (ie. Contacts.app); the index appears as a bar on the right hand side of the table (for example, "a" through "z"), and you can touch a particular label to jump to the target section. In this case, however, a very long page doesn't have sections, and it should work for general-purpose scrolling, not jumping to sections.
So how can I go about implementing this method of scrolling? I'm looking for general ideas and specific implementation details. I'm also interested if an open-source implementation exists (this seems like a general-purpose problem/solution).
| Custom Scrollbar for iPhone's UIView (Making Long Scrolls Not Suck) | CC BY-SA 2.5 | 0 | 2010-12-02T18:45:27.277 | 2012-10-09T16:53:51.530 | 2017-02-08T14:31:10.797 | -1 | 203,104 | [
"iphone",
"objective-c",
"uiview",
"uiscrollview",
"scroll"
] |
4,338,934 | 1 | 4,339,062 | null | 0 | 116 | I am writing an installer for our application. It needs to place some dll's in the Win32 folder. On XP and later, the Win32 folder is usually located at C:\WINDOWS\system32. On Windows 2000, it seems that the folder is located at C:\WINNT\System32.
I have written my installer using InstallShieldLE. The [WindowsFolder] usually expands to C:\WINDOWS and then the System32 below that completes the path to C:\WINDOWS\system32. However, it does not expand to C:\WINNT\System32 on Windows 2000. Any ideas on how I can get this to work.
The images below show the current directory structure I am using, and the bottom picture shows all the possible selections.


| Installing Program and Windows Directory Architecture | CC BY-SA 2.5 | null | 2010-12-02T19:25:01.950 | 2010-12-04T08:18:06.853 | 2010-12-04T08:18:06.853 | 23,897 | 489,041 | [
"windows",
"installation",
"installshield"
] |
4,339,121 | 1 | 4,340,580 | null | 3 | 2,771 | I'm about to lose my mind here.
Why won't the checkbox control blend with what's behind it?
The question applies to all WinForms controls, but I'm using this as an example.
A picture is worth a thousand words:

And a few more words:
What's behind the `CheckBox` are colored `PictureBox`es and a `Button`.
The `CheckBox`'s `BackColor` is set to `Transparent`. But somehow it decides that that means it should share the `BackColor` of the containing `Form` (is that its idea of the illusion of transparency?).
Is this not possible in WinForms? I could swear I did this before.
I just tried this:
On that form, set the `CheckBox`'s `BackColor` to `Transparent`, then change the `BackColor` of the containing `Form` to some other color, and the `CheckBox` will match that `BackColor`. What the.......?
| How to achieve a transparent BackColor on an original WinForms control? | CC BY-SA 2.5 | null | 2010-12-02T19:43:16.840 | 2020-11-23T10:11:57.407 | null | null | 330,180 | [
"winforms",
"controls",
"transparency",
"backcolor"
] |
4,339,243 | 1 | null | null | 8 | 1,037 | I'm using Seam and Richfaces to make a menu bar.
The code is like this:
```
<rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none">
<f:facet name="label">Tools</f:facet>
<rich:menuItem>
<s:link view="/pages/tools/ppaParameters/PpaParametersEdit.xhtml" value="Parameters" id="PpaParametersId" includePageParams="false" propagation="none"/>
</rich:menuItem>
<rich:menuGroup value="Security">
<rich:menuItem>
<s:link view="/pages/tools/security/ppaModule/PpaModuleEdit.xhtml" value="Module" id="PpaModuleId" includePageParams="false" propagation="none" />
</rich:menuItem>
</rich:menuGroup>
</rich:dropDownMenu>
```
How can I make the menu item aligns to its "father"?

Ferramentas = Tools
Segurança = Security
Módulo = Module
| Aligning Menu Group to Menu Item | CC BY-SA 2.5 | null | 2010-12-02T19:57:25.383 | 2012-06-19T07:13:11.820 | 2010-12-29T10:23:06.580 | 509,865 | 509,865 | [
"java",
"css",
"jsf",
"richfaces",
"seam"
] |
4,339,606 | 1 | null | null | 0 | 667 | I created a new .dsf database for my application. I added just one table with two columns, "ID" (int, auto-increment, step=1, start=1) and another column called "Name" of nchar.
Then I added a new datagrid, choosing the dataset (strongly typed one) created with the table from dsf database. The grid allows me to add news rows, but the column "ID" shows that the row just added as an id of "-1" and so on adding more rows.
In addition, no changes are made on .dsf. Sad, what I'm doing wrong? This is driving me crazy...
: simple example.. I added a few lines in the table (using visual studio editor).
```
public Form1()
{
InitializeComponent();
TabellaTableAdapter ta = new TabellaTableAdapter();
ta.Fill(dataSet1.Tabella); // Fill the dataset with "Tabella" content
}
private void button1_Click(object sender, EventArgs e)
{
Data.DataSet1.TabellaRow newrow = dataSet1.Tabella.NewTabellaRow();
newrow.Name = textBox1.Text; // Set the "Name" field
dataSet1.Tabella.AddTabellaRow(newrow); // Add the new row
dataSet1.Tabella.AcceptChanges(); // Commit
}
```
Pressing the button creates those new rows (with ) and back to the database:

| SQL Compact, new DataSet, identity column in reverse order and no commit? | CC BY-SA 2.5 | null | 2010-12-02T20:37:42.067 | 2011-05-12T03:34:49.830 | 2010-12-02T23:02:36.030 | 220,180 | 220,180 | [
"c#",
"sql",
"commit",
"identity",
"strongly-typed-dataset"
] |
4,340,224 | 1 | 4,341,436 | null | 2 | 2,579 | I am wanting to use Altitude for my Y range and Distance for my X range. Currently this is what I am using:
```
plotSpace.xRange = [CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(0.0)
length:CPDecimalFromUnsignedInteger(sortedArray.count)];
plotSpace.yRange = [CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(min)
length:CPDecimalFromFloat((max - min))];
```
That doesn't set the X range correctly, because it just sets it to the number of points in the array, which is about 2500. I have tried setting the xRange to to the max value in my distance array, but that really screws up the graph.
How can I have two different scales for x and y and still have the graph be correct?
Here is what it looks like when I change the xRange to be my distance, the graph goes flat:

| Core Plot: How to set xRange/yRange with different scales? | CC BY-SA 2.5 | 0 | 2010-12-02T21:37:45.527 | 2010-12-03T00:40:03.120 | 2010-12-03T00:40:03.120 | 144,695 | 144,695 | [
"iphone",
"objective-c",
"core-graphics",
"core-plot"
] |
4,340,285 | 1 | 4,340,579 | null | 0 | 688 | So imagine we have a full screen browser opened our page. So it ocupates all screen space.
we have some buttons for openng pop ups when user wants with code like:
```
<hr> <ul>
<li><FORM><INPUT class="eButton" type="button" value="georg" onClick="window.open('./georg.flv?action=read','georg','width=400,height=200,left=0,top=100,screenX=0,screenY=100')"></FORM></li>
<li><FORM><INPUT class="eButton" type="button" value="vasia" onClick="window.open('./vasia.flv?action=read','vasia','width=400,height=200,left=400,top=100,screenX=400,screenY=100')"></FORM></li>
</ul> <hr>
```
When user will click on one pop up will be created on top of window on which he clicked.
But when he will want to create a new one he will click on his full screen window with buttons and that window will owerlay created previosly pop up.
But If we want something like: (which here I created manually)

Where all our pop ups are on top. What shall we do? an JS functions that could help?
Windows with streams should be not inside main page. they should be stand alone.
Here point isto change main page code so to controll that all popups are on top.
| How to make all your pop up windows created by page appear on top when new one is created? | CC BY-SA 2.5 | null | 2010-12-02T21:45:19.627 | 2010-12-03T01:01:49.983 | 2020-06-20T09:12:55.060 | -1 | 434,051 | [
"javascript",
"html",
"windows",
"popup"
] |
4,340,460 | 1 | 4,342,190 | null | 2 | 499 | With [DelayedJob](https://github.com/collectiveidea/delayed_job/tree/v2.0.4), If there's a big backlog of jobs and the workers can't keep up to run the jobs at their specified times, it seems DJ selects the earliest run time over priority.
As you can see from the attached image, a job was locked at a time later than those run_at's but it chose the earlier run_at instead of the higher priority.
I would expect it to do the opposite.

| DelayedJob: run_at seems to override priority | CC BY-SA 2.5 | 0 | 2010-12-02T22:04:06.367 | 2010-12-03T03:27:07.350 | null | null | 147,586 | [
"ruby-on-rails",
"delayed-job"
] |
4,340,480 | 1 | 4,340,867 | null | 5 | 7,734 | Using the border-image css property on a site is having strange rendering artifacts on the iPad (assuming all ios devices have the same problem). It's essentially adding little lines where the image is getting sliced according to the css. See image as a reference:

Doing certain things will cause the lines to disappear such as zooming in, or moving the div that I've applied it to. I'm assuming this is a rendering bug in mobile safari, but does anyone have any ideas/suggestions on how to fix it?
I might add that this renders correctly in all desktop browsers supporting the property: safari, chrome, firefox, etc.
| iPad webkit border-image css rendering problem | CC BY-SA 2.5 | 0 | 2010-12-02T22:07:35.453 | 2016-03-31T23:03:10.343 | null | null | 306,971 | [
"iphone",
"ipad",
"ios",
"css"
] |
4,340,905 | 1 | 4,340,943 | null | 9 | 5,784 | So I took the step upgrading to Xcode 3.2.5 (iPhone SDK 4.2) and now I cannot run to device. I always see this now in the dev environment:

In my current projects, when going to the project settings I can only set the Base SDK to iOS 4.2 but this doesn't change the "Base SDK Missing" problem. :/
I can however deploy to the simulator, and change which version I want the simulator to load as.
Does anyone know how to fix this?
If I create a new project I don't get this...
Thanks
| "Base SDK Missing" after upgrading to Xcode 3.2.5 | CC BY-SA 2.5 | 0 | 2010-12-02T22:59:38.507 | 2017-04-28T19:09:52.300 | 2017-04-28T19:09:52.300 | 2,370,483 | 143,979 | [
"ios",
"iphone",
"xcode",
"ios4"
] |
4,340,975 | 1 | 4,341,267 | null | 1 | 4,425 | I'm using the Google Maps API (v3) on my website to show a map centered in a certain position.
This is my code:
```
<script type="text/javascript">
$(document).ready(function() {
var latlng = new google.maps.LatLng(-22.924484, -43.208001);
var map = new google.maps.Map(document.getElementById("map-property2"), {
zoom: 13,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
});
</script>
```
At the end of my `<head>` I have:
```
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
```
Here's the result:

As you can see it's like there's two maps there.. But !
There's another problem: See the very top left corner of the map? This is the `latlng`.. That should be the center of the map, but it load as the top-left corner. :/
Ps.: There's no error or warning on my Firebug JS console.
---
I found a solution here: [Major Google Maps glitch using API V3](https://stackoverflow.com/questions/3536998/major-google-maps-glitch-using-api-v3/3538254#3538254)
And testing it I discovered another thing: I'm trying to load the map on a hidden div (not the map canvas, but the container that has it) that is shown when I click on a tab menu.
If the map load (using `setTimeout`) when the tab is active and the container is visible, the map loads ok.
I'm goin mad... really.
| Google Maps loading strangely | CC BY-SA 2.5 | null | 2010-12-02T23:12:01.957 | 2015-09-04T05:55:22.337 | 2017-05-23T12:18:35.927 | -1 | 259,764 | [
"google-maps",
"google-maps-api-3",
"position"
] |
4,341,128 | 1 | 4,341,177 | null | 1 | 1,898 | I have a bit of a problem. I'm trying to add,remove and edit items in an array of objects, showing its content in a html table,but without form submission. So far I've managed to add items ( thanks to David Calhoun ), but now I facing a new issue, since I don't know how to get the row index (when I click the delete image) ,so that I can delete that row. Is there any way to achieve this?
here's my code
```
<script>
var table = [];
function addDetail()
{
table.push({
price: document.getElementById('price').value,
description: document.getElementById('descripcion').value
});
showRow(table.length-1);
resetEntries();
}
function resetEntries()
{
document.getElementById('price').value='';
document.getElementById('descripcion').value='';
document.getElementById('price').focus();
}
function showRow(i)
{
if (table.length>0){
var tbl = document.getElementById('tabla_estilo');
var newRow = tbl.insertRow(tbl.rows.length);
var cell1 = newRow.insertCell(0);
cell1.textAlign='center';
cell1.innerHTML='<a href="#"><img src="images/edit.png" width="14" height="14" alt="Edit"/></a>'
var cell2 = newRow.insertCell(1);
cell2.textAlign='center';
cell2.innerHTML='<a href="#" class="delete"><img src="images/delete.png" width="14" height="14" alt="Delete"/></a>'
var cell3 = newRow.insertCell(2);
cell3.textAlign='center';
cell3.innerHTML=table[i].price;
var cell4 = newRow.insertCell(3);
cell4.textAlign='center';
cell4.innerHTML=table[i].description;
}
}
```
And here's how my form looks

| removing items from an Array when clicking delete icon in html row | CC BY-SA 2.5 | null | 2010-12-02T23:35:08.910 | 2010-12-02T23:48:05.717 | null | null | null | [
"javascript"
] |
4,341,180 | 1 | null | null | 0 | 1,591 | I am using OnPaint method in my class Class1 : Panel.
```
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
}
```
to rotate and draw rectangle I am using
```
Matrix m = new Matrix();
m.RotateAt(90, rotationPoint);
g.Transform = m;
g.FillRectangle(Brushes.Black, rectangle)
```
the problem is, that rotation isn't working as I want it to.

Red square is rotation point and it's located in the middle-top of rectangle. How to set x, y and rotation point so rotation would work properly?
After rotating at 90 degress it should look like this

red pixel is still at the same location.
| Strange rotation in C# graphics | CC BY-SA 2.5 | null | 2010-12-02T23:42:37.713 | 2010-12-03T00:35:27.067 | 2010-12-03T00:35:27.067 | 512,009 | 528,717 | [
"c#",
"winforms",
"graphics"
] |
4,341,246 | 1 | 4,341,301 | null | 2 | 129 | I cannot do a simple commit (svn commit file.php) from within the working directory. Or, by referencing the working directory and file (svn commit ~/webDev/ricalsin/trunk/config/site.php) Shouldn't that be possible using either approach? Both approaches generate the same terminal window response - which is not what tutorials say.
I attached a screenshot of the terminal window after making the attempt (below). This is an apache2 server running on a local computer. I am able to checkout a directory without a problem.
So sorry for the noobiness. Thanks for any help.

| Subversion Commit Troubles | CC BY-SA 2.5 | null | 2010-12-02T23:56:10.023 | 2010-12-03T00:04:32.750 | null | null | 446,502 | [
"svn",
"repository",
"commit"
] |
4,341,256 | 1 | null | null | 2 | 10,240 | I have 2 `div`s. In each div I have some content and also another div thats by default hidden and is relative positioned on top of the content. When I hover over the div I want the hidden div to slide up. What I tried isn't working for me.
code.. Ill just show part of it, since both divs are the same.
HTML:
```
<div class="youtube">
<h1> Youtube </h1>
<span></span>
<div class="yt-desc">
<p>
Pellentesque habitant morbi tristique senectus et
netus et malesuada fames ac turpis egestas.
Pellentesque habitant morbi tristique senectus et
netus et malesuada fames ac turpis egestas.
</p>
</div><!-- // .yt-desc -->
</div> <!-- // .youtube -->
```
CSS:
Heres the css for one,the `.forums` is exactly the same. I took out the unneeded css.
```
.youtube, .forums { background: #3c3c3c url(../images/boxes-bg.jpg) repeat-x; float: left; position: relative; z-index: -1; width: 260px; }
.youtube h1, .forums h1 { text-indent: -9999px; margin: 26px auto; }
.youtube { margin: 0 216px 0 0; }
.youtube h1 { background: url(../images/yt-header.png) no-repeat; height: 36px; margin: 21px; auto; width: 212px; }
.youtube span { background: url(../images/icons/youtube.png) no-repeat; display: block; height: 75px; margin: 26px auto; width: 79px; }
.youtube .yt-desc, .forums .forums-desc { position: absolute; top: 94px; left: 0px; padding: 5px; display: none; }
```
yt-desc is what i'm trying to get to slideup. But for some reason its not working.
Ive tried.
```
$(".youtube").hover(function () {
$(".yt-desc").slideToggle("fast");
});
```
Still no luck. Can anybody help? :/ Heres an idea of what i'm trying to get -

| SlideToggle div over content | CC BY-SA 2.5 | null | 2010-12-02T23:57:32.183 | 2012-06-19T15:37:26.547 | null | null | 363,551 | [
"jquery",
"html",
"css"
] |
4,341,300 | 1 | 4,342,158 | null | 4 | 1,552 | 
I have a 1D accelerometer signal (one axis only). I would like to create a robust algorithm, which would be able to recognize some shapes in the signal.
At first I apply a moving average filter to the raw signal. On the attached picture the raw signal is coloured red and the averaged signal is black. As seen from the picture, some trends are visible from the averaged (black) signal - the signal contains 10 repetitions of a peak like pattern, where acceleration climbs to a maximum and then drops back down. I have marked the beginnings and endings of those patterns with a cross.
So my goal is to find the marked positions automatically. The problem making the pattern extraction difficult are:
- - -
I have tried different approaches, which are pretty much home-brew, so I won't mention them - I don't want you to be biased by my way of thinking. Are there some standard or by the books approaches for doing that kind of pattern extraction? Or maybe does anyone know how to tackle the problem in a robust way?
Any idea will be appreciated.
| Accelerometer signal segmentation | CC BY-SA 2.5 | 0 | 2010-12-03T00:04:23.287 | 2010-12-03T03:22:15.913 | 2010-12-03T00:23:40.190 | 404,200 | 404,200 | [
"accelerometer",
"signals",
"pattern-recognition"
] |
4,341,461 | 1 | 4,348,724 | null | 1 | 64 | 
And here's my DataContext:
```
[Function(Name = "Customer.spSearchDeals")]
[ResultType(typeof(Filter))]
[ResultType(typeof(Deal))]
public IMultipleResults SearchDeals(
//[Parameter(Name = "ZipCode", DbType = "Char(5)")]
//XElement xmlString
)
{
var result = this.ExecuteMethodCall(this,
((MethodInfo)(MethodInfo.GetCurrentMethod()))
//,xmlString
);
return (IMultipleResults)result.ReturnValue;
}
```
What's the problem? What SHOULD the cast be?
| ASP.NET MVC 2: cast not valid? | CC BY-SA 2.5 | null | 2010-12-03T00:36:13.797 | 2010-12-03T18:39:45.083 | 2010-12-03T00:49:01.647 | 337,806 | 337,806 | [
"asp.net-mvc-2"
] |
4,341,692 | 1 | 4,362,279 | null | 1 | 1,270 | I am just writing a little test application to show a Gallery of images on Android (from the SD card), it all works quite well except the part where I get to see the photos. If someone can spot the source of my trouble.
Much of the code has been copied and pasted from various examples I've found.

Notice the lack of images in the Gallery.
I'm guessing I'm doing something wrong in :
```
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imgView;
if (convertView == null)
imgView = new ImageView(cont);
else
imgView = (ImageView)convertView;
String filename = photos[position].getName();
Log.i(TAG, "Loading File " + filename);
Bitmap bMap = BitmapFactory.decodeFile(filename);
imgView.setImageBitmap(bMap);
imgView.setLayoutParams(new Gallery.LayoutParams(120, 90));
imgView.setScaleType(ImageView.ScaleType.FIT_XY);
imgView.setBackgroundResource(GalItemBg);
return imgView;
}
```
The whole activity is as follows - in case the problem is elsewhere
```
package nz.co.salespartner.gallerytest;
import java.io.File;
import java.io.FilenameFilter;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.TextView;
public class GalleryTestActivity extends Activity {
File photos[];
private static String TAG = "GalleryTest";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
File f = new File("/sdcard/pics1");
photos = f.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String filename) {
return filename.endsWith("jpg");
}
});
String fileList = "";
for (File aFile : photos) {
fileList += aFile.getName() + "\n";
}
TextView v = (TextView)findViewById(R.id.FileList);
v.setText(fileList);
Gallery gallery = (Gallery)findViewById(R.id.Gallery);
gallery.setAdapter(new AddImgAdp(this));
}
public class AddImgAdp extends BaseAdapter {
int GalItemBg;
private Context cont;
public AddImgAdp(Context c) {
cont = c;
TypedArray typArray = obtainStyledAttributes(R.styleable.GalleryTheme);
GalItemBg = typArray.getResourceId(R.styleable.GalleryTheme_android_galleryItemBackground, 0);
typArray.recycle();
}
public int getCount() {
return photos.length;
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
ImageView imgView;
if (convertView == null)
imgView = new ImageView(cont);
else
imgView = (ImageView)convertView;
String filename = photos[position].getName();
Log.i(TAG, "Loading File " + filename);
Bitmap bMap = BitmapFactory.decodeFile(filename);
imgView.setImageBitmap(bMap);
imgView.setLayoutParams(new Gallery.LayoutParams(120, 90));
imgView.setScaleType(ImageView.ScaleType.FIT_XY);
imgView.setBackgroundResource(GalItemBg);
return imgView;
}
}
}
```
| Photos missing in Gallery on Android | CC BY-SA 4.0 | null | 2010-12-03T01:27:33.207 | 2019-07-21T11:59:19.663 | 2019-07-21T11:59:19.663 | 3,623,128 | 48,445 | [
"android",
"gallery",
"android-gallery"
] |
4,341,983 | 1 | 4,343,332 | null | 3 | 538 | I'm looking to implement a tagging interface on OSX that lets users type text "tags" to attach to an object. Ideally, I'd like to implement a fancy UI like the screenshot below:

-
```
Note: This shows multiple states
```
This UI lets the user type tags, then groups them into a rounded shape when enter is pressed. They can be deleted by dragging over to highlight (shown in dark blue) and pressing delete. I think this is a slick interface for quickly jotting down a bunch of tags without having to repeatedly press form buttons.
I've seen this interface in Mail.app and a few other places in OSX, so that makes me wonder if there's some sort of cocoa class out there for this. Anyone know of one? If not, I guess I'm looking at a custom opengl view.
| Cocoa/OSX tagging UI | CC BY-SA 2.5 | 0 | 2010-12-03T02:38:46.403 | 2010-12-03T07:23:13.037 | 2010-12-03T06:53:09.120 | 384,109 | 384,109 | [
"cocoa",
"macos",
"tags",
"tagging"
] |
4,342,215 | 1 | 4,343,842 | null | 0 | 258 | 
Now it was all fine when I set the picture as background `background: url(http://simplisafe.com/files/images/icons/check_mark.png)`
and I got the desired output. BUT when the user sets the font-size to something else, the check mark picture remains the same size (the font size setting indirectly changes the size of the spans and divs too).
I already tried background-size, but it doesn't work.
```
<html>
<head><style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
input { margin: 3px 0; vertical-align: middle; }
.box { border: 1px solid #aeaeae; padding: 3px; width: 6em; text-align: left; text-indent:.3em; }
.innerbox { width: 4em; text-align: left;}
#page-background {position: absolute; z-index:-1;}
#content {position: relative;}
</style>
</head>
<body>
<span class="box" id="1"><nobr>
<span id="page-background"><img src="http://simplisafe.com/files/images/icons/check_mark.png" />0
<span class="innerbox" id="content">
<DIV id="P_0" align="left" >
<input style="width:100%; border:1px solid #B4B4B4; font-size:12px" type="text" id="1" />
</DIV>
</span>
</span>
</nobr></span>
<body>
</html>
```
I added both `#page-background` and `#content` to make a checkmark img the background of the span but it just messes up my span.
I tested the `#page-background` and `#content` on 2 overlapping spans and it works just fine, when I tried on add it to my existing code, the `position: absolute` messes up the span (see picture).
| How do I fix the span to have img as background? | CC BY-SA 2.5 | null | 2010-12-03T03:31:18.013 | 2010-12-03T09:28:21.460 | 2010-12-03T09:22:02.147 | 369,240 | 369,240 | [
"html"
] |
4,342,327 | 1 | null | null | 1 | 708 | Following is my query, it takes some time around 1 minute and some times gives a result in a second,
problem occurred specially i execute query after some time ago, or put some new keyword in query.
It looks like some index problem, when i executed execution plan, RID Look up cost 60%. The source table have around 2-5 Lacs data and daily around 10,000-20,000 rows will be added. Please advise me. Thanks
```
SELECT *
FROM (SELECT Row_number() OVER (ORDER BY rank DESC, jobid DESC) AS rnum,
*
FROM (SELECT rank,
joblistview.*
FROM joblistview,
FREETEXTTABLE(joblistview, jobtitle, 'seo manager') f
WHERE joblistview.jobid = f.[key]
AND CONTAINS(joblistview.joblocation, 'mumbai')
UNION
SELECT rank,
joblistview.*
FROM joblistview,
FREETEXTTABLE(joblistview, jobdescription, 'seo manager')
f
WHERE joblistview.jobid = f.[key]
AND CONTAINS(joblistview.joblocation, 'mumbai')
UNION
SELECT rank,
joblistview.*
FROM joblistview,
FREETEXTTABLE(joblistview, company_name, 'seo manager') f
WHERE joblistview.jobid = f.[key]
AND CONTAINS(joblistview.joblocation, 'mumbai')) AS xx)AS
tt
WHERE rnum BETWEEN 11 AND 20
```
Execution Plan

| SQL Server Query Some time take too much time with freetexttable - Looks Index Problem | CC BY-SA 2.5 | null | 2010-12-03T03:53:10.577 | 2011-06-08T16:39:38.220 | 2010-12-04T03:25:06.587 | 528,868 | 528,868 | [
"sql-server",
"full-text-search",
"indexing",
"freetexttable"
] |
4,342,403 | 1 | 4,342,649 | null | 1 | 2,763 | I have divided my main screen in 4 areas as border-layout as center,right,left and bottom. The right, left and bottom areas are small and contain only buttons. My center area has to display the different widgets and forms depending on the buttons pressed in right/left/bottom areas.
Can anybody suggest how I can design my forms or widgets so that when I show the widget in the center area, it will fit into the center area and all the items inside this will be scaled rationally.
Please refer to the attached image file for a better idea.
If my explanation is not clear please let me know I will try better.

| How to scale an widget in specified in qt | CC BY-SA 2.5 | null | 2010-12-03T04:09:28.157 | 2010-12-03T05:21:12.697 | 2010-12-03T05:03:59.193 | 240,633 | 218,284 | [
"qt",
"layout",
"widget",
"scale"
] |
4,342,482 | 1 | 4,515,982 | null | 5 | 10,036 | I am trying to take small recordings to find the Sound Pressure Level from a service but Android wont give me access to the hardware. I get the following errors in Logcat:

The error comes from the following code:
```
AudioRecord recordInstance = null;
// We're important...
android.os.Process
.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
short bufferSize = 4096;// 2048;
recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, this //line 167
.getFrequency(), this.getChannelConfiguration(), this
.getAudioEncoding(), bufferSize); //object not created
tempBuffer = new short[bufferSize];
recordInstance.startRecording();
```
What happens is that recordInstance is never properly created and so when it gets to the end and calls recordInstance.startRecording(), recordInstance is still null. Android rejects my programs request at the definition. Does anyone know what those errno's indicate? I couldn't find a list online.
[AudioRecord Docs](http://developer.android.com/reference/android/media/AudioRecord.html)
Thanks
| Cannot access AudioRecorder | CC BY-SA 2.5 | 0 | 2010-12-03T04:31:08.140 | 2010-12-23T05:01:11.403 | null | null | 451,037 | [
"android",
"audio",
"audiorecord"
] |
4,342,548 | 1 | 4,342,621 | null | 0 | 4,991 | I've the following layout
```
<?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/all_white"
android:gravity="center">
<Button android:id="@+id/mq_categories" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Browse Quiz Categories" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_random" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Enter Random Quiz" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_profile" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="My Profile" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
</LinearLayout>
```
which gives the output as

When I added the text view like this, only welcome text is displayed and no buttons and no scroll
```
<?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/all_white"
android:gravity="center">
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mg_userinfo" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="Welcome"
android:gravity="center" />
<Button android:id="@+id/mq_categories" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Browse Quiz Categories" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_random" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Enter Random Quiz" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_profile" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="My Profile" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
</LinearLayout>
```

When tried below lay out welcome text is displayed at the bottom of the buttons, but buttons got shifted to the top of the screen
```
<?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/all_white"
android:gravity="center">
<Button android:id="@+id/mq_categories" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Browse Quiz Categories" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_random" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="Enter Random Quiz" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<Button android:id="@+id/mq_profile" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_margin="5dp"
android:text="My Profile" android:textColor="#EDFF99"
android:background="@drawable/custom_button" />
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mg_userinfo" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="Welcome"
android:gravity="center" />
</LinearLayout>
```

| Android Text view position with custom buttons in the layout | CC BY-SA 2.5 | 0 | 2010-12-03T04:44:58.173 | 2010-12-03T05:02:25.587 | null | null | 174,261 | [
"android",
"android-layout"
] |
4,342,886 | 1 | 4,385,508 | null | 0 | 646 | I like how the status bars of windows explorer/internet explorer looked like. I just want to copy their appearance but I am not successful to do so. Open up windows explorer (with View->Status Bar) and you can see a sizing grip on top of the last panel. I can't seem to be able to do it. Anybody has tried a statusbar with sizing grip on top of it? Thanks.

| Fom Sizing Grip | CC BY-SA 2.5 | null | 2010-12-03T05:58:05.457 | 2010-12-08T08:34:48.057 | null | null | 296,235 | [
"c#",
"gdi",
"statusbar"
] |
4,342,895 | 1 | 4,352,785 | null | 6 | 830 | Windows 7(?) introduced a new message box feature (I'm not sure what it is called so I've uploaded a picture). How can I create such a box in C# with WinForms?

| WinForms message box with textual buttons | CC BY-SA 2.5 | 0 | 2010-12-03T06:00:13.523 | 2010-12-04T09:10:04.090 | null | null | 377,553 | [
"c#",
".net",
"winforms",
"messagebox"
] |
4,342,906 | 1 | null | null | 2 | 1,843 | With richfaces, how can I get my `h:outputLabel` and `rich:combobox` components to display directly adjacent to each other on the same line?
Here are the two approaches I've tried.
---
I first tried using `rich:layout` & `rich:layoutPanel`, but the components appear on separate lines. Here's the code:
```
<rich:layout>
<rich:layoutPanel position="left" width="100%">
<h:outputLabel for="timeSpanUnitsCombo2" value="Time Span " />
<rich:comboBox id="timeSpanUnitsCombo2" value="#{bean.timeSpanUnitsLabel}" enableManualInput="false">
<f:selectItems value="#{bean.timeSpanUnitsList}" />
</rich:comboBox>
</rich:layoutPanel>
</rich:layout>
```
And here's the rendered output:

---
Next I tried using a `h:panelGrid`, but again no success - the components are evenly spaced over the available area, instead of being directly adjacent and left-aligned as I intended. Here's the code:
```
<h:panelGrid columns="2">
<h:outputLabel for="timeSpanUnitsCombo3" value="Time Span " />
<rich:comboBox id="timeSpanUnitsCombo3" value="#{bean.timeSpanUnitsLabel}" enableManualInput="false">
<f:selectItems value="#{bean.timeSpanUnitsList}" />
</rich:comboBox>
</h:panelGrid>
```
And here's the rendered output:

---
| Correct layout of h:outputLabel and rich:combobox components on same line | CC BY-SA 2.5 | null | 2010-12-03T06:02:44.100 | 2011-04-18T22:44:49.233 | null | null | 378,606 | [
"jsf",
"layout",
"richfaces",
"seam"
] |
4,342,927 | 1 | 4,351,137 | null | 6 | 7,551 | I'm currently working on extending a TextView, adding an outline around the text. Thus far, the only problem I've been having is my inability to position the "outline" correctly behind a text. If I code the extended class like the one portrayed below, I get a label that looks like this:

Note: in the above screenshot, I set the fill color to white, and the stroke color to black.
What am I doing wrong?
```
public class OutlinedTextView extends TextView {
/* ===========================================================
* Constants
* =========================================================== */
private static final float OUTLINE_PROPORTION = 0.1f;
/* ===========================================================
* Members
* =========================================================== */
private final Paint mStrokePaint = new Paint();
private int mOutlineColor = Color.TRANSPARENT;
/* ===========================================================
* Constructors
* =========================================================== */
public OutlinedTextView(Context context) {
super(context);
this.setupPaint();
}
public OutlinedTextView(Context context, AttributeSet attrs) {
super(context, attrs);
this.setupPaint();
this.setupAttributes(context, attrs);
}
public OutlinedTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
this.setupPaint();
this.setupAttributes(context, attrs);
}
/* ===========================================================
* Overrides
* =========================================================== */
@Override
protected void onDraw(Canvas canvas) {
// Get the text to print
final float textSize = super.getTextSize();
final String text = super.getText().toString();
// setup stroke
mStrokePaint.setColor(mOutlineColor);
mStrokePaint.setStrokeWidth(textSize * OUTLINE_PROPORTION);
mStrokePaint.setTextSize(textSize);
mStrokePaint.setFlags(super.getPaintFlags());
mStrokePaint.setTypeface(super.getTypeface());
// Figure out the drawing coordinates
//mStrokePaint.getTextBounds(text, 0, text.length(), mTextBounds);
// draw everything
canvas.drawText(text,
super.getWidth() * 0.5f, super.getBottom() * 0.5f,
mStrokePaint);
super.onDraw(canvas);
}
/* ===========================================================
* Private/Protected Methods
* =========================================================== */
private final void setupPaint() {
mStrokePaint.setAntiAlias(true);
mStrokePaint.setStyle(Paint.Style.STROKE);
mStrokePaint.setTextAlign(Paint.Align.CENTER);
}
private final void setupAttributes(Context context, AttributeSet attrs) {
final TypedArray array = context.obtainStyledAttributes(attrs,
R.styleable.OutlinedTextView);
mOutlineColor = array.getColor(
R.styleable.OutlinedTextView_outlineColor, 0x00000000);
array.recycle();
// Force this text label to be centered
super.setGravity(Gravity.CENTER_HORIZONTAL);
}
}
```
| How to correctly draw text in an extended class for TextView? | CC BY-SA 2.5 | 0 | 2010-12-03T06:07:44.397 | 2011-04-27T22:19:50.927 | 2010-12-03T07:18:34.003 | 418,183 | 434,414 | [
"java",
"android",
"textview",
"extend",
"outline"
] |
4,343,208 | 1 | 4,343,609 | null | 2 | 1,708 |
## Question:
I'm using Josh Smith's [implementation](http://www.codeproject.com/KB/WPF/VMCommanding.aspx) of commands for MVVM using routed commands. I have a `MenuItem` binded to a command.
The input bindings are defined in the parent window. When I run the program, I use the Keyboard shortcut, but the `MenuItem` does not show a `Control+O` next to the `MenuItem` header.
## Pics:

## Code:
```
<Window.CommandBindings>
<cmd:CommandSinkBinding Command="vm:MainVM.OpenDialogCommand" />
</Window.CommandBindings>
<Window.InputBindings>
<KeyBinding Command="vm:MainVM.OpenDialogCommand" Key="O" Modifiers="Ctrl"/>
</Window.InputBindings>
```
```
<MenuItem Header="Open" Command="vm:MainVM.OpenDialogCommand" />
```
The MenuItem is styled, but removing the style does not make a difference.
| Command Inputbindings work but Shortcut does not show in MenuItem | CC BY-SA 2.5 | null | 2010-12-03T06:57:47.313 | 2010-12-03T08:14:02.723 | null | null | 504,310 | [
"c#",
"wpf",
"mvvm",
"command"
] |
4,343,329 | 1 | 4,343,471 | null | 1 | 2,023 | How can the UINavigationBar customizations be done? Is it using subclassing or categories?

I am interested in 2 aspects:
1. Adding an image to the NavBar (like the FOXNEWS logo)
2. Customizing the back button to "Shows". (the back button usually takes the title of the previous view in the stack, but there is no title in previous view.)
Thanks in advance for any help
| Customizing UINavigationBar as in Fox news iPhone app | CC BY-SA 2.5 | 0 | 2010-12-03T07:22:45.547 | 2012-06-12T12:35:12.350 | 2010-12-03T08:01:59.483 | 106,224 | 48,557 | [
"iphone",
"objective-c",
"ios",
"uinavigationbar"
] |
4,343,390 | 1 | 4,343,493 | null | 10 | 6,577 | It might be a silly question.
I'm trying to set left/right margins like the attached picture. I succeeded to implement it by adding UITextView to UIScrollView.
However, I could achieve almost everything I want with UITextView alone. For example, with UIScrollView, when I manually change the text of UITextView, it automatically scrolls to bottom regardless of setting its .scrollEnabled to No.
It would be perfect if a scroll indicator of UITextView appears outside UITextView.
In the attached picture, let's say the red box represents the entire UITextView. I tried to change UITextView's scrollIndicatorInsets property, but a scroll indicator can be moved only inward to be visible.
Several apps such as Pages, aWriter, Plaintext achieve this feature.
Could you give any suggestion?
Thank you!
I 
| Is there a way to put UITextView's scroll indicator to outside UITextView? | CC BY-SA 2.5 | 0 | 2010-12-03T07:35:35.683 | 2014-07-28T16:42:17.670 | null | null | 434,153 | [
"iphone",
"ipad",
"ios",
"uiscrollview",
"uitextview"
] |
4,343,419 | 1 | null | null | 0 | 781 | 
HI Guys,
I need to add a quick launch web part into my sharepoint site. Please can some one throw some pointers on how can i do it like shown in the attached image
sharepoint 2010
Thanks
| how to add a quick launch webpart in sharepoint site | CC BY-SA 2.5 | 0 | 2010-12-03T07:41:18.520 | 2010-12-03T10:44:52.887 | null | null | 405,818 | [
"sharepoint"
] |
4,343,482 | 1 | 4,343,510 | null | 2 | 1,149 | I've been trying to re-upload a previously uploaded app (it originally failed submission), but both the 'Validate' and the 'Submit' button in Organiser crash Organiser itself before finishing. This has been happening for about three days now, and I haven't heard a word back from the iTunesConnect helpdesk. I am running the lastest Xcode 3.2.5 with iOS 4.2.1, and downloaded and installed the latest Application Tools as instructed. Everything installed fine.
I'm getting a:

with:
>
I know that this isn't the place to debug Apple apps - but someone must have had this happen and figured out how to get past it? I'm getting no joy from apple :(
thanks
| Uploading to iTunesConnect with Organiser crashes | CC BY-SA 2.5 | 0 | 2010-12-03T07:51:20.677 | 2014-02-05T21:58:30.410 | null | null | 130,230 | [
"iphone",
"xcode",
"crash",
"app-store-connect",
"organizer"
] |
4,343,764 | 1 | 4,344,103 | null | 0 | 11,071 | I want to create a Tabbar application.My basic necessity is that i want the color of tab bar icons to be red instead of the default blue color.(i.e the selected tab icon has to be of red color instead of the default blue color provided by apple).I dont want the color of the tab bar to be changed.I want it to be of the default black color.Hope the question makes sense.
I want the tab bar to look something like this

Thanks.
| Tabbar with custom colors | CC BY-SA 2.5 | null | 2010-12-03T08:41:03.010 | 2010-12-03T09:26:38.340 | 2010-12-03T09:16:15.987 | 493,770 | 493,770 | [
"iphone",
"iphone-sdk-3.0",
"ios4"
] |
4,343,798 | 1 | 4,343,896 | null | 3 | 21,935 | Hello all I'm trying to change the skin (shape) of the button and textArea skin to another one. Some thing like the second picture .


| how to change the skin of a button | CC BY-SA 2.5 | 0 | 2010-12-03T08:44:44.880 | 2012-10-02T23:20:41.123 | null | null | 437,136 | [
"html",
"css",
"skin"
] |
4,343,887 | 1 | 4,344,160 | null | 5 | 6,274 | what's the best way to convert a text embedded in a html tag to an image using php keeping the style written in the html tag ? for example :
convert :
```
<span class="Apple-style-span" style="font-size: xx-large;"><font class="Apple-style-span" color="#F4A460">Stack </font><font class="Apple-style-span" color="#800000">Overflow</font></span>
```
into :

is there any class for it ? or should I explode it and read the tags one by one ? any suggestion ?
| converting html text to an image with php | CC BY-SA 2.5 | null | 2010-12-03T08:56:04.010 | 2018-02-05T12:37:57.267 | 2010-12-03T09:09:46.270 | 466,826 | 253,617 | [
"php",
"image-processing",
"gd"
] |
4,343,897 | 1 | 4,352,088 | null | 0 | 1,414 | Actually i will have a form open when i click on a row of datagridview . When i make necessary changes and click on save i would like the select that particular row as selected which i previously i selected as well as i had to make one of the tree node to be get selected too..

If i click on the 2nd row i will have a form open if i click on save i would like to select that row again

| Is it possible to select both treeview node and the row of a datagridview | CC BY-SA 2.5 | null | 2010-12-03T08:56:59.123 | 2010-12-04T05:17:19.183 | 2010-12-03T09:07:03.723 | 388,388 | 388,388 | [
"c#",
"winforms",
"datagridview",
"treeview"
] |
4,344,045 | 1 | 4,345,050 | null | 5 | 2,357 | How do I develop addin for MS Outlook that works with all
1. Outlook 2010
2. Outlook 2007
3. Outlook 2003
I have developed addin that works well with 2010 and 2007 BUT NOT with 2003.
I want something like this that works well with all the above three :)

| How to develop addin for MS Outlook? | CC BY-SA 2.5 | 0 | 2010-12-03T09:19:43.170 | 2012-11-10T01:16:32.200 | 2010-12-03T11:17:49.107 | 58,737 | 529,121 | [
"c#",
"outlook-addin",
"outlook-2007",
"outlook-2003",
"outlook-2010"
] |
4,344,089 | 1 | 4,344,516 | null | 2 | 1,159 | I have a number of Silverlight charts bound to datasets.
They all are working correctly however the values on the Axis display for years are showing, rather than full years, the points in between for example: 2007, 2007.2,2007.4 etc etc.
How can I make it so that it only show the full years?
Below is a screen shot to further explain visually what I mean.

Here is the code I use to bind the chart data:
```
foreach (var myVariable in UserSelections.TheDataSet.ER_Variables)
{
var newSeries = new LineSeries
{
ItemsSource =
UserSelections.GetDataRowsByVariableAndLocation(
UserSelections.GetIdForLocation(UserSelections.Locations[0]),
myVariable.Variable_ID),
IndependentValueBinding = new Binding("Year"),
DependentValueBinding = new Binding("Value"),
Title = myVariable.Name,
IsSelectionEnabled = true
};
MainChart.Series.Add(newSeries);
}
```
| Silver charts axis intervals | CC BY-SA 2.5 | 0 | 2010-12-03T09:25:12.723 | 2010-12-03T10:36:33.700 | null | null | 492,035 | [
"silverlight",
"silverlight-4.0",
"charts",
"silverlight-toolkit"
] |
4,344,114 | 1 | 4,344,147 | null | 5 | 3,812 | If you choose to view a week or day the left column will by default show 6am, 7am and so on. How do i go about to make it show 06:00, 07:00 and so on instead?
Edit: im talking about the left column i weekview and dayview that by default is 6am, 7am, 8am. NOT the timestamp in the events.
To further point out the problem i want to changes the am/pm to 24hour times for the highlighted part of the image: [http://bildr.no/view/770893](http://bildr.no/view/770893)
| Showing 06:00 instead of 6am in FullCalendar | CC BY-SA 2.5 | 0 | 2010-12-03T09:27:35.843 | 2010-12-03T10:00:55.817 | 2010-12-03T09:49:51.707 | 286,289 | 286,289 | [
"javascript",
"fullcalendar"
] |
4,344,187 | 1 | 4,344,547 | null | 1 | 5,513 | How to get all sites and sub-sites in SharePoint and access an image library/list?
I am looking forward to achieve this via the SharePoint object model. Inside each site or subsite I want to access an image library/list,

After getting to this list, how do I set the option of 'Required Content Approval for Selected Items' from 'Yes' to 'No'?
| How to get all sites and sub-sites in SharePoint and access an image library/list? | CC BY-SA 2.5 | 0 | 2010-12-03T09:37:10.337 | 2012-04-02T11:04:36.853 | 2010-12-23T09:25:46.207 | 63,550 | 395,198 | [
"sharepoint",
"sharepoint-2007",
"sharepoint-object-model"
] |
4,344,220 | 1 | 4,344,719 | null | 1 | 866 | I'm using Mindspace.Lightspeed in my C# desktop application for the first time but I'm getting errors and unable to connect to database.

My App.config contains the following code:
```
<?xml version="1.0" encoding="utf-8" ?><configuration>
<configSections>
<section name="lightSpeedContext" type="Mindscape.LightSpeed.Configuration.LightSpeedConfigurationSection,Mindscape.LightSpeed" /></configSections><connectionStrings>
<add name="DefectsConStr" connectionString="Data Source=.\sqlexpress2k5;Initial Catalog=Defects;Persist Security Info=True;User ID=sa;Password=123"
providerName="System.Data.SqlClient" /></connectionStrings> <lightSpeedContext>
<add name="Development" connectionStringName="DefectsConStr" dataProvider="SqlServer2005"/> </lightSpeedContext> </configuration>
```
| Mindscape.LightSpeed Database connectivity problem | CC BY-SA 2.5 | 0 | 2010-12-03T09:41:33.660 | 2010-12-03T10:50:14.923 | 2010-12-03T10:50:14.923 | 44,540 | 231,179 | [
"c#",
"connection-string",
"lightspeed"
] |
4,344,286 | 1 | 4,347,287 | null | 0 | 234 | I'm getting the following error with Google Maps API:
```
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.google.maps.overlays::Polyline()
```

Specifying the second constructor parameter does not help.
| Google Maps for Flash throws RTE in new Polyline() | CC BY-SA 2.5 | null | 2010-12-03T09:48:14.730 | 2010-12-03T15:57:39.147 | 2010-12-03T09:50:36.337 | 222,159 | 366,411 | [
"apache-flex",
"google-maps",
"actionscript",
"flex4",
"google-maps-api-3"
] |
4,344,357 | 1 | null | null | 0 | 207 | I have a situation where menu items wrap to the next line when you mouse over the left column menu item or when that menu item is in the active state (meaning also bold).
These menus are created dynamically by the user when they create CMS pages and they don't like the fact that the menu wraps to the next line when it goes from off state (unbolded) to over state (bolded state).
It looks like:

| How to avoid line wrap on hover items in menu? | CC BY-SA 3.0 | null | 2010-12-03T09:57:01.583 | 2016-04-19T18:48:33.860 | 2016-04-19T18:48:33.860 | 6,083,675 | 186,319 | [
"css",
"menu",
"hover"
] |
4,344,433 | 1 | null | null | 0 | 712 | in a closed dll, i've sometime this exception:

Is possible to catch it?
Windows mobile, netcf 3.5, C#
Thanks.
| Catch coredll.dll native exception in netcf C# | CC BY-SA 2.5 | null | 2010-12-03T10:06:10.693 | 2011-01-21T19:45:21.237 | 2010-12-03T10:10:23.983 | 1,583 | 450,525 | [
"exception",
"windows-mobile",
"native"
] |
4,344,494 | 1 | 4,344,605 | null | 1 | 385 | 
i want to create this effect using css, can you see the big box with the title and the blog post, and little box with the date on it and the number of comments on it. its been puzzling me, an example would be great thanks guys :))
| i want to design these 2 boxes using css[image]? | CC BY-SA 2.5 | null | 2010-12-03T10:14:19.193 | 2010-12-03T10:59:37.913 | null | null | 428,137 | [
"css",
"image",
"html"
] |
4,344,677 | 1 | null | null | 2 | 201 | Is it possible to configure [Atlassian Fisheye](http://www.atlassian.com/software/fisheye/) to show code diff’s in its checkin mails like [svnspam](http://code.google.com/p/svnspam/)

If so, how?
| How to show code diffs with Atlassian Fisheye checkin mails? | CC BY-SA 4.0 | null | 2010-12-03T10:35:28.380 | 2018-10-18T16:22:17.940 | 2018-10-18T16:22:17.940 | 2,756,409 | 113,247 | [
"version-control",
"atlassian-fisheye"
] |
4,344,849 | 1 | null | null | 0 | 155 | Still in the process of learning ANTLR... Recently I have been posting 2 questions regarding parsing some text and extracting information leaving aside "unwanted" words or character. Following a very interesing discussion with Bart Kiers [on parsing a noisy datastream Part 1](https://stackoverflow.com/questions/4310699/antlr-on-a-noisy-data-stream) and [and parsing a noisy datastream Part 2](https://stackoverflow.com/questions/4325011/antlr-on-a-noisy-data-stream-part-2), I'm ending up with one more problem...
Originally, my grammar looks like this
```
VERB : 'SLEEPING' | 'WALKING';
SUBJECT : 'CAT'|'DOG'|'BIRD';
INDIRECT_OBJECT : 'CAR'| 'SOFA';
ANY2 :'A'..'Z'+ {skip();};
ANY : . {skip();};
parse
: sentenceParts+ EOF
;
sentenceParts
: SUBJECT VERB INDIRECT_OBJECT
;
```
a sentence like `it's 10PM and the Lazy CAT is currently SLEEPING heavily on the SOFA in front of the TV.` will produce the following

This is good... and it does what I want, i.e. extracting only the word `CAT`, `SLEEPING` and `SOFA`, leaving aside other words. Now, for another reason, I need to introduce a new token in my grammar, let's call it `OTHER : 'PLANE'`. It will be used later by another rule. I still want my primary rule to work : `SUBJECT VERB INDIRECT_OBJECT`. Let's say the token `'PLANE'` appears in my sentence, like
`it's 10PM and the Lazy CAT on the PLANE is currently SLEEPING heavily on the SOFA in front of the TV.` It will produce the following error (no surprise here as the lexer has a clear definition of 'PLANE' as a token)

Is there a way to tell ANTLR that if I'm entering the rule `sentenceParts` I only care about the 3 tokens I have defined, namely `SUBJECT`, `VERB` or `INDIRECT_OBJECT` and that, even if it comes across a different token, not to take it into account ? I would like to be able to do that without putting `OTHER?` everywhere in this rule
| ANTLR on a noisy data stream Part 3 | CC BY-SA 2.5 | null | 2010-12-03T10:57:44.757 | 2010-12-04T05:50:40.320 | 2017-05-23T10:32:35.693 | -1 | 462,384 | [
"parsing",
"antlr",
"grammar",
"text-parsing"
] |
4,344,879 | 1 | 4,344,947 | null | 1 | 1,162 | This is a more theoretical question, not a specific scenario:
Let's assume, we have a simplified table scheme like this:

`items` contains some basic data, `item_data` additional properties for each item an `rel_items` sets a tree relationship between the different items. There are different types of items (represented by the field `items.item_type`) which have different fields stored in `item_data`, for example: dog, cat, mouse.
If we have some bigger queries with some joins and conjunctions (stuff like getting items with their parent items having some conditions with other items and so on), could this become a performance issue compared to splitting all different types of items into separate tables (`dog`, `cat`, `mouse`) and not merging them into a single one?
If we keep it all in one basic item table, does creating views (dog, cat, mouse) impact performance somehow?
edit (as commented below): I thought of "species", "house-pets" and so on as item_types. Each type has different properties. The intention of using a basic item table and the item_data table is to have a basic "object" and attaching as many properties to them as necessary without having to modify the database scheme. For example, I don't know how many animals there will be in the application and what properties they have, so I thought of a database scheme that doesn't need to be alterted each time the user creates a new animal.
| MySQL: Many joins and relations on the same table (theoretical question) | CC BY-SA 2.5 | null | 2010-12-03T11:02:11.280 | 2010-12-03T12:50:37.393 | 2010-12-03T11:19:19.730 | 156,481 | 156,481 | [
"mysql",
"database-design",
"paradigms"
] |
4,345,156 | 1 | 4,345,213 | null | 0 | 974 | I have a problem with recursive CTE query
Let's say that I have that category tree (Category table)

In my CTE query, I search for all children of the `1` category:
(that query works fine)
```
with mq as
(
select c.Id as parent, c.Id as child
from dbo.Category c
where c.Id = 1
union all
select q.child, c.Id
from mq q
inner join dbo.Category c on q.child = c.IdParentCategory
)
```
The output

Then, I want to get that Category ID, wchih doesn't have a child: categories `9,10,12,14,15`
```
with mq as
(
select c.Id as parent, c.Id as child
from dbo.Category c
where c.Id = 1
union all
select q.child, c.Id
from mq q
inner join dbo.Category c on q.child = c.IdParentCategory
where child in
(
select c1.Id
from dbo.Category c1
where not exists(select c2.Id
from dbo.Category c2
where c2.Id = c1.IdParentCategory)
)
)
```
but the output is wrong:

why ? Any ideas will be helpful !
if I separate the query from CTE, everything is OK
```
declare @tab table
(parent int, child int);
insert into @tab
select * from mq
delete from @tab
where child in (
select c1.parent
from @tab c1
where not exists(select c2.parent from @tab c2 where c2.parent = c1.child)
)
```
| TSQL A problem with categories tree | CC BY-SA 2.5 | null | 2010-12-03T11:39:29.747 | 2010-12-03T11:47:25.987 | null | null | 106,616 | [
"tsql",
"recursion",
"common-table-expression"
] |
4,345,237 | 1 | 4,345,492 | null | 1 | 210 | I'm using jQuery to hijack a link pointing to a php file. This php file is mostly html, but calls two php functions that each use a for loop to output html. The problem I'm running into is that the ajax call is incorrectly nesting the html generated by the php for loop.
Including the php file directly onto the page works fine, but when trying to grab it via ajax the html content of each sequential pass through the loop is inserted inside the previously generated html. For example:
```
<div>Content1</div>
<div>Content2</div>
<div>Content3</div>
```
becomes:
```
<div>Content1<div>Content2<div>Content3</div></div></div>
```
This is the relevant code for the php file:
```
<div class="publishedPosts">
<h3>Published</h3>
<?php displayPublishedBlogPosts(); ?>
</div>
<div class="verticalDivider"></div>
<div class="draftPosts">
<h3>Saved Drafts</h3>
<?php displayBlogPostDrafts(); ?>
</div>
```
And this is the jQuery code:
```
function adminPanelTabs() {
$('#adminPanelTabs ul li a').click(function(e) {
$('#adminPanelTabs ul li a.current').removeClass('current');
$(this).addClass('current');
$('#adminPanelContent').load($(this).attr('href'));
e.preventDefault();
});
}
```
Would appreciate any input or suggestions on how to fix this.

| jQuery ajax call incorrectly nesting php generated html | CC BY-SA 2.5 | null | 2010-12-03T11:51:05.770 | 2010-12-03T12:26:25.953 | 2010-12-03T12:21:29.757 | 466,826 | 529,322 | [
"php",
"jquery",
"html",
"ajax",
"generated"
] |
4,345,275 | 1 | 4,357,449 | null | 2 | 220 | Below is the query I have created to count the number of common strongly connected (connected in both directions) neighbors of two users:
```
DECLARE @monthly_connections_test TABLE (
calling_party VARCHAR(50)
, called_party VARCHAR(50))
INSERT INTO @monthly_connections_test
SELECT 'z1', 'z2'
UNION ALL SELECT 'z1', 'z3'
UNION ALL SELECT 'z1', 'z4'
UNION ALL SELECT 'z1', 'z5'
UNION ALL SELECT 'z1', 'z6'
UNION ALL SELECT 'z2', 'z1'
UNION ALL SELECT 'z2', 'z4'
UNION ALL SELECT 'z2', 'z5'
UNION ALL SELECT 'z2', 'z7'
UNION ALL SELECT 'z3', 'z1'
UNION ALL SELECT 'z4', 'z7'
UNION ALL SELECT 'z5', 'z1'
UNION ALL SELECT 'z5', 'z2'
UNION ALL SELECT 'z7', 'z4'
UNION ALL SELECT 'z7', 'z2'
SELECT t1.user1, t1.user2,
0 AS calling_calling, 0 AS calling_called,
0 AS called_calling, 0 AS called_called,
COUNT(*) AS both_directions
FROM (SELECT relevant_monthly_connections.calling_party AS user1,
relevant_monthly_connections_1.calling_party AS user2,
relevant_monthly_connections.called_party AS calledUser
FROM @monthly_connections_test relevant_monthly_connections
INNER JOIN @monthly_connections_test AS relevant_monthly_connections_1
ON relevant_monthly_connections.called_party = relevant_monthly_connections_1.called_party
AND relevant_monthly_connections.calling_party < relevant_monthly_connections_1.calling_party
) t1
INNER JOIN @monthly_connections_test AS relevant_monthly_connections_2
ON relevant_monthly_connections_2.called_party = t1.user1
AND relevant_monthly_connections_2.calling_party = t1.calledUser
GROUP BY t1.user1, t1.user2
```
Now I would like to count of strongly connected neighbors of user1 OR user2. So for example for the pair (z1, z2) the number of strongly connected neighbors is 3 (z1 is strongly connected to z2, z3, z5 and z2 is ignored as it is one of the nodes from the pair and z2 is strongly connected to z1, z5 and z7. again, z1 is ignored and count((z3, z5) U (z5, z7)) is 3).
Does anyone know how to create the query to count the number of all nodes which are strongly connected with one of the node from the pair for each pair (the query has to automatically calculate the number of all neighbors for each record)?
The following query returns the table of all bidirectional connections:
```
WITH bidirectionalConnections AS
(
SELECT calling_party AS user1, called_party AS user2 FROM @monthly_connections_test WHERE calling_party < called_party
INTERSECT
SELECT called_party AS user2, calling_party AS user2 FROM @monthly_connections_test
)
SELECT user1, user2 FROM bidirectionalConnections
```
Now for each pair of nodes it has to be checked in the table bidirectionalConnections how many nodes are strongly connected to first or second node from the pair.
Here is the picture described by the @monthly_connections_test table:

So the neighbors strongly connected to z1 OR z2 are z3, z5, z7
z1, z3: z2, z5
z1, z4: z2, z3, z5, z7
...
z1, z7: z2, z3, z4, z5
...
The result table should be in the following format:
```
user1, user2, total_neighbors_count
z1, z2, 3
z1, z3, 2
z1, z4, 4
...
z1, z7, 4
...
```
Thank you!
P.S.
I have posted similar question [How to use JOIN instead of UNION to count the neighbors of “A OR B”?](https://stackoverflow.com/questions/4296196/how-to-use-join-instead-of-union-to-count-the-neighbors-of-a-or-b) but it is not the same so I hope this question not to be considered as a duplicate.
| How to count the number of bidirectionally connected neighbors of A or B? | CC BY-SA 2.5 | null | 2010-12-03T11:56:29.647 | 2010-12-05T04:56:45.437 | 2017-05-23T12:01:09.963 | -1 | 22,996 | [
"sql",
"sql-server",
"graph",
"social-networking"
] |
4,345,389 | 1 | 4,345,958 | null | 0 | 593 | My question is the same as this one:
[Custom PrimaryKey Generation with autoincrement](https://stackoverflow.com/questions/1996831/custom-primarykey-generation-with-autoincrement).
But with a little twist.
When i built this database I had only one company and one set of customers, but now I run two companies, with different sets of customers. My first thought was to make two separate databases. But if I made changes to one of them I had to do the same to the other one, and I did not want to do this. So I decided to run both companies through the same database.
I have one table named `Customer` and it looks like this:

`ID` is the PK and also set to auto increment. This was working all good, until I decided two run two companies in the same DB. After I decided this, I added a column named `CompanyID` to attach that customer to a spcific company. This is also working like it should, when I log into my system as a user of company 1 I get compny 1's customers and so on.
But the problems appear when I add a new customer to the database. I want the customer ID's to start at 1 in both companies. But as it is now, when I create a customer in copmany 1 it gets customer number 1, and when I create a new customer in company 2 it increments on the same number, so it gets customer number 2. Here I wanted it to be customer number 1. The two increments should be separated based on the `CompanyID`.
First step might be to add both `ID` and `CompanyID` as PK, but what else should I do to accomplish this?
Also, if you got another opinion on how i should solve this, I would like to know!
| Custom PrimaryKey Generation with autoincrement | CC BY-SA 2.5 | null | 2010-12-03T12:13:20.817 | 2010-12-03T13:26:42.320 | 2017-05-23T10:32:36.017 | -1 | 219,443 | [
"sql",
"sql-server-2008"
] |
4,345,440 | 1 | 4,345,593 | null | 1 | 176 | I have an number of HTML elements which I have to sort for a type of carousel.
Imagine it is a list of div's like the following:
```
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<!-- etc -->
```
Let's say that, for instance, i have 13 div's i need to sort. The following has to been done:

I can't quite figure it out, maybe I've been staring at the thing for too long or tried too many alternatives.
edit:
the illustration is maybe a bit distracting.
the result I want is:
```
<div>1</div>
<div>3</div>
<div>5</div>
<div>7</div>
<div>9</div>
<div>11</div>
<div>13</div>
<div>2</div>
<div>4</div>
<div>6</div>
<div>8</div>
<div>10</div>
<div>12</div>
```
| Loop through jQuery elements and sort them as illustrated | CC BY-SA 4.0 | null | 2010-12-03T12:19:46.887 | 2018-09-05T03:31:30.123 | 2018-09-05T03:31:30.123 | 1,033,581 | 158,477 | [
"javascript",
"jquery",
"design-patterns"
] |
4,345,790 | 1 | null | null | 5 | 3,694 | Is it possible to make yellow tooltip in windows multiline?

I tried with `\n` but it's not working.
This is the function I have in my code. I followed instructions from MSDN but couldn't get it working (look at the comment: `// Multiline tooltip`).
```
void CreateToolTipForRect(HWND hwndParent)
{
if (!bCanCreateToolTips)
return;
// Get list of areas we want tooltips on
NSUI::TButton* tbt;
tbt = gUserInterface->buttonList;
HWND hwndTT;
// Array to store all tooltip texts
static char string[100][ RM_SCROLLTEXT_MAXLEN + 2 ];
// Go through the list
while (tbt != NULL)
{
// Check id there is a tooltip text defined for this area
int sid = GetResourceIdFromButtonId(tbt->id);
if (sid == -1)
{
tbt = tbt->next;
continue;
}
if (!ttwnd[tbt->id])
{
// Create a ToolTip.
hwndTT = CreateWindowEx(WS_EX_TOPMOST,
TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, (( QunicApp * )CQMainGetApp())->CQWinApp_GetHInst(),NULL);
ttwnd[tbt->id] = hwndTT;
SetWindowPos(hwndTT, HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
// Get tooltip from resources
int res = LoadString((( QunicApp * )CQMainGetApp())->CQWinApp_GetHInst(), sid, string[tbt->id], RM_SCROLLTEXT_MAXLEN );
}
// Set up "tool" information.
TOOLINFO ti = { 0 };
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_SUBCLASS;
ti.hwnd = hwndParent;
ti.hinst = (( QunicApp * )CQMainGetApp())->CQWinApp_GetHInst();
ti.lpszText = string[tbt->id];
// Set area
ti.rect.left = tbt->tx;
ti.rect.right = tbt->bx;
ti.rect.top = tbt->ty;
ti.rect.bottom = tbt->by;
// Associate the ToolTip with the "tool" window.
SendMessage(ttwnd[tbt->id], TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
// Multiline tooltip - Ilija tried with this
/*LPNMTTDISPINFO pInfo = (LPNMTTDISPINFO)tbt;
SendMessage(pInfo->hdr.hwndFrom, TTM_SETMAXTIPWIDTH, 0, 150);*/
tbt = tbt->next;
}
// Extra one, area or button is not known yet
// Create a ToolTip.
hwndTT = CreateWindowEx(WS_EX_TOPMOST,
TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, (( QunicApp * )CQMainGetApp())->CQWinApp_GetHInst(),NULL);
SetWindowPos(hwndTT, HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
// Set up "tool" information.
TOOLINFO ti = { 0 };
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_SUBCLASS;
ti.hwnd = hwndParent;
ti.hinst = (( QunicApp * )CQMainGetApp())->CQWinApp_GetHInst();
// Get tooltip from resources
int res = LoadString( ti.hinst, IDS_PREVIEW, string[99], RM_SCROLLTEXT_MAXLEN );
ti.lpszText = string[99];
// Set area
ti.rect.left = 7;
ti.rect.right = 104;
ti.rect.top = 131;
ti.rect.bottom = 145;
// Associate the ToolTip with the "tool" window.
SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
}
```
Thanks,
Ilija
| Windows yellow tooltip multiline? | CC BY-SA 2.5 | null | 2010-12-03T13:06:39.387 | 2011-10-14T20:10:04.630 | 2010-12-06T08:59:29.290 | 168,535 | 168,535 | [
"c++",
"windows",
"tooltip",
"multiline"
] |
4,345,846 | 1 | 4,704,701 | null | 3 | 1,802 | I've got a Menu, and I want to click on the menu, but not on the text if you guys know what i mean.
The MenuItem has a border, or something like this, but when I click on it it won't redirect to the page I want unless I click on text.
Is it possible to click on the whole "Button" and redirect or do what is need to do?
My menu is like this:
```
<rich:dropDownMenu showDelay="250" hideDelay="0" submitMode="none">
<f:facet name="label">Tools</f:facet>
<rich:menuItem>
<s:link view="/pages/tools/ppaParameters/PpaParametersEdit.xhtml" value="Parameters" id="PpaParametersId" includePageParams="false" propagation="none"/>
</rich:menuItem>
<rich:menuGroup value="Security">
<rich:menuItem>
<s:link view="/pages/tools/security/ppaModule/PpaModuleEdit.xhtml" value="Module" id="PpaModuleId" includePageParams="false" propagation="none" />
</rich:menuItem>
</rich:menuGroup>
</rich:dropDownMenu>
```
There's an example. I need to click on text to make it work out.

| Clicking on MenuItem without clicking on the text | CC BY-SA 2.5 | 0 | 2010-12-03T13:13:12.970 | 2016-06-30T22:00:06.390 | 2016-06-30T22:00:06.390 | 157,882 | 509,865 | [
"jsf",
"richfaces",
"seam"
] |
4,345,920 | 1 | 4,346,035 | null | 21 | 12,184 | Currently i am developing as and in an attached home screen widget:
Please show me a way to implement this ?? is it possible to do so?

| Application Launcher Text - Application Name in two lines | CC BY-SA 2.5 | 0 | 2010-12-03T13:21:30.560 | 2022-02-10T12:04:38.793 | 2010-12-08T12:30:49.853 | 379,693 | 379,693 | [
"android",
"android-widget"
] |
4,345,992 | 1 | null | null | 3 | 329 | If I use global stylesheet ( `[TTStyleSheet setGlobalStyleSheet:[[[StyleSheet alloc] init] autorelease]];` ) than I don't see any thumbnails in `TTThumbsViewController`.
I specify these styles for `TTThumbsViewController`:
```
- (UIColor *)navigationBarTintColor;
- (UIColor *)backgroundColor;
- (UIColor *)tablePlainBackgroundColor;
- (UIColor *)tableHeaderTintColor;
- (UIColor *)thumbnailBackgroundColor;
```
If I set `thumbnailBackgroundColor` to `grayColor` I see gray rectangles in the controller but no downloaded images.
If I comment use of global stylesheet I see thumbnails correctly.
I tried use stylesheet in `TTControl` demo app and `TTThumbsViewController` behave same as in my app.
Here is screenshot from `TTControl` demo app:

I hope I am not doing something wrong. Can anybody have some idea why this is happening ?
Thanks. Bye.
| TTThumbsViewController not show thumbnails when using stylesheet. | CC BY-SA 3.0 | null | 2010-12-03T13:30:32.040 | 2011-08-26T03:55:52.307 | 2011-08-26T03:55:52.307 | 264,802 | 529,428 | [
"iphone",
"objective-c",
"three20",
"ttthumbsviewcontroller"
] |
4,346,330 | 1 | 4,348,586 | null | 3 | 3,008 | i use a toolbar and a panel on my form .
: Windows 7 Normal theme , ParentBackground for Panel = True :

: Windows 7 Classic theme , ParentBackground for Panel = True :

| Why "ParentBackground" doesn't work at Windows Classic theme ? (Delphi) | CC BY-SA 2.5 | 0 | 2010-12-03T14:10:06.503 | 2010-12-03T18:23:15.820 | null | null | 381,979 | [
"delphi",
"background",
"themes",
"parent"
] |
4,346,830 | 1 | 4,347,148 | null | 0 | 3,167 | I am using a MYSQL database to store persisted data for a java application.
```
CREATE TABLE testtable1( key1a CHAR, key1b CHAR, encoded1a CHAR, encoded1b CHAR);
```
As you can see i create a table that stores for each row a 4 different CHAR's.
the sql i have written for inputing the chars into the table is
```
char k1[] = new char[2]
char p[] = new char[2];
k1[0]=0x00aa;
k1[1]=(char)0xaaaa;
p[0]=0x0001;
p[1]=0x0002;
sql = "INSERT INTO testtable1 "
+"(key1a, key1b , encoded1a,encoded1b) "
+ "VALUES "
+ "('"+ k1[0] + "',"
+ "'"+ k1[1] + "',"
+ "'"+ p[0] + "',"
+ "'"+ p[1] + "')";
```
The above statement i dont think work. it inpts the data as such

And then into the database like this

So as you can see, it is been inputed with a ?(whatis this?) and then the final two columns are not being populated.
So could any of you guys point me in the right direction to where my thinking is wrong when it comes to storing char variable.
And also , how would i retrieve the chars from the database table? as i cannot find any Doc's on this???
thank you very much
| How do you input Java char's into MYSQL database and then also retrieve them as well? | CC BY-SA 2.5 | 0 | 2010-12-03T15:07:16.810 | 2010-12-03T16:05:08.627 | 2010-12-03T15:19:08.293 | 189,950 | 286,630 | [
"java",
"sql",
"mysql",
"jdbc",
"char"
] |
4,347,453 | 1 | 4,816,837 | null | 6 | 6,247 | To increase working space and remove unused items from the Toolbar area, I would like to remove the File/Edit/View/etc toolbar (aka the Menu Bar) from the top of Visual Studio (2008 and 2010) (I don't use any of those, I try to use keystrokes for everything). Is there a way to do this?
This is similar to TinyMenu for Firefox, but I would setting for just removing the toolbar entirely: [https://addons.mozilla.org/en-US/firefox/addon/1455/](https://addons.mozilla.org/en-US/firefox/addon/1455/)
EDIT:
If you right click the toolbar and go to customize the Menu Bar can not be de-selected:

| Remove File Menu Toolbar from Visual Studio (Menu Bar) | CC BY-SA 2.5 | 0 | 2010-12-03T16:13:15.737 | 2012-03-11T13:19:45.807 | 2010-12-03T17:15:07.823 | 47,226 | 47,226 | [
"visual-studio",
"toolbar"
] |
4,347,462 | 1 | 4,347,513 | null | 9 | 4,840 | I tried to convert all my buttons background to .9.png, but I have a problem with Eclipse.
I created my nine patch .png with the tool, but since I put it in my /res/drawable folder, I have the following errors in all my .xml files when I try to access any resource starting with @drawable:
```
Error: No resource found that matches the given name (at 'drawable' with value '@drawable/my_resource').
```
Here is my .9.png:

And here is a screenshot:

Is there a problem in my .9.png or is it a problem with eclipse?
Thanks
| Eclipse bug with nine patch files? | CC BY-SA 2.5 | 0 | 2010-12-03T16:14:07.063 | 2013-02-19T18:08:56.203 | null | null | 488,054 | [
"android",
"eclipse",
"resources",
"nine-patch"
] |
4,347,593 | 1 | 4,347,644 | null | 1 | 624 | I'm developing a web site and I notice that there is a difference in font size between IE and other browsers. This is an example of my page:

I design it to look like the first and the second image, but how it looks on IE breaks my design. How can I solve this?
| How to correct differing font sizes between browsers | CC BY-SA 2.5 | null | 2010-12-03T16:25:57.180 | 2010-12-03T16:38:35.983 | 2010-12-03T16:38:35.983 | 366,904 | 310,648 | [
"html",
"css"
] |
4,347,663 | 1 | null | null | 2 | 755 | I have an already existing .NET MVC2 App that, because that we are and I want to place it in the cloud for to be more .
I was looking around and if we are in Europe, but I already have a 700 hours account on Azure.
- - - -

Because I always get an error when trying to work with the certificates (even with the correct credentials it cant fetch the existing certificate on the cloud)
, then I removed one and uploaded alone the "frontend" and I get the same stuff that I'm not used to and I have no idea what to do

And it's like this for almost 4 hours now:

I have no one to turn to and you guys have been my best friends in my most hard programming times.***
Role is the default role
```
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
namespace BackendWebRole
{
public class WebRole : RoleEntryPoint
{
public override bool OnStart()
{
DiagnosticMonitor.Start("DiagnosticsConnectionString");
// For information on handling configuration changes
// see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
RoleEnvironment.Changing += RoleEnvironmentChanging;
return base.OnStart();
}
private void RoleEnvironmentChanging(object sender, RoleEnvironmentChangingEventArgs e)
{
// If a configuration setting is changing
if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
{
// Set e.Cancel to true to restart this role instance
e.Cancel = true;
}
}
}
}
```
And
```
<?xml version="1.0"?>
<ServiceConfiguration serviceName="CloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
<Role name="Julekalender (Frontend)">
<Instances count="2" />
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=julekal;AccountKey=xR4G1SIUTSHdvAE1IpRKPoxJRr1upJjBcdqRX2GWGkwlO6tbbu30Bikz/ApBzUKhRvk+XaozvE/NIAwDzKCg==" />
</ConfigurationSettings>
</Role>
<Role name="Julekalender (Backend)">
<Instances count="2" />
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=julekal;AccountKey=xR4G1SIUTSHdvAE1IpRKPoxJRr1upJjBcdqRX2GWGkwlO6tbbu30Bikz/ApBzUKhRvk+XaozvE/NIAwDzKCg==" />
</ConfigurationSettings>
<Certificates>
</Certificates>
</Role>
</ServiceConfiguration>
```
And
```
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="CloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="Julekalender (Frontend)" vmsize="Medium">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</InputEndpoints>
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" />
</ConfigurationSettings>
</WebRole>
<WebRole name="Julekalender (Backend)">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="8081" />
</InputEndpoints>
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" />
</ConfigurationSettings>
<Certificates>
</Certificates>
</WebRole>
</ServiceDefinition>
```
| Windows Azure Startup from a pre-existing MVC2 app | CC BY-SA 3.0 | 0 | 2010-12-03T16:32:43.177 | 2012-03-06T16:03:34.283 | 2012-03-06T16:03:34.283 | 815,724 | 28,004 | [
".net",
"azure",
"startup"
] |
4,347,733 | 1 | null | null | 2 | 962 | In my application, I need to to open the camera and read the data as given below in attached image:
So by reading this the API should return me an audio file generated for the above image.
Do tell me if there is some other way to do this other than how I am trying. Thanks in advance.
| API for reading musical notes on iPhone | CC BY-SA 2.5 | 0 | 2010-12-03T16:39:25.873 | 2010-12-03T18:27:49.333 | 2010-12-03T16:53:29.277 | 366,904 | 362,086 | [
"iphone",
"api"
] |
4,348,258 | 1 | 4,571,769 | null | 0 | 681 | I need some help figuring out a solution to a z-index problem with ie7. Works fine in firefox.
I've read other posts, but for some reason the suggestions that worked for them are not working for me. I'm hoping someone can look at my code and point out where the problem is.
See the image below. please excuse the blurr...client doesn't want info displayed.
The top section (grey) is a "div" with 2 ul's in it, one for the bullet text, one fir the image thumbnails. The bottom section is identical to the top, only its colored white.
In the top section I have 3 images, when "hovered" over with mouse display a larger image. As you can see, the larger image is behind the next section (white) images and it should be on top of it.
I'm assuming the problem is somewhere in the jquery z-index, but I really don't know.
How can I fix this? Thanks for your help.

HTML:
```
<body>
<div style="position:relative;width:1000px;">
<!-- Main Content -->
<h2 class="h2_pad_me">Feature Details</h2>
<div class="light pad_me">
<h3>asdf</h3>
<p>asdf</p>
<ul>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
</ul>
<h4>asdf:</h4>
<div>
<ul class="thumb_standard">
<li><img src="asdf.jpg" alt="asdf"/></li>
<li><img src="asdf.jpg" alt="asdf"/></li>
<li><img src="asdf.jpg" alt="asdf"/></li>
</ul>
</div>
<div class="clear_both"></div>
</div>
<div class="light pad_me">
<h3>asdf</h3>
<p>asdf</p>
<ul>
<li>asdf</li>
<li>asdf</li>
<li>asdf</li>
</ul>
<h4>asdf:</h4>
<div>
<ul class="thumb_standard">
<li><img src="asdf.jpg" alt="asdf"/></li>
<li><img src="asdf.jpg" alt="asdf"/></li>
<li><img src="asdf.jpg" alt="asdf"/></li>
</ul>
</div>
<div class="clear_both"></div>
</div>
</div>
</body>
```
CSS:
```
<style>
ul.thumb_standard {
/*float: left;*/
list-style: none;
margin: auto;
padding: 10px;
width: 900px;
position:relative;
}
ul.thumb_standard li {
margin: 0;
padding: 5px;
float: left;
width: 210px;
height: 110px;
position: relative;
z-index:-1
}
ul.thumb_standard li img {
position: relative;
width: 200px;
height: 100px;
-ms-interpolation-mode: bicubic; /* IE Fix for Bicubic Scaling */
}
.clear_both{clear:both;}
.light{ background-color:#FFFFFF;}
.pad_me{padding:5px 15px 0px 15px;}
</style>
```
Jquery for the animated popup:
```
<script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("ul.thumb_standard li").hover(function() {
$(this).css({'z-index' : '1000'}); /*Add a higher z-index value so this image stays on top*/
var li = $(this);
var img = li.find('img');
var div = li.closest('div');
// Add hover class and stop animation
li.addClass('hover');
img.stop(); /* Stop animation queue buildup*/
// Find the position relative to the div
var new_width = 700;
var new_height = 500;
var new_left = (div.width() - new_width) / 2;
var new_top = (div.height() - new_height) / 2;
// Find the position relative to the li
var li_offset = li.position();
new_left -= li_offset.left;
new_top -= li_offset.top;
img.animate({
top: '-100%',
left: new_left + 'px',
width: new_width + 'px',
height: new_height + 'px'
}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */
} , function() {
$(this).css({'z-index' : '-1'}); /*set z-index value back*/
var li = $(this);
var img = $(this).find('img');
var div = $(this).parent('div');
// Remove hover class and stop animation
li.removeClass("hover");
img.stop(); /* Stop animation queue buildup*/
var new_width = 210;
var new_height = 110;
img.animate({
top: '0px',
left: '0px',
width: new_width + 'px',
height: new_height + 'px'
}, 400); /* this value of "400" is the speed of how fast/slow this hover animates */
}); //Closes .hover()
}); //Closes .document()
</script>
```
| Z-index problem with ie7 ... working in firefox. Images showing behind other img's | CC BY-SA 2.5 | null | 2010-12-03T17:40:38.220 | 2010-12-31T18:44:35.013 | null | null | 249,034 | [
"jquery",
"css",
"internet-explorer",
"html-lists"
] |
4,348,370 | 1 | 4,348,749 | null | 3 | 217 | I have two arrays of points: `double[] minus` and `double[] plus`, e.g.:
```
double[] minus = new[]
{
24.043414306636713,
26.521399902043807,
23.049167719142361,
24.473177606966754,
18.238281854192408,
};
double[] plus = new[]
{
8.31219054269323,
9.5909890877229582,
11.066525870449567,
22.769068312057193,
24.733540360065991,
};
```
I need to plot 2 diagrams basing on this number and determine their positions relatively to each other: are there an intersection and which of them is under another?
How can I do that? TIA
(please feel free to retag the question or change the topic, I'm not sure in proper math terminology used)
Here's an Excel diagram:

It's easy to determine which is above and which is under.
How to determine that red (plus) has an with blue (minus)? Using maybe LINQ?
| Determine 2 diagrams relative position using LINQ | CC BY-SA 2.5 | null | 2010-12-03T17:54:33.577 | 2010-12-05T09:04:38.517 | 2010-12-03T18:36:05.583 | 41,956 | 41,956 | [
"c#",
"linq",
"math",
".net-3.5",
"diagram"
] |
4,348,391 | 1 | 4,349,055 | null | 2 | 3,892 | i was googling when i came across this.. the following image & never before or after that saw it...
this is a screen shot of google results in firefox

one result was scrollable with in itself...
see the scroll bar.. how can i achieve this scroll-bar...
we can have scrolling inside Divs but Firefox doesn't let CSS styling of scroll-bar & it screws the look & feel of the page...
| How can I style an HTML scrollbar like the one sometimes found on google SERPs? | CC BY-SA 2.5 | null | 2010-12-03T17:57:50.840 | 2010-12-09T17:19:17.377 | 2010-12-03T18:02:42.797 | 262,056 | 158,455 | [
"html",
"css",
"scrollbar"
] |
4,348,509 | 1 | 4,349,046 | null | 1 | 996 | The idea is when there is no internet connection available, show my custom dialog to users which indicates there is no connection. Otherwise, when page is loading in WebView, show a ProgressDialog to show that page is loading and dismiss when loading is done. When there is an internet connection this code works, but if there is no, it crashes and I can't find where the error is.
```
package com.tariknotebook;
import android.app.Activity;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
public class NoteBook extends Activity {
/** Called when the activity is first created. */
WebView web;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
web = (WebView) findViewById(R.id.browserMine);
web.setWebViewClient(new HelloWebViewClient());
web.getSettings().setJavaScriptEnabled(true);
}
@Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
web.loadUrl("http://m.seslisozluk.com");
}
ProgressDialog dialog;
Dialog connDialog;
@Override
protected Dialog onCreateDialog(int id) {
switch(id)
{
case 1:
dialog = ProgressDialog.show(NoteBook.this, "Loading",
"Loading.. Please wait.");
break;
case 2:
connDialog = new Dialog(getApplicationContext());
connDialog.setContentView(R.layout.connection);
connDialog.setTitle("No Internet Connection");
Button closeButton = (Button) findViewById(R.id.closeButton);
closeButton.setOnClickListener(new closeButtonOnClickListener());
connDialog.show();
break;
}
return super.onCreateDialog(id);
}
private class closeButtonOnClickListener implements OnClickListener
{
public void onClick(View v) {
connDialog.dismiss();
};
}
private class HelloWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
// TODO Auto-generated method stub
super.onPageStarted(view, url, favicon);
ConnectivityManager conStatus = (ConnectivityManager) view.getContext().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
if(conStatus.getActiveNetworkInfo().isConnected() && conStatus.getActiveNetworkInfo() != null)
showDialog(1);
else
showDialog(2);
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
dialog.dismiss();
}
}
}
```
And this is the error log as well :

| Error when checking Internet Connection in Android | CC BY-SA 2.5 | null | 2010-12-03T18:14:30.817 | 2010-12-03T19:15:35.643 | null | null | 44,852 | [
"java",
"android",
"webview"
] |
4,349,334 | 1 | 4,349,460 | null | 4 | 476 | So If I have for example an image like this:

Will it load faster if its written in JS, in canvas? Or is it faster to have it in PNG or JPG or GIF?
| Is canvas faster than a normal image? | CC BY-SA 2.5 | 0 | 2010-12-03T19:51:33.637 | 2010-12-03T20:10:05.813 | null | null | 380,562 | [
"javascript",
"image",
"canvas",
"performance",
"photo"
] |
4,349,375 | 1 | 4,350,876 | null | 10 | 4,185 | First, just to give a visual idea of what I'm after, here's the closest result (yet not exactly what I'm after) image that I've found:

Here's the entire site-reference: [http://www.mathematische-basteleien.de/spiral.htm](http://www.mathematische-basteleien.de/spiral.htm)
BUT, it doesn't exactly solve the problem I'm after. I would like to store an array of points of a very specific spiral algorithm.
- -
If I'm not mistaken, the first two points would be:
- -
But where to go from here?
The only arguments I'd like to provide are:
- - -
It almost sounds, to me, that I have to calculate the "" (if there's such a term) in order to plot the evenly distributed points along the spiral.
Can be reliably used for this calculation you think?
If it's been done before, please show some code example!
| Algorithm to solve the points of a evenly-distributed / even-gaps spiral? | CC BY-SA 3.0 | 0 | 2010-12-03T19:58:53.737 | 2015-06-26T20:52:15.063 | 2015-06-26T20:52:15.063 | 468,206 | 468,206 | [
"actionscript-3",
"algorithm",
"math",
"pseudocode",
"spiral"
] |
4,349,406 | 1 | 4,349,478 | null | 0 | 156 | I'm making a reservation system with one row per reservation in a mySql table. This row contains three columns: morning, afternoon and evening.
```
reservation_id | date | morning | afternoon | evening
int(255) | d/t | 1/0 | 1/0 | 1/0
```
With the use of the following GUI the user can add or subtract more or less items for the three different parts:

I'm trying to re write any possible setting (> 0) of the numbers to as less as possible rows in my reservation table.
For instance:
```
morning | afternoon | evening
3 | 1 | 2
```
could be converted to (three+one+two=) 6 rows in the mysql table. But it would be nicer to transform this input to three rows:
```
| morning | afternoon | evening
row 1 | 1 | 1 | 1
row 2 | 1 | 0 | 1
row 3 | 1 | 0 | 0
```
Could someone help me to write this algorithm?
Thank you in advance!
R
//reply
Every row in the table is a boat. It is strange to have in the main overview three rows for the same boat each row containing the reservation for or the morning, or the afternoon or the evening.
| Can't figure out algorithm in php | CC BY-SA 2.5 | null | 2010-12-03T20:02:00.817 | 2010-12-03T20:37:20.540 | 2010-12-03T20:14:22.220 | 359,831 | 359,831 | [
"php",
"mysql"
] |
4,349,494 | 1 | 4,349,681 | null | 0 | 782 | I have a rather complex application at [https://github.com/BigBadOwl/iStreamer-Download-Manager](https://github.com/BigBadOwl/iStreamer-Download-Manager) which uses Rtmpdump and Ffmpeg libraries to download and convert Flash streams. I would like the thread which does the actual conversion to be released to give the user access to the screen again during the download (for obvious reasons).
Anyway, it runs fine as long as it's in the main thread, but as soon as I try place it on a new thread, the Rtmpdump code crashes. It's a memory thing, but I can't see where I am going wrong. Does anyone mind telling me whats going on?
The part of the code in question is [https://github.com/BigBadOwl/iStreamer-Download-Manager/blob/master/iplayerFetch.m](https://github.com/BigBadOwl/iStreamer-Download-Manager/blob/master/iplayerFetch.m)
```
- (void)startTheBackgroundJob:(NSArray *) args {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *thePid = [args objectAtIndex:0];
NSString *flvPath = [args objectAtIndex:1];
NSString *mp4Path = [args objectAtIndex:2];
[self performSelectorOnMainThread:@selector(updateProgressBar:) withObject:flvPath waitUntilDone:NO];
[self getFlashFile:thePid withFlvPathName: flvPath];
NSFileManager *fileManager = [NSFileManager defaultManager];
if([fileManager fileExistsAtPath:flvPath]){
NSNumber *filesize = 0;
NSDictionary *fileAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:flvPath traverseLink:NO];
if(fileAttributes != nil){
filesize = [fileAttributes objectForKey:NSFileSize];
}
if([filesize longLongValue] > 1024){
[self removeFlvWrapper:flvPath withMp4PathName:mp4Path];
}
[fileManager removeItemAtPath:flvPath error:NULL];
}
[fileManager release];
[pool drain];}
- (void)beginDownload:(NSString *) thePid withDocumentsFolder:(NSString *) documentsDirectory andTempFolder:(NSString *) tempDirectory {
NSString *flvPath = [NSString stringWithFormat:@"%@/%@.flv", tempDirectory, thePid];
NSString *mp4Path = [NSString stringWithFormat:@"%@/%@.mp4", documentsDirectory, thePid];
NSArray *extraArgs = [[NSArray alloc] initWithObjects:thePid, flvPath, mp4Path, nil];
[NSThread detachNewThreadSelector:@selector(startTheBackgroundJob:) toTarget:self withObject:extraArgs];}
```
Stacktrace:
```
#0 getStream (argc=16, argv=0x65a0140) at /Users/colinb/Documents/iStreamer-Download-Manager/rtmpdump.c:746
#1 0x0003c297 in -[iplayerFetch getFlashFile:withFlvPathName:] (self=0x658ced0, _cmd=0x58da66, thePid=0x793e8b0, flvPath=0x65994c0) at /Users/colinb/Documents/iStreamer-Download-Manager/iplayerFetch.m:168
#2 0x0003b776 in -[iplayerFetch startTheBackgroundJob:] (self=0x658ced0, _cmd=0x58daca, args=0x6599490) at /Users/bigbadowl/Documents/iStreamer-Download-Manager/iplayerFetch.m:33
#3 0x019a4d4c in -[NSThread main] ()
#4 0x019a4cd8 in __NSThread__main__ ()
#5 0x97ca385d in _pthread_start ()
#6 0x97ca36e2 in thread_start ()
Program received signal: “EXC_BAD_ACCESS”.
```

| NSThread issue with an iPhone Application | CC BY-SA 2.5 | 0 | 2010-12-03T20:16:01.643 | 2010-12-04T16:37:02.410 | 2010-12-04T16:37:02.410 | 229,174 | 229,174 | [
"iphone",
"objective-c",
"multithreading"
] |
4,349,605 | 1 | 4,377,477 | null | 1 | 382 | I recently updated my iOS SDK to 4.2 and now my frameworks have some wrong file-paths…
I found a lot of these frameworks but I couldn't find the UIKit etc.
But it must be in the same folder, so what should I do?
Can I download these frameworks from somewhere!?

Thanks for help! :)
| Lost frameworks in iOS 4.2 | CC BY-SA 2.5 | null | 2010-12-03T20:33:38.210 | 2010-12-07T14:11:40.457 | 2010-12-07T14:11:40.457 | 41,116 | 1,333,276 | [
"xcode",
"frameworks",
"ios-4.2",
"iphone"
] |
4,349,813 | 1 | null | null | 8 | 2,281 | I've got a raster grid of values that looks something like the image below (white is high values, the black background value is zero).

I'm trying to write some kind of path-following code to start at the end of one of the lines and trace to the other end, going via the highest possible values (that is, the whiter the pixels chosen to be in the line the better) but still getting to the other end.
I've been struggling with this for a while, and can't seem to get anything I try to work. So I wondered, has a generic algorithm already been developed for this sort of problem? I've done a lot of searching, but most path algorithms seem to be designed to work on vectors/networks, not raster grids like this.
Any ideas?
| Raster path following algorithms | CC BY-SA 2.5 | 0 | 2010-12-03T20:58:21.837 | 2021-11-27T11:51:08.143 | null | null | 1,912 | [
"algorithm",
"raster"
] |
4,349,918 | 1 | 4,350,138 | null | 3 | 235 | I have an application that uses JNI for some native functions that are in a DLL. The application runs correctly on windows XP, however when I run the program on Window 2000, I receive the following:

```
java.lang.UnsatisfiedLinkError: C:\Program Files\Compunetix\stixDlls\CMSCI Dll.d
ll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.compunetix.vsd.stix.main.Main.main(Main.java:165)
```
Any ideas?
Thanks
| Java Exception when Switching from XP to WIN2K | CC BY-SA 2.5 | null | 2010-12-03T21:11:53.240 | 2010-12-04T02:22:55.503 | 2010-12-04T02:22:55.503 | 312,407 | 489,041 | [
"java",
"windows",
"dll",
"operating-system",
"java-native-interface"
] |
4,350,005 | 1 | null | null | 0 | 394 | here is the error in question:

I've run syncdb and restarted the server.
| Making a django blog: says database column is missing when 'sql' shows the column exists | CC BY-SA 2.5 | null | 2010-12-03T21:25:08.207 | 2010-12-03T21:47:29.510 | 2010-12-03T21:47:29.510 | 9,453 | 529,899 | [
"django"
] |
4,350,254 | 1 | 4,351,330 | null | 0 | 1,213 | I have a form with multiple fields that I'm validating. I have organized my controls into 2 fieldsets: MASTER and DETAIL.

I use the button to and the button to add a new item to my array of objects, where I store temporarily the data entered trough the DETAIL inputs that then I'll send to the server along with the data of the MASTER part.
The problem is that when I press the button and I still haven't filled in the MASTER inputs, I can't go on adding a new detail because of the Master validation. And similarly, when I attempt to submit the form and the DETAIL fields are empty the Detail validation fires.
My question is: Is it possible to simulate a validation group with jQuery validation plugin?
| How can I simulate a validation group with jquery validation plugin? | CC BY-SA 3.0 | null | 2010-12-03T22:03:53.397 | 2013-02-26T11:31:25.603 | 2013-02-26T11:31:25.603 | 1,400,768 | null | [
"jquery-validate"
] |
4,350,726 | 1 | 4,350,809 | null | 1 | 5,356 | After my team friend did a push operation on our repo I can't do push operation.
First I commit later I click push
```
Push will not be performed because it would create remote branches.
You must first resync by doing a Pull from the target repository and Merge.
```
Later I click pull I got this
```
INFO Pulling From: https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27 ...
comparing with https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27
searching for changes
no changes found
INFO Pulled From: https://mercurial.intuxication.org/hg/itucs-blg361-2010-g27
INFO To: hastaneBilgiSistemi - C:\Users\yakUP\Desktop\wicket\hastaneBilgiSistemi
INFO: End of Mercurial Pull
```
What can I do?
I tried update. It says:
```
Mercurial Update
----------------
Update to revision 25 in:
C:\Users\yakUP\Desktop\wicket\hastaneBilgiSistemi
abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
INFO: End of Update
```
graph is like:

Im new to mercurial.
| mercurial push /pull problem | CC BY-SA 2.5 | null | 2010-12-03T23:06:26.080 | 2018-02-28T11:51:05.053 | 2010-12-04T03:54:54.837 | 8,992 | 484,454 | [
"mercurial"
] |
4,350,804 | 1 | 4,350,930 | null | 3 | 1,417 | I am a great lover of sprites, but. Got thinking, I do everything long hand, so was wondering if there was a shortcut.
Essentially, creating a sprite is easy. Making the sprite work is easy, but doing lots of sprites, gets laborious.
So was wondering what is the cleanest way of doing multiple sprites, that I can position anywhere on our web pages. I have seen multiple sprite sheets, similar to jquery ui icons, but we have our own icons. So was wondering if there was a cleaner method.
All up we will have approx 16 to 20 sprites in the set. Below is sample of html and css.
html
```
<a href="link1.html" id="logo-link"> </a>
<a href="link2.html" id="logo-link2"> </a>
```
Any thoughts, on refining our sprites. Or should we create a sprite sheet with all sprites on ?
Image sample:


Added basic sprite sheet on x axis

Example:

Ok Guys:
So far I have this in css:
html I have:
```
<a href="link2.html" class="sprite addlisting"> </a>
<a href="link2.html" class="sprite addanalytics"> </a>
<a href="link2.html" class="sprite addprofile"> </a>
```
What I really dont get ( see the spritesheet.png I made above , is why profile is at co-ordinates 32,32 and why analytics is at co-ordinates 64,32
Perhaps I have my co-ords wrong lol
Added the actual sprite sheet now, but I am buggered if I can get so-ordinates to play with me lol
Image added:
![alt text][5]
Finally figured it out.
| Css Sprite question, is there a better way? | CC BY-SA 2.5 | null | 2010-12-03T23:19:26.397 | 2010-12-04T03:20:08.863 | 2010-12-04T03:20:08.863 | 501,173 | 501,173 | [
"css",
"sprite"
] |
4,351,229 | 1 | 4,351,552 | null | 2 | 7,946 | I followed the tutorial: [http://useyourloaf.com/blog/2010/5/18/adding-a-settings-bundle-to-an-iphone-app.html](http://useyourloaf.com/blog/2010/5/18/adding-a-settings-bundle-to-an-iphone-app.html)
And the Toggle Switch (that I just created based on the tutorial) was not in the Settings App. Every time I did an NSLog on the state of the switch, it would return "(null)".
Please help as I need to create, and access a Toggle Switch created in the .plist file. I am new to iPhone Programming.
Here's the code I'm using to set the user preference switch:
```
// Set the application defaults
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"YES" forKey:@"ShuffleToggleKey"];
[defaults registerDefaults:appDefaults];
[defaults synchronize];
```
And here's the code I'm using to get the state of the user preference switch:
```
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
BOOL enabled = [defaults boolForKey:@"ShuffleToggleKey"];
```
My Settings bundle Root.plist file looks as follows:

| iPhone Xcode Settings.bundle Plist | CC BY-SA 3.0 | 0 | 2010-12-04T00:45:00.273 | 2012-06-24T22:25:35.963 | 2012-06-24T22:25:35.963 | 205,895 | 524,358 | [
"iphone",
"objective-c",
"xcode3.2",
"settings.bundle",
"iphone-sdk-4.1"
] |
4,351,630 | 1 | 4,355,603 | null | 0 | 778 | Consider the following partial code. My problem is that the Scrollbar is not aligned with the rectangle. I get a rectangle and a scrollbar with a large gap between the two. I figured I could experiment and find out what the "offset" is and just put that in but I'd like to understand why the scrollbar apparently does not seem to honor the coordinates.
```
hCDC = GetDC(hCWnd);
bkgBrush = CreateSolidBrush( BGColor );
SetMapMode( hCDC, MM_TEXT );
SelectObject( hCDC, bkgBrush );
Rectangle(hCDC, VTRect->left, VTRect->top, VTRect->right, VTRect->bottom);
iHThumb = GetSystemMetrics(SM_CXHTHUMB);
iVThumb = GetSystemMetrics(SM_CYVTHUMB);
hInstance = NULL;
if( hWndVertScroll )
DestroyWindow( hWndVertScroll );
hWndVertScroll = CreateWindow(
"Scrollbar",
(LPSTR)NULL,
WS_CHILD | WS_VISIBLE | SBS_VERT | SBS_RIGHTALIGN,
VTRect->left,VTRect->top,VTRect->right,VTRect->bottom-iVThumb ,
hCWnd,
NULL,
hInstance,
NULL);
```
To correct for the gap, I'd invoke the CreateWindow call using the following:
```
hWndVertScroll = CreateWindow(
"Scrollbar",
(LPSTR)NULL,
WS_CHILD | WS_VISIBLE | SBS_VERT | SBS_RIGHTALIGN,
VTRect->left,VTRect->top,VTRect->right - 100 ,VTRect->bottom-iVThumb ,
hCWnd,
NULL,
hInstance,
NULL);
```
but I don't understand why VTRect->right - 100 is required to but the scroll bar up against the right side of the Rectangle. Note that I did try VTRect->right - iHThumb but I still have a gap albeit a smaller one.
Screen shot of the red rectangle and scrollbar and the gap between the two:

| CreateWindow Scrollbar alignment issue | CC BY-SA 2.5 | null | 2010-12-04T02:37:18.560 | 2010-12-04T20:14:06.523 | 2010-12-04T18:15:25.070 | 12,937 | 12,937 | [
"winapi",
"scrollbar",
"alignment",
"createwindow"
] |
4,351,631 | 1 | null | null | 3 | 2,474 | I have an app which asynchronously searches a remote API and displays the UI using iOS' UISearchDisplayController.
For a saved search feature, I've been trying to programmatically use the UISearchDisplayController, in order to both initiate the search, and set up the user interface to be right back where he used to be. (Ie., I'm trying to bring up the search bar and set the search term.)
```
searchTableViewController.searchDisplayController.searchBar.text = mySearchTerm;
//[...]
[searchTableViewController.searchDisplayController setActive:YES animated:YES];
[searchTableViewController performSearch];
```
The code I've tried so far—above—doesn't seem to do the trick. While it correctly brings up the search bar, sets the search term and performs a search, the system doesn't seem to recognize this as a valid search somehow. If I use my fingers in the results view to make the keyboard disappear, the search term resets itself and the results disappear.


Help appreciated. Thanks!
| programmatically use UISearchDisplayController | CC BY-SA 2.5 | 0 | 2010-12-04T02:37:20.370 | 2012-01-13T23:12:41.840 | null | null | 107,344 | [
"iphone",
"uisearchdisplaycontroller"
] |
4,352,068 | 1 | null | null | 0 | 98 | I'm trying to model a subset of my domain and I want to solve this problem as simply as possible in hibernate. See picture 1 for the basic modelling.
The problem with that is I can potentially associate whatever type, group and category to a property. Therefore I could store an invalid relationship between type, group and category.
So I think 3 is the correct way to model this, though I feel there will be too many tables to maintain and my hibernate will get a bit too complex.
Has anyone got any better ideas on how to model this in the DB and hibernate?

| hibernate modelling many to many preserving integrity | CC BY-SA 3.0 | null | 2010-12-04T05:10:42.367 | 2012-11-14T12:24:08.853 | 2012-11-14T12:24:08.853 | 569,101 | 500,349 | [
"hibernate",
"jpa",
"many-to-many"
] |
4,352,404 | 1 | 4,353,050 | null | 2 | 1,986 | I am trying to put an `input` text box under a `select`, where the `input` is used to add new items to the `select`. Naturally, I want them the same width. However, this doesn't seem to work (I don't want to set different widths, because the difference needed may vary across browsers and platforms):
```
select, input {
min-width: 16em;
}
```
The text box is six pixels wider than the `select`.

A forum post at [http://forums.mozillazine.org/viewtopic.php?f=25&t=1555685](http://forums.mozillazine.org/viewtopic.php?f=25&t=1555685) recommended that forcing content-box sizing on both (rather than border-box or other defaults) would make them the same. This helped a bit, increasing the `select` width by two pixels, but the text box is still four pixels wider:
```
select, input {
min-width: 16em;
box-sizing: content-box;
-moz-box-sizing: content-box;
}
```

A thing I thought to try out was have a container with the `16em` width and set its two children to `width: 100%;`, in the hope that they would be the same width. Unfortunately, that didn't work either:

Any other fixes I can try to make them the same width? I'm currently testing in Firefox 4.0b7 on Ubuntu 11.04 with the Darklooks GTK+ theme, though of course, I want a solution that works equally everywhere.
| <input> and <select> widths | CC BY-SA 2.5 | null | 2010-12-04T07:03:09.590 | 2010-12-04T10:19:37.567 | 2010-12-04T07:15:32.977 | 330,644 | 330,644 | [
"html",
"css"
] |
4,352,533 | 1 | 4,352,812 | null | 1 | 221 | I built a site on mambo v 4.5.2 and
under Global Configuration tab -> Mail set PHP mail function option
but if I send email from `[email protected]` it goes in to SPAM
however if I use `[email protected]` it goes in to Inbox.
There is a screen shot.

Kindly help me to fix this..
| mambo: email goes to spam | CC BY-SA 2.5 | null | 2010-12-04T07:44:47.130 | 2010-12-04T09:16:31.473 | 2010-12-04T08:32:52.410 | 466,826 | 233,679 | [
"php",
"email"
] |
4,352,588 | 1 | null | null | 0 | 2,648 | ```
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Assert
```
Seems the runtime.jar has no org.eclipse.core.runtime.Assert in it:

Am I using a wrong version though it's shipped with my eclipse?
I don't have Plugin Development Perspective:

| Where's org.eclipse.core.runtime.Assert available? | CC BY-SA 2.5 | null | 2010-12-04T08:06:59.757 | 2010-12-05T05:12:56.357 | 2010-12-05T05:12:56.357 | 477,822 | 477,822 | [
"java",
"eclipse"
] |
4,352,606 | 1 | null | null | 1 | 1,390 | I'm using several dropdown menus for a site I'm working on. In Chrome and Safari the menus render fine. But in firefox, the dropdown arrow is placed in the middle of the menu.
---
EDIT
Here's pictures.
This is what it should look like in all browsers. (It's only like this in Chrome.)

This is what it's currently doing in Firefox and IE:

| HTML/CSS - Setting Select Menu Style | CC BY-SA 2.5 | null | 2010-12-04T08:11:24.427 | 2011-09-16T09:24:52.253 | 2010-12-05T22:03:15.630 | 530,290 | 530,290 | [
"html",
"css",
"select",
"drop-down-menu"
] |
4,353,038 | 1 | 4,469,887 | null | 0 | 528 | By using graph library protovis i had brought a bar graph.

Refer Documentation of protovis at `http://vis.stanford.edu/protovis/ex/bar.html`
Help me i want to access the bar in javascript or jquery to fetch details of particular bar
| Want to trigger click event function from protovis(Javascript Graph Library) | CC BY-SA 2.5 | null | 2010-12-04T10:14:35.627 | 2010-12-17T11:07:26.240 | 2010-12-04T10:16:55.590 | 34,201 | 524,723 | [
"javascript",
"protovis"
] |
4,353,140 | 1 | 4,353,170 | null | 2 | 616 | What is the actual difference in giving fontsize in 25 and 25pt?. Why the 25pt is looking bigger in size?. So while handling font size which one to follow 25 or 25pt?
```
<StackPanel>
<TextBlock FontSize="25" >Kishore</TextBlock>
<TextBlock FontSize="25pt" >Kishore</TextBlock>
</StackPanel>
```
o/p

| what is the difference in setting FontSize = 25 or 25pt? | CC BY-SA 2.5 | null | 2010-12-04T10:48:04.293 | 2010-12-04T11:01:23.363 | null | null | 144,373 | [
"wpf"
] |
4,353,178 | 1 | 4,353,501 | null | 3 | 21,782 | I have a web page with a Google Map which works well. Instead of having the city name hardcoded to "Bochum" there, I'd like to find the header
```
<h3 id="city"><i>Bochum</i></h3>
```
and use that value in my init() function.
I'm probably missing something minor in the code below. Please help me and please refer me to the API reference for such a "child", my Javascript skills are very rusty.
Also I wonder, how could I pass one more value through my h3 header, like the color for my marker?
Thank you!
Alex

```
<html>
<head>
<style type="text/css">
h1,h2,h3,p { text-align: center; }
#map { width: 400; height: 200; margin-left: auto; margin-right: auto; }
</style>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function init() {
for (var child in document.body.childNodes) {
child = document.body.childNodes[child];
if (child.nodeName == "H3")
alert(child);
}
// use the #city value here instead
city = 'Bochum';
if (city.length > 1)
findCity(city);
}
function createMap(center) {
var opts = {
zoom: 9,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
return new google.maps.Map(document.getElementById("map"), opts);
}
function findCity(city) {
var gc = new google.maps.Geocoder();
gc.geocode( { "address": city}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var pos = results[0].geometry.location;
var map = createMap(pos);
var marker = new google.maps.Marker({
map: map,
title: city,
position: pos,
});
}
});
}
</script>
<head>
<body onload="init();">
<h3 id="city"><i>Bochum</i></h3>
<div id="map"></div>
</body>
</html>
```
| Javascript: how to find the content of h3 header with id "map"? | CC BY-SA 2.5 | null | 2010-12-04T10:59:56.250 | 2014-03-07T10:48:36.703 | null | null | 165,071 | [
"javascript",
"dom",
"google-maps"
] |
4,353,740 | 1 | null | null | 9 | 17,884 | I am developing an android application.In my application,I want to display paragraph string in TextView,so I want to rounded Textview look like given bellow. Textview shout be center position of the screen same like given bellow.How is possible?

Thanks Friends.
| How to make rounded TextView in Android? | CC BY-SA 2.5 | 0 | 2010-12-04T13:33:19.760 | 2012-06-12T09:12:26.097 | 2010-12-04T13:38:40.227 | 182,668 | 500,595 | [
"android"
] |
4,353,840 | 1 | 4,353,846 | null | 4 | 4,015 | I have a simple layout as follows. Even though, I set all attributes as wrap_content, the resulting layout fills the entire screen height wise. The individual layouts in themselves are small. So the top level container should only be as big as to wrap all its elements. But it seems to fill the full screen. Width wise, the same attributes work fine.
What am I missing here?
```
<RelativeLayout
android:id="@+id/topcontainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/solid_red"
>
<LinearLayout
android:id="@+id/lowercontainer"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dip"
android:layout_centerHorizontal="true"
android:paddingLeft="0dip"
android:paddingRight="0dip"
android:layout_alignParentBottom="true"
android:background="@drawable/solid_blue"
>
<ImageView
android:id="@+id/lefticon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_settings_display"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:paddingRight="0dip"
/>
<ImageView
android:id="@+id/righticon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_settings_display"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:paddingLeft="0dip"
/>
</LinearLayout>
<TextView android:id="@+id/test"
android:text="Test text"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:gravity="center"
android:layout_centerHorizontal="true"
android:textSize="20dip"
android:layout_above="@id/lowercontainer"
android:background="@drawable/solid_green"
/>
</RelativeLayout>
```

| What does Relative layout wrap_content do? | CC BY-SA 4.0 | null | 2010-12-04T13:56:08.663 | 2019-10-25T05:18:11.043 | 2019-10-25T05:18:11.043 | 10,539,119 | 458,942 | [
"android",
"android-relativelayout"
] |
4,354,134 | 1 | 4,354,236 | null | 5 | 6,796 | Greetings
I started developing with WPF yesterday and have ran into some issues. I came to the understanding that a Canvas was the equivalent to a Panel in WinForms. However I'm running into some difficulties with the 'click' event. The MouseLeftButtonDown event. If it's relevant or not, this Image and the Canvasses are in a UserControl

The above image is basically what I am having difficulties with. The 3 images you see is one image. The squares you see are each different canvases. Depending on what canvas is clicked i want something different to happen.
Currently i have the following code:
```
<Grid>
<Canvas Name="canvasTerran" Height="27" Width="26" Margin="88,106,134,106" MouseLeftButtonDown="canvasTerran_MouseLeftButtonDown" />
<Canvas Name="canvasZerg" Height="27" Width="26" Margin="117,107,105,107" MouseLeftButtonDown="canvasZerg_MouseLeftButtonDown" />
<Canvas Name="canvasProtoss" Height="27" Margin="145,107,88,107" MouseLeftButtonDown="canvasProtoss_MouseLeftButtonDown" />
<Image Name="imageRaces" Height="27" Width="73" Stretch="Fill" Source="pack://application:,,,/Images/Races/Races.png" />
</Grid>
```
When I run the application (the user control is in the main window ofcourse) and I click where the canvasses should be nothing happens. The event I'm trying to fire:
```
private void canvasTerran_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
MessageBox.Show("lolterran", "lol");
// image on main window
// .Source = new BitmapImage(new Uri("pack://application:,,,/" + Constants.RACESPATH + "T.png"));
}
```
I don't really see what I'm doing wrong here so any suggestions would be welcome. As I said I'm new to WPF so if you think there is a better way than I'm currently trying please do say so!
Thanks in advance.
| WPF - Canvas_MouseLeftButtonDown event | CC BY-SA 2.5 | 0 | 2010-12-04T15:06:26.093 | 2010-12-04T15:27:43.880 | 2010-12-04T15:13:43.883 | null | null | [
"c#",
"wpf",
"canvas"
] |
4,354,939 | 1 | 7,917,978 | null | 121 | 62,583 | I'm working on a UI for an app, and I'm attempting to use grayscale icons, and allow the user to change the theme to a color of their choosing. To do this, I'm trying to just apply a ColorFilter of some sort to overlay a color on top of the drawable. I've tried using PorterDuff.Mode.MULTIPLY, and it works almost exactly as I need, except that whites get overlayed with the color as well. What I'm ideally looking for is something like the "Color" blending mode in Photoshop, where the graphic retains its transparency and luminosity, and only modifies the color of the image. For example:
 becomes After doing some research, it appears that the ColorMatrixColorFilter class may do what I need, but I can't seem to find any resources pointing to how the matrix is used. It's a 4x5 matrix, but what I need to know is how I go about designing the matrix. Any ideas?
EDIT: So okay, what I've found so far on this is as follows:
```
1 0 0 0 0 //red
0 1 0 0 0 //green
0 0 1 0 0 //blue
0 0 0 1 0 //alpha
```
Where this matrix is the identity matrix (when applied, makes no changes), and the numbers range from 0 to 1 (floats). This matrix will be multiplied with each pixel to convert to the new color. So this is where it starts to get fuzzy for me. So I would think each pixel would be a 1 x 4 vector containing the argb values (e.g. `0.2, 0.5, 0.8, 1`) that would be dotted with the transformation matrix. So to double the red intensity of an image, you would use a matrix such as:
```
2 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
```
which would give you a vector (color) of `0.4, 0.5, 0.8, 1`. From limited testing, this seems to be the case, and works properly, but I actually still end up with the same problem (i.e. whites gain coloring). Further reading tells me that this is because it's doing the conversion on RGB values, whereas for hue shifting, the values should first be converted to HSL values. So possibly I could write a class that would read the image and convert the colors, and redraw the image with the new colors. This creates ANOTHER problem with StateListDrawables, as I'm not sure how I would go about getting each of these in code and modifying all of them, and how slow a process it would be. :/
Hmm, okay, so I suppose another question I would have is whether a matrix can be used to convert RGB to another color space with luminosity information, such as Lb or HSL? If so, I could just multiply the matrix for that converstion, then make the hue adjustment to THAT matrix, then apply that matrix as the ColorFilter.
| Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Modify a Drawable's Hue | CC BY-SA 2.5 | 0 | 2010-12-04T17:54:52.133 | 2019-10-14T20:57:33.403 | 2010-12-05T21:09:56.507 | 321,697 | 321,697 | [
"android",
"drawable",
"colormatrix",
"colorfilter"
] |
4,354,976 | 1 | 4,355,375 | null | 1 | 3,503 | I've a custom section header in my UITableView and I can't figure out why they are appearing bellow the UITableViewCell of the table. See the screenshots:

This is the code that creates the section header:
```
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
NSString *sectionTitle = [self tableView:tableView titleForHeaderInSection:section];
if (sectionTitle == nil) {
return nil;
}
return [LojaInfoHeaderView lojaInfoHeaderForSection:section withTitle:sectionTitle opened:[self sectionIsOpen:section] andDelegate:self];
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return [LojaInfoHeaderView viewHeight];
}
```
And the section's cell are inserted or deleted when the user touches the section header:
```
- (void)lojaInfoHeader:(LojaInfoHeaderView *)lojaInfoHeader sectionDidOpen:(NSInteger)section {
NSArray *indexPathsToInsert = [self indexPathsForSection:section];
[self setSection:section open:YES];
[_tableView insertRowsAtIndexPaths:indexPathsToInsert withRowAnimation:UITableViewRowAnimationTop];
}
- (void)lojaInfoHeader:(LojaInfoHeaderView *)lojaInfoHeader sectionDidClose:(NSInteger)section {
NSArray *indexPathsToDelete = [self indexPathsForSection:section];
[self setSection:section open:NO];
[_tableView deleteRowsAtIndexPaths:indexPathsToDelete withRowAnimation:UITableViewRowAnimationTop];
}
```
How can I make the section header appears above the cells? How to fix it?
These are the class methods I'm using:
```
+ (CGFloat)viewHeight {
return 44.0;
}
+ (LojaInfoHeaderView *)lojaInfoHeaderForSection:(NSInteger)section withTitle:(NSString *)title opened:(BOOL)isOpen andDelegate:(id<LojaInfoHeaderDelegate>)delegate {
LojaInfoHeaderView *newHeader = [[[LojaInfoHeaderView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease];
newHeader.section = section;
[newHeader setTitle:title];
newHeader.delegate = delegate;
[newHeader setOpen:isOpen animated:NO];
return newHeader;
}
```
| UITableView custom section header appears below the cells | CC BY-SA 3.0 | 0 | 2010-12-04T18:03:14.307 | 2013-10-01T22:22:22.037 | 2013-10-01T22:22:22.037 | 307,260 | 335,974 | [
"iphone",
"objective-c",
"uitableview",
"ios"
] |
4,355,009 | 1 | 4,355,274 | null | 31 | 31,349 | Is there a way to automatically justify words using letter spacing, each in its row, to a defined width, using CSS?
For example, "Something like this" would look, well, something like this:

Is there a non-obtrusive way to apply such styling to my text? I believe pure CSS doesn't have this option (at least not with CSS versions before 3, CSS3 seems to have a `text-justify` property, but it's not well supported yet), so js solutions would be fine also.
| CSS text justify with letter spacing | CC BY-SA 2.5 | 0 | 2010-12-04T18:10:02.060 | 2021-07-01T01:27:46.373 | null | null | 69,809 | [
"css",
"justify",
"letter-spacing",
"text-justify"
] |
4,355,256 | 1 | 4,367,589 | null | 9 | 7,320 | I am trying to get Mercurial to host on IIS 7.5 (Win 7 x64) and keep running into an error I cant seem to fix.
I have followed Jeremy Skinners tutorial here: [Mercurial on IIS7](http://www.jeremyskinner.co.uk/mercurial-on-iis7/)
Instead of hgwebdir, I use hgweb as I am using Mercurial 1.7.2
I have python installed and working. I set up a IIS application for Mercurial at [http://localhost/hg](http://localhost/hg) -> in directory c:\inetpub\wwwroot\hg
I placed the templates directory into c:\inetpub\wwwroot\hg
I extracted the library.zip file into c:\inetpub\wwwroot\hg
When I visited the site, I get an error -> File "C:\inetpub\wwwroot\hg\hgweb.cgi", line 15, in from mercurial import demandimport; demandimport.enable() ImportError: No module named mercurial ".
When searching for this error, I found the following answers: [https://stackoverflow.com/questions/2123798/](https://stackoverflow.com/questions/2123798/error-setting-up-mercurial-on-windows-server-2008)
Following the accepted answer, I changed my hgweb.cgi to look like this:
```
#!c:/python/python26/python.exe
#
# An example hgweb CGI script, edit as necessary
# See also https://www.mercurial-scm.org/wiki/PublishingRepositories
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/path/to/repo/or/config"
# Uncomment and adjust if Mercurial is not installed system-wide:
import sys; sys.path.insert(0, "c:\inetpub\wwwroot\hg")
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb('c:\inetpub\wwwroot\hg\hgweb.config')
wsgicgi.launch(application)
```
After doing that, I still get the same error. I have no idea what else to do. Any help would be greatly appreciated.
Edi 1: Screen shot of c:\inetpub\wwwroot\hg as per request: 
| Mercurial and hgweb on IIS 7.5 - python error | CC BY-SA 3.0 | 0 | 2010-12-04T19:01:03.990 | 2017-06-16T15:25:10.580 | 2017-06-16T15:25:10.580 | 1,000,551 | 194,511 | [
"python",
"iis",
"mercurial",
"hgweb"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.