Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
list |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,698,000 | 1 | 5,698,046 | null | 1 | 3,639 |
When viewing my application thru Windows7 IE8, I noticed that the Font Size for H1 and H2 Tags are completely off and too large.
This causes the Titles to wrap and wrecking everything below it.
The Font Sizes are set to em and not px, and Im not sure if this is causing the issue.
font-size: 2.7em;
I have XP w/ IE8 and the application looks fine. I also checked this w/ MS Expression Superview, and it checked fine in all of the browsers.
[http://www.davincispainting.com](http://www.davincispainting.com)
In this ScreenShot the H1 & H2 Titles appear correct. However, if this is viewed with Windows7 IE8 there exists the problem.

Here are the Style Classes for H1 & H2 Tags:
```
#mid-feature h1 {
color: #FF0000;
font-family: Arial,Helvetica,sans-serif;
font-size: 2.7em;
}
#midlower-feature h2 {
color: #0C2A55;
font-family: Arial,Helvetica,sans-serif;
font-size: 2em;
/*text-align:center;*/
}
```
|
Windows 7 IE8 Font Size Issue with em
|
CC BY-SA 3.0
| 0 |
2011-04-18T02:36:46.493
|
2011-04-18T02:47:34.157
| null | null | 598,931 |
[
"html"
] |
5,698,186 | 1 | null | null | 2 | 1,542 |
I am trying to get a flatten image by normalizing my signal image by the beam profile image. The image I have is 512 by 512 unit 16 TIFF file. Here are the questions I have:
-

Assume I got a clean beam profile, the next thing I want to have is to locate every single spot and get the number of spots in the signal image. These spots in the signal image have point spread distribution over 3-5 by 3-5 pixel size. I am thinking using a dilation mask to do this job.
-

Finally, after normalized the signal image by the beam profile image,
-
Thanks for the help.
|
image normalization and extract infomation of peak position and intensity in MATLAB
|
CC BY-SA 3.0
| 0 |
2011-04-18T03:22:36.723
|
2012-08-22T20:46:37.747
|
2012-08-22T20:46:37.747
| 752,878 | 625,572 |
[
"image",
"matlab",
"image-processing"
] |
5,698,594 | 1 | 5,698,609 | null | 0 | 714 |
I have an
And I make publish it using Publishing feature in VS2008.
[Project=>Project Properties=>Publish=>Publish Now].
When I install the publish project in my own PC its working well….but at some clients PC it gives me following error message.
and don't let me install an application at that PC...
installation process stops Immediately.

|
Error Message: System Update Required
|
CC BY-SA 3.0
| null |
2011-04-18T04:42:17.870
|
2011-12-20T16:25:34.923
|
2011-04-18T04:58:09.057
| 366,904 | 468,968 |
[
".net",
"winforms",
"visual-studio",
"clickonce",
"stdole"
] |
5,698,986 | 1 | 5,752,190 | null | 5 | 1,305 |
I am drawing formatted text on canvas using `DynamicLayout`, and I need to implement some sort of zooming. I tried to use `canvas.scale(...)` for it. But when text contains highlights, text is scaled inconsistent with background, like this:

Code which draws text is very simple:
```
canvas.scale(zoom, zoom);
TextPaint textPaint = new TextPaint();
textPaint.setAntiAlias(true);
DynamicLayout layout = new DynamicLayout(text, textPaint, width,
Layout.Alignment.ALIGN_NORMAL, 1.0f, 1.0f, false);
layout.draw(canvas);
```
How to make it right way?
|
Android: Improper text scaling when draw text on canvas
|
CC BY-SA 3.0
| 0 |
2011-04-18T05:45:12.717
|
2011-04-22T04:05:32.090
| null | null | 299,137 |
[
"android"
] |
5,699,178 | 1 | 5,705,501 | null | 0 | 2,570 |
I'm using MFC (yes must be MFC and no I can't interop with .Net) to create a CFrameWnd.
My goal is to create a CFrameWnd containing a CFormView which is based on a Dialog Template that resembles something like:

I have got the frame and view to display, and I have an Edit control on there. Now what I want is to have a CToolbar aligned to the top of the Edit Text control but not docked to the top frame.
Ideally I would like to have a child frame/view that I can dynamically add in place of the Statement Group. That way I could just dock the toolbar as normal.
The thing that I find odd is that I could easily achieve this if I had a splitter in there by using the CreateView function. I really don't want to have a splitter and feel there ought to be another way.
In summary, these are the question I need help with:
- -
Now I really appreciate how easy things are in .Net.
|
MFC 10 - Is it possible to have a CFrameWnd within a CView?
|
CC BY-SA 3.0
| null |
2011-04-18T06:13:13.703
|
2011-04-18T15:48:43.613
| null | null | 367,796 |
[
"visual-studio-2010",
"visual-c++",
"mfc",
"mfc-feature-pack"
] |
5,699,318 | 1 | 5,703,015 | null | 2 | 383 |
I want to add a link in List but I'm creating list dynamically. When I click the list item, it display the detail view. For example

When I click land end it goes to detail of lands then I click coupon ,it goes to particular page, but I want set a link for save and email then I want to place the name which is in that image?
```
listItem.innerHTML = "<img src='" + image + "' class='ui-li-icon' style='height:20px; width:20px;'></img> <a href='#' data-role='button' id='" + i + "' data-theme ='c' rel='external' data-inline='true' style='margin-left:1.5em; margin-top:2px;' ><font size='2' face='Arial, Helvetica, sans-serif'>" + prodName[i] + "</font></a>";
```
|
list in jQuery mobile
|
CC BY-SA 3.0
| 0 |
2011-04-18T06:33:44.120
|
2011-10-12T11:02:02.847
|
2011-10-12T11:02:02.847
| 905,093 | 504,130 |
[
"html",
"jquery-mobile"
] |
5,699,640 | 1 | 5,708,815 | null | 31 | 61,536 |

Now it's mapped to `\\192.168.248.128`,how to change it to `\\192.168.66.2` instead?
|
How to change the path of a mapped drive in win7?
|
CC BY-SA 3.0
| 0 |
2011-04-18T07:12:28.563
|
2019-08-05T10:25:42.650
|
2011-04-18T07:34:13.590
| 218,717 | 681,256 |
[
"windows-7",
"mapping"
] |
5,699,730 | 1 | 5,699,766 | null | 2 | 1,752 |
How do you style a UILabel text like the text below (created using `titleForFooterInSection`)?

|
Style UIlabel text like the font in the Settings panel
|
CC BY-SA 3.0
| 0 |
2011-04-18T07:23:03.290
|
2011-04-18T07:59:17.263
| null | null | 196,555 |
[
"iphone",
"objective-c",
"uilabel"
] |
5,699,752 | 1 | null | null | 0 | 680 |
I want to ask that is it possible to display checkbox in result ?
|
Display checkbox in SQL Server 2008
|
CC BY-SA 3.0
| null |
2011-04-18T07:25:15.460
|
2011-04-20T19:21:50.490
|
2011-04-20T19:21:50.490
| 314,488 | 454,996 |
[
"sql-server",
"sql-server-2008"
] |
5,699,789 | 1 | 5,701,955 | null | 0 | 1,096 |
I have data structured in a hierarchical manner, that when being rendered with the TreeView control gets the output as below to the left. But I want to have the visual appearance looking more like the graph on the right (mockup).

I've tried templating the TreeView and TreeViewItem controls but can't really get anything to work as I would've hoped. Any ideas?
|
Custom TreeView template to display hiearchical data in "a flow"
|
CC BY-SA 3.0
| null |
2011-04-18T07:29:35.943
|
2011-04-18T11:07:28.147
| null | null | 115,648 |
[
"silverlight-4.0",
"treeview"
] |
5,699,823 | 1 | 5,700,075 | null | 1 | 1,052 |
I write a code to add dynamical column and row to a data set but the field is added some where in my data-set so can any one tell how can I resolve this
My code
```
for (int i = 0; i < AchDB.Amount1.Count; i++)
{
DataColumn dc = new DataColumn("Amount1");
local_ds.Tables[0].Columns.Add(dc);
local_ds.Tables[0].Rows.Add(AchDB.Amount1[i]);
}
```
I need as per in the image shown

|
How can i add the row dynamically at an exact postion in a dataset
|
CC BY-SA 3.0
| 0 |
2011-04-18T07:33:01.493
|
2011-10-12T10:52:46.563
|
2011-10-12T10:52:46.563
| 905,093 | 388,388 |
[
"c#",
"asp.net",
"dataset"
] |
5,699,983 | 1 | null | null | 8 | 24,313 |
i am trying to get data from my stored proc into my dataset. The problem is that in the dataset visualizer the actual table name ie customers or employees does not show up just Table1 , table2 etc.
Is it possible to get the actual table names?
```
using (SqlConnection sqlConnection = new SqlConnection("Data Source=myserver;Initial Catalog=Northwind;Integrated Security=True"))
{
sqlConnection.Open();
SqlDataAdapter da = new SqlDataAdapter("EXECUTE [Northwind].[dbo].[GetCustomers_Employees] ", sqlConnection);
DataSet ds = new DataSet();
da.Fill(ds);
}
CREATE PROCEDURE GetCustomers_Employees
AS
BEGIN
SELECT top 10 * from customers
select top 10 * from Employees
END
```

|
datasets with actual tablename
|
CC BY-SA 3.0
| 0 |
2011-04-18T07:51:45.297
|
2011-04-20T05:00:14.900
|
2011-04-18T08:01:52.133
| 635,608 | 603,007 |
[
"c#",
"stored-procedures",
"dataset"
] |
5,700,084 | 1 | null | null | 0 | 182 |
I will show you my project to describe what I want to know about auto generation of code files:
Here the image about the project. You can see The Point A: A dataset which has three tables inside. Then focus on the Point B.

I would like to generate the DataObjects (in the Point B). Let me introduce the data objects codes what likely to be generated:
For instance:
```
public class _BundleFlowData_SpColumns : SpColumns
{
public override IList<ColumnNames> Columns
{
get
{
return new CollectionOf<ColumnNames>()
.Add(ColumnNames.WFInstanceId)
.Add(ColumnNames.IsCustomer)
...
```
|
How To Produce The Data Classes in .NET 2.0 platform using c# : A case study to get the answer
|
CC BY-SA 3.0
| null |
2011-04-18T08:04:06.313
|
2011-04-18T08:10:25.030
| null | null | 173,718 |
[
"c#",
".net",
"t4",
"auto-generate"
] |
5,700,217 | 1 | 5,700,690 | null | 2 | 3,947 |
I have dynamically made a TableRow with an ImageButton and a TextView.
I've set a gravity on my TableRow using `TableRow.setGravity(Gravity.CENTER_VERTICAL);`
Then, on my TextView, I'm using this code
```
TextView tv = new TextView(this);
tv.setText(functie[beschrijving]);
tv.setWidth(300);
//tv.setHeight(60);
tv.setGravity(Gravity.CENTER_VERTICAL);
tv.setPadding(15, 0, 10, 0);
tr.addView(tv);
```
When I do this, I'm getting this result. It's not quite centered, it looks like the text right below the center. Does anyone know how to put the text completely in the center?

|
Can't center TextView dynamically in TableRow
|
CC BY-SA 3.0
| 0 |
2011-04-18T08:21:20.500
|
2011-04-18T10:04:34.973
| null | null | 696,892 |
[
"android",
"textview",
"center",
"tablerow"
] |
5,700,290 | 1 | 5,719,479 | null | 0 | 542 |
I've wrote perl scripts to query my network (cisco switchs) in SNMP
and I want to display informations (speed, @mac, duplex...) found by the script on an web interface.
I want a sketch of the switch, with green ports, if all is ok, orange if there is a problem, on mouse over, or on the side, the differents informations about the port.
I would like something like that :

And color of the ports dynamically change depending on the answer of the perl scripts.
Thanks, bye.
|
Perl : web graphic interface, which library?
|
CC BY-SA 3.0
| null |
2011-04-18T08:27:53.447
|
2011-04-19T16:17:38.657
|
2011-04-18T12:29:59.120
| 698,329 | 698,329 |
[
"perl",
"interface"
] |
5,700,564 | 1 | 5,705,363 | null | 5 | 687 |
Hi I'am running a debug build with optimizations and "" as debugging format. Why can't I print my dictionary to console? Have I missed something? xCode version is 4.0.2 and Iam using LLVM 2.9 svn version with GDB debugger.

|
No symbol in debugger, xCode 4
|
CC BY-SA 3.0
| 0 |
2011-04-18T08:55:36.360
|
2011-04-18T15:37:43.637
| null | null | 591,137 |
[
"iphone",
"xcode",
"debugging",
"ios4",
"gdb"
] |
5,700,864 | 1 | 5,707,730 | null | 2 | 1,481 |
In Visual Studio 2010 do you have the ability to compare the data of a database between 2 databases. I wanted to use this to copy data from one database to another. These databases have the exact same structure. But when I do a compare I see only 65 tables showing up in de DataCompare view in VS2010 but I have 66 tables in the database.
The next step was to find out which table not was showing up. The name of this table is 'CMS_PluginInstanceRouteParams'. This table is also present in both databases which I also have checked. The structure of this table is:

The FK is a relation to the PK of the CMS_PluginInstance table. The CMS_PluginInstance does show up in the Data Comparison window and the data is also compared and copied.
I also couldn't find a dialog or option where I can enter some table names to ignore.
Does anyone of you know why this table is not showing up in the list of tables in the Data Comparison window and why the data of this table not is compared.
|
Visual Studio 2010 DataCompare table comparison
|
CC BY-SA 3.0
| null |
2011-04-18T09:24:34.000
|
2015-03-05T19:32:43.410
|
2015-03-05T19:32:43.410
| 1,045,881 | 418,514 |
[
"visual-studio-2010",
"data-comparison"
] |
5,701,093 | 1 | 5,702,740 | null | 3 | 4,635 |
I am new to JavaScript, just created a cocoa app with a webView embedded which display the gmail iPhone site. What I want to do here is to schedule a timer method, then in the timer method,emulate a click on a refresh button to fire the on click event?

|
How do I emulate a click on a div then fire the onclick event in webview programmatically?
|
CC BY-SA 4.0
| null |
2011-04-18T09:47:43.553
|
2020-03-07T06:26:47.367
|
2020-03-07T06:26:47.367
| 1,033,581 | 583,003 |
[
"javascript",
"cocoa",
"webview"
] |
5,701,276 | 1 | 5,702,371 | null | 19 | 35,967 |
I'm creating a custom dropdown box, and I want to register when the mouse is clicked outside the dropdown box, in order to hide it. Is it possible to detect a click outside a control? or should I make some mechanism on the containing form and check for mouseclick when any dropdownbox is open?

|
Is there any way to detect a mouseclick outside a user control?
|
CC BY-SA 3.0
| 0 |
2011-04-18T10:04:24.263
|
2022-04-10T19:48:25.697
|
2011-04-18T11:09:32.250
| 436,802 | 436,802 |
[
"c#",
"winforms",
"user-controls",
"mouseevent"
] |
5,701,767 | 1 | null | null | 12 | 126,825 |
I developed an applicatin using Visual Studio.Net 2008 Team System with Infragistics Net Advantage Tools 2010.3 and made a Setup Exe file for my application and installed on client machines where they have both Windows7 32 bit and WindowsXP Service Pack 2. ( I have also tried both way by Setup Property TargetPlatform x86 and x64)
But when i install and run this application (exe) file in development machine its installed and run correctly. Only on Client's machine its installed correctly but not running, giving the error when double clicking on the exe file.

The Complete Error is following:
Description:
Stopped working
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: al-deihani.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 4dac0949
Problem Signature 04: Al-Deihani
Problem Signature 05: 1.0.0.0
Problem Signature 06: 4dac0949
Problem Signature 07: 47
Problem Signature 08: c6
Problem Signature 09: System.InvalidOperationException
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Read our privacy statement online:
[http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409](http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409)
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
|
Windows Application has stopped working :: Event Name CLR20r3
|
CC BY-SA 3.0
| 0 |
2011-04-18T10:48:16.637
|
2014-09-08T03:23:45.050
|
2013-12-13T03:14:32.803
| 521,364 | 625,031 |
[
".net",
"vb.net",
"invalidoperationexception"
] |
5,701,785 | 1 | 9,890,213 | null | 3 | 2,069 |
my app need to show user scrollable menu bar under tab bar like fox news app. Please let me know if any one has the solution.

