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
sequence
3,485,592
1
3,485,702
null
0
446
I'm struggling with Haskell programming. I've got the list below and I want to make it stack on each other, so it'd be like 3 x 4 pixel image. eg: ![pixel image](https://imgur.com/78GPr.png) and how can I change the value of the first row or second ... eg: say like I want to make it darker or whiter (0 represents black and 255 represents white) ``` type Pixel = Int type Row = [Pixel] type PixelImage = [Row] print :: PixelImage print = [[208,152,240,29],[0,112,255,59],[76,185,0,152]] ``` The code I've got here does not stack the list and I don't know how to stack it. Please help, I'm really struggling with this. Thanks in advance!
Haskell list help!
CC BY-SA 2.5
null
2010-08-14T23:43:06.100
2010-08-15T02:49:54.680
2010-08-15T01:32:04.207
123,109
324,753
[ "haskell" ]
3,486,311
1
3,486,330
null
0
519
There are two classes Person and Employee ![alt text](https://farm5.static.flickr.com/4102/4892446643_74d733cbc2.jpg) when it mapped to c# code ``` public class Person { private string Name; } public class Employee : Person { private string Department; public string GetName() { return "Person Name"; } } ``` My question is where can i write the getters and setters for this private attributes.is it ok to write them with in the same Person and Employee classes if yes isn't there a problem with mapping? because methods are also with in the same class(GetName()) or do i have to use separate classes for writing getters and setters.i'm confused with this class diagram mapping with the code.Can any one resolve this for me??
UML mapping with c#
CC BY-SA 2.5
null
2010-08-15T05:22:11.197
2010-08-15T05:36:02.870
2017-02-08T14:30:07.543
-1
367,562
[ "c#", "class-design", "uml", "class-diagram" ]
3,486,803
1
null
null
0
200
i need help to fix my visual basic 6.0. When vb6 start ups, It shows some Microsoft Offices Setup configuration that shows at everytime. If i cancel, I can continue the VB6, But some of component always shows this installation setup again. When I restart the VB Program, The setup configuration also shows everytime... Any ideas to fix this? This really eat more times. ![enter image description here](https://i.stack.imgur.com/QQeqw.png)
Office Setup Configuration
CC BY-SA 3.0
null
2010-08-15T09:10:15.490
2013-07-24T17:40:15.960
2013-07-24T17:40:15.960
1,065,525
420,875
[ "vb6", "ms-office" ]
3,487,412
1
3,487,951
null
2
4,692
I want to write a program that can create random collages from a given folder of pictures. To begin, I want to create a simple collage from three images. Something like this: ![alt text](https://i.imgur.com/I5AHe.png) I have almost no code right now ``` clc; clear all; close all; a = imread('a.png'); b = imread('b.png'); c = imread('c.png'); % create a new image of size X x Y % for a simple collage % place a in the top half % place b in the bottom left % place c in the bottom right ``` How can this be done in MATLAB? --- How can I , and then place the individual images on a canvas, so that I can have the complete freedom while creating the collage? The image placement might so happen that the images lie outside the canvas area. ![alt text](https://i.imgur.com/JrrpZ.png) Stretching images to form is collage is one way, but I want to be able to stretch and place them
How can I create a collage in MATLAB?
CC BY-SA 2.5
0
2010-08-15T12:48:54.800
2010-08-16T14:33:55.033
2010-08-16T05:30:37.947
113,124
113,124
[ "image", "matlab", "image-processing" ]
3,487,990
1
null
null
8
5,192
Why can't I drag tables from the Server Explorer to the .edmx designer pane? I've done this before in the exact same steps and it worked, but since yesterday instead of getting the classic + sign for dropping items, I get the no entry symbol (circle with slash in the middle). What am I doing wrong? As I said, I've done this before but now it doesn't let me drag things. ![alt text](https://i.imgur.com/pZKRm.jpg)
Cannot drag tables from Server Explorer to .edmx designer pane
CC BY-SA 2.5
null
2010-08-15T15:25:36.143
2016-05-24T15:00:12.983
null
null
112,355
[ "entity-framework" ]
3,488,299
1
3,488,892
null
3
168
I'm following [this iPhone tutorial from Apple](http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhone101/Articles/00_Introduction.html) and I think I did everything correctly, however the app is not behaving as it should. I checked the troubleshooting section and I still think I got things right. So I guess I need help to tell where the problem is... here is a snapshot of the relevant connections in Interface Builder. Basically, the keyboard's Done button doesn't dismiss the keyboard, and the Hello button from the view doesn't trigger the changeGreeting method. If you can't tell what's missing, just ask for me to post some code or whatever is relevant. Thanks! ![IB connections](https://imgur.com/6ZT0S.jpg) This is in the controller: ``` - (BOOL)textFieldShouldReturn:(UITextField *)theTextField { if (theTextField == textField) { [textField resignFirstResponder]; } return YES; } ``` Edit: I'm an idiot, I hadn't saved the nib file, thought I had. Sorry!
Apple's iOS tutorial not working correctly, what did I miss?
CC BY-SA 2.5
0
2010-08-15T16:50:40.157
2010-08-15T19:31:54.803
2010-08-15T18:59:51.450
17,138
17,138
[ "iphone", "cocoa-touch" ]
3,488,998
1
3,490,871
null
3
422
We have - [BigTable from Google](http://en.wikipedia.org/wiki/BigTable)- [Hadoop, actively contributed by Yahoo](http://en.wikipedia.org/wiki/Hadoop)- [Dynamo from Amazon](http://en.wikipedia.org/wiki/Dynamo_(storage_system)) all aiming towards one common goal - . By scalability what I understand is that the cost of the usage should not go up drastically when the size of data increases. RDBMS's are slow when the amount of data is large as the number of indirections invariable increases leading to more IO's. ![alt text](https://i.imgur.com/ZPYxU.png) This is a figure from [this document](http://labs.google.com/papers/bigtable-osdi06.pdf) explaining Google BigTable: ![alt text](https://i.imgur.com/JYoxJ.png) Looks the same to me.
How do the newer database models achieve better scalability and performance as compared to a traditional RDBMS implementation?
CC BY-SA 2.5
0
2010-08-15T20:00:10.970
2010-08-16T10:43:05.477
2010-08-16T09:42:40.063
182,959
182,959
[ "database", "algorithm", "database-design", "rdbms", "bigtable" ]
3,489,305
1
null
null
2
352
Most of the time the ListBox appears like this: ![alt text](https://imgur.com/5T01r.png) But every once in a while it looks like this: ![alt text](https://imgur.com/Vwuf8.png) Any idea of what is going wrong? I removed the control templates from the question, because when I removed them from my program the problem still existed. Is this a WPF bug?
ListBoxItem border is sometimes hidden behind the ListBox's scrollbar
CC BY-SA 3.0
0
2010-08-15T21:18:20.477
2012-01-05T13:41:42.853
2011-09-26T14:12:49.153
546,730
268,336
[ "wpf", "listbox", "listboxitem" ]
3,489,410
1
3,489,430
null
6
516
I recently started reading OpenGL Superbible 5th edition and noticed the following: ![Equation in question](https://i.stack.imgur.com/2jMWHl.jpg) Having just taken linear algebra this seemed odd to me. The column vector is of dimension 4x1 and the matrix is 4x4, how is it possible to multiply them together? If the vector were a row-vector and the output were a row vector I agree that it would be possible, but this? Update: I emailed the author and he said that I was correct. He noticed the order was wrong in the previous edition of the book, however it ended up not being fixed in the 5th edition.
OpenGL Superbible linear algebra - is this correct?
CC BY-SA 2.5
0
2010-08-15T21:46:21.570
2011-10-12T09:24:27.587
2010-08-17T05:15:32.447
257,533
257,533
[ "opengl", "linear-algebra" ]
3,490,351
1
5,958,109
null
0
416
I want to create a custom tab bar for an iphone app that looks like this image: ![Custom Tab Image](https://i.stack.imgur.com/ld5M1.jpg) there would be multiple clickable semi-circles at the top that would switch tabs. Each tab would have some buttons or other UI items under the semi-circles that allow you to interact with the display at the top. It seems that the iphone tab bar controller is only for a certain fixed look. Can I reuse those classes to do what I need? Any good examples of this?
custom iphone tab bar area
CC BY-SA 3.0
0
2010-08-16T03:15:06.503
2011-10-18T06:48:53.843
2011-10-18T06:48:53.843
64,272
241,718
[ "iphone", "uitabbarcontroller" ]
3,490,441
1
3,490,579
null
0
9,440
How can I add an image to my program in XAML? I want to display the 'no.png' image on my application. Also, ![alt text](https://i.imgur.com/TYXlQ.jpg) I need both yes and no to appear in the same place. My plan was to set them both to hidden and display them only when necessary. How can I do this?
Adding an Image in xaml code?
CC BY-SA 2.5
null
2010-08-16T03:42:18.370
2010-08-17T11:32:59.213
null
null
null
[ "xaml", "windows-phone-7" ]
3,491,015
1
3,498,735
null
2
1,358
I have a toolbar being displayed on the top of scroll view. When I call invalidate on scroll view, I realize both toolbar and scroll view are having screen flickering problem. I try to have a workaround, by overriding their erase background event handler. This method works for scroll view, but not the toolbar. Here is my code snippet. ``` void MyCScrollView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); // ToolBar is NonFlickeringCToolBar, inherited from CToolBar ToolBar.Create(this); ToolBar.LoadToolBar(IDR_TOOLBAR); ToolBar.ShowWindow(SW_SHOW); ToolBar.SetBarStyle(CBRS_ALIGN_TOP | CBRS_SIZE_FIXED); RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0); } BOOL MyCScrollView::OnEraseBkgnd(CDC* pDC) { // Override to prevent screen flickering. Works! return TRUE; } BOOL NonFlickeringCToolBar::OnEraseBkgnd(CDC* pDC) { // Override to prevent screen flickering. Doesn't work! return TRUE; } ``` Here is the screen shoot before I override the erase background event handler. ![alt text](https://sites.google.com/site/yanchengcheok/Home/before-mfc.PNG) Here is the screen shoot after I override the erase background event handler. Not that, toolbar still keep flickering, with additional problem : its solid background gone till I swing my mouse cursor over its body. ![alt text](https://sites.google.com/site/yanchengcheok/Home/after-mfc.PNG) I wish 1. Make scroll view and toolbar both non-flickering 2. Solid background for toolbar still there Anything I had missed out?
Prevent screen flickering for CScrollView and CToolBar
CC BY-SA 2.5
null
2010-08-16T06:23:53.437
2010-08-17T01:47:08.873
null
null
72,437
[ "mfc" ]
3,491,093
1
3,508,549
null
0
261
This doesn't work ``` panel1.layout: layout [ offset: 0x0 yuml-image: image img ] panel2.layout: layout [ offset: 0x0 area (yuml-command0) yellow ] panelbuttons.layout: layout [ button "Save" [request-save] button "Refresh" [request-refresh] button "Quit" [quit] ] Main: layout [ panel1: box 640x300 white return panelbuttons: box 640x20 return panel2: box 640x180 yellow ] panel1/pane: panel1.layout panel2/pane: panel2.layout panelbuttons/pane: panelbuttons.layout view/title/options center-face Main "askuml.com" [no-border] ``` I just wanted the equivalent of this: ``` Main: layout [ offset: 0x0 yuml-image: image img return across button "Save" [request-save] button "Refresh" [request-refresh] button "Quit" [quit] return area (yuml-command0) yellow ] ``` Also why do I have a border whereas I asked offset 0x0 see the ugly grey border below: [alt text http://askuml.com/files/2010/07/uml-online-tool.gif](http://askuml.com/files/2010/07/uml-online-tool.gif) Update: now I have this ugly window [alt text http://askuml.com/files/2010/07/vid-ugly.gif](http://askuml.com/files/2010/07/vid-ugly.gif) see [http://askuml.com/blog/yuml-use-case-desktop-client/](http://askuml.com/blog/yuml-use-case-desktop-client/) I updated the code now I can't see the (even your :)) buttons: ![alt text](https://i.stack.imgur.com/yVFUO.gif)
problem with rebol vid panel and offset 0x0
CC BY-SA 2.5
null
2010-08-16T06:40:23.310
2010-08-23T13:19:54.670
2010-08-17T19:40:31.920
211,160
2,687,173
[ "user-interface", "layout", "rebol" ]
3,492,721
1
3,492,911
null
6
33,432
I have a `RelativeLayout`, and this Layout has two childs, one is a `MapView` and the other a `RelativeLayout` that contains a button. I want it to look like that ![](https://pocketjourney.files.wordpress.com/2008/03/goal.gif) but my transparent box (a `RelativeLayout`) is always displayed at the top of the map. ``` <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <com.google.android.maps.MapView android:id="@+id/mapView"/> <test.project.TransparentPanel android:layout_width="fill_parent" android:layout_width="fill_parent"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Click Me!"/> </test.project.TransparentPanel> </RelativeLayout> ``` (i've left out some things in the code)
How to place a RelativeLayout at the bottom of a RelativeLayout?
CC BY-SA 3.0
0
2010-08-16T11:38:36.817
2014-07-17T22:59:11.903
2017-02-08T14:30:10.773
-1
401,025
[ "android", "android-linearlayout", "android-relativelayout" ]
3,494,476
1
4,275,812
null
6
5,157
I'm playing around with some keyboard development and try to show a pop-up dialog when a certain key is pressed ``` if (primaryCode == -301) { AlertDialog mDialog = new AlertDialog.Builder(CONTEXT) .setTitle("My dialog") .setMessage("Lets do it.") .setPositiveButton("ok", null).create(); mDialog.show(); } ``` However, the problem is the `CONTEXT` part. In a normal application it would just be `this`. I also tried `getApplicationContext()` and `getBaseContext()`, but neither of those works -> keyboard crashes. > android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application So I'm wondering if I have to do something with [InputConnection](http://developer.android.com/reference/android/view/inputmethod/InputConnection.html): > The InputConnection interface is the communication channel from an InputMethod back to the application that is receiving its input. It is used to perform such things as reading text around the cursor, committing text to the text box, and sending raw key events to the application. So far I wasn't able to figure out how. I definitely know it's possible, since I have seen it before. I someone could point me in the right direction that would definitely be appreciated. --- To provide a better picture of what I try to achieve I uploaded a screenshot of the Swype keyboard, which does exactly that: showing a pop-up dialog when a special key gets pressed on the keyboard. ![Swype pop-up dialog](https://i.stack.imgur.com/r6Dro.png)
Android IME: how to show a pop-up dialog?
CC BY-SA 2.5
null
2010-08-16T15:10:13.030
2020-03-17T19:17:39.123
2010-08-17T12:54:01.307
184,367
184,367
[ "android", "keyboard", "ime" ]
3,494,496
1
3,495,535
null
1
396
There are many tables nested inside as it showd in the following three images. Please give an idea so that I can see the circled images fully in the third image.. ps: if you want any html code of o a part, I can share it here on request.. [alt text http://img148.imageshack.us/img148/5750/21619773.jpg](http://img148.imageshack.us/img148/5750/21619773.jpg) [alt text http://img408.imageshack.us/img408/2884/30078896.jpg](http://img408.imageshack.us/img408/2884/30078896.jpg) ![alt text](https://i.stack.imgur.com/L0bfr.jpg) ![alt text](https://i.stack.imgur.com/Deznn.jpg)
how can I enlarge the boundaries of an html table
CC BY-SA 2.5
null
2010-08-16T15:11:58.363
2010-08-17T07:18:42.140
2010-08-17T07:18:42.140
173,718
173,718
[ "c#", "asp.net", "html" ]
3,494,536
1
null
null
2
4,654
Here's a screenshot:![alt text](https://i.imgur.com/e7eHc.jpg) How can I display the 'no.png' image? It seems changing it to Resource worked. How can I change the image in my code-behind c# file? ``` imgStatus.Source = new ur??? ```
The file is not part of the project or its build action property is not set to resource
CC BY-SA 2.5
null
2010-08-16T15:17:19.373
2011-11-13T12:28:42.970
2010-08-16T15:24:34.987
null
null
[ "silverlight", "image", "xaml" ]
3,495,364
1
3,526,097
null
1
12,572
I'm working with an embedded (Active X?) instance of IE within a VB6 application. The browser displays demographic information based off the selected person (displayed as a list). Everything works great until I try to quickly select different people from the list (clicking randomly over different people as fast as I can). After a few clicks, get two errors. The first is an "" It says: (Line, Char, Error, Code, URL are all blank). The second error pops up directly over the first. It says: " " The page makes multiple ajax calls and also contains several iFrames (I'm thinking these are the cause). Any advice on how to debug / resolve / avoid the problem would be most appreciated. Thanks! Here is an image of the error [](https://i.stack.imgur.com/N55de.png) I get a JScript anonymous function, No source available when I do happen to catch the error. ![No Source Available](https://i.stack.imgur.com/odXFH.png) I've successfully caught some of the errors. It seems that they are stemming primarily from MicrosoftAjax.js - - - My host application is not using MicrosoftAjax.js at all, but the child iFrame applications are all asp.Net applications.
Internet Explorer Script Error, Message from Webpage, Permission denied
CC BY-SA 4.0
0
2010-08-16T16:52:22.187
2019-08-06T11:11:25.363
2019-08-06T11:11:25.363
4,751,173
402,706
[ "c#", "javascript", "asp.net", "internet-explorer" ]
3,495,692
1
3,513,877
null
0
1,525
I am trying to create a table with two groups in a BIRT report. I first group by year, and then by a criteria in a second column. Let's say this criteria is one of [A, B, C, D]. If there doesn't exist a criteria for a year, the default in BIRT is for it to be blank. For example, if 2011 didn't have any B or D criteria, my report would look like: ``` 2010 ---- A 1 B 2 C 3 D 4 2011 ---- A 5 C 6 ``` However, I want all the possible criteria to show up, even if they don't have any entries for a particular year. I tried setting the property under advanced->section->show if blank = true, but that didn't do anything. Any ideas? (I am using birt 2.6.0) The SQL query (connecting to a mysql datasource) is fairly simple: ``` SELECT year_field, decision_field, sales_field FROM databaseName ``` The report is [](http://bit.ly/9SDbNI)[http://bit.ly/9SDbNI](http://bit.ly/9SDbNI) And produces a report like: ![alt text](https://i.stack.imgur.com/CWkZR.png)
How do I show blank entries on a BIRT Table sub-group?
CC BY-SA 2.5
null
2010-08-16T17:36:40.697
2011-09-29T09:51:05.300
2010-08-18T13:19:18.387
259,525
259,525
[ "reporting", "birt" ]
3,497,143
1
null
null
0
99
Given the database design below how would you model it? Address Type is Bussiness/Home etc and the PersonId is on Address table is because there are many addresses for one Person. I would most do something like: ``` public class Person { public virtual int PersonId { get; set; } public virtual string FirstName { get; set; } public virtual string LastName{ get; set; } public virtual DateTime DOB{ get; set; } public virtual IList<Address> Addresses { get; set; } } public class Address { public virtual int AddressId{ get; set; } public virtual Person Resident{ get; set; } public virtual AddressType Location{ get; set; } public virtual string PostalCode{ get; set; } public virtual string FullAddress{ get; set; } } public class AddressType { public virtual int AddressTypeId{ get; set; } public virtual string Description{ get; set; } public virtual IList<Address> Addresses { get; set;} } ``` however I have no idea if this is appropriate. I have always done my models with objects and have never left `int`'s in place. NHibernate Mapping will easily replace these with the objects and then lazy/eager load them, so I just figure this is the best option. Opinions? ![Database Design](https://i813.photobucket.com/albums/zz57/tedsmith1/SimpleDB.png)
Domain Design and NHibernate
CC BY-SA 2.5
null
2010-08-16T20:41:54.633
2010-08-20T00:03:39.833
2017-02-08T14:30:11.797
-1
294,327
[ "nhibernate" ]
3,498,655
1
3,499,286
null
8
6,389
I'm trying to install PyDev in Eclipse 3.6 on Windows 7. I have Python 2.7 successfully installed. I installed PyDev through Eclipse, and restarted. When attempting to configure Eclipse to find my installed Python, (`Window -> Preferences`) the list that appears does not contain Python. (See image below.) If I go back to `Help -> Install New Software` to check what has been installed, PyDev appears as having been installed. I've tried quitting Eclipse and opening again, with no change. I tried uninstalling PyDev, and re-installing, with no effect. Any ideas how to get Eclipse to see PyDev? ![alt window-should-display](https://i.stack.imgur.com/FFE0F.png)
How to configure Eclipse for PyDev? Python doesn't appear in Preferences window
CC BY-SA 2.5
0
2010-08-17T01:25:31.757
2014-01-09T21:16:32.557
2010-08-17T01:57:30.747
82,474
82,474
[ "python", "eclipse", "plugins", "configuration", "pydev" ]
3,498,910
1
3,500,157
null
2
2,511
![alt text](https://i.stack.imgur.com/BMJD4.jpg)Am using the below code to create polygon. i just want to fill this polygon surface with black dots, how i can do that, then i want to convert this polygon to bitmap or in memory stream, how to do this?? ``` // Create a blue and a black Brush SolidColorBrush yellowBrush = new SolidColorBrush(); yellowBrush.Color = Colors.Transparent; SolidColorBrush blackBrush = new SolidColorBrush(); blackBrush.Color = Colors.Black; // Create a Polygon Polygon yellowPolygon = new Polygon(); yellowPolygon.Stroke = blackBrush; yellowPolygon.Fill = yellowBrush; yellowPolygon.StrokeThickness = 4; // Create a collection of points for a polygon System.Windows.Point Point1 = new System.Windows.Point(50, 100); System.Windows.Point Point2 = new System.Windows.Point(200, 100); System.Windows.Point Point3 = new System.Windows.Point(200, 200); System.Windows.Point Point4 = new System.Windows.Point(300, 30); PointCollection polygonPoints = new PointCollection(); polygonPoints.Add(Point1); polygonPoints.Add(Point2); polygonPoints.Add(Point3); polygonPoints.Add(Point4); // Set Polygon.Points properties yellowPolygon.Points = polygonPoints; // Add Polygon to the page mygrid.Children.Add(yellowPolygon); ```
create polygon filled up with dots
CC BY-SA 2.5
null
2010-08-17T02:30:13.417
2010-08-17T09:08:16.730
2010-08-17T08:29:48.000
293,773
293,773
[ "c#", "wpf", "drawing", "polygons" ]
3,499,267
1
3,501,473
null
2
334
This is a shot from [Google BigTable paper](http://labs.google.com/papers/bigtable-osdi06.pdf) ![alt text](https://i.stack.imgur.com/oa8c7.png) What can be the kind of scenarios in which instead of having something like Oracle's [redo](http://en.wikipedia.org/wiki/Redo_log) [logs](http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/onlineredo.htm), I will need to store ? Coming specifically to this example, why do I need to store multiple versions of a html page in my database? It cannot act as a backup because anyways all the versions are not there, only some of them are (say last 5).
What situations require me to store different versions of the same data in a database?
CC BY-SA 2.5
0
2010-08-17T04:10:48.983
2010-08-17T10:28:41.537
null
null
182,959
[ "database", "algorithm", "oracle", "data-structures", "bigtable" ]
3,499,349
1
3,500,856
null
5
6,209
I'm using a GridLayout trying to make a label autogrow without hiding anything of its content. Here's a simple code to test: Everytime I press the button the label text grows larger, but only after I resize the window horizontally I get the correct layout. Is there any way to fix this without having to resize the window? I think I've tried every property and I still can't get this working, it's driving me nuts! ![wrong layout](https://i.stack.imgur.com/dNyhu.png) ![right layout](https://i.stack.imgur.com/H6rIO.png) ``` import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.Shell; public class UItest { protected Shell shell; private Label label; public static void main(String[] args) { try { UItest window = new UItest(); window.open(); } catch (Exception e) { e.printStackTrace(); } } public void open() { Display display = Display.getDefault(); createContents(); shell.open(); shell.layout(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } protected void createContents() { shell = new Shell(); shell.setSize(450, 300); shell.setText("SWT Application"); shell.setLayout(new GridLayout(1, false)); Button button = new Button(shell, SWT.NONE); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { label.setText(label.getText() + " " + label.getText()); } }); button.setText("New Button"); label = new Label(shell, SWT.WRAP); label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); label.setText("New Label"); List list = new List(shell, SWT.BORDER); list.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); } protected Label getLabel() { return label; } } ``` --- ``` Button button = new Button(shell, SWT.NONE); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent arg0) { label.setText(label.getText() + " " + label.getText()); shell.layout(); // ADDED THIS } }); button.setText("New Button"); label = new Label(shell, SWT.WRAP); // SET HORIZONTAL GRAB ON LABEL (FIRST TRUE IN GridData CONSTRUCTOR) label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); label.setText("New Label"); ```
Layout issue: autogrow label (SWT)
CC BY-SA 2.5
null
2010-08-17T04:32:13.940
2017-08-31T12:39:03.870
2010-08-17T14:17:49.343
4,386
4,386
[ "java", "layout", "swt", "autogrow" ]
3,499,797
1
null
null
0
97
This is my main table structure: ![alt text](https://i.stack.imgur.com/tZqM5.png) The expertise column is a many to many relationship with another table that has a list of available languages. I wanted to have a flattened structure to display all the languages that a person expertise's, so I wrote a stored procedure that stringifies those multiple expertises to fit for each user. When I called this sp from my wpf application, its not showing the values. I tried the 'preview data' from object browser which showed only one row of my table. (Expected result: ![alt text](https://i.stack.imgur.com/w6Vjg.png) What is the problem with my approach? my Sp: ``` create procedure myView as Begin DECLARE @count INT,@finCount INT,@result varchar(50) SET @result =' ' SET @count = 1 SELECT @finCount=COUNT(*) FROM usersProfile WHILE (@count <= @finCount ) BEGIN SELECT @result=@result+langName+',' FROM expertises INNER JOIN ED_UPD_MERGE on expertises.id=ED_UPD_MERGE.idfrmED INNER JOIN usersprofile on ED_UPD_MERGE.idfrmUPD=usersprofile.expertiseid WHERE usersprofile.id =@count SELECT usersProfile.id,usersProfile.fullname,usersProfile.screename ,usersProfile.age ,usersProfile.address ,usersProfile.emailid1 ,usersProfile.emailid2 ,usersProfile.isActive ,usersProfile.entryCreated ,usersProfile.entryModified ,usersProfile.experience ,roles.rolesName,@result as Expertise FROM usersProfile JOIN roles ON usersProfile.roleid =roles.id WHERE usersprofile.id =@count SET @result= '' SET @count = (@count + 1) END End ```
problem with stored procedure?
CC BY-SA 2.5
null
2010-08-17T06:21:26.860
2010-08-17T22:02:35.687
2010-08-17T13:22:50.967
103,385
1,125,645
[ "wpf", "vb.net", "tsql" ]
3,500,092
1
3,500,110
null
24
62,017
Let's say the height of the div is 34px and the width is 480px. The div should look like this: ![alt text](https://i.stack.imgur.com/QEVyH.png) and I don't want it to actually use an image, just CSS. Is it possible?
How to make a pure CSS div with a gradient background?
CC BY-SA 2.5
0
2010-08-17T07:09:29.053
2017-03-14T12:46:33.977
null
null
9,382
[ "css", "html", "gradient" ]
3,500,893
1
3,564,656
null
0
67
I have a classic UL multilevel menu that works flawlessly in Firefox. The LI are `float: left`, and the A inside is `width: 100%` and `display: block` but as you can see from the screenshots below the submenu items (Hello, World and Foobar) display inline. The weird thing is that this affects the menu even when using canned solutions such as Suckerfish. What do you suggest i look into to solve the problem? ![Menu Item is Open](https://i.stack.imgur.com/HrreS.jpg) ![Menu Item is Closed](https://i.stack.imgur.com/IGMoC.jpg)
UL menu display in IE
CC BY-SA 2.5
null
2010-08-17T09:05:47.860
2010-08-25T09:54:51.793
null
null
192,337
[ "css", "internet-explorer" ]
3,501,254
1
3,501,371
null
1
365
Following is the table and script of this table. ``` DECLARE @temp TABLE (PPId INT, SVPId INT, Minimum INT, Maximum INT) INSERT INTO @temp VALUES(1,1,8,20) INSERT INTO @temp VALUES(2,1,21,100) ``` ![alt text](https://i.stack.imgur.com/qJeVQ.png) Minimum & Maximum are passed in as parameter. I want to find all rows that fall in the given range. E.g.; - - - Thanks.
Find rows in table that fall under minimum and maximum range
CC BY-SA 2.5
null
2010-08-17T09:56:59.503
2010-08-17T10:35:07.197
2010-08-17T10:16:23.437
77,674
77,674
[ "sql", "sql-server-2005", "tsql" ]
3,501,319
1
3,501,356
null
0
814
I need to show items like in below image. ![alt text](https://i.stack.imgur.com/4XwhS.png) I'm using this code to bind dropdownlist. ``` var options = (from option in _serviceOptions select new { OptionId = option.OptionId, OptionText = option.OptionText + " - " + option.Price + "&pound;/month" }).ToList(); myDdl.DataSource = options; myDdl.DataValueField = "OptionId"; myDdl.DataTextField = "OptionText"; myDdl.DataBind(); ``` `_serviceOptions` is the resultset returned by calling stored procedure using L2S The problem is, it is again encoding the `&` to `&amp;` before rendering to the browser.
Display Pound currency sign (£) in a DataBound DropDownListItem
CC BY-SA 2.5
null
2010-08-17T10:06:32.503
2010-08-17T10:12:09.170
null
null
148,271
[ "asp.net", "webforms", "drop-down-menu", "special-characters" ]
3,501,522
1
null
null
1
6,181
I'm trying to make a slider with ability to select 2 points just like selecting a range from the slider. ![Slider](https://i.stack.imgur.com/HCV6L.jpg) Did anyone do anything like that?
2-way slider for Android
CC BY-SA 3.0
0
2010-08-17T10:38:56.693
2020-04-05T15:39:57.577
2014-09-03T09:31:31.977
356,895
392,574
[ "android", "slider", "range" ]
3,501,611
1
3,503,499
null
4
2,005
![alt text](https://i.stack.imgur.com/Gr7XS.png) In Service Category table, ParentCategoryId is the ServiceCategoryId and that is the parent category, there can be nth level hierarchy of my categories, so I need to present this using Tree View Control. How can I do this? Thanks
Entity Framework - Binding WPF Tree view control
CC BY-SA 2.5
0
2010-08-17T10:52:07.047
2010-09-12T06:59:25.860
2010-08-18T06:25:50.693
97,010
97,010
[ "c#", "wpf", "linq", "entity-framework" ]
3,501,771
1
3,501,815
null
5
4,644
I have a very simple basic bar's graphic like this one ![alt text](https://i.stack.imgur.com/gGJi2.png) but i want to display the bars with some 3d effect, like this ![alt text](https://i.stack.imgur.com/CsaSl.gif) I just want the bars to have that 3d effect...my code is: ``` fig = Figure(figsize=(4.6,4)) ax1 = fig.add_subplot(111,ylabel="Valeur",xlabel="Code",autoscale_on=True) width = 0.35 ind = np.arange(len(values)) rects = ax1.bar(ind, values, width, color='#A1B214') ax1.set_xticks(ind+width) ax1.set_xticklabels( codes ) ax1.set_ybound(-1,values[0] * 1.1) canvas = FigureCanvas(fig) response = HttpResponse(content_type='image/png') canvas.print_png(response) ``` i've been looking in the gallery of matplotlib,tried a few things but i wasn't lucky, Any ideas? Thxs
how to make a 3d effect on bars in matplotlib?
CC BY-SA 2.5
null
2010-08-17T11:15:18.457
2012-05-01T10:31:48.940
2012-05-01T10:31:48.940
1,292,730
361,427
[ "python", "3d", "matplotlib", "bar-chart" ]
3,502,348
1
3,578,385
null
8
2,626
I'm trying to and installs it with the user permission when the user Note: What I did was create a cab file with: ``` - eds.cab (signed with an SSL certificate) |--- EDS.ocx |--- setup.inf ``` the has this code: ``` [version] signature="$CHICAGO$" [Add.Code] EDS.ocx=EDS.ocx [EDS.ocx] file-win32-x86=thiscab clsid={8EC68701-329D-4567-BCB5-9EE4BA43D358} FileVersion=3,5,0,150 RegisterServer=yes ``` and then the tag like this: ``` <object id="ActiveX" classid="CLSID:8EC68701-329D-4567-BCB5-9EE4BA43D358" width="14" height="14" codebase="http://localhost/EDS.Webservice/EDS.cab#version=3,5,0,150"> <param name="tabName" value="Stop:http://localhost/EDS.Webservice/" /> </object> ``` and they I navigate to the [http://localhost/EDS.Webservice/](http://localhost/EDS.Webservice/) The issue is that I do not get that yellow bar, just the ACL asking me to accept it. > It only shows the ACL message on Windows 7, never the yellow bar first like, Flash plugin... :-( --- What we are after: ![alt text](https://i.stack.imgur.com/aJv56.png) Thank you. --- Settings are as , both Security on Advanced Tab as well Trust Domains
How to show the ActiveX Yellow bar?
CC BY-SA 2.5
null
2010-08-17T12:26:34.180
2010-10-30T16:38:10.833
2010-08-26T17:22:11.060
28,004
28,004
[ "internet-explorer", "plugins", "activex", "ocx" ]
3,502,564
1
3,502,974
null
2
1,187
XML: ``` <?xml version="1.0" encoding="windows-1251"?> <mode> <term> <name>abhdk</name> </term> <term> <name>njhjsu</name> </term> <term> <name>sdasd</name> </term> <term> <name>vbvbcd</name> </term> ... </mode> <mode> <term> <name>asdfd</name> </term> <term> <name>vcbbn</name> </term> <term> <name>bnmbnmb</name> </term> <term> <name>tyutyu</name> </term> <term> <name>ghjghj</name> </term> <term> <name>hjk</name> </term> ... </mode> <mode> <term> <name>asdfd</name> </term> <term> <name>vcbbn</name> </term> </mode> ... ``` I need to do Alphabet index like this: ![alt text](https://i.stack.imgur.com/bIFKi.png) I get template from here: [link text](http://www.artlebedev.com/tools/technogrette/xslt/alpha-index/) My problem: for each `mode` there must be its own "Alphabet index" list (for single mode it works perfectly). XSLT: ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="no" encoding="windows-1251"/> <xsl:for-each select="mode"> <xsl:call-template name="alphabetIndexTmpl"> <xsl:with-param name="key-name" select="'items-key'" /> ... </xsl:call-template> </xsl:for-each> <xsl:key name="items-key" match="term" use="substring(., 1, 1)" /> <xsl:template name="alphabetIndexTmpl"> <xsl:param name="key-name"/> ... </xsl:template> </xsl:stylesheet> ``` This code does not work correctly. It has to be corrected like this: ``` <?xml version="1.0" encoding="windows-1251"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="no" encoding="windows-1251"/> <xsl:for-each select="mode"> <xsl:call-template name="alphabetIndexTmpl"> <xsl:with-param name="key-name" select="concat('items-key', position())" /> ... </xsl:call-template> </xsl:for-each> <xsl:key name="items-key1" match="mode[1]/term" use="substring(., 1, 1)" /> <xsl:key name="items-key2" match="mode[2]/term" use="substring(., 1, 1)" /> <xsl:key name="items-key3" match="mode[2]/term" use="substring(., 1, 1)" /> ... <xsl:template name="alphabetIndexTmpl"> <xsl:param name="key-name"/> ... </xsl:template> </xsl:stylesheet> ``` But it is very crooked decision. How to solve this problem more elegantly? --- Dimitre Novatchev, do not beat me down for "inaccuracies", I surrender my arms)).
Alphabet index template: "xsl:key" match problem
CC BY-SA 2.5
0
2010-08-17T12:51:55.470
2010-08-17T13:36:47.413
null
null
294,785
[ "xslt", "alphabetical" ]
3,503,054
1
3,551,137
null
2
1,620
I'm implementing a messaging system in my program. It functions just like e-mail except that it is entirely contained within the system. I was wondering if anyone has seen an e-mail control template that I could modify. It would have stuff like an inbox, message viewing and message sending parts. I would just rewire the mail sending & receiving parts to my hook up to my tables. Thanks! Edit: Ok I didn't realize I wrote so much. Make sure you credit Biff_MaGriff if you use this. :D Tech is .net 3.5 with SubSonic 3.0 The rest is in my answer. Should look like this in the end. (Minus all my cut outs) ![alt text](https://i.stack.imgur.com/GLgbU.jpg) web.config ``` <pages> <controls> ... <add tagPrefix="cc" tagName="MessageFolder" src="~/UserControls/Messages/MessageFolder/MessageFolder.ascx"/> <add tagPrefix="cc" tagName="MessageView" src="~/UserControls/Messages/MessageView/MessageView.ascx"/> <add tagPrefix="cc" tagName="MessageCompose" src="~/UserControls/Messages/MessageCompose/MessageCompose.ascx"/> <add tagPrefix="cc" tagName="MessageBox" src="~/UserControls/Messages/MessageBox/MessageBox.ascx"/> ... </controls> <pages> ``` App_Code/IMessageFolder.cs ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; /// <summary> /// Summary description for IMessageFolder /// </summary> public interface IMessageFolder { int? MessageID { get; } } ``` App_Code/CustomDataViews.cs ``` using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.Linq; using System.Linq; using System.Web; /// <summary> /// Summary description for CustomDataViews /// </summary> public class CustomDataViews { //Subsonic db static VAC.Data.VACDB db = new VAC.Data.VACDB(); public class MessageQuery { public class Message { public int MessageID { get; set; } public string FromUser { get; set; } public string ToUser { get; set; } public DateTime SentDate { get; set; } public string Subject { get; set; } public string Body { get; set; } public bool IsDeletedSender { get; set; } public bool IsDeletedRecipient { get; set; } public bool IsRead { get; set; } } public enum MailType { ReceivedMail, SentMail }; public Message[] GetMessages(MailType mt, bool showDeleted) { List<Message> myMessages = new List<Message>(); foreach (var v in (from m in db.Messages where (mt == MailType.ReceivedMail ? m.ToUserID : m.FromUserID) == Common.CurrentUserID && (showDeleted || !(mt == MailType.ReceivedMail ? m.IsDeletedRecipient : m.IsDeletedSender)) orderby m.SentDate descending select m)) { Message mess = new Message(); mess.MessageID = v.MessageID; mess.FromUser = (from u in db.Users where u.UserID == v.FromUserID select u.UserName).First(); mess.ToUser = (from u in db.Users where u.UserID == v.ToUserID select u.UserName).First(); mess.SentDate = v.SentDate; mess.Subject = v.Subject; mess.Body = v.Body; mess.IsDeletedSender = v.IsDeletedSender; mess.IsDeletedRecipient = v.IsDeletedRecipient; mess.IsRead = v.IsRead; myMessages.Add(mess); } return myMessages.ToArray(); } public Message GetMessage(int MessageID) { var myMessage = (from m in db.Messages where m.MessageID == MessageID select m); if (myMessage.Count() == 1) { var v = myMessage.First(); Message mess = new Message(); mess.MessageID = v.MessageID; mess.FromUser = (from u in db.Users where u.UserID == v.FromUserID select u.UserName).First(); mess.ToUser = (from u in db.Users where u.UserID == v.ToUserID select u.UserName).First(); mess.SentDate = v.SentDate; mess.Subject = v.Subject; mess.Body = v.Body; return mess; } else return null; } } } ``` App_Code/Common.cs ``` using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.SessionState; using System.Web.Configuration; using System.Data; using System.Text; using System.Collections; using System.Globalization; using System.Linq; /// <summary> /// Summary description for Common /// </summary> public class Common { /// <summary> /// Retrieves the index of the column from the gridview. Returns -1 if not found. /// </summary> /// <param name="gv"></param> /// <param name="columnName"></param> /// <returns></returns> static public int GetColumnIndex(GridView gv, string columnName) { int returnMe = -1; for (int i = 0; i < gv.Columns.Count; i++) { if (gv.Columns[i].HeaderText == columnName) { returnMe = i; break; } } return returnMe; } //Colours for gridviews static public string BGColourRed = "#FF8888"; static public string BGColourRedAlternate = "#FF0000"; static public string BGColourBlue = "#AAAAFF"; static public string BGColourBlueAlternate = "#4444FF"; static public string BGColourGreen = "#2bf053"; static public string BGColourGreenAlternate = "#27c319"; static public string BGColourOrange = "#FFA365"; static public string BGColourOrangeAlternate = "#FF6600"; static public string NormalBGColour(object sender) { return "#" + ((GridView)sender).RowStyle.BackColor.R.ToString("X") + ((GridView)sender).RowStyle.BackColor.G.ToString("X") + ((GridView)sender).RowStyle.BackColor.B.ToString("X"); } static public string AlternateBGColour(object sender) { return "#" + ((GridView)sender).AlternatingRowStyle.BackColor.R.ToString("X") + ((GridView)sender).AlternatingRowStyle.BackColor.G.ToString("X") + ((GridView)sender).AlternatingRowStyle.BackColor.B.ToString("X"); } static public string SelectedBGColour(object sender) { string selectedBGColour = "#165EA9"; if (!((GridView)sender).SelectedRowStyle.BackColor.IsEmpty) { selectedBGColour = "#" + ((GridView)sender).SelectedRowStyle.BackColor.R.ToString("X") + ((GridView)sender).SelectedRowStyle.BackColor.G.ToString("X") + ((GridView)sender).SelectedRowStyle.BackColor.B.ToString("X"); } return selectedBGColour; } /// <summary> /// Gridview RowDataBound extension. /// Allows row selection by clicking on a row and highlights the row in yellow on the mouse hover. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static public void GridView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.DataItemIndex == -1) return; //e.Row.Attributes.Add("onclick", ((GridView)sender).Page.ClientScript.GetPostBackEventReference((GridView)sender, "Select$" + e.Row.RowIndex.ToString(), false)); string selectedBGColour = SelectedBGColour(sender); string normalBGColour = NormalBGColour(sender); string alternateBGColour = AlternateBGColour(sender); ApplyStylingToRow(e.Row, selectedBGColour, normalBGColour, alternateBGColour); } static public void ApplyStylingToRow(GridViewRow row, string selectedBGColour, string normalBGColour, string alternateBGColour) { AppendAttribute(row, "onMouseOver", "this.style.cursor='pointer'; this.style.background='yellow';"); AppendAttribute(row, "onMouseOut", "this.style.background='" + ((row.RowState & DataControlRowState.Selected) == DataControlRowState.Selected ? selectedBGColour : (row.RowState & DataControlRowState.Alternate) == DataControlRowState.Alternate ? alternateBGColour : normalBGColour) + "';"); } static public void GridViewAddRowClick(GridView gv, GridViewRow row, bool isRender) { AppendAttribute(row, "onclick", gv.Page.ClientScript.GetPostBackEventReference(gv, "Select$" + row.RowIndex.ToString(), isRender) + ";"); /* for (int i = 0; i < gv.Columns.Count; i++) if (!string.IsNullOrEmpty(gv.Columns[i].HeaderText) && row.Cells.Count > 1) AppendAttribute(row.Cells[i], "onclick", gv.Page.ClientScript.GetPostBackEventReference(gv, "Select$" + row.RowIndex.ToString(), isRender) + ";"); * */ } static public void GridViewRowClick_Render(GridView gv) { foreach (GridViewRow row in gv.Rows) if (row.RowType == DataControlRowType.DataRow) GridViewAddRowClick(gv, row, true); gv.Page.ClientScript.RegisterForEventValidation(gv.UniqueID); } /// <summary> /// Hides a column on a gridview. /// </summary> /// <param name="gv"></param> /// <param name="columnIndex"></param> static public void HideColumn(GridView gv, int columnIndex) { if (gv.HeaderRow != null) gv.HeaderRow.Cells[columnIndex].Style.Add("display", "none"); foreach (GridViewRow row in gv.Rows) { if (row.RowType == DataControlRowType.DataRow) row.Cells[columnIndex].Style.Add("display", "none"); } } /// <summary> /// Registers javascript to be run. /// </summary> /// <param name="con"></param> /// <param name="script"></param> static public void RegisterStartupScript(object con, string script) { RegisterStartupScript((Control)con, script); } /// <summary> /// Capitalizes the beginning of strings /// </summary> /// <param name="strText"></param> public static string InitCap(string strText) { return new CultureInfo("en").TextInfo.ToTitleCase(strText.ToLower()); } /// <summary> /// Registers javascript to be run. /// </summary> /// <param name="con"></param> /// <param name="script"></param> static public void RegisterStartupScript(Control con, string script) { ScriptManager sm = ScriptManager.GetCurrent(con.Page); if (sm != null) ScriptManager.RegisterStartupScript(con, con.GetType(), Guid.NewGuid().ToString(), script, true); else con.Page.ClientScript.RegisterStartupScript(typeof(Page), Guid.NewGuid().ToString(), script, true); } /// <summary> /// Registers a javascript file to be included in the page. /// </summary> /// <param name="con"></param> /// <param name="url"></param> static public void RegisterClientScriptInclude(Control con, string url) { ScriptManager sm = ScriptManager.GetCurrent(con.Page); if (sm != null) ScriptManager.RegisterClientScriptInclude(con, con.GetType(), Guid.NewGuid().ToString(), System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath + url); else con.Page.ClientScript.RegisterClientScriptInclude(typeof(Page), Guid.NewGuid().ToString(), System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath + url); } public static int CurrentUserID { get { return (from u in new VAC.Data.VACDB().Users where u.UserName == HttpContext.Current.User.Identity.Name select u.UserID).First(); } } public class MessageComposeEventArgs : EventArgs { public int? SendToUserID { get; set; } public string Subject { get; set; } public MessageComposeEventArgs() { } public MessageComposeEventArgs(int SendToUserID) { this.SendToUserID = SendToUserID; } public MessageComposeEventArgs(int SendToUserID, string Subject) { this.SendToUserID = SendToUserID; this.Subject = Subject; } } } ``` App_Code/ExtendedCommandField.cs ``` using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; /// <summary> /// An extended <see cref="CommandField"/> that allows deletions /// to be confirmed by the user. /// </summary> public class ExtendedCommandField : CommandField { /// <summary> /// Initialize the cell. /// </summary> public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex) { base.InitializeCell(cell, cellType, rowState, rowIndex); if (!string.IsNullOrEmpty(this.DeleteConfirmationText) && this.ShowDeleteButton) { foreach (Control control in cell.Controls) { IButtonControl button = control as IButtonControl; if (button != null && button.CommandName == "Delete") // Add delete confirmation ((WebControl)control).Attributes.Add("onclick", string.Format ("if (!confirm('{0}')) return false;", this.DeleteConfirmationText)); } } } #region DeleteConfirmationText /// <summary> /// Delete confirmation text. /// </summary> [Category("Behavior")] [Description("The text shown to the user to confirm the deletion.")] public string DeleteConfirmationText { get { return this.ViewState["DeleteConfirmationText"] as string; } set { this.ViewState["DeleteConfirmationText"] = value; } } #endregion } ``` ~/UserControls/Messages/MessageFolder/MessageFolder.ascx ``` <%@ Control Language="C#" AutoEventWireup="true" CodeFile="MessageFolder.ascx.cs" Inherits="UserControls_Messages_MessageFolder_MessageFolder" %> <asp:UpdatePanel ID="up1" runat="server"> <ContentTemplate> <asp:HiddenField ID="hfMessageID" runat="server" /> <asp:Button ID="butRefresh" runat="server" Text="Check for new Messages" /><asp:Button ID="butCompose" runat="server" Text="Compose New Message" OnClick="butCompose_Click" /><asp:CheckBox AutoPostBack="true" ID="cbShowDeleted" runat="server" Text="Show Deleted Messages" OnCheckedChanged="cbShowDeleted_CheckChanged" /> <asp:GridView ID="gvMessages" runat="server" DataKeyNames="MessageID" AutoGenerateColumns="false" OnRowDataBound="gvMessages_RowDataBound" OnSelectedIndexChanged="gvMessages_SelectedIndexChanged" OnRowDeleting="gvMessages_RowDeleting" Width="100%" Style="float: left;"> <Columns> <asp:BoundField DataField="MessageID" InsertVisible="false" /> <cc:ExtendedCommandField DeleteConfirmationText="Are you certain you wish to delete this record?" DeleteText="Delete" ShowDeleteButton="true" /> <asp:BoundField DataField="FromUser" HeaderText="From" /> <asp:BoundField DataField="ToUser" HeaderText="To" /> <asp:TemplateField> <HeaderTemplate> Sent Date</HeaderTemplate> <ItemTemplate> <asp:Label ID="lbl1" runat="server" Text='<%# Bind("SentDate") %>' Style="white-space: nowrap;" /></ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="Subject" HeaderText="Subject" ItemStyle-Width="100%" /> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> ```
Does anyone know of an ASP.Net E-mail control/user control?
CC BY-SA 2.5
0
2010-08-17T13:44:07.357
2010-08-23T21:15:11.207
2010-08-23T21:15:11.207
102,526
102,526
[ "c#", "asp.net", "user-controls" ]
3,503,300
1
null
null
3
405
I'm looking for a tool that can graph method calls over time for a java app. Perhaps a profiler or other log parsing tool? I know I can write something in python and I'll work towards doing this. I was just hoping not to reinvent the wheel. edit: What I ended up doing was writing some python to parse my logs and take snapshots at 5 second intervals. Then I used google docs and a spreadsheet to visualize my data with a chart that had 2 columns of data: time and frequency. Google docs was super useful. Use the "move chart to own sheet" for a nice fullsize view. I'll post my python when I clean it up a bit. here is the output graph from the method I specify in my comment ![alt text](https://i.stack.imgur.com/pGlWg.png)
tool to graph method calls over time
CC BY-SA 2.5
null
2010-08-17T14:09:48.597
2010-09-22T16:37:04.780
2010-08-19T14:16:16.507
241,718
241,718
[ "java", "profiling", "dynamic-analysis" ]
3,503,481
1
5,164,229
null
5
1,593
Essentially i want to display a notification just beneath the UINavigationController, covering the area that would be occupied by the top most UIViewController's view. However i want the background image to extend upwards and partly cover the UINavigationBar The finished product should hopefully look like the below ![alt text](https://i.stack.imgur.com/Zr7bv.png) The trick comes in that i only want this to apply to certain views with the view Hierarchy, so attacking the problem by using `[UIApplication keyWindow]` might not be the best idea. Also i assume that by using views outside of the private `UINavigationTransitionView` won't be part of the view transition animation, leaving my view on top of the controller beneath when this one is popped. The view of the topmost view controller doesn't help either, as it's frame is terminates at the base of `UINavigationBar`, meaning arrow won't overlap the `UINavigationBar` Suggestions? Thanks
Overlay a UIView on both a UINavigationBar and a UIViewController
CC BY-SA 2.5
0
2010-08-17T14:26:43.620
2012-10-12T10:01:19.077
2010-08-24T10:08:20.093
34,046
34,046
[ "iphone", "uiviewcontroller", "uinavigationcontroller", "uinavigationbar" ]
3,504,026
1
null
null
1
887
i am developing an iphone application which have to show images from server as thumbnail list. I have created thumbnailview using Three20 package TTThumbViewcontroller class. ![alt text](https://i.stack.imgur.com/jvnDe.jpg) Now i have to add banner view above the thumbnail view as shows in the image. Also i have to add the bottom banner view in the TTPhotoviewcontroller also. can anyone guide me, how to add my custom banner view (UIView) along with either TTThumbviewConntroller or TTPhotoViewController to my parent view? Edit:I had successfully added a subview for the controller which extends TTThumbViewcontroller. Now i have to add a subview above the TTPhotoViewController toolbar (as in the attached image). thanks in advance. Ram
how to add a custom subview inside TTThumbviewController (Three20)
CC BY-SA 2.5
0
2010-08-17T15:18:10.767
2011-01-07T05:10:34.207
2010-08-17T18:48:01.577
355,685
355,685
[ "iphone", "objective-c", "three20" ]
3,504,259
1
3,504,337
null
1
260
i am generating a chart map like this: [http://chart.apis.google.com/chart?chs=440x220&cht=t&chco=CBD122&chld=US&chd=s:_&chtm=usa](http://chart.apis.google.com/chart?chs=440x220&cht=t&chco=CBD122&chld=US&chd=s:_&chtm=usa) ![alt text](https://i.stack.imgur.com/WSUG7.png) does anyone know if there is a feature to do something on mouseover? like have each state turn a different color on mouse over?
thematic map: mouseover
CC BY-SA 2.5
null
2010-08-17T15:41:46.403
2010-08-19T15:34:58.267
null
null
117,700
[ "javascript", "api" ]
3,504,652
1
3,510,453
null
2
521
I have defined an object type in .NET that I want receive in a List<> as the input to an ASP.NET MVC action method? Here is the action method and class I'm trying to receive. ``` public class WhereClause { public string ColumnInformation { get; set; } public string WhereValue { get; set; } public string AndOr { get; set; } public string Comparer { get; set; } } public ActionResult Grid(string query, int skip = 0, int take = 50, List<WhereClause> whereClauses = null) { GridViewModel gvm = new GridViewModel(); gvm.Query = query; ``` And here is the Javascript where I'm building up the collection from a set of table rows using jQuery and then calling the jQuery ajax() method. ``` var whereClauses = []; // Iterate over every row in the table and pull the values fromthe cells. divQueryWidget.find('.tblWhereClauses tr').each(function (x, y) { var tds = $(y).find('td'); var columnInformation = $(tds[0]).html(); var whereValue = $(tds[1]).html(); var andOr = $(tds[2]).html(); var comparer = $(tds[4]).html(); // Create a whereClause object var whereClause = {}; whereClause.ColumnInformation = columnInformation; whereClause.WhereValue = whereValue; whereClause.AndOr = andOr; whereClause.Comparer = comparer; whereClauses.push({ ColumnInformation: columnInformation, WhereValue: whereValue, AndOr: andOr, Comparer: comparer }); }); //divQueryWidget.find('#queryResultsGrid'). $.ajax({ type: 'GET', url: '<%= Url.Action("Grid", "Query") %>', dataType: 'html', data: { query: divQueryWidget.find('#activeQuery').val(), whereClauses: whereClauses }, success: function (data, textStatus, XMLHttpRequest) { divQueryWidget.find('#queryResultsGrid').append(data); divQueryWidget.find('.loading').css('visibility', 'hidden'); } }); ``` Here is where things get interesting. When the javascript is called and there were two rows in the table that are supposed to be passed to the MVC action, notice how when I debug into the code that there were two objects created in the list but their properties weren't filled. ![alt text](https://i.stack.imgur.com/5lDdK.png) What am I doing wrong that is preventing my Javascript object from being converted into a .NET List<> type? Should I be using array? Do I need to mark something as serializable?
How can I pass a list of objects to an ASP.NET MVC action using jQuery?
CC BY-SA 2.5
0
2010-08-17T16:19:05.817
2010-08-18T09:03:13.313
null
null
29,277
[ "asp.net-mvc", "jquery" ]
3,504,792
1
null
null
2
441
I'm trying to stick fast to Robert Martin's SOLID design principles for the first time, and I am not good at it. In essence, I need a hierarchy of "Node" objects. Some nodes are NodeHosts, some are NodeChildren and some are Both. Everybody's done this one before, but I can't figure out how to do it SOLID without over-complicating the design or doing something like this in the node subtypes: ``` INodeHostType node; public INodeType NodeType { .... set { node = (INodeHostType)value; } } ``` This violates Liskov Substitution Principle right? What's a better way? Here's what I have now. ![alt text](https://i.stack.imgur.com/4R5F4.png)
Need help with .Net SOLID design
CC BY-SA 2.5
0
2010-08-17T16:35:11.970
2011-03-18T23:53:25.380
2010-10-17T13:55:35.910
265,143
303,345
[ ".net", "liskov-substitution-principle", "solid-principles" ]
3,505,124
1
3,505,174
null
0
891
I want to build a spinner for menu selection like the one in where to? IPhone app as shown in image below. Any hints? ![alt text](https://i.stack.imgur.com/RPRVZ.jpg)
How to build knob like spinner in iOS sdk?
CC BY-SA 2.5
0
2010-08-17T17:22:23.013
2010-08-17T17:37:32.493
2010-08-17T17:37:32.493
127,036
127,036
[ "iphone" ]
3,505,187
1
3,505,436
null
85
51,456
Last night my machine restarted while Eclipse Galileo was open. No big deal, right? This morning, I started my machine and tried to open Eclipse. Instead of opening, I see this: ![alt text](https://i.stack.imgur.com/kNADb.jpg) The error log suggests that there is some kind of problem caused by exiting with unsaved changes. How can I get Eclipse to open and ignore those unsaved changes? I can't even open a text file that is not part of this project with Eclipse? There must be a way to reset this state. I have tracked down the problem to a single file. When I delete this file below, Eclipse opens but my projects are missing. ``` .metadata\.plugins\org.eclipse.core.resources\.snap ``` I do use the subversion plugin, but I don't think that is the problem. Here is what the error log says ( abbreviated ): ``` !SESSION 2010-08-17 10:13:01.718 ----------------------------------------------- eclipse.buildId=M20100211-1343 java.version=1.4.2_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.core.resources 2 10035 2010-08-17 10:13:02.656 !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. !ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.671 !MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (33). !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) ... Caused by: org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found. at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257) ... Root exception: org.eclipse.core.internal.dtree.ObjectNotFoundException: Tree element '/reports/src/com/lang/reports/OnlineReport.java' not found. at org.eclipse.core.internal.dtree.AbstractDataTree.handleNotFound(AbstractDataTree.java:257) ... !ENTRY org.eclipse.osgi 4 0 2010-08-17 10:13:02.703 !MESSAGE Application error !STACK 1 java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) !ENTRY org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists: !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.apt.core_3.3.202.R35x_v20091130-2300 [103] was not resolved. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.apt.pluggable.core_1.0.201.R35x_v20090925-1100 [104] was not resolved. !SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing required bundle org.eclipse.jdt.apt.core_0.0.0. !SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0. !SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.dispatch_0.0.0. !SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.model_0.0.0. !SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.util_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.apt.ui_3.3.200.v20090930-2100_R35x [105] was not resolved. !SUBENTRY 2 org.eclipse.jdt.apt.ui 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing required bundle org.eclipse.jdt.apt.core_[3.2.0,4.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.compiler.apt_1.0.201.R35x_v20090925-1100 [106] was not resolved. !SUBENTRY 2 org.eclipse.jdt.compiler.apt 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.compiler.tool_1.0.100.v_981_R35x [107] was not resolved. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000 [116] was not resolved. !SUBENTRY 2 org.eclipse.jdt.junit4.runtime 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing required bundle org.junit4_[4.4.0,5.0.0). !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.hamcrest.core_1.1.0.v20090501071000 [184] was not resolved. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle org.junit4_4.5.0.v20090824 [186] was not resolved. !SUBENTRY 2 org.junit4 2 0 2010-08-17 10:13:02.765 !MESSAGE Missing required bundle org.hamcrest.core_1.1.0. !SUBENTRY 1 org.eclipse.osgi 2 0 2010-08-17 10:13:02.765 !MESSAGE Bundle com.collabnet.subversion.merge_2.1.0 [208] was not resolved. ```
Eclipse won't start, log error says: ObjectNotFoundException: Tree element
CC BY-SA 3.0
0
2010-08-17T17:29:20.437
2020-10-19T06:26:53.530
2013-01-22T13:37:27.520
505,893
28,351
[ "eclipse" ]
3,505,766
1
null
null
3
2,931
In a view containing several subviews, one of the subviews should remain a fixed, non-zero distance from the top and bottom of the superview. In these images, this view is shown in gray: ![Portait](https://i.stack.imgur.com/ldG6o.png) ![Landscape](https://i.stack.imgur.com/duXaW.png) According to the documentation, this view should have a mask of `UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth`. However, this causes the view to expand its height to take over the entire superview. How can the view be contained to fixed, but non-zero margins? Thanks.
autoresizingMask for fixed margin sizes
CC BY-SA 2.5
null
2010-08-17T18:38:42.830
2010-08-18T00:08:54.730
2010-08-17T19:23:15.550
382,938
382,938
[ "iphone", "ipad", "layout", "uiview", "autoresizingmask" ]
3,506,103
1
3,507,199
null
8
10,884
currently i have the following layout ``` <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_marginTop="9px" android:layout_below="@+id/desc" android:id="@+id/ll_item" android:orientation="vertical" android:paddingRight="3px" android:paddingLeft="3px" android:paddingBottom="5px" android:paddingTop="5px" android:background="@drawable/rounded_corner_lists" > <!-- <ListView android:drawSelectorOnTop="false" android:id="@+id/lv" android:layout_height="fill_parent" android:layout_width="wrap_content" android:divider="#ddd" android:dividerHeight="1px" android:background="@drawable/white" /> --> </LinearLayout> ``` the listview that i have commented out, i have tried to make this in the xml, with the height set to wrap_content, fill_parent, currently i am doing this programatically with the following code ``` LinearLayout ll_item = (LinearLayout) this.findViewById(R.id.ll_item); if(list.length() > 0) { ll_item.setVisibility(View.VISIBLE); LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT,calcListHeight(list)); listview = new ListView(this); listview.setBackgroundResource(R.drawable.white); listview.setDivider( new ColorDrawable(this.getResources().getColor(R.drawable.dividercolor)) ); listview.setDividerHeight(1); listview.setCacheColorHint(0); mAdapter = new JSONAdapter( list, this ); listview.setAdapter(mAdapter); mAdapter.notifyDataSetChanged(); ll_item.addView(listview, lp); } ``` this is the result ![alt text](https://i.stack.imgur.com/RY1TN.jpg) ![alt text](https://i.stack.imgur.com/BNsiH.jpg) so you can see in this image, that since i'm containing the listview in a linearlayout to get the rounded corner look, it doesn't just automatically stretch to contain the entire listview, is there any way to have the two elements just wrap the content vertically so there is no scrolling without me programatically setting the height ? ? ? i guess one other thing i should mention is that i have all this layout in a scrollview, because i want this listview to be a tiny subsection of the entire layout, so it would be something like -scrollview -textview -textview -linearlayout -listview - button here is a simpler layout of what i have ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="fill_parent" android:background="@drawable/bg" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/titlebar"> <ScrollView android:id="@+id/sv" android:layout_width="fill_parent" android:background="@drawable/bg" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout android:id="@+id/widget28" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="4dip" > <LinearLayout android:orientation="vertical" style="@style/rounded_corner_full_width_button" android:id="@+id/editfields"> <ListView android:drawSelectorOnTop="false" android:id="@+id/lv" android:layout_height="fill_parent" android:layout_width="wrap_content" android:divider="#ddd" android:dividerHeight="1px" android:background="@drawable/white"/> </LinearLayout> </RelativeLayout> </ScrollView> </LinearLayout> ```
how can i automatically size listview so it doesn't scroll
CC BY-SA 2.5
0
2010-08-17T19:19:45.610
2015-04-07T06:30:32.200
2010-08-17T20:11:42.507
202,064
202,064
[ "android", "listview", "android-linearlayout" ]
3,506,871
1
3,506,929
null
0
910
Anyone know what control this is or how I add it, if it can be used in WPF? ![enter image description here](https://i.stack.imgur.com/dmGXK.jpg) I'm referring to the menu: File | Home | Page Layout | Mailings | etc
Office 2010 Like Controls in WPF
CC BY-SA 3.0
null
2010-08-17T20:55:13.103
2013-07-24T17:41:05.073
2013-07-24T17:41:05.073
1,065,525
302,613
[ "wpf", "ms-office" ]
3,506,946
1
null
null
0
1,595
![Parser Error](https://i.stack.imgur.com/VP3lK.png) ``` This page has encountered a critical error. Contact your system administrator if this problem persists. ``` ``` Line 1: <%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %>; <%@ Reference VirtualPath="~masterurl/custom.master" %> <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head> Line 2: <!--[if gte mso 9]><xml> Line 3: <mso:CustomDocumentProperties> ``` MOSS is occasionally throwing this error as soon as I log on and attempt to access any page. I have discovered a very strange workaround: if I take a fresh web.config from an empty web application and copy over the web.config of the problematic web.config, and then paste in all the special configuration changes I need, it works. However, if I save a backup of a working web.config and then revert to it when the error appears, it doesn't seem to resolve it. I have to start over from a fresh one. It almost seems to me like a corruption issue in the web.config, and it generally appears after I make a change somewhere else on the server, on at least one occasion it happened without any apparent update to the timestamp of the web.config. Furthermore, there is no corruption evident in the file, even if I diff against a fresh web.config.
SharePoint critical error
CC BY-SA 2.5
null
2010-08-17T21:05:09.960
2010-12-27T18:05:47.587
2010-08-17T21:12:21.797
47,517
47,517
[ "moss" ]
3,507,241
1
3,507,269
null
2
570
i was wondering how can i add a view on ios Keyboard ? like this : ![alt text](https://i.stack.imgur.com/GwsPY.jpg)
add something above of iPhone / iPad keyboard?
CC BY-SA 2.5
null
2010-08-17T21:46:49.860
2014-11-16T00:16:54.240
null
null
199,173
[ "iphone", "sdk", "keyboard" ]
3,508,086
1
3,508,105
null
1
2,956
I'm a newbie to the jQuery UI plugin and I'm building a demo application to test my knowledge. I'm using the [radio button](http://jqueryui.com/demos/button/#radio) add-on and I can't seem to get it working. I have the following line in a function called when the `body` loads: ``` $("#buttonSetDiv").buttonset(); ``` I'm also including the CSS and JS correctly, like so: ``` <style src="jquery-ui-1.8.4.custom/css/ui-darkness/jquery-ui-1.8.4.custom.css"></style> <script type="text/javascript" src="jquery-1.4.js"></script> <script type="text/javascript" src="jquery-ui-1.8.4.custom/js/jquery-ui-1.8.4.custom.min.js"></script> ``` ... and the actual HTML looks like this: ``` <form name="radios" id="myForm"> <div id="buttonSetDiv"> <input type="radio" name="group1" value="posts" id="radio1" checked onchange="valueChanged()"> <label for="radio1">Posts</label> <input type="radio" name="group1" value="members" onchange="valueChanged()" id="radio2"> <label for="radio2">Members</label> </div> </form> ``` ... but for some reason, with this correct implementation, I'm still getting normal-looking radio buttons. I'd like to achieve this effect: ![picture](https://i.stack.imgur.com/G8tI4.jpg) Does anyone have an answer here? Thanks a ton in advance. :)
jQuery UI buttonset() Not Responding As It Should?
CC BY-SA 2.5
null
2010-08-18T00:41:59.190
2010-08-18T00:45:16.920
null
null
269,970
[ "jquery", "jquery-ui", "jquery-ui-button" ]
3,508,209
1
3,510,013
null
0
467
I've read [this](https://stackoverflow.com/questions/2266185/silverlight-docking-of-controls) question, but still, it explains how to dock controls within DockPanel. How does one dock the DockPanel within the window? ![alt text](https://i.stack.imgur.com/ZNrDI.png) As you can see, the Map control is docked to the DockPanel, but the DockPanel is not docked to the window. What am I missing?
Docking of Silverlight Controls
CC BY-SA 2.5
null
2010-08-18T01:08:16.943
2011-09-08T09:46:35.313
2017-05-23T10:30:24.960
-1
9,382
[ "silverlight", "silverlight-4.0", "docking" ]
3,508,484
1
3,508,533
null
1
1,968
How can I use css to make the dotted border and solid border in one line in a drop down menu this site, [http://blip.tv/](http://blip.tv/) here is the image I highlighted the line that I meant above, ![alt text](https://i.stack.imgur.com/y0kKJ.jpg) here is the link of the drop menu which I fail to make the line like above. what I get is either a total solid border or dotted border, and I can't have them both dynamical like the site above. [http://quack-project.net/tmp/list_2.htm](http://quack-project.net/tmp/list_2.htm) some abstract of the css, ``` /* drop down menu local level 1 */ #footer > ul > li { float:left; margin:0px 15px 0px 0px; } #footer > ul > li > a { padding: 4px 8px 4px 0px; list-style-type:disc; list-style-position:inside; display:list-item; text-decoration:none; color:#ffffff; border:0px solid #0066FF; } #footer > ul > li > a:hover { color:#000000; border-top: 1px solid #000; border-left: 1px solid #000; border-right: 1px solid #000; } /* drop down menu local level 2 */ #footer > ul > li > ul{ display:none; position: absolute; border: 1px solid #000; min-width:200px; } #footer > ul > li > ul > li { float: none; } #footer > ul > li > ul > li > a { padding:4px 15px 4px 15px; } #footer > ul > li:hover ul , #footer > ul > li.hover ul { display: block; } #footer > ul > li:hover li > a, #footer > ul > li.hover li > a { background-color: #b8b2b2; border-bottom: 1px solid #ffffff; color: #000000; /*width:200px; use a fixed width to fix IE if use 'position: relative' on all <li>*/ } #footer > ul > li > ul > li > a:hover { color:#000000; background-color:#cccccc; } ``` is it some tricks in javascript or using images? many thanks Lau
drop down menu: dotted border and solid border in one line
CC BY-SA 2.5
null
2010-08-18T02:16:09.810
2010-08-18T02:28:05.527
null
null
413,225
[ "css", "drop-down-menu" ]
3,508,643
1
null
null
1
2,525
Lets say we see an image of people watching tv in color and when I add the OpenGL code it turns into this: ![http://i.dailymail.co.uk/i/pix/2008/10/18/article-1078627-02281598000005DC-210_468x382.jpg](https://i.stack.imgur.com/Igw97.jpg) What is the code to convert the photo from color to black and white?
How do I convert a photo from color to black and white using OpenGL?
CC BY-SA 3.0
0
2010-08-18T03:02:29.317
2017-11-09T23:59:39.527
2011-11-28T05:19:24.040
234,976
423,535
[ "opengl" ]
3,508,691
1
3,513,942
null
2
1,573
As shown in this image: ![alt text](https://i.stack.imgur.com/jte0V.png) I have a set of line segments. I want to check which line-segments intersect with the perpendicular line drawn from a given point (x0,y0). (E.g.: AB passes the check and BC does not.) The only information I've got is two points of the line-segment, (x1,y1), (x2,y2), and the target point (x0,y0). Is it possible to derive a simple formula using these three points? Thanks in advance. umanga
Check whether a line-segment intersects the perpendicular line draw from a particular point?
CC BY-SA 2.5
0
2010-08-18T03:14:28.547
2010-08-18T15:47:29.910
2010-08-18T09:08:06.157
50,476
180,904
[ "algorithm", "vector", "geometry" ]
3,508,944
1
3,509,981
null
0
256
![alt text](https://i.stack.imgur.com/Rd5wI.png) ![alt text](https://i.stack.imgur.com/ehIYJ.png) ![alt text](https://i.stack.imgur.com/eKZGk.png) Hi, im finding leaks with the leaks instruments tool but have no idea why this method is returning me leaks. any help? code is below ``` if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { // Setup the SQL Statement and compile it for faster access NSString *str = [NSString stringWithFormat:@"SELECT UsageData.Date,UsageData.Time,UsageData.NoOfMovementRegistered,UsageData.BreathingRate,UsageData.TimeSinceLastMovement,UsageData.Status,UsageData.bID FROM UsageData INNER JOIN Beds ON UsageData.bID = Beds.bID WHERE Status = 'Alert' OR Status = 'Unused' GROUP BY UsageData.bID ORDER BY UsageData.bID LIMIT '%d'",[appDelegate.beds count]]; const char *sqlStatement = [str UTF8String]; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement,-1, &compiledStatement, NULL) == SQLITE_OK) { // Loop through the results and add them to the feeds array while(sqlite3_step(compiledStatement) == SQLITE_ROW) { // Read the data from the result row //leak NSString *aDate = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)] ; //leak NSString *aTime = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)] ; //leak NSString *aNoOfMoveReg = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)] ; //leak NSString *aBreathRate = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)] ; //leak NSString *aTimeSinceLastMovement = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 4)] ; //leak NSString *aStatus = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 5)] ; //leak NSString *aBID = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 6)] ; NSLog(@"aDate %@",aDate); NSLog(@"aTime %@",aTime); NSLog(@"aNoOfMoveReg %@",aNoOfMoveReg); NSLog(@"aBreathRate %@",aBreathRate); NSLog(@"aTimeSinceLastMovement %@",aTimeSinceLastMovement); NSLog(@"aStatus %@",aStatus); NSLog(@"aBID %@",aBID); IconUsageData *usagedata = [[IconUsageData alloc] initWithDate:aDate time:aTime noofmovereg:aNoOfMoveReg breathrate:aBreathRate timesincelastmovement:aTimeSinceLastMovement status:aStatus bedid:aBID]; [appDelegate.iconUsageDatas addObject:usagedata]; [usagedata release]; [aDate release]; } } // Release the compiled statement from memory sqlite3_finalize(compiledStatement); } sqlite3_close(database); ``` *edited to show screenshot above
Memory leak on iPhone
CC BY-SA 2.5
null
2010-08-18T04:18:23.653
2010-08-18T07:54:26.463
2010-08-18T07:54:26.463
41,956
354,467
[ "iphone" ]
3,509,158
1
3,509,235
null
14
9,444
I have a `WebView` inside the `ScrollView`. The content of `WebView` dyanamically changes when it displays different html page. I have the following issue: For example I have `A.html`, and `B.html`. The content of `B.html` is larger than `A.html`, so the page is longer. When `WebView` load `B.html`, the ScrollView stretches its size to enable itself scroll for B.html, then if I go back to `A.html`, ScrollView doesn't resize itself. (The scroll area is exceed the content of `A.html`) ![alt text](https://i.stack.imgur.com/zo2iK.jpg) What I want to have, is dynamic change the scroll area of scroll view to fit the webview's content.
Scroll view doesn't resize when the content of child view changes
CC BY-SA 4.0
0
2010-08-18T05:16:11.950
2021-05-13T11:38:25.217
2018-06-29T06:47:26.117
2,249,207
399,820
[ "android", "webview", "scrollview" ]
3,509,530
1
3,509,761
null
2
2,795
I am trying to set a 9-patch image as the background for one of my activities but it is stretching unescessarily making everything get all wierd. I used draw9patch to create it and added one pixel to the bottom left and one pixel to the top right. I then save it into my drawables directory as intro_bg.9.png. I want to stretch the very bottom and stretch the far right side but only if it has too. If it doesn't then I would like it to stay in tact. When I set it as the background of the parent layout however it stretches it both horizontally and vertically and it doesn't even show my buttons when I run it on my droid. I've done the Google searches but there is no good info on how to get something like this working. What am I missing? I have also tried some other configurations including using the padding sides(right and bottom) but that gave the same results. Thanks Code to set as background: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/intro_bg" > ``` Looks like: ![alt text](https://i.stack.imgur.com/gA33K.png) Should look like: ![alt text](https://i.stack.imgur.com/Ht49e.png)
9-patch stretching when it shouldn't stretch, Android
CC BY-SA 2.5
0
2010-08-18T06:39:18.943
2010-08-18T07:40:18.353
2010-08-18T06:50:47.883
336,861
336,861
[ "android", "image", "background", "android-image" ]
3,509,776
1
3,509,821
null
11
13,472
![alt text](https://i.stack.imgur.com/DOXN0.png) Just wondering which tool generated this git tree view? Thanks.
Which git tool generated this tree view?
CC BY-SA 2.5
0
2010-08-18T07:17:32.193
2014-04-08T08:57:30.750
null
null
188,923
[ "git" ]
3,509,934
1
3,565,826
null
2
300
at first i'm really new to ORM, nhibernate and FHN. i look into this stuff for a few days now. i have an existing database with 4 tables: ![alt text](https://i.stack.imgur.com/B8Waz.png) so i tried first to get the Auswahl and RefAuswahlFilter to work. here are my DomainObjects: pls let me know when i can do this better ``` [Serializable] public class Auswahl { public Auswahl() { this.RefFilters = new List<RefAuswahlFilter>(); } public virtual IList<RefAuswahlFilter> RefFilters { get; set; } //...rest of the Properties [Serializable] public class RefAuswahlFilter { public virtual Auswahl Auswahl { get; set; } public virtual long Filterrank { get; set; } public virtual string Filter { get; set; } ``` here are my mappings: ``` public class AuswahlMap : ClassMap<Auswahl> { public AuswahlMap() { Table("AUSWAHL"); Id(x => x.Id) .GeneratedBy.Sequence("SEQ_AUSWAHL"); Map(x => x.Programm); Map(x => x.Variante); Map(x => x.Returnkey); Map(x => x.Beschreibung); HasMany<RefAuswahlFilter>(x => x.RefFilters); } } public class RefAuswahlFilterMap : ClassMap<RefAuswahlFilter> { public RefAuswahlFilterMap() { Table("REFAUSWAHLFILTER"); CompositeId() .KeyReference(x => x.Auswahl,"IDAUSWAHL") .KeyProperty(x => x.Filterrank,"FILTERANK"); Map(x => x.Filter); } } ``` if i run my app i got a list with all my Auswahl rows. ``` var l = session.CreateCriteria(typeof(Auswahl)).List<Auswahl>(); ``` but when i look into an item to get the RefFilters the debugger show the following error: \".\"AUSWAHL_ID\": ungültiger Bezeichner\n"} could not initialize a collection: [ORMTest.DomainModel.Auswahl.RefFilters#1097][SQL: SELECT reffilters0_.Auswahl_id as Auswahl4_1_, reffilters0_.IDAUSWAHL as IDAUSWAHL1_, reffilters0_.FILTERANK as FILTERANK1_, reffilters0_.IDAUSWAHL as IDAUSWAHL3_0_, reffilters0_.FILTERANK as FILTERANK3_0_, reffilters0_.Filter as Filter3_0_ FROM REFAUSWAHLFILTER reffilters0_ WHERE reffilters0_.Auswahl_id=?] so i think something on my mapping is wrong, but i really dont get it. thx.
Nhibernate - How to Design DomainObjects and Mappings with CompositeId
CC BY-SA 2.5
null
2010-08-18T07:44:34.107
2010-08-26T13:02:52.757
2010-08-25T12:37:40.923
355,239
355,239
[ "c#", "nhibernate", "orm", "fluent-nhibernate", "nhibernate-mapping" ]
3,510,016
1
3,635,951
null
2
1,348
I need some combined functionality regarding drag'n'drop between two trees in . required feature is very simple and is just the builtin drag'n'drop features isolated to a single only. ![Standard tree drag'n'drop](https://i.stack.imgur.com/f5x0u.jpg) required feature is that I wan't the user to be able to drag a node from the and drop it at any node in the . ![One way non destructive drag'n'drop](https://i.stack.imgur.com/294oC.jpg) The action should not remove the node from the , thus creating the possibility of dragging the same node from the to multiple places in the . Which approach should I take to combine these two functionalities, utilizing the existing possibilities in the `TreePanel` object without inventing the wheel again? I am not looking for a complete solution (it would be nice though ;-) ), but rather how to handle drag/drop-zones, events and so on.
Wanted: Directions/ideas for a custom tree-to-tree drag'n'drop implementation in ExtJS
CC BY-SA 2.5
0
2010-08-18T07:57:59.680
2010-09-03T12:59:50.267
2010-08-31T07:50:58.953
62,361
62,361
[ "drag-and-drop", "extjs", "tree" ]
3,510,061
1
null
null
0
3,971
Right, excuse my stupidity, I've looked through a load of examples on t'interweb but I don't think I've found what I'm looking for. I have a website, `photography.example.com` is the main site but I also want to have another subdomain to serve static files, for example `static.photography.example.com`. If I request a file (e.g. `http://static.photography.example.com/js/jquery.js`) I want that file to be retrieved from the non-static domain, allowing me to keep my file structure completely untouched but using multiple domains to allow more concurrent http requests. I don't want to throw any http responses that would make the browser thing the file has been moved, I just want to mirror the files from the normal domain to the static domain. After this I would proceed to set far future expired to improve caching etc. How do I achieve this using `.htaccess`? So after a bit of messing around I have come up with this: ``` Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*)$ http://photography.example.com/$1 [L] ``` But this actually redirects to the domain I'm trying to read, I want it to serve the file up under the static domain name, any help with modifying this script would be greatly appreciated. So I've amended my DNS and waited a few days for it to propagate but the CNAME technique doesn't work either. Here's the entry: ![alt text](https://i.stack.imgur.com/9ny25.png)
Using .htaccess to serve static files via a subdomain
CC BY-SA 2.5
0
2010-08-18T08:04:42.337
2015-04-05T08:48:46.980
2010-09-28T12:30:19.003
80,111
80,111
[ "performance", ".htaccess", "caching", "cdn", "static-content" ]
3,510,081
1
3,511,231
null
7
11,921
Consider the following setup: Model: ``` public class Product { [ReadOnly(true)] public int ProductID { get; set; } public string Name { get; set; } } ``` View: ``` <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication4.Models.Product>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Home Page </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <%= Html.EditorForModel() %> </asp:Content> ``` Controller: ``` public class HomeController : Controller { public ActionResult Index() { return View(new Product { ProductID = 1, Name = "Banana" }); } } ``` There result is this: ![alt text](https://i.stack.imgur.com/7ocZW.png) I was expecting that the `ProductID` property was not going to be editable via the `ReadOnly(true)` attribute. Is this supported? If not is there any way to hint ASP.NET MVC that some properties of my model are read-only? I would not like to just hide `ProductID` via `[ScaffoldColumn(false)]`.
Does ReadOnly(true) work with Html.EditorForModel?
CC BY-SA 2.5
0
2010-08-18T08:07:24.707
2014-06-11T11:30:36.813
null
null
10,141
[ "asp.net-mvc", "asp.net-mvc-2", "readonly-attribute" ]
3,510,163
1
3,510,215
null
5
1,214
I have lines as below. ![alt text](https://i.stack.imgur.com/rRrjb.jpg) I am not able to select the all the lines in full. How do i do it? I don't want to use visual line selection mode, because if i copy and paste in line selection maode, they won't start from the the same column
Visual block mode does not select the entire line
CC BY-SA 3.0
null
2010-08-18T08:20:14.470
2014-05-13T16:05:30.643
2014-05-13T16:05:30.643
4,937
39,615
[ "windows", "vim" ]
3,510,227
1
3,510,245
null
1
139
I've refferenced my project to the MEF's dlls System.ComponentModel.Composition.dll System.ComponentModel.Composition.Initialization.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client But the compiler doesn't recognize the PartInitializer. Why ?! ![alt text](https://i.stack.imgur.com/fyYNP.png)
Problem with Silverlight and MEF
CC BY-SA 2.5
null
2010-08-18T08:28:07.010
2010-08-18T08:34:30.167
2010-08-18T08:34:30.167
138,627
138,627
[ "silverlight", "mef" ]
3,511,130
1
3,512,702
null
6
2,508
There is no IDatabase interface (which is a mystery as I though Microsoft P&P would be more on the ball about testability benefits of exposing such an interface). I have a Repository class which used EntLib 5 Data Access Application Block. I am retro fitting unit tests into this class and need to mock out the dependency on the Database object. This class is passed the Database via its constructor and uses a Database object to perform operations on the Db. I use the following to resolve an instance of the Database to be passed to my Repository: ``` Container.RegisterType<IFooRepository, FooRepository>( new InjectionConstructor( EnterpriseLibraryContainer.Current.GetInstance<Database>("FooDbConnStr") ) ); ``` I have tried using Moq to create a dynamic mock of the Database type, but this has proved tricky as Database requires a connection string and a DbProviderFactory in its constructor. Maybe if there was such a thing as a . This is the form that the unit test is taking: ![EntLib UnitTest Attempt to Mock Database](https://i.stack.imgur.com/7mgLy.jpg)
Mocking Enterprise Lib 5 'Database'
CC BY-SA 2.5
0
2010-08-18T10:34:24.457
2013-09-17T15:01:09.840
null
null
85,422
[ "c#", ".net", "unit-testing", "enterprise-library" ]
3,511,596
1
3,678,878
null
12
10,062
I've got simple tab activity with next layout: ``` <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> ``` I use buttons as indicators for tabs ``` tabHost.addTab(tabHost.newTabSpec("Tab1") .setIndicator(new Button(this)) .setContent(new Intent(this, TabActivity1.class))); tabHost.addTab(tabHost.newTabSpec("Tab2") .setIndicator(new Button(this)) .setContent(new Intent(this, TabActivity2.class))); ``` In this case FrameLayout always got black line and shadow effect on top (you can see it under buttons): ![alt text](https://i.stack.imgur.com/DNC4G.png)
Get rid of the line under TabWidget
CC BY-SA 2.5
0
2010-08-18T11:36:10.213
2012-04-01T14:51:39.453
2010-08-26T08:40:50.547
238,123
238,123
[ "android", "line", "tabwidget" ]
3,511,817
1
3,511,889
null
11
9,777
I'm using Xcode for the first time. I've been following a tutorial, and I'm completely stumped by something that's surely trivial. I've dragged a "Menu" from the Library into my "MainMenu.xib" window. Double-clicking this menu makes it appear. ![Default NSMenu in Interface Builder](https://i.stack.imgur.com/4XFWB.png) No trouble thus far. Editing the three items is intuitive, as is deleting items. How on earth do I an item to this menu, though?
How does one add additional items to NSMenu in Interface Builder?
CC BY-SA 2.5
0
2010-08-18T12:03:09.543
2020-03-02T05:02:18.340
null
null
312,785
[ "xcode", "interface-builder" ]
3,511,820
1
3,512,233
null
1
1,272
I'm a member of a small but fairly sociable online forum, and just for fun we've been plotting a chart of who's met who in real life. Here's what it looked like fairly recently. (The colour is the "distance" from the currently-selected user, e.g., yellow is someone who's met someone who's met them. And no, I'm not Zak.) Apologies for the faded lines, they don't seem to have weathered the SO upload process very well. ![Link chart](https://i.stack.imgur.com/u6UTR.png) It's generated as SVG, with a big block of JSON defining who's met who. The position (x,y) of each member on the chart is hard-coded into that JSON. Until now, it's been fairly easy to cope when someone meets someone else - at worst, maybe two or three people need to be shuffled around - but it does involve editing the co-ordinates manually. And now that the European and North American contingents are meeting up, and a few on the periphery are showing up at meets, all hell is breaking loose... We can put some effort into making all the nodes draggable, which would make the job of re-arranging a bit less tiresome. But it seems more sensible to let the computer take care of positioning them, especially as the problem will only get harder with more members. So, does anyone know of an algorithm for positioning these nodes on the chart, based on which other nodes they're linked with? Ideally, it would - - - - but if it gets us close enough to tweak it, that's progress. And, what's the real name for these charts? I believe they're called "link charts", but I'm not getting good results from Google using that name or anything else I can think of. We'll likely be implementing this in PHP or Javascript, but right now it's how to begin approaching the problem that's the bigger question. Some great answers coming already. I would be very interested in the actual algorithm(s) used, though, as well as tools that do the job.
Is there an algorithm for positioning nodes on a link chart?
CC BY-SA 2.5
0
2010-08-18T12:03:30.583
2010-09-20T10:28:41.883
2010-08-18T12:39:54.073
338,518
338,518
[ "algorithm", "charts" ]
3,511,845
1
3,511,860
null
0
13,067
I have database with schema on picture below and I need to select everything related to one row (one id) of [letaky]. That means the related [zamestnanci], every related [obsah] and every [knihy] in it. This is the first time i used relations in database and i have no idea how to make such a select. ![http://img248.imageshack.us/img248/4548/schemai.png](https://i.stack.imgur.com/XXYOe.png)
How to select from database with relations?
CC BY-SA 2.5
0
2010-08-18T12:06:20.387
2010-08-18T12:11:00.383
2010-08-18T12:11:00.383
11,410
null
[ "mysql", "relation" ]
3,512,076
1
null
null
5
14,244
I have a set of data, for which I'd like to find an average peak. I've done some testing in Numbers.app to see what I'm after and if I make a chart of the dataset it has a feature it calls "polynomial trendline" which draws a curve of the data and the peak of that curve looks exactly like the point/value I'm after. So how could I programmatically calculate that curve and find that tangent on the curve? I've been looking around on wikipedia and found topics like "Normal distribution" and "Polynomial regression" which seems very much related, but I've always found it hard to follow the equations on wikipedia so I'm hoping maybe someone here could give me a programatic example. Here's a couple of charts to illustrate what I'm after. The green dots are the data points and the blue line is the "polynomial trendline" (of order 6). ![Example with even dataset](https://i.stack.imgur.com/KiqfB.png) ![Example with uneven dataset](https://i.stack.imgur.com/IQwgf.png) After some answers I realize my question need to be rephrased as the problem is not really how to find the peak of the curve but more of how to generate that blue curve from the green points so I can find where in the dataset the "weight" lies. . I guess another question would be "what is this particular problem actually called?" ;)
Find the "peak" of a set of data
CC BY-SA 2.5
0
2010-08-18T12:32:22.403
2015-06-19T12:42:14.293
2010-08-18T12:55:46.560
80,582
80,582
[ "normal-distribution" ]
3,512,249
1
3,677,396
null
3
4,369
I've create a custom ribbon button that only shows up the Insert block for a blog post. On my dev environment, it shows up fine. When I deploy to another environment, it shows up, but is disabled. I can't figure out how to enable it. Button is enabled and okay on my dev environment ![alt text](https://i.stack.imgur.com/nYZsb.png) Button is disabled on other environment, where I'm a site collection admin. ![alt text](https://i.stack.imgur.com/iHVUK.png) It states that it is likely security or you have something selected that is not in context. I'm a site collection admin, so don't think it's security and I've selected the Rich text area, so not sure about the object context either. Secondary Question: I'd ultimately like to take over the Video and Audio button, but cannot find where that is referenced in the cmdui.xml. Where does that thing come from? Here is my code for the ribbon button: ``` <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="CommandUI.Ribbon.EditingTools.BlogSiteMediaButton" RegistrationType="ContentType" RegistrationId="0x0110" Location="CommandUI.Ribbon"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.EditingTools.CPInsert.Media.Controls._children"> <Button Id="Ribbon.EditingTools.CPInsert.Media.Controls.BlogSiteMediaButton" ToolTipTitle="Video" ToolTipDescription="Insert a video onto the page." Sequence="15" Image32by32="/_layouts/images/lg_ICWMD.gif" Image16by16="/_layouts/images/lg_ICWMD.gif" Command="BlogSite_Media_Button" LabelText="Insert Video" TemplateAlias="o1" /> </CommandUIDefinition> </CommandUIDefinitions> <CommandUIHandlers> <CommandUIHandler Command="BlogSite_Media_Button" CommandAction="javascript:OpenInsertMediaDialog();" /> </CommandUIHandlers> </CommandUIExtension> </CustomAction> <CustomAction Id="Ribbon.EditingTools.CPInsert.Actions.Scripts" Location ="ScriptLink" ScriptSrc="/_layouts/BlogSite.MediaButton/BlogSite.Ribbon.InsertMedia.js" /> </Elements> ```
Custom Ribbon button in SharePoint 2010 showing up as disabled
CC BY-SA 2.5
0
2010-08-18T12:52:36.787
2010-09-09T14:12:24.617
2010-08-27T16:07:11.470
210,916
30,936
[ "sharepoint-2010" ]
3,512,389
1
3,512,503
null
0
395
I'm I'm currently making a wpf c# app. I have some storyboards which animate some elements. Please look at the picture below: ![alt text](https://i.stack.imgur.com/n8nm2.png) This is my grid with some controls after it has been animated. Notice the improper rendering of the text and the rectangle. How can I solve this rendering? UPDATE: Code request by Rachel: ``` <TextBlock Height="35.667" Margin="73.667,19,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="32" Foreground="Black" Text="close" HorizontalAlignment="Left" Width="73.667" UseLayoutRounding="True"/> <Rectangle x:Name="BS2" Fill="#FF0178D3" HorizontalAlignment="Left" Height="64.166" Margin="25,0,0,0" Stroke="Black" VerticalAlignment="Top" Width="30.667" StrokeThickness="0" UseLayoutRounding="True"/> ```
WPF not rendering properly
CC BY-SA 2.5
null
2010-08-18T13:08:05.927
2010-08-18T17:07:19.313
2010-08-18T13:33:22.260
401,480
401,480
[ "wpf" ]
3,512,774
1
3,512,921
null
5
704
I've got a strange error with IE8 and postcode lookups. It may not be postcode lookups as such that's causing it - just an AJAX call that modifies a select. I've set up a test page [here](http://www.sitecritiques.com/test/ie8-bug/). If you click on Find Address, and then double click (quite quickly) on one of the addresses that is within the boundary of the red-bordered div, you see the below bug in IE8. Note: I'm finding it inconsistent to reproduce the bug, but if you scroll the list of addresses right to the bottom and then double click fast on Holly Cottage it should reproduce the bug. ![IE8 Oddities](https://i.stack.imgur.com/2syTu.png) If anyone can shed on light on this quirky behaviour it'd be much appreciated. Is this an IE8 bug?
Strange IE8 problem with a select that runs AJAX
CC BY-SA 2.5
null
2010-08-18T13:48:53.047
2010-08-31T00:07:06.740
2010-08-18T14:16:21.123
313,758
149,998
[ "javascript", "ajax", "internet-explorer-8" ]
3,513,111
1
3,517,348
null
0
7,241
Im creating a PDF document with ezPDF (version 0.9). The data I insert in the document is from a MySQL database with encoding: "latin1_swedish_ci". Special characters (especially ö, which matters the most now) are displayed like Greek pre historical algabra (literal) in the document. What I have tried so far: ``` iconv(); htmlspecialchars(); htmlentities(); mb_convert_encoding(); utf8_encode(); include with chr(148); mb_detect_encoding() returns 'UTF-8'; ``` All of these wont work, the character is either not displayed or has a strange markup. What else can I try? : Downloaded the new version, problem still remains: See here: ![alt text](https://i.stack.imgur.com/Ewlft.png)
special characters (ö) in ezpdf document
CC BY-SA 2.5
0
2010-08-18T14:25:24.170
2015-10-30T18:30:53.650
2010-09-06T08:47:37.747
266,033
266,033
[ "php", "encoding" ]
3,513,284
1
3,513,469
null
7
43,022
I have a WAR file for a Java project but when I try to import it into Eclipse, the only option is for archive files such as tar, zip, jar - nothing for war. Is this only an option in certain editions of Eclipse because I have a copy of SpringSource (also Eclipse-base) that allows me to import WAR files? ![alt text](https://i.stack.imgur.com/wjTUV.jpg)
Why no option to import a WAR file into Eclipse?
CC BY-SA 2.5
0
2010-08-18T14:43:00.663
2016-12-04T14:40:46.463
2010-08-18T14:50:30.450
420,920
420,920
[ "java", "eclipse", "import", "war" ]
3,513,344
1
3,513,507
null
0
152
I'm having problems with the menus of a site I'm developing. Here's what the menus look like in different browsers. ![Chrome](https://i.stack.imgur.com/vaFKw.jpg) ![Opera](https://i.stack.imgur.com/Bwcn9.jpg) ![Firefox](https://i.stack.imgur.com/61FqU.jpg) ![Internet Explorer](https://i.stack.imgur.com/jxb4o.jpg) The menu looks okay in Chrome, but in some browsers the little arrow is wrapped onto the next line. Additionally, in Firefox and IE the menu item overlaps with the arrow. How do I fix this? You can find the stylesheet, HTML sources and all that jazz here: [http://labs.pieterdedecker.be/vspwpg/](http://labs.pieterdedecker.be/vspwpg/?page_id=96)
Unwanted word wrapping in some browsers - why is this rendered differently?
CC BY-SA 2.5
null
2010-08-18T14:48:57.537
2010-08-18T15:04:18.597
2010-08-18T15:03:49.567
217,649
217,649
[ "html", "css", "menu", "cross-browser" ]
3,513,590
1
3,570,540
null
9
2,997
R# 4.5 (answers to 5 are welcome) VS2008 (answers to VS2010 are welcome) C# (FWIW) I'm using a constructor (the question applies for methods, too), and there's Intellisense: ![Foo Constructor Intellisense, showing the parameter variable names](https://i.stack.imgur.com/Tq4Yd.png) I don't yet have a value to specify for this first parameter, "firstName". Today, I , then let the IDE create that variable for me (which I initialize to some value). I understand that the IDE will create the for me. I want it to create the for me. I don't want to have to type "firstName". I like the variable name the parameter author chose, and I want to use that variable name in my (calling) code. Is there a way to have these acceptable variable re-generated for me (the calling code) automatically as I move, parameter by parameter, through this line of (calling) code?
Auto-generate variable *name* to match parameter you're providing?
CC BY-SA 2.5
0
2010-08-18T15:11:15.880
2010-08-25T21:55:31.293
null
null
116,895
[ "c#", "visual-studio", "parameters", "code-generation", "resharper" ]
3,513,783
1
3,513,831
null
4
3,524
This is a screenshot of a table in Chrome 5. ![Chrome](https://i.stack.imgur.com/OCq8G.jpg) The same table rendered in IE8: ![IE8](https://i.stack.imgur.com/faGkF.jpg) You can view the page here: [http://labs.pieterdedecker.be/vspwpg/?page_id=96](http://labs.pieterdedecker.be/vspwpg/?page_id=96) This CSS rule adds the padding that IE8 won't respect: `td#content table.subitems { padding: 5px; }`
IE8 doesn't respect table padding
CC BY-SA 2.5
0
2010-08-18T15:30:40.517
2012-10-20T07:03:40.713
null
null
217,649
[ "html", "css", "internet-explorer", "cross-browser" ]
3,513,862
1
3,544,107
null
6
2,384
I am writing a live wallpaper for android. To test my basic code was working I drew a rectangle in the top left-hand cornor of the screen: ``` canvas.drawRect(0f,0f,50f,50f,paint); ``` Half of the rectangle was underneath the bar at the top of the home screen.![alt text](https://i.stack.imgur.com/OMcpV.png) I tried to take into account pixel offsets using: ``` public void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset) ... canvas.drawRect(0f+xPixelOffset,0f+yPixelOffset,50f+xPixelOffset,50f+yPixelOffset ,paint); ``` But the rectangle is still drawn underneath the bar. How do find where the bar ends so I can draw below it? Cheers, Pete
Android - Live Wallpaper offset clipping
CC BY-SA 2.5
0
2010-08-18T15:39:40.617
2012-01-31T03:41:17.940
2011-08-31T14:26:06.470
19,750
null
[ "android", "draw", "offset", "live-wallpaper", "wallpaper" ]
3,514,104
1
3,514,167
null
0
794
I have a map with locations as shown in the image below. ![alt text](https://i.stack.imgur.com/RbNo6.jpg) These locations are held in a C# Dictionary object with both Latitude/Longitude and Cartesian (x, y, z) coordinates. The area is covered by 5 teams, the first of which is in the south west of the area. What I need is to be able to order the points so that the most south westerly point is first - this would be the green '3' marker near Enniskillen on the map. I've been trying different approaches but not getting the result I want. Can anyone explain an approach that would work? Mark
Sort/Order Locations
CC BY-SA 2.5
null
2010-08-18T16:04:02.040
2010-08-18T16:26:55.893
null
null
219,689
[ "c#", "geospatial" ]
3,514,251
1
3,514,632
null
1
188
I want to create a new dialog looking like the Eclipse "Edit working set" dialog, example: ![alt text](https://i.stack.imgur.com/w3pld.png) (it's not that exact dialog, but it has the same look). Since it seems to be a fairly standard type of dialog, I was hoping I would be able to reuse it, but I haven't found anything usable. The best I got was the actual code for the working set dialog in `package org.eclipse.jdt.internal.ui.workingsets`, [see here](http://www.javadocexamples.com/java_source/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetPage.java.html), which would atleast make it possible to "copy-and-paste" reuse...
Reuse working set dialog?
CC BY-SA 2.5
null
2010-08-18T16:20:21.220
2010-08-18T17:02:07.843
null
null
207,764
[ "eclipse" ]
3,514,392
1
3,514,483
null
5
4,197
I'm wondering how I can create a custom pop-up like the one in the screenshot below (borrowed from the Swype keyboard), where I can have a couple of buttons, which each commit a string to the currently "connected" `TextView` (via a [InputConnection](http://developer.android.com/reference/android/view/inputmethod/InputConnection.html)). this is an [InputMethodService](http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html) and not an ordinary `Activity`. I already tried launching a separate `Activity` with `Theme:Dialog`. However, as soon as that one opens I lose my focus with the `TextView` and my keyboard disappears (and with that my `InputConnection` is gone). ![Swype](https://i.stack.imgur.com/DpSWZ.png)
Android IME: showing a custom pop-up dialog (like Swype keyboard) which can enter text into the TextView
CC BY-SA 2.5
0
2010-08-18T16:36:21.553
2015-09-30T12:39:06.727
2010-11-13T10:41:37.953
49,246
184,367
[ "android", "keyboard", "ime", "android-input-method" ]
3,514,690
1
3,515,445
null
0
3,982
I have a problem with using primeface's wizard component and the core selectOneRadio. My signup page looks like this ``` <ui:define name="content"> <f:view> <h:form id="signUpForm"> <p:wizard widgetVar="wiz" flowListener="#{SignUpBean.onFlowProcess}"> <p:tab id="personalTab" title=""> <p:panel header="Personal"> <h:messages/> <h:panelGrid id="panel1" columns="2"> <h:outputLabel for="firstName" value="First Name"/> <h:inputText id="firstName" value="#{SignUpBean.firstName}" required="true"/> <h:outputLabel for="lastName" value="Last Name"/> <h:inputText id="lastName" value="#{SignUpBean.lastName}" required="true"/> <h:outputLabel for="email" value="Email"/> <h:inputText id="email" value="#{SignUpBean.email}" required="true"> <f:validator validatorId="emailValidator"/> </h:inputText> </h:panelGrid> </p:panel> </p:tab> <p:tab id="passwordTab" title=""> <p:panel header="Password"> <h:messages/> <h:panelGrid id="panel2" columns="2"> <h:outputLabel for="password" value="Password"/> <h:inputSecret id="password" value="#{SignUpBean.password}" required="true"/> <h:outputLabel for="retypePass" value="Retype Password"/> <h:inputSecret id="retypePass" value="#{SignUpBean.retypePassword}" required="true"/> </h:panelGrid> </p:panel> </p:tab> <p:tab id="groupTab" title=""> <p:panel header="Group"> <h:messages/> <h:panelGrid id="panel3" columns="2"> <h:outputLabel for="radioGroup" value=""/> <h:selectOneRadio id="radioGroup" value="#{SignUpBean.join}"> <f:selectItem itemValue="true" itemLabel="Join existing group"/> <f:selectItem itemValue="false" itemLabel="Create new group"/> </h:selectOneRadio> Group Name <h:inputText id="group" value="#{SignUpBean.group}" required="true"/> Group Password <h:inputSecret id="groupPass" value="#{SignUpBean.groupPass}" required="true"/> </h:panelGrid> </p:panel> </p:tab> <p:tab id="confirmTab" title=""> <p:panel header="Confirm"> <h:messages/> <p:growl id="signUpGrowl" sticky="false" life="1000" showDetail="true" /> <h:panelGrid id="panel4" columns="4" cellpadding="5"> Firstname: <h:outputText value="#{SignUpBean.firstName}"/> Lastname: <h:outputText value="#{SignUpBean.lastName}"/> Email: <h:outputText value="#{SignUpBean.email}"/> Groupname: <h:outputText value="#{SignUpBean.group}"/> <h:panelGroup style="display:block; text-align:center"> <p:commandButton value="Submit" action="#{SignUpBean.signUp}" update="signUpGrowl"/> </h:panelGroup> </h:panelGrid> </p:panel> </p:tab> </p:wizard> </h:form> </f:view> </ui:define> ``` And the signUpBean like this: ``` @ManagedBean(name="SignUpBean") @SessionScoped public class SignUpBean { private String groupName, groupPass, firstName, lastName, email, password, retypePassword; private boolean join; private boolean skip; @EJB private MessageBeanRemote messageBean2; /** Creates a new instance of SignUpBean */ public SignUpBean() { this.skip = false; this.join = true; } /** * Signs up a user with all the data given on the signUp.jsf page. * If everything is ok then a confirmation email is generated and send * to the new user. * @return Either signUpSucces or signUpFailure */ public void signUp() { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = session.beginTransaction(); // Boolean to decide if the data should be commited or not. boolean commitOK = true; UserHelper uh = new UserHelper(); BasicUser user = uh.getByEmail(this.email); GroupHelper gh = new GroupHelper(); Group group = gh.getByName(this.groupName); // If email does not already exist if(user == null) { user = new BasicUser(); user.setEmail(this.email); user.setFirstName(this.firstName); user.setLastName(this.lastName); if(this.password.equals(this.retypePassword)) { user.setPassword(password); } else { commitOK = false; FacesMessage fm = new FacesMessage("Passwords does not match"); FacesContext.getCurrentInstance().addMessage(null, fm); } } else { commitOK = false; FacesMessage fm = new FacesMessage("Email does already exist"); FacesContext.getCurrentInstance().addMessage(null, fm); } // If it's a joiner to a group if(this.join) { // Is it the right groupPassword and groupName if(group != null && group.getGroupPassword().equals(this.groupPass)) { user.setGroup(group); } else { commitOK = false; FacesMessage fm = new FacesMessage("Wrong group name or password"); FacesContext.getCurrentInstance().addMessage(null, fm); } } else { if(group == null) { group = new Group(); group.setGroupName(this.groupName); group.setGroupPassword(this.groupPass); user.setGroup(group); } else { commitOK = false; FacesMessage fm = new FacesMessage("Group does already exist"); FacesContext.getCurrentInstance().addMessage(null, fm); } } //--- IF EVERYTHING OK THEN UPDATE THE DB ---// if(commitOK) { session.save(group); session.save(user); tx.commit(); session = HibernateUtil.getSessionFactory().getCurrentSession(); tx = session.beginTransaction(); BasicUser newUser = uh.getByEmail(email); int id = newUser.getId(); MobileUser mobile = new MobileUser(); mobile.setId(id); mobile.setUseWhen("Lost"); StatUser stats = new StatUser(); stats.setId(id); stats.setRating(""); DateUser dates = new DateUser(); dates.setId(id); Calendar calendar = Calendar.getInstance(); Date date = calendar.getTime(); dates.setMemberSince(date); dates.setLastLogin(date); session.save(stats); session.save(mobile); session.save(dates); tx.commit(); //----- SEND CONFIRMATION EMAIL ----------// BasicUser emailUser = uh.getByEmail(email); MailGenerator mailGenerator = new ConfirmationMailGenerator(emailUser); try { StringWriter plain = mailGenerator.generatePlain(); StringWriter html = mailGenerator.generateHTML(); messageBean2.sendMixedMail(email, "WMC: Account Info", plain.toString(), html.toString()); } catch (Exception ex) { Logger.getLogger(SignUpBean.class.getName()).log(Level.SEVERE, null, ex); } FacesMessage msg = new FacesMessage("Successful", "Welcome :" + this.getFirstName()); FacesContext.getCurrentInstance().addMessage(null, msg); } //---- DO NOTHING ----// } public String onFlowProcess(FlowEvent event) { if (skip) { skip = false; //reset in case user goes back return "confirm"; } else { return event.getNewStep(); } } ... getters and setters } ``` I know it is a bad signup method and it will be changed later. When i reach the last tab and submit I get this error: ![alt text](https://i.stack.imgur.com/82Sj3.png) When I debug I see that the join variable is either true or false not null. What is it complaining about?
Primefaces Wizard and selectOneRadio
CC BY-SA 2.5
null
2010-08-18T17:12:16.113
2010-08-18T18:35:02.950
null
null
407,120
[ "jsf", "jsf-2", "primefaces" ]
3,514,926
1
3,547,717
null
1
406
Have a look at the menus on this page: [http://www.pieterdedecker.be/labs/vspwpg/?page_id=96](http://www.pieterdedecker.be/labs/vspwpg/?page_id=96) They look okay in Chrome 5 (above) and IE8 (below). ![Chrome 5](https://i.stack.imgur.com/Wb8Hw.jpg) ![IE8](https://i.stack.imgur.com/nnhQm.jpg) When I load the page into Firefox 3.5 (above) or IE7 (below) something goes wrong. ![Firefox 3.5](https://i.stack.imgur.com/mESM5.jpg) ![IE7](https://i.stack.imgur.com/2wrvY.jpg) In the first case, the arrows on the right have moved to the next row. In the second case, the menu falls apart entirely. How do I adapt the website I'm developing to this? Is it because FF3.5 and IE7 haven't implemented W3C standards entirely or simply because my CSS doesn't make sense? My HTML code has been validated XHTML 1.0 Strict as shown [here](http://validator.w3.org/check?uri=http://www.pieterdedecker.be/labs/vspwpg/%3Fpage_id%3D96&charset=(detect+automatically)&doctype=Inline&group=0). - If you don't have IE7 and you're a Windows user, you can view the site through the eyes of IE7 here without actually having to install IE7: [http://spoon.net/browsers](http://spoon.net/browsers)
Why does this menu render poorly in Firefox 3.5 and IE7? How do I adapt?
CC BY-SA 2.5
0
2010-08-18T17:40:13.973
2010-08-23T19:29:09.217
2010-08-22T15:27:26.647
217,649
217,649
[ "html", "css", "internet-explorer", "cross-browser" ]
3,515,265
1
3,515,337
null
0
194
Please can you tell me why the dark blue background (between the main white section and the outer light-blue section) not show in FireFox? It does show in IE. ![alt text](https://i.stack.imgur.com/JoFo3.png) The site URL is [http://www.moorespeed.co.uk/](http://www.moorespeed.co.uk/) The relevant code is at: [http://www.moorespeed.co.uk/Content/site.css](http://www.moorespeed.co.uk/Content/site.css) ``` #page { background-color:#082d47; margin-left: auto; margin-right: auto; padding: 0 0 0 0; width: 970px; } ```
Why does the dark blue background not appear in FireFox (it does in IE)?
CC BY-SA 2.5
0
2010-08-18T18:16:38.130
2010-08-18T18:29:51.483
null
null
2,699
[ "css", "firefox" ]
3,515,459
1
3,515,600
null
2
434
A user reported to us that some strange behaviour in our application can be resolved after installing .NET 4: ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v2.0.50727" /> </startup> </configuration> ``` I wasn't aware that if you didn't specify an assembly it might be loaded in a higher, but compatible version. Is it possible to identify which framework an executable is executing with? at run-time? or through some external process? I wish to confirm that this is the case, and the users experience has not be the result of some other issue. --- Process Explorer says EVEMon is running under the 2.0, I am inclined to suspect the issue is was environmental: ![Process Explorer](https://i.stack.imgur.com/jtqrz.png)
How to identify which framework an assembly is loaded in?
CC BY-SA 2.5
null
2010-08-18T18:36:28.343
2010-08-19T19:28:58.977
2010-08-19T19:28:58.977
74,302
74,302
[ ".net", "assemblies", "mixed-mode" ]
3,515,638
1
3,515,974
null
3
5,333
I am adding different markers to my map... ``` Drawable drawable = app1.getResources().getDrawable(R.drawable.test); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); OverlayItem overlayitem2 = new OverlayItem(mark, "Test", "t"); overlayitem2.setMarker(drawable); app1.mapOverlay.addOverlay(overlayitem2); app1.mapOverlays.add(app1.mapOverlay); ``` that works but the shadow is at the wrong position. ![alt text](https://i.stack.imgur.com/srx1V.jpg)
MapView Marker shadow
CC BY-SA 2.5
0
2010-08-18T18:56:29.960
2012-04-23T20:13:52.987
2010-08-18T19:47:14.803
126,562
401,025
[ "android", "android-mapview", "marker" ]
3,515,879
1
3,516,317
null
1
1,623
I am trying to create a page as shown in picture. Now only tables are allowed and no css. I am having difficulty in understanding how to achieve as it is in original image. Any help please? ![alt text](https://i.stack.imgur.com/LgPc3.jpg) This is what I have written ``` <html> <head> <title>HTML</title> </head> <body> <table height="350" width="773" background="bg.jpg" > <tr><td><h1 align="right">Welcome to Full Moom Site</h1></td></tr> <tr><td><h3 align="center">Music Company Full Moon</h3></td></tr> <tr><td><p align="right">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vulputate, odio ut auctor porta, quam urna convallis leo, ac ultricies felis mi eget mi. Pellentesque consequat nisl et metus tempor sodales. Quisque ultrices metus consectetur sem placerat eget molestie ipsum gravida. Duis scelerisque augue sed sem venenatis id congue mauris vehicula. </p></td></tr> </table> </body> </html> ```
HTML page (Only with Tables, no css allowed)
CC BY-SA 2.5
null
2010-08-18T19:28:04.537
2010-08-18T20:19:51.060
null
null
235,181
[ "html" ]
3,515,923
1
3,536,046
null
0
170
What kind of char is this and how do I convert it to a text in c#/vb.net? ![alt text](https://i.stack.imgur.com/1WyIe.png) I opened a .dat file in notepad, took a screenshot and attached it here.
What kind of char is this and how do I convert it to a text?
CC BY-SA 2.5
null
2010-08-18T19:32:30.303
2010-08-21T02:46:46.927
null
null
82,709
[ "character-encoding" ]
3,516,130
1
null
null
4
4,518
I'm attempting to upgrade my existing ASP.net MVC 2 web application to MVC 3 so I can use the goodness that is the Razor Viewengine and other [said](http://weblogs.asp.net/scottgu/archive/2010/07/27/introducing-asp-net-mvc-3-preview-1.aspx) improvements. After using the converter to convert my app from mvc2 to mvc3 I'm having issues with my strongly typed views. As an example here we have a view user control that is strongly typed to the class Profile ``` <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Profile>" %> ``` During compilation I'm getting ``` Compiler Error Message: CS1061: 'object' does not contain a definition for 'folio' and no extension method 'folio' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) ``` which corresponds to this line in my view ![alt text](https://i.stack.imgur.com/cRVml.jpg) So it's like the views are no longer accepting a type. This is happening w/ user controls as well as full on views. I've checked both web.config and views/web.config and both seem to be referencing System.Web.Mvc version 3.0.0.0 Any help would be appreciated! See below for screen captures of web.configs ![alt text](https://i.stack.imgur.com/Yq8HN.jpg) ![alt text](https://i.stack.imgur.com/cpxNr.jpg) ![alt text](https://i.stack.imgur.com/HIP6h.jpg)
Upgrade MVC 2 to MVC 3 issues with views
CC BY-SA 2.5
0
2010-08-18T19:54:24.303
2013-01-10T18:30:09.777
2010-08-18T20:31:07.787
263,943
263,943
[ "asp.net-mvc-2", "view", "asp.net-mvc-3" ]
3,516,313
1
3,517,037
null
53
33,521
Realizing that this could be subjective based on the project at hand, I'm looking for the "best practice" method of structuring a VS (Visual Studio) Solution. Please feel free to edit this, comment on what you think might be incorrect, suggest alternatives, etc. I'd love to see this Community Wiki grow into a great resource for people just starting with VS Solutions. Below is what I have working for me now (on my current project), however I know for a fact that there is some stuff in the wrong place. Please post your idea of the ultimate solution structure so that we can get an idea of the "best way" / "best practice" () How do you break up your DAL (Data-Access-Layer) / BLL (Business-Logic-Layer)? Do you put your repository layer and service layer inside your BLL? If you're using MVC (Model-View-Controller), do you keep your controllers in the UI instead of the Core? Do you throw lots of stuff in your Utility/Miscellaneous folders, or do you break it apart even further? etc... --- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- ![Core](https://i.stack.imgur.com/y34gc.png)![UI](https://i.stack.imgur.com/t8uMn.png) Please feel free to comment accordingly, or better yet, post your own version (answer) below. I know that what I've got isn't the best way.
The Ultimate Visual Studio Solution Structure
CC BY-SA 3.0
0
2010-08-18T20:19:20.877
2015-07-15T16:41:04.763
2015-06-11T15:57:40.397
1,804,496
124,069
[ ".net", "visual-studio", "projects-and-solutions" ]
3,516,406
1
3,516,484
null
0
802
I've got some problems while trying to lay out my site. I'm using [Blueprint Framework](http://www.blueprintcss.org/) and it happens when I apply borders to my div. Since their width are controlled by `span-XX` (or `grid-xx` as I noticed in [960gs](http://960.gs)), the moment I apply borders to any `div` element I have it goes out of the grid as seen in these images ![out](https://i.stack.imgur.com/Y6sfZ.png) [Click to zoom](http://img37.imageshack.us/i/59550451.png/) ![alt text](https://i.stack.imgur.com/zN5c3.png) [Click to zoom](http://img687.imageshack.us/f/so2i.png/) The only way I know to fix it is to change element's width, but then the framework's grid purpose finishes 'cause I won't have the `span-XX` classes anymore. Is there any other way to fix it?
Blueprint CSS framework or any Grid system: fix for bordered divs
CC BY-SA 2.5
null
2010-08-18T20:31:33.420
2011-09-23T08:29:00.250
null
null
336,945
[ "css", "gridview", "grid", "blueprint-css" ]
3,516,527
1
null
null
1
511
I'm having an issue where certain controls are flipped, depending on the machine that I'm building my project on. On my development machine, when I build it, everything is okay. However, when I build it on our build server, some things are flipped. It seems to be things that are on a higher layer - for instance, options in the select control (see first image below), alerts/overlays (see second image below), etc. It's not just the text, either - the entire content is flipped, images and all. ![alt text](https://i.stack.imgur.com/ITYyu.png) ![alt text](https://i.stack.imgur.com/ftYgI.png) I have verified that the code is exactly the same in both instances, so it must have something to do with settings or the flex SDK version. On my development machine, the Flex SDK version is 4.0.0.14159, and on the build server, the Flex SDK version is 4.1.0.16076. I can downgrade the SDK on the build server if needed - but could it really be an issue with the SDK? Any ideas? Thanks!
Adobe AIR: Controls flipped (mirrored) in certain build environments
CC BY-SA 2.5
0
2010-08-18T20:45:03.620
2011-05-30T11:25:01.870
null
null
52,791
[ "apache-flex", "air", "flex4" ]
3,516,710
1
null
null
0
2,497
I have a question about Ext JS (error message). I had code that was running fine in all browsers but yesterday at noon I tried to modify de css and I think I messed something up. After saving my document and uploading it to my server, I encountered the error: `Ext is not defined` and `illegal character`. I really have no clue where this error comes from. It makes my whole system crash in Firefox. The weird thing is that IE has no problem at all and reads everything as it should. At first, I was thinking of a catch (browsers problem) but it isn't that. Look at the images below for error messages and code. I have an asp include at the top of every page, which includes all of the available .js's. Here is the image of the errors: ![firebug error messages](https://i.stack.imgur.com/6jOhv.jpg)
Ext is not defined IN Firefox?
CC BY-SA 3.0
null
2010-08-18T21:08:31.083
2014-02-22T21:42:06.997
2014-02-22T21:42:06.997
807,423
424,513
[ "extjs" ]
3,516,784
1
3,520,633
null
2
498
: How to efficiently query and update entities having relationships to other entities? Here's an interesting data modeling scenario with two tables that has been puzzling me: ``` Entities { ID, Name, ScalarValue } ComponentEntities { AggregateEntityID, ComponentEntityID, quantity } ``` `AggregateEntityID` and `ComponentEntityID` are foreign keys to the `Entities` table. ``` Drinks { ID, Name, Alcohol% } DrinkIngredients { CocktailID, IngredientID, amount } Drinks { 1, "Vodka", 40% } Drinks { 2, "Tomato juice", 0% } Drinks { 3, "Tabasco", 0% } Drinks { 4, "Bloody mary", - } DrinkIngredients { 4, 1, 0.2 } // Bloody mary has 0.2*Vodka DrinkIngredients { 4, 2, 0.7 } // Bloody mary has 0.7*Tomato juice DrinkIngredients { 4, 3, 0.1 } // Bloody mary has 0.1*Tabasco ``` If we wanted to get Bloody Mary's alcohol contents, we would `SELECT * FROM DrinkIngredients WHERE CocktailID == 4`. Pretty standard; nothing weird there. Lisa likes to make it a bit sweeter by adding some Passion to it: ``` Drinks { 6, "Passion", 13% } Drinks { 7, "Bloody Mary Pink", - } DrinkIngredients { 7, 4, 0.8 } // Bloody Mary Pink has 0.8*Bloody Mary DrinkIngredients { 7, 6, 0.2 } // Bloody Mary Pink has 0.2*Passion ``` Lisa's mum has been tasting these for so long that she believes she has found the ultimate blend between the two: ``` Drinks { 8, "Bloody Milf", - } DrinkIngredients { 8, 4, 0.45 } // Bloody Milf has 0.45*Bloody Mary DrinkIngredients { 8, 7, 0.55 } // Bloody Milf has 0.55*Bloody Mary Pink ``` Add couple more of these levels and we have a deep relational recursion. The only restriction is that entity cannot consist of itself. This seem to form a [directed acyclic graph](http://en.wikipedia.org/wiki/Directed_acyclic_graph). RDBMS: One way to "cache" the data would be to calculate relevant data and store it in the Entity itself (or perhaps in another table). In the example above, the alcohol content for Bloody Mary would calculated once when it's created and stored in its Alcohol% field. In this case, updates become expensive because we have to update every drink (along with the whole dependency hierarchy) consisting of the updated one. ## Questions RDBMS: Is there a better way to get to the leaf values (drinks that don't consist of other ones) than getting the "parent" drink until a leaf drink is reached? Both, RDBMS and NoSQL, have a problem with this: one way or the other. Bottom-line: is this even practical and feasible? ![alt text](https://i.stack.imgur.com/8wHC0.jpg)
How to prevent deep recursive queries with entities consisting of entities of the same type? [Cool example inside]
CC BY-SA 2.5
0
2010-08-18T21:18:15.647
2010-08-19T10:02:13.863
null
null
377,920
[ "database-design", "recursion", "hierarchical-data", "self-reference", "rdbms-agnostic" ]
3,517,006
1
3,517,043
null
1
185
On the screenshot, you see on the bottom there is a list of prices. I want it hidden by default and when I click on the button 'Prices', I want it to slide down from underneath. Then if I press it again I want the list to slide up again. How can I do this? Sorry if I didn't explain much, any questions please ask. ![alt text](https://i.stack.imgur.com/4iUc7.png)
How can I use JQuery on my page?
CC BY-SA 2.5
null
2010-08-18T21:48:51.293
2010-08-18T21:58:57.677
null
null
363,551
[ "jquery", "css" ]
3,517,123
1
3,519,339
null
1
2,819
Whenever I do: ``` xxx = [NSImage imageNamed:@"Package.png"]; ``` loads but it's width and height remain 0. And whenever I try loading it into an NSImageCell I get this error: > NSImageCell's object value must be an NSImage. Can someone help me out? I've never had this problem before. Edit: So when I do it in the data source delegate it does not work and it shows the above error after ''. ``` NSImageCell* cell = [[NSImageCell alloc] init]; [cell setObjectValue:xxx]; // Using imageNamed doesn't help either ``` Edit 2: This is becoming aggravating. I don't understand what happened but the image loads height and width properly, but it still complains when I add it to an NSImageCell. ![alt text](https://i.stack.imgur.com/uUVLA.png)
Can't create an NSImage?
CC BY-SA 2.5
0
2010-08-18T22:08:45.243
2010-08-19T08:20:28.050
2010-08-19T05:37:48.573
160,868
160,868
[ "objective-c", "cocoa", "nstableview", "nsimage" ]
3,517,278
1
null
null
4
1,925
Problem is solved by updating. --- Resharper is really annoying me and marking code that is 100% correct as wrong, it keeps wanting me to change an `Action` to an `Action<T1,T2...Tn>` when this obviously incorrect. It flashes everytime I type something so is really distracting. Is there a way to disable resharper totally inbetween two comments? Or how do you disable only for this warning? ![alt text](https://i.stack.imgur.com/ZsK5c.png) There is no hint on the left to disable this using comments. The menu that pops up when you press +: ![alt text](https://i.stack.imgur.com/WZUSz.png) I found a solution, just wrap the offending lines of code in `#region RFail` and `#endregion` statements. Not ideal though.
Disable Resharper with comment
CC BY-SA 2.5
null
2010-08-18T22:33:22.693
2011-07-24T10:40:46.237
2010-08-19T08:13:42.237
139,766
139,766
[ "c#", "delegates", "resharper" ]
3,517,298
1
3,518,163
null
0
659
(EDIT: I've edited my question to make it simpler, sorry if some answers are out of context) I have prepared a reduced test case for my question: ![alt text](https://i.stack.imgur.com/NiOKx.png) I'm trying to create a custom component which is being fed with XML data coming from the server. My problem is that the CollectionEvent listener doesn't get fired and thus labels not updated - (my custom component with listener): ``` <mx:Script> <![CDATA[ import mx.events.*; private var _xlist:XMLList; [Bindable] public function get xlist():XMLList { return _xlist; } public function set xlist(x:XMLList):void { _xlist = x; trace("set(" + x +")"); list.dataProvider = x; list.dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, xlistChanged); } private function gameLabel(item:Object):String { return "game: " + item.@label; } private function xlistChanged(event:CollectionEvent):void { trace("xlistChanged(" + event +")"); all.text = "All games: " + _xlist.game.length(); full.text = "Full games: " + _xlist.game.(user.length() == 3).length(); vacant.text = "Vacant games: " + _xlist.game.(user.length() < 3).length(); } ]]> </mx:Script> <mx:Label id="all" text="All games"/> <mx:Label id="full" text="Full games"/> <mx:Label id="vacant" text="Vacant games"/> <mx:List id="list" labelFunction="gameLabel"/> ``` (click the buttons to change XML): ``` private function changeXML1():void { games = <games> <game label="1"> <user/> <user/> <user/> </game> <game label="2"> <user/> <user/> </game> <game label="3"> <user/> <user/> <user/> </game> </games>; } private function changeXML2():void { games = <games> <game label="A"> <user/> <user/> <user/> </game> <game label="B"> <user/> <user/> </game> <game label="C"> </game> </games>; } ]]> </mx:Script> <mx:XML id="games"> <games> <game label="X"> <user/> <user/> </game> <game label="Y"> <user/> <user/> </game> </games> </mx:XML> <mx:Button label="Change XML 1" click="changeXML1()"/> <mx:Button label="Change XML 2" click="changeXML2()"/> <my:Games xlist="{games.game}"/> ``` Please advise me what is wrong. Regards, Alex edited Games.mxml as suggested by clownbaby - still not working (xlistChanged is never invoked): ``` <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:my="*" creationComplete="onCreationComplete(event)"> <mx:Script> <![CDATA[ import mx.events.*; private var _xlist:XMLList; [Bindable] public function get xlist():XMLList { return _xlist; } public function set xlist(x:XMLList):void { _xlist = x; list.dataProvider = x; trace("\n set: " + x); } private function gameLabel(item:Object):String { return "game: " + item.@label; } private function onCreationComplete(event:FlexEvent):void { list.dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE, xlistChanged); } private function xlistChanged(event:CollectionEvent):void { all.text = "All games: " + xlist.length(); full.text = "Full games: " + xlist.(user.length() == 3).length(); vacant.text = "Vacant games: " + xlist.(user.length() < 3).length(); } ]]> </mx:Script> <mx:Label id="all" text="All games"/> <mx:Label id="full" text="Full games"/> <mx:Label id="vacant" text="Vacant games"/> <mx:List id="list" labelFunction="gameLabel"/> </mx:VBox> ```
Flex: Listening for CollectionEvent in custom component
CC BY-SA 2.5
null
2010-08-18T22:37:39.020
2010-08-25T14:21:15.077
2010-08-25T14:21:15.077
165,071
165,071
[ "apache-flex", "e4x", "xmllist" ]
3,517,370
1
3,517,578
null
7
8,623
The following code puts a cube at (0, 0, 0) and another at (0, .5, .5) and each cube is (.5, .5, .5) in dimension. I'm trying to rotate the view that the screen gets to one like this ![good](https://i.stack.imgur.com/VJUPt.png) but instead I get this view ![alt text](https://i.stack.imgur.com/3fhQ2.jpg). Also, I realize I got the colors backwards. Anyway, this is my code so far: ``` import com.sun.j3d.utils.geometry.*; import com.sun.j3d.utils.universe.*; import javax.media.j3d.*; import javax.vecmath.*; public class Positioning { private Color3f lightBlue; private Color3f aquaGreen; private Color3f white; private Color3f teal; private BranchGroup group; private SimpleUniverse universe; public Positioning() { lightBlue = new Color3f(0.0f, 0.749019608f, 1.0f); aquaGreen = new Color3f(0.439215686f, 0.858823529f, 0.576470588f); white = new Color3f(1.0f, 1.0f, 1.0f); teal = new Color3f(0.196078431f, 0.6f, 0.8f); universe = new SimpleUniverse(); group = new BranchGroup(); addCube(0.5f, 0.5f, 0.5f, new Vector3f(0.0f, 0.0f, 0.0f), lightBlue); addCube(0.5f, 0.5f, 0.5f, new Vector3f(0.5f, 0.0f, 0.5f), aquaGreen); //add light DirectionalLight light1 = new DirectionalLight(white, new Vector3f(0.0f, 7.0f, -12.0f)); light1.setInfluencingBounds(new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0)); group.addChild(light1); //look at the right spot Transform3D lookAt = new Transform3D(); lookAt.lookAt(new Point3d(0.0, 0.0, 3.0), new Point3d(0.0, 0.0, 0.0), new Vector3d(1.0, 1.0, 0.0)); lookAt.invert(); universe.getViewingPlatform().getViewPlatformTransform().setTransform(lookAt); universe.addBranchGraph(group); } public void addCube(float x, float y, float z, Vector3f position, Color3f color) { TransformGroup tg = new TransformGroup(); Transform3D trans = new Transform3D(); Appearance app = new Appearance(); Material mat = new Material(); mat.setDiffuseColor(color); mat.setSpecularColor(color); app.setMaterial(mat); Box b = new Box(x, y, z, app); //move into position and add to the branch group trans.setTranslation(position); tg.setTransform(trans); tg.addChild(b); group.addChild(tg); } public static void main(String[] args) { new Positioning(); } } ``` So right now the canvas is black and I think it might be my positioning on the lookAt function. I'm also not exactly for sure what the up vector is for. Any ideas on how to fix this?
Rotating the viewing platform in Java3d
CC BY-SA 2.5
0
2010-08-18T22:49:54.273
2010-08-30T03:26:20.390
2010-08-30T03:26:20.390
386,059
386,059
[ "java", "3d", "rotation", "java-3d" ]
3,517,726
1
3,517,746
null
217
123,972
> [Why is it bad to use goto?](https://stackoverflow.com/questions/3444060/why-is-it-bad-to-use-goto) [GOTO still considered harmful?](https://stackoverflow.com/questions/46586/goto-still-considered-harmful) I was ramdomming through xkcd and saw this one (if also read some negative texts about them some years ago): ![your slow connection sucks, get a faster one to see this image](https://imgs.xkcd.com/comics/goto.png) What is actually wrong with it? Why are goto's even possible in C++ then? Why should I use them?
What is wrong with using goto?
CC BY-SA 2.5
0
2010-08-19T00:05:55.090
2022-06-24T20:38:19.520
2017-05-23T12:10:36.343
-1
null
[ "c++", "goto" ]