Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
5,976,845
1
5,979,839
null
5
757
With xaml (notice the binding on dictionary entry Attributes[Welcome]): When the view model implements IDataErrorInfo as: ``` public string Error { get { return ""; } } public string this[string columnName] { get { return "Compulsory Error"; } } ``` Only columnName == "Test" is ever passed. And therefore I get the following application: ![enter image description here](https://i.stack.imgur.com/8BPvT.png) How can I validate the values being set for the Attributes Dictionary?
How to implement IDataErrorInfo on string indexers databinding?
CC BY-SA 3.0
null
2011-05-12T10:47:26.553
2011-05-12T15:19:25.560
null
null
390,330
[ "wpf", "silverlight", "mvvm" ]
5,976,922
1
5,977,046
null
0
183
So I have compressed jquery ui stylesheet to save bandwidth and suddenly dialog windows started to look weird. This is how they look when I use uncompressed stylesheet: ![enter image description here](https://i.stack.imgur.com/9W6qS.png) With compressed stylesheet: ![enter image description here](https://i.stack.imgur.com/iZMUH.png) I used this website to compress the stylesheet: [https://csscompressor.net/](https://csscompressor.net/) Any ideas what's wrong?
Jquery ui compressed stylesheet
CC BY-SA 3.0
null
2011-05-12T10:53:39.563
2017-09-11T03:05:55.783
2017-09-11T03:05:55.783
3,917,908
95,944
[ "jquery", "css", "jquery-ui", "jquery-ui-dialog" ]
5,976,963
1
8,253,717
null
0
1,100
In iPhone SDK 4.2.3, use default Split View template to cook-up a dummy application. In landscape mode, the master view uses default navigation bar style. In portrait mode, the master view uses black navigation bar style inside the popover. How can i change the bar style/tint color to make it consistent for both views? I've tried to do this in split view delegate method, but it doesn't work. ``` pc.contentViewController.navigationController.navigationBar.barStyle = UIBarStyleDefault; pc.contentViewController.navigationController.navigationBar.tintColor = [UIColor redColor]; ``` I've also tried to explicitly set the navigation bar style in the master view controller class, but that doesn't seem to have any impact as well. ![enter image description here](https://i.stack.imgur.com/9DV3f.png)
Navigation bar style in popover view controller
CC BY-SA 3.0
null
2011-05-12T10:57:16.710
2011-11-24T07:54:31.367
null
null
49,739
[ "ipad", "split", "uisplitviewcontroller", "uipopovercontroller", "popover" ]
5,976,978
1
5,977,059
null
0
450
I am trying to implement iAd's in my app and written all the required code for this... But for reasons unknown to me and my pals, my code is not working and i am not able to see the iAd's in my app. Even sample code from apples regarding iAd's is not working on my mac. The same code worked absolutely fine when ran on another system from another location. me and my pals are scratching our heads due to this from the past 3 days. I am posting two screenshots of the same code ran from two different locations and machines.... i am using X-code version 3.2.5, SDK version 4.2, Mac version 10.6. All the inputs of any kind are appreciated.... ![output from other location and system](https://i.stack.imgur.com/4DOmP.png) ![enter image description here](https://i.stack.imgur.com/pGiu7.png) ![sdk information](https://i.stack.imgur.com/xrk8Q.png)
Apple's iAd's sample code not working as expected
CC BY-SA 3.0
null
2011-05-12T10:58:47.257
2011-05-12T11:22:58.093
2011-05-12T11:22:58.093
481,455
541,582
[ "iphone", "ios", "ipad", "iad" ]
5,977,200
1
5,977,251
null
3
3,797
I have an image stored on server at location: ``` C:\inetpub\wwwroot\imageupload\images ``` in my code i want to use an image from folder images so i am trying as follows: ``` Server.MapPath("/images/sample1.jpg") ``` But i am getting the error as: ![enter image description here](https://i.stack.imgur.com/zp1TX.jpg) Please help me to solve the error As on several answer asking to post the code,it is as follows ``` <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="CS.Web.UI.CropImage" Namespace="CS.Web.UI" TagPrefix="cs" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <cs:CropImage ID="wci1" runat="server" /> </body> </html> ``` ``` using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { wci1.Crop(Server.MapPath("/imageupload/images/sample1.jpg")); /* this part is just to show the image after its been cropped and saved! so focus on just the code above. */ Image img = new Image(); img.ImageUrl = "images/sample1.jpg?rnd=" + (new Random()).Next(); // added random for caching issue. this.Controls.Add(img); } } ``` Crop method is from a .dll file i have used from [http://imagecropping.codeplex.com/](http://imagecropping.codeplex.com/)
Server.MapPath throws error when using web image cropping library
CC BY-SA 3.0
null
2011-05-12T11:23:18.100
2016-02-17T19:17:24.210
2013-07-04T11:55:40.127
569,101
243,680
[ "c#", "asp.net", "crop", "server.mappath" ]
5,977,348
1
5,977,835
null
6
1,156
I'm using git on a daily basis for a while now, and this time I've run into a problem which I could describe like this. I have a repository which holds entire website structure, and web root is in the root of the repository. Everything was fine until that was repository for a single site. However, that same repo is now used for several sites - basically the same site, in different languages, minor template tweaks, different graphics, etc. Those things are naturally versioned. There is a master branch, which holds original source code of the site, and I'd like to have master (or some other branch) to hold code that is universal across all sites, as there will eventually be changes that are too site-specific to include in universal part of the repo. Next, there is a branch for every single site which uses this source code. All those branches (say, , , and ) are created from master branch, and each site clones correct branch. Well, it seemed like a good idea, until I started making changes everywhere. If I made a change on site1 branch, and I needed to copy that change to site2 branch, I would cherry-pick commit from one branch to another. Merging is out of the question there, as there are other changes on site1 branch which do not belong with site2 branch. Is there some other, more elegant solution for this kind of situation, or is that cherry-picking is exactly for this purpose? Now, the real "problem" for me is when I change master, and then I want to copy all those changes to all branches. Naturally, considering the fact that all branches are descendants of master, and that I want those changes in all site* branches, I switch to each branch and merge master. This creates a pretty nasty-looking history for all branches. Each round of merges complicates graph considerably, which leads me to two conclusions: 1. this way of layering branches can work as long as I watch my step and not do anything stupid, and not trying to get any sense out of all-branches history graph. Or.. 2. there has to be some better, more appropriate way to do it. To illustrate my "problem", I'll give an image of graph that I got after creating those branches, adding few branch-specific commits, cherry-picking few of them, adding and merging one commit from master to all branches, commit or two to specific branches, and then one more master-to-all merge. ![sort of not-so-simple history graph](https://i.stack.imgur.com/s4Nw1.png) I don't know, I like simplicity, and maybe I'm not used to seeing hard-to-follow graphs like this one (which will only grow in complexity with every following merge, I'm afraid). I guess I could do cherry-picking all the way, and have neat history graph, but that doesn't sound right either, since I might do several commits in a row, and then forget to pick one of them to all other branches... So... Any ideas, experiences, suggestions that you wouldn't mind to share? I choose a solution described in my comment on accepted answer. Thanks to everyone who contributed! Even though it's not tightly related to this question, [recently I stumbled upon this model of branching](http://nvie.com/posts/a-successful-git-branching-model/) that appears to be suitable for pretty much any organized development cycle, with GIT as underlying DVCS. It's a really good read. Recommended.
"Layering" git repository
CC BY-SA 3.0
0
2011-05-12T11:37:17.717
2011-06-17T08:34:34.133
2011-06-17T08:34:34.133
267,491
267,491
[ "git", "git-branch", "repository-design" ]
5,977,720
1
null
null
0
92
do you know an approach to animate the digits of a destination board? I saw it already in some apps and now I need it for an own project. ![enter image description here](https://i.stack.imgur.com/jB8Ns.jpg)
iPhone: How to animate a destination board?
CC BY-SA 3.0
0
2011-05-12T12:07:37.187
2011-05-12T12:22:10.497
null
null
76,371
[ "iphone", "cocoa-touch", "ios4", "animation", "core-animation" ]
5,977,782
1
5,978,073
null
1
1,087
I have a mapping between 16 fixed numbers (points on the X axix) and their values (displayed on the Y axis). What I need is to display this data as XY-plot and to be able to change those values by moving selected point up or down. it should look something like: ![enter image description here](https://i.stack.imgur.com/XfKOD.jpg) What are possible approaches to implement this functionality (in winforms or wpf)? Maybe there are some third-party libraries which already implements most of it. Also, there is a possible situation when fixed numbers contains two coordinates (placed in the square). In that case, a 3D-plot will be needed.
Displaying and editing data by XY-plot
CC BY-SA 3.0
null
2011-05-12T12:12:50.313
2011-05-12T12:35:20.440
null
null
603,019
[ "c#", ".net", "graphics", "3d", "plot" ]
5,977,821
1
5,994,979
null
2
367
After changing the BaseSDK of my project to 10.6 I noticed that my custom drawn text looks different (look at the images: the same code for drawing) Under 10.5 BaseSDK: ![image1](https://i.stack.imgur.com/NRd7Q.png) Under 10.6 BaseSDK: ![image2](https://i.stack.imgur.com/qIiAD.png) I'm drawing with [(NSString *)myString drawInRect:myRect withAttributes:myAttributes]. ``` myAttributes = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [NSColor myColor], NSForegroundColorAttributeName, [NSFont systemFontOfSize:18], NSFontAttributeName, paragraphStyle, NSParagraphStyleAttributeName, shadow, NSShadowAttributeName, nil]; ``` What is the reason of such difference, or just how to reduce the thickness of the font? I've tried to reduce thickness by `[NSFontManager convertWeight:NO ofFont:font]` but it looks not much better... Thanks in advance.
Problem with font thickness after changing BaseSDK from 10.5 to 10.6
CC BY-SA 4.0
0
2011-05-12T12:17:07.603
2020-01-06T12:55:47.013
2020-01-06T12:55:47.013
593,709
750,389
[ "objective-c", "cocoa", "text", "drawing", "base-sdk" ]
5,978,061
1
null
null
0
259
After eliminating a couple of PermGen-related problems in a Java web application I have reached the following point: - `DataSource`- `DataSource``$TOMCAT_HOME/conf/context.xml`- `DataSource``DataSource`- `BasicDataSource``GenericObjectPool``java.util.Timer`- `TimerThread` ``` java.util.Timer.<init>(Timer.java:123) org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.<clinit>(GenericObjectPool.java:268) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1172) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:114) org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163) org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159) org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383) org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954) org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855) org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774) org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ``` ![GC Roots](https://i.stack.imgur.com/6zvX1.png) My first though was to ask Tomcat to initialise the `DataSource` eagerly, thus pinning it in the common classloader, but I found no way of doing that. I'm of course open to other ways of solving this ( but the JNDI-bound resource needs to stay ). How can I make sure that the `TimerThread` is linked to the web app classloader?
Forcing a Tomcat-handled DataSource to be eagerly initialised
CC BY-SA 3.0
null
2011-05-12T12:34:25.857
2015-03-23T00:49:28.500
null
null
112,671
[ "java", "tomcat", "apache-commons-dbcp", "permgen" ]
5,978,139
1
null
null
3
1,420
I need a form with two (mutually exclusive) radio buttons and with some other controls between them. I mean i need form like this:![enter image description here](https://i.stack.imgur.com/uVnOw.png) [Here](https://stackoverflow.com/questions/854683/django-booleanfield-as-radio-buttons) I found a way to make a boolean field with two mutually exclusive radio buttons, but I have no idea how to insert other controls between them.
How to create Django form with mutually exclusive radiobuttons?
CC BY-SA 3.0
null
2011-05-12T12:40:58.597
2012-05-28T16:11:03.717
2017-05-23T12:31:20.873
-1
544,820
[ "django-forms", "radio-button" ]
5,978,221
1
5,979,378
null
0
800
last days I was browsing one of the apps in Android and I found out an amazing list. ![Custom-List](https://i.stack.imgur.com/tDUAL.png) I Found that Custom `ListView` Interesting. When we click on the Text it shows me some `Activity` and when we click on the Arrow on Right it shows me a dialog. I want to learn this. Can anybody go through some Tutorials where this Custom List is explained. Please Friends. guide me.. Thanks alot
need tutorials on Android Custom-List
CC BY-SA 3.0
0
2011-05-12T12:50:00.957
2013-05-23T06:47:51.560
2013-05-23T06:47:51.560
1,061,281
521,015
[ "android", "list", "custom-lists" ]
5,978,276
1
5,978,380
null
1
533
I've already got a background image. But i'm builid a gallery which would have different categories. If i select a category the images would load up in little squares and then when i select any of them i want it to change a named id's content...![enter image description here](https://i.stack.imgur.com/ceNSe.png) e.g. Any good tips would be appreciated immensely. What i'm trying to do are two items. 1. Change the color of the navigation box to a solid color. 2. change the image source of an id "grouptabs" when clicked <div id="random"> <img id="grouptabs" src="/u/i/1920x1200.jpg" /> </div> This is what i'm trying to get to... Thanks for all your suggestions
fullscreen background images
CC BY-SA 3.0
null
2011-05-12T12:54:45.190
2011-05-14T10:39:17.703
2011-05-13T10:26:39.053
470,567
470,567
[ "jquery", "css" ]
5,978,407
1
7,326,359
null
3
9,023
I have a web app which runs on JSF 2.0 + Richfaces 3.3.3. Looks great on all browsers except IE9. In IE9 without compatibility mode (With, no problem) it looks something like this (ignore blacked out text): ![enter image description here](https://i.stack.imgur.com/JZAQi.png) Notice how all the components are framed and CSS is ignored (Not seen?) The JSP looks like this (Only relevant stuff): ``` <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf8"> <link rel="stylesheet" href="css/pageStyle.css" type="text/css" > </head> <body> ... </body> ``` The css is located at `C:\apache\tomcat\webapps\MyWebApp\css\pageStyle.css` Anyone got any idea? Thanks! Did some research with 'developer tools' by capturing packets with the `network` tab. The css file is sent with Type=`text/html` instead of `text/css`. I guess that's the problem according to [this](https://stackoverflow.com/questions/3865873/ie9-ignoring-css-for-certain-pages) question. But I still don't know why this happens. As you can see, the file type is clearly marked as `type="text/css` in the `<link>` tag. interesting observation - examining the same object in Chrome Developer Tools, the content-type is `text/css` so maybe its a IE9 bug. I'm confused...
IE9 + RichFaces Rendering problem
CC BY-SA 3.0
0
2011-05-12T13:04:24.050
2012-11-12T17:02:38.007
2017-05-23T12:12:03.197
-1
128,076
[ "css", "jsf", "richfaces", "internet-explorer-9" ]
5,978,422
1
5,978,901
null
6
7,233
Here is a complete test case: ``` <!DOCTYPE html> <html> <head> <title>test</title> <style type="text/css"> html, body, ul, li, div, span { padding: 0; margin: 0; } ul.container { display: table; list-style-type: none; margin-right: 24px; position: relative; } ul.container li { display: table-cell; position: relative; } ul.container div, ul.container span { border: 1px dotted #000; } ul.container div { width: 40px; height: 40px; position: absolute; left: 0; top: 40px; background-color: #008000; } ul.container span { display: block; width: 40px; height: 40px; background-color: #9acd32; } </style> </head> <body> <ul class="container"> <li> <span>Alice</span> <div>Alice</div> </li> <li> <span>Bob</span> <div>Bob</div> </li> </ul> </body> </html> ``` Absolutely positioned `div` has `li` as `offsetParent` in IE9 and Opera, while WebKit and Firefox set `offsetParent` to `body`. ![result in IE9 and Opera](https://i.stack.imgur.com/w64cB.png) ![result in Firefox 4 and WebKit](https://i.stack.imgur.com/3Vj9a.png) : what is the correct behavior?
li with {display: table-cell; position: relative;} with absolutely positioned div inside behaves differently in (FF4, WebKit) vs (Opera, IE9)
CC BY-SA 3.0
0
2011-05-12T13:06:06.360
2011-05-12T14:40:34.383
2011-05-12T14:40:34.383
144,311
144,311
[ "html", "css", "css-position" ]
5,978,430
1
6,041,101
null
24
16,441
For Android Platform: I need to put margin on right side of the vertical scrollbar in listview (it is customized). Please see the attached image. Default scrollbar sticks to the extream right side of the listview. ![Image](https://i.stack.imgur.com/Pq9fa.png) Need your hand. Thanks.
How to set margin for Vertical Scrollbar from the right edge in ListView?
CC BY-SA 3.0
0
2011-05-12T13:06:40.480
2017-07-08T22:27:39.297
2011-05-18T06:59:17.020
309,946
null
[ "android", "listview", "scrollbar", "margin" ]
5,978,848
1
5,979,088
null
4
322
I have quite an uncommon question: Does anyone know whether it is possible to draw something on the backside of a WPF Window? Normally people create Controls or draw images on the front side of a WPF Window. However, I would like to draw things on the backside. Here is an Image taken with the [Snoop](http://snoopwpf.codeplex.com/) tool. Snoop has the functionality of viewing a WPF Application in 3D. Using the so-called it is possible to look a window.![enter image description here](https://i.stack.imgur.com/8HQWf.jpg) I would like to either draw an Image or put a Control so that you can see it with using the Zoomer functionality of snoop at the back of the application. Has anyone got an idea of how this could be done? Thanks, Christian
Drawing on the backside of a WPF Window
CC BY-SA 3.0
null
2011-05-12T13:38:15.493
2011-05-12T13:59:51.980
null
null
490,230
[ "c#", "wpf" ]
5,978,869
1
5,979,020
null
0
692
I would like to add to my website possibilty to clear a div (delete all text). A grey cross on the left fo the div, when you click, div is cleared. But when mouse is over, like on stackoverflow.com (in the comments), cross become red. How can I do that ? HTML : ``` print $cgi->div({-id=>"subheader"},$cgi->span({-id=>"reset"})); ``` CSS : ``` #subheader { text-align:center; clear: both; margin: 3px 0 10px 0; height:18px; background: #f4f4f4; color: #808080; border-bottom: 1px solid #ccc; } #reset { float:left; width:20px; height:20px; } ``` Where do I put images ? in CGI or CSS ? Thanks For example with these images :![close](https://i.stack.imgur.com/VtNLJ.png) black when mouse over, grey if not.
Grey cross / red cross to delete text
CC BY-SA 3.0
null
2011-05-12T13:39:28.163
2011-05-12T13:56:10.543
2011-05-12T13:55:42.970
405,017
698,329
[ "jquery", "html", "css" ]
5,979,025
1
8,201,364
null
0
381
I maintain an NDIS 6.0 native WiFi driver. One of my missions is passing a WHQL test. To that end I installed version 1.6 of the Windows Logo Kit. I also installed my driver on a a Windows 7, 32-bit test machine. The device appears in the device manager and works correctly. As a first step I tried to pass the stand-alone NDIS test. However when I run ndistest.exe, the device does not appear in the list of devices. The following screenshot demonstrates the problem: ![NDISTest screenshot](https://i.stack.imgur.com/yVFFr.png) My device should have appeared in the 'Support Devices' list, or in the 'Test Device' drop box, but it fails to appear in either. Can someone point out what may cause a device to not appear in these lists? Thanks!
WiFi NDIS driver does not appear in the WHQL ndistest device list
CC BY-SA 3.0
null
2011-05-12T13:50:37.560
2017-05-05T07:05:30.080
2011-05-15T11:07:48.687
506,690
506,690
[ "windows", "ndis" ]
5,979,072
1
null
null
1
1,251
I'm trying to make a menu like shown below. I have some items that extends CustomItem and consists of an Image and some Text. Now I want to position them as shown, but run into problems doing so - it seems only some minimal layout directives can be used in a Form. Is there a way for custom positioning using the Form class or is there another class I could use? ![enter image description here](https://i.stack.imgur.com/gDhIP.png)
J2ME Form Layout
CC BY-SA 3.0
null
2011-05-12T13:54:15.587
2013-04-18T09:39:13.013
2013-04-18T09:39:13.013
664,177
750,441
[ "java", "forms", "user-interface", "java-me" ]
5,979,123
1
null
null
20
28,143
![chart](https://i.stack.imgur.com/zPnFJ.png) I have this Column Chart using Google's Visualization Chart API tools. How would I make it so the y-axis numbers are only positive whole numbers? I've tried looking through the documentation but can't seem to find anything.
Google Charts Visualization Column Chart axis formatting and column colors
CC BY-SA 3.0
0
2011-05-12T13:58:37.937
2012-12-07T10:56:44.263
2011-06-02T12:47:05.467
49,887
49,887
[ "google-visualization" ]
5,979,527
1
null
null
1
3,901
Dear all, I am a new user of matlab on a project about dynamic system. I have two equations, in which T0, epsilon (E), a are fixed. I want to see the phage diagram when the b and c is choosen in the range in (0, 4) and (0, 100), respectively. In the graph, region I represent the unstable limit cycle while the region II the monostable and the region II the bistable region. In fact, I think that I may be able to draw the graph by firstly arbitrarily choosing a point in b, c phage and then calculating corresponding values of x1 and x2 which enables the left part of the ODEs equals to zero. Then calculate the jacobian matrix of the right part to determine whether the egenvalue of the matrix. If it is greater than zero, then the system is unstable. The result should be like the graph below. P.S: [http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2527901/](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2527901/) ![equation one](https://i.stack.imgur.com/GRD58.jpg) ![equation two](https://i.stack.imgur.com/MrALy.jpg) ![phage diagram](https://i.stack.imgur.com/kzMSO.jpg) My current solution should be the following, but I cannot cat J. %Condition: %(1) F1 = F2 = 0 (2) Jacobian = 0 %Aim: %Obtain a non-linear equation for b and c; a = 0.1; epslion = 0.1; T0 = 5.0; %use the symbolic calcution syms x y b c F = [((epslion ^ 2 + x ^ 2 ) / ( 1 + x ^ 2) ) / (1 + y) - a * x; b / T0 - y / ( T0 * (1 + c * x ^ 2) )]; V = [x, y]; %calculate the jacobian matrix J = jacobian(F, V); %the symbolic solution of ODE: %write the equation separately S1 = dsolve ('Dx = ((epslion ^ 2 + x ^ 2 ) / ( 1 + x ^ 2) ) / (1 + y) - a * x'); S2 = dsolve ('Dy = b / T0 - y / ( T0 * (1 + c * x ^ 2) )'); BC_cal = [J(1) J(2) S1 S2]; fsolve(BC_cal);
(Matlab) how to draw a phase diagram of two ODEs based on the parameters (not the x(1), x(2) in the diagram)
CC BY-SA 3.0
null
2011-05-12T14:27:26.977
2011-05-14T03:04:16.787
2011-05-14T03:04:16.787
699,013
699,013
[ "matlab", "dynamic", "system", "ode" ]
5,979,565
1
6,009,236
null
2
1,426
How do you place two buttons in one UITableViewCell like this example from the Apple App store? ![enter image description here](https://i.stack.imgur.com/b4aRx.png)
Two buttons in one UITableViewCell
CC BY-SA 3.0
0
2011-05-12T14:30:10.627
2012-09-26T15:05:19.957
2012-09-26T13:33:09.393
1,346,161
68,751
[ "ios4", "uitableview" ]
5,979,968
1
5,980,026
null
1
127
![enter image description here](https://i.stack.imgur.com/qsKcQ.jpg) Hi, I have included an image of my tables , What I want to do is `select top 6 from product detail whose state=1` in feauture state. Any help will be appreciated . I was thinking of something like: ``` Select TOP 6 [productName] As test, [productDetail] AS test1 From [productDetail] INNER JOIN test ON productDetail.makeID = feautureState.makeID Where feautureState.state='1'; ``` but its not working :(
Problems with select query
CC BY-SA 3.0
null
2011-05-12T14:57:16.787
2011-05-14T10:06:40.607
2011-05-12T14:59:35.327
1,942
638,007
[ "sql", "database", "select", "ado.net" ]
5,980,149
1
5,980,181
null
1
85
I am trying to write a SQL query that does some complex sorting. I have a table with some records, each having three important fields: - - - Now, I am trying to write a query that first sorts these by the group ID. Then if the group ID is 1, sort those results by their "modified order". If the group ID is 2, sort them by their "created order". Group ID's that are not 1 or 2 will not occur. In other words, I want the results to look like the picture below. ![enter image description here](https://i.stack.imgur.com/d0pSb.png) How can I write the "ORDER BY" or "GROUP BY" part of my query to do this?
Help with SQL: value-dependent sorting?
CC BY-SA 3.0
null
2011-05-12T15:07:31.523
2011-05-13T15:14:38.830
null
null
343,381
[ "sql" ]
5,980,298
1
5,980,401
null
0
139
I am trying to pull the latest five image thumbs from my booru datebase (I've been told this is the best way) yet I have no idea how to do this. I will get all the info you might need as I might miss some. Here is the image datebase layout: ![enter image description here](https://i.stack.imgur.com/4aC2L.jpg) And this is the site [http://animelon.com/booru/](http://animelon.com/booru/) An example of what am trying to do is pull 5 thumbs just like you see on that URL above on to a custom html page, When the thumb/s are clicked it will take you to the main image page Example [http://animelon.com/booru/post/view/211337](http://animelon.com/booru/post/view/211337) If you need anymore info please ask.
Talking,Pulling from a database SQL lastest five image thumbs and link to them
CC BY-SA 3.0
null
2011-05-12T15:17:42.630
2017-01-17T18:14:15.567
2017-01-17T18:14:15.567
4,370,109
638,278
[ "html", "sql", "database" ]
5,980,495
1
5,980,683
null
2
1,996
I want my SQL query can run like this. ![enter image description here](https://i.stack.imgur.com/BN3V6.png) I have two tables: 1. Key1, Date, In 2. key2, Date, Out Until now I achieved this with a `UNION`: ``` select Date , In , '' as 'out' from table1 Union ALL select Date, '' as In, Out from table2 ``` How about the balance ? Please help me
SQL Server query to calculate balance
CC BY-SA 3.0
0
2011-05-12T15:30:46.457
2015-07-27T12:58:35.127
2011-05-12T15:34:09.340
13,302
507,723
[ "sql", "sql-server" ]
5,980,566
1
5,990,848
null
3
6,162
i am learing mvc 2 by converting a asp.net website.in my page i have to upload a image and show the preview of image. screen shoot of my asp.net page is given below. ![Screen shoot of my asp.net](https://i.stack.imgur.com/NXkrK.png) i have created the model as ``` public class Contest { public int contestid { get; set; } public string ContestName { get; set; } public string Description { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public int UserId { get; set; } public bool IsActive { get; set; } public string contestimage { get; set; } } ``` in my controller ``` public ActionResult Createcontest() { ContestModel contest = new ContestModel(); return View(contest); } [HttpPost] public ActionResult Createcontest(ContestModel contest) { ///inserting data return View(contest); } ``` if i am using iframe in my view to upload image.then how can i bind the file name to contestimage.(i am saving contestimage to database). is there any other method to upload image.
image upload and preview in mvc 2
CC BY-SA 3.0
null
2011-05-12T15:36:24.337
2011-05-13T10:53:20.223
null
null
579,474
[ "c#", "asp.net", "asp.net-mvc" ]
5,980,580
1
5,980,627
null
2
112
I have two tables and I am trying to get information with an outer left join. I have the following query: ``` SELECT * FROM sportjefit_user LEFT OUTER JOIN vriend ON sportjefit_user.id = vriend.vriend2 ``` and this result: ![enter image description here](https://i.stack.imgur.com/Twmsh.png) I only want the records where 'vriend1' or 'vriend2' is not 48 Can somebody please help me out? Thanks.
Selecting data from table with join
CC BY-SA 3.0
null
2011-05-12T15:37:22.690
2011-05-12T16:34:27.107
2011-05-12T15:40:45.283
237,939
739,475
[ "php", "mysql", "sql", "join", "outer-join" ]
5,980,623
1
null
null
7
5,252
Adobe tells us to not use [Datagrid](http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/spark/components/DataGrid.html) on mobile devices. I'm creating a Blackberry Playbook application that has more screen space to potentially display a table of data. So a few questions arise! - If I shouldn't use DataGrid, what should I use? (List doesn't count because in my application I have 10's of tables each with different numbers of columns and column widths)- Ok, if I have to use a Datagrid, how can I set the size of it to show exactly all the data? For example, some tables have rows of different lengths, so doesn't seem to work (See example below) ``` <s:DataGrid requestedRowCount="-1" requestedColumnCount="-1" variableRowHeight="true" styleName="dataGrid" id="partiesGrid" dataProvider="{arr1}" skinClass="skins.DataGridSkin" click="navigator.pushView(view.AssessmentInvolvementEditView)"> <s:columns> <s:ArrayList> <s:GridColumn dataField="name" headerText="Name" width="150"/> <s:GridColumn dataField="role" headerText="Role" width="150"/> <s:GridColumn dataField="startdate" headerText="Start" width="100"/> <s:GridColumn dataField="enddate" headerText="End" width="100"/> <s:GridColumn dataField="presponsibility" headerText="Response" width="150"/> <s:GridColumn dataField="pcarer" headerText="Carer" width="110"/> <s:GridColumn dataField="kworker" headerText="Worker" width="110"/> <s:GridColumn dataField="kteam" headerText="Team" width="110"/> </s:ArrayList> </s:columns> </s:DataGrid>` ``` !![enter image description here](https://i.stack.imgur.com/q4BXa.png)
Datagrids on Flex Mobile
CC BY-SA 3.0
0
2011-05-12T15:40:06.490
2013-02-14T17:32:50.160
null
null
653,331
[ "apache-flex", "actionscript", "air", "blackberry-playbook" ]
5,980,676
1
5,980,821
null
7
2,803
For my game, I need to be able to generate drop shadows. The kind that only span the bottom right. Like this (neglect the blue square): ![enter image description here](https://i.stack.imgur.com/8rJ1d.png) Given a 2D array of RGBA pixels, how could I generate a drop shadow bitmap? Thanks
Algorithmically generating a drop shadow?
CC BY-SA 3.0
0
2011-05-12T15:43:45.380
2011-05-12T16:01:27.550
null
null
146,780
[ "c++", "algorithm", "graphics" ]
5,980,700
1
null
null
1
1,343
Given a USB hub how do we explore the connected devices? I need to programmatically explore the attacked devices to a USB hub, some of these devices can be "USB Composite Device". I'd like to do as "Device Manager": ![Device Manager](https://i.stack.imgur.com/YMiRX.png) I tried run some queries with WMI, but I did not get any result.
Windows - How to explore the devices by connection. Like Windows "Device Manager"
CC BY-SA 3.0
null
2011-05-12T15:45:44.873
2011-05-12T18:59:46.080
null
null
632,459
[ "c#", "wmi", "device-manager" ]
5,980,847
1
5,989,598
null
7
27,310
I'm working on a simple command line project. I changed the properties from .NET 3.5 to .NET 4.0 and restarted Visual Studio 2010. I get this error: > `The type initializer for '<Module>' threw an exception.` ![The type initializer for 'Module' threw an exception.](https://i.stack.imgur.com/uz58h.png) and Visual Studio does not start. I have tried starting with `devenv.exe /SafeMode` and `devenv.exe /reset`, which make no difference. Google is not helping me either. Help! --- EDIT: I still can't get Visual Studio to do anything. I tried installing SharpDevelop, but that also fails to start, but with a more informative error: > `Unhandled exception terminated SharpDevelop Exception thrown: System.TypeInitializationException: The type initializer for 'ICSharpCode.Core.Presentation.MenuService' threw an exception. ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load during appdomain initialization. ---> System.DllNotFoundException: C:\Windows\Microsoft.NET\Framework\v4.0.21006\WPF\wpfgfx_v0400.dll ---> System.ComponentModel.Win32Exception: The specified module could not be found` I don't have .NET 4 at the path in the above error, I have a different version so it is installed at `C:\Windows\Microsoft.NET\Framework\v4.0.30319` I have tried uninstalling .NET 4 and re-installing it, but it doesn't make either VS or #develop work, nor does it change the installation path.
Visual Studio 2010 startup: "type initializer for '<Module>' threw an exception."
CC BY-SA 3.0
null
2011-05-12T15:56:08.183
2017-08-28T18:32:04.083
2011-05-13T08:58:21.230
12,744
12,744
[ "visual-studio", "visual-studio-2010" ]
5,981,104
1
5,991,481
null
0
1,616
I have the following being extracted from a database: > Switchboard:265-7404-6,Marketing Hotline: 265-7403, B'ce: 333-6848 I want to convert it to something like this in PHP: ![Expected formatting of data](https://i.stack.imgur.com/FZKGj.png) In the event of extension as: `265-7404-6` it only parses: `265-7404` ``` function printdir() { $mysqli = new mysqli(constant("host"),constant("username"),constant("password"), constant("database")); $storedProc = "SELECT * FROM `directory`;"; $result = $mysqli->query($storedProc); if($mysqli->affected_rows>0) { while( $row = $result->fetch_assoc()) { echo $row['telephone']; /*Formatting here*/ } } } ```
Converting telephone numbers into "tel:" hyperlinks with regular expression replacement
CC BY-SA 3.0
null
2011-05-12T16:16:45.697
2011-05-13T11:57:25.513
2011-05-12T16:39:12.287
null
641,852
[ "php", "regex", "string" ]
5,981,601
1
5,981,765
null
23
48,015
I'm using ggplot2 to produce many diagrams structured like this: ![enter image description here](https://i.stack.imgur.com/dPU4H.png) Is there an easy of producing something that looks good in black and white? I did read this [question](https://stackoverflow.com/questions/2895319/how-to-add-texture-to-fill-colors-in-ggplot2) but it still is producing a colored fill.
Recommendations for black and white color scheme with ggplot2
CC BY-SA 3.0
0
2011-05-12T16:56:55.350
2012-06-06T04:08:07.383
2017-05-23T12:00:29.203
-1
258,755
[ "r", "ggplot2" ]
5,981,620
1
5,981,737
null
9
951
I'm a OCaml newbie working with some pretty complex (at least for me) OCaml code I didn't write. It would help a lot to understand it if I could see the inferred types for some of the values, as I can do with F# and Visual Studio by hovering over any value, e.g.: ![F# showing inferred type](https://i.stack.imgur.com/NH8lD.png) (screenshot borrowed from [http://theburningmonk.com/2010/01/learning-f-part-1/](http://theburningmonk.com/2010/01/learning-f-part-1/)) I guess I could break down the code and feed it to the toplevel to get the types, but is there any other, simpler way?
See inferred types in complex OCaml code
CC BY-SA 3.0
0
2011-05-12T16:58:34.767
2011-06-17T17:34:23.710
2011-06-17T17:34:23.710
157
21,239
[ "types", "ocaml", "type-inference" ]
5,981,894
1
5,982,614
null
3
505
Table definition: ``` CREATE TABLE [dbo].[AllErrors]( [ID] [int] IDENTITY(1,1) NOT NULL, [DomainLogin] [nvarchar](50) NULL, [ExceptionDate] [datetime] NULL, [ExceptionDescr] [nvarchar](max) NULL, [MarketName] [nvarchar](50) NULL, [Version] [nvarchar](50) NULL, CONSTRAINT [PK_AllErrors] PRIMARY KEY CLUSTERED ([ID] ASC) ) -- Add an index on the date CREATE NONCLUSTERED INDEX [IX_ExceptionDate] ON [dbo].[AllErrors] ([ExceptionDate] ASC) ``` I run this query: ``` declare @yesterday datetime select @yesterday = getdate() - 1 SELECT * INTO #yst from AllErrors where ExceptionDate between @yesterday and @yesterday + 1 ``` ![enter image description here](https://i.stack.imgur.com/ih2lM.png) This code does not use my `IX_ExceptionDate` (as gleaned from the execution plan). It does a clustered scan on the primary key index. However, the code below does use the `IX_ExceptionDate` index: ``` SELECT * INTO #yst from AllErrors where ExceptionDate between @yesterday and @yesterday + 1 AND ExceptionDate = ExceptionDate ``` ![enter image description here](https://i.stack.imgur.com/Xu0NX.png) Why is this? EDIT: Visual Execution Plan added. EDIT: Textual Execution Plans below. Query 1: > |--Table Insert(OBJECT:([#yst]), SET:([#yst].[ID] = [Expr1006],[#yst].[DomainLogin] = [MarketStats].[dbo].[AllErrors].[DomainLogin],[#yst].[ExceptionDate] = [MarketStats].[dbo].[AllErrors].[ExceptionDate],[#yst].[ExceptionDescr] = [MarketStats].[dbo].[AllErrors].[ExceptionDescr],[#yst].[MarketName] = [MarketStats].[dbo].[AllErrors].[MarketName],[#yst].[Version] = [MarketStats].[dbo].[AllErrors].[Version])) |--Top(ROWCOUNT est 0) |--Compute Scalar(DEFINE:([Expr1006]=setidentity([MarketStats].[dbo].[AllErrors].[ID],(-7),(0),N'#yst'))) |--Clustered Index Scan(OBJECT:([MarketStats].[dbo].[AllErrors].[PK_AllErrors]), WHERE:([MarketStats].[dbo].[AllErrors].[ExceptionDate]>=[@yesterday] AND [MarketStats].[dbo].[AllErrors].[ExceptionDate]<=[@yesterday]+'1900-01-02 00:00:00.000')) Query 2: > |--Table Insert(OBJECT:([#yst]), SET:([#yst].[ID] = [Expr1006],[#yst].[DomainLogin] = [MarketStats].[dbo].[AllErrors].[DomainLogin],[#yst].[ExceptionDate] = [MarketStats].[dbo].[AllErrors].[ExceptionDate],[#yst].[ExceptionDescr] = [MarketStats].[dbo].[AllErrors].[ExceptionDescr],[#yst].[MarketName] = [MarketStats].[dbo].[AllErrors].[MarketName],[#yst].[Version] = [MarketStats].[dbo].[AllErrors].[Version])) |--Top(ROWCOUNT est 0) |--Compute Scalar(DEFINE:([Expr1006]=setidentity([MarketStats].[dbo].[AllErrors].[ID],(-7),(0),N'#yst'))) |--Nested Loops(Inner Join, OUTER REFERENCES:([MarketStats].[dbo].[AllErrors].[ID], [Expr1008]) OPTIMIZED WITH UNORDERED PREFETCH) |--Index Seek(OBJECT:([MarketStats].[dbo].[AllErrors].[IX_ExceptionDate]), SEEK:([MarketStats].[dbo].[AllErrors].[ExceptionDate] >= [@yesterday] AND [MarketStats].[dbo].[AllErrors].[ExceptionDate] <= [@yesterday]+'1900-01-02 00:00:00.000'), WHERE:([MarketStats].[dbo].[AllErrors].[ExceptionDate]=[MarketStats].[dbo].[AllErrors].[ExceptionDate]) ORDERED FORWARD) |--Clustered Index Seek(OBJECT:([MarketStats].[dbo].[AllErrors].[PK_AllErrors]), SEEK:([MarketStats].[dbo].[AllErrors].[ID]=[MarketStats].[dbo].[AllErrors].[ID]) LOOKUP ORDERED FORWARD)
Why doesn't this query use the proper index?
CC BY-SA 3.0
0
2011-05-12T17:23:30.313
2011-05-12T20:50:20.690
2011-05-12T18:11:18.903
9,382
9,382
[ "sql", "sql-server", "sql-server-2005", "indexing" ]
5,981,931
1
null
null
0
265
I'm trying to make something like this in my iPhone app: ![enter image description here](https://i.stack.imgur.com/YzQv9.jpg) Is there an easy-ish way to do this without making background images and such? I'm following a "Drawing a Grid in a UITableView" guide found here: [http://usxue.is-programmer.com/posts/14176.html](http://usxue.is-programmer.com/posts/14176.html) but so far I can't get the rounded edges with borders like a normal grouped table view has. Any ideas? Thanks!
2 UITableViewCells side by side without a custom background image?
CC BY-SA 3.0
null
2011-05-12T17:26:11.427
2011-05-13T16:25:00.157
null
null
331,844
[ "ios", "uitableview" ]
5,982,006
1
5,982,915
null
5
5,461
Something that looks like this: ![enter image description here](https://i.stack.imgur.com/BVoaC.png) Is there a line-like property where I could do?: ``` foreach line ... line.BackColor = Colors.Gray; ``` `Lines[i]` property returns just a string.
How to have alternating line colors for a Winforms RichTextBox?
CC BY-SA 3.0
null
2011-05-12T17:32:00.970
2019-08-10T17:07:17.727
null
null
51,816
[ "c#", ".net", "winforms", "richtextbox" ]
5,982,326
1
null
null
0
1,300
![enter image description here](https://i.stack.imgur.com/Smzrc.jpg) I want to change the regional and language setting of the windows from the vb 6.0. Is there any way to change the regional and language setting to the windows' default like in the picture.
Change the regional and language setting of the windows
CC BY-SA 3.0
null
2011-05-12T18:02:42.833
2014-02-02T19:26:22.837
null
null
657,285
[ "vb6", "regional-settings" ]
5,982,341
1
null
null
0
1,676
I want to show a table/data grid as shown below, this is for mobile devices like iPhone and Andriod phones. Are there any examples for this? (using plain HTML/CSS/JavaScript) ![enter image description here](https://i.stack.imgur.com/uNGsH.png)
How to create table/data grid for mobile devices using HTML/CSS/JavaScript
CC BY-SA 3.0
null
2011-05-12T18:03:54.993
2011-05-14T00:36:06.067
null
null
322,492
[ "iphone", "android", "mobile", "jqtouch" ]
5,982,411
1
5,982,594
null
1
292
I'm having trouble when I flip my iPad app around to landscape mode. When I do this, the formatting of the web views gets all screwed up. ![Portrait mode screen shot](https://i.stack.imgur.com/6iqZJ.png) This is when it is in portrait mode. There is a scroll view which is the subview of the view controller, and within the scroll view there are three web views which you can scroll between by swiping left and right. This is what happens when it goes into Landscape mode: ![Landscape mode screenshot](https://i.stack.imgur.com/uSHEp.png) Any ideas as to why this is? All the settings in Interface Builder (the frame margin settings, autoresize subviews, etc.) are all correct, but I can't seem to figure out why it does what it does. Thanks in advance!
Layout issues with web views when changing iPad orientation
CC BY-SA 3.0
0
2011-05-12T18:10:59.000
2011-05-12T22:04:06.273
2011-05-12T22:04:06.273
603,977
691,662
[ "ios", "ipad", "uiwebview", "uiscrollview", "orientation" ]
5,982,656
1
5,982,791
null
1
402
![enter image description here](https://i.stack.imgur.com/zgu9J.png) My problem is that the border for the `main` div doesn't extend to the bottom of the window. Here's the stylesheet: ``` body { margin:0px; padding:0px; background-color:#F7F7F7; } #nav { background-color:#F7F7F7; border-top:10px solid #89B7C4; height:45px; padding-top:20px; padding-left:200px; border-bottom:1px solid #7597A1; } #nav a { text-decoration:none; } #nav a:visited { color:#000; } #sidebar { float:left; padding:15px; } #main { float:left; border-right:1px solid #7597A1; width:800px; margin-left:200px; margin-top:0px; margin-bottom:0px; padding-top:10px; } ``` Here's the page source: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <title>home: index</title> <link href="/stylesheets/application.css?1305224655" media="screen" rel="stylesheet" type="text/css" /> <script src="/javascripts/prototype.js?1304452925" type="text/javascript"></script> <script src="/javascripts/effects.js?1304452925" type="text/javascript"></script> <script src="/javascripts/dragdrop.js?1304452925" type="text/javascript"></script> <script src="/javascripts/controls.js?1304452925" type="text/javascript"></script> <script src="/javascripts/application.js?1304452925" type="text/javascript"></script> </head> <body> <div id="nav"> #nav &middot; <a href="#">link1</a> &middot; <a href="#">link2</a> &middot; <a href="#">link3</a> &middot; <a href="#">link4</a> </div> <div id="main"> #main<br><br> <br><br><br><br><br><br><br><br><br><br> </div> <div id="sidebar"> #sidebar<br> <a href="#">link1</a> <br> <a href="#">link2</a> <br> <a href="#">link3</a> <br> <a href="#">link4</a> </div> </body> </html> ``` I had to put breaks in `main` to see how the border would look. This is not ideal. I would like the border to display even if there's little to no content in the `main` div. If you have any ideas on how to get it to extend all the way down to the bottom of the page, I'd really appreciate it. Any other tips on cleaning up the CSS would also be appreciated.
How to fix the height of this div
CC BY-SA 3.0
null
2011-05-12T18:30:25.800
2015-12-16T04:25:48.757
2011-05-12T18:38:25.780
177,541
177,541
[ "css" ]
5,982,725
1
6,010,125
null
3
306
I just dowloaded the Google IO Source code from here: [http://code.google.com/p/iosched/](http://code.google.com/p/iosched/) in order to understand the great UI of this app. I also wanted to grab the code of the Twitter LiveFeed, but when compiling freshly downloaded code, I get a crazy UI: ![enter image description here](https://i.stack.imgur.com/wRI3h.png) I don't understand what's wrong as I didn't changed one line of the code! Does this issue happens on other people devices? Thank a lot.
Google IO Twitter Livefeed from a fresh install
CC BY-SA 3.0
null
2011-05-12T18:36:29.093
2011-05-15T17:46:44.403
2011-05-13T10:30:12.930
327,402
327,402
[ "android", "twitter", "io" ]
5,982,872
1
5,983,366
null
2
2,905
I want to use "Share on Facebook" feature, instead of new "FB Like", in my django application. But I can't find how I can implement it and set description, title and image to share. Can anyone help me? I'm doing how DeLonge says. Here's the code: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bra</title> <link rel="image_src" href="http://site.com/images/logo.jpg" /> <meta name="description" content="description here"> </head> <body> <a name="fb_share" type="button" share_url="http://www.sharedomain.com/path/" href="http://www.facebook.com/sharer.php?u=http:/www.sharedomain.com/path&amp;src=sp" style="text-decoration: none; ">Share</a><script src="http://static.ak.fbcdn.net/con nect.php/js/FB.Share" type="text/javascript"></script> </body> </html> ``` But when I click on the button I see this wrong result: ![enter image description here](https://i.stack.imgur.com/7m5tH.png) Ideas?
Use Legacy Facebook "Share" Button Not Facebook "Like"
CC BY-SA 3.0
0
2011-05-12T18:47:47.607
2011-05-12T19:41:56.837
2011-05-12T19:41:56.837
719,127
719,127
[ "django", "facebook-sharer" ]
5,983,143
1
6,145,016
null
0
388
Currently I'm running this SQL query to retrieve custom posts for a store locator. Everything is fine except I would like for it to return items even if the "telephone" field is empty. As of now it will only pull in the ones that have that field filled in. This is how my query looks when run: ![my query](https://i.stack.imgur.com/lUSC2.jpg) Anyone have a clue? (Also is there a more efficient way to run this?) ``` SELECT wp_posts.post_title as name, address.meta_value as address, latitude.meta_value as lat, longitude.meta_value as lng, telephone.meta_value as phone, ( 3959 * acos( cos( radians( '%s' ) ) * cos( radians( CONVERT( latitude.meta_value, DECIMAL( 10, 6 ) ) ) ) * cos( radians( CONVERT( longitude.meta_value, DECIMAL( 10, 6 ) ) ) - radians( '%s' ) ) + sin( radians( '%s' ) ) * sin( radians( CONVERT( latitude.meta_value, DECIMAL( 10, 6 ) ) ) ) ) ) AS distance FROM wp_postmeta as address, wp_postmeta as latitude, wp_postmeta as longitude, wp_postmeta as telephone, wp_posts WHERE (wp_posts.ID = address.post_id AND address.meta_key = '_dealer_address' ) AND (wp_posts.ID = latitude.post_id AND latitude.meta_key = '_dealer_latitude' ) AND (wp_posts.ID = longitude.post_id AND longitude.meta_key = '_dealer_longitude' ) AND (wp_posts.ID = telephone.post_id AND telephone.meta_key = '_dealer_telephone' ) ```
How do you run an SQL query to return even if the field is EMPTY
CC BY-SA 3.0
null
2011-05-12T19:08:56.607
2011-05-26T21:18:21.873
2011-05-26T21:18:21.873
99,456
594,646
[ "mysql", "sql" ]
5,983,146
1
5,983,524
null
3
153
Hello I have a bug that has been haunting me for the past few days. we have this redesign we're working on for www.petpoint.com - [http://test.petpoint.com/redesign/index.asp](http://test.petpoint.com/redesign/index.asp) If viewed in any other browser the footer looks fine (even in IE7, 8) When viewed in firefox the footer gets real messed up. I cannot figure out this bug, I have tried to see if its something in the CSS but nothing i've tried as made that footer budge. I could use any help you can lend. Not sure if you can get to the link so I can provide code samples on request. ![As seen in firefox](https://i.stack.imgur.com/AeoEJ.jpg) ![as seen everywhere else](https://i.stack.imgur.com/Sno6k.jpg) Thank you in advance.
Firefox Bug: Footer wrapping around main content
CC BY-SA 3.0
null
2011-05-12T19:09:21.570
2011-05-12T19:47:21.413
2011-05-12T19:27:29.527
751,163
751,163
[ "jquery", "html", "css", "firefox" ]
5,983,099
1
5,983,247
null
43
63,466
I created a map using Google Maps API that highlights all Minnesota counties. Basically, I created the county polygons using a set of longitudes/latitudes coordinates. Here's a screenshot of the generated map:- ![enter image description here](https://i.stack.imgur.com/9MxDi.jpg) One of the user requirements is to be able to have a similar map as an image so that they can embed it in their PowerPoint/keynote slides. I couldn't find any useful Google Maps API that allows me to save my custom map the way it is (if you know a way, let me know), so I figure I should just draw it with Graphics2D in Java. After reading about the formulas to convert the longitude/latitude to X/Y coordinate, I end up with the following code:- ``` private static final int EARTH_RADIUS = 6371; private static final double FOCAL_LENGTH = 500; ... BufferedImage bi = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB); Graphics2D g = bi.createGraphics(); for (Coordinate coordinate : coordinates) { double latitude = Double.valueOf(coordinate.getLatitude()); double longitude = Double.valueOf(coordinate.getLongitude()); latitude = latitude * Math.PI / 180; longitude = longitude * Math.PI / 180; double x = EARTH_RADIUS * Math.sin(latitude) * Math.cos(longitude); double y = EARTH_RADIUS * Math.sin(latitude) * Math.sin(longitude); double z = EARTH_RADIUS * Math.cos(latitude); double projectedX = x * FOCAL_LENGTH / (FOCAL_LENGTH + z); double projectedY = y * FOCAL_LENGTH / (FOCAL_LENGTH + z); // scale the map bigger int magnifiedX = (int) Math.round(projectedX * 5); int magnifiedY = (int) Math.round(projectedY * 5); ... g.drawPolygon(...); ... } ``` The generated map is similar the one generated by Google Maps API using the same set of longitudes/latitudes. However, it seems a little bit tilted and it looks a little off, and I'm not sure how to fix this. ![enter image description here](https://i.stack.imgur.com/QW2GU.jpg) How do I make the shape of the counties to look just like the one generated by Google Maps API above? Thanks much. I finally found the solution thanks to @QuantumMechanic and @Anon. The Mercator projection really does the trick here. I'm using [Java Map Projection Library](http://sourceforge.net/projects/jmapprojlib/) to perform the calculation for Mercator projection. ``` private static final int IMAGE_WIDTH = 1000; private static final int IMAGE_HEIGHT = 1000; private static final int IMAGE_PADDING = 50; ... private List<Point2D.Double> convertToXY(List<Coordinate> coordinates) { List<Point2D.Double> xys = new ArrayList<Point2D.Double>(); MercatorProjection projection = new MercatorProjection(); for (Coordinate coordinate : coordinates) { double latitude = Double.valueOf(coordinate.getLatitude()); double longitude = Double.valueOf(coordinate.getLongitude()); // convert to radian latitude = latitude * Math.PI / 180; longitude = longitude * Math.PI / 180; Point2D.Double d = projection.project(longitude, latitude, new Point2D.Double()); // shift by 10 to remove negative Xs and Ys // scaling by 6000 to make the map bigger int magnifiedX = (int) Math.round((10 + d.x) * 6000); int magnifiedY = (int) Math.round((10 + d.y) * 6000); minX = (minX == -1) ? magnifiedX : Math.min(minX, magnifiedX); minY = (minY == -1) ? magnifiedY : Math.min(minY, magnifiedY); xys.add(new Point2D.Double(magnifiedX, magnifiedY)); } return xys; } ... ``` By using the generated XY coordinate, the map seems inverted, and that's because I believe the graphics2D's 0,0 starts at top left. So, I need to invert the Y by subtracting the value from the image height, something like this:- ``` ... Polygon polygon = new Polygon(); for (Point2D.Double point : xys) { int adjustedX = (int) (IMAGE_PADDING + (point.getX() - minX)); // need to invert the Y since 0,0 starts at top left int adjustedY = (int) (IMAGE_HEIGHT - IMAGE_PADDING - (point.getY() - minY)); polygon.addPoint(adjustedX, adjustedY); } ... ``` Here's the generated map:- ![enter image description here](https://i.stack.imgur.com/ZcRuU.jpg) IT IS PERFECT! Here's the code to create the image map based on the width and height (in pixel). In this case, I'm not relying on the Java Map Project Library, instead, I extracted out the pertinent formula and embed it in my code. This gives you a greater control of the map generation, compared to the above code example that relies on an arbitrary scaling value (the example above uses 6000). ``` public class MapService { // CHANGE THIS: the output path of the image to be created private static final String IMAGE_FILE_PATH = "/some/user/path/map.png"; // CHANGE THIS: image width in pixel private static final int IMAGE_WIDTH_IN_PX = 300; // CHANGE THIS: image height in pixel private static final int IMAGE_HEIGHT_IN_PX = 500; // CHANGE THIS: minimum padding in pixel private static final int MINIMUM_IMAGE_PADDING_IN_PX = 50; // formula for quarter PI private final static double QUARTERPI = Math.PI / 4.0; // some service that provides the county boundaries data in longitude and latitude private CountyService countyService; public void run() throws Exception { // configuring the buffered image and graphics to draw the map BufferedImage bufferedImage = new BufferedImage(IMAGE_WIDTH_IN_PX, IMAGE_HEIGHT_IN_PX, BufferedImage.TYPE_INT_RGB); Graphics2D g = bufferedImage.createGraphics(); Map<RenderingHints.Key, Object> map = new HashMap<RenderingHints.Key, Object>(); map.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); map.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); RenderingHints renderHints = new RenderingHints(map); g.setRenderingHints(renderHints); // min and max coordinates, used in the computation below Point2D.Double minXY = new Point2D.Double(-1, -1); Point2D.Double maxXY = new Point2D.Double(-1, -1); // a list of counties where each county contains a list of coordinates that form the county boundary Collection<Collection<Point2D.Double>> countyBoundaries = new ArrayList<Collection<Point2D.Double>>(); // for every county, convert the longitude/latitude to X/Y using Mercator projection formula for (County county : countyService.getAllCounties()) { Collection<Point2D.Double> lonLat = new ArrayList<Point2D.Double>(); for (CountyBoundary countyBoundary : county.getCountyBoundaries()) { // convert to radian double longitude = countyBoundary.getLongitude() * Math.PI / 180; double latitude = countyBoundary.getLatitude() * Math.PI / 180; Point2D.Double xy = new Point2D.Double(); xy.x = longitude; xy.y = Math.log(Math.tan(QUARTERPI + 0.5 * latitude)); // The reason we need to determine the min X and Y values is because in order to draw the map, // we need to offset the position so that there will be no negative X and Y values minXY.x = (minXY.x == -1) ? xy.x : Math.min(minXY.x, xy.x); minXY.y = (minXY.y == -1) ? xy.y : Math.min(minXY.y, xy.y); lonLat.add(xy); } countyBoundaries.add(lonLat); } // readjust coordinate to ensure there are no negative values for (Collection<Point2D.Double> points : countyBoundaries) { for (Point2D.Double point : points) { point.x = point.x - minXY.x; point.y = point.y - minXY.y; // now, we need to keep track the max X and Y values maxXY.x = (maxXY.x == -1) ? point.x : Math.max(maxXY.x, point.x); maxXY.y = (maxXY.y == -1) ? point.y : Math.max(maxXY.y, point.y); } } int paddingBothSides = MINIMUM_IMAGE_PADDING_IN_PX * 2; // the actual drawing space for the map on the image int mapWidth = IMAGE_WIDTH_IN_PX - paddingBothSides; int mapHeight = IMAGE_HEIGHT_IN_PX - paddingBothSides; // determine the width and height ratio because we need to magnify the map to fit into the given image dimension double mapWidthRatio = mapWidth / maxXY.x; double mapHeightRatio = mapHeight / maxXY.y; // using different ratios for width and height will cause the map to be stretched. So, we have to determine // the global ratio that will perfectly fit into the given image dimension double globalRatio = Math.min(mapWidthRatio, mapHeightRatio); // now we need to readjust the padding to ensure the map is always drawn on the center of the given image dimension double heightPadding = (IMAGE_HEIGHT_IN_PX - (globalRatio * maxXY.y)) / 2; double widthPadding = (IMAGE_WIDTH_IN_PX - (globalRatio * maxXY.x)) / 2; // for each country, draw the boundary using polygon for (Collection<Point2D.Double> points : countyBoundaries) { Polygon polygon = new Polygon(); for (Point2D.Double point : points) { int adjustedX = (int) (widthPadding + (point.getX() * globalRatio)); // need to invert the Y since 0,0 starts at top left int adjustedY = (int) (IMAGE_HEIGHT_IN_PX - heightPadding - (point.getY() * globalRatio)); polygon.addPoint(adjustedX, adjustedY); } g.drawPolygon(polygon); } // create the image file ImageIO.write(bufferedImage, "PNG", new File(IMAGE_FILE_PATH)); } } ``` ![enter image description here](https://i.stack.imgur.com/EIHqa.png) ![enter image description here](https://i.stack.imgur.com/KTbg5.png)
Converting longitude/latitude to X/Y coordinate
CC BY-SA 3.0
0
2011-05-12T19:06:00.180
2019-01-04T16:23:19.870
2013-01-28T13:32:05.527
341,508
341,508
[ "java", "google-maps", "latitude-longitude", "cartesian", "coordinate-transformation" ]
5,983,227
1
5,983,658
null
1
2,536
The problem I am having is that, when I resize the browser window on my site [http://reggi.com/so/chromeglitch](http://reggi.com/so/chromeglitch) chrome is very laggy. So much so that it seams to have a white background and a floating scrollbar. Here is a image of resizing taking place right before it realigns: ![In process of resizing](https://i.stack.imgur.com/WTC2B.png) The problem I am having is with chrome specifically. Anyone know why this might be happening? I would appreciate it if anyone points me in the direction of any fixes or discussions on this issue. This does not happen in any other browser I have tested, all of them run really smoothly except chrome. I am running: - - - - -
Chrome javascript resize slowness?
CC BY-SA 3.0
null
2011-05-12T19:15:17.553
2011-05-12T19:51:42.117
null
null
340,688
[ "javascript", "browser", "cross-browser", "resize" ]
5,983,369
1
5,999,308
null
0
346
In my UITableViewCells I am displaying text of varying lengths. To accomodate larger amounts of text and while also not requiring small texts amounts to be in huge table cells I am setting the height of the rows here... ``` - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { float padding = 40.0f; CGSize constraintSize; constraintSize.width = 320.0f - padding - padding; constraintSize.height = MAXFLOAT; CGSize theSize = [thisrowstext sizeWithFont:[UIFont systemFontOfSize:14.0f] constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap]; if(theSize.height < 24.0f) return 44.0f; else return theSize.height + 20.0f; } ``` ...it works well, unfortunately the textLabel's width seems to be affected too with some textLAbels (depending on row count) being pushed in a few pixels. I've tried setting indentation values, but that doesn't work. Has anyone else encountered this? EDIT: I'm adding the layoutSubviews method of my UITableViewCell subclass that i'm using (no NIB). ``` - (void)layoutSubviews { [super layoutSubviews]; if (self.hideImage) { self.imageView.alpha = 0.0f; self.imageView.frame = CGRectMake(-40.0f, 1.0f, 40.0f, 40.0f); CGRect frame = self.textLabel.frame; self.textLabel.frame = CGRectMake(frame.origin.x - 40.0f, frame.origin.y, frame.size.width + 40.0f, frame.size.height); [self.textLabel setNeedsLayout]; } else { self.imageView.alpha = 1.0f; self.imageView.frame = CGRectMake(1.0f, 1.0f, 40.0f, 40.0f); [self.textLabel setNeedsLayout]; } } ``` EDIT: Also adding cellForRowAtIndexPath ``` - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *TableCellViewWithHidableImageIdentifier = @"TableCellViewWithHidableImage"; TableCellViewWithHidableImage *cell = (TableCellViewWithHidableImage *)[tableView dequeueReusableCellWithIdentifier:TableCellViewWithHidableImageIdentifier]; if (cell == nil) { cell = [[[TableCellViewWithHidableImage alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:TableCellViewWithHidableImageIdentifier] autorelease]; } cell.hideImage = NO; cell.imageView.image = [UIImage imageNamed:@"empty.png"]; cell.textLabel.font = [UIFont systemFontOfSize:16.0f]; cell.textLabel.numberOfLines = 0; cell.textLabel.text = @"whatever"; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } ``` ![enter image description here](https://i.stack.imgur.com/LLpOX.png)
UITableViewCells' labels with different heights alter labels' widths
CC BY-SA 3.0
null
2011-05-12T19:25:46.830
2011-05-14T01:41:52.620
2011-05-12T21:14:12.223
null
84,783
[ "iphone", "cocoa-touch", "uitableview" ]
5,983,644
1
6,270,667
null
1
1,062
In the Exposed Views form (Drupal 6, Views 2), I'd like to overwrite an input text so it render the option to choose from a range of values, something similar to this: ![enter image description here](https://i.stack.imgur.com/zhcwn.png) Or just a simple one: two text inputs with and labels (, , whatever, like a price range). I am comfortable both with editing templates (`views-exposed-form.tpl.php` in this case) and overwritting the form output: ``` function mymodule_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'views_exposed_form') { $form['submit']['#value'] = t('Filter'); } } ``` How can I change the defaul text input to one as described?
Overriding an input of the Exposed Views form to render a range of values
CC BY-SA 3.0
null
2011-05-12T19:50:42.530
2017-08-18T21:18:49.313
2017-08-18T21:18:49.313
1,324
357,452
[ "drupal", "view", "drupal-6", "drupal-exposed-filter" ]
5,984,154
1
5,984,282
null
0
2,317
I am developing an android app in which I have to collect date of birth in a form So I used a textview with a datepicker as shown below ![enter image description here](https://i.stack.imgur.com/IgFvB.png) I want to pick date from it and store it in form of ints like month,day,year. I tried many examples but all deal with dialog box. None of them showed using the datepicker inline :-( Please kindly help me out.
inline datepicker in android
CC BY-SA 3.0
0
2011-05-12T20:36:13.340
2012-01-13T18:53:46.433
2012-01-13T18:53:46.433
783,284
659,291
[ "java", "android", "android-layout", "android-widget" ]
5,984,219
1
5,984,436
null
6
2,943
In my game, I want to layout squares along the edges of a monochrome image: ![enter image description here](https://i.stack.imgur.com/k3KTg.png) So I found this algorithm which should solve the issue. [http://en.wikipedia.org/wiki/Marching_squares](http://en.wikipedia.org/wiki/Marching_squares) It does not seem that hard to implement, I just think I do not understand exactly what Wiki is saying. I think I have to break the image up into cells where each cell represents 2x2 pixels on the image? Is that correct? I'm then lost by this instruction: For each cell in the contouring grid: 1.Compose the 4 bits at the corners of the cell to build a binary index: walk around the cell in a clockwise direction appending the bit to the index, using bitwise OR and left-shift, from most significant bit at the top left, to least significant bit at the bottom left. The resulting 4-bit index can have 16 possible values in the range 0-15. I'm not sure how to appending the bit. Thanks
Help understanding marching squares algorithm
CC BY-SA 3.0
0
2011-05-12T20:42:31.500
2011-05-12T21:02:25.340
null
null
146,780
[ "c++", "algorithm" ]
5,984,297
1
5,995,200
null
5
1,920
I am using STS for grails development and i don't know what I did, (most probably dragged a folder somewhere by mistake) but now I can't see my services in the perspective. They do exists under grails-app/services but I guess something is not pointing there anymore? and yes I tried restarting STS, reloading the project to STS. Any idea on how I can fix this? You are right here is the perspective view with no services shown. ![sts grails perspective without services](https://i.stack.imgur.com/5XljZ.png) Thanks a lot, Bilsay
STS - Grails perspective broken. Can not see services
CC BY-SA 3.0
null
2011-05-12T20:49:47.850
2015-11-15T07:46:19.087
2011-05-13T08:51:38.473
698,879
698,879
[ "grails", "sts-springsourcetoolsuite", "perspective" ]
5,984,305
1
5,984,457
null
0
7,203
All of a sudden I am getting the following error when I try to run the app on the device. "xCode cannot run using the selected device" No provisioned iOS devices are available. Connect an iOS device or choose an iOS simulator as the destination. If I see in the organizer I get the following information: ![enter image description here](https://i.stack.imgur.com/OZPvZ.png) UPDATE: I tried running one of my old applications and it worked fine. The dropdown which shows if the app is running on simulator or device automatically gets populated when I run my old app. It list my device name correctly. When I try to run my new app then it only shows iosdevice option and simulator option.
xCode cannot run using the selected device error!
CC BY-SA 3.0
0
2011-05-12T20:51:16.430
2013-11-21T08:54:15.977
2011-05-12T21:08:43.277
3,797
3,797
[ "iphone", "xcode4" ]
5,984,317
1
5,984,469
null
0
4,148
When using Toad for Oracle the wonderful schema browser provides a lot of information. One piece of that info that I would like to have available via a query is the Data Type information for a given table. ![enter image description here](https://i.stack.imgur.com/BRx5k.jpg) That extra bit of info listed in the Data Type column (1 Byte), provided in the Schema Browser is what I am looking for. When using the table ALL_TAB_COLS it provides a lot of that same info but not that additional info about the Data Type. ![enter image description here](https://i.stack.imgur.com/ddifQ.jpg) Is there any way to have a Select statement return that same information? Thanks!
Toad for Oracle 10.5.1.3 - How to find DataType info like in Schema Browser
CC BY-SA 3.0
null
2011-05-12T20:52:13.993
2023-01-04T18:45:43.817
null
null
621,901
[ "oracle", "browser", "types", "schema", "toad" ]
5,984,412
1
5,984,526
null
2
915
I'm trying to rotate a block of text slightly like below: ![enter image description here](https://i.stack.imgur.com/GDrUU.gif) Can this be done with css or do I need to use javascript?
rotating text slightly—should I use css or javascript?
CC BY-SA 3.0
null
2011-05-12T21:00:01.250
2011-05-12T21:10:15.123
null
null
645,836
[ "javascript", "jquery", "css", "rotation" ]
5,984,640
1
5,984,910
null
6
7,877
i have written alot of description but i figured making a picture will make my problem clearer than words ![The mapping process](https://i.stack.imgur.com/Q3boW.png) i have written this to map but it throws an exception ``` Mapper.CreateMap<GenericStory, GenericStoryDisplayViewModel>().ForMember( gs => gs.StoryBody,dest => dest.MapFrom( gs => gs)); ``` > Trying to map StoryWriting.Web.Models.GenericStory to StoryWriting.Web.ViewModels.StoryBodyViewModel. Using mapping configuration for StoryWriting.Web.Models.GenericStory to StoryWriting.Web.ViewModels.GenericStoryDisplayViewModel Destination property: StoryBody Missing type map configuration or unsupported mapping. Exception of type 'AutoMapper.AutoMapperMappingException' was thrown.
automapper class and nested class map to one class
CC BY-SA 3.0
0
2011-05-12T21:23:11.613
2018-07-05T15:07:23.267
null
null
386,941
[ "automapper" ]
5,984,690
1
5,984,933
null
3
12,346
Pretty much what I am trying to do, is create the following image: ![enter image description here](https://i.stack.imgur.com/iAijM.png) So this is a progress bar, which will show how many votes the client get in that option. How can I do that? I was wondering if I can use a mask (as I would in flex), but all the masking implementations that I found on the web are doing masks for `UIImage`s, and not for `UIImageView`. I cannot do the mask in the `UIImage`, because the two images have the same dimensions. I have to use the X and Y of the images to crop them?! So, any suggestions? Here are the two images that I have to create that progress bar: ![enter image description here](https://i.stack.imgur.com/5Ocv5.png) ![enter image description here](https://i.stack.imgur.com/8OC0s.png) Cheers.
Creating a custom progress bar with images
CC BY-SA 3.0
0
2011-05-12T21:28:36.423
2013-03-20T08:19:26.377
2011-05-12T21:58:18.913
603,977
534,150
[ "ios", "uiimageview", "custom-controls", "progress-bar", "mask" ]
5,984,880
1
null
null
9
9,650
I installed IE9 in a Windows 7 virtual machine, and was surprised to see this user agent: `Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; BOIE9;ENUSMSNIP)` In particular, the last two keys and look very spammy. I'm used to seeing toolbars and add-ins register themselves at the end of the user agent like that, but this is on a virgin install of Windows 7 with no other software. They're defined in the registry here: `HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\PostPlatform` That key has a value of `IEAK`, which is apparently the [Internet Explorer Administrators Kit](http://technet.microsoft.com/en-us/ie/bb219517) which [according to Microsoft](http://support.microsoft.com/kb/218933) sends a custom user agent string. ### But why? I'm guessing that `BOIE9` is stands for "Bing on IE9". It's the only active Add-On: ![](https://dl.dropbox.com/u/58785/boie9.PNG) As for `ENUSMSNIP`, I'm at a loss. My guesses are: - - - I tried changing my locale to EN-GB, but the user agent didn't update nor did the registry. So it appears it's only at the time of install that it matters (if I'm even right about ENUS). Does anyone know what these two user agent keys represent? Or, care to share what your IE9 user agent is, and maybe we can piece it together ourselves?
Decoding the IE9 user agent
CC BY-SA 3.0
null
2011-05-12T21:47:31.963
2012-10-30T16:55:33.350
2020-06-20T09:12:55.060
-1
1,690
[ "internet-explorer-9", "user-agent" ]
5,985,252
1
5,985,811
null
3
2,644
I'm trying to duplicate the look and feel of the Mobile Safari toolbar. As you know, the normal toolbar is too short, so I changed it like this: ``` [topToolbar setFrame:CGRectMake(0.0, 0.0, 320.0, 57.0)]; ``` and this makes it about as wide as I need, however... now my UITextField is right in the middle instead of being at the bottom like it is in Mobile Safari: ![My App](https://content.screencast.com/users/lance_optini/folders/Snagit/media/92791e40-6b05-4d91-ad9c-2fe8f69e75cd/2011-05-12_16-27-06.png) VS. ![Mobile Safari](https://content.screencast.com/users/lance_optini/folders/Snagit/media/b07d7250-16ce-444f-9f3b-839db8b24cff/2011-05-12_16-28-50.png) I've tried what feels like a million things (changing the frame, the insets...) and nothing works. Any ideas?
Moving UIBarButtonItems vertically in a UIToolBar
CC BY-SA 3.0
0
2011-05-12T22:30:49.213
2011-05-12T23:44:49.597
2017-02-08T14:32:12.130
-1
603,979
[ "iphone", "objective-c", "xcode", "mobile-safari" ]
5,985,357
1
6,012,602
null
1
931
I have to make a Master-Detail scenario where in the master I can show many types of items, that they all implement `IDto`: ``` interface IDto { int Id { get; set; } string Title { get; set; } EntityType { get; set; } enum EntityType { Contact, Person, Company, Customer Employee, Vendor, Job } ``` Note: I am using Entity Framework EDM (generated `ObjectContext` and `EntityObject`s). The class hierarchy is that `Contact` is the subclass for `Person` and `Company`, `Person` is the baseclass of `Employee`, `Company` is the baseclass of `Vendor`. `Customer` has a property `Contact` that can be either a `Contact` or a `Person`, and has a list of `Job`. ![enter image description here](https://i.stack.imgur.com/Dj74Z.png) Now in the master list, I want to load a collection of DTOs from the `DomainService` (it's a `LinqToEntitiesDomainService<ObjectContext>`, and I want only the specified fields in the `IDto` contract to be selected, then, when selected, load the entire entity with all its fields/related data etc. in the details area. : I thought about another idea. Create a database-view (SQL2008) that returns the 3 rows of the above `IDto` contract where the enum will be stored as int or tinyint (will then change the enum to byte), then in the edm I can make a table-per-hierarchy for each EntityType stored in the list, and return it from the `DomainService`. BTW, all the enum values will be used for the query, in fact, no entity will return `Contact` for its `EntityType` property, because `Contact` is abstract and can be either a `Person` or a `Company`, but I still want to have an option to query both of them. The customer also wants, for each one of the items in the list, also all its jobs. Based on the hierarchy I described above, for a `Customer` - select all its jobs; for a `Contact` or a `Person` - select its `Customer`'s `Job`s (if its a `Customer`). `Vendor` or `Employee`s are not meant to be register with `Job`s. I think the only way I can do this is with database-views. Am I wrong? What are the consequences? I am using SL5 with RIA. Is the Views way good? Or I should handle all the queries in the client using a client POCO? because really this value are only used to retrieve the contact name and its jobs. further details and manipulation will be done in other views on the `Entity` entities them selves. So what do you experts think?
DTOs in WCF RIA Services Master-Detail
CC BY-SA 3.0
null
2011-05-12T22:42:43.163
2011-05-16T02:04:15.620
2011-05-13T06:13:24.407
83,039
75,500
[ "silverlight", "entity-framework", "wcf-ria-services", "dto", "data-transfer-objects" ]
5,985,374
1
null
null
-1
238
Well i am developing a site and having trouble in CSS please help me to get rid of this issue. You can see the following image for final results. [http://i51.tinypic.com/5bwpee.jpg](http://i51.tinypic.com/5bwpee.jpg) ![final result should appear after HTML AND CSS](https://i.stack.imgur.com/vHYnj.png) so i code like that ``` <div id="header"> <div class="pattern"></div> <!-- .pattern --> <div id="wrapper"> <div class="topHeader"> </div> </div> </div> <!-- #header --> ``` and CSS is .. actually in the following codes i use gradient image of and use pattern image to overflow the background. ``` #header { width:100%; height:150px; background:url(images/header_gradient.png) repeat-x; } .pattern { width:100%; height:150px; background:url(images/header_transparent.png) repeat; } #wrapper { width:1200px; margin:0 auto; background-color:#F00; height:100px; } ``` so please kindly help me to solve this problem that how i set logo and author details in center of header.. i tried position but maybe it goes wrong. --- Now i edited my code the results below, but still having problem ``` <div id="wrapper"> <div id="header"></div> <div id="pattern"></div> <div id="main"> <img src="http://i52.tinypic.com/16i6z9d.jpg" /> </div> </div> ``` CSS ``` #wrapper { position:relative; } #header { width:100%; height:150px; background:url(http://i55.tinypic.com/1zpgny8.jpg) repeat-x; } #pattern { width:100%; height:150px; background:url(http://i51.tinypic.com/ao75eg.jpg) repeat; position:absolute; top:0px; } #main { width:1200px; margin:0 auto; margin-top:-103px; } #main img { z-index:5px; } ``` after doing all this still having problem that the #pattern over all the layers. so please kindly help me to solve this issue. Thank you all.
Problem with position in css
CC BY-SA 3.0
null
2011-05-12T22:44:50.663
2011-05-13T08:20:07.323
2011-05-13T08:20:07.323
698,668
698,668
[ "html", "css", "position", "css-position" ]
5,985,461
1
6,271,121
null
0
730
``` try { var orderedListOfRfidTags = uow.RfidTags.ToList().OrderBy(t => int.Parse(t.Number)); return View(orderedListOfRfidTags); } catch { var orderedListOfRfidTags = uow.RfidTags.OrderBy(t => t.Number).ToList(); return View(orderedListOfRfidTags); } ``` MVC3 - in Release mode this will still fail on the first line var ordreedListOfRfidTags... I wonder why try catch isn't trying and catching? ![enter image description here](https://i.stack.imgur.com/QT5ut.png) then pressing F10 it goes to here.. which is part of my ORM wrapper... hmm I wonder if this is the problem. ``` protected override void OnResultExecuted(ResultExecutedContext filterContext) { if (_unitOfWorkScope != null) { _unitOfWorkScope.Dispose(); } base.OnResultExecuted(filterContext); } ```
Try Catch not working in MVC3
CC BY-SA 3.0
null
2011-05-12T22:57:50.923
2011-06-07T20:19:46.907
2011-05-12T23:09:22.660
26,086
26,086
[ "c#", "asp.net-mvc-3" ]
5,985,642
1
5,987,248
null
2
1,021
I want to display pretty dendrograms for some agglomerative clusters I am generating in Java. I write the clusters out to a file in Newick format. Then, I can get a pretty picture that is almost what I want. ``` tr = phytreeread('myfile.tree') phytreetool(tr) ``` ![enter image description here](https://i.stack.imgur.com/YjFMx.png) Unfortunately, the X axis is not what I want. I would prefer to "reverse" the axis, because the iterations of the clustering progress from right to left, e.g. `firstName` and `setFirstName` get clustered in the first iteration. Does anybody know how I can do that, or at least turn off the X axis labeling? (What is the default axis trying to tell me anyway?)
How does one modify the axes in MATLAB's phylogenetic tree tool?
CC BY-SA 3.0
0
2011-05-12T23:22:07.477
2022-03-11T15:16:00.507
2016-05-20T20:52:33.017
6,307,081
352,319
[ "matlab", "plot", "properties", "dendrogram", "phylogeny" ]
5,985,873
1
5,986,853
null
5
30,676
I'm looking for a way to align a number of elements (spans, inputs, and buttons) such that despite their differing sizes, their vertical mid point is on the same horizontal line: ![Alignment](https://i.stack.imgur.com/wpj9O.png) How do I achieve this in CSS? Here's the HTML file to play with: ``` <html> <head> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.3.0/build/cssreset/reset-min.css"> <style> .content { font-size: 18px; border: 1px dotted blue; } .content input, .content button { font-size: 40px; float: left; } .label { border: 1px dotted red; float: left; } .clear { clear: both; } </style> </head> <body> <div class="content"> <span class="label">Label: </span><input type="text"> <span class="label">More text: </span><input type="text"> <button type="submit">Submit Me</button> <div class="clear"></div> </div> </body> </html> ```
CSS alignment of spans, inputs, and buttons
CC BY-SA 3.0
0
2011-05-12T23:53:39.737
2015-12-08T10:01:05.933
null
null
13,055
[ "css", "alignment" ]
5,987,210
1
5,987,918
null
0
262
``` cb.append_text('Firefox') cb.append_text('Chrome') cb.append_text('Opera') ``` ![enter image description here](https://i.stack.imgur.com/KAcr9.png) nothing displayed until I clicked
pygtk gtk.combo_box_new_text() with a default value
CC BY-SA 3.0
null
2011-05-13T04:25:44.363
2011-05-13T06:12:07.130
null
null
554,693
[ "pygtk", "gtk" ]
5,987,316
1
null
null
2
20,227
I've updated everything. No problem with driver. Added android:debuggable="true" to the . USB debugging mode on. But still dont work. My OS is Win7, my device is Huawei. ![enter image description here](https://i.stack.imgur.com/FyR2X.png)
Eclipse doesn't find my device
CC BY-SA 3.0
0
2011-05-13T04:44:51.603
2014-01-29T11:26:19.070
2011-05-13T04:57:10.687
750,636
750,636
[ "android", "eclipse" ]
5,987,541
1
5,991,399
null
3
3,905
I am trying to render a globe (sphere with maps on it) with on iOS. I am able to draw the sphere, and map borders but with one problem: . Like this: ![Globe with lines on the back being shown](https://i.stack.imgur.com/MuxTq.png) In the picture, you can see that America renders just fine, but you can see Australia rendered on the back. It is not supposed to be shown because it's in the back of the globe, and BLACK and PURPLE stripes in the globe are not transparent. Any ideas on what parameters should I be tweaking in order to get a proper globe? If it helps, I can post the relevant parts of the . Just ask which part and I will update the question. Thanks a lot in advance. Update: This is what I am using for Sphere rendering: ``` glEnableClientState(GL_VERTEX_ARRAY); glPolygonOffset(-1.0f, -1.0f); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); int x, y; GLfloat curR, curG, curB; curR = curG = curB = 0.15f; for (y=0; y<EARTH_LAT_RES; y++) { if (y%10 == 0) { glColor4f(curR, curG, curB, 1.0f); curR = curR == 0.15f ? 0.6f : 0.15f; curB = curB == 0.15f ? 0.6f : 0.15f; } for (x=0; x<EARTH_LON_RES; x++) { Vertex3D vs[4]; vs[1] = vertices[x][y]; vs[0] = vertices[x][y+1]; vs[3] = vertices[x+1][y]; vs[2] = vertices[x+1][y+1]; glVertexPointer(3, GL_FLOAT, 0, vs); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); } } glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); glDisable(GL_POLYGON_OFFSET_FILL); glDisableClientState(GL_VERTEX_ARRAY); ``` This is what I am using to render the border lines: ``` // vxp is a data structure with vertex arrays that represent // border lines int i; glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnableClientState(GL_VERTEX_ARRAY); for (i=0; i<vxp->nFeatures; i++) { glVertexPointer(3, GL_FLOAT, 0, vxp->pFeatures[i].pVerts); glDrawArrays(GL_LINE_STRIP, 0, vxp->pFeatures[i].nVerts); } glDisableClientState(GL_VERTEX_ARRAY); glDisable(GL_BLEND); ``` These are the settings I am using rendering any of the objects: ``` glMatrixMode(GL_PROJECTION); glLoadIdentity(); glEnable(GL_DEPTH_TEST); /* enable depth testing; required for z-buffer */ glEnable(GL_CULL_FACE); /* enable polygon face culling */ glCullFace(GL_BACK); glOrthof(-1.0f, 1.0f, -1.5f, 1.5f, -1.0f, 1.0f); glFrustumf (-1.0, 1.0, -1.5, 1.5, -1.0, 1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); ```
Drawing a Globe with OpenGL ES
CC BY-SA 3.0
0
2011-05-13T05:22:39.870
2011-05-13T15:19:55.870
2011-05-13T15:19:55.870
67,606
67,606
[ "objective-c", "ios", "ios4", "opengl-es" ]
5,987,698
1
6,063,596
null
10
12,181
I'm stepping through this tutorial: [http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html](http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html) I'm trying to select the axis2 Web Service facet (step 6) but I'm getting this error message in eclipse: "Axis2 Web Services Core 1.1 requires Dynamic Web Module with version matching expression "2.2,2.3,2.4,2.5" ![screenshot](https://i.stack.imgur.com/Ufpl6.png) Update: I had downloaded and installed axis2 1.5.4 and then in eclipse I went into "windows->preferences->web services->axis2 preferences". Under the "axis2 runtime" tab I specified the axis2 location. The message "Axis2 runtime loaded successfully" appeared. ![sreenshot2](https://i.stack.imgur.com/e4NKs.png) I don't know why it says "Axis2 Web Services Core 1.1". Does eclipse wtp come bundled with axis2 1.1 or is there a separate version # for the axis core from the overall axis version #?
Need help with creating inital JAX-WS project
CC BY-SA 3.0
0
2011-05-13T05:45:36.637
2017-07-25T10:07:39.453
2011-05-13T13:41:20.033
549,226
549,226
[ "java", "eclipse", "web-services", "axis2" ]
5,987,811
1
5,987,848
null
0
834
I have here two EditTexts' (username and password) and I want it to look like this on the start of the application: ![enter image description here](https://i.stack.imgur.com/nzuOG.png) But after the user should click the EditTexts' i want it to automatically delete the "username"(and "password"), like this: ![enter image description here](https://i.stack.imgur.com/sCgNL.png) how should i do that trick? can anyone help me, please? :)
ANDROID EditText onclicklistener?
CC BY-SA 3.0
0
2011-05-13T05:59:14.200
2011-05-13T06:29:06.980
null
null
946,315
[ "android", "android-edittext" ]
5,987,872
1
5,987,909
null
0
245
I would like to reproduce the same thing as screenshot below and I don't know how to proceed. I would like a big font text (12.560) and next to it I would like two lines of small text. ![Screenshot](https://i.stack.imgur.com/XRVL6.png) Thank you for your help.
Some text in front of other text (css)
CC BY-SA 3.0
null
2011-05-13T06:06:10.713
2011-05-13T07:14:26.690
null
null
693,560
[ "html", "css" ]
5,987,887
1
6,100,201
null
6
853
In Android messaging, when click on attach it open the list of content provider like . How to open the same list on button click? Like this : ![enter image description here](https://i.stack.imgur.com/S8nz1.png)
How to open attachment list of media?
CC BY-SA 3.0
0
2011-05-13T06:08:55.353
2017-07-24T13:46:38.527
2011-05-13T10:43:14.010
443,075
443,075
[ "android", "messaging", "android-contentprovider", "attachment" ]
5,987,906
1
5,989,680
null
1
434
I've got a strongly typed View which displays data from my model (which comes from a database table), such as: Model.servicetype Model.serviceid All the fields within this model contain true or false values. I simply wanted to loop through the Model and either replace the values of true and false, or create some sort of generic list and output the data from that. ![enter image description here](https://i.stack.imgur.com/Jay6w.jpg) Note this is only for display purposes, the user can't edit etc. Hope that makes sense. Thanks
ASP.NET MVC Model Data - Loop
CC BY-SA 3.0
null
2011-05-13T06:10:58.123
2013-03-03T13:17:04.563
2013-03-03T13:17:04.563
727,208
408,757
[ "asp.net-mvc" ]
5,987,932
1
null
null
0
1,396
here is the code of index page ``` <a href="click.php" target= 'blank'>click Here to post story</a> ``` Click.php contains ``` <?php $app_id = "XXXXXXXX"; $canvas_page = "XXXXXXXX"; $message = "My story"; $feed_url = "http://www.facebook.com/dialog/feed?app_id=" . $app_id . "&redirect_uri=" . urlencode($canvas_page) . "&message=" . $message; if (empty($_REQUEST["post_id"])) { echo("<script> top.location.href='" . $feed_url . "'</script>"); } else { echo ("Feed Post Id: " . $_REQUEST["post_id"]); } ?> ``` Now my problem is, when i click on "click here to post story" link on main page, it directs the browser to another page where the post story box opens while I want to open this box in an iframe over the same page which usually happens in most of the applications. here are the snap shots My box opens like this![enter image description here](https://i.stack.imgur.com/YGpqC.png) but i want to open it like this in a light box ![enter image description here](https://i.stack.imgur.com/b5I28.jpg)
Post story problem- facebook
CC BY-SA 3.0
0
2011-05-13T06:13:46.310
2011-05-13T07:42:33.330
2011-05-13T07:42:33.330
687,661
687,661
[ "php", "facebook", "facebook-graph-api", "fbml" ]
5,988,002
1
5,988,071
null
0
1,389
In the above code the calendar that is in the middle is actually a gridview. As you can see it is not covering the whole space and there is a black background that is visible. How do i stretch the columns or rows so that there is not black space present. the xml for the gridview is as follows: ``` <GridView android:id="@+id/calendar" android:numColumns="7" android:layout_width="fill_parent" android:layout_height="wrap_content"> </GridView> ``` thank you in advance.![enter image description here](https://i.stack.imgur.com/oIAnc.png) Edit: Update two![enter image description here](https://i.stack.imgur.com/mMOem.png) There is still some spaces in right of calendar.How to remove it? Edit: Update 3 ``` <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@id/menuoptions"> <RelativeLayout style="@style/widescreen" android:background="@drawable/top_header"> <ImageView style="@style/compactview" android:src="@drawable/banner1" android:layout_marginLeft="5dip" android:id="@+id/bannerview" android:layout_centerVertical="true"></ImageView> <ImageView style="@style/compactview" android:src="@drawable/logo" android:layout_marginRight="20dip" android:layout_alignParentRight="true"></ImageView> </RelativeLayout> <LinearLayout style="@style/widescreen" android:background="#ffffff" android:orientation="vertical"> <LinearLayout style="@style/widescreen" android:background="#ffffff" android:orientation="horizontal"> <Button style="@style/compactview" android:background="@drawable/kalenderhover" android:layout_marginLeft="3dip" android:onClick="calendarButtonClicked" android:id="@+id/calendarbutton" android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button> <Button style="@style/compactview" android:background="@drawable/tag" android:onClick="dayButtonClicked" android:id="@+id/daybutton" android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button> <Button style="@style/compactview" android:background="@drawable/monat" android:id="@+id/monthbutton" android:onClick="monthButtonClicked" android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button> <Button style="@style/compactview" android:background="@drawable/jahr" android:id="@+id/yearbutton" android:onClick="yearButtonClicked" android:layout_marginTop="6dip" android:layout_marginBottom="5dip"></Button> <Spinner style="@style/compactview" android:id="@+id/category_name" android:background="@drawable/categoriahover" android:layout_marginLeft="5dip" android:layout_marginTop="7dip" android:layout_marginBottom="4dip"></Spinner> </LinearLayout> </LinearLayout> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/calenderheaderwithoutarrow" android:id="@+id/calendarheader"> <ImageView android:id="@+id/prevMonth" android:src="@drawable/left_arrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_marginTop="5dip"> </ImageView> <Button android:id="@+id/currentMonth" android:layout_weight="0.6" android:textColor="#FFFFFF" android:textAppearance="?android:attr/textAppearanceMedium" android:background="@android:color/transparent" android:layout_width="wrap_content" android:layout_height="wrap_content"> </Button> <ImageView android:layout_marginRight="10dip" android:id="@+id/nextMonth" android:src="@drawable/right_arrow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5dip"> </ImageView> </LinearLayout> <ViewFlipper android:id="@+id/mainflipper" style="@style/compactview"> <LinearLayout android:id="@+id/calendartab" style="@style/compactview" android:orientation="vertical"> <GridView android:id="@+id/calendar" android:numColumns="7" android:layout_width="fill_parent" android:layout_height="wrap_content" android:listSelector="@drawable/datecell" android:layout_marginRight="0dip" android:paddingRight="0dip"> </GridView> <ListView android:id="@+id/eventlist" style="@style/widescreen"> </ListView> </LinearLayout> <LinearLayout android:id="@+id/daytab" style="@style/compactview" android:orientation="vertical"> <LinearLayout style="@style/compactview" android:background="@drawable/calenderheader"> <EditText style="@style/compactview" android:id="@+id/searchkeyword" android:hint="Suche" android:inputType="text" android:layout_marginLeft="5dip" android:minWidth="200dip"> </EditText> <Button android:onClick="searchingButtonClicked" android:background="@drawable/abbrechen" android:layout_marginLeft="5dip" style="@style/compactview" android:layout_gravity="center_vertical|right"></Button> </LinearLayout> <ListView android:id="@+id/daylisting" style="@style/compactview"></ListView> </LinearLayout> <LinearLayout android:id="@+id/monthtab" style="@style/compactview" android:orientation="vertical"> <LinearLayout style="@style/compactview" android:background="@drawable/calenderheader"> <EditText style="@style/compactview" android:id="@+id/searchkeyword" android:hint="Suche" android:inputType="text" android:layout_marginLeft="5dip" android:minWidth="200dip"> </EditText> <Button android:onClick="searchingButtonClicked" android:background="@drawable/abbrechen" android:layout_marginLeft="5dip" style="@style/compactview" android:layout_gravity="center_vertical|right"></Button> </LinearLayout> <ListView android:id="@+id/monthlisting" style="@style/compactview"></ListView> </LinearLayout> <LinearLayout android:id="@+id/yeartab" style="@style/compactview" android:orientation="vertical"> <LinearLayout style="@style/compactview" android:background="@drawable/calenderheader"> <EditText style="@style/compactview" android:id="@+id/searchkeyword" android:hint="Suche" android:inputType="text" android:layout_marginLeft="5dip" android:minWidth="200dip"> </EditText> <Button android:onClick="searchingButtonClicked" android:background="@drawable/abbrechen" android:layout_marginLeft="5dip" style="@style/compactview" android:layout_gravity="center_vertical|right"></Button> </LinearLayout> <ListView android:id="@+id/yearlisting" style="@style/compactview"></ListView> </LinearLayout> </ViewFlipper> </LinearLayout> </RelativeLayout> ```
Grid view not covering?
CC BY-SA 3.0
null
2011-05-13T06:22:14.467
2011-05-14T06:45:04.927
2011-05-13T06:49:04.807
352,707
352,707
[ "android" ]
5,988,399
1
5,988,429
null
2
1,714
I need to display and manipulate data in 3D in winforms or WPF application. It may look something like this: ![enter image description here](https://i.stack.imgur.com/RKMBN.jpg) What libraries I can use to achieve this goal?
Drawing 3d-graphics in WPF or winforms
CC BY-SA 3.0
0
2011-05-13T07:02:16.243
2012-03-27T22:06:43.363
null
null
603,019
[ ".net", "wpf", "winforms", "3d" ]
5,988,394
1
6,656,446
null
6
4,144
I cannot see any of the RadRails views in my IDE. For example Rake tasks, rails console, generator view, etc.. See the screenshot for the available view options. I'm perplexed by the explanations I find on Aptana site and other forums. I cannot find a menu option called "My Aptana" or plug-ins anywhere. Also, the preferences window does not have the "Ruby" option as expected. See the screenshot. I have the installed Aptana Studio on Mac (Aptana Studio 3, build: 3.0.1.201104291443) ([http://www.aptana.com/products/studio3/download](http://www.aptana.com/products/studio3/download)). ![Available Views](https://i.stack.imgur.com/OfEmD.png) ![Preferences](https://i.stack.imgur.com/LtbYc.png)
Cannot find RadRails views in Aptana Studio 3
CC BY-SA 3.0
0
2011-05-13T07:02:03.540
2011-07-11T20:55:35.827
null
null
472,872
[ "ruby-on-rails", "eclipse", "eclipse-plugin", "aptana", "radrails" ]
5,988,440
1
5,991,070
null
-1
260
I am trying to update facebook from my Mac application i am working on. I am able to update status & links successfully. using the facebook api & documentation [http://developers.facebook.com/docs/reference/rest/users.setStatus/](http://developers.facebook.com/docs/reference/rest/users.setStatus/) But I want to update something like this. So how can I do this. I have used status.set, link.post but it is not looking like this. ![enter image description here](https://i.stack.imgur.com/lgLuo.png)
Facebook updating
CC BY-SA 3.0
0
2011-05-13T07:05:49.593
2011-05-13T11:14:27.130
null
null
585,387
[ "objective-c", "cocoa", "facebook" ]
5,988,699
1
null
null
5
4,737
I am making custom keyboard.. Now my question is that I want custom popup for key pressed. So, can I change it. popup of key like as this image ![enter image description here](https://i.stack.imgur.com/I6Yec.png) If any one know about this then please help me...
Custom popup for key of keyboard
CC BY-SA 3.0
0
2011-05-13T07:32:35.630
2014-01-03T16:30:55.293
2012-08-01T09:32:39.930
624,069
624,069
[ "android", "soft-keyboard" ]
5,988,706
1
5,988,937
null
1
1,072
HY! I want to create a TabbedPane with a jTable. Designer: ![enter image description here](https://i.stack.imgur.com/5XTIq.png) Constructor Code in JForm: ``` initComponents(); this.add(jTabbedPane1); jTabbedPane1.addTab("Test", jPanel1); jPanel1.add(jTable1); ``` Auto-Gen-Code: ``` private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton_add = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setMinimumSize(new java.awt.Dimension(550, 300)); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"dddsds", null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(jTable1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(27, Short.MAX_VALUE)) ); jButton_add.setText("add"); jButton_add.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton_add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton_addActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(39, 39, 39) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(31, 31, 31) .addComponent(jButton_add))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton_add) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold> ``` Problem: the jTable1 is invisible and the button is under the jTabbedPane and not under the jPanel. Please help
Problem with TabbedPane in JAVA
CC BY-SA 3.0
null
2011-05-13T07:33:21.840
2011-05-13T10:17:59.773
2011-05-13T10:17:59.773
383,688
547,995
[ "java", "swing", "jtabbedpane" ]
5,989,072
1
5,989,917
null
3
6,040
We are desperate to convert an image so that it can be used as an image map. Everything I have tried, really doesnt cut the mustard. I havent the experience to work at very high resolutions.. plus I dont know the terminology and neither have the skills or resources to invest in learning how to do this, knowing many others on here and the internet have far greater experience. I have downloaded and played with Inkscape, but really am going round in circles... So thought I would ask here. What I am after is similar to Raphael Australia Map or David Lynchs, [http://davidlynch.org/js/maphilight/docs/demo_usa.html](http://davidlynch.org/js/maphilight/docs/demo_usa.html) No frills, no effects, just change the state color of the map on hover and retain that event on click. Here is what we have ... What we have is a MAP like this. ![enter image description here](https://i.stack.imgur.com/KUsxS.png) We lost the original file, which was pure gray. I have this left :( Anyway, we want it so that each state ( including the territory ACT ) not indicated on the above map, represented in pink #ec008c . On hover Map needs to be FLAWLESS !! Also require that any imagery must be png and transparent bg. Must remain exact size as above. Must be extremely accurate on svg coordinates, and optionally would like the STATE text to appear , like the QLD is shown on the image above, but not wholly necessary. Can anyone point me in the right direction please.
Convert PNG image to SVG / Vector
CC BY-SA 3.0
null
2011-05-13T08:11:46.920
2013-04-22T20:22:16.053
2011-06-17T19:10:07.097
566,920
501,173
[ "vector", "svg", "inkscape" ]
5,989,363
1
5,989,442
null
0
366
i used nested LinearLayouts for the purpose of putting the EditTexts and Buttons in the center of the screen like this: ![Log In Page](https://i.stack.imgur.com/ipJOT.png) I want to change the background of this. So I inserted another LinearLayout on the top of everything else. But its not working. All I can see is black which indicates that I have covered the Editext and Buttons. I think have to arrange the layouts properly. any suggestions on how i may put a background(i.e. color, as of now)? I am posting my xml. ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@+id/OceanBlue"> <LinearLayout android:orientation="vertical" android:layout_width="wrap_content"> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="right" > <EditText android:id="@+id/et_username" android:layout_width="170px" android:layout_height="wrap_content"/> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/et_password" android:password="true" android:layout_width="170px" android:layout_height="wrap_content"/> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/button_ok" android:text="Login" android:layout_width="86px" android:layout_height="wrap_content"> </Button> <Button android:id="@+id/button_cancel" android:text="Cancel"> </Button> </LinearLayout> </LinearLayout> ```
ANDROID Background for LinearLayouts
CC BY-SA 3.0
null
2011-05-13T08:40:38.520
2011-05-13T13:57:15.543
2011-05-13T13:57:15.543
946,315
946,315
[ "android", "background", "android-linearlayout" ]
5,989,400
1
5,990,950
null
0
180
``` <div id="wrapper"> <div id="header"></div> <div id="pattern"></div> <div id="main"> <img src="http://i52.tinypic.com/16i6z9d.jpg" /> <h3 class="text"> Freelance Web/Logo <br /> Designer & Developer <br /> → Muzammil Hussain </h3> </div> </div> ``` CSS : ``` body { font-size:12px/20px; } #wrapper { position:relative; } #header { width:100%; height:150px; background:url(http://i55.tinypic.com/1zpgny8.jpg) repeat-x;} #pattern { width:100%; height:150px; background:url(http://i51.tinypic.com/ao75eg.jpg) repeat; position:absolute; top:0px; } #main { width:1200px; margin:0 auto; margin-top:-103px; } #main img { float:left; margin-right:10px; } #main h3 { float:left; margin-top:5px; font:12px/20px "Bookman Old Style"; text-shadow: 1px 1px #000; line-height:14px; color:#fff; } ``` Well please first of all check if i did any mistake let me know. and also i having trouble that my #pattern overlaying all my classes. i just want this class appear over #header. but something i am missing.. Actually i want results like that. ![final result should appear after HTML AND CSS](https://i.stack.imgur.com/vHYnj.png) Please let me know.
Absolutely positioned element is appearing on top of my other elements
CC BY-SA 3.0
null
2011-05-13T08:44:12.320
2011-05-13T11:28:16.293
2011-05-13T11:22:06.690
97,650
698,668
[ "html", "css", "overriding", "positioning" ]
5,989,742
1
5,989,963
null
2
688
Probably I'm being stupid and overlooking something, but I am having a bizarre issue that only occurs in Chrome (12.0.7, but maybe other versions as well). Check out this site: [http://www.jungledragon.com](http://www.jungledragon.com) On the right side, you will notice a community update panel. This is how it looks in any major browser except Chrome: ![enter image description here](https://i.stack.imgur.com/vS2TV.gif) And here is how it renders in Chrome: ![enter image description here](https://i.stack.imgur.com/IClS5.gif) It renders twisties? When you click on one, it expands the row. Clicking again collapses the row. Nowhere in my code do I have any markup to implement such behavior. Is this some kind of special behavior because I am using figure tags? I tested this site in Chrome before and it was no issue then, so it could be a recent bug.
Insane Chrome issue...Chrome renders twisties?
CC BY-SA 3.0
null
2011-05-13T09:15:40.907
2011-05-13T09:41:14.913
null
null
80,969
[ "css", "google-chrome" ]
5,989,888
1
6,038,205
null
6
1,327
Let's say the app consists of a Sidebar, a Timeslider and a Column chart: ![Web app mockup](https://i.stack.imgur.com/hS1t3.png) To provide some background, I've previously implemented the columnChart class using the functional inheritance pattern: ``` namespace.columnChart = function() { var chart = {}; var width = 500; var height = 500; var data = []; chart.setState = function(state){ data = state.data; updateVis(); } function updateVis(){ ... render chart based on state ... } return chart; } ``` With simple binding I can call the setState method on the columnChart when for example adding a new entity from the sidebar. But as the model grows (and the state gets more complex with variables like year, currentSelection, chartType etc.) - which I'd also like reflected in the URL - I'd like to make use of MVC and specifically Backbone.js. 1. So how do I structure this in Backbone? Should I rewrite my columnChart class (and similar classes)? Is there an easy way to detect what has changed in the state and only set the new state using these params? An example of tying the Sidebar, Timeslider and Column chart together - using Backbone - would be much appreciated. Thanks.
How to build this web app with Backbone.js?
CC BY-SA 3.0
0
2011-05-13T09:28:44.177
2011-05-17T23:12:18.977
null
null
104,059
[ "javascript", "model-view-controller", "web-applications", "javascript-framework", "backbone.js" ]
5,990,203
1
null
null
0
201
I'm not sure if this is the best place to ask this question but if theres anyone who would know this is SO. If not, where is the best place to ask this question? At the bottom of vendor profile when you log in at [http://google.com/appsmarketplace](http://google.com/appsmarketplace), there is a text box for you to insert your GA code. ![enter image description here](https://i.stack.imgur.com/hIVHw.png) Question: what does this do? What kind of stats am I expected to see in Google Analytics? I don't have the luxury of trial and error at the moment.
Question about setting up Google Analytics with Google Apps Marketplace
CC BY-SA 3.0
null
2011-05-13T09:56:33.863
2013-11-25T22:35:11.947
null
null
131,238
[ "google-analytics", "google-apps", "google-apps-marketplace" ]
5,990,363
1
6,001,766
null
0
1,316
I am Validating SAML Assertion from SalesForce validator. All my are OK. I am getting warning at point 12 as in figure. ![enter image description here](https://i.stack.imgur.com/nCa0u.png) How can I validate it?
Validating SAML Assertion from SalesForce validator
CC BY-SA 3.0
null
2011-05-13T10:09:23.430
2011-05-14T12:17:28.677
null
null
420,613
[ "java", "saml", "assertions", "opensaml" ]
5,990,578
1
null
null
10
6,056
I am developing an application which uses OpenGL for rendering of the images. Now I just want to determine the touch event on the opengl sphere object which I have drwn. Here i draw 4 object on the screen. now how should I come to know that which object has been touched. I have used onTouchEvent() method. But It gives me only x & y co-ordinates but my object is drawn in 3D. please help since I am new to OpenGL. Best Regards, ~Anup ![enter image description here](https://i.stack.imgur.com/icJEG.png)
Detect touch on OpenGL object?
CC BY-SA 3.0
0
2011-05-13T10:28:59.793
2011-05-24T08:39:17.210
2011-05-24T08:04:47.397
454,775
454,775
[ "android" ]
5,990,582
1
5,990,831
null
2
197
I am attempting to animate a series of results form a database query using jQuery. Firstly I would like it to display similar to the example on [Soh Tanaka's web tutorial](http://www.sohtanaka.com/web-design/popout-details-on-hover-w-css/). But I also want to add a behaviour that when a used clicks the one their hovering over, it expands to fill the entire parent element (in this example its a ) using jQuery . I was hoping to have this happen 'above' the other elements maybe using z-index. but I want the element to expand relative to its position on the page. ![elements at rest](https://i.stack.imgur.com/R2VYL.jpg) Select element hovered over as per Soh Tanaka's tutorial ![Select element hovered over as per Soh Tanaka's tutorial](https://i.stack.imgur.com/KdeTg.jpg) This element animates and expands in this way ![enter image description here](https://i.stack.imgur.com/yPF8w.jpg) But this one has to animate diferently ![enter image description here](https://i.stack.imgur.com/3crZf.jpg) Final finishing position of the element after the animation ![enter image description here](https://i.stack.imgur.com/tQnep.jpg) I would also like to have the elements image to say in the top left had corner and further details fade in the enlarged box after the animation has finished. It would also be nice if they could click a back button and the animation reveres. I'm not sure if this would have to be some kind of overlay like a light box or something as I don't want the other elements to have to move out the way for the selected element to be animated Hope someone has a suggestion Dan
Animating a series of results with Jquery
CC BY-SA 3.0
0
2011-05-13T10:29:10.940
2011-05-13T12:54:37.170
null
null
493,847
[ "jquery", "css", "animation" ]
5,990,650
1
5,990,812
null
3
4,156
I need to work out the height of a UITextView from the top down to the cursor. I am trimming the text it contains (so it only goes up to the cursor) and then using NSString's `sizeWithFont:constrainedToSize:lineBreakMode:` method to work out the height, like so: ``` NSRange range; range.location = noteTextView.selectedRange.location; range.length = noteTextView.text.length - range.location; NSString *string = [noteTextView.text stringByReplacingCharactersInRange:range withString:@""]; CGSize size = [string sizeWithFont:noteTextView.font constrainedToSize:noteTextView.frame.size lineBreakMode:UILineBreakModeWordWrap]; NSLog(@"height is: %f \n", size.height); ``` It does this every time I type anything. The problem is, when I watch the NSLog as I type, it doesn't register a change of height until I have typed 4 characters on the new line. It is as if the `sizeWithFont` method is exactly four characters out. Here's a couple of screenshots showing what I mean: ![Height with three characters on line](https://i.stack.imgur.com/uXnhf.png) ![Height with four characters on line](https://i.stack.imgur.com/o3MXL.png) Can anyone tell me what is going on?
Why does NSString sizeWithFont: return the wrong size?
CC BY-SA 3.0
0
2011-05-13T10:35:23.617
2011-05-13T10:49:46.250
2011-05-13T10:44:28.207
619,432
619,432
[ "iphone", "cocoa-touch", "nsstring", "uitextview" ]
5,991,005
1
5,991,039
null
1
575
Is there any open-source .NET graphic editor for small images (where each pixel can be edited separately). I want to integrate it in my software. It may looks like this: ![enter image description here](https://i.stack.imgur.com/D4NAD.jpg) EDIT: In fact, I only need support for black&white images.
.NET open-source editor for small images
CC BY-SA 3.0
null
2011-05-13T11:08:26.100
2011-05-13T11:18:02.410
2011-05-13T11:16:44.867
603,019
603,019
[ ".net", "image-processing", "open-source", "editor", "bitmap" ]
5,991,176
1
6,029,661
null
1
2,310
I want to use coverflow view in my app. To get the reflection image part i have used the following code - [http://www.androidsnippets.com/create-image-with-reflection](http://www.androidsnippets.com/create-image-with-reflection) I have seen lot of forums/discussions about dithering and tileMode, I have tried all that discussed but nothing works for me. FYI - I am creating a bitmap dynamically not using any bitmap in layouts. And I have attached the image to show how bad it is: ![Reflection image appearance is not looking good](https://i.stack.imgur.com/EYa8E.png) I have listed below what I have tried to solve this issue. ``` 1. getWindow().setFlags(WindowManager.LayoutParams.FLAG_DITHER, WindowManager.LayoutParams.FLAG_DITHER); 2. getWindow().setFormat(PixelFormat.RGBA_8888); 3. BitmapDrawable baseImageDawable = new BitmapDrawable(getResources().openRawResource(imageId)); baseImageDawable.setDither(true); baseImageDawable.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT); Bitmap originalImage = baseImageDawable.getBitmap(); int width = originalImage.getWidth(); int height = originalImage.getHeight(); Bitmap reflectionImage = Bitmap.createBitmap(originalImage, 0, 0, width, height, matrix, true); ``` But still the reflection image is very ugly. How can I solve this?
Bitmap appearance is not looking good, dithering is not working, in Android
CC BY-SA 4.0
null
2011-05-13T11:26:06.800
2018-11-02T19:00:45.817
2018-11-02T19:00:45.817
472,495
262,523
[ "android", "bitmap", "dithering" ]
5,991,362
1
null
null
1
136
I want to generate the XML as shown below. I generated the elements of it, but now I am struggling to append the text dynamically to it. Can any one help me to do as shown above. ![XML](https://i.stack.imgur.com/JGX8I.png) Thanks.
Dynamically appending text to XML with C#
CC BY-SA 3.0
null
2011-05-13T11:44:01.033
2011-05-21T08:45:51.730
2011-05-13T19:39:18.613
592,746
610,869
[ "xml", "c#-4.0" ]
5,991,527
1
6,003,367
null
0
3,178
![ListActivity in which item contain an checkbox, textview & imagevie(alramclock). I am trying to give date n time for each task by fressing that image view. thats shows an error like this in snapshot](https://i.stack.imgur.com/tooth.png) Main thing is to set listadapter for ListActivity I used differnent adapter class(TaskAdapter.java) where I override the getview() and in there i write the code foe checkbox, textview & imageview. TextView & checkbox click events & checkedchange working & ImageViews click event also working. But problm is that i am trying to open DatePicker on click of ImageView but it shows an error below in snapshot. my code is here,, HomeActivity ``` package com.v3.todo; import java.util.ArrayList; import java.util.Calendar; import android.app.AlertDialog; import android.app.DatePickerDialog; import android.app.Dialog; import android.app.ListActivity; import android.app.TimePickerDialog; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnFocusChangeListener; import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.Button; import android.widget.CheckBox; import android.widget.DatePicker; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.TimePicker; public class HomeActivity extends ListActivity { DBAdapter db; Cursor cr; CheckBox[] chk; static String[] valChk; static int Task_Id, taskId; static int[] idchk; static String Task_Nm, taskNm; EditText edTask; Button btnAdd; String newTask = ""; int order; Calendar c = Calendar.getInstance(); private int mYear, mMonth, mDay, mHour, mMinute; static final int TIME_DIALOG_ID = 1, DATE_DIALOG_ID = 0; String date = "", time = "", dateTime = ""; // ArrayList al = new ArrayList(); static ArrayList<Task> m_tasks = new ArrayList<Task>(), t_tasks = null; TaskAdapter m_adapter; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.setTitle("To-Do Lists"); btnAdd = (Button) findViewById(R.id.btnAdd); edTask = (EditText) findViewById(R.id.etAddTask); edTask.setOnFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus == true) { if (edTask.getText().toString() .compareTo("Add task here...") == 0) // default text { edTask.setText(""); } } } }); db = new DBAdapter(HomeActivity.this); m_tasks = getTasks(); if (m_tasks.size() != 0) { this.m_adapter = new TaskAdapter(this, R.layout.addchecktomain, m_tasks); // lv1.setAdapter(this.m_adapter); System.out.println("creating"); setListAdapter(this.m_adapter); } else { RelativeLayout rl = (RelativeLayout) findViewById(R.id.layout); TextView tv = new TextView(this); tv.setText("No To-Do Lists"); tv.setTextSize(22); rl.addView(tv); } btnAdd.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { newTask = edTask.getText().toString(); String min = Integer.toString(c.get(Calendar.MINUTE)); String hr = Integer.toString(c.get(Calendar.HOUR)); String dd = Integer.toString(c.get(Calendar.DATE)); String mm = Integer.toString(c.get(Calendar.MONTH)); String yyyy = Integer.toString(c.get(Calendar.YEAR)); if (min.length() == 1) min = "0" + min; if (hr.length() == 1) hr = "0" + hr; if (dd.length() == 1) dd = "0" + dd; if (mm.length() == 1) mm = "0" + mm; String dtCreate = mm + "-" + dd + "-" + yyyy + " " + hr + ":" + min; if (newTask.equals("")) { alertboxNeutral("Warning", "Task should not be empty!", "Okay"); } if (newTask.length() < 2) { alertboxNeutral("Warning", "Task should not be less than 2 Letters", "Okay"); } else { try { db.open(); long id1; order = db.getLastPriority(); if (order == 0) id1 = db.insertINtask(taskNm, dtCreate, null, 0, 1); else id1 = db.insertINtask(taskNm, dtCreate, null, 0, order + 1); } catch (Exception ex) { System.out.println("Within AddTask " + ex.toString()); } finally { db.close(); } alertboxNeutral("Success", "Saved.", "Okay"); } } }); } // Method to fetch Uncompleted tasks from db with ID public ArrayList<Task> getTasks() { t_tasks = new ArrayList<Task>(); try { db.open(); cr = db.getUncompletedTask(); if (cr.moveToFirst()) { do { Task t1 = new Task(); String[] str = new String[2]; str[0] = cr.getString(0); str[1] = cr.getString(1); t1.setTaskID(cr.getString(0)); t1.setTaskName(cr.getString(1)); t_tasks.add(t1); } while (cr.moveToNext()); } } catch (Exception ex) { System.out.println("Within Home " + ex.toString()); } finally { cr.close(); db.close(); } return t_tasks; } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo; menu.setHeaderTitle("Task"); MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.context_menu, menu); System.out.println("v.getId=" + v.getId()); Task_Id = (Integer) v.getTag(); } @Override public boolean onContextItemSelected(MenuItem item) { AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); switch (item.getItemId()) { case R.id.edit_task: Intent i1 = new Intent(HomeActivity.this, EditTaskActivity.class); i1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i1); return true; case R.id.delete_task: // database functions boolean f = false; try { db.open(); f = db.deleteTask(Task_Id); } catch (Exception ex) { System.out.println("Within Home " + ex.toString()); } finally { db.close(); } if (f == true) alertboxNeutral("Success", "Deleted.", "Okay"); return true; default: return super.onContextItemSelected(item); } } public void alertboxNeutral(String title, String message, String positive) { AlertDialog.Builder alertbox = new AlertDialog.Builder( HomeActivity.this); if (title.equals("Warning")) { alertbox.setTitle(title); alertbox.setMessage(message); alertbox.setPositiveButton(positive, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent i = new Intent(HomeActivity.this, HomeActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); } }); alertbox.show(); } else if (title.equals("Success")) { alertbox.setTitle(title); alertbox.setMessage(message); alertbox.setPositiveButton(positive, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent i = new Intent(HomeActivity.this, HomeActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); } }); alertbox.show(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.add_task: Intent i1 = new Intent(this, AddTaskActivity.class); i1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i1); break; case R.id.list_completed: Intent i2 = new Intent(this, ListCompletedActivity.class); i2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i2); break; case R.id.rearrange: Intent i3 = new Intent(this, RearrangeActivity.class); i3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i3); break; case R.id.exit: Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); break; } return true; } /* * @Override protected void onPause() { // TODO Auto-generated method stub * super.onPause(); finish(); } */ @Override protected void onResume() { // TODO Auto-generated method stub try { db.open(); m_tasks = getTasks(); } catch (Exception ex) { System.out.println("Within Home " + ex.toString()); } finally { db.close(); } m_adapter = new TaskAdapter(this, R.layout.addchecktomain, m_tasks); System.out.println("notify data changed"); // m_adapter.notifyDataSetInvalidated(); // m_adapter.notifyDataSetChanged(); setListAdapter(this.m_adapter); super.onResume(); } /* * @Override public void onBackPressed() { // TODO Auto-generated method * stub db.open(); m_tasks = getTasks(); db.close(); * System.out.println("notify data changed on back pressed"); * m_adapter.notifyDataSetInvalidated(); m_adapter.notifyDataSetChanged(); * super.onBackPressed(); } */ private DatePickerDialog.OnDateSetListener mDateSetListener = new DatePickerDialog.OnDateSetListener() { public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { mYear = year; mMonth = monthOfYear; mDay = dayOfMonth; updateDisplay(); } }; private void updateDisplay() { // tvDt.setText(new StringBuilder().append(mMonth + // 1).append("-").append(mDay).append("-").append(mYear).append(" ")); } // the callback received when the user "sets" the time in the dialog private TimePickerDialog.OnTimeSetListener mTimeSetListener = new TimePickerDialog.OnTimeSetListener() { public void onTimeSet(TimePicker view, int hourOfDay, int minute) { mHour = hourOfDay; mMinute = minute; updateDisplay(); } }; // updates the time we display in the TextView private void timeDisplay() { // time=(String)(new // StringBuilder().append(pad(mHour)).append(":").append(pad(mMinute))); } private static String pad(int c) { if (c >= 10) return String.valueOf(c); else return "0" + String.valueOf(c); } protected Dialog onCreateDialog(int id) { switch (id) { case 0: return new DatePickerDialog(this, mDateSetListener, mYear, mMonth, mDay); } return null; } public static void setDate() { // showDialog(0); } } TaskAdapter.java package com.v3.todo; import java.util.ArrayList; import java.util.Calendar; import android.app.Activity; import android.app.DatePickerDialog; import android.app.Dialog; import android.app.TimePickerDialog; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnTouchListener; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.DatePicker; import android.widget.ImageView; import android.widget.TextView; import android.widget.TimePicker; import android.widget.Toast; public final class TaskAdapter extends ArrayAdapter<Task> { ArrayList<Task> tasks; Context context1; CheckBox chk; TextView tv; ImageView imgAlram; DBAdapter db; static int TaskId; static int RId; Calendar c = Calendar.getInstance(); boolean f = false; private int mYear, mMonth, mDay, mHour, mMinute; static final int TIME_DIALOG_ID = 1, DATE_DIALOG_ID = 0; String date = "", time = "", dateTime = ""; public TaskAdapter(Context context, int textViewResourceId, ArrayList<Task> tasks) { super(context, textViewResourceId, tasks); this.tasks = tasks; context1 = context; RId = textViewResourceId; } public int getCount() { return tasks.size(); } public Task getItem(int position) { return tasks.get(position); } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { final int pos = position; final int dbid; View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) context1 .getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.addchecktomain, null); } Task t = tasks.get(position); if (t != null) { chk = (CheckBox) v.findViewById(R.id.cboTask); tv = (TextView) v.findViewById(R.id.tvTask); imgAlram = (ImageView) v.findViewById(R.id.imageAlram); if (chk != null) { chk.setId(Integer.parseInt(t.getTaskId())); chk.setText(""); // chk.setTag(Integer.parseInt(t.getTaskId()), t.getTaskName()); chk.setOnCheckedChangeListener(new OnCheckedChangeListener() { public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { int taskId = buttonView.getId(); if (isChecked) { // /call setTaskComplete(i) // / reset list view or refresh list view String min = Integer.toString(c .get(Calendar.MINUTE)); String hr = Integer.toString(c.get(Calendar.HOUR)); String dd = Integer.toString(c.get(Calendar.DATE)); String mm = Integer.toString(c.get(Calendar.MONTH)); String yyyy = Integer.toString(c.get(Calendar.YEAR)); if (min.length() == 1) min = "0" + min; if (hr.length() == 1) hr = "0" + hr; if (dd.length() == 1) dd = "0" + dd; if (mm.length() == 1) mm = "0" + mm; String dtComplete = mm + "-" + dd + "-" + yyyy + " " + hr + ":" + min; try { db = new DBAdapter(context1); db.open(); f = db.setTaskComplete(taskId, dtComplete); } catch (Exception ex) { System.out.println("Within Home " + ex.toString()); } finally { db.close(); } if (f == true) { // HomeActivity.referesh = 1; Intent intent = new Intent(context1, HomeActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); // HomeActivity. context1.startActivity(intent); Toast.makeText(context1, "Task Completed", Toast.LENGTH_LONG).show(); } } } }); } if (tv != null) { tv.setText(t.getTaskName()); dbid = Integer.parseInt(t.getTaskId()); tv.setTag(dbid); tv.setOnClickListener(new OnClickListener() { public void onClick(View v) { Toast.makeText( context1, "You have chosen the task: " + " " + v.getTag().toString() + " Id: " + dbid + "::" + pos, Toast.LENGTH_LONG) .show(); } }); ((Activity) context1).registerForContextMenu(tv); } if (imgAlram != null) { imgAlram.setOnClickListener(new OnClickListener() { public void onClick(View v) { // Write ur code here Toast.makeText(context1, "You have chosen the Alram ", Toast.LENGTH_LONG).show(); ((Activity) context1).showDialog(0); ((Activity) context1).showDialog(TIME_DIALOG_ID); } }); } } return v; } ``` DatePicker dialog only open within an activity but I am call the ((Activity) context1).showDialog(0); in TaskAdapter.java class in ImageView onClick event, and all other code is in HomeActivity. ANd it give s error like snapshot. How to achieve within TaskAdapter.java class. please give me the answer. Thank you
android how to get an date picker & time picker throgh image button click
CC BY-SA 3.0
0
2011-05-13T12:03:00.410
2013-07-20T21:00:19.613
2013-07-20T21:00:19.613
1,765,573
155,196
[ "android", "android-datepicker", "android-timepicker" ]
5,992,043
1
null
null
3
4,854
The 'more link' is not shown in a block, while my settings are as shown here: ![My views block](https://i.stack.imgur.com/vBshw.png) I do have more than 2 items. Do you have an idea what's going on? Thanks in advance.
Drupal 7 - More link in view not showing
CC BY-SA 3.0
0
2011-05-13T12:45:17.103
2015-07-30T20:11:49.060
null
null
543,847
[ "drupal", "drupal-views", "drupal-7" ]
5,992,150
1
6,000,653
null
1
1,610
As it was requested, I've put up a small internal log viewer for one of my open-source projects (self descriptive image below). While doing so, I had a very strange problem where the newly created window's HandleCreated event does not occur at all. I'm watching this event to make sure that handle is created before invoking any controls. ![NBug Internal Log Viewer](https://i.stack.imgur.com/B5gga.png) Below is the problematic code (the static constructor). Does anybody have a workaround for this because none of the usual tricks (like var a = form.Handle;) to force the creation of the handle do not help at all. ``` internal partial class InternalLogViewer : Form { static InternalLogViewer() { viewer = new InternalLogViewer(); formShown = new ManualResetEvent(false); viewer.HandleCreated += (sender, e) => formShown.Set(); Task.Factory.StartNew(() => viewer.ShowDialog()); formShown.WaitOne(); // ToDo: This needs a workaround as it waits for an eternity } private static InternalLogViewer viewer; private static ManualResetEvent formShown; public static void LogEntry(string message, LoggerCategory category) { viewer.Invoke((MethodInvoker)delegate { viewer.InternalLogEntry(message, category); }); } internal InternalLogViewer() { InitializeComponent(); this.Icon = Properties.Resources.NBug_icon_16; this.notifyIcon.Icon = Properties.Resources.NBug_icon_16; } internal void InternalLogEntry(string message, LoggerCategory category) { this.loggerListView.Items.Add(new ListViewItem(new[] { category.ToString().Remove(0, 4), DateTime.Now.ToString("HH:mm:ss"), message })); } } ``` Edit: Code is taken from [NBug](http://www.nbusy.com/projects/nbug) library.
Form.HandleCreated Event Never Occurs
CC BY-SA 3.0
0
2011-05-13T12:55:46.620
2013-03-22T17:23:14.573
2013-03-22T17:23:14.573
168,868
628,273
[ "c#", ".net", "winforms", "nbug" ]
5,992,284
1
null
null
5
1,763
The issue at hand looks easy, but I could not find an easy solution so far. I've got a histogram describing the value distributing of an array of floats, roughly looking like this: ![enter image description here](https://i.stack.imgur.com/5i2wo.png) As you can see, there is a local maximum near 0, which keeps falling down to a local minimum, then rising quickly to a plateau, and in the end falling to 0. I would like to detect the local minimum. In practice, the histogram is not as smooth: ![enter image description here](https://i.stack.imgur.com/anAZf.png) There are lots of spikes, and the local minimum may be stretched and uneven. I'm not sure how to tackle this problem. There is little domain knowledge. The first max may even be higher than the second max. There may be spikes in any direction, values may be as low as 0. This is a real life sample taken from 8 distinct runs. It's scaled to 0 - 10 to make it easier to understand. ``` 0: 22% 12% 19% 17% 6% 5% 6% 5% 1: 3% 2% 1% 1% 4% 1% 4% 1% 2: 6% 2% 13% 5% 0% 2% 0% 2% 3: 62% 62% 52% 42% 2% 5% 2% 5% 4: 4% 19% 12% 28% 10% 13% 10% 13% 5: 0% 0% 3% 29% 30% 29% 30% 6: 37% 31% 37% 30% 7: 1% 7% 1% 7% 8: 6% 1% 6% 1% 9: 10: ``` Values rounded down. Missing values denote no occurrence of any value. Explanation of the first line: ``` 0: 22% the initial max 1: 3% local min 2: 6% still min 3: 62% plateau max 4: 4% second min 5: 0% 0 6: no more values 7: 8: 9: 10: ``` For reference, a list of the same data, this time scaled to 0 - 100 (there were no values in the 90-100 range at all). I messed up on the formatting, but it should give a rough idea. ``` 0: 0% 0% 0% 1% 0% 0% 0% 0% 1: 0% 1% 1% 3% 0% 0% 0% 0% 2: 1% 2% 1% 3% 0% 0% 0% 0% 3: 4% 2% 3% 3% 0% 1% 0% 1% 4: 6% 1% 3% 2% 0% 0% 0% 0% 5: 2% 0% 3% 1% 0% 0% 0% 0% 6: 1% 0% 2% 0% 0% 0% 0% 0% 7: 1% 0% 1% 0% 0% 0% 0% 0% 8: 1% 0% 1% 0% 0% 0% 0% 0% 9: 1% 0% 1% 0% 1% 0% 1% 0% 10: 1% 0% 0% 0% 1% 0% 1% 0% 11: 0% 0% 0% 0% 0% 0% 0% 0% 12: 0% 0% 0% 0% 0% 0% 0% 0% 13: 0% 0% 0% 0% 0% 0% 0% 0% 14: 0% 0% 0% 0% 0% 0% 0% 0% 15: 0% 0% 0% 0% 0% 0% 0% 0% 16: 0% 0% 0% 0% 0% 0% 0% 0% 17: 0% 0% 0% 0% 0% 0% 0% 0% 18: 0% 0% 0% 0% 0% 0% 0% 0% 19: 0% 0% 0% 0% 0% 0% 0% 0% 20: 0% 0% 0% 0% 0% 0% 0% 0% 21: 0% 0% 0% 0% 0% 0% 0% 0% 22: 0% 0% 0% 0% 0% 0% 0% 0% 23: 0% 0% 0% 0% 0% 0% 0% 0% 24: 0% 0% 1% 0% 0% 0% 0% 0% 25: 0% 0% 1% 0% 0% 0% 0% 0% 26: 0% 0% 1% 0% 0% 0% 0% 0% 27: 0% 0% 1% 0% 0% 0% 0% 0% 28: 1% 0% 2% 1% 0% 0% 0% 0% 29: 3% 0% 2% 2% 0% 0% 0% 0% 30: 7% 1% 3% 2% 0% 0% 0% 0% 31: 10% 2% 4% 3% 0% 0% 0% 0% 32: 10% 3% 4% 4% 0% 0% 0% 0% 33: 6% 6% 5% 5% 0% 0% 0% 0% 34: 5% 5% 4% 4% 0% 0% 0% 0% 35: 5% 8% 6% 3% 0% 0% 0% 0% 36: 5% 10% 6% 4% 0% 0% 0% 0% 37: 5% 9% 5% 3% 0% 0% 0% 0% 38: 3% 8% 5% 5% 0% 0% 0% 0% 39: 2% 5% 5% 5% 0% 0% 0% 0% 40: 1% 4% 4% 5% 0% 1% 0% 1% 41: 1% 3% 2% 5% 0% 1% 0% 1% 42: 0% 1% 1% 4% 0% 0% 0% 0% 43: 0% 2% 0% 4% 1% 1% 1% 1% 44: 0% 1% 0% 3% 1% 1% 1% 1% 45: 0% 1% 0% 1% 0% 1% 0% 1% 46: 0% 1% 0% 1% 1% 1% 1% 1% 47: 0% 1% 0% 0% 1% 1% 1% 1% 48: 0% 1% 0% 0% 1% 1% 1% 1% 50: 0% 0% 0% 1% 1% 1% 1% 1% 50: 0% 1% 1% 1% 1% 1% 51: 0% 0% 2% 1% 2% 1% 52: 0% 1% 2% 1% 2% 1% 53: 0% 0% 4% 2% 4% 2% 54: 0% 2% 2% 2% 2% 55: 0% 2% 2% 2% 2% 56: 0% 2% 3% 2% 3% 57: 0% 2% 4% 2% 4% 58: 4% 6% 4% 6% 59: 3% 3% 3% 3% 60: 5% 5% 5% 5% 61: 5% 7% 5% 7% 62: 3% 5% 3% 5% 63: 4% 3% 4% 3% 64: 5% 2% 5% 2% 65: 3% 2% 2% 2% 66: 5% 1% 5% 1% 67: 1% 0% 1% 0% 68: 1% 0% 1% 0% 69: 0% 1% 0% 1% 70: 0% 0% 0% 0% 71: 0% 0% 0% 0% 72: 0% 0% 0% 0% 73: 0% 1% 0% 1% 74: 0% 0% 0% 0% 75: 0% 0% 0% 0% 76: 0% 1% 0% 1% 77: 0% 0% 0% 0% 78: 0% 0% 0% 0% 79: 0% 0% 0% 0% 80: 0% 0% 0% 1% 81: 0% 0% 0% 0% 82: 0% 0% 0% 0% 83: 0% 0% 0% 0% 84: 0% 0% 0% 0% 85: 1% 1% 86: 0% 0% 87: 1% 1% 88: 1% 1% 89: 0% 0% ```
Find a local minimum in a special graph
CC BY-SA 3.0
0
2011-05-13T13:06:14.727
2011-05-17T01:48:34.167
2011-05-13T13:52:36.153
39,590
39,590
[ "algorithm", "graph" ]
5,992,336
1
5,992,712
null
3
2,209
When you unfold nested levels of your code the folded text in nested code is not indented. It begins on the beginning of the line with `+` instead of starting indented. Do you know how to change it? ![illustrating picture](https://i.stack.imgur.com/H282R.png)
Indenting fold text
CC BY-SA 3.0
null
2011-05-13T13:09:51.043
2011-12-25T23:08:42.530
2011-12-25T23:08:42.530
283,240
653,379
[ "vim", "folding" ]
5,992,458
1
5,992,459
null
1
764
I've got extra whitespace chrome, but no other browser on my client's website healthimpactnews.com. There is excess white space in two spots (the promo at the top, and the bottom portion of the slider below). I've looked through the css... and I can't figure out what's causing this. Any ideas? ![enter image description here](https://i.stack.imgur.com/62OL1.png)
Unexplained space in Chrome?
CC BY-SA 3.0
null
2011-05-13T01:32:37.560
2014-09-04T11:07:59.683
null
null
375,793
[ "css", "cross-browser" ]