|
Android : Scrollable Menu Bar Like Fox News App
|
CC BY-SA 3.0
| 0 |
2011-04-18T10:50:14.530
|
2012-03-27T13:12:00.253
|
2011-04-19T03:49:22.693
| 501,859 | 501,859 |
[
"android-layout"
] |
5,701,903 | 1 | null | null | 0 | 534 |
i have trivial mapping for two entities: poll and polloption
```
public class PollMap : ClassMap<Poll>
{
public PollMap() {
Id(x => x.Id);
Map(x => x.Content);
HasMany(x => x.PollOptions).Cascade.All();
}
}
```
```
public class PollOptionMap : ClassMap<PollOption>
{
public PollOptionMap() {
Id(x => x.Id);
Map(x => x.Content);
References(x => x.Poll);
}
}
```
in test code im trying to remove the first polloption of poll entity
```
[Transaction]
public ActionResult Add() {
var poll = new Poll() {
Content = "poll",
PollOptions = new List<PollOption>() {
new PollOption(){
Content="PollOption#1"
},
new PollOption(){
Content="PollOption#2"
}
}
};
GetSession.Save(poll);
return Content("Added");
}
[Transaction]
public ActionResult Removed() {
var poll = GetSession.Query<Poll>().FirstOrDefault();
poll.PollOptions.RemoveAt(0);
GetSession.Update(poll);
return Content("Updated");
}
```
when the remove action fired it not deleting polloption from db instead it set null in my foreign key :(

ps. google not helped
|
NHibernate and HasMany mapping
|
CC BY-SA 3.0
| null |
2011-04-18T11:02:19.843
|
2016-01-08T09:15:04.427
| null | null | 2,246,271 |
[
"asp.net-mvc",
"nhibernate",
"fluent-nhibernate",
"mapping"
] |
5,702,150 | 1 | 7,426,890 | null | 0 | 678 |
All,
When I use the Directions-service from Google Maps, it seems like the map always goes to zoom level 0 (I get an overview of the whole map).
When I set the code for the directions in comment, the zoom level is working well.
This is my code:
```
/**
* Update route
*/
updateRoute: function ()
{
// route
var start = "Belgium";
var end = "France";
var request =
{
origin:start,
destination:end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
var directionsDisplay = new google.maps.DirectionsRenderer();
var directionsService = new google.maps.DirectionsService();
directionsDisplay.setMap(this.items.items[0].map);
directionsService.route(request, function(response, status)
{
if (status == google.maps.DirectionsStatus.OK)
{
directionsDisplay.setDirections(response);
}
});
}
```
This is what I get:

Hopefully someone can help me with this?
Thanks in advance!
|
Sencha directions zoom
|
CC BY-SA 3.0
| null |
2011-04-18T11:27:12.933
|
2011-09-15T06:48:33.553
|
2011-04-18T11:46:10.543
| 363,448 | 363,448 |
[
"google-maps",
"zooming",
"sencha-touch"
] |
5,702,975 | 1 | 5,703,756 | null | 1 | 298 |
I have implemented the [official Spinner tutorial](http://developer.android.com/resources/tutorials/views/hello-spinner.html), but when I run it, the spinner widget is malformed, I have attached this screenshot:

If instead of filling the spinner from code, I use the android:entries in the XML, the widget shows correctly.
Anyone knows why?
EDIT: [Here](http://pastebin.com/CE6Qum1L) is my code. And [here](http://pastebin.com/tP44Pe1W) is the code for main.xml and strings.xml
EDIT2: Ok, now I remember that my code was not extracted from the tutorial, but from the SDK samples directory, so the tutorial is fine, but not the SDK sample.
|
Spinner tutorial shows a malformed spinner widget
|
CC BY-SA 3.0
| null |
2011-04-18T12:36:08.473
|
2011-04-18T13:50:28.197
|
2011-04-18T13:50:28.197
| 267,705 | 267,705 |
[
"android"
] |
5,702,974 | 1 | 5,740,221 | null | 4 | 1,876 |
100 periods have been collected from a 3 dimensional periodic signal. The wavelength slightly varies. The noise of the wavelength follows Gaussian distribution with zero mean. A good estimate of the wavelength is known, that is not an issue here. The noise of the amplitude may not be Gaussian and may be contaminated with outliers.
Time-series, ARMA, ARIMA, Kalman Filter, autoregression and autocorrelation seem to be keywords here.
I have no idea how time-series models work. Are they prepared for varying wavelengths? Can they handle non-smooth true signals? If a time-series model is fitted, can I compute a 'best estimate' for a single period? How?
A related question is [this](https://stackoverflow.com/q/2572444/341970). Speed is not an issue in my case. Processing is done off-line, after all periods have been collected.
I am measuring acceleration during human steps at 200 Hz. After that I am trying to double integrate the data to get the vertical displacement of the center of gravity. Of course the noise introduces a HUGE error when you integrate twice. I would like to exploit periodicity to reduce this noise. Here is a crude graph of the actual data (y: acceleration in g, x: time in second) of 6 steps corresponding to 3 periods (1 left and 1 right step is a period):

My interest is now purely theoretical, as [http://jap.physiology.org/content/39/1/174.abstract](http://jap.physiology.org/content/39/1/174.abstract) gives a pretty good recipe what to do.
|
How to exploit periodicity to reduce noise of a signal?
|
CC BY-SA 3.0
| 0 |
2011-04-18T12:36:03.480
|
2011-04-27T13:23:45.163
|
2017-05-23T12:30:36.930
| -1 | 341,970 |
[
"c++",
"r",
"matlab",
"signal-processing",
"fft"
] |
5,703,013 | 1 | 5,705,520 | null | 9 | 3,057 |
I have a large set of plant images labeled with the botanical name. What would be the best algorithm to use to train on this dataset in order to classify an unlabel photo? The photos are processed so that 100% of the pixels contain the plant (e.g. either closeups of the leaves or bark), so there are no other objects/empty-space/background that the algorithm would have to filter out.
I've already tried generating [SIFT](http://en.wikipedia.org/wiki/Scale-invariant_feature_transform) features for all the photos and feeding these (feature,label) pairs to a [LibLinear](http://www.csie.ntu.edu.tw/~cjlin/liblinear/) SVM, but the accuracy was a miserable 6%.
I also tried feeding this same data to a few [Weka](http://www.cs.waikato.ac.nz/ml/weka/) classifiers. The accuracy was a little better (25% with Logistic, 18% with IBk), but Weka's not designed for scalability (it loads everything into memory). Since the SIFT feature dataset is a several million rows, I could only test Weka with a random 3% slice, so it's probably not representative.
EDIT: Some sample images:


|
Large Scale Image Classifier
|
CC BY-SA 3.0
| 0 |
2011-04-18T12:39:30.927
|
2018-12-01T16:15:28.180
|
2011-04-18T17:13:01.147
| 247,542 | 247,542 |
[
"image-processing",
"machine-learning",
"classification"
] |
5,703,153 | 1 | 5,704,390 | null | 0 | 3,106 |
I'm trying to create a DatePicker that slides in over a TableView in order to edit a date-field. The problem is that the DatePicker appears behind the TableView - you can see a part of it because the TableView is transparent.

I tried giving one a higher zIndex value than the other, both ways, but that didn't help. The datepicker is a picker control in a view, which I slide up with an animation.
How does one overlay a TableView with a different view?
Edit: the table is quite complicated because of the various types of data in it, so copy&paste would be overkill. But here's the relevant part:
```
var win = Ti.UI.createWindow();
var table = Ti.UI.createTableView({zIndex: 1});
// some table sections are added here
// create picker layer
var row = Ti.UI.createTableViewRow({zIndex: 2});
var picker_view = Titanium.UI.createView({
height: 251,
bottom: -251,
zIndex: 3,
visible: false
});
var picker = Ti.UI.createPicker({
type: Ti.UI.PICKER_TYPE_DATE,
selectionIndicator: true
});
picker_view.add(picker);
row.addEventListener('click', function()
{
picker_view.visible = true;
var slide_in = Titanium.UI.createAnimation({bottom:0});
picker_view.animate(slide_in);
});
row.add(picker_view);
some_section.add(row);
win.add(table);
```
Thanks!
|
Create an overlay for Titanium Mobile TableView
|
CC BY-SA 3.0
| null |
2011-04-18T12:50:51.707
|
2011-04-18T14:28:22.330
|
2011-04-18T13:41:52.210
| 682,583 | 682,583 |
[
"mobile",
"datepicker",
"overlay",
"titanium",
"tableview"
] |
5,703,192 | 1 | 5,703,345 | null | 0 | 433 |
Is it possible to do something like what is shown below using an Alert with a UITableView? If so, how can it be done?

|
Alert with UITableView
|
CC BY-SA 3.0
| null |
2011-04-18T12:53:53.340
|
2015-04-01T09:41:00.187
|
2015-04-01T09:41:00.187
| 3,766,168 | 673,352 |
[
"iphone",
"objective-c"
] |
5,703,825 | 1 | 6,159,829 | null | 48 | 12,322 |
I just added a standard "" dialog to a small desktop app I'm writing, based on the [JFileChooser entry of the Swing Tutorial](http://download.oracle.com/javase/tutorial/uiswing/components/filechooser.html). It's generating a window that looks like this:

but I would prefer to have a window that looks like this:

In other words, I want my file chooser to have Windows Vista/Windows 7's style, not Windows XP's. Is this possible in Swing? If so, how is it done? (For the purposes of this question, assume that the code will be running exclusively on Windows 7 computers.)
|
Does Swing support Windows 7-style file choosers?
|
CC BY-SA 3.0
| 0 |
2011-04-18T13:46:03.030
|
2017-06-13T09:24:41.637
| null | null | 122,607 |
[
"java",
"swing",
"filechooser"
] |
5,703,791 | 1 | 5,704,007 | null | 1 | 515 |
I'm working on a project which involves scraping from the major search engines (to be more specific - checking page rank and finding similar pages). With curl I'm calling the search engine, then with a single I'm getting all of the results in an array. I don't have any problems with Google and Bing, but when I wrote the script for Yahoo it worked, but it has a bug.
I'm testing with search for "autobedrijf" in the Netherlands. I have 100 results on the page, but I end up with only 74 of them in the result array. I copied the regex to [this tool](http://gskinner.com/RegExr/), inserted the Yahoo's page source and there it matches all the 100 results.
These are from Yahoo:

but in the array I'm getting:
-ledensite
-Home Page
-Welkom bij autobedrijf Tolsma Exmorra
-etc.
Which means that after "Home Page" it skips 3 results. I tried to find any difference between results 5 and 6 (the last skipped and the next one), but I didn't find any reason not to match the 5th one.
This is the script:
```
$pattern = '@<div>\s*<h3>\s*<a[^<>]*\shref="([^*"]*\*\*)*([^<>]*)">
([^<>]*(<b>[^<>]*</b>)*[^<>]*(<wbr>)*[^<>]*)</a>\s*</h3>\s*</div>@siU';
preg_match_all($pattern, $result['EXE'], $matches);
```
The Yahoo page source for those two results looks like this:
```
<li><div class="res"><div><h3><a dirtyhref="http://nl.wrs.yahoo.com
/_ylt=A7x9Qb3rKqxN1XYA1PhzKAx.;_ylu=X3oDMTBydXF0bjc3BHNlYwNzcgR
wb3MDNQRjb2xvA2lyZAR2dGlkAw--/SIG=11n0lgcgp/EXP=1303157611/**http%3a
//www.autobedrijfgreijmans.nl/" class="yschttl spt"
href="http://nl.wrs.yahoo.com/_ylt=A7x9Qb3rKqxN1XYA1PhzKAx.;
_ylu=X3oDMTBydXF0bjc3BHNlYwNzcgRwb3MDNQRjb2xvA2lyZAR2dGlkAw--/SIG
=11n0lgcgp/EXP=1303157611/**http%3a//www.autobedrijfgreijmans.nl/">
<b>Autobedrijf</b> Greijmans Weert - Toyota <wbr>Specialist Occasions
APK</a></h3></div><div class="abstr">In het databestand van
<b>Autobedrijf</b> Greijmans vindt u zeer eenvoudig tweedehands auto's,
bedrijfswagens, klassiekers. Kijk snel op onze website</div><span
class="url">www.<b>autobedrijfgreijmans.nl</b></span> - <a
href="http://nl.wrs.yahoo.com/_ylt=A7x9Qb3rKqxN1XYA1fhzKAx./SIG=
186dh8afd/EXP=1303157611/**http%3a//74.6.239.67/search/cache%3fei=
UTF-8%26p=autobedrijf%26n=100%26va_vt=any%26vo_vt=any%26vp_vt
=any%26vst=0%26vf=all%26vm=p%26u=www.autobedrijfgreijmans.nl/
%26w=autobedrijf%26d=IxshPvbJWijU%26icp=1%26.intl=nl%26sig=yI6R7vJN31J
T92YKlVnT1g--">In de cache</a></div></li>
<li><div class="res"><div><h3><a dirtyhref="http://nl.wrs.yahoo.com
/_ylt=A7x9Qb3rKqxN1XYA1vhzKAx.;_ylu=X3oDMTBybWh0ZnN2BHNlYwNzcgRwb3MDNg
Rjb2xvA2lyZAR2dGlkAw--/SIG=11l17c21h/EXP=1303157611/**http%3a//www.
autobedrijf-tolsma.nl/" class="yschttl spt" href="http://www.autobedrijf
-tolsma.nl/">Welkom bij <b>autobedrijf</b> Tolsma Exmorra</a></h3></div>
<div class="abstr">Welkom op de vernieuwde website van <b>autobedrijf</b>
Tolsma Exmorra incl.digitale showroom <b>...</b> Welkom bij <b>autobedrijf
</b> tolsma. Op deze site nodigen wij U uit een <b>...</b></div><span
class="url">www.<b>autobedrijf-tolsma.nl</b></span> - <a href="http://nl.
wrs.yahoo.com/_ylt=A7x9Qb3rKqxN1XYA1_hzKAx./SIG=1840la9c5/EXP=1303157611/
**http%3a//74.6.239.67/search/cache%3fei=UTF-8%26p=autobedrijf%26n=100
%26va_vt=any%26vo_vt=any%26vp_vt=any%26vst=0%26vf=all%26vm=p%26u=
www.autobedrijf-tolsma.nl/%26w=autobedrijf%26d=YBZQIvbJWlDf%26icp=1%26.
intl=nl%26sig=zRU95PdBOTfII93dZ411ZA--">In de cache</a></div></li>
```
I'm stuck on that for more than 5 hours already and I can't figure out why `preg_match_all`.
If it matters - I'm testing on Windows with Apache and PHP 5.3.5.
Any advices are welcome, I can provide extra examples and testing code if you're interested.
|
PHP preg_match_all matches 74 out of 100 matches
|
CC BY-SA 3.0
| null |
2011-04-18T13:43:07.527
|
2011-04-18T14:02:08.263
| null | null | 538,905 |
[
"php",
"regex",
"web-scraping",
"preg-match-all"
] |
5,703,974 | 1 | null | null | 3 | 725 |
Before anyone asks, I have already search existing questions and found [this question](https://stackoverflow.com/questions/776950/javascript-undefined-undefined), but the answer was that `undefined` was being set to `null`, which is not the case here.
Here is my code:
```
check_availability = function () {
var value = $('#contact_type').val();
if (value !== undefined) {
// do some stuff
}
}
```
Simple huh? I have a `<select id="contact_type"></select>` with options populated via ajaxy stuff. Initially the options list is empty, so the jQuery val() returns `undefined`.
So far so good.
Except that the code within the `if` block always executes. I stick a breakpoint in FireBug on the 3rd line and I get this:

Can anyone tell me what's going on?
P.S. This is Firefox 4.0
---
I know there are a number of ways I can achieve the same result, I'm more interested in why value is undefined according to FireBug, but then is !== undefined.
|
Crazy javascript problem: undefined actually !== undefined!
|
CC BY-SA 3.0
| 0 |
2011-04-18T13:58:45.030
|
2011-04-19T08:58:40.467
|
2017-05-23T10:30:23.117
| -1 | 136,166 |
[
"javascript",
"jquery",
"undefined"
] |
5,704,105 | 1 | null | null | 0 | 606 |
I look in my menu entry for :
> add an extension location

but I do not find I'm using Eclipse Galileo
Thank you
|
Add an extension location entry in Eclipse Galileo
|
CC BY-SA 3.0
| null |
2011-04-18T14:09:52.373
|
2011-04-18T14:49:09.157
|
2011-04-18T14:22:32.133
| 296,635 | 296,635 |
[
"eclipse",
"eclipse-3.5"
] |
5,704,138 | 1 | 5,717,756 | null | 6 | 1,779 |
Is there a suggested way to create a paging UIScrollView that has pages wider than the bounds of the UISrollView?
I would need something like this.

normal scrolling within page2 and paging mode with the "rubberband" effect on the edges of the pages.
The paging effect looks a bit complicated for me, if you flick fast you go to the next page, if you slide slow you see the new page at the edge and only after a certain point the page is changed.
Maybe somebody can shed some light on the way to handle this, is this even possible with the sole use of UIScrollViewDelegate methods or do I have to subclass?
|
How to create a paging UIScrollView with "oversized" pages
|
CC BY-SA 3.0
| 0 |
2011-04-18T14:11:58.737
|
2014-07-03T15:19:28.297
| null | null | 457,406 |
[
"iphone",
"uiscrollview",
"uiscrollviewdelegate"
] |
5,704,284 | 1 | 5,704,466 | null | 0 | 297 |
```
-(void)textFieldDidEndEditing:(UITextField *)textField{
[textInfo resignFirstResponder];
[self.navigationController setNavigationBarHidden:NO animated:YES];
informationTableView *informationtableView = [[informationTableView alloc] initWithNibName:@"informationTableView"bundle:nil];
UIView* MyView = informationtableView.view;
MyView.frame = CGRectMake(12.0f, 35.0f, 260.0f, 56.0f);
[self.view addSubview:MyView];
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Choisir" message:@"this gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets coveredthis gets covered" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[myAlertView addSubview:MyView];
[myAlertView show];
[myAlertView release];
```
}

The problem is that the TableView is not controled by the frame. I'd like to get the tableView inside the Alert. How can I achieve this?
|
Problem in CGRectMake for TAbleView in AlertView
|
CC BY-SA 3.0
| null |
2011-04-18T14:22:12.593
|
2011-04-18T14:33:52.830
|
2011-04-18T14:27:15.997
| 635,608 | 673,352 |
[
"iphone",
"objective-c"
] |
5,704,427 | 1 | 5,704,446 | null | 5 | 1,316 |
Can anyone explain to me how an a member of this enum takes a value of `0`?
```
public enum EnumLogicalOperator
{
And = 1,
Or = 2
}
```

---

---

|
How can a variable typed as an enum take a value that is out of range of its elements?
|
CC BY-SA 3.0
| null |
2011-04-18T14:31:13.807
|
2011-04-18T14:50:20.693
|
2011-04-18T14:50:20.693
| 366,904 | 322,355 |
[
"c#",
".net",
"enums",
"default-value"
] |
5,704,506 | 1 | null | null | 0 | 176 |
when clicking through images on my site, I'd like to have an intermediate image appear (in this case, a graphical shape). This graphical shape should appear fully on-click and then fade out, with the 2nd image fading in. When you click on that image, another graphical shape appears, fades out and so on.
I've made a litte simulation here so it's easier to understand what I mean:

[http://ou812.bplaced.net/inbetweenfading/crossfade_with_intermediate.gif](http://ou812.bplaced.net/inbetweenfading/crossfade_with_intermediate.gif)
The gif doesn't repeat so refresh to see the effect again.
I suppose jQuery is the tool of choice. Is there an existing plugin that I can use or modify?
Grateful for any advice!
|
intermediate image in between interactive slideshow (jQuery?)
|
CC BY-SA 3.0
| null |
2011-04-18T14:36:54.547
|
2011-12-03T00:03:59.480
|
2011-12-03T00:03:59.480
| 234,976 | 713,589 |
[
"javascript",
"jquery",
"css"
] |
5,704,651 | 1 | 5,705,389 | null | 4 | 14,634 |
I have a ASP.NET DropDownList, which I data-bind to a list of objects, and then it throws an exception. This error is driving me nuts, because the message is wrong, and the value clearly exist in the list of items, as shown by the screenshot:

Here's the relevant ASP.NET markup:
```
<asp:DropDownList ID="_ddlRequests" runat="server" AppendDataBoundItems="true" DataTextField="RequestNumber" DataValueField="RequestNumber">
<asp:ListItem Text="" Value="" />
</asp:DropDownList>
```
|
DropDownList "has a SelectedValue which is invalid because it does not exist in the list of items"
|
CC BY-SA 3.0
| 0 |
2011-04-18T14:46:44.080
|
2012-09-23T07:33:17.453
| null | null | 287,185 |
[
"asp.net",
"data-binding"
] |
5,704,725 | 1 | null | null | 8 | 2,367 |
I would like to create a plot like this with ggplot2:

(I made a small error here that caused not all labels to show up. obviously I do want all labels to show up :) )
However, my Google search didn't turn up anything. The closest I got was with barNest from plotrix, however, I don't like the quality of the graphs that are produced. The ggplot2 ones look a lot better.
In the ideal case, I would have expected to be able to do something like this:
scale_x_discrete("Axis Title", labels=Level1+Level2+Level3)
And then Level1, Level2 and Level3 would have been columns of the data frame that was used in the qplot function.
If I can get this to work, I want to create a function to add this type of functionality to the scales function. Maybe scale_x_hierarchical would be better.
Similar data can be generated with the following code:
```
data <- data.frame(
Subject = c(rep(1, 48), rep(2, 48), rep(3, 48), rep(4, 48)),
month = rep(c(rep(1, 12), rep(4, 12), rep(7, 12), rep(10, 12)), 4),
day = rep(c(rep(1, 4), rep(11, 4), rep(21, 4)), 16),
hour = rep(c(0, 6, 12, 18), 48),
data = rnorm(192))
```
By the way, the image used here is created with Spotfire.
|
How to show a hierarchical structure on the axis labels with ggplot2?
|
CC BY-SA 3.0
| 0 |
2011-04-18T14:52:11.333
|
2011-11-27T19:13:25.433
|
2011-04-26T14:44:01.210
| 392,445 | 392,445 |
[
"r",
"ggplot2"
] |
5,704,777 | 1 | 5,718,521 | null | 2 | 1,631 |
I am using .
My data grid control has got one column with `FieldName=PropA`. Using `DisplayMemberBindingInfo` I convert its value to another class object with two properties in it . Inside `CellContentTemplate` I use property as cell content and property as background color of that cell. I am not able to understand how should I create FilterCell for this column so that I would be able to filter rows on cell . Does `Converted Class` need to implement any interface for this?

|
XCeed WPF DataGrid: FilterCell for a specific property of converted value
|
CC BY-SA 3.0
| 0 |
2011-04-18T14:55:44.980
|
2011-04-19T15:05:36.467
| null | null | 212,823 |
[
"wpf",
"binding",
"wpfdatagrid",
"xceed-datagrid"
] |
5,704,825 | 1 | null | null | 0 | 706 |
Is it possible to add an instance name to the history of Business Objects?
I want to see the following columns: Time, Instance Name, Run by, Parameters, Format, Status, Reschedule, Selected

|
Business Objects History
|
CC BY-SA 3.0
| null |
2011-04-18T14:58:58.600
|
2014-05-19T08:28:16.363
| null | null | 538,029 |
[
"business-objects",
"business-objects-sdk"
] |
5,705,053 | 1 | 5,706,502 | null | 1 | 425 |
We have a jqGrid that shows the search box above the grid at all times. The report that shows is controlled by a dropdown. If the user changes reports, we reset the grid programmatically.If the user navigates to a grid record and then returns to the grid page, or if the user refreshes the grid page, we restore the search criteria from the session. This also works. But, if we refresh or come back, the grid is adding a new search row. See the screenshot. The actual search criteria was that Last Name contained 'Jet'. But, the grid added a blank row to search on 'id'. If I refresh again, it does not continue to add more rows - only the one empty one. I need to prevent it from adding the new row.

|
How do I prevent JqGrid from adding another search filter row?
|
CC BY-SA 3.0
| null |
2011-04-18T15:16:25.677
|
2011-04-18T17:22:48.407
| null | null | 56,830 |
[
"search",
"jqgrid"
] |
5,705,058 | 1 | null | null | 1 | 5,002 |

Though after verifying it I found `reassembled TCP segments` are the same as `Hypertext Transfer Protocol + Line-based text data`,but does wireshark count them twice?
|
Watching http in wireshark,what's the relation between reassembled TCP vs. Hypertext Transfer Protocol + Line-based text data?
|
CC BY-SA 3.0
| null |
2011-04-18T15:16:33.123
|
2011-04-18T15:26:31.427
| null | null | 636,393 |
[
"wireshark",
"http-protocols"
] |
5,705,243 | 1 | 5,706,674 | null | 9 | 4,248 |
I'd like to display a directed circular arc in Mathematica, using something as simple as `Arrow`. The best I have been able to come up with is this example that nails an `Arrow` onto one end of a circular arc. But I suspect there is a more direct way to achieve the same effect.
```
start=\[Pi];
Manipulate[
Graphics[{
Arrow[{{Cos[\[Theta] + If[\[Theta] < start, .01, -.01]],
Sin[\[Theta] + If[\[Theta] < start, .01, -.01]]},
{Cos[\[Theta]], Sin[\[Theta]]}}],
Circle[{0, 0}, 1, {start, \[Theta]}]},
PlotRange -> 2],
{{\[Theta], .7 start}, 0, 2 start}
]
```

`Arrow` accepts `BSplineCurves` and `BezierCurves`but I can't get them to stay on a circular arc. `Tube` accepts the formula for a curve in 3D but I can't figure out how to get it to work in 2D.
All suggestions are welcome. If your solution works for , all the better!
---
### Epilogue:
I learned quite a bit from the suggestions:
Mark McClure showed that `Arrow` itself can handle the demands when given a list of points.
yoda gave a fairly general solution using ParametricPlot.
I ended up finding belisarius' suggestions the most helpful. His approach was to work on minor variations of familiar graphical objects. In the end, I cautiously chose to define a new object, `arcArrow`, that employs the parameters of `Circle`: center, radius, {start,finish}. `Unprotect` still scares me! Anyway, here's what I settled with. I also stubbornly held on to some features of my original approach.
```
Manipulate[
Graphics[{
arcArrow[center, radius, {start, end}],
PointSize[Large], Blue, If[showCenter, Point[center]]},
PlotRange -> p, ImageSize -> 250],
{{start, \[Pi]/2}, -2 \[Pi], 2 \[Pi], ImageSize -> Small},
{{end, 0}, -2 \[Pi], 2 \[Pi], ImageSize -> Small},
{{radius, 1}, 1/2, 4, ImageSize -> Small},
{{center, {0, 0}}, {-p, -p}, {p, p}, Slider2D},
{showCenter, {True, False}},
Initialization :> {p = 3;
arcArrow[a_, r_, {start_, end_}] :=
{Circle[a, r, {start, end}],
Arrowheads[Medium],
Arrow[{a + r {Cos[end + If[end < start, .01, -.01]],
Sin[end + If[end < start, .01, -.01]]},
a + r {Cos[end], Sin[end]}}]} }]
```

---
|
How can I make a directed arc of a circle (or a directed curve)?
|
CC BY-SA 3.0
| 0 |
2011-04-18T15:30:04.233
|
2011-06-14T19:45:25.180
|
2011-06-14T19:44:25.680
| 102,937 | 638,130 |
[
"geometry",
"wolfram-mathematica"
] |
5,705,351 | 1 | null | null | 14 | 770 |
I have a project to detect and count seal cubs (the animal) in an aerial image which is taken from beach. The seal cubs are black and small compared to adult seals which are brown and large.
Some seal cubs are overlapped/partly occluded. The beach color is near yellow however there're some black rocks that increase the detection difficulty.
What kind of descriptor is most suitable for my project? HOG, SIFT, Haar-like features?
I'm asking for the theory part of this problem. I think to implement my project, the first step should be choose correct descriptor that can most represent the object, then (combine several weak features, not necessary?) train a classifier using machine learning method like boosting/SVM/neural_network, am I right?
Sample image:

|
What kind of descriptor should I use for seal cub detection?
|
CC BY-SA 3.0
| 0 |
2011-04-18T15:36:46.287
|
2013-10-26T18:51:58.323
|
2013-10-26T18:51:58.323
| 411,022 | 713,611 |
[
"opencv",
"image-processing",
"computer-vision",
"object-detection"
] |
5,705,781 | 1 | 5,705,829 | null | 2 | 4,848 |
I'm trying to add a horizontal line between two EditText widgets, but strangely the line has no padding at the bottom, so it appears "glued" to the widget that is below it.
This is my code (in the layout.xml, inside a LinearLayout with vertical orientation):
```
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:capitalize="sentences"
android:singleLine="true"
android:maxLength="30" />
<View android:background="#FF00FF00"
android:layout_width="fill_parent"
android:layout_height="1dip" />
<EditText android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:scrollbars="vertical"
android:capitalize="none"
android:autoLink="all"
android:maxLines="8" />
```
And this is how it looks like:

I'd like to add some padding below the line. I tried with android:paddingBottom in the View widget, and with android:paddingTop in the below EditText widget, but the result is the same (it's ignored).
|
Horizontal line padding
|
CC BY-SA 3.0
| null |
2011-04-18T16:13:20.337
|
2011-04-18T16:20:04.503
| null | null | 267,705 |
[
"android"
] |
5,706,032 | 1 | 5,706,089 | null | 2 | 738 |
I'm not sure if is the correct term, but the feature I'm referring to is shown in the 1st image below, versus the 2nd one which does not have an expandable tree list node for the code behind file.
1. Folding:

1. No folding:

My questions are:
1. What is the correct name of this feature?
2. How do I set it?
3. Why does my Solution Explorer not have this feature enabled when I try to convert my Web Site Project to a Web Application Project?
References:
- [Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application](http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx)
Thanks Sean, but as you can see below, my `Nest Related Files` button does show up in this project for some reason:

Should have button shown below:

I figured out the reason: I accidentally created a C# Web Application Project, and then added VB ASP.NET files to it.
|
Problem with file name folding in Visual Studio Solution Explorer ("File Nesting")
|
CC BY-SA 3.0
| null |
2011-04-18T16:37:11.290
|
2022-05-03T18:35:53.167
|
2011-09-26T14:29:32.390
| 41,956 | 287,311 |
[
"visual-studio",
"visual-studio-2005",
"web-application-project"
] |
5,706,176 | 1 | 5,706,360 | null | 2 | 837 |
I'm not sure if I'm using the correct terminology to describe my questions so I created a few mock ups to try to show what I am trying to do.
I have an existing table listing order detail information that looks something like this:

I have some additional attributes I want to add columns for, but I would like it to appear on a separate line as part of the same row sort of like this:

The reason I want to add these columns but have them appear on the second line of each row is that I want to display more data in each row but I don't want to make the row/page wider.
I did some googling for this problem, but I'm not even sure what the standard name for this type of display is so I wasn't able to come up with anything. The closest I found was [this code project link]([http://www.codeproject.com/KB/webforms/MasterDetail.aspx](http://www.codeproject.com/KB/webforms/MasterDetail.aspx)
) which is close to, but not the same thing I am trying to do.
|
Is it possible to create a table with a multi-level row using ASP.NET GridView or other control
|
CC BY-SA 3.0
| null |
2011-04-18T16:51:45.337
|
2012-03-02T16:57:09.597
| null | null | 648,900 |
[
"asp.net"
] |
5,706,203 | 1 | 5,739,505 | null | 3 | 7,020 |
I have the below UML activity diagram for a shopping cart use case. It has several decision and fork nodes but there are no corresponding join/merge nodes. Could you please show me:
- -
Thank you.

|
How to merge decision/fork nodes in UML
|
CC BY-SA 3.0
| null |
2011-04-18T16:54:02.610
|
2019-10-06T11:45:21.957
| null | null | 8,203 |
[
"uml",
"activity-diagram"
] |
5,706,293 | 1 | 5,706,326 | null | 0 | 117 |
I am getting following error while installing the application on my device. I have given correct application identifier in Entitlement.plist. See the attached snapshot of the error coming in. Any clue?

|
Error while running the iPhone app on device
|
CC BY-SA 3.0
| null |
2011-04-18T17:01:45.570
|
2011-04-18T17:14:23.247
| null | null | 418,029 |
[
"iphone",
"cocoa-touch",
"xcode",
"ios",
"code-signing-entitlements"
] |
5,706,678 | 1 | null | null | 2 | 377 |

Are there any RIA libraries/toolkits/frameworks that supports a control similar to the above?
I need a slider control to select a range of data.
|
Slider control to select a range of data
|
CC BY-SA 3.0
| 0 |
2011-04-18T06:25:30.360
|
2012-11-28T15:42:31.733
|
2011-04-19T04:52:27.063
| 157,705 | 157,705 |
[
"graph",
"controls",
"ria",
"web-applications"
] |
5,706,916 | 1 | null | null | 0 | 1,605 |
I am using a .NET Menu control that I build dynamically. Some MenuItems are set to:
```
javascript:window.open('{0}{1}','_blank','');
```
because I want these menu items to be opened in a new (popup) window. Example:
```
javascript:window.open('http://google.com','_blank','');
```
Without setting MenuItem.Target, this results in a new window with Google it, and my current window gets set to a content value of "null". The HTML source of the window is "null" - that's it.
If I set MenuItem.Target = "_blank" (it doesn't seem to matter what the value is), my base window is preserved, but I get a third window with contents = "null".

I am sure this is pretty simple, but I have tried all the permutations I can come up with.
|
MenuItem.NavigateUrl = Javascript results in opening two window, one null
|
CC BY-SA 3.0
| null |
2011-04-18T17:59:59.857
|
2011-04-19T14:54:33.940
|
2011-04-19T14:54:33.940
| 95,306 | 95,306 |
[
"javascript",
"menuitem",
"popupwindow",
"window.open"
] |
5,707,250 | 1 | 5,707,388 | null | 36 | 3,635 |
I'm working on a terrain generation algorithm for a MineCraft-like world. Currently, I'm using simplex noise based on the implementation in the paper ['Simplex Noise Demystified' [PDF]](http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf), since simplex noise is supposed to be faster and to have fewer artifacts than Perlin noise. This looks fairly decent (see image), but so far it's also pretty slow.

Running the noise function 10 times (I need noise with different wavelengths for things like terrain height, temperature, tree location, etc.) with 3 octaves of noise for each block in a chunk (16x16x128 blocks), or about 1 million calls to the noise function in total, takes about 700-800 ms. This is at least an order of magnitude too slow for the purposes of generating terrain with any decent kind of speed, despite the fact that there are no obvious expensive operations in the algorithm (at least to me). Just floor, modulo, some array lookups and basic arithmetic. The algorithm (written in Haskell) is listed below. The SCC comments are for profiling. I've omitted the 2D noise functions, since they work the same way.
```
g3 :: (Floating a, RealFrac a) => a
g3 = 1/6
{-# INLINE int #-}
int :: (Integral a, Num b) => a -> b
int = fromIntegral
grad3 :: (Floating a, RealFrac a) => V.Vector (a,a,a)
grad3 = V.fromList $ [(1,1,0),(-1, 1,0),(1,-1, 0),(-1,-1, 0),
(1,0,1),(-1, 0,1),(1, 0,-1),(-1, 0,-1),
(0,1,1),( 0,-1,1),(0, 1,-1),( 0,-1,-1)]
{-# INLINE dot3 #-}
dot3 :: Num a => (a, a, a) -> a -> a -> a -> a
dot3 (a,b,c) x y z = a * x + b * y + c * z
{-# INLINE fastFloor #-}
fastFloor :: RealFrac a => a -> Int
fastFloor x = truncate (if x > 0 then x else x - 1)
--Generate a random permutation for use in the noise functions
perm :: Int -> Permutation
perm seed = V.fromList . concat . replicate 2 . shuffle' [0..255] 256 $ mkStdGen seed
--Generate 3D noise between -0.5 and 0.5
simplex3D :: (Floating a, RealFrac a) => Permutation -> a -> a -> a -> a
simplex3D p x y z = {-# SCC "out" #-} 16 * (n gi0 (x0,y0,z0) + n gi1 xyz1 + n gi2 xyz2 + n gi3 xyz3) where
(i,j,k) = {-# SCC "ijk" #-} (s x, s y, s z) where s a = fastFloor (a + (x + y + z) / 3)
(x0,y0,z0) = {-# SCC "x0-z0" #-} (x - int i + t, y - int j + t, z - int k + t) where t = int (i + j + k) * g3
(i1,j1,k1,i2,j2,k2) = {-# SCC "i1-k2" #-} if x0 >= y0
then if y0 >= z0 then (1,0,0,1,1,0) else
if x0 >= z0 then (1,0,0,1,0,1) else (0,0,1,1,0,1)
else if y0 < z0 then (0,0,1,0,1,1) else
if x0 < z0 then (0,1,0,0,1,1) else (0,1,0,1,1,0)
xyz1 = {-# SCC "xyz1" #-} (x0 - int i1 + g3, y0 - int j1 + g3, z0 - int k1 + g3)
xyz2 = {-# SCC "xyz2" #-} (x0 - int i2 + 2*g3, y0 - int j2 + 2*g3, z0 - int k2 + 2*g3)
xyz3 = {-# SCC "xyz3" #-} (x0 - 1 + 3*g3, y0 - 1 + 3*g3, z0 - 1 + 3*g3)
(ii,jj,kk) = {-# SCC "iijjkk" #-} (i .&. 255, j .&. 255, k .&. 255)
gi0 = {-# SCC "gi0" #-} mod (p V.! (ii + p V.! (jj + p V.! kk ))) 12
gi1 = {-# SCC "gi1" #-} mod (p V.! (ii + i1 + p V.! (jj + j1 + p V.! (kk + k1)))) 12
gi2 = {-# SCC "gi2" #-} mod (p V.! (ii + i2 + p V.! (jj + j2 + p V.! (kk + k2)))) 12
gi3 = {-# SCC "gi3" #-} mod (p V.! (ii + 1 + p V.! (jj + 1 + p V.! (kk + 1 )))) 12
{-# INLINE n #-}
n gi (x',y',z') = {-# SCC "n" #-} (\a -> if a < 0 then 0 else
a*a*a*a*dot3 (grad3 V.! gi) x' y' z') $ 0.6 - x'*x' - y'*y' - z'*z'
harmonic :: (Num a, Fractional a) => Int -> (a -> a) -> a
harmonic octaves noise = f octaves / (2 - 1 / int (2 ^ (octaves - 1))) where
f 0 = 0
f o = let r = int $ 2 ^ (o - 1) in noise r / r + f (o - 1)
--Generate harmonic 3D noise between -0.5 and 0.5
harmonicNoise3D :: (RealFrac a, Floating a) => Permutation -> Int -> a -> a -> a -> a -> a
harmonicNoise3D p octaves l x y z = harmonic octaves
(\f -> simplex3D p (x * f / l) (y * f / l) (z * f / l))
```
For profiling, I used the following code,
```
q _ = let p = perm 0 in
sum [harmonicNoise3D p 3 l x y z :: Float | l <- [1..10], y <- [0..127], x <- [0..15], z <- [0..15]]
main = do start <- getCurrentTime
print $ q ()
end <- getCurrentTime
print $ diffUTCTime end start
```
which produces the following information:
```
COST CENTRE MODULE %time %alloc
simplex3D Main 18.8 21.0
n Main 18.0 19.6
out Main 10.1 9.2
harmonicNoise3D Main 9.8 4.5
harmonic Main 6.4 5.8
int Main 4.0 2.9
gi3 Main 4.0 3.0
xyz2 Main 3.5 5.9
gi1 Main 3.4 3.4
gi0 Main 3.4 2.7
fastFloor Main 3.2 0.6
xyz1 Main 2.9 5.9
ijk Main 2.7 3.5
gi2 Main 2.7 3.3
xyz3 Main 2.6 4.1
iijjkk Main 1.6 2.5
dot3 Main 1.6 0.7
```
To compare, I also ported the algorithm to C#. Performance there was about 3 to 4 times faster, so I imagine I must be doing something wrong. But even then it's not nearly as fast as I would like. So my question is this: can anyone tell me if there are any ways to speed up my implementation and/or the algorithm in general or does anyone know of a different noise algorithm that has better performance characteristics but a similar look?
After following some of the suggestions offered below, the code now looks as follows:
```
module Noise ( Permutation, perm
, noise3D, simplex3D
) where
import Data.Bits
import qualified Data.Vector.Unboxed as UV
import System.Random
import System.Random.Shuffle
type Permutation = UV.Vector Int
g3 :: Double
g3 = 1/6
{-# INLINE int #-}
int :: Int -> Double
int = fromIntegral
grad3 :: UV.Vector (Double, Double, Double)
grad3 = UV.fromList $ [(1,1,0),(-1, 1,0),(1,-1, 0),(-1,-1, 0),
(1,0,1),(-1, 0,1),(1, 0,-1),(-1, 0,-1),
(0,1,1),( 0,-1,1),(0, 1,-1),( 0,-1,-1)]
{-# INLINE dot3 #-}
dot3 :: (Double, Double, Double) -> Double -> Double -> Double -> Double
dot3 (a,b,c) x y z = a * x + b * y + c * z
{-# INLINE fastFloor #-}
fastFloor :: Double -> Int
fastFloor x = truncate (if x > 0 then x else x - 1)
--Generate a random permutation for use in the noise functions
perm :: Int -> Permutation
perm seed = UV.fromList . concat . replicate 2 . shuffle' [0..255] 256 $ mkStdGen seed
--Generate 3D noise between -0.5 and 0.5
noise3D :: Permutation -> Double -> Double -> Double -> Double
noise3D p x y z = 16 * (n gi0 (x0,y0,z0) + n gi1 xyz1 + n gi2 xyz2 + n gi3 xyz3) where
(i,j,k) = (s x, s y, s z) where s a = fastFloor (a + (x + y + z) / 3)
(x0,y0,z0) = (x - int i + t, y - int j + t, z - int k + t) where t = int (i + j + k) * g3
(i1,j1,k1,i2,j2,k2) = if x0 >= y0
then if y0 >= z0 then (1,0,0,1,1,0) else
if x0 >= z0 then (1,0,0,1,0,1) else (0,0,1,1,0,1)
else if y0 < z0 then (0,0,1,0,1,1) else
if x0 < z0 then (0,1,0,0,1,1) else (0,1,0,1,1,0)
xyz1 = (x0 - int i1 + g3, y0 - int j1 + g3, z0 - int k1 + g3)
xyz2 = (x0 - int i2 + 2*g3, y0 - int j2 + 2*g3, z0 - int k2 + 2*g3)
xyz3 = (x0 - 1 + 3*g3, y0 - 1 + 3*g3, z0 - 1 + 3*g3)
(ii,jj,kk) = (i .&. 255, j .&. 255, k .&. 255)
gi0 = rem (UV.unsafeIndex p (ii + UV.unsafeIndex p (jj + UV.unsafeIndex p kk ))) 12
gi1 = rem (UV.unsafeIndex p (ii + i1 + UV.unsafeIndex p (jj + j1 + UV.unsafeIndex p (kk + k1)))) 12
gi2 = rem (UV.unsafeIndex p (ii + i2 + UV.unsafeIndex p (jj + j2 + UV.unsafeIndex p (kk + k2)))) 12
gi3 = rem (UV.unsafeIndex p (ii + 1 + UV.unsafeIndex p (jj + 1 + UV.unsafeIndex p (kk + 1 )))) 12
{-# INLINE n #-}
n gi (x',y',z') = (\a -> if a < 0 then 0 else
a*a*a*a*dot3 (UV.unsafeIndex grad3 gi) x' y' z') $ 0.6 - x'*x' - y'*y' - z'*z'
harmonic :: Int -> (Double -> Double) -> Double
harmonic octaves noise = f octaves / (2 - 1 / int (2 ^ (octaves - 1))) where
f 0 = 0
f o = let r = 2 ^^ (o - 1) in noise r / r + f (o - 1)
--3D simplex noise
--syntax: simplex3D permutation number_of_octaves wavelength x y z
simplex3D :: Permutation -> Int -> Double -> Double -> Double -> Double -> Double
simplex3D p octaves l x y z = harmonic octaves
(\f -> noise3D p (x * f / l) (y * f / l) (z * f / l))
```
Together with reducing my chunk size to 8x8x128, generating new terrain chunks now occurs at about 10-20 fps, which means moving around is now not nearly as problematic as before. Of course, any other performance improvements are still welcome.
|
Optimizing numerical array performance in Haskell
|
CC BY-SA 3.0
| 0 |
2011-04-18T18:32:16.067
|
2011-05-24T07:33:36.650
|
2011-04-20T23:25:49.323
| 188,501 | 188,501 |
[
"performance",
"haskell",
"floating-point",
"polymorphism",
"procedural-generation"
] |
5,707,303 | 1 | 5,756,695 | null | 3 | 743 |
having some trouble with a Thread (CanvasThread) that is intermittently pausing at random points within my application. Everything else in the app continues to function as necessary, it's simply this thread that randomly blocks out for some reason and doesn't draw anything new to the screen. I noticed that Surface.lockCanvasNative() seems to be the last function called before the block, and the first one returned after. In a pattern as such:
```
Surface.lockCanvasNative (Landroid/graphics/Rect)Landroid/graphics/Canvas; @ 26,560 msec ____
Surface.lockCanvasNative (Landroid/graphics/Rect)Landroid/graphics/Canvas; @ 40,471 msec ____|
Surface.lockCanvasNative (Landroid/graphics/Rect)Landroid/graphics/Canvas; @ 40,629 msec ____
Surface.lockCanvasNative (Landroid/graphics/Rect)Landroid/graphics/Canvas; @ 54,516 msec ____|
```
This is evident with the traceview below:

I have been using the `CanvasThread.run()` below if it helps:
```
@Override
public void run() {
boolean tellRendererSurfaceChanged = true;
/*
* This is our main activity thread's loop, we go until
* asked to quit.
*/
while (!mDone) {
/*
* Update the asynchronous state (window size)
*/
int w;
int h;
synchronized (this) {
// If the user has set a runnable to run in this thread,
// execute it and record the amount of time it takes to
// run.
if (mEvent != null) {
mEvent.run();
}
if(needToWait()) {
while (needToWait()) {
try {
wait();
} catch (InterruptedException e) {
}
}
}
if (mDone) {
break;
}
tellRendererSurfaceChanged = mSizeChanged;
w = mWidth;
h = mHeight;
mSizeChanged = false;
}
if (tellRendererSurfaceChanged) {
mRenderer.sizeChanged(w, h);
tellRendererSurfaceChanged = false;
}
if ((w > 0) && (h > 0)) {
// Get ready to draw.
// We record both lockCanvas() and unlockCanvasAndPost()
// as part of "page flip" time because either may block
// until the previous frame is complete.
Canvas canvas = mSurfaceHolder.lockCanvas();
if (canvas != null) {
// Draw a frame!
mRenderer.drawFrame(canvas);
mSurfaceHolder.unlockCanvasAndPost(canvas);
//CanvasTestActivity._isAsyncGoTime = true;
}
else{
Log.v("CanvasSurfaceView.CanvasThread", "canvas == null");
}
}
}
}
```
Just let me know if I can provide any other useful information. I'm simply looking for clues as to why my thread might be blocking at this point? Thanks for any help in advance!
I've since narrowed the block down to `mSurfaceHolder.unlockCanvasAndPost(canvas);` I inserted a log before and after this call and the one after is not logged after app is frozen; but the log before is last logged event on this thread. It's not pausing or using a null canvas either, because I threw in logs for those instances as well; which are not logged even once until app is done.
|
Android: Thread pausing intermittently
|
CC BY-SA 3.0
| 0 |
2011-04-18T18:36:11.200
|
2014-06-19T17:17:11.033
|
2014-06-19T17:17:11.033
| 64,046 | 671,827 |
[
"android",
"multithreading",
"android-canvas",
"surfaceview",
"trace"
] |
5,707,595 | 1 | 5,708,006 | null | 0 | 4,747 |
I have a table and use actionListener to perform delete action see following image.
right now i am using event.getComponets() to get value that set from f:param tag. however, in this way, i have to hard code component id in to backing bean. looks like not a good approach. it there a better way to passing value from UI when there is a list of action buttons in table.
> ```
final UIParameter parm = (UIParameter) event.getComponent().findComponent(EDIT_SITE_ID_PARM);
return (Integer)parm.getValue();
```


|
Best way to pass value into backing bean in Richfaces
|
CC BY-SA 3.0
| null |
2011-04-18T19:04:48.660
|
2011-04-19T16:06:53.047
| null | null | 450,795 |
[
"richfaces"
] |
5,707,844 | 1 | null | null | 2 | 134 |
Is it possible to have a single UITableView display records from two linked entities without converting NSFetchedResultsController results into arrays then nesting the arrays?

And have the UITableView results look like:

Any direction would be great and very well appreciated.
|
Single UITableView with many-to-many obtained directly from Core Data
|
CC BY-SA 3.0
| 0 |
2011-04-18T19:29:25.963
|
2011-04-18T19:33:37.863
| null | null | 635,592 |
[
"iphone",
"database",
"ipad",
"uitableview",
"core-data"
] |
5,708,203 | 1 | 5,796,052 | null | 21 | 35,446 |
I've had a continued problem with div blocks stretching along the entire width of my iPad's screen. It seems to stop about 20 pixels from the right side of the screen.
Screenshots:


For the menu, I've got a div block and a UL inside for the menu itself. UL's width is set to 1000px and the background div block is set to width:100%; Width of this background is exactly 1009px.
The footer is a div block with the background, and two floated div blocks. Width of the background for this is exactly 1004px.
I've had this problem on other websites, specifically in this area. Anyone have any idea?
|
iPad background for div blocks not spanning entire width of screen
|
CC BY-SA 3.0
| 0 |
2011-04-18T20:00:59.820
|
2015-11-23T14:02:41.603
| null | null | 103,337 |
[
"iphone",
"css",
"ipad",
"background",
"width"
] |
5,708,209 | 1 | 5,708,281 | null | 9 | 7,514 |
What is the proper way to use a 9-patch image resource on a custom view?
I'm doing this:
```
background = BitmapFactory.decodeResource(getResources(), R.drawable.fundo_bookshelf);
canvas.drawBitmap(background, null, new Rect(0, y, width, y+backgroundHeight), null);
```
fundo_bookshelf is a proper 9-patch image, saved as fundo_bookshelf.9.png, seen below:

But when using the drawBitmap, the whole image is stretched, instead of only the part with the black pixel on the top, as shown on this screenshot:

|
Drawing a 9-patch image on a canvas with drawBitmap
|
CC BY-SA 3.0
| 0 |
2011-04-18T20:01:17.933
|
2011-04-18T20:13:38.330
| null | null | 691,169 |
[
"android"
] |
5,708,381 | 1 | 5,708,446 | null | 0 | 457 |
Here is an example of what I want to do (below). See the status bar, and notice how the progress bar overlaps the text on the left as the Window size decreases. I have attempted to do this, but when the Window size is small enough, the right-floated div simply cuts off (on the right).

|
Floating DIVs, right-floated div overlaps left divs as window width decreases
|
CC BY-SA 3.0
| null |
2011-04-18T20:16:56.897
|
2011-04-18T20:22:49.197
| null | null | 486,979 |
[
"html",
"css"
] |
5,708,511 | 1 | 5,709,422 | null | 0 | 464 |
I've discovered a bug in my app / function. I pass in a NSString of a date.
The function then uses the NSDateFotmatterShortStyle.
Heres a screen shot of my function in the debugger.
I'd like to end up with a date of 2011-04-18
Not sure why its added 1ppm either, I need it to be 00:00:00

Whats happening and how do I fix this ?
I use the MidnightUTC function from here ( [How do I create the current date (or any date) as an NSDate without hours, minutes and seconds?](https://stackoverflow.com/questions/4832536/how-do-i-create-the-current-date-or-any-date-as-an-nsdate-without-hours-minute) ) to get rid of the hours.
|
Obj-C, problem formatting date, gaining a day?
|
CC BY-SA 3.0
| null |
2011-04-18T20:28:52.973
|
2011-04-18T22:02:42.707
|
2017-05-23T10:30:23.117
| -1 | 450,456 |
[
"objective-c",
"nsdateformatter"
] |
5,708,633 | 1 | 5,708,788 | null | 2 | 2,780 |
Consider the following simple example:
```
f[x_] = Sin[5 x] + Sin[3 x];
p1 = PolarPlot[f[x], {x, 0, 2 Pi}, ImageSize -> 50 {5, 2.5},
Frame -> True]
p2 = PolarPlot[f'[x], {x, 0, 2 Pi}, ImageSize -> 50 {5, 3},
Frame -> True]
```
which produces the following two figures


Now I'd like to align the two of them, one on top of each other, without any additional gaps. Doing `FullGraphics@GraphicsColumn[{p1, p2}, Frame -> All]`, returns an object with additional white space around the shorter figure (I've turned the frames on in all the objects to illustrate this)

I couldn't find a way to force each of the column "cells" to fit vertically to the image size (NOTE: I'm aware that in my example, there's additional horizontal whitespace in the second figure, and that is intentional. I'm only trying to fit it snugly vertically). I tried playing around with the `Spacings` option, but that's still not satisfactory. So, my first question would be: "Is there a way I can do this using `GraphicsGrid` or `GraphicsColumn` or by any other means?"
Another way would be to use `ImageAssemble` like so:
```
ImageAssemble[Map[FullGraphics, {{p1}, {p2}}, {2}]]
```
which does what I want, but gives a rasterized image (the following is a screen grab, as the saved file had much poorer resolution).

My actual figures are neat vector plots and I don't even want to think about rasterizing them, no matter how high the resolution. So, my second question would be: "Is there a way to get a vector graphics output from `ImageAssemble`?" If it helps, I'm using `Mma7` and saving my graphics as `Export["filename.pdf",expr]`.
I know that this is possible using `LevelScheme` for the example shown. However, not all plotting functions are compatible with `LevelScheme` and will not work in all cases.
|
Assembling multiple Graphics objects
|
CC BY-SA 3.0
| 0 |
2011-04-18T20:40:40.423
|
2012-10-30T00:00:58.623
|
2011-04-29T23:11:24.607
| 3,730,911 | 3,730,911 |
[
"wolfram-mathematica"
] |
5,708,673 | 1 | 5,708,705 | null | 0 | 318 |
I have a problem on a program I'm making that I honestly can't find a solution for. It seems the objects contained on a Java ArrayList collection are being modified without me programming such modifications.
The program as a whole is meant to basically create a random connection between two nodes on a 10x10 grid by moving through a path. This path is represented as an ArrayList collection of points in the grid, with the first index containing the first node's location (node A) and the last index containing the second node's location (node B). How I do this is by locating myself on A's location, and then moving randomly to contiguous points in the grid, repeating this in a while loop until B's location is reached.
Everything seems to work except that the "path" collection is altered somehow, such that every point in it ends up being the same as the last point to which I move, which is also B's location.
The method is as follows:
```
public void generateRandomPath()
{
path = new ArrayList<Point>();
path.add(pInitial);
complete = false;
while(!complete)
{
k = path.get(path.size()-1);
d = selectDirection(k);
GUI.log.append("==== Before the method. ==== \n");
GUI.log.append(Integer.toString(path.get(path.size()-1).getX())+" - "+Integer.toString(path.get(path.size()-1).getY())+"\n");
x = move(k, d);
path.add(x);
if(k.getX() == pEnd.getX() && k.getY() == pEnd.getY())
complete = true;
}
GUI.log.append("Finished. \n");
}
```
- - - - - -
So what it basically does is it grabs the last point in the path as reference, chooses a direction, and then moves to the point contiguous on that direction. Each repetition of the while loop should add a new to . However what ends up happening is that not only is this new point added, but every other already in takes the value of this last point added. By utilizing the log entries show above (GUI.log.append) I managed to see that is being mysteriously altered inside the step:
```
x = move(k, d);
```
Which is the following method:
```
private Point move(Point n, int y)
{
GUI.log.append("==== Inside the method. ==== \n");
GUI.log.append(Integer.toString(path.get(path.size()-1).getX())+" - "+Integer.toString(path.get(path.size()-1).getY())+"\n");
Point newP = n;
if(y == 1)
newP.setY(n.getY()-1);
if(y == 2)
newP.setX(n.getX()+1);
if(y == 3)
newP.setY(n.getY()+1);
if(y == 4)
newP.setX(n.getX()-1);
GUI.log.append("==== After method. ==== \n");
GUI.log.append(Integer.toString(path.get(path.size()-1).getX())+" - "+Integer.toString(path.get(path.size()-1).getY())+"\n");
return newP;
}
```
Integer is the direction as mentioned before. As you can see this method does not alter in any way, yet the logs show it does. In this example node A was on the X = 2, Y = 3. The log shows what the coordinates of the last in are. As you can see, the coordinates of the last point in take on the value of the coordinates of the new , but this new was not yet added to .

I honestly don't know how this is happening. If anyone could think of a reason I would appreciate it very much if you could tell me.
|
Contents in an ArrayList get modified
|
CC BY-SA 3.0
| null |
2011-04-18T20:43:27.167
|
2017-04-29T03:12:13.487
|
2017-04-29T03:12:13.487
| 3,885,376 | 161,353 |
[
"java",
"arraylist"
] |
5,708,808 | 1 | 5,730,844 | null | 0 | 446 |
I want to Create a new User using Custom Membership Provider but I don't want to use the default function that is created.
I don't want to use this
```
Public Overrides Function CreateUser(ByVal username As String,
ByVal password As String,
ByVal email As String,
ByVal passwordQuestion As String,
ByVal passwordAnswer As String,
ByVal isApproved As Boolean,
ByVal providerUserKey As Object,
ByRef status As System.Web.Security.MembershipCreateStatus) As System.Web.Security.MembershipUser
Return Nothing
End Function
```
Instead I want to use this
```
Public Overloads Function CreateUser(ByVal username As String,
ByVal email As String,
ByVal number As String,
ByVal isApproved As Boolean,
ByRef status As System.Web.Security.MembershipCreateStatus) As System.Web.Security.MembershipUser
```
So when I use second option I get this squiggly lines saying ""
I referenced the .dll correctly like this
```
Imports CustomProviders
```
But when I try to create a user as shown in this below image it doesn't work. I am doing something clearly wrong. I don't know what it is.

:
I found that the squiggly line was due to casting problem. I was referencing the class library member without casting in my web page code behind method. I think the other is also taken care off.
|
Custom Membership Provider - Error in my custom CreateUser Function with different parameters
|
CC BY-SA 3.0
| null |
2011-04-18T20:57:23.223
|
2011-04-28T17:30:38.000
|
2011-04-28T17:30:38.000
| 581,922 | 581,922 |
[
".net",
"asp.net",
"custom-membershipprovider"
] |
5,709,259 | 1 | null | null | 0 | 2,914 |
I need to check if an HTML element (any element will do) is empty of contents. By contents I don't mean text content or any other HTML elements, because that is already a given. I mean want to check if it's simply a blank element. For example:

If I hide the link, the only thing left is the paragraph element, which is now blank. It does not have any styles on it, so it's just a transparent container with margin/padding/whatever, but no other styles. Is there a way to detect this in Javascript? Any weird browser quirk will do. Ugly solutions valid too.
|
Check if element is empty of content, is a transparent container, blank
|
CC BY-SA 3.0
| null |
2011-04-18T21:43:45.240
|
2015-02-01T16:31:55.203
|
2015-02-01T16:31:55.203
| 3,204,551 | 224,732 |
[
"javascript",
"html",
"css"
] |
5,709,322 | 1 | 6,021,126 | null | 3 | 814 |
I've been trying to track down the cause of this crash, it happens quite frequently, but only in simulator (not on device), and then only part of the time.
Stack Trace is:

I'm calling:
```
UITextView *myTextView = [[UITextView alloc] initWithFrame:CGRectMake(0,0,100,100)];
```
And in most situations there is no problem here. The really frustrating part is that it is not having issue with what I'm calling, but instead some issue in WebFrame internals (which I assume is an internal piece of UITextView
Crashlog:
```
2011-04-18 14:34:48.729 MyApp[73336:40b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WebFrame _isIncludedInWebKitStatistics]: unrecognized selector sent to instance 0xa901a50'
*** Call stack at first throw:
(
0 CoreFoundation 0x03003be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x031585c2 objc_exception_throw + 47
2 CoreFoundation 0x030056fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02f75366 ___forwarding___ + 966
4 CoreFoundation 0x02f74f22 _CF_forwarding_prep_0 + 50
5 WebKit 0x03abc862 -[WebFrameView(WebInternal) _setWebFrame:] + 98
6 WebKit 0x03abc75f -[WebFrame(WebInternal) _initWithWebFrameView:webView:] + 239
7 WebKit 0x03af6565 +[WebFrame(WebInternal) _createMainFrameWithSimpleHTMLDocumentWithPage:frameView:withStyle:editable:] + 85
8 WebKit 0x03b30ad0 -[WebView(WebPrivate) initSimpleHTMLDocumentWithStyle:editable:withFrame:withPreferences:] + 1184
9 UIKit 0x019be211 -[UIWebDocumentView initSimpleHTMLDocumentWithStyle:editable:withFrame:withPreferences:] + 255
10 UIKit 0x019321e8 -[UITextView commonInitWithWebDocumentView:isDecoding:] + 443
11 UIKit 0x0192f5ce -[UITextView initWithFrame:] + 118
```
And it doesn't always crash there, sometimes it makes it through that call without issue, and then crashes here:

With the following excuse in the log:
```
Program received signal: “EXC_BAD_ACCESS”.
```
Again, in this case the initial call (presenting a modal view controller) is made to a valid target with valid parameters, but this time the crash seems to be reporting a misaligned_stack_error_ as being the culprit.
Both of these issues started at around the same time, and only manifest in simulator, and only about 50% of the time (one, the other, or neither, it seems almost random).
Hoping someone else has seen this and might be able to point me in the right direction!
|
Stack crashing on internal methods, only happens sometimes (race condition?) and only in simulator
|
CC BY-SA 3.0
| 0 |
2011-04-18T21:51:52.933
|
2011-05-16T17:35:24.673
|
2020-06-20T09:12:55.060
| -1 | 285,694 |
[
"iphone",
"cocoa-touch",
"xcode"
] |
5,709,774 | 1 | null | null | 0 | 3,849 |
I am having a terrible time deploying a web app.
There is an intranet site that currently has lot's of files and folders, and works fine. It was not configured to use ASP.NET, it was just plain static web pages.
This is on a Win2k3 box with IIS 6.0.
The application works fine on my development machine. The class `Employee` is in the same directory, with the same namespace as the asp.net page that is giving me this error.
There is a directory "INFO" that I have been attempting to deploy my application to. So I have:
1. Enabled ASP.NET (confirmed)
2. Confirmed that it is using .net 2.0
3. I have right clicked the directory in IIS and clicked the button "Create" next to the greyed out "Application Name" to make it an application
4. I've compiled and deployed (using VS publish tools) the application to the INFO directory (which is a share)
... and still it is not working.
Any ideas? What else do I need to do to get this thing working??

|
CS0246: The type or namespace name 'Employee' could not be found (are you missing a using directive or an assembly reference?)?
|
CC BY-SA 3.0
| null |
2011-04-18T22:53:53.017
|
2011-04-18T23:14:13.310
|
2011-04-18T22:57:50.763
| 707,111 | 568,289 |
[
"c#",
".net",
"asp.net",
"deployment",
"iis-6"
] |
5,710,163 | 1 | 5,719,746 | null | 1 | 694 |
I have spent hours trying to find an answer to this, and have come up empty.
I am completely new to .NET and MVC - I completed the MvcMusicStore tutorial and have now started working on a more complex - but similar project. I only say this to explain my low level of experience and knowledge in this area, and hope that any responses can be considerate of this.
Anyway, the problem I am having is that I have one table "Fixtures" which has two attributes "TeamId1" and "TeamId2" these both map to another table "Team".
What I want is for each fixture to also include the Team data for both Team1 AND Team2. I have been using the Include method of ObjectQuery so far to perform similar operations with no problems.
However, I found that .NET or MVC or Entity Framework or whatever, wasn't happy when I did this. After MUCH experimentation, I figured that it will only work when the Foreign Key has the same name as the Table it refers to. Basically my attribute must have the name "TeamId" or it just won't work. This wouldn't be a problem if I didn't have another attribute which had to map to this table as well. I obviously can't have two attributes with the same name in a table. So I am stuck.
I can only assume that it is possible to map to a table using an attribute name other than "TeamId" but I can't find any instruction/previous post/documentation to explain how to do this.
I have considered the possibility of breaking my Fixture data up and having a Fixture table then a separate table to hold the team ids, scores etc, however this seems a bit of overkill given that each fixture will never have more than two teams. So I am calling this Plan B.
I'd rather not sidestep this problem, if possible - as it doesn't seem unreasonable for it to be possible using EF and ObjectQuery. I am also aware that I can create the queries manually, specifying the joins. Unfortunatley my experience of LINQ is limited and the multiple joins on one table hasn't worked out every time I've tried it so far.
So what I really need to know is if there is some setting or code I can use to achieve the above without resorting to LINQ or restructuring my Fixtures table.
Edit:

This image shows the relevant models. As it stands: this works, however queries obviously only return one Team Instance linked to the "TeamId1" column. The commented code shows what I need to also have in the model (as far as my limited previous experience has shown). So that my Model holds two separate teams linked to two separate columns.
|
Linking separate attributes to the same table in Entity Framework / .NET MVC
|
CC BY-SA 3.0
| 0 |
2011-04-19T00:00:12.643
|
2011-04-19T16:41:49.907
|
2011-04-19T13:27:00.887
| 713,774 | 713,774 |
[
"asp.net-mvc",
"entity-framework",
"objectquery"
] |
5,710,336 | 1 | 5,710,468 | null | 0 | 73 |
I have the following code:
```
<sdk:DataGridTemplateColumn Header="Print Ticket"
Width="100">
<sdk:DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=ticketId}"
Width="0"
x:Name="printTicketBlock" />
<Button Content="Print Ticket"
Cursor="Hand" />
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellEditingTemplate>
</sdk:DataGridTemplateColumn>
```
The value of printTicketBlock is different everytime, and I would like the button to use that value. But I can't seem to get my head around how to do it.
The id is retrieved from the database and is usually 1,2,3 etc.
But I would like for the value (which will be different) to be available to me.
Here is a screenshot of what the display will look like:

Can anyone help me out here.
Thanks
|
Distinguish different values from datagrid Silverlight
|
CC BY-SA 3.0
| null |
2011-04-19T00:35:17.610
|
2015-10-07T09:49:18.867
|
2015-10-07T09:49:18.867
| 3,796,048 | 251,671 |
[
"c#",
"wpf",
"silverlight",
"xaml",
"data-binding"
] |
5,710,417 | 1 | 5,710,444 | null | 29 | 27,260 |
I have a container `box1` that has a certain width (which might change depending on its content). That box contains `box2` which has a fixed width (it could be an icon). Next to `box2`, I have `box3` with some text. I want the text to use all the space available to the right of `box2`. With the HTML pasted below, you get:

So far so good. If the text gets longer, it doesn't wrap around `box2` (which is what I want), however, it doesn't make `box1` grow, which is my problem. You'll tell me "hey, if you made `box3` a `position: absolute`, how could you expect it to make `box1` grow?". Well, I don't but then, how can I get `box3` to show next to `box2`, use all the horizontal space available, and make `box1` grow if necessary? (Do I need to say that I'd like this work on IE6 onward, and to avoid using a table?)

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
#box1 { position: relative }
#box3 { position: absolute; left: 2.5em; right: .5em; top: .5em }
/* Styling */
#box1 { background: #ddd; padding: 1em 0.5em; width: 20em }
#box2 { background: #999; padding: .5em; }
#box3 { background: #bbb; padding: .5em; }
body { font-family: sans-serif }
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div id="box1">
<span id="box2">2</span>
<span id="box3">3</span>
</div>
</body>
</html>
```
|
How to do a `float: left` with no wrapping?
|
CC BY-SA 3.0
| 0 |
2011-04-19T00:52:09.630
|
2013-12-03T09:47:43.457
| null | null | 5,295 |
[
"css",
"css-position",
"css-float"
] |
5,710,771 | 1 | 5,710,804 | null | 7 | 8,734 |
I built and ran an iOS 4.3 app in Simulator. It initially brings up an iPhone 4 shell. Although all real iPhone 4s have retina display, this simulated iPhone 4 only has a resolution of 320x480.

I look in `Hardware > Device`. There's a checkmark next to the normal iPhone. So I'm using an iPhone 4 case but displaying normal iPhone resolution? I'm already confused!
- - -
I then switch over to . Strangely, it opens iPad with the same 320x480 resolution. Both the shell and the resolution are wrong here!

How am I supposed to turn Retina on and off and show it in the right shell?
|
How to turn on iPhone Retina in iOS Simulator?
|
CC BY-SA 3.0
| 0 |
2011-04-19T01:56:53.723
|
2011-04-19T02:01:45.443
| null | null | 459,987 |
[
"iphone",
"ipad",
"ios4",
"ios-simulator"
] |
5,710,829 | 1 | null | null | 4 | 2,869 |
Inside the UIView subclass, I override the Draw sub to draw some custom text, but the text allways is drawn as flip text.
This is the code I am using:
```
class TextViewProblem : UIView
{
public override void Draw (RectangleF rect)
{
base.Draw (rect);
CGContext g = UIGraphics.GetCurrentContext();
UIColor.White.SetFill();
g.SelectFont("Arial",16f,CGTextEncoding.MacRoman);
UIColor.White.SetFill();
g.SetTextDrawingMode(CGTextDrawingMode.Fill);
g.ShowTextAtPoint(1,25,"Yiannis 123");
}
}
```
And this is the output of this code:

Why is the text drawn flipped?
I am running:
MonoDevelop 2.4.2
iPhone Simulator 4.2
MonoTouch 3.2.6
You can download a project to reproduce this issue from this link: [www.grbytes.com/downloads/TextProblem.zip](http://www.grbytes.com/downloads/TextProblem.zip)
|
MonoTouch: Custom drawing text allways draws flip text
|
CC BY-SA 3.0
| 0 |
2011-04-19T02:07:25.080
|
2013-06-15T01:49:51.487
|
2011-04-19T02:52:59.017
| 348,551 | 348,551 |
[
"xamarin.ios"
] |
5,710,858 | 1 | 5,710,880 | null | 0 | 2,085 |
I have an annoying IE6 layout bug
This screenshot shows the problem:

i.e. `<input type='text' />` are wrong size.
The text inputs are a bit wonky. They are supposed to be 248px wide (like the textarea) and on the same horizontal level as their labels. All other browsers appear to obey the following code but our friend IE6 doesn't
```
.simple_form input[type='text'],.simple_form input[type='email'],.simple_form textarea
{
width:240px;
border:1px solid #ccc;
padding:3px
}
```
I dunno what I'm doing wrong here and it's driving me nuts. The page in question is [here](http://lambhillstables.org/contacts/new). The inputs are significantly wider than 248px in IE6. Does IE6 have a problem understanding `input[type='text']` when used in CSS?
Can post more code
|
IE6 <input type='text' /> width issue
|
CC BY-SA 3.0
| null |
2011-04-19T02:12:22.767
|
2012-06-01T14:12:47.600
|
2020-06-20T09:12:55.060
| -1 | 227,863 |
[
"css"
] |
5,711,187 | 1 | 8,367,705 | null | 1 | 2,927 |
I'm going to set image perspective. I have image of laptop with blank polygon 
Another image needs to be pulled on a blank area. Like this:

So, I have this code for dynamical distortion:
```
$controlPoints = array( 0, 0,
0, 0,
0, $im->getImageHeight(),
0, $im->getImageHeight(),
$im->getImageWidth(), 0,
$im->getImageWidth(), 0,
$im->getImageWidth(), $im->getImageHeight(),
$im->getImageWidth(), $im->getImageHeight());
/* Perform the distortion */
$im->distortImage(Imagick::DISTORTION_PERSPECTIVE, $controlPoints, true);
```
How can I set $controlPoints array? I can't just set 4 coordinates to each corner of image? Unfortunately, documention for imageick::distort image is poor.
Problem is solved by using another distortion method:
```
$im->cropImage( 125, 121, $center_x, $center_y );
$controlPoints = array(
0,0, 35,20, # top left
190,0, 150,30, # top right
0,205, -16,105, # bottom right
176,135, 115,105 # bottum left
);
/* Perform the distortion */
$im->distortImage(Imagick::DISTORTION_BILINEAR, $controlPoints, true);
```
|
imagick::distortimage
|
CC BY-SA 3.0
| 0 |
2011-04-19T03:12:07.407
|
2012-11-16T13:00:55.267
|
2012-11-16T13:00:55.267
| 367,456 | 690,646 |
[
"php",
"imagick",
"perspective",
"distortion"
] |
5,711,359 | 1 | 5,712,059 | null | 1 | 2,214 |
I need a write a calendar to excel like this:

Calendar rows are 8 not 7. Please help me?
EDITED: I'm put my code: Basic function of drawing calendar on excel.
```
def _make_calendar(self, row, column):
cal = calendar.Calendar()
for month in range(1, 13):
self._prepare_calendar_month(column);
row, merge_to = self._create_calendar_month(cal, month, row+1, column)
self._create_merged_cell(6, 6, column, column+merge_to, month, self.style_text_center_xf)
column += merge_to + 1
```
Drawing bordered cells on excel
```
def _prepare_calendar_month(self, column):
data = None
for r in range(7, 15):
for c in range(column, column+5):
self._create_cell(r, c, data, self.style_text_center_xf)
```
Draw calendar on excel:
```
def _create_calendar_month(self, cal, month, row, column):
year = 2011
last_day_of_month = self._last_day_of_month(datetime(year, month, 1))
merge_to = 0
for k, v in cal.itermonthdays2(year, month):
if k:
self._create_cell(row, column, k, self.style_text_center_xf)
row += 1
if row == 15:
row = 7
if k != 0:
column += 1
if last_day_of_month != k and k != 0:
merge_to += 1
return row, merge_t
```
Creating cell functions:
```
def _create_cell(self, row, column, data, style=None):
if not style:
style = self.style_text_xf
self.sheet.write(row, column, data, style)
def _create_merged_cell(self, row1, row2, column1, column2, data, style=None):
if not style:
style = self.ezxf('font:bold on;align:wrap off,vert centre,horiz left;')
self.sheet.write_merge(row1, row2, column1, column2, data, style)
```
So my problem is my functions are working wrong. When you change `year` variable in `_create_calendar_month` function it drawing wrong. Please help me?
|
How to write a calendar to excel?
|
CC BY-SA 3.0
| 0 |
2011-04-19T03:42:52.660
|
2019-06-25T16:25:52.353
|
2011-04-19T16:46:53.070
| null | 152,308 |
[
"python",
"calendar"
] |
5,711,930 | 1 | 5,711,940 | null | 3 | 3,836 |
In the below image. I've given 10px padding to container because most of the time I need that padding. only the headings (blue) I don't need padding. How to extend heading over padding?
[http://i.stack.imgur.com/DeSHZ.jpg](https://i.stack.imgur.com/DeSHZ.jpg)
I don't want to give individual padding to each element inside container.

|
How to take an element over to given padding with CSS
|
CC BY-SA 3.0
| null |
2011-04-19T05:17:18.983
|
2011-04-19T15:39:19.033
|
2011-04-19T15:39:19.033
| 271,353 | 84,201 |
[
"html",
"css"
] |
5,712,320 | 1 | 5,712,353 | null | 4 | 878 |
I have some string like
```
Shp 1,737 Plenty Rd, Mill Park VIC 3082
560 High St, Preston VIC 3072
217 Mickleham Rd, Tullamarine VIC 3043
```
from these i need "VIC" . Can anyone help me to find out a solution using regex or php string function
This is the actual strings... that read from an excel sheet i want the states name from these string like, etc
|
Regular expression for getting string part
|
CC BY-SA 3.0
| null |
2011-04-19T06:13:55.127
|
2011-04-19T07:40:47.053
|
2011-04-19T06:20:49.443
| 171,995 | 171,995 |
[
"php",
"regex",
"string"
] |
5,712,285 | 1 | null | null | 3 | 4,648 |
In the past I created own xml serialization class manually. But now I would like to do it automatically.
So I found XSD tool by Microsoft. Unfortunately I face a bug with this utility (CS030 etc.).
But next I found looking great open source tool XSD2CODE [http://xsd2code.codeplex.com/](http://xsd2code.codeplex.com/)
Everything was looking great until I spotted that not all my xml data has been deserialized (lol).
My XML:
```
<?xml version="1.0" encoding="utf-8" ?>
<MySettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<AdminPassword>Admn1234</AdminPassword>
<ImagesFolder></ImagesFolder>
<Resolutions>
<Resolution id="1024x768">
<Width>1024</Width>
<Height>768</Height>
<Panel id="top">
<Height>603</Height>
<LocationOnMainForm>
<X>0</X>
<Y>0</Y>
</LocationOnMainForm>
<Background>1_panel_top_background.jpg</Background>
<Buttons>
<Button id="pbMainTopComp">
<Background>panel_top_btn_info.jpg</Background>
<Location>
<X>27</X>
<Y>123</Y>
</Location>
<OnClickOpenLink>http://www.google.com</OnClickOpenLink>
</Button>
<Button id="pbMainTopSelf">
<Background>panel_top_btn_self.jpg</Background>
<Location>
<X>360</X>
<Y>123</Y>
</Location>
<OnClickOpenLink>http://www.yahoo.com</OnClickOpenLink>
</Button>
</Buttons>
</Panel>
<Panel id="bottom">
<LocationOnMainForm>
<X>0</X>
<Y>603</Y>
</LocationOnMainForm>
<Height>165</Height>
<Background>panel_bottom_background.jpg</Background>
<Buttons>
<Button id="pbMainBottomPages">
<Background>panel_bottom_btn_pages.jpg</Background>
<Location>
<X>38</X>
<Y>39</Y>
</Location>
<OnClickOpenLink/>
</Button>
<Button id="pbMainBottomReport">
<Background>panel_bottom_btn_report.jpg</Background>
<Location>
<X>344</X>
<Y>39</Y>
</Location>
<OnClickOpenLink>http://www.bing.com</OnClickOpenLink>
</Button>
</Buttons>
</Panel>
</Resolution>
</Resolutions>
</MySettings>
```
When I use standard method to deserialize I have error.
```
MySettings mySettings = new MySettings();
using (TextReader textReader = new StreamReader(@"settings_test.xml"))
{
XmlSerializer xSerializer = new XmlSerializer(typeof(MySettings));
mySettings = (MySettings)xSerializer.Deserialize(textReader);
}
```
When I use Xsd2Code built in deserialize method:
```
MySettings mySettings = new MySettings();
bool isOk = MySettings.LoadFromFile(@"settings_test.xml", out mySettings);
string pass = mySettings.AdminPassword;
foreach (MySettingsResolutionsResolution item in mySettings.Resolutions)
{
string height = item.Height;
foreach (MySettingsResolutionsResolutionPanel panel in item.Panel)
{
string bckg = panel.Background;
foreach (MySettingsResolutionsResolutionPanelButtonsButton btn in panel.Buttons)
{
string btnBckg = btn.Background;
}
}
}
```
then I have no errors but not all data are deserialized from xml.
For example:

My Xsd2Code settings:

Can anyone advice me:
- - -
Thanks a lot in advance for all suggestions.
|
xsd2code - problem deserializing xml file
|
CC BY-SA 3.0
| 0 |
2011-04-19T06:10:28.990
|
2013-08-08T10:11:43.753
| null | null | 186,977 |
[
"c#",
"xml",
"xsd",
"xsd2code"
] |
5,712,356 | 1 | 5,713,906 | null | 0 | 376 |
This is my reference question; [String.Format Same Code Different View](https://stackoverflow.com/questions/5562939/string-format-same-code-different-view)
When i try this code;
```
var cultureWithoutCurrencySymbol =
(CultureInfo)CultureInfo.CurrentCulture.Clone();
cultureWithoutCurrencySymbol.NumberFormat.CurrencySymbol = "";
GridView1.FooterRow.Cells[9].Text = String.Format(cultureWithoutCurrencySymbol, "{0:c}", sumMV).Trim();
```
I gettin an error like this;

How can i solve this problem?
Is it something wrong in my code?
|
Gridview Trim Error in ASP.NET
|
CC BY-SA 3.0
| null |
2011-04-19T06:17:38.880
|
2011-04-19T08:57:15.673
|
2017-05-23T11:48:24.847
| -1 | 447,156 |
[
"c#",
"asp.net",
"gridview",
"string-formatting",
"trim"
] |
5,712,566 | 1 | 5,712,594 | null | 0 | 1,819 |
I have a web form which works fine until you keep on working on it. But if you leave it for 20 mins, on submit button click it gives the following error

Error
It seems to me the page request object gets NULL but exactly cant reach to the issue.
I have tried to increase the session timeout at IIS but it did not help.
Please help me to know the root cause for it.
Thanks all
|
Object reference not set to instance of an object
|
CC BY-SA 3.0
| null |
2011-04-19T06:42:01.280
|
2011-04-19T13:30:19.807
|
2011-04-19T06:52:22.197
| 106,866 | 569,513 |
[
"asp.net",
"asp.net-ajax",
"c#-3.0"
] |
5,712,581 | 1 | 5,714,637 | null | 4 | 878 |
I have two textures: background and mask. I need to make output that mask defines what is revealed form background. Very important part is that mask needs to be less size then background I will move it in runtime revealing parts of background.

Project is on WP7 so there is limited [BlendState](http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.blendstate.aspx) manipulation.
|
How to make XNA movable mask on WP7
|
CC BY-SA 3.0
| 0 |
2011-04-19T06:43:33.290
|
2011-04-19T09:58:07.620
| null | null | 306,735 |
[
"windows-phone-7",
"xna"
] |
5,712,937 | 1 | 5,865,500 | null | 147 | 136,438 |
I can't set the title of UIButton using IB as center. My title is multi line.It is giving like this one 
But I want like this one 
I have given space in this but I don't want to do that. As it is not aligned exactly for some cases and I know there is a property of UILabel to set the alignment but I don't want to write a code for that.. just want to set everything from IB.
Thanks
|
How to make UIButton's text alignment center? Using IB
|
CC BY-SA 3.0
| 0 |
2011-04-19T07:23:14.400
|
2021-10-09T14:02:58.377
|
2015-02-13T05:04:54.357
| 468,724 | 468,724 |
[
"ios",
"objective-c",
"uibutton",
"interface-builder"
] |
5,712,955 | 1 | 5,719,064 | null | 0 | 176 |
How to disable text Correction and Capitalize in Twitter login page?

( [https://twitter.com/oauth/authorize?oauth_token=](https://twitter.com/oauth/authorize?oauth_token=) )
Any help would be appreciated!
|
How to disable text Correction and Capitalize in Twitter login page?
|
CC BY-SA 3.0
| 0 |
2011-04-19T07:25:01.670
|
2011-04-19T15:46:17.843
| null | null | 255,549 |
[
"iphone",
"ios",
"ipad",
"twitter",
"oauth"
] |
5,712,987 | 1 | null | null | 5 | 9,586 |
>
[Is there a way to completely eliminate padding in a LinearLayout containing buttons?](https://stackoverflow.com/questions/4113753/is-there-a-way-to-completely-eliminate-padding-in-a-linearlayout-containing-butt)

What in the world could be giving me this extra ~5-6 pixels of spacing???? It's been driving me mad, I've tried setting the paddings/margins on the parent TableRow, each individual button, the textviews, everything!
Here's the XML layout of what is shown:
```
<TableLayout android:id="@+id/tableLayout1" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content" >
<TextView android:text="Resource1 - $Price" android:id="@+id/resourceText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="3"></TextView>
<Button android:text="@string/buybtn" android:id="@+id/buyButton1" android:onClick="buyButtonClick" android:layout_width="80dip" android:layout_height="36dip"></Button>
<TextView android:text="XXX" android:id="@+id/resourceHeld1" android:layout_width="30dip" android:layout_height="wrap_content" android:gravity="center"></TextView>
<Button android:text="@string/sellbtn" android:id="@+id/sellButton1" android:onClick="sellButtonClick" android:layout_width="80dip" android:layout_height="36dip"></Button>
</TableRow>
<View android:layout_height="1dip" android:background="#FF303030"/>
<TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:text="Resource2 - $Price" android:id="@+id/resourceText2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="3"></TextView>
<Button android:text="@string/buybtn" android:id="@+id/buyButton2" android:onClick="buyButtonClick" android:layout_width="80dip" android:layout_height="36dip"></Button>
<TextView android:text="XXX" android:id="@+id/resourceHeld2" android:layout_width="30dip" android:layout_height="wrap_content" android:gravity="center"></TextView>
<Button android:text="@string/sellbtn" android:id="@+id/sellButton2" android:onClick="sellButtonClick" android:layout_width="80dip" android:layout_height="36dip"></Button>
</TableRow>
etc etc etc copypasta
```
What chicken do I need to sacrifice to get that padding out of there? In an ideal world, I would nudge the 1dip view up with a margin of 1dip against the bottom of the button.
|
Android - Layout is giving buttons extra padding; giving me extra gray hairs
|
CC BY-SA 3.0
| 0 |
2011-04-19T07:28:07.407
|
2012-11-24T21:29:58.777
|
2017-05-23T12:07:02.087
| -1 | 705,175 |
[
"android",
"layout",
"button",
"padding"
] |
5,713,224 | 1 | 5,714,321 | null | 5 | 9,410 |
Okay, here is my pretty simple problem.
I have a `ListView` that I styled so as to make it look like the Windows Explorer.
Now, I'd like to group the items inside. Therefore, I defined a `GroupStyle` with an `Expander` to group it. The grouping is now fine.
What I don't like is that now, my `ListView` displays each group on a separate line, while I'd like to have some expander-wrapping in order to display many groups on the same line.
An image is better than some text I guess.
Here is what I have:

Here is what I want:

I cannot find which property should I have to style in order to make the `GroupItems` fit in a WrapPanel, just like I did for the items.
Here is my ListView style:
```
<ResourceDictionary>
<!-- Explorer-style layout-->
<DataTemplate x:Key="ExplorerView">
<StackPanel Orientation="Horizontal" Height="Auto" Width="150">
<Image Source="{Binding Path=Value.AppConfig.Appli.AppType, Converter={StaticResource TypeToIconConverter}}" Margin="5"
Height="50" Width="50"/>
<StackPanel VerticalAlignment="Center" Width="90">
<TextBlock Text="{Binding Path=Value.AppConfig.Appli.AppName}"
FontSize="13" HorizontalAlignment="Left" TextWrapping="WrapWithOverflow"
Margin="0,0,0,1" />
<TextBlock Text="{Binding Path=Value.AppConfig.Appli.AppType}" FontSize="9"
HorizontalAlignment="Left" Margin="0,0,0,1" />
</StackPanel>
</StackPanel>
</DataTemplate>
<!-- Group header style-->
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander x:Name="exp" IsExpanded="True" Width="310"
BorderBrush="CornflowerBlue">
<Expander.Header>
<DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Background="CornflowerBlue" x:Name="expContent"
Width="{Binding RelativeSource={RelativeSource
Mode=FindAncestor, AncestorType={x:Type Expander}},
Path=Width}"
Height="{Binding RelativeSource={RelativeSource
Mode=FindAncestor, AncestorType={x:Type ToggleButton}},
Path=ActualHeight}">
<CheckBox IsChecked="False" DockPanel.Dock="Right"/>
<TextBlock Text="{Binding Path=Name}" Foreground="White"
FontWeight="Bold" HorizontalAlignment="Center" />
</DockPanel>
</Expander.Header>
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
<!-- (...) -->
<ListView ItemsSource="{Binding GroupedConfig, Mode=TwoWay}"
ItemTemplate="{StaticResource ExplorerView}">
<ListView.ItemsPanel>
<ItemsPanelTemplate >
<WrapPanel Width="{Binding (FrameworkElement.ActualWidth),
RelativeSource={RelativeSource
AncestorType=Expander}}"
ItemWidth="{Binding (ListView.View).ItemWidth,
RelativeSource={RelativeSource AncestorType=ListView}}"
ItemHeight="{Binding (ListView.View).ItemHeight,
RelativeSource={RelativeSource AncestorType=ListView}}" />
<!--MinWidth="{Binding ItemWidth,
RelativeSource={RelativeSource Self}}"-->
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.GroupStyle>
<GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}" />
</ListView.GroupStyle>
</ListView>
```
Any ideas?
I'm trying to insert some appropriate `Setter` in the style defined for `GroupItem`, but I'm starting to think that this is not the right way to do.
Thanks!
|
Styling ListView.GroupStyle with a WrapPanel
|
CC BY-SA 3.0
| null |
2011-04-19T07:51:14.433
|
2014-09-09T17:19:27.613
|
2011-08-16T15:32:34.803
| 305,637 | 664,237 |
[
"wpf",
"xaml",
"listview",
"styles",
"controltemplate"
] |
5,713,320 | 1 | 5,713,384 | null | 0 | 1,163 |
Check out the error in socket.io.js + node.js

|
No transport available socket.io.js
|
CC BY-SA 3.0
| null |
2011-04-19T08:00:51.963
|
2011-04-19T08:20:32.947
| null | null | 440,694 |
[
"node.js",
"socket.io"
] |
5,713,333 | 1 | null | null | 2 | 8,116 |
I have drawn few concentric circles and added a gesture listener too on the same view. I have drawn a point where i am placing the marker and tapping the button below. Once i tap the button, i will be getting the (x,y) co ordinates of the position where i place the maker and clicked the button. now i have to find out the distance between the center(x,y) of the view and marking that i have made earlier. I tried with distance calculation form ula, but still i am not sure i am getting the right solution. This is because, for example , when i mark a point at the top portion of the circle and made a mark at the bottom portion of the circle, its giving a different value. Since all are circles, from which ever part of the circle i mark, it has to give me the same distance . am i right ?
I tried with lot of ideas, still nothing work out well.
I have attached the screen shot of that page too, Please take a look at it

Any help is Appreciable.
Thanks.
|
How to find the distance betweeen two points in android
|
CC BY-SA 3.0
| 0 |
2011-04-19T08:02:20.437
|
2015-05-12T05:52:31.233
| null | null | 384,193 |
[
"android",
"canvas",
"points"
] |
5,714,137 | 1 | 5,714,377 | null | 6 | 4,185 |
I want to create an activity with a horizontal scrollview. The content of the scrollview will be three different linearlayouts. Each of these linearlayouts should take up a full width of the device screen. So when the activity start there is only one linearlayout taking up the full width of the screen and when the user swipe to the right another linearlayout will show in the full width. (see picture)
I'm not sure how to set the width of the linearlayouts so they will fit the width of the screen. Any ideas on how to solve this in a good way?

|
Android: Horizontal scrollview with three linear layouts
|
CC BY-SA 3.0
| 0 |
2011-04-19T09:15:56.317
|
2014-07-04T07:29:31.783
|
2014-07-04T07:29:31.783
| 1,367,622 | 611,494 |
[
"android",
"scrollview",
"android-linearlayout"
] |
5,714,145 | 1 | null | null | 0 | 2,769 |
I am working on a BI application in WPF. I am in the process of designing its architecture and am in search of a way to directly bind controls in the view to a xml which contains the metadata of the view. Do you think this is going to be possible? then how? or is it advisable to read off from the xml and generate the views accordingly?
Properties such as colors of charts, who created the chart, the next chart upon drilling down a chart, the user names and their passwords, user group names etc. are stored in XML files. When a user starts the application the dashboards he has created should be displayed; this happens with the retrieval of data from the back end and by assigning the correct chart colors. So if these data are available in the XML, my question is the best way to generate the charts and dashboards upon user request.

As I explained earlier as well, the problem is to store the metadata related to this application in the most efficient and structured way to call back upon a user loging in.
Thanks in advance.
|
XML Based Meta Data Driven WPF Application
|
CC BY-SA 3.0
| 0 |
2011-04-19T09:16:46.717
|
2013-10-17T13:26:37.427
|
2011-04-21T09:57:57.183
| 557,022 | 557,022 |
[
"c#",
"wpf",
"mvvm",
"wpftoolkit"
] |
5,714,160 | 1 | 5,727,159 | null | 1 | 3,403 |
I just updated the jQuery Mobile version of our client book-in page to the latest 1.0a4.1 and I need some help debugging a window sizing issue off-site (I'm not on location).
The page runs on an iPad at the store so clients can book in their own cases. However, the page is being displayed like it's on an iPhone with huge lettering. "Emulating" with Ripple shows everything as it should, though.
I can't debug it from here and I'm not using any other CSS besides the base 1.0a4.1 stylesheets. How do I force jQuery Mobile to display the page as if on an iPad?
## Here is a screenshot sent by the store clerk:

|
jQuery Mobile 1.0a4.1 iPad Viewport Size
|
CC BY-SA 3.0
| null |
2011-04-19T09:18:11.023
|
2011-04-20T07:50:18.383
| null | null | 198,927 |
[
"ipad",
"jquery-mobile",
"viewport"
] |
5,714,175 | 1 | null | null | 3 | 326 |
I am trying to achieve the following with the Java API:

for this purpose I am using the default schema/example GLOBAL from the Oracle OLAP download section.
This is the modified version of the code from the Oracle OLAP Java guide:
```
MdmCube unitsCube =
(MdmCube)mdmDBSchema.getTopLevelObject("PRICE_CUBE_AWJ");
MdmBaseMeasure mdmUnits =
(MdmBaseMeasure)unitsCube.getMeasure("UNIT_PRICE");
NumberSource units = (NumberSource)mdmUnits.getSource();
MdmPrimaryDimension mdmPRODDim = (MdmPrimaryDimension)mdmDBSchema.getTopLevelObject("PRODUCT_AWJ");
MdmLevelHierarchy mdmPRODHier = (MdmLevelHierarchy)mdmPRODDim.getDefaultHierarchy();
StringSource custHier = (StringSource)mdmPRODHier.getSource();
StringSource prodHier = (StringSource)mdmPRODHier.getSource();
Source famSel =
prodHier.selectValues(new String[] {"PRODUCT_PRIMARY::FAMILY::ACC",
"PRODUCT_PRIMARY::FAMILY::OS"});
Source querySource2 = units.join(timeSel).join(famSel).join(mdmPRODHier.getSource());
```
The result of the above query is a Cartesian product, and each family is matched with each product hierarchy as:
```
7: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY1999--------*35.99375*--------)
8: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY2000--------*32.9807070707071*--------)
9: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::ACC--------CALENDAR_YEAR::YEAR::CY2001--------*36.8141666666667*--------)
10: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY1999--------*58.3433333333333*--------)
11: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY2000--------*62.113125*--------)
12: (PRODUCT_PRIMARY::CLASS::HRD--------PRODUCT_PRIMARY::FAMILY::OS--------CALENDAR_YEAR::YEAR::CY2001--------*65.7258333333333*--------)
```
As we can see here it did a match of the `HRD` (Hardware) with `ACC` (Accessories) and it has a value, but is should not have, as the `ACC` belongs to the class `SFT` (Software). See the attached screenshot for reference.
Is there a way to make an exclusion, so that when I join those two sources, only values that are possible are shown, meaning in this case that the `ACC` would only be shown under the `SFT` class as in the screenshot.
All help is more than welcome,
Thank you.
|
Oracle OLAP Java implementation - Proper source joining
|
CC BY-SA 3.0
| 0 |
2011-04-19T09:19:57.467
|
2011-04-25T23:46:11.567
| null | null | 222,159 |
[
"java",
"oracle",
"oracle-olap"
] |
5,714,202 | 1 | 5,714,834 | null | 0 | 413 |
Hi in my iPhone App I am implementing coreplot VarticalBar Chart
Though I am taking Larger value For Y axis but It is displaying upto certain limit only as shown in image it is displaying bar upto N500000 only but Actually I am Passing Larger Value. (I am Passing value through Graph Array given below)
What could be the problem??
Please Help.
Here is the Image and code,

Here I am Passing value for YRange
plotSpace.yRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(-5000000) length:CPDecimalFromFloat(10000000)];
plotSpace.xRange = [CPPlotRange plotRangeWithLocation:CPDecimalFromFloat(0.0f) length:CPDecimalFromFloat(21.0f)];
code for Generating Y axis labels
```
CPXYAxis *y = axisSet.yAxis;
y.axisLineStyle =nil;
y.majorTickLineStyle = nil;
y.minorTickLineStyle = nil;
y.majorIntervalLength = CPDecimalFromString(@"2500000");
y.orthogonalCoordinateDecimal = CPDecimalFromString(@"0.0");
```
Here I am giving value of Tick mark Location
```
NSArray *marginArray =[NSArray arrayWithObjects:
[NSDecimalNumber numberWithInt:-5000000],
[NSDecimalNumber numberWithInt:-2500000],
[NSDecimalNumber numberWithInt:00],
[NSDecimalNumber numberWithInt:2500000],
[NSDecimalNumber numberWithInt:5000000],
[NSDecimalNumber numberWithInt:7500000],
[NSDecimalNumber numberWithInt:10000000],
nil];
```
Here I am giving Label Name
```
y.labelingPolicy = CPAxisLabelingPolicyNone;
NSArray *yAxisLabels1 = [NSArray arrayWithObjects:@"-N5000000", @"-N2500000",@"N0",@"N2500000",@"N5000000", @"N7500000",@"N10000000", nil];
```
.
```
int labelLocation1;
labelLocation1 = 0;
NSMutableArray *custLabels1 = [NSMutableArray arrayWithCapacity:[yAxisLabels1 count]];
NSLog(@" %d",[yAxisLabels1 count]);
for (NSNumber *tickLocat1 in marginArray)
{
CPAxisLabel *newLabel1 = [[CPAxisLabel alloc] initWithText: [yAxisLabels1 objectAtIndex:labelLocation1++]
textStyle:y.labelTextStyle];
newLabel1.tickLocation = [tickLocat1 decimalValue];
newLabel1.offset = 3.0;//y.labelOffset;
[custLabels1 addObject:newLabel1];
[newLabel1 release];
}
y.axisLabels = [NSSet setWithArray:custLabels1];
y.majorTickLocations = [NSSet setWithArray:marginArray];
y.title = @"Y Axis";
y.titleOffset = 45.0f;
y.titleLocation = CPDecimalFromFloat(150.0f);
```
I am Passing this Array for ploting graph
```
NSArray *roiGraph = [NSArray arrayWithObjects:
[NSDecimalNumber numberWithInt:-5000000],
[NSDecimalNumber numberWithInt:5000],
[NSDecimalNumber numberWithInt:10000000],
[NSDecimalNumber numberWithInt:-5000000],
[NSDecimalNumber numberWithInt:9000000],
[NSDecimalNumber numberWithInt:20005],
[NSDecimalNumber numberWithInt:50000],
[NSDecimalNumber numberWithInt:7500000],
[NSDecimalNumber numberWithInt:400000],
[NSDecimalNumber numberWithInt:220000],
nil];
```
|
iPhone COREPLOT: Barchart not displaying properly
|
CC BY-SA 3.0
| null |
2011-04-19T09:22:11.623
|
2011-04-19T10:15:27.503
|
2011-04-19T10:11:50.157
| 531,783 | 531,783 |
[
"iphone",
"cocoa-touch",
"core-plot"
] |
5,714,318 | 1 | 5,714,405 | null | 1 | 1,006 |
The JavaScript `alert` box is appearing without close mark on top right side nor its showing any alert symbol as shown below.

The same in IE8 works fine

Both are running on Windows 7 platform
|
javascript alert box not working in FireFox4
|
CC BY-SA 3.0
| null |
2011-04-19T09:31:32.333
|
2011-04-19T09:38:25.877
| null | null | 11,114 |
[
"firefox",
"internet-explorer-8"
] |
5,714,477 | 1 | null | null | 3 | 2,404 |
I was looking for a plugin to create a smart location form field which has a suggested autocomplete. I was unable to find anything suitable (Google Geocode is too unreliable on its own, and it isn't designed for this) so I built my own. I thought it was crazy that in 2011 an open-source global location input plugin like this didn't exist so set out to give it a go.
The demo is here [http://labs.unxposed.net/unxposed/geocode/](http://labs.unxposed.net/unxposed/geocode/) and is working on Chrome and Firefox 4. Download is here [https://github.com/unxposed/geocode](https://github.com/unxposed/geocode)
There is one major issue I am having with it. Sometimes it works great like so. On typing in the input I get a list of suggestions back. The input is autofilled with the first suggestion back matching and the input text after is selected (much like the Chrome address bar).

However, much of the time the autofill selected text in the input becomes unhighlighted and the cursor then moves to the end of the input (which is really annoying). Like so - after I type .

I am pretty sure this is related to Google Maps as if I remove the secondary source (Google Geocode) the issue is resolved and autofill/input select works great consistently, but why is this happening, and how can I fix it?
Any other improvements/optimisations/suggestions would be greatly appreciated too!
Thanks
|
Global location input autocomplete
|
CC BY-SA 3.0
| null |
2011-04-19T09:45:14.680
|
2013-12-05T19:05:38.710
| null | null | null |
[
"jquery",
"jquery-plugins",
"autocomplete",
"geolocation",
"geocoding"
] |
5,714,508 | 1 | 7,285,880 | null | 13 | 11,369 |
I am using the Publish / Web Deploy option within VS 2010 to publish my ASP.NET MVC3 website.
However it does not by default publish my "files" folder that I have highlighted below.

Any ideas how I can get this file included during publishing?
Thanks Paul
|
Folder not uploading with VS Publish / Web Deploy
|
CC BY-SA 3.0
| 0 |
2011-04-19T09:48:29.517
|
2023-01-17T04:16:48.043
|
2011-04-19T12:40:20.710
| 545,490 | 545,490 |
[
"visual-studio-2010",
"asp.net-mvc-3",
"webdeploy",
"one-click-web-publishing"
] |
5,714,542 | 1 | 5,717,202 | null | 2 | 1,606 |
In Delphi, by using the Skype API, I can send a message to a contact fairly easy. However, what I am trying to do, is enter the message in the Chat Box of the currently focused Contact, without sending the message.
By using Winspector, I found that the Classname of the Chatbox is TChatRichEdit, which is placed on a TChatEntryControl, which is placed on a TConversationForm, and finally, which is placed on the tSkMainForm. (Obviously the Skype Client is coded in Delphi ;) )
By using the Win API, how can I find the correct , and then enter a message into it?
What would be the best way to go about this?
Also, the TConversationForm contains the name of the contact aswell, so I guess that makes it a bit easier?
EDIT: Here is a screenshot of Windspector Spy, showing the TChatRichEdit:

Here is my current code:
```
function GetConversationWindow(Wnd: HWnd; P: LParam): Bool; stdcall;
var
Param: PGetConversationParam;
ProcID: DWord;
// WndClass docs say maximum class-name length is 256.
ClassName: array[0..256] of Char;
WindowTitle: array[0..256] of Char;
begin
Result := True; // assume it doesn't match; keep searching
Param := PGetConversationParam(P);
GetWindowThreadProcessID(Wnd, @ProcID);
if ProcID <> Param.ProcID then
Exit;
if GetClassName(Wnd, ClassName, Length(ClassName)) = 0 then
Exit;
if StrComp(ClassName, 'TConversationForm') <> 0 then
Exit;
if SendMessage(Wnd, wm_GetText, Length(WindowTitle), LParam(@WindowTitle[0])) = 0 then
Exit;
if Param.ContactName = WindowTitle then begin
Param.Result := Wnd;
Result := False;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Param: TGetConversationParam;
RichEditWnd, ControlWnd : HWND;
ParentWnd : HWND;
begin
//Param.ProcID := GetSkypeProcessID;
Param.ContactName := 'xSky Admin';
ParentWnd := FindWindowEx(0,0,'tSkMainForm',nil);
if EnumChildWindows(ParentWnd,@GetConversationWindow, LParam(@Param)) then
Abort; // Didn't find it.
// Param.Result holds the conversation window's handle. Now walk its children.
ControlWnd := FindWindowEx(Param.Result, 0, 'TChatEntryControl', nil);
if ControlWnd = 0 then
Abort; // Conversation doesn't have an entry control
RichEditWnd := FindWindowEx(ControlWnd, 0, 'TChatRichEdit', nil);
if RichEditWnd = 0 then
Abort;
ShowMessage('Got it!');
end;
```
I never reach the ShowMessage.
Here is a screenshot of my IDE in Debug Mode:

I added a breakpoint at the Abort Line.
Any ideas?
|
Finding & using the currently active Chatbox in the Skype Client thru the WinAPI & Delphi?
|
CC BY-SA 3.0
| 0 |
2011-04-19T09:51:14.987
|
2011-07-15T10:52:47.443
|
2011-04-25T11:12:51.800
| 561,545 | 561,545 |
[
"windows",
"delphi",
"winapi",
"skype",
"handles"
] |
5,714,711 | 1 | 5,716,091 | null | 1 | 1,576 |
I have an ActionScript only Flash Builder 4 project of which i know that it was successfully exported for AIR 2.0
If I set the the Flex SDK to 'Hero' and the required AIR version to 2.6 in the app-descriptor like here, then the export works fine:

However - if I change the Flex SDK to 4.0 (overlayed with the AIR 2.0.2 SDK) and change the version in the app-descriptor.xml to 2.0 like here:

then it will compile just fine and run in ADL, but it won't export. If i click the "Finish" button, the window only flashes for a moment but nothing happens. i can repeatedly click on finish, just a short flash, no error message, no exported air file.
If I leave the Flex SDK on 'Hero' and the only thing I do is to change 2.6 in the app-descriptor.xml to 2.0, then the same problem occurs!
I tried this with Flash Builder 4 as well as Flash Builder Burrito - in both cases the same problem.
Anyone an idea what goes wrong?
|
Flash Builder / AIR: Can't export release build for AIR 2.0
|
CC BY-SA 3.0
| 0 |
2011-04-19T10:06:06.150
|
2011-04-19T14:46:52.973
| null | null | 677,406 |
[
"apache-flex",
"actionscript-3",
"air",
"flash-builder"
] |
5,715,290 | 1 | 5,715,363 | null | 0 | 1,562 |
We are evaluating Sonar and I've set up an Ant task to import my project data into Sonar using the instructions [here](http://docs.codehaus.org/display/SONAR/Analyse+with+ANT) but my libraries aren't appearing in the libraries view.
Apart from this it is working as all the other information is there.
Maybe I've misunderstood what the libraries element is for in the Ant task? Please can someone tell me what I'm missing?

From my build file:
```
<target name="sonar">
<sonar:sonar workDir="sonartemp" key="org.example:example" version="0.1-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant">
<!-- source directories (required) -->
<sources>
<path location="src/common/src" />
<path location="src/commonWidgets/src" />
<path location="src/compositionWidget/src" />
<path location="src/nativeLib/src" />
<path location="src/services/src" />
</sources>
<!-- list of properties (optional) -->
<property key="sonar.projectName" value="Test RPS Composition Import" />
<property key="sonar.dynamicAnalysis" value="true" />
<!-- test source directories (optional) -->
<tests>
<path location="src/common/test" />
<path location="src/commonWidgets/test" />
<path location="src/compositionWidget/test" />
<path location="src/services/test" />
</tests>
<!-- binaries directories, which contain for example the compiled Java bytecode (optional) -->
<binaries>
<path location="src/common/build" />
<path location="src/commonWidgets/build" />
<path location="src/compositionWidget/build" />
<path location="src/services/build" />
</binaries>
<!-- path to libraries (optional). These libraries are for example used by the Java Findbugs plugin -->
<libraries>
<path location="src/common/lib/**/" />
<path location="src/commonWidgets/lib/**/" />
<path location="src/compositionWidget/lib/**/" />
<path location="src/services/lib/" />
</libraries>
</sonar:sonar>
</target>
```
|
Why are my libraries not being imported into Sonar when using the Ant task?
|
CC BY-SA 3.0
| null |
2011-04-19T10:58:21.440
|
2011-04-19T11:04:35.263
| null | null | 137,969 |
[
"ant",
"sonarqube"
] |
5,715,469 | 1 | 5,716,132 | null | 1 | 744 |
I have query generated by SqlCommandBuilder catched by Profiler.
```
exec sp_executesql
N' INSERT INTO [BP_PackageData] (pad_ID, pad_Data)
VALUES (@p1, @p2)',
N'@p1 uniqueidentifier,@p2 image',
@p1='B265C322-6581-4705-B659-DB9C455C7263',@p2=0x0
```
It works fine on my sql 2008 but on 2005 I get:
```
Msg 213, Level 16, State 1, Line 1
Insert Error: Column name or number of supplied values does not match table definition.
```
Structure of table is

Any ideas what settings can make this work fine?
|
Why good insert throws 'Column name or number of supplied values does not match table definition.'
|
CC BY-SA 3.0
| null |
2011-04-19T11:14:12.950
|
2011-04-19T12:12:37.260
|
2011-04-19T11:16:34.950
| 406,531 | 406,531 |
[
"sql-server",
"sql-server-2005"
] |
5,715,473 | 1 | null | null | 10 | 9,107 |
I have a very strange problem: I am trying to export a Jasper report containing Unicode characters (greek) as a PDF. My problem is that a specific greek character (the character delta) is printed in a different font face from the one I am using (Arial) !
The following image is copied from the exported pdf:

While the following image is the same text from MS Word using the same font:

As you can see, the third letter (delta) is different from the others. This happens ONLY for this letter, for all font sizes. I also tried to change the font to garamond, but still got the same problem with exactly the same letter !
Finally, I should add that the internal preview from iReport is ok, also ok is the export to other formats like docx or html ...
I also tried to open the pdf with Foxit reader portable - but had exactly the same behaviour as with Adobe Acrobat Reader.
I have created a [snippet in pastebin](http://pastebin.com/UFkHTDhr) that generates the problem when exported to pdf. One warning - you have to "install" the font you will use (Arial in my case) through "Options - Fonts" of iReport or else you won't be able to see anything at all in the pdf.
Well since there are people (probably from Greece) that still have the same problem and view this question, I'd like to make another update: I started using again Jasper reports, however now I am using a newer version of Jasper (Jasper 5) and iReport (iReport 5). Everything is working ok now -- no problematic deltas in PDFs :) So just try upgrading your iReport and Jasper libraries if you experience the same problem !!
After two years, I was able to work again on the system with the problematic greek character (delta) and was able to draw some final conclusions about the problem: So, first I upgraded the version of Jasper we were using to 5.x and still experienced the problem ! The problem was fixed only when I changed the included font extension (.jar) with a new one that I created (exported) from iReport 5.x. So, the problem was that when exporting the font extension, iReport 3.x (which was used to export the old extension) didn't export the greek character delta correctly, while iReport 5.x exports it fine. So my suggestion is still true: Any people having this problem upgrade your Jasper version to 5.x but also re-export your font extensions through iReprot 5.x. I really hope I won't do any more updates to this :)
|
Jasper reports with PDF and Unicode (greek) characters
|
CC BY-SA 3.0
| 0 |
2011-04-19T11:14:19.427
|
2013-04-05T16:17:09.457
|
2013-04-05T16:17:09.457
| 119,071 | 119,071 |
[
"pdf",
"unicode",
"jasper-reports",
"ireport"
] |
5,715,710 | 1 | null | null | 0 | 342 |
I am building a classifier for some 2D data.
I have some training data for which I know the classes and have plotted these on a graph to see the clustering.
To the observer, there are obvious, separate clusters, but unfortunately they are spread out over lines rather than in tight clusters. One line-spread goes up at about an 80 degree angle, another at 45 degree and another at about 10 degrees from horizontal, but all three seem to point back to the origin.

I want to perform a nearest-neighbour classification on some test data, and from the looks of things, if the test data is very similar to the training data a 3-nearest-neighbour classifier would work fine, except when the data is close to the origin of the graph, in which case the three clusters are quite close together and there might be a few errors.
Should I be coming up with some estimated gaussian distributions for my clusters? If so, I'm not sure how I can combine this with a nearest neighbour classifier?
Be grateful for any input.
Cheers
|
k-nearest neighbour classifier but using a distribution?
|
CC BY-SA 3.0
| null |
2011-04-19T11:34:20.003
|
2012-09-12T08:34:12.563
|
2011-05-11T18:12:26.687
| 86,643 | 2,106,959 |
[
"statistics",
"knn"
] |
5,715,769 | 1 | 6,030,572 | null | 0 | 1,698 |
I have a ComboBoxTool on an UltraToolbarsManager implementing a ribbon control. No matter what I set the ToolTipText to it always displays a tooltip:

[e.g. mousing over the gdg combo show this]
I have tried setting all the other tooltip related attributes (ToolTipTextFormatted, ToolTipTitle) to null but this doesn't help.
- - -
I have also tried setting-up a very simple ribbon on a dummy project and that does not exhibit this strange behaviour. So it is something else that is effecting this.
|
How to prevent unwanted tooltip pop-up in Infragistics ComboBoxTool on ribbon control (winforms)
|
CC BY-SA 3.0
| null |
2011-04-19T11:38:52.277
|
2015-11-24T15:04:15.207
| null | null | 18,349 |
[
"winforms",
"tooltip",
"infragistics"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.