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,484,019
1
5,495,785
null
1
438
In iPhone App I want to implement core plot (vertical bar chart) In Original code Prject I am getting graph as ![enter image description here](https://i.stack.imgur.com/7rM7G.png) but when same code I am implementing in my App I am getting plot as ![enter image description here](https://i.stack.imgur.com/lc2Nj.png) so what things could be wrong? Please Help and Suggest Thanks.
iPhone -Core Plot problem
CC BY-SA 2.5
null
2011-03-30T08:44:42.533
2011-03-31T05:49:45.667
2011-03-30T08:55:07.063
531,783
531,783
[ "iphone", "ios4", "core-plot" ]
5,484,215
1
5,484,415
null
8
20,172
I have a HTML layout puzzle on my hands. I have a large alphabetical list, generated by my PHP app, and I need to output it on a web page. The markup generated look like this: ``` <div class="list_item">A</div> <div class="list_item">B</div> <div class="list_item">C</div> <div class="list_item">D</div> <div class="list_item">E</div> <div class="list_item">F</div> <div class="list_item">G</div> <div class="list_item">H</div> ... ``` The stylesheet looks like this: ``` .list_item { margin: 5px; padding: 5px; border: 1px solid gray; width: 200px; float: left; } ``` Rendered result: ![Rendered result](https://i.stack.imgur.com/MPE7G.png) As you can see, this is not very readable, I would expect DIV's to be outputted in two columns, so the first columns would contain "A B C D" and the second one "E F G H". Is there a way to do this, without changing the markup? It's possible, to add different class, to even and odd divs, but since divs are outputted in a loop, theres is no way split them differently. See a demo: [http://jsfiddle.net/KZcCM/](http://jsfiddle.net/KZcCM/) Note: I already solved it by splitting the list in two parts by PHP, but I want to know, if there is a HTML/CSS solution here.
How to make floating DIV list appear in columns, not rows
CC BY-SA 2.5
0
2011-03-30T09:01:13.450
2015-12-06T10:32:47.123
null
null
303,513
[ "html", "css", "layout" ]
5,484,228
1
null
null
6
4,704
My breakpoints have stopped working properly in the latest XCode 4 release. With no change to the project settings, the breakpoints no longer break at the line they are set. For instance, in one function I can set a breakpoint anywhere within it's body, but the code will always break at the last line of the function. In another instance, I can set a breakpoint anywhere in one function and the code will break at a line in the middle of a different function in the same file! Tracing through after the break shows that it did break in the wrong place and it's not just a file / debugger sync issue. I have no idea why this has started. It did however seem to start on new breakpoints while old ones worked. Any new breakpoints I add break in the wrong place. And recently, some files now don't even break at all! I can only assume the breakpoint is so wrong it's moved into code that's not called. I have done numerous internet searches and forum searches for this problem, and although I have found people with similar issues, there was either no solution or the solution listed (rebooting device, swapping debug output, turning off optimization etc.) haven't worked for me. It is worth mentioninig I'm mostly coding in C++ using .mm files. For the past year of development in XCode 3, and for the last few months in XCode 4 things have been fine! I have debug set up correctly. No optimization on a debug run, no dead code stripping and I'm using the LLVM compiler 2.0 with DWARD with dSYM debug file. However, changing these values makes no difference. Please help, it's driving me mad!! An update to this. It's started happening again on a brand new machine with a fresh Lion and xcode install. The whole editor is out of whack. Example below of the errors appearing on the wrong lines. ![Errors on the wrong lines!](https://i.stack.imgur.com/oMBnh.png)
XCode 4 breakpoints not breaking at correct line
CC BY-SA 3.0
0
2011-03-30T09:02:23.623
2012-03-19T11:50:32.690
2011-09-15T11:57:01.000
683,614
683,614
[ "xcode4", "breakpoints" ]
5,484,213
1
5,485,844
null
-1
280
I tried a lot but cannot understand the reason my program hangs. Whenever i click connect,program hangs. ``` import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.net.*; import java.io.*; class chatboxClient { JFrame fr; JPanel p; JButton send; JTextArea ta; JRadioButton rb; chatboxServer cbS=new chatboxServer(); chatboxClient() { fr=new JFrame("ChatBox_CLIENT"); p=new JPanel(); send=new JButton("send"); send.addActionListener(new ActionListener() { // action listener for send public void actionPerformed(ActionEvent ae) { sendActionPerformed(ae); } }); ta=new JTextArea(); ta.setRows(20); ta.setColumns(20); rb=new JRadioButton("Connect"); // action listener for connect rb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { connectActionPerformed(ae); } }); fr.add(p); p.add(ta); p.add(rb); p.add(send); fr.setSize(500,500); fr.setResizable(false); fr.setVisible(true); } public void connectActionPerformed(ActionEvent ae) { try { cbS.Laccept(); rb.setEnabled(false); JOptionPane.showMessageDialog(new JFrame()," Sockets InterConnected!"); } catch(Exception exc) { JOptionPane.showMessageDialog(new JFrame()," Connection Error.."); } } public void sendActionPerformed(ActionEvent ae) { try { String s=ta.getText(); InetAddress address=InetAddress.getLocalHost(); DatagramSocket ds=new DatagramSocket(3000,address); byte buffer[]=new byte[800]; buffer=s.getBytes(); DatagramPacket dp=new DatagramPacket(buffer,buffer.length,address,3000); if(true) { ds.send(dp); cbS.Receive(s); // call Receive method of chatboxServer class } } catch(Exception exc) { JOptionPane.showMessageDialog(new JFrame(),"Error sending Message"); } ``` } ``` public static void main(String args[]) { new chatboxClient(); } } ``` ``` import java.awt.*; import java.net.*; import javax.swing.*; import java.awt.event.*; class chatboxServer { JFrame fr; JPanel p; JTextArea ta; JButton send; ServerSocket ss; byte buffer[]=new byte[800]; chatboxServer() { fr=new JFrame("ChatBox_SERVER"); p=new JPanel(); ta=new JTextArea(); ta.setRows(20); ta.setColumns(20); send=new JButton("send"); fr.add(p); p.add(ta); p.add(send); fr.setVisible(true); fr.setSize(500,500); fr.setResizable(false); ``` } ``` public void Receive(String sm) { try { buffer=sm.getBytes(); InetAddress address=InetAddress.getLocalHost(); DatagramSocket ds=new DatagramSocket(3000,address); DatagramPacket dp=new DatagramPacket(buffer,buffer.length); ds.receive(dp); String s=new String(dp.getData(),0,dp.getLength()); ta.setText(s); } catch(Exception exc) { System.out.println("Error Receiving.."); } ``` } ``` public void Laccept() { try { ss=new ServerSocket(3000); // First making port number 3000 on server to listen Socket s=ss.accept(); } catch(Exception exc) { JOptionPane.showMessageDialog(new JFrame(),"Accept Failed :3000 :Server Side"); } } } ``` The part that i think is causing a problem is when i call to `Laccept()`. The output: ![enter image description here](https://i.stack.imgur.com/OfQ6C.jpg) ![enter image description here](https://i.stack.imgur.com/8msO8.jpg) Please help me in this.
This Program Hangs_networking
CC BY-SA 2.5
0
2011-03-30T09:01:02.767
2011-03-30T15:50:59.740
null
null
648,138
[ "java" ]
5,484,308
1
5,496,367
null
0
1,448
What to do now, this time?? I hate VS and this symbolic gibberish that never seem to have same solution (if it once was logic) twice. The screendump below says what it says. As soon as I F5/Start the web project, the breakpoint going yellow. This ONLY affect the aspx.cs file that being changed. The other aspx.cs files can have breakpoints. When I do rebuild/build all DLL and PDB files are created just fine. They have same compile time and are in same directory. Module-Windows i VS says the symbols are loaded perfectly. Well, yeah, try bite me! I can tell, all symbolic is working just fine, until I was about doing changes inside those aspx.cs files (which was some time ago since last time). If I reset back the file, the breakpoint are working. If I try to make changes in another file, the problem appears there. It simply appears like that the symbolic file generator don't understand changes maded in aspx.cs files.. ![Web Project Settings (build tab, release mode and debug mode)](https://i.stack.imgur.com/OZgTU.gif)
“No symbols loaded for the current document” ASP.NET C# Project
CC BY-SA 2.5
null
2011-03-30T09:10:41.510
2014-01-29T09:47:07.153
2020-06-20T09:12:55.060
-1
625,103
[ "c#", "asp.net", "visual-studio", "visual-studio-2010", "pdb-files" ]
5,484,404
1
5,486,677
null
1
8,019
I keep on trying to fix the sortBy function of this dataTable(Primefaces component) but i just cant understand why it doesnt work, when other features like pagination or filter work correctly. For this dataTable i just need to pass an array for its tag attribute called "value" and also a single object of the same type of the array for the tag attribute called "var". Down below i will post my code. This is the JSF page with the dataTable ``` <!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" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:p="http://primefaces.prime.com.tr/ui"> <ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"> <ui:define name="resultsForm"> <h:form enctype="multipart/form-data"> <h:inputText id="search" value="" /><h:commandButton value="search"/> <p:dataTable var="garbage" value="#{resultsController.allGarbage}" dynamic="true" paginator="true" paginatorPosition="bottom" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15"> <p:column filterBy="#{garbage.filename}" filterMatchMode="startsWith" sortBy="#{garbage.filename}" parser="string"> <f:facet name="header"> <h:outputText value="Filename" /> </f:facet> <h:outputText value="#{garbage.filename}" /> </p:column> <p:column filterBy="#{garbage.description}" filterMatchMode="contains"> <f:facet name="header"> <h:outputText value="Description" /> </f:facet> <h:outputText value="#{garbage.description}" /> </p:column> <p:column sortBy="#{garbage.uploadDate}" parser="string"> <f:facet name="header"> <h:outputText value="Upload date" /> </f:facet> <h:outputText value="#{garbage.uploadDate}" /> </p:column> </p:dataTable> </h:form> </ui:define> ``` Here the managed bean that interacts with that page: ``` @ManagedBean @RequestScoped public class ResultsController { @EJB private ISearchEJB searchEJB; private Garbage garbage; public List<Garbage> getAllGarbage() { return searchEJB.findAllGarbage(); } public Garbage getGarbage() { return garbage; } public void setGarbage(Garbage garbage) { this.garbage = garbage; } ``` The EJB that accesses the database: ``` @Stateless(name = "ejbs/SearchEJB") public class SearchEJB implements ISearchEJB { @PersistenceContext private EntityManager em; public List<Garbage> findAllGarbage() { Query query = em.createNamedQuery("findAllGarbage"); List<Garbage> gList = new ArrayList<Garbage>(); for (Object o : query.getResultList()) { Object[] cols = (Object[]) o; Garbage tmpG = new Garbage(); tmpG.setFilename(cols[0].toString()); tmpG.setDescription(cols[1].toString()); tmpG.setUploadDate(cols[2].toString()); gList.add(tmpG); } return gList; } ``` } The entity with the JPQL named query being used: ``` @NamedQuery(name = "findAllGarbage", query = "SELECT g.filename, g.description, g.uploadDate FROM Garbage g;") @Entity public class Garbage { @Id @GeneratedValue @Column(nullable = false) private Long id; @Column(nullable = false) private String filename; @Column(nullable = false) private String fileType; @Column(nullable = false) private String uploadDate; @Column(nullable = false) private String destroyDate; @Lob @Column(nullable = false) private byte[] file; @Column(nullable = false) private String description; ``` A print screen with browsers output ![enter image description here](https://i.stack.imgur.com/WVjq1.png) The console output when the page is refreshed (SEVERE: line 1:61 no viable alternative at character ';'): ![enter image description here](https://i.stack.imgur.com/vZBqn.png)
Why this dataTable sortBy function does not work?
CC BY-SA 2.5
0
2011-03-30T09:20:12.857
2013-06-11T13:34:27.813
2011-03-30T11:45:14.450
614,141
614,141
[ "java", "jsf", "jakarta-ee", "jsf-2", "primefaces" ]
5,484,433
1
5,484,476
null
1
59
I have code that takes the name of a term and pulls in a post of a custom post type of the same name. This works well. Except when a £ character is in the title. e.g. pseudocode ``` $q = new WP_Query (array( 'name' => "Insurance Rating £1K")); if($q->have_posts()){ // expected path of logic flow } else { // nothing was found =s } ``` This post does indeed exist, yet it is not found, and this problem only affects cases with a '£' character in the title. Since Wordpress already sanitizes the titles etc, what is happening? Why does this not work? edit: This is a general case, not specific to any codebase of mine. I want to know why this happens and how to avoid it, the codebase this first arose in is irrelevant. So I dont need an alternative solution, as I'm looking for it happened edit 2: The database tables are using `utf8_general_ci` encoding. The £ character is also being saved as is, not as a html entity, here's a screenshot from phpmyadmin: ![Database row](https://i.stack.imgur.com/Gk9H1.png)
Wordpress Query £ signs failure
CC BY-SA 2.5
null
2011-03-30T09:23:17.943
2011-03-30T10:34:58.770
2011-03-30T09:54:14.837
57,482
57,482
[ "php", "wordpress" ]
5,484,540
1
5,489,188
null
7
22,281
So I've been working on a HTML5 iPad application for work and have come across a problem. I didn't have access to an iPad whilst first working on this app and relied on desktop Safari to get my app quickly together (probably not the best thing, anyhow...) I'm having to rely on a input range for a part of the interface. After seeing that HTML5 had a range input, I was happy as this is just what I needed. I even managed to style it up to exactly what was designed: ![HTML5 range input](https://i.stack.imgur.com/ZLM3S.png) This is great! ...until I actually tried it on an iPad and it doesn't work. Just shows a text input. I'm now wondering what to do... I do need a slider, something that when dragged, it spits out the data. Obviously needs to work with touch. After looking around all over the web, there doesn't seem to be a solid solution. What do you guys suggest here? What's the proper way of coding up a working touch-friendly slider, just like the native HTML5 one that it doesn't support!? Any ideas/thoughts/knowledge/experience would be greatly appreciated! James
Recreating the HTML5 range input for Mobile Safari (webkit)?
CC BY-SA 2.5
0
2011-03-30T09:34:22.603
2020-01-28T02:08:21.143
null
null
86,128
[ "html", "input", "css", "mobile-safari" ]
5,484,780
1
5,508,703
null
0
323
recently, I try to merge changes from trunk to branch ``` C:\Projects\branch\XXX>svn merge -r 167:193 https://svn-server:8443/svn/XXX/trunk . --- Merging r168 through r193 into '.': C Code Summary of conflicts: Tree conflicts: 1 ``` ![This is branch](https://i.stack.imgur.com/GnqK1.png) ![This is trunk](https://i.stack.imgur.com/bgrrO.png) 1) User performs first commit in branch to 166 2) User then performs another commit in trunk to 167 3) User performs subsequent commit to branch 168-172 4) User then continue to perform commit to trunk 193-173 I want to carry over the changes in (2) and (4), that's why I am using `167:193` However, it states conflict occur in `Code`. Note that, `Code` is a folder.
Conflict at folder during merging from trunk to branch
CC BY-SA 2.5
0
2011-03-30T09:56:26.013
2011-09-30T21:28:00.653
2011-04-01T03:04:58.477
281,843
72,437
[ "svn", "version-control", "tortoisesvn" ]
5,484,867
1
5,486,246
null
0
185
My problem is related to when I want to Delete a Item off a Order, I just dont get why it is returning a null value it should just delete the item. ``` protected void gvRevOrder_RowDeleting(object sender, GridViewDeleteEventArgs e) { Int64 ID = new Int64(); ID = (Int64)e.Keys["ProductID"]; using (DatabaseCourseWorkEntities context = new DatabaseCourseWorkEntities()) { CWInvoiceItem item = (from p in context.CWInvoiceItems where p.ProductID == ID select p).SingleOrDefault(); context.CWInvoiceItems.DeleteObject(item); context.SaveChanges(); } ``` below i have put a link of the thing i am trying to delete and as you can see the ProductID = 38 and the Variable ID also has 38 any ideas? ![enter image description here](https://i.stack.imgur.com/GD0RI.jpg) I've tried all sorts such as FirsOrDefault and such.
dont get why my query is returning a null
CC BY-SA 3.0
0
2011-03-30T10:05:46.457
2014-04-20T20:41:22.743
2014-04-20T20:41:22.743
759,866
null
[ "c#", ".net", "entity-framework" ]
5,484,922
1
5,487,005
null
442
390,266
I have a plot with two y-axes, using `twinx()`. I also give labels to the lines, and want to show them with `legend()`, but I only succeed to get the labels of one axis in the legend: ``` import numpy as np import matplotlib.pyplot as plt from matplotlib import rc rc('mathtext', default='regular') fig = plt.figure() ax = fig.add_subplot(111) ax.plot(time, Swdown, '-', label = 'Swdown') ax.plot(time, Rn, '-', label = 'Rn') ax2 = ax.twinx() ax2.plot(time, temp, '-r', label = 'temp') ax.legend(loc=0) ax.grid() ax.set_xlabel("Time (h)") ax.set_ylabel(r"Radiation ($MJ\,m^{-2}\,d^{-1}$)") ax2.set_ylabel(r"Temperature ($^\circ$C)") ax2.set_ylim(0, 35) ax.set_ylim(-20,100) plt.show() ``` So I only get the labels of the first axis in the legend, and not the label 'temp' of the second axis. How could I add this third label to the legend? ![enter image description here](https://i.stack.imgur.com/MdCYW.png)
Secondary axis with twinx(): how to add to legend?
CC BY-SA 2.5
0
2011-03-30T10:10:56.473
2023-01-31T17:22:35.393
2011-03-30T10:26:26.830
653,364
653,364
[ "python", "matplotlib", "axis", "legend" ]
5,484,969
1
5,485,424
null
1
371
My app requires 256 MB of RAM. I need to set up this value in plist.(for app store distribution). frankly speaking, my app assumed 130МВ . I need to support 3gs, 4g, ipad , and ipod touch with 256 mb. How can I do this? ![enter image description here](https://i.stack.imgur.com/SttgT.png)
My app requires 256 MB of RAM. I need to set up this value in plist.(for app store distribution). How can I do this?
CC BY-SA 2.5
null
2011-03-30T10:15:41.663
2011-03-30T11:01:17.647
2011-03-30T10:46:11.943
499,825
499,825
[ "iphone", "xcode", "plist" ]
5,485,153
1
5,631,806
null
3
1,657
I've got combobox inside some panel : ``` <ajaxToolkit:ComboBox ID="YearList" runat="server" OnInit="YearList_Init1" EnableTheming="false" Width="45px" ViewStateMode="Disabled" /> ``` and it was OK before I updated project to .NET 4 , after updating project (And AJAX) to .net4 it's looking like really strange ... I can't explain it proper , I will show : ![enter image description here](https://i.stack.imgur.com/8QPpn.png) how can I fix it ? :) Full CSS / ASPX page here -> [https://github.com/nCdy/Issues/tree/master/Ajax%20ComboBox](https://github.com/nCdy/Issues/tree/master/Ajax%20ComboBox) (string # 287)
weird Ajax ComboBox drop down list
CC BY-SA 2.5
0
2011-03-30T10:32:21.887
2012-07-24T05:37:16.747
2011-04-11T13:09:42.700
238,232
238,232
[ "asp.net", "ajax", "combobox", "ajaxcontroltoolkit" ]
5,485,204
1
5,485,307
null
2
7,076
My plan is to take the Windows 7 UI, and recreate it using CSS3. I've already done it with the 98 theme, but I want to be able to change stylesheets. The problem arises when I need to blur the background image with low opacity. Is this even possible? Seen below: ![Example here:](https://i.stack.imgur.com/nhLdU.png) It's hard to explain, but I'm going to give it some minimal capabilities (draggable, resizeable etc) So I can't do the two background hack. Is this possible with jQuery or something similar? [http://jsfiddle.net/BeauAugust/AZRHC/](http://jsfiddle.net/BeauAugust/AZRHC/) an example
BLUR a div background with opacity (page background seems blurred through div)
CC BY-SA 2.5
null
2011-03-30T10:38:03.413
2012-07-05T12:34:58.860
2020-06-20T09:12:55.060
-1
661,342
[ "javascript", "jquery", "html", "css" ]
5,485,207
1
5,485,921
null
5
2,724
I've made a CSS progressbar, using 2 overlapping elements. The CSS for the elements is as follows: ``` #status_progressbar { height: 22px; width: 366px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; background: #000; cursor: pointer; } #status_progressbar_progress { height: 22px; background: #eee; float: right; -moz-border-radius: 0 10px 10px 0; -webkit-border-radius: 0 10px 10px 0; border-radius: 0 10px 10px 0; /* width controlled by Rails backend, using inline style */ } ``` Unfortunately, the background from the parent is partly visible at the right edge, as you can see clearly in this picture. Since the background from the child element should precisely overlap the parent element, I don't know why this is the case. [Picture taken in Firefox 4] ![Problem](https://i.stack.imgur.com/gll0L.png) Maybe someone could explain to me why this is happening and how to solve it?
Border-radius on two overlapping elements; background shines through
CC BY-SA 2.5
0
2011-03-30T10:38:28.687
2011-03-30T12:05:51.063
null
null
501,786
[ "css" ]
5,485,296
1
null
null
0
419
I do a application have a navigation controller, the application works fine but in one UIView I have a UITableView. ![Example of the application](https://i.stack.imgur.com/NuGTu.jpg) When push cell I need open new view. I tried this in didSelectRowAtIndexPath: ``` NextViewController *nextView = [[NextViewController alloc] initWithNibName:@"NextViewController" bundle:nil]; [self.navigationController pushViewController:nextView animated:YES]; [nextView release]; ``` But the view does not open. I tried this too: ``` NextViewController *screen = [[NextViewController alloc]initWithNibName:@"nextView" bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:screen animated:YES]; [screen release]; ``` Now the view it's open, but not correctly positioned, is under top navigation bar and tab bar and a part in view is hidden. How can I open the view correctly? EDIT: I put o ther UIButton in other UIView to open other secondary UIView and doesnt work. I'm completely confused.
iOS - View is not open (navigation controller app)
CC BY-SA 2.5
null
2011-03-30T10:48:25.907
2011-03-30T16:21:43.303
2011-03-30T16:21:43.303
632,674
632,674
[ "iphone", "objective-c" ]
5,485,405
1
5,489,942
null
15
3,635
I just spent a couple of hours trying to convert [some old code](http://demonstrations.wolfram.com/ScalarFeynmanDiagramsAndSymanzikPolynomials/) that uses Mathematica 7's `GraphPlot` to use the new Mathematica 8 Graph functions. It seemed sensible since the new graph drawing is much nicer and it has things like `AdjacencyMatrix` and [KirchhoffMatrix](http://reference.wolfram.com/mathematica/ref/KirchhoffMatrix.html) built in. is that I can not figure out how to get graphs with multiple edges to work in Mma 8. The Feynman graph that I use as my canonical example is the two-loop vacuum graph ``` GraphPlot[{1 -> 2, 1 -> 2, 1 -> 2}, MultiedgeStyle -> .5, DirectedEdges -> True, VertexCoordinateRules -> {{-1, 0}, {1, 0}}] ``` ![two-loop vacuum sunset graph](https://i.stack.imgur.com/ggEb0.png) Trying to make the similar graph in Mma 8 ``` Graph[{DirectedEdge[1, 2], DirectedEdge[1, 2], DirectedEdge[1, 2]}, VertexCoordinates -> {{-1, 0}, {1, 0}}] ``` yields the error message ``` Graph::supp: Mixed graphs and multigraphs are not supported. >> ``` How can I construct (and work with) a similar graph using Mathematica 8's `Graph[]` objects? This problem still exists in Mathematica 9
Multigraphs in Mathematica 8
CC BY-SA 3.0
0
2011-03-30T10:59:26.447
2015-05-31T11:36:18.820
2012-12-18T06:02:04.450
421,225
421,225
[ "graph", "wolfram-mathematica" ]
5,486,031
1
5,489,820
null
1
378
I use the task queue to send users future reminders. Each task is very small, but somehow this situation has happened and my app is down: ![enter image description here](https://i.stack.imgur.com/rS6fA.png) Any ideas what might cause this? Just ~30 minutes later I'm getting a very different report. ![enter image description here](https://i.stack.imgur.com/wMgXw.png) "Tasks in queue" count is almost the same, but "task queue stored task count" is suddenly much less. :o Just to be clear what I did: - I purged the "deleter" task, which was using a lot of CPU but had only 16 small tasks in it, so it shouldn't have really affected the size of the queue much.- Caught the exception that happens when you try to add a task to the full queue. This shouldn't affect amount of tasks added at all.- Browsed Reddit for half an hour. That fixed it.
Task queue filled
CC BY-SA 2.5
null
2011-03-30T12:04:46.987
2011-03-31T08:59:37.107
2011-03-30T12:51:34.033
8,005
8,005
[ "google-app-engine" ]
5,486,091
1
5,528,229
null
1
2,796
I managed to implement paypal's embedded payment feature on my site. However, instead of producing a lightbox effect while remain on the same page, the javascript cause a creation of a new window to load on clicking payment button and form a payment page like this: ![enter image description here](https://i.stack.imgur.com/MTu0W.png) I also got my info from this site [here](https://www.x.com/people/Praveen/blog/2010/11/01/switching-over-to-embedded-payments) which apparently works for most people in their browsers. any idea how this lightbox thing is suppose to work?
How to perform paypal embedded payment on webpage
CC BY-SA 2.5
0
2011-03-30T12:11:53.193
2011-04-03T07:29:38.320
2011-03-30T14:27:50.480
117,160
494,505
[ "javascript", "paypal", "lightbox", "payment" ]
5,486,390
1
null
null
1
322
Dear StackOverflow members, I'm currently facing an issue with one of my SharePoint server, the contentclass assigned to the crawled content is never set. I noticed that when my scopes returned 0 result (I'm filtering on `contentclass=sts_list_item_850`). A quick search with the neat ZevenSea SearchCoder within the crawled content confirmed this ![no content class is available, field is empty accross all crawled content](https://i.stack.imgur.com/5KwoZ.png) (no content class is available, field is empty accross all crawled content). I deleted my scopes, did a full crawl, even deleted my SSP and create a new one, running the configuration wizard but this behavior is still here and I've no clue why it's the case. If you have any idea what could be the culprit, I'm eager to know. Thanks a lot for any feedback.
No ContentClass specified on search results (after full or incremental crawls)
CC BY-SA 2.5
null
2011-03-30T12:41:57.003
2015-09-29T13:59:34.653
2020-06-20T09:12:55.060
-1
266,455
[ "sharepoint", "search", "sharepoint-2007" ]
5,486,487
1
5,487,130
null
0
1,464
![enter image description here](https://i.stack.imgur.com/CeUQ8.jpg) how can i hide empty area if i has empty content of tab?
yii CTabView empty content
CC BY-SA 2.5
null
2011-03-30T12:49:54.930
2011-03-30T13:41:30.300
null
null
276,640
[ "yii" ]
5,486,491
1
null
null
21
13,864
I'm trying to understand how the `view` associated to a `UITabBarController`, `UINavigationController` or `UIViewController` reacts when the in-call status bar is toggled. My trouble is that they seem to behave differently and this causes me side effects. I've made a project that changes the root view controller of the window for the 3 types above and I dump the `description` of the `view` to get the frame coordinates. --- - `UIViewController` ![enter image description here](https://i.stack.imgur.com/IRLEh.png) inCall status : This one I understand : when the in-call status bar appears, the height of the view of the UIViewController shrinks and looses 20, and its y coord moves from 20 to 40. `UIViewController``UITabBarController``UINavigationController` --- - `UINavigationController`![enter image description here](https://i.stack.imgur.com/rlYbW.png) InCall status bar In that case, the view handled by the UINavigationController does not have its frame properties changed when the in-call status bar is toggled?! (why ? :( ) --- - `UITabBarController` ![enter image description here](https://i.stack.imgur.com/o3Xw0.png) Same as in the `UINavigationController`: the `view` of the `UITabBarController` does not seem to be impacted when the incall status bar is toggled. --- Can someone explain me how this resize works when displaying the incall status bar appears ? My end goal is to display a `UIView` that is shown the whole `UITabBarController` and that resizes properly when the in call status is displayed. However, I really don't know where to put such a view in the views hierarchy : if I add it as a child of the UITabBarController's view, as this one does not react to the incall status display, mine does not react as well :(
How In-Call status bar impacts UIViewController's view size?
CC BY-SA 4.0
0
2011-03-30T12:50:10.653
2019-05-24T12:56:23.253
2019-05-24T12:56:23.253
1,131
145,710
[ "iphone", "uitabbarcontroller", "statusbar", "in-call" ]
5,486,912
1
5,486,942
null
0
1,326
UITableView has , which contains UILabel. Since table has also section index at right side, I want to center the label in remaining space. ![enter image description here](https://i.stack.imgur.com/OL1kh.png) Problem is how to "center" label in same way, when to landscape! I've tried both Interface Builder and code-only and something is always wrong. 1. Label is as narrow as possible 2. Label must not be resized 3. Label must be always centered inside table width minus section index One easy way to fix this would be making section header view detached from tableView right side. Tried to do it, failed. Here's some code from : ``` CGRect frame = CGRectMake(0, 0, tableView.bounds.size.width - 32, 50.0f); // MAGIC 32 for SectionIndexTitles UIView *view = [[[UIView alloc] initWithFrame:frame] autorelease]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; label.font = [UIFont fontWithName:@"Courier" size:20]; label.text = @"Section title long"; label.textAlignment = UITextAlignmentCenter; label.backgroundColor = [UIColor redColor]; CGSize labelSize = [label.text sizeWithFont:label.font constrainedToSize:frame.size lineBreakMode:UILineBreakModeClip]; label.frame = CGRectMake(0, 0, labelSize.width, labelSize.height); label.center = CGPointMake(frame.size.width/2.0f, kHeaderHeight/2.0f); label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; ``` Any ideas welcome! Can't even recall how many different ways I have failed :)
How to rotate viewForHeaderInSection
CC BY-SA 2.5
null
2011-03-30T13:23:51.753
2011-03-30T13:49:40.147
2011-03-30T13:36:35.953
null
113,079
[ "iphone", "uitableview", "resize" ]
5,487,752
1
6,888,769
null
1
12,804
I dont know why my dataTable does not sort the columns when i click on the sort arrow. It only works if i first type something on the filter and erase it.(It is like it needs to have at least one character on the filter to be able to sort correctly). I will paste the code here: This is the JSF page with the dataTable ``` <!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" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:p="http://primefaces.prime.com.tr/ui"> <ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"> <ui:define name="resultsForm"> <h:form enctype="multipart/form-data"> <h:inputText id="search" value="" /><h:commandButton value="search"/> <p:dataTable var="garbage" value="#{resultsController.allGarbage}" dynamic="true" paginator="true" paginatorPosition="bottom" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15"> <p:column filterBy="#{garbage.filename}" filterMatchMode="startsWith" sortBy="#{garbage.filename}" parser="string"> <f:facet name="header"> <h:outputText value="Filename" /> </f:facet> <h:outputText value="#{garbage.filename}" /> </p:column> <p:column filterBy="#{garbage.description}" filterMatchMode="contains"> <f:facet name="header"> <h:outputText value="Description" /> </f:facet> <h:outputText value="#{garbage.description}" /> </p:column> <p:column sortBy="#{garbage.uploadDate}" parser="string"> <f:facet name="header"> <h:outputText value="Upload date" /> </f:facet> <h:outputText value="#{garbage.uploadDate}" /> </p:column> </p:dataTable> </h:form> </ui:define> ``` Here the managed bean that interacts with that page: ``` @ManagedBean @ViewScoped implements Serializable public class ResultsController { @EJB private ISearchEJB searchEJB; private Garbage garbage; public List<Garbage> getAllGarbage() { return searchEJB.findAllGarbage(); } public Garbage getGarbage() { return garbage; } public void setGarbage(Garbage garbage) { this.garbage = garbage; } ``` The EJB that accesses the database: ``` @Stateless(name = "ejbs/SearchEJB") public class SearchEJB implements ISearchEJB { @PersistenceContext private EntityManager em; public List<Garbage> findAllGarbage() { Query query = em.createNamedQuery("findAllGarbage"); List<Garbage> gList = new ArrayList<Garbage>(); for (Object o : query.getResultList()) { Object[] cols = (Object[]) o; Garbage tmpG = new Garbage(); tmpG.setFilename(cols[0].toString()); tmpG.setDescription(cols[1].toString()); tmpG.setUploadDate(cols[2].toString()); gList.add(tmpG); } return gList; } ``` } The entity with the JPQL named query being used: ``` @NamedQuery(name = "findAllGarbage", query = "SELECT g.filename, g.description, g.uploadDate FROM Garbage g;") @Entity public class Garbage implements Serializable{ @Id @GeneratedValue @Column(nullable = false) private Long id; @Column(nullable = false) private String filename; @Column(nullable = false) private String fileType; @Column(nullable = false) private String uploadDate; @Column(nullable = false) private String destroyDate; @Lob @Column(nullable = false) private byte[] file; @Column(nullable = false) private String description; ``` A print screen with browsers output ![enter image description here](https://i.stack.imgur.com/WVjq1.png)
dataTable sorting problem (JSF2.0 + primefaces)
CC BY-SA 2.5
0
2011-03-30T14:32:51.520
2013-10-08T14:24:49.667
2011-03-31T10:31:51.970
614,141
614,141
[ "java", "jsf", "jakarta-ee", "jsf-2", "primefaces" ]
5,487,864
1
5,487,940
null
29
23,960
I have a `RelativeLayout` with two children that are also both `RelativeLayout`s containing a few buttons and things. These children layouts are not centered in my main layout, and the main layout does contain some other things off the the sides of these two. I want the first one to be on top of the second one. That is easy enough, just use `android:layout_below="@+id/firstLayout"` in the second one. But I also want the second one to be aligned on the center of the first one. By that I mean I want the second layout to find the center of the first one, and align itself so that its center is in the same x position. I see `alignLeft, alignRight, alignTop, and alignBaseline`, but no center. Is this possible to do without having to hard code a margin to scoot the second layout over some? Here is a rough example of what I am trying to end up with, the blue bar would be the first layout, and the red box would be the second layout. I know that I could wrap them both in another `RelativeLayout` that has sizes equal to `"wrap_content"` and then use `centerHorizontal="true"` for the second one. But I would really rather leave both as children of my main layout (I would have to make some changes to the way certain parts of my app work if I make them children of a separate layout. Which I am trying to avoid.) ![Example of what I want](https://i.stack.imgur.com/X0AxQ.png)
Android RelativeLayout alignCenter from another View
CC BY-SA 4.0
0
2011-03-30T14:42:10.153
2018-12-04T20:55:24.980
2018-12-04T20:55:24.980
3,290,339
507,810
[ "android", "alignment", "android-relativelayout" ]
5,487,983
1
5,488,524
null
12
2,387
I was wondering if any of you knew if it was possible to make anything looking like this : ![side by side slanted paragraphs](https://i.stack.imgur.com/Ycfm0.jpg) I know about [http://www.infimum.dk/HTML/slantinfo.html](http://www.infimum.dk/HTML/slantinfo.html) but I can't put any .
Slanted text container
CC BY-SA 3.0
0
2011-03-30T14:51:51.110
2015-03-09T16:47:03.470
2015-01-13T15:33:33.030
1,811,992
684,142
[ "html", "css", "css-shapes" ]
5,488,080
1
null
null
0
1,490
I have a nav menu in which the hover state of a link looks like this, ![enter image description here](https://i.stack.imgur.com/i2kzQ.jpg) As you can see there is a rounded corner background set upon an orange background. The client has requested that this works right through the IE6 (they are not at the stage where they can upgrade yet). Now I came into web-development quite recently so I have not learnt old techniques for achieving this effect could some enlighten me please? Below is my code, currently I am using CSS3. ``` #navPrimary { background:#de4702; height:37px; margin:0px auto; width:517px; padding:5px 0px 0px 0px; display:block; overflow:hidden; } #navPrimary li { width:252px; float:left; display:block; height:100px; list-style-type:none; text-align:center; margin:0px 0px 0px 8px; } #navPrimary li.first { width:67px; padding:0px 14px 0px 14px; display:block; margin:0; } #navPrimary .last { width:154px; } #navPrimary li a { color:#fff; font-weight:bold; text-decoration:none; display:block; height:27px; padding:10px 0px 0px 0px; } #navPrimary li a:hover { color:#de4702; background:#fff; -moz-border-radius:10px 10px 0px 0px; -webkit-border-radius:10px 10px 0px 0px; border-radius:10px 10px 0px 0px; } <ul id="navPrimary"> <li class="first"><a href="/" title="#request.sitename# | Home">Home</a></li> <li><a href="##" title="Free Admission">Free Admission </a></li> <li class="last"><a href="#request.public_vroot#index.cfm?fuseaction=game.terms" title="Terms &amp; Conditions">Terms &amp; Conditions</a></li> </ul> ```
round corners no javascript or css3
CC BY-SA 2.5
null
2011-03-30T14:59:42.883
2011-03-30T15:44:00.397
null
null
307,007
[ "html", "css", "rounded-corners" ]
5,488,160
1
5,488,298
null
6
13,344
I've got two projects: a .Net 4.0 and an Asp.Net 4.0 (they are in the same solution). Now I'd like to include the console application (its .exe) in the web application, because I need to run it on the server when the user clicks on a certain button. Now I would like to include it in a way that the console application will be updated whenever I recompile the solution, so it stays up to date. So... Ps. Referencing doesn't work: ![enter image description here](https://i.stack.imgur.com/MSdVj.png)
How to include another project Console Application exe in an Asp.Net website?
CC BY-SA 2.5
0
2011-03-30T15:06:44.427
2016-10-21T19:55:20.983
2011-03-31T08:23:31.267
201,482
201,482
[ "c#", "asp.net", "visual-studio-2010", "console-application" ]
5,488,215
1
6,126,304
null
10
1,176
The Mixed Authentication Disposition ASP.NET Module (MADAM) is exactly what I need for the project I'm building in MVC2. I'm not an expert on authentication, could MADAM be quickly retrofitted to work with the MVC pipeline? [http://msdn.microsoft.com/en-us/library/aa479391.aspx](http://msdn.microsoft.com/en-us/library/aa479391.aspx) ![Illustrates how the Forms authentication workflow is suspended by FormsAuthenticationDispositionModule, and how BasicAuthenticationModule adds the necessary headers to the outgoing response after FormsAuthenticationDispositionModule has done its job.](https://i.stack.imgur.com/PGJhH.gif)
Is there a port of the Mixed Authentication Disposition ASP.NET Module (MADAM) for ASP.NET MVC?
CC BY-SA 2.5
0
2011-03-30T15:10:40.487
2011-05-25T21:03:11.557
2011-03-30T17:13:59.430
131,944
131,944
[ "c#", ".net", "asp.net", "asp.net-mvc", "authentication" ]
5,488,224
1
5,568,206
null
1
953
I'm trying to create the following component: ![enter image description here](https://i.stack.imgur.com/VT2w5.jpg) Just for information, the blank space will contain a text control, and I'm creating a component that represents the black corner with the (i) icon and the "promotion" text. The part I'm having issues with is this component representing the black corner with the diagonal text. The text has to be able to hold 2 lines. And the black corner has to be able to adjust to the text's size. What's more, the text has a rotation... I'm having some doubts on how to do this: - - [this](https://stackoverflow.com/questions/2340525/draw-text-on-shape-in-actionscript-3)- And... do you have any "easier" ways to do this ? A big thanks for any help you can provide :) I'm a little bit lost with this little component :) Regards. BS_C3 --- Edit 1: - - -
Flex 3 - Diagonally draw text in a shape and adjust size
CC BY-SA 2.5
0
2011-03-30T15:11:24.563
2011-04-06T14:39:50.063
2017-05-23T12:19:48.617
-1
184,298
[ "apache-flex", "text", "flex3", "shapes", "measure" ]
5,488,331
1
5,547,532
null
9
667
Currently I'm working on a RFID project where each tag is attached to an object. An object could be a person, a computer, a pencil, a box or whatever it comes to the mind of my boss. And of course each object have different attributes. So I'm trying to have a table tags where I can keep a register of each tag in the system (registration of the tag). And another tables where I can relate a tag with and object and describe some other attributes, this is what a have done. (No real schema just a simplified version) ![enter image description here](https://i.stack.imgur.com/jhkUr.png) Suddenly, I realize that this schema could have the same tag in severals tables. For example, the tag 123 could be in C and B at the same time. Which is impossible because each tag just could be attached to just a single object. To put it simple I want that each tag could not appear more than once in the database. My current approach ![enter image description here](https://i.stack.imgur.com/7khZB.png) What I really want ![enter image description here](https://i.stack.imgur.com/fVeuj.png) Yeah, the TagID is chosen by the end user. Moreover the TagID is given by a Tag Reader and the TagID is a 128-bit number. The objects until now are: -- Medicament(TagID, comercial_name, generic_name, amount, ...) -- Machine(TagID, name, description, model, manufacturer, ...) -- Patient(TagID, firstName, lastName, birthday, ...) All the attributes (columns or whatever you name it) are very different. I'm working on a system, with RFID tags for a hospital. Each RFID tag is attached to an object in order keep watch them and unfortunately each object have a lot of different attributes. An object could be a person, a machine or a medicine, or maybe a new object with other attributes. So, I just want a flexible and cleaver schema. That allow me to introduce new object's types and also let me easily add new attributes to one object. Keeping in mind that this system could be very large. Examples: ``` Tag(TagID) Medicine(generic_name, comercial_name, expiration_date, dose, price, laboratory, ...) Machine(model, name, description, price, buy_date, ...) Patient(PatientID, first_name, last_name, birthday, ...) ``` We must relate just one tag for just one object. Note: I don't really speak (or also write) really :P sorry for that. Not native speaker here.
What is the best way to keep this schema clear?
CC BY-SA 2.5
0
2011-03-30T15:18:43.753
2012-01-21T01:45:48.930
2011-04-07T01:05:16.327
20,860
371,342
[ "sql-server", "database", "polymorphic-associations" ]
5,488,498
1
5,497,727
null
3
9,080
i have a Tablecell with an Inputfield in it. The Inputfield should fill up the Tablecell but not reach into its padding. What i have looks like this (with firebug): ![Form Element reaching into padding](https://i.stack.imgur.com/Oy2a3.png) I want the inputfield to be kept inside the blue area and not raching into the purple one. And: Of course i read all the questions here on this topic first. I read all of it and i could not find any answer which actually solved that. It should work in all modern browsers (ie7 as well); I made a [minimal live Example](http://jsfiddle.net/2MZrT/7/) with jsfiddle where i tried all the solutions in the other questions but i just could not get this to work. a) and b) Why is this a problem in all browsers? I think this is a wrong specification in CSS. Because if i say "100%" of course i want the element to fit "100%" of the CONTENT Area.
Inputfield with width 100% "reaches" into padding
CC BY-SA 2.5
0
2011-03-30T15:30:19.360
2017-09-08T07:38:32.657
null
null
638,344
[ "html", "css", "padding", "input-field" ]
5,488,678
1
5,489,131
null
0
151
I'm currently working on an iphone app that lets the user take a picture with the camera and then process it using Quartz 2D. With Quartz 2D I transform the context to make the picture appear with the right orientation (scale and translate because it's mirrored) and then I stack a bunch of layers whith blending modes to process the picture. The initial (and the final result) picture is 3mp or 5mp depending on device and it takes a great amount of memory once drawn. My layers are the same size as the initial picture so every time i draw a new layer on top of my picture i need the current picture state in memory (A) + the layer to blend memory space (B) + the space in memory to write the result (C). When i get the result i ditch "A" and "B", takes "C" to the next stage of processing where it become the new "A"... I need 4 pass like this to obtain the finale picture. Giving the resolution of these pictures my memory usage can climb high. I can see a peek at 14Mo-15Mo and most of the time i only get level 1 warnings but level 2s sometimes wave at me and kill my app. - - - - ![instruments screenshot](https://i.stack.imgur.com/yXiTC.jpg)
Is there a better / faster way to process camera images than Quartz 2D?
CC BY-SA 2.5
null
2011-03-30T15:44:41.360
2012-06-18T12:50:26.423
2012-06-18T12:50:26.423
444,991
684,159
[ "iphone", "camera", "quartz-2d" ]
5,489,330
1
null
null
0
527
Chrome, Firefox and Internet Explorer 10+ seem to have a bug when loading JSF pages with HTML tables generated by Woodstock `<webuijsf:table>`. The table renders, but when the page finishes loading, it vanishes. ![enter image description here](https://i.stack.imgur.com/ZARvG.jpg) It might be some problem with the JavaScript generated by Woodstock, or maybe with the css. How is this caused and how can I solve it?
Woodstock <webuijsf:table> vanishes on page load in Chrome, Firefox and IE10+
CC BY-SA 3.0
null
2011-03-30T16:41:14.380
2015-06-11T08:06:04.607
2015-06-11T08:06:04.607
157,882
684,337
[ "jsp", "google-chrome", "internet-explorer", "jsf", "woodstock" ]
5,489,535
1
5,490,258
null
1
448
I have a client who recently requested this: ![overlay](https://i.stack.imgur.com/sfo9G.png) My thoughts were that the text could be better displayed on the back of a flipover view and that it looks like it could be an issue in the approval process. Is There any way to even do this, do I even want to try? Are there resources you can share? Thanks in advance.
iphone view overlay
CC BY-SA 2.5
null
2011-03-30T16:59:23.653
2012-03-14T10:58:18.063
2011-03-30T18:18:17.673
171,570
171,570
[ "iphone", "uiview", "uinavigationbar" ]
5,489,684
1
5,490,271
null
0
297
I'm following Twitter website to create a Tweet Button on my own website. The problem is, when I reRender the page, it reRenders the button too, and I don't know why, but the button just disappears. I'm using JSF 1.2 ``` <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.mywebsite.com" data-text="My Text" data-count="vertical" data-via="MyTwitter">Tweet <script type="text/javascript" src="http://platform.twitter.com/widgets.js"/></a> ``` Before ![enter image description here](https://i.stack.imgur.com/qItAc.png) after ![enter image description here](https://i.stack.imgur.com/mHX6t.png)
reRendering Tweet Button on JSF
CC BY-SA 2.5
null
2011-03-30T17:12:43.817
2011-03-30T18:04:28.583
null
null
509,865
[ "java", "jsf", "twitter" ]
5,489,680
1
5,489,696
null
0
183
Hey guys im getting an sqlsyntax error when I add in `idWallPosting` to my select statement in my code below: ``` using (OdbcCommand cmd = new OdbcCommand("SELECT idWallPosting, wp.WallPostings, p.PicturePath FROM WallPosting wp LEFT JOIN User u ON u.UserID = wp.UserID LEFT JOIN Pictures p ON p.UserID = u.UserID WHERE wp.UserID=" + userId + " ORDER BY idWallPosting DESC", cn)) { using (OdbcDataReader reader = cmd.ExecuteReader()) { test1.Controls.Clear(); while (reader.Read()) { System.Web.UI.HtmlControls.HtmlGenericControl div = new System.Web.UI.HtmlControls.HtmlGenericControl("div"); div.Attributes["class"] = "test"; div.ID = String.Format("{0}", reader.GetString(2)); // this line is responsible, problem here and my sqlsntax, im trying to set the SELECT idWallPosting for the div ID Image img = new Image(); img.ImageUrl = String.Format("{0}", reader.GetString(1)); img.AlternateText = "Test image"; div.Controls.Add(img); div.Controls.Add(ParseControl(String.Format("&nbsp&nbsp&nbsp;" + "{0}", reader.GetString(0)))); div.Attributes.Add("onclick", "return confirm_delete();"); div.Style["clear"] = "both"; test1.Controls.Add(div); } } } ``` My db looks like this: ![enter image description here](https://i.stack.imgur.com/uyuXg.jpg) In my code im trying to set the div.ID to the current idWallPosting in my WallPosting table so im also not sure I have that correct either. Error: > Unable to cast object of type 'System.Int32' to type 'System.String'. Related to this line I think: ``` div.ID = String.Format("{0}", reader.GetString(2)); ```
sql snytax error, and string issue related to sqlsyntax
CC BY-SA 3.0
null
2011-03-30T17:12:17.557
2015-09-14T19:50:20.507
2015-09-14T19:50:20.507
4,111,568
477,228
[ "c#", "asp.net", "mysql", "sql", "html" ]
5,490,215
1
null
null
0
1,826
Consider me an Android noob; I'm trying to create a custom ListView, that should look something like this ('this' is a custom ListView implemented in BlackBerry, but I want to create the same look and feel on Android):![Custom ListView with rounded corners, implemented on BlackBerry](https://i.stack.imgur.com/M9jSG.png) I've currently come up with the following Android code and XML, but it doesn't change the looks of the standard ListView: The code: ``` public class RoundedListView extends ListView { public RoundedListView(Context context) { super(context); // TODO Auto-generated constructor stub } public RoundedListView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub } public RoundedListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub } public void onDraw(Canvas canvas) { Paint paint = new Paint(); paint.setColor(Color.CYAN); canvas.drawRect(10, 10, 10, 10, paint); canvas.drawColor(Color.YELLOW); super.onDraw(canvas); } } ``` The XML (main.xml): ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.gravityzoo.android.containers.RoundedListView android:layout_height="wrap_content" android:id="@+id/listView1" android:layout_width="match_parent"> </com.gravityzoo.android.containers.RoundedListView> </LinearLayout> ``` Does anyone know how to make this simple drawing function working? Thanks in advance!
Android: Custom ListView Drawing
CC BY-SA 2.5
null
2011-03-30T17:59:24.827
2011-03-30T21:19:36.130
null
null
591,217
[ "android", "listview", "layout", "drawing" ]
5,490,433
1
null
null
0
1,024
Anyone an idea how to show the user a keylock. I want the app to be locked after going to the home screen. When the user launches the app, he needs to fill in a code to unlock it. So what I need is something like this (dropbox example): ![enter image description here](https://i.stack.imgur.com/5KlsI.png) Anyone an idea how to do this? Any examples available or tutorials? Thanks in advance!
iPad Password Lock for own app
CC BY-SA 2.5
null
2011-03-30T18:17:14.490
2011-03-30T18:21:13.593
null
null
387,556
[ "iphone", "xcode", "ios4", "ipad" ]
5,490,442
1
null
null
2
178
Against my recommendations to not do it, I have to set up a form that we can hand off to our affiliates and have them put on their site - I have no control over anything once it leaves me, I am hoping that the expertise in this community can give me an alternative approach to this issue. I need to code an unstyled form with the element controls which the affiliate (hopefully) will not change. The affiliate can then set the form up on their site, style it however they need to and submit it to a PHP script on my site that will A) submit it to our database and B)send some of the info to a third party. Is there something I can do with PHP - not an expert but I can usually figure it out. ![desired flow](https://i.stack.imgur.com/W8uVP.jpg) The affiliates have varying levels of technical knowledge, most of it to the low end, and there is no common technology being used (we use PHP). Some potential issues 1. Implementation if affiliates change (for whatever reason) the input ID's and or Names it won't submit into our database 2. No Client Side validation supplied by me due to their skill level/programming language differences 3. I cant control ANYTHING on the affiliate sites, I would guess this would leave our database vulnerable? 4. mainly the user experience, if they submit a form that is invalid and our server side validation catches it, send them back to the affiliate page or to an error message on our site. Since the skill level/technology issue is there I can't expect the affiliates to set up a curl script and process the error message from the form submission script on their site, so I have to send them to an error page on our site. Then the affiliate would loose the lead. These were the main issues I came up with, Im sure there are others. So I need to have something I can just hand off to the affiliates, they plug it into a page and have it work. Has anyone else had to do this before? Is there a better way to handle this? Possibly an iFrame? Ive never had much use for them due to cross domain security issues. I appreciate any advice and guidance you all can provide. I apologize if the question isn't thorough enough or viewed as well thought out. I will update it upon request. Thanks!
How to correctly deploy a "satellite" form
CC BY-SA 2.5
0
2011-03-30T18:18:22.913
2011-03-30T18:35:30.537
null
null
362,437
[ "php", "forms", "affiliates" ]
5,490,491
1
5,493,011
null
6
1,611
I upgraded to Xcode 4. If I make a new iPad project in Xcode 4, everything works. If I make a project in Xcode 3 and then bring it over to Xcode 4, that works too. Error was: ``` No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7). ``` To get it to compile and run in the simulator, I ended up using these settings: ![freaky but working settings in XCode 4](https://i.stack.imgur.com/5FKkG.png) Putting i386 got the project to compile and run ([thanks to this forum thread](http://forums.macrumors.com/showthread.php?t=1094465)), but my other projects do have i386 in the Valid Architectures and still work. How can I make my project like the others? Yes, I've gone through the project quite carefully (in XCode, not the XML, though) and the non-compiling version did look exactly like its compiling friends.
Xcode 4 Needs i386 for iPhone Sim?
CC BY-SA 4.0
0
2011-03-30T18:24:16.687
2020-06-30T20:21:39.427
2020-06-30T20:21:39.427
8,047
8,047
[ "iphone", "xcode" ]
5,490,531
1
5,490,541
null
1
279
Not sure what is going on here, if it's just my computer, or a VS bug. It is annoying. When scrolling, text in VS sometimes gets really messed up. it also happens to other window elements on occasion. ![enter image description here](https://i.stack.imgur.com/S09PS.png) I've noticed something similar in Dreamweaver CS4 & CS5, so I don't know if it's my computer or something with WPF. Any way to fix this problem? Windows 7 Pro
Visual Studio 2010 messes up visually
CC BY-SA 2.5
null
2011-03-30T18:27:43.953
2011-03-30T18:58:11.213
null
null
356,438
[ "wpf", "visual-studio", "visual-studio-2010" ]
5,490,638
1
5,490,938
null
48
26,194
I plotted a facet plot using `ggplot` and here is the plot ![http://i.stack.imgur.com/5qXF1.png](https://i.stack.imgur.com/uh9lm.png) The problem I have is, The facets(labels) are sorted alphabetically (Ex: E1, E10, E11,E13, E2, E3, I1, I10, I2) but I need them to be a custom order like E1, I1, E2, I2, E3, E10, I10, E11, E13. How can I do that ?
How to change the order of facet labels in ggplot (custom facet wrap labels)
CC BY-SA 4.0
0
2011-03-30T18:37:24.757
2019-02-02T13:42:48.330
2019-02-02T13:42:48.330
10,323,798
622,236
[ "r", "ggplot2" ]
5,490,870
1
null
null
-1
1,095
I have mentioned within the code below what I am looking for: About 17 rows from the bottom. ``` public void createHotTubs() { hotTubs = new JPanel(); hotTubs.setLayout(null); labelTubStatus = new JTextArea(6, 30); hotTubs.add(labelTubStatus); JLabel lengthLabel = new JLabel( "Length of hot tub(ft):"); lengthLabel.setBounds(10, 15, 260, 20); hotTubs.add(lengthLabel); hotTubLengthText = new JTextField(); hotTubLengthText.setBounds(180, 15, 150, 20); hotTubs.add(hotTubLengthText); JLabel widthLabel = new JLabel( "Width of hot tub(ft):"); widthLabel.setBounds(10, 40, 260, 20); hotTubs.add(widthLabel); hotTubWidthText = new JTextField(); hotTubWidthText.setBounds(180, 40, 150, 20); hotTubs.add(hotTubWidthText); JLabel depthLabel = new JLabel( "Average depth the hot tub(ft):"); depthLabel.setBounds(10, 65, 260, 20); hotTubs.add(depthLabel); hotTubDepthText = new JTextField(); hotTubDepthText.setBounds(180, 65, 150, 20); hotTubs.add(hotTubDepthText); JLabel volumeLabel = new JLabel("The hot tub volume is:(ft ^3"); volumeLabel.setBounds(10, 110, 260, 20); hotTubs.add(volumeLabel); hotTubVolumeText = new JTextField(); hotTubVolumeText.setBounds(180, 110, 150, 20); hotTubVolumeText.setEditable(false); hotTubs.add(hotTubVolumeText); final JRadioButton rdbtnRoundTub = new JRadioButton("Round Tub"); rdbtnRoundTub.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { hotTubWidthText.setEditable(false); } }); rdbtnRoundTub.setSelected(true); rdbtnRoundTub.setBounds(79, 150, 109, 23); hotTubs.add(rdbtnRoundTub); JRadioButton rdbtnOvalTub = new JRadioButton("Oval Tub"); rdbtnOvalTub.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { hotTubWidthText.setEditable(true); } }); rdbtnOvalTub.setBounds(201, 150, 109, 23); hotTubs.add(rdbtnOvalTub); ButtonGroup radioBtnGroup = new ButtonGroup(); radioBtnGroup.add(rdbtnRoundTub); radioBtnGroup.add(rdbtnOvalTub); JButton btnCalculateVlmn = new JButton("Calculate Volume"); btnCalculateVlmn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { double width = 0, length = 0, depth = 0, volume = 0; String lengthString, widthString, depthString; lengthString = hotTubLengthText.getText(); widthString = hotTubWidthText.getText(); depthString = hotTubDepthText.getText(); depth = Double.valueOf(depthString); length = Double.valueOf(lengthString); width = Double.valueOf(widthString); try { if (rdbtnRoundTub.isSelected()) { /* THIS IS WHERE THE WIDTH FIELD NEEDS TO EQUAL THE LENGTH FIELD */ volume = length * width * depth; } else { volume = Math.PI * length * width / 4 * depth; } DecimalFormat formatter = new DecimalFormat("#,###,###.###"); hotTubVolumeText.setText("" + formatter.format(volume)); } catch (NumberFormatException e) { labelTubStatus .setText("Enter all three numbers!!"); } } }); ``` ![After a user enters a number for the length it automatically enters it into the width field.](https://i.stack.imgur.com/3P0qT.png)
JTextField equals another JTextField
CC BY-SA 2.5
null
2011-03-30T18:58:09.643
2011-12-14T16:01:16.557
2011-12-14T16:01:16.557
203,657
640,015
[ "java", "swing" ]
5,491,047
1
5,516,772
null
4
778
I have a composite structure in my domain where the leaf node (Allocation) has a DurationChanged event that I would like to use at the top of my presentation layer view model structure (in the TimeSheetViewModel), and I am wondering what the best way is to get to it. Options that come to mind include: 1. Subscribe to it in the TimeSheetComposite. Each composite is ultimately composed of Allocations, and the TimeSheetComposite is the Model to the TimeSheetViewModel. It seems I would also need an event in the TimeSheetComposite that gets fired when a child DurationChanged event is fired; the TimeSheetViewModel would subscribe to the latter event. 2. Ignore the DurationChanged event and just follow the INPC chain that bubbles up to the TimeSheetViewModel when AllocationViewModel.Amount is changed. I wouldn't have a useful piece of information, specifically the old Amount prior to the edit, but I can calculate the needed end results cheaply enough if necessary. 3. Make the DurationChanged event a Domain Event; I do not currently use domain events, but I sure like the concept and it looks like there is enough code in Udi's article to get started with it. 4. Set up some sort of Event Aggregator to publish & subscribe to DurationChanged. I am not very sure yet what the difference is yet between Domain Events and Event Aggregators are, and whether they are complimentary or alternative approaches to solving the same thing. The implementation here using Rx looks promising. In this design, the TimeSheetViewModel needs to know when an Allocation.Duration has changed so it can get a new total of all allocation durations by date. How would you provide the DurationChanged notice? Cheers, Berryl # Domain Composite structure & event ![enter image description here](https://i.stack.imgur.com/KB3y6.png) # Presentation layer structure ![enter image description here](https://i.stack.imgur.com/nYr1o.png)
Domain Events v Event Aggregator v... other
CC BY-SA 2.5
0
2011-03-30T19:12:54.200
2011-04-02T14:26:53.727
2011-03-30T20:20:59.357
95,245
95,245
[ "event-handling", "domain-driven-design", "eventaggregator", "domain-events" ]
5,491,076
1
5,491,190
null
3
10,219
In the winforms we have a property called continuous that will show the progress bar from 0 till it hits 100. I was looking for the same effect in WPF but from what I searched it leaded me to change the to true which doesnt give me the continuous effect only a weird effect of the part of the progressbar walking around. To display an example of what I am talking about, the below image represents the continuous effect I am after: ![Ilustrative example](https://i.stack.imgur.com/aPE4M.gif) Back to the question, how do I do that in WPF ?
Continuous progressbar in WPF?
CC BY-SA 3.0
null
2011-03-30T19:15:09.887
2012-03-15T13:47:43.227
2012-03-15T13:47:43.227
5,662
342,740
[ "c#", "wpf", "progress-bar" ]
5,491,340
1
5,495,862
null
10
5,918
I was using VisualVM to find where all the time was being spent for a particular call. I found that most the time was in a database call, but the profier shows that 85% of the time was java.lang.Object and only 15% in the DB Call. Am I reading something wrong? The columns with data are Time, Time (CPU), Invocations. ![Profiler](https://i.stack.imgur.com/ayqwE.png)
What the difference between Time and Time(CPU) in VisualVM
CC BY-SA 4.0
null
2011-03-30T19:34:36.560
2019-06-13T17:46:19.523
2019-06-13T17:46:19.523
367,685
367,685
[ "profiling", "visualvm" ]
5,491,422
1
null
null
0
843
I have created an iphone application which utilises the Kal framework within a tab bar environment. I create a new event using the EVENTKIT framework and it shows up to the user like this: ![enter image description here](https://i.stack.imgur.com/0ap8L.png) after you click done.. the event saves.. when I view the Kal calendar it shows 2 entries for the same event: ![enter image description here](https://i.stack.imgur.com/U3wEJ.png) I close the application, then open it again, it correctly shows the event entry in one cell.. but I don't understand why it shows the same event twice immediately after I add it.. Can anyone help? When I click the "Today" button it seems to reset/refresh the data and it works correctly.. I am currently trying to figure out how I could get it to refresh/reset every time an event is added.. Any help will be appreciated :)
Kal showing 2 cells for the same event
CC BY-SA 3.0
null
2011-03-30T19:41:55.663
2017-04-18T21:17:45.760
2017-04-18T21:17:45.760
1,630,604
625,567
[ "iphone", "uitableview", "calendar", "eventkit" ]
5,491,467
1
null
null
0
296
Following the directions here: [http://docs.djangoproject.com/en/1.3/ref/contrib/admin/actions/](http://docs.djangoproject.com/en/1.3/ref/contrib/admin/actions/) but there is no 'Action' panel to select anything. Also my 'Select All' checkbox doesn't work, may or may not be related. What should I look at to troubleshoot? ![enter image description here](https://i.stack.imgur.com/hVHjy.png)
No 'Actions' panel in Django Admin
CC BY-SA 2.5
null
2011-03-30T19:46:39.097
2011-11-18T18:35:46.480
2011-03-30T19:57:27.657
355,697
355,697
[ "django" ]
5,491,970
1
5,492,153
null
1
973
I'm trying to program a little game for Android, and when I draw the bitmap and animate it using Sprites, I can see a trail in the image! (it's a PNG image). I know it is not a problem of the sprites, because I used a static image moving along the X axis and I could still see the trail ![trail of the animation](https://i.stack.imgur.com/dVtml.png) This is the code I used to load the image: ``` bmp = BitmapFactory.decodeResource(getResources(), R.drawable.image); ``` How can I eliminate it so I can only see one of the sprites every time? Thank you very much in advance!
Image trail when moving bitmap in Android
CC BY-SA 2.5
null
2011-03-30T20:28:53.140
2011-03-30T21:09:26.710
null
null
257,948
[ "android", "graphics", "animation", "sprite" ]
5,492,129
1
5,493,010
null
3
4,305
> [drop shadow only bottom css3](https://stackoverflow.com/questions/5460129/drop-shadow-only-bottom-css3) With CSS3, how would one make a drop shadow only appear on the bottom edge of a DIV? I would like it to work in FF4, IE9, C10. ![drop shadow](https://i.stack.imgur.com/q1gkR.png) Setting a positive Y-offset doesn't quite look right - I can still see faint remnants of the shadow the other edges and the shadow on the bottom edge is too stiff.
Drop shadow only on one edge
CC BY-SA 2.5
0
2011-03-30T20:42:04.590
2011-03-30T22:23:00.990
2017-05-23T12:18:33.183
-1
459,987
[ "css" ]
5,492,456
1
5,492,730
null
-2
576
I have one abstract `class1` which has abstract `method1()`. `Class2` implements `class2` and overrides `method1()`. `Class3` extends `class2` and overrides `method1()`. Which of the two solutions in the image is the correct one according to UML? ![uml](https://i.stack.imgur.com/d9qJg.jpg)
UML abstraction
CC BY-SA 3.0
null
2011-03-30T21:10:27.710
2012-10-09T17:15:42.663
2012-10-09T17:15:42.663
null
672,305
[ "oop", "uml" ]
5,492,523
1
5,492,561
null
0
202
The rollover's uses one image for the hover. It's cool, but I don't know how to get it to work in a horizontal menu. What do I do? ``` <head> <style> /*CSS HOVER WITH ONE IMAGE*/ #emailUs{display: block;width: 107px;height: 23px;background: url("slide.jpg") no-repeat 0 0;} #emailUs:hover{background-position: 0 -23px;} #emailUs span{position: absolute;top: -999em;} </style> </head> <body> <!--Trying to get three buttons to go across 'same button as example'--> <a id="emailUs" href="#" title="Email Us"><span>Email Us</span></a> <a id="emailUs" href="#" title="Email Us"><span>Email Us</span></a> <a id="emailUs" href="#" title="Email Us"><span>Email Us</span></a> </body> </html> </html> ``` CSS SPRITE ![enter image description here](https://i.stack.imgur.com/e2q0t.jpg)
Horizontal nav with CSS rollover
CC BY-SA 4.0
null
2011-03-30T21:16:49.350
2018-05-16T13:26:46.900
2018-05-16T13:26:46.900
1,033,581
643,573
[ "html", "css", "css-sprites" ]
5,493,071
1
null
null
6
3,523
IE9 render checkboxes all stretched and ALL other browsers keep the size of the checkbox but expand a click able invisible area. Can this behavior be disabled in IE9, via css, without changing the behavior of other browser (invisible area)? This seems to be impossible to have the normal checkbox. Even by selecting other compatibility mode. I have Windows Vista SP2, 64bits, IE 9.0.8112.16421. Tested on 2 computers with about the same configuration. ![enter image description here](https://i.stack.imgur.com/gvAse.jpg) ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset=utf-8> <title>IE IS GREAT?</title> <style> body { } #test_checkbox { width: 300px; height: 300px; } </style> </head> <body> <div id="test_box"> <input type="checkbox" id="test_checkbox" /> </div> </body> </html> ```
IE 9 Checkbox Sizing
CC BY-SA 3.0
0
2011-03-30T22:11:00.023
2013-11-30T17:36:58.583
2013-11-30T17:36:58.583
457,015
457,015
[ "css", "html", "cross-browser", "internet-explorer-9" ]
5,493,085
1
5,493,228
null
2
1,487
Can anyone explain how the line of sight works in 2d? Which will be really help full for my 2d experiments. The experiment am working is a simple 2d simulation. Player move in the world from one place to other , [my world exactly looks like this](http://bit.ly/gM7uRM). I did the character movement successfully from one way point to other (A to G) , my goal is - when the character passes each point it has to perform some search in that area before it leaves to next point. To achieve I felt way point is better solution , can anyone help me on this.Thanks! Edit : As soon as the player enters a room/checkpoint I will take user to next scene [like this](http://3dmented.typepad.com/photos/uncategorized/flow1.jpg) ![enter image description here](https://i.stack.imgur.com/0dBof.jpg) where the pickups are place some where on the canvas and my player have to collect them all and leave the area - Back to Map scene.
line of sight 2d
CC BY-SA 2.5
0
2011-03-30T22:12:21.150
2011-03-31T06:32:44.590
2011-03-31T06:32:44.590
488,156
488,156
[ "flash", "artificial-intelligence", "2d" ]
5,493,115
1
5,493,133
null
2
377
I have a password element which I use for signing in process. But, I get this weird username and password once the page gets opened !! ![enter image description here](https://i.stack.imgur.com/0gify.png) but the problem is when I don't user password element but only input I don't get this weird username and password, what should I do to make them blank? Here's the code ``` echo" <center><small> <br /> &nbsp; &nbsp; <p> Welcome Guest you can sign in here:</p></br> <form action = \"HomeWork.php\" method = \"post\"> User name*: <input type=\"text\" name=\"Username\" /> Password*: <input type=\"password\" name=\"Password\" />&nbsp; <a href=\"Signup.php\">or Sign up !</a> <br /> <br /> <input type=submit value=Submit align=\"middle\" /> </form> </small></center>"; ``` Can you help me??
Password input element problem
CC BY-SA 2.5
null
2011-03-30T22:14:40.593
2011-03-30T22:25:18.217
null
null
274,601
[ "php", "html" ]
5,493,146
1
5,516,932
null
4
998
I need some help with this simple animation on my Android phone. I'm a newbie with animation and graphics. I'm graphing accelerometer data as a sliding time series window. As new accelerometer data is read, its data is plotted on the right, pushing previous data to the left, as shown below: ![enter image description here](https://i.stack.imgur.com/cwbKZ.png) My program is running pretty smoothly, but I would like some help optimizing the animation. Here are my main concerns: 1. My current implementation reads all the accelerometer data in one thread and keeps the data in a fixed-size FIFO queue to capture the width of the time series window. I then use Timer.scheduleAtFixedRate() to plot out the entire contents of the queue so that the whole graph is re-drawn every 50 milliseconds. Can I improve upon this? Do I really need to re-draw the graph so often like this? In another similar program I've seen, each pixel column is copied to one pixel to the left, rippling down the graph; the newest data's column is drawn on the far-right pixel column. Is this better? 2. I redraw the legend (in the upper left) in the drawing thread that runs the draw function every 50 milliseconds. Is there any way to "keep" that legend in place instead of having to constantly re-draw it? Any other help would be appreciated. I have heard of optimizations like double-buffering but am clueless if that would help me.
Help me optimize this graph animation
CC BY-SA 2.5
null
2011-03-30T22:18:32.983
2011-04-01T17:46:41.723
null
null
4,561,314
[ "android", "graphics", "animation" ]
5,493,149
1
5,494,769
null
55
14,543
In applications like Windows Explorer and Internet Explorer, one can grab the extended frame areas beneath the title bar and drag windows around. For WinForms applications, forms and controls are as close to native Win32 APIs as they can get; one would simply override the `WndProc()` handler in their form, process the [WM_NCHITTEST](http://msdn.microsoft.com/en-us/library/ms645618%28VS.85%29.aspx) window message and trick the system into thinking a click on the frame area was really a click on the title bar by returning `HTCAPTION`. I've done that in my own WinForms apps to delightful effect. In WPF, I can also implement a similar `WndProc()` method and hook it to my WPF window's handle while extending the window frame into the client area, like this: ``` // In MainWindow // For use with window frame extensions private IntPtr hwnd; private HwndSource hsource; private void Window_SourceInitialized(object sender, EventArgs e) { try { if ((hwnd = new WindowInteropHelper(this).Handle) == IntPtr.Zero) { throw new InvalidOperationException("Could not get window handle for the main window."); } hsource = HwndSource.FromHwnd(hwnd); hsource.AddHook(WndProc); AdjustWindowFrame(); } catch (InvalidOperationException) { FallbackPaint(); } } private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { switch (msg) { case DwmApiInterop.WM_NCHITTEST: handled = true; return new IntPtr(DwmApiInterop.HTCAPTION); default: return IntPtr.Zero; } } ``` The problem is that, since I'm blindly setting `handled = true` and returning `HTCAPTION`, clicking but the window icon or the control buttons causes the window to be dragged. That is, everything highlighted in red below causes dragging. This even includes the resize handles at the sides of the window (the non-client area). My WPF controls, namely the text boxes and the tab control, also stop receiving clicks as a result: ![](https://i.stack.imgur.com/7J27H.png) What I want is for only 1. the title bar, and 2. the regions of the client area... 3. ... that aren't occupied by my controls to be draggable. That is, I only want these red regions to be draggable (client area + title bar): ![](https://i.stack.imgur.com/dhOoX.png) How do I modify my `WndProc()` method and the rest of my window's XAML/code-behind, to determine which areas should return `HTCAPTION` and which shouldn't? I'm thinking something along the lines of using `Point`s to check the location of the click against the locations of my controls, but I'm not sure how to go about it in WPF land. one simple way about it is to have an invisible control, or even the window itself, respond to `MouseLeftButtonDown` by invoking `DragMove()` on the window (see [Ross's answer](https://stackoverflow.com/questions/5493149/how-do-i-make-a-wpf-window-movable-by-dragging-the-extended-window-frame/5773515#5773515)). The problem is that for some reason `DragMove()` doesn't work if the window is maximized, so it doesn't play nice with Windows 7 Aero Snap. Since I'm going for Windows 7 integration, it's not an acceptable solution in my case.
How do I make a WPF window movable by dragging the extended window frame?
CC BY-SA 3.0
0
2011-03-30T22:18:51.920
2018-02-15T04:34:24.037
2017-05-23T10:29:18.757
-1
106,224
[ "c#", ".net", "wpf", "winapi", "windows-7" ]
5,493,509
1
5,496,511
null
0
409
how can I get rid of that SIP button in there? My form was supposed to be always on top, set via API SetWindowsPOS but that button still sits on top? Obviously, am not using any InputPanel as you can see there... ![](https://i.stack.imgur.com/I9dPF.jpg)
NETCF - Always on top form but SIP stays on top problem
CC BY-SA 2.5
null
2011-03-30T23:03:10.973
2011-03-31T07:26:15.150
null
null
277,522
[ "compact-framework" ]
5,493,885
1
null
null
1
464
Everything was running great in a project I have and I made a change to set code signing in my app and committed the project file to my local Git repository. Now I'm getting the errors shown in the attached screenshot. These errors only happen on the Debug configuration as I can do a test or archive (which use the Release configuration) with no problems. Any ideas? I'm stumped. Obviously XCode is having trouble writing the compiled binaries to the derived data folder but I'm not sure how to fix this. Does this have something to do with Git? I'm fairly new to XCode and this is the first project I've tried using Git on so I'm not very familiar with it either. Thanks in advance for any help. ![enter image description here](https://i.stack.imgur.com/8pL0V.png)
XCode 4 Build Problem
CC BY-SA 2.5
null
2011-03-31T00:03:41.263
2011-03-31T01:04:38.337
null
null
643,623
[ "compiler-construction", "build", "xcode4" ]
5,493,972
1
null
null
0
848
I am getting some wrong results and I couldn't locate any mistake in my code, so I was thinking if any of you can figure out if I am implementing this [Binomial-Lattice](http://en.wikipedia.org/wiki/Binomial_options_pricing_model) algorithm correctly or not. Here's what I am getting as results and what I expect from as my results: I start with `[S0,K,sigma,r,T,nColumn]=[1.5295e+009,6e+008,0.0023,0.12,20,15]` and I get `p=32.5955` , `price=-6.0e+18` and `BLOV_lattice` as shown in figure 1. 1. p is probability, so it should not be greater than 1. Even if I increase the nColumn to 1000, still the p is greater than 1 in the above actual results. 2. price should come out to be same as S0 , the number I start with in the first column, after backward induction i.e. there should be backwards-compatibility. ![enter image description here](https://i.stack.imgur.com/hso7s.jpg) ``` function [price,BLOV_lattice]=BLOV_general(S0,K,sigma,r,T,nColumn) % BLOV stands for Binomial Lattice Option Valuation %% Constant parameters del_T=T./nColumn; % where n is the number of columns in binomial lattice u=exp(sigma.*sqrt(del_T)); d=1./u; p=(exp(r.*del_T)-d)./(u-d); a=exp(-r.*del_T); %% Initializing the lattice Stree=zeros(nColumn+1,nColumn+1); BLOV_lattice=zeros(nColumn+1,nColumn+1); %% Developing the lattice %# Forward induction for i=0:nColumn for j=0:i Stree(j+1,i+1)=S0.*(u.^j)*(d.^(i-j)); end end for i=0:nColumn BLOV_lattice(i+1,nColumn+1)=max(Stree(i+1,nColumn+1)-K,0); end %# Backward induction for i=nColumn:-1:1 for j=0:i-1 BLOV_lattice(j+1,i)=a.*(((1-p).*BLOV_lattice(j+1,i+1))+(p.*BLOV_lattice(j+2,i+1))); end end price=BLOV_lattice(1,1); %% Converting the lattice of upper traingular matrix to a tree format N = size(BLOV_lattice,1); %# The size of the rows and columns in BLOV_lattice BLOV_lattice = full(spdiags(spdiags(BLOV_lattice),(1-N):2:(N-1),zeros(2*N-1,N))); ``` - Cox, John C., Stephen A. Ross, and Mark Rubinstein. 1979. "Option Pricing: A Simplified Approach." Journal of Financial Economics 7: 229-263.- E. Georgiadis, "Binomial Options Pricing Has No Closed-Form Solution". Algorithmic Finance Forthcoming (2011). - Richard J. Rendleman, Jr. and Brit J. Bartter. 1979. "Two-State Option Pricing". Journal of Finance 24: 1093-1110. doi:10.2307/2327237
Is my Matlab code correctly implementing this given algorithm?
CC BY-SA 2.5
null
2011-03-31T00:15:41.413
2011-04-29T22:22:18.627
2011-04-29T22:22:18.627
429,846
null
[ "algorithm", "matlab", "backwards-compatibility" ]
5,494,252
1
5,494,381
null
0
151
Basically, I have a live search that is working for the two out of 3 radio buttons. The "Professor", and the "Department" both work fine. But the "Course" radio code doesn't seem to be working. I don't get it. ![Professor](https://i.stack.imgur.com/EM2LU.png) ![Department](https://i.stack.imgur.com/0QrRU.png) ![Before I type anything in it gives me this](https://i.stack.imgur.com/cHwpV.png) ![If I type in "Eng" for "Engineering" or "English", I get lesser options, but still undefined](https://i.stack.imgur.com/Vk4rx.png) It seems the Ajax is working, but for some reason it isn't pulling these fields. The php was ``` function getDepartment($keywords){ $arr = array(); $query = mysql_query("SELECT dID, name FROM Department WHERE name LIKE '%". $keywords . "%'"); while( $row = mysql_fetch_array ( $query ) ) { $arr[] = array( "id" => $row["dID"], "name" => $row["name"]); } return $arr; } function getCourse($keywords){ $arr = array(); $query = mysql_query("SELECT cID, prefix, code FROM Course WHERE CONCAT(prefix,code) LIKE '%". $keywords . "%'"); while( $row = mysql_fetch_array ( $query ) ) { $arr[] = array( "id" => $row["cID"], "course" => $row["prefix"] . ' ' . $row["code"]); } return $arr; } ``` ![The columns in phpmyadmin](https://i.stack.imgur.com/4pk52.png) **Javascript ``` <!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>jQuery Search Demonstration</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".keywords").keyup(function(){ getData(); }); $(".table").click(function(){ getData(); }); }); function getData(){ $.post("search.php", { keywords: $(".keywords").val(), table: $('.table:checked').val() }, function(data){ $("div#content").empty(); var phppage; switch($('.table:checked').val()) { case 'professor': phppage = 'prof'; ext = '.php?pID='; break; case 'department': phppage = 'department'; ext = '.php?dID='; break; case 'course': phppage = 'course'; ext = '.php?cID='; break; } $.each(data, function(){ $("div#content").append("- <a href='" + phppage + ext + this.id + "'>" + this.name + "</a>"); }); }, "json"); } </script> </head> <body> Search by: <input type="text" name="search" class="keywords" /><br /> <input type="radio" name="table" class="table" value="professor" checked="checked" /> Professor<br /> <input type="radio" name="table" class="table" value="department" /> Department<br /> <input type="radio" name="table" class="table" value="course" /> Course<br /> <div id="content" style="background-color:#eee;"></div> </body> </html> ``` The one column "code" is a numerical value such as 153 or both "Prefix and "Code" together would be something like "INFO 153". Anyone? Does Ajax have a limit on the number of records it can pull? This course table maybe has 1200 courses, but why are they undefined?
Why isnt this php/ajax working?
CC BY-SA 3.0
null
2011-03-31T01:03:15.517
2017-02-20T09:40:33.427
2017-02-20T09:40:33.427
5,994,041
700,070
[ "php", "ajax" ]
5,494,342
1
5,494,392
null
10
9,191
So i have two images stored locally on an SD card in android and i want to combine them into one image. Its hard to explain so i going to link to a picture for a better example of how i want to take the first two images and combine them into the last. ![http://img850.imageshack.us/i/combinedh.jpg/](https://i.stack.imgur.com/iKgom.jpg)
Combine two images in android java
CC BY-SA 3.0
0
2011-03-31T01:19:53.930
2018-09-08T12:06:03.873
2014-04-03T07:28:56.197
2,649,012
569,027
[ "java", "android", "image", "image-processing" ]
5,494,458
1
5,510,886
null
1
1,205
I'm attempting to implement a dialog for a user to choose several of many toggle-able options. The iPhone has a nice model for this, in Settings/General/Keyboards: ![screenshot](https://i.stack.imgur.com/vfNug.jpg) However, I could not re-create this exactly: this task is to show two table sections (tables?), but only is editable. (The one with the keyboard list.) The Titanium API only allows a table to be editable, not a section. And I couldn't figure out how to layout two to scroll together. (I tried putting them both in a ScrollView, etc.) Anyone able to do something like this? EDIT: Here's my workaround, which I consider sub-optimal. :-( Instead of that second table section with the control element, I'm using a toolbar at the bottom: ![dialog](https://i.stack.imgur.com/eiAKJ.png)
Titanium iPhone: making a dialog similar to this standard iPhone ui?
CC BY-SA 2.5
null
2011-03-31T01:44:40.947
2011-04-01T10:22:12.393
2011-04-01T07:21:01.300
106,906
106,906
[ "iphone", "mobile", "dialog", "titanium", "appcelerator" ]
5,494,693
1
5,494,861
null
0
125
I want to achieve something like this: ![Look at my awesome 'mockuping' skills](https://i.stack.imgur.com/oIOuM.png) - - - Usually when I have floating images like A and B, I would put my container `position` as `relative`, and `obsolute` for the floating image, and that will do it, but I'm a little lost with the text here. This is just going to be used on webkit browsers, if that is of any use.
How to achieve this layout with CSS?
CC BY-SA 2.5
null
2011-03-31T02:22:26.190
2011-03-31T02:56:48.607
null
null
19,329
[ "html", "css" ]
5,494,960
1
5,495,102
null
0
582
I'm having an issue where IE7 simply will not display my DIV's properly..Firefox 3, Safari, Opera, Chrome, IE8 and even IE6 (with some JS help) display the page fine, but for some reason, in IE7 the footer seems to be...outside of the container. You can clearly see a gap between the footer and the #content div in the below screenshot. There is also some misalignment from the #information div down. ![IE7 div gap issue](https://i.stack.imgur.com/0WAXH.png) The link to the live site is: [http://chronologic.ath.cx](http://chronologic.ath.cx). I can almost guarantee the issue is caused by my complete lack of understanding of CSS, so I apologize for the messy bloated markup.
IE7 div (within a container) gap and misalisgnment problem
CC BY-SA 2.5
null
2011-03-31T03:12:55.853
2011-03-31T03:46:48.880
null
null
596,505
[ "css", "layout", "html", "internet-explorer-7" ]
5,494,949
1
5,494,967
null
3
844
Why input fields always 'over-run' the div that contain them when I set them to 100%? css, ``` .item-form { margin:0px 0px 10px 0px; clear:both; border:1px solid #999966; } .item-form input, .item-form textarea, { background-color:#ffffff; border: 1px solid #dddddd; width:100%; font-family:Arial, Helvetica, sans-serif; font-size:13px; padding:2px 2px 2px 2px; } ``` html, ``` <div class="item-form"> <input name="username" type="text" id="username" value="" title="USER NAME"/> </div> ``` output, ![enter image description here](https://i.stack.imgur.com/5B9EY.jpg) How can I fix it?? Thanks. I seem to have fixed the input fields issue, but then I came across another problem - , ``` .item-form { margin:0px 0px 10px 0px; padding:0px 6px 0px 0px; /** important **/ clear:both; } .item-form select{ border: 1px solid #dddddd; width:100%; /** a bug to fix **/ font-family:Arial, Helvetica, sans-serif; font-size:13px; padding:2px 2px 2px 2px; color:#999; } ``` Now the select fields are 'under-run'!! [](https://i.stack.imgur.com/1B2Ry.jpg) How do I fix this?? Thanks.
CSS: input field and select option bugs?
CC BY-SA 3.0
0
2011-03-31T03:11:41.323
2016-03-09T16:10:50.880
2016-03-09T16:10:50.880
2,174,085
413,225
[ "html", "css", "width", "input-field" ]
5,495,053
1
5,496,218
null
6
4,123
I have a `wx.ListCtrl` that has the `wx.LC_REPORT` bit set. It has 3 columns. I want the first column to be populated with a check box for each other entry. I tried using the `ListCtrl.InsertItem` method, but it only takes one argument (`info`) and I can't find any docs as to what that argument needs to be. I've tried just passing a `wx.CheckBox` to `InsertItem` to no avail. Is it possible to have a checkbox as an entry in a wxPython ListCtrl? If so, how would I go about doing that? In case there's any ambiguity as to what I'm talking about, here's a picture of what I want (not sure if this is wx, but it's what I'm looking for). I want the checkboxes next to 1..5 in the No. column. ![list control with checkboxes](https://i.stack.imgur.com/8mUDy.jpg)
Use arbitrary wx objects as a column in a wx.ListCtrl
CC BY-SA 2.5
0
2011-03-31T03:34:02.357
2011-03-31T06:53:22.387
null
null
399,815
[ "python", "wxpython", "listctrl" ]
5,495,065
1
5,495,287
null
8
3,032
I am very new to Cocoa and this is probably a complete newb question. I am frustrated to death however. I have an extremely simple Cocoa app (called "lines") to test sending 1000 lines of text to a text view. I started in Xcode 4 with "new Cocoa project" with all the defaults. This gives a blank window object upon which I can drag IB UI elements. The UI I then constructed consists of a Text View and a button on the window of a NIB file. I am using Xcode 4 to drag those two elements to the .h file. The text view is connected to `outView` and the "1000" button is connected to `one_thousand_button` method. ![The UI](https://i.stack.imgur.com/p8lRM.png) Clicking the button "1000" triggers a loop to print 1,000 lines of text ("line 1\n" "line 2\n" ... "line 1000") to the NSTextView called "outView" Here is the entire code (other than the .XIB file described): linesAppDelegate.h: ``` #import <Cocoa/Cocoa.h> @interface linesAppDelegate : NSObject <NSApplicationDelegate> { @private NSWindow *window; NSTextView *outView; } @property (assign) IBOutlet NSWindow *window; @property (assign) IBOutlet NSTextView *outView; - (IBAction)one_thousand_button:(id)sender; @end ``` linesAppDelegate.m: ``` #import "linesAppDelegate.h" @implementation linesAppDelegate @synthesize window; @synthesize outView; - (IBAction)one_thousand_button:(id)sender { NSString* oldString; NSString* newString; for(int i=1; i<=1000; i++){ oldString = [outView string]; newString = [oldString stringByAppendingString: [NSString stringWithFormat: @"Line %i\n",i]]; [outView setString: newString]; } } @end ``` This is REALLY SLOW to execute. Perhaps 7 seconds the first time and increasingly slow with each press of "1000". Even has the spinning colorful pizza of death! I realize that this is probably not the right way to fill a NSTextView with 1,000 lines of text and that the loop that read the contents of the text view and appends that with `stringByAppendingString` method is the bottleneck. What is the alternative method however? I wrapped this code: ``` mach_timebase_info_data_t info; mach_timebase_info(&info); uint64_t start = mach_absolute_time(); // timed code uint64_t duration = mach_absolute_time() - start; duration *= info.numer; duration /= info.denom; duration /= 1000000; NSLog(@"timed code took %lld milliseconds!", duration); ``` around the code from [Adam Preble](https://stackoverflow.com/questions/5495065/cocoa-real-slow-nstextview-is-there-a-better-way-to-append-text-to-the-contents/5495287#5495287), my original, and [drewk](https://stackoverflow.com/questions/5495065/cocoa-real-slow-nstextview-is-there-a-better-way-to-append-text-to-the-contents/5495177#5495177): ``` Adam Preble (Adam, base) drewk my pitiful code 1st run: 3ms 269ms 260ms 1,950ms 2nd run 3ms 269ms 250ms 2,332ms 3rd run: 2ms 270ms 260ms 2,880ms ``` The first run adds 1,000 lines; 2nd run adds another 1,000 lines, etc. (Adam, base) is his code without the `beginEditing` and `endEditing` It is clear that using `beginEditing` and `endEditing` is WAY faster! See the Apple documents on [Synchronizing Editing](http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/TextEditing/Tasks/BatchEditing.html).
Cocoa REAL SLOW NSTextView. Is there a better way to append text to the contents of NSTextView?
CC BY-SA 2.5
0
2011-03-31T03:36:07.630
2011-03-31T11:16:44.853
2017-05-23T12:31:59.927
-1
455,276
[ "objective-c", "cocoa", "macos" ]
5,495,208
1
null
null
0
246
I want to open file dialog in window application, but that file dialog should not be re-sizable, means that dialog can't re-size just as a fixed dialog. I have attached an images, want to remove re-sizable that is in red circle... I am using C#.net ![Open file dialog](https://i.stack.imgur.com/rc9EJ.jpg)
Open file dialog with fixed dialog formborder style
CC BY-SA 3.0
null
2011-03-31T04:01:58.150
2014-05-02T03:01:57.173
2014-05-02T03:01:57.173
321,731
484,111
[ "file", "dialog" ]
5,495,367
1
5,496,193
null
4
6,297
We are developing C# 4.0 windows based application using visual studio 2010. Now we want to make an installable version of the exe using clickonce to deploy our application. I am new to .NET platform. So, please give me a step by step procedure to use clickonce to deploy my application. While following steps :What should i need to given in Installation Folder URL Box(2 nd text Box): ![enter image description here](https://i.stack.imgur.com/0yuQk.png)
How to use ClickOnce to deploy my C#(4.0)Visual studio 2010 windows form based Application?
CC BY-SA 2.5
0
2011-03-31T04:34:58.653
2011-03-31T06:51:11.507
2011-03-31T06:32:23.903
452,680
452,680
[ "c#", ".net" ]
5,495,361
1
null
null
5
5,587
I’m developing a system to process financial transactions received by client merchants systems & it is a replacement of existing system which we have purchased from a vendor. Client interface should invoke the user authentication & transaction processing screens from our system. System functionality as follows, 1. Receive input parameters from the merchant’s site 2. Validate it 3. Authenticate users (users are registered with our system & we should invoke our login screen) 4. Process transaction 5. Return status response to merchant One the response is received client should validate the transaction data from the values reside in the session. System overview can be depicted as follows, ![enter image description here](https://i.stack.imgur.com/gsKWb.jpg) ([click here for full size image](https://i.stack.imgur.com/gsKWb.jpg)) My problem is client could not retain the session once we are responding to the client. But the same functionality could be achieved by the system that we have purchased from the vendor (we don’t have source code of this to analyse the internal coding structure). I hope something wrong with the way that we are responding to the client. How can I overcome this problem? We are using Java 1.4.2, Websphere application server
Session handling on Java EE application
CC BY-SA 3.0
null
2011-03-31T04:34:01.477
2015-12-08T22:15:59.657
2012-12-26T08:28:40.673
472,792
438,877
[ "java", "session", "servlets" ]
5,495,415
1
null
null
0
1,671
I am trying to create an item renderer for an AdvancedDataGrid, using a MXAdvancedDataGridItemRenderer. When I attach a sample custom item renderer (MXAdvancedDataGridItemRenderer) to hierarchical data in an AdvancedDataGrid the item renderer does not render the cell correctly. The custom renderer will only render as a hovered (highlighted) state if it also not selected. When the row is selected and hovered then the custom item renderer will only render the cell as selected. How can I get the custom renderer to recognize that is should render highlighted when the row is highlighted? The image below shows an example of this. The first row is selected and the mouse is over the second cell. As you can see the cell is rendered as 'selected' and not as 'hovered'. ![MXAdvancedDataGridItemRenderer background render issue](https://i.stack.imgur.com/SupWo.png) This is an example application: ``` <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var data:ArrayCollection = new ArrayCollection([ {label:"Fruit", children:[ {label:"Apple", price:1.5}, {label:"Banana", price:2}, {label:"Orange", price:1.75}]}, {label:"Drink", children:[ {label:"Water", price:0.5}, {label:"Milk", price:2.25}, {label:"Juice", price:1.25}]} ]); ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <mx:AdvancedDataGrid x="10" y="10" width="350" height="200" itemRenderer="TestItemRenderer"> <mx:dataProvider> <mx:HierarchicalData source="{data}"/> </mx:dataProvider> <mx:columns> <mx:AdvancedDataGridColumn headerText="Name" dataField="label"/> <mx:AdvancedDataGridColumn headerText="Price" dataField="price"/> </mx:columns> </mx:AdvancedDataGrid> </s:Application> ``` And this is the example MXAdvancedDataGridItemRenderer: ``` <?xml version="1.0" encoding="utf-8"?> <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true"> <s:Label id="lblData" top="0" left="0" right="0" bottom="0" text="{listData.label}" /> </s:MXAdvancedDataGridItemRenderer> ```
How to set hovered color in a MXAdvancedDataGridItemRenderer?
CC BY-SA 2.5
null
2011-03-31T04:43:47.307
2011-07-31T22:03:05.057
null
null
607,290
[ "flash", "apache-flex", "itemrenderer", "advanceddatagrid" ]
5,495,739
1
5,496,315
null
0
1,206
Hey all - I am trying to center 2 images on top of one another. It might be more prudent that I merge these 2 images together for the sake of 'ease of use' but right now I have 2 images - the text (logo.png) and the form (form.png). I would like them to look as such, aligned barely on top of one another - and have them centered on the screen hoping for them to scale and center according to screen size. Is there an easy method for this that I am overlooking? Here are my images and CSS: (Sorry I don't have a live demo, as my sample is on a local server - but I can upload both if it might help). The image is somewhat temporary - but the dimensions remain the same ![enter image description here](https://i.stack.imgur.com/nF3fg.jpg) ``` html{ background: url(images/bg4.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #main{ width: 875px; height: 350px; background: url(images/form.png) 0 0 no-repeat; position: relative; margin: 15% 0 0 25%; z-index: 1; } #main form { width: 1014px; height: 228px; background: url(images/logo.png) 0 0 no-repeat; position: absolute; margin: -210px 0 0 -175px; z-index: 2; } ``` With this code - I aim to center the images based on screen size, and have them scale accordingly. It works fine on my monitor but will go off-center on my smaller laptop. Much thanks for any help! (Also, there is no markup currently, I have this code in a `<style type="text/css">` tag in my index.html file)
centering and scaling set images in CSS - possible?
CC BY-SA 2.5
null
2011-03-31T05:42:36.160
2011-03-31T07:03:20.350
2011-03-31T05:44:56.210
334,545
496,686
[ "html", "css", "scalability", "center" ]
5,495,654
1
5,502,413
null
0
927
Ive made a few threads on this subject related to errors etc, but they've all done different things and I can't get the core data to work still. Ill fix one problem then theres another, etc. What is supposed to happen: User is in routineViewControler and clicks on + button in nav bar. UIAlert with text input comes up. User input text and it should become title for a new cell in the table and be saved using Core Data. It should be saved to "name" attribute (String) within the "Routine" entity. Right now it is not saving or it is not fetching. Here is my data model: ![enter image description here](https://i.stack.imgur.com/qNDER.png) AppDelegate: ``` #import "CurlAppDelegate.h" #import "ExcerciseNavController.h" #import "RoutineTableViewController.h" @implementation CurlAppDelegate @synthesize window=_window; @synthesize rootController; @synthesize excerciseNavController; @synthesize managedObjectContext=__managedObjectContext; @synthesize managedObjectModel=__managedObjectModel; @synthesize persistentStoreCoordinator=__persistentStoreCoordinator; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. [self.window addSubview:rootController.view]; [self.window makeKeyAndVisible]; return YES; } - (void)applicationWillResignActive:(UIApplication *)application { /* Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. */ } - (void)applicationDidEnterBackground:(UIApplication *)application { /* Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. */ } - (void)applicationWillEnterForeground:(UIApplication *)application { /* Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. */ } - (void)applicationDidBecomeActive:(UIApplication *)application { /* Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. */ } - (void)applicationWillTerminate:(UIApplication *)application { /* Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. */ } - (void)dealloc { [_window release]; [rootController release]; [excerciseNavController release]; [__managedObjectContext release]; [__managedObjectModel release]; [__persistentStoreCoordinator release]; [super dealloc]; } - (void)saveContext { NSError *error = nil; NSManagedObjectContext *managedObjectContext = self.managedObjectContext; if (managedObjectContext != nil) { if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { /* Replace this implementation with code to handle the error appropriately. abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button. */ NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } } #pragma mark - Core Data stack /** Returns the managed object context for the application. If the context doesn't already exist, it is created and bound to the persistent store coordinator for the application. */ - (NSManagedObjectContext *)managedObjectContext { if (__managedObjectContext != nil) { return __managedObjectContext; } NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { __managedObjectContext = [[NSManagedObjectContext alloc] init]; [__managedObjectContext setPersistentStoreCoordinator:coordinator]; } return __managedObjectContext; } /** Returns the managed object model for the application. If the model doesn't already exist, it is created from the application's model. */ - (NSManagedObjectModel *)managedObjectModel { if (__managedObjectModel != nil) { return __managedObjectModel; } NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"Curl" withExtension:@"momd"]; __managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; return __managedObjectModel; } /** Returns the persistent store coordinator for the application. If the coordinator doesn't already exist, it is created and the application's store added to it. */ - (NSPersistentStoreCoordinator *)persistentStoreCoordinator { if (__persistentStoreCoordinator != nil) { return __persistentStoreCoordinator; } NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Curl.sqlite"]; NSError *error = nil; __persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { /* Replace this implementation with code to handle the error appropriately. abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button. Typical reasons for an error here include: * The persistent store is not accessible; * The schema for the persistent store is incompatible with current managed object model. Check the error message to determine what the actual problem was. If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory. If you encounter schema incompatibility errors during development, you can reduce their frequency by: * Simply deleting the existing store: [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil] * Performing automatic lightweight migration by passing the following dictionary as the options parameter: [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details. */ NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } return __persistentStoreCoordinator; } #pragma mark - Application's Documents directory /** Returns the URL to the application's Documents directory. */ - (NSURL *)applicationDocumentsDirectory { return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; } @end ``` RoutineViewController: ``` #import "RoutineTableViewController.h" #import "AlertPrompt.h" #import "Routine.h" #import "CurlAppDelegate.h" @implementation RoutineTableViewController @synthesize tableView; @synthesize eventsArray; @synthesize managedObjectContext; - (void)dealloc { [managedObjectContext release]; [eventsArray release]; [super dealloc]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } -(void)addEvent:(NSString *)name { CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate]; NSManagedObjectContext *context = [curlAppDelegate managedObjectContext]; Routine *routine = (Routine *)[NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:context]; NSManagedObject *newRoutineEntry; newRoutineEntry = [NSEntityDescription insertNewObjectForEntityForName:@"Routine" inManagedObjectContext:context]; NSError *error = nil; if (![context save:&error]) { // Handle the error. } NSLog(@"%@", error); [eventsArray insertObject:routine atIndex:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; [self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES]; } #pragma mark - View lifecycle - (void)viewDidLoad { CurlAppDelegate *curlAppDelegate = [[UIApplication sharedApplication] delegate]; NSManagedObjectContext *context = [curlAppDelegate managedObjectContext]; NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Routine" inManagedObjectContext:context]; [request setEntity:entity]; NSError *error = nil; NSMutableArray *mutableFetchResults = [[context executeFetchRequest:request error:&error] mutableCopy]; if (mutableFetchResults == nil) { // Handle the error. } [self setEventsArray:mutableFetchResults]; [mutableFetchResults release]; [request release]; UIBarButtonItem * addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showPrompt)]; [self.navigationItem setLeftBarButtonItem:addButton]; [addButton release]; UIBarButtonItem *editButton = [[UIBarButtonItem alloc]initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit)]; self.navigationItem.rightBarButtonItem = editButton; [editButton release]; [super viewDidLoad]; } -(void)toggleEdit { [self.tableView setEditing: !self.tableView.editing animated:YES]; if (self.tableView.editing) [self.navigationItem.rightBarButtonItem setTitle:@"Done"]; else [self.navigationItem.rightBarButtonItem setTitle:@"Edit"]; } -(void)showPrompt { AlertPrompt *prompt = [AlertPrompt alloc]; prompt = [prompt initWithTitle:@"Add Workout Day" message:@"\n \n Please enter title for workout day" delegate:self cancelButtonTitle:@"Cancel" okButtonTitle:@"Add"]; [prompt show]; [prompt release]; } - (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { if (buttonIndex != [alertView cancelButtonIndex]) { NSString *entered = [(AlertPrompt *)alertView enteredText]; if(eventsArray && entered) { [eventsArray addObject:entered]; [tableView reloadData]; [self addEvent]; } } } - (void)viewDidUnload { self.eventsArray = nil; [super viewDidUnload]; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; } - (void)viewDidDisappear:(BOOL)animated { [super viewDidDisappear:animated]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [eventsArray count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellEditingStyleDelete reuseIdentifier:CellIdentifier] autorelease]; Routine* myRoutine = [self.eventsArray objectAtIndex:indexPath.row]; cell.textLabel.text = name; return cell; } // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the managed object at the given index path. NSManagedObject *eventToDelete = [eventsArray objectAtIndex:indexPath.row]; [managedObjectContext deleteObject:eventToDelete]; // Update the array and table view. [eventsArray removeObjectAtIndex:indexPath.row]; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; // Commit the change. NSError *error = nil; if (![managedObjectContext save:&error]) { // Handle the error. } } } /* // Override to support rearranging the table view. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { } */ /* // Override to support conditional rearranging of the table view. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the item to be re-orderable. return YES; } */ #pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. /* <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; // ... // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; */ } @end ```
How Do I Get Core Data To Save /Fetch My Files?
CC BY-SA 2.5
null
2011-03-31T05:26:49.600
2011-03-31T15:34:38.187
null
null
null
[ "iphone", "objective-c", "xcode", "core-data" ]
5,495,767
1
5,497,454
null
2
2,178
In iPhone App i am using core Plot vertical bar chart. How to Remove shadow effect in Vertical Bars? Here as shown in figure bars are displaying with shadow ![enter image description here](https://i.stack.imgur.com/MTQN6.png) Here is the code: CPBarPlot *barPlot = [CPBarPlot tubularBarPlotWithColor:[CPColor colorWithComponentRed:111 green:129 blue:113 alpha:1.0] horizontalBars:NO]; barPlot.shadowColor=NO; How can I remove this shadow effect? Please Help and Suggest. Thanks
CorePlot Remove bar shadow effect
CC BY-SA 2.5
0
2011-03-31T05:47:49.690
2014-07-02T05:50:01.217
2011-03-31T08:52:15.587
531,783
531,783
[ "iphone", "objective-c", "cocoa-touch", "ios4", "core-plot" ]
5,495,928
1
5,506,451
null
23
17,141
How do i create this kind of views in my application? (The screenshot is actually of an android application available in android market). ![enter image description here](https://i.stack.imgur.com/CTzNX.jpg) I am confused as i assume that we can create the same kind of layout either by using Gridview or by using ListView. ## Problems: - - From your expert side, please suggest me a possible solution to design and create the same kind of layouts for the android application.
Android - Gridview or listview?
CC BY-SA 3.0
0
2011-03-31T06:12:47.907
2012-06-29T05:45:00.047
2011-11-02T18:02:15.090
540,162
379,693
[ "android", "android-listview", "android-gridview" ]
5,496,180
1
5,496,402
null
5
3,885
i have added two buttons in stackpanel and set alignment as shown in the code ``` <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <Button Content="Button" Height="64" Name="button1" Width="160" HorizontalAlignment="Left" VerticalAlignment="Top"/> <Button Content="Button" Height="64" Name="button2" Width="160" HorizontalAlignment="Right" VerticalAlignment="Top"/> </StackPanel> ``` but this doesn't match with my requirement. I want it to be like shown in image below. ![enter image description here](https://i.stack.imgur.com/yIFjS.png) So how can i do this?
How to align button on stackpanel in windows phone 7?
CC BY-SA 2.5
null
2011-03-31T06:48:30.450
2011-03-31T19:53:14.193
2011-03-31T08:52:22.720
17,516
665,983
[ "silverlight", "windows-phone-7" ]
5,496,221
1
null
null
-1
11,074
I have developed Excel-2007 Add-Ins using vb.net. and its working fine. but when we open the older sheet created using this add ins it shows the "Print_Area Name conflict" error. plz can any one suggest how i solve this issue. screen shot attached. ![Error Image](https://i.stack.imgur.com/1TbYl.png) Thanks Mitesh
Print_area name conflict excel-2007 Add-ins VB.Net
CC BY-SA 2.5
null
2011-03-31T06:53:35.467
2020-07-20T15:37:40.947
2018-07-15T13:08:20.460
8,112,776
397,636
[ "excel", "vb.net", "vsto", "excel-addins", "shared-addin" ]
5,496,352
1
null
null
0
355
I have a UIWebView with black background and white (light gray) text. It's almost unusable while selecting text to copy, because the "mirror" is on white background color by default. Is there any way how to change this behavior? Screenshot: ![enter image description here](https://i.stack.imgur.com/7gbEU.png)
How to change colors in the mirror while copying text in UIWebView on iPhone
CC BY-SA 2.5
null
2011-03-31T07:08:17.460
2015-05-31T11:50:54.680
null
null
183,112
[ "objective-c", "ios4", "uiwebview", "copy-paste" ]
5,496,541
1
5,496,642
null
0
578
i am trying to implement facebook in android. I am following this tutorials. [tutorial](http://developers.facebook.com/docs/guides/mobile/#android) i got stuck at one point,![enter image description here](https://i.stack.imgur.com/rSkgN.png) i hv to execute this keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 but running it on cmd prompt is not working for me. This tool generates a string that must be registered in the Mobile & Devices section of the Developer App for app. BUt i am not able to generate it. plz,guide me to generate this. Appreciate it
Facebook implementation in android
CC BY-SA 2.5
0
2011-03-31T07:29:17.713
2011-03-31T07:40:36.083
2011-03-31T07:34:12.103
329,637
1,497,488
[ "android" ]
5,496,573
1
5,498,940
null
45
46,996
Xcode 3 had a very good feature of horizontal and vertical split screen wherein you could have worked on multiple files in the same window. xCode 4 has a split screen feature in the Editor but I think there are two things lacking: 1. Inability to switch files in the second window through project navigator (left pane). 2. Cannot split the main screen horizontally. Any ideas on how this can be achieved? ![The split feature](https://i.stack.imgur.com/zDWeK.png) Thanks, Raj
Xcode 4 + split screen feature
CC BY-SA 3.0
0
2011-03-31T07:33:12.320
2016-04-25T23:48:32.850
2015-03-19T18:54:21.933
902,968
260,665
[ "xcode4" ]
5,496,866
1
5,496,953
null
0
1,999
I want to make a dialog pop up when i click on a table row, but it doesnt work.(primefaces components p:dataTable and p:dialog) Also it looks like the selectioMode doesnt work correctly. Why is this happening? The JSF page: ``` <!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" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:p="http://primefaces.prime.com.tr/ui"> <ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"> <ui:define name="resultsForm2"> <h:form enctype="multipart/form-data"> <p:dataTable var="garbage" value="#{resultsController.allGarbage}" dynamic="true" paginator="true" paginatorPosition="bottom" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="5,10,15" selection="#{resultsController.selectedGarbage}" selectionMode="single" onRowSelectStart="fileDialog.show()"> <p:column> <h:outputText value="#{garbage.filename}"/> </p:column> </p:dataTable> </h:form> <p:dialog widgetVar="fileDialog"> <h:outputText value="Dialog open"/> </p:dialog> </ui:define> </ui:composition> </html> ``` Here the managed bean: ``` @ManagedBean @ViewScoped public class ResultsController implements Serializable{ @EJB private ISearchEJB searchEJB; private Garbage garbage; private List<Garbage> allGarbage; private Garbage selectedGarbage; public List<Garbage> getAllGarbage() { allGarbage = new ArrayList<Garbage>(); for(Garbage g :searchEJB.findAllGarbage()) { allGarbage.add(g); } return allGarbage; } public void setAllGarbage(List<Garbage> allGarbage) { this.allGarbage = allGarbage; } public Garbage getGarbage() { return garbage; } public void setGarbage(Garbage garbage) { this.garbage = garbage; } public void onRowSelect(SelectEvent event){ garbage = (Garbage)event.getObject(); } public Garbage getSelectedGarbage() { return selectedGarbage; } public void setSelectedGarbage(Garbage selectedGarbage) { this.selectedGarbage = selectedGarbage; } ``` Also notice that in the output i can see the values but when i click on a row it gets colored but no dialog pops up(Also i looks like i can click on more than one row, that is not supposed to be like that since i use selectionMode="single"): ![enter image description here](https://i.stack.imgur.com/OPBfl.png)
Why this dialog doesn't pop up?(JSF2.0+PRIMEFACES)
CC BY-SA 2.5
null
2011-03-31T08:06:18.410
2011-03-31T08:15:32.857
null
null
614,141
[ "java", "jsf", "jakarta-ee", "jsf-2", "primefaces" ]
5,496,933
1
5,498,150
null
1
6,554
I have tried the different examples on this site to get the list box / check box combo to change from the default gray when selected to another color to no avail. What I am trying to do in the end is if the item is checked, the background will be white, and when unchecked it will gray out. Here is what I have and any help would be appreciated. Update the resource to the comment below. The control has been updated to the reply and still not working, any ideas? ``` <ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding}" Name="lstSwimLane" SelectionMode="Multiple" Width="auto" Height="auto" Background="Transparent" BorderThickness="0" SelectionChanged="LstSwimLaneSelectionChanged"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="IsSelected" Value="{Binding Path=IsChecked, Mode=TwoWay}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxItem"> <Border x:Name="Border" SnapsToDevicePixels="true"> <ContentPresenter /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBrush}"/> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter TargetName="Border" Property="Background" Value="{StaticResource UnselectedBrush}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListBox.ItemContainerStyle> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Margin="3,3,3,3"> <CheckBox IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Checked="ChkFilterChecked" Unchecked="ChkFilterUnchecked" VerticalAlignment="Center" Margin="0,0,4,0" /> <TextBlock Text="{Binding Value}" VerticalAlignment="Center" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> ``` Note: The checked checkboxes and list item combination is still gray and the unchecked is white. Attached is a screen shot which seems to match the reply have below. I am stumped. ![screen shot](https://i.stack.imgur.com/8gG21.jpg) Here is the direct link in order to see the image bigger. [http://s1120.photobucket.com/albums/l489/nitefrog/?action=view&current=jw_0012011-03-311325.jpg](http://s1120.photobucket.com/albums/l489/nitefrog/?action=view&current=jw_0012011-03-311325.jpg) Here is the screen shot of the checkboxes. ![enter image description here](https://i.stack.imgur.com/9g9nO.jpg) [http://i1120.photobucket.com/albums/l489/nitefrog/jw_0022011-03-311345.jpg](http://i1120.photobucket.com/albums/l489/nitefrog/jw_0022011-03-311345.jpg) Even though the brushes are set, for some reason they are not being triggered. ![enter image description here](https://i.stack.imgur.com/U3IGy.jpg) Any ideas? Thanks.
wpf listbox checkbox change color when checked or selected
CC BY-SA 2.5
null
2011-03-31T08:14:04.360
2011-03-31T20:51:04.660
2011-03-31T20:51:04.660
329,494
329,494
[ "wpf", "checkbox", "listbox", "selecteditem", "listitem" ]
5,497,067
1
5,498,546
null
1
2,529
I am trying to enable the time field in the calendar component (as shown in the attached snapshot). I have set the date pattern value as below, but it doesn't enable the time field. ``` <rich:calendar value="#{calendarBean.selectedDate}" id="calendarID" datePattern="d/M/yy HH:mm" style="width:200px"/> ``` Is this the right way to enable the time field or am i missing something? I am using RichFaces 3.3.1 and JSF 1.2. ![enter image description here](https://i.stack.imgur.com/TawTw.png)
JSF Rich Calendar
CC BY-SA 2.5
null
2011-03-31T08:23:57.180
2011-03-31T10:39:43.827
null
null
596,465
[ "jsf", "calendar", "richfaces" ]
5,497,263
1
5,696,531
null
4
2,832
I can't understand what is the purpose of mentioning a float class to out put HTML code.. The problem am facing due to this rail feature is that next element come next to it instead of coming right after it. Is there any easy way to fix this instead of using JQuery or over write inpput to display it as integer/string.. To remove that class float.. Kindly reply ASAP.. `:as=>:float` need to change to `:as=>:string` Thanks.. ``` <%= f.association :resource, :required=>:true, %> <%= f.input :join_date,:as=>:string, :required=>:true, :input_html=>{:class=>'datepicker'} %> <%= f.association :resource_role, :required=>:true, :label=>"Role" %> <%= f.association :resource_billing_type, :required=>:true, :label=>"Billing Type" %> <%= f.input :billing_rate, :as=>:float, :required=>:true, %> ``` ![Image of Question](https://i.stack.imgur.com/5hcex.jpg)
SImple form input as float add float class
CC BY-SA 2.5
null
2011-03-31T08:44:24.867
2011-06-27T20:39:07.073
2011-04-03T15:45:08.803
51,683
617,374
[ "ruby-on-rails", "css", "ruby-on-rails-3" ]
5,497,459
1
5,709,369
null
0
801
I am using the code posted below to add Search bar to Navigation bar. I am getting everything to show up correctly but there is a background (mostly of the UIBarButtonItem that I am not able to get rid of). - Please check the screenshot for iPad. ![Screenshot for iPad](https://i.stack.imgur.com/myxV1.png) Is there a way to get rid of blue backgorund showing behind the search bar? Thanks Dev. ``` - (void) viewDidLoad { [super viewDidLoad]; UIView *hackView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, 250, 30)]; hackView.backgroundColor = [UIColor clearColor]; UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 250, 30)]; //[searchBar sizeToFit]; [searchBar setBackgroundColor:[UIColor clearColor]]; [hackView addSubview:searchBar]; [searchBar release]; UIBarButtonItem *hackItem = [[UIBarButtonItem alloc] initWithCustomView:hackView]; [hackItem setWidth:250]; self.navigationItem.rightBarButtonItem = hackItem; [hackView release]; [hackItem release]; } ```
Background showing when adding UISearchBar to UINavogationBar
CC BY-SA 2.5
null
2011-03-31T09:04:21.327
2011-12-12T07:51:45.363
null
null
154,967
[ "iphone", "uinavigationbar", "uisearchbar" ]
5,497,478
1
null
null
2
140
I have recently installed the Zend Framework on our server running IIS7 & PHP5. I have uploaded an application to the server built using the ZF. The Index controller renders fine; the `Zend_Form` login form is built as expected, which implies that the ZF install is working OK. However, when the login is performed, and `$this->_helper->redirector('index', 'reseller');` is called in the Index controller, I receive a 404 message from the server! Any ideas what could be causing this? Many thanks EDIT: The URL I'm being redirected to is (which is correct): ``` http://mydomain.co.uk/public/reseller ``` Physical path requested (this may be the problem!): ``` D:\vhosts\mydomain.co.uk\httpdocs\public\reseller ``` (This is the 'reseller' controller, 'index' action, that is part of the application). ![enter image description here](https://i.stack.imgur.com/61f5A.png)
Installed ZF on server, uploaded application, now receiving 404?
CC BY-SA 2.5
null
2011-03-31T09:05:46.813
2012-12-21T03:15:48.393
2012-12-21T03:15:48.393
367,456
484,099
[ "php", "zend-framework", "iis" ]
5,497,566
1
null
null
2
84
When debugging a asp.net web project from Visual Studio 2010, I notice in the solution explorer, there are such items as screenshot below. I don't know what they are and want to learn about them. All I can guess is that they are auto-generated client scripts created by IIS. My question: What is the key words to google search for this? ![enter image description here](https://i.stack.imgur.com/GyTAv.png)
What is this all about?
CC BY-SA 2.5
null
2011-03-31T09:12:57.690
2011-03-31T09:37:27.393
2011-03-31T09:30:31.340
493,521
248,616
[ "asp.net", "webresource.axd" ]
5,497,763
1
5,500,158
null
0
188
Regards to everybody here I am with another problem. I have some screens which basically have several search filters and search results are displayed accordingly in a table. Now I have orientation issues cause this search screen does not cover the full screen in landscape mode. Solutions that I came across: 1. Two xibs for same view but I'll loose data if I do so as this data will be in bulk so I can store it locally. 2. write lots of coordinate related code which is again cumbersome as there will be lots of search filters. 3. Autoresizemask -> not able to implement this upto expectations. (I tried this but was able to move the screen to the center but I wanted the complete view expanded resizefill something) Can anybody enlighten me on this so that screens can be prepared in standard ways. Thnx in advance. Refer the screen shots ![portrait mode](https://i.stack.imgur.com/LqduL.png) ![landscapemode](https://i.stack.imgur.com/Adj0t.png)
ipad:orientation issues
CC BY-SA 2.5
null
2011-03-31T09:30:38.367
2011-03-31T12:54:19.030
2011-03-31T12:07:16.320
195,504
195,504
[ "ipad", "uisplitviewcontroller" ]
5,497,770
1
5,497,830
null
3
10,579
i have one `tableview` with style grouped. in this i set background color `clearcolor` like this , `cell.backgroundColor =[UIColor blackColor];` now i want this cell transparent. may be i can do this with opacity. but in this how can i set opacity. i want same like this for cell background >> ![enter image description here](https://i.stack.imgur.com/c8vhn.png) here opacity . how can i do same this by coding in cell background ?
how to set background color + opacity in table view cell + style is grouped
CC BY-SA 3.0
0
2011-03-31T09:31:06.883
2021-03-02T07:42:28.313
2018-03-06T07:32:09.747
8,882,062
null
[ "iphone", "uitableview" ]
5,497,986
1
5,713,921
null
0
1,218
I have used `IsHighlighter` property of `InkCanvas` to create highlighter tool . In real life when we use highlighter it highlights on the top of our notebooks or books writing , but in `InkCanvas` i am not able to highlight on the top of Ink which i have previously drawn . I am creating application which have pen as well highlighter tool , now if i have to highlight some thing which i have drawin onto `InkCanvas` using pen highliter goes down to Ink . ![Check this image, in which i have pen as well highlighter](https://i.stack.imgur.com/XAFS1.png) here highlighter is highlighting bellow my pen's drawing. Any solutions?
Highlighter InkCanvas
CC BY-SA 2.5
null
2011-03-31T09:49:22.500
2011-04-19T08:58:19.977
2011-03-31T09:54:13.940
572,644
576,503
[ "c#", "wpf", "vb.net", "silverlight" ]
5,498,008
1
null
null
46
105,311
I'm trying to create a histogram with argument normed=1 For instance: ``` import pylab data = ([1,1,2,3,3,3,3,3,4,5.1]) pylab.hist(data, normed=1) pylab.show() ``` I expected that the sum of the bins would be 1. But instead, one of the bin is bigger then 1. What this normalization did? And how to create a histogram with such normalization that the integral of the histogram would be equal 1? ![enter image description here](https://i.stack.imgur.com/Mwj7z.png)
pylab.hist(data, normed=1). Normalization seems to work incorrect
CC BY-SA 2.5
0
2011-03-31T09:51:06.143
2022-11-07T16:50:56.267
2011-03-31T12:51:37.687
248,814
248,814
[ "python", "graph", "numpy", "matplotlib" ]
5,498,063
1
null
null
0
524
I have set up hudson to download the specific jdk and ant version my ant scripts uses. i have added "invoke ant" script under "build" on the project configuration page and set it to use the jdk and ant version i wanted. still, when building, all hudson does is to checkout from the svn and thats it, build successful. am i missing something ? thanks ! build log: > Started by user xxx.xxxUpdating http://............................... (i've omitted the path)U installation/antinstaller/resources/jboss.zip U server/db/analytics/sequences/SEQ_SUI_APPLICATIONS.sqlAt revision 18537Finished: SUCCESS here is my configuration page ![configuration page](https://i.stack.imgur.com/e6QGZ.jpg) ![build configuration](https://i.stack.imgur.com/0eRkL.jpg)
hudson ci doesn't run ant scripts when building
CC BY-SA 2.5
null
2011-03-31T09:55:42.453
2012-02-24T17:44:05.787
2011-03-31T13:22:59.757
599,912
599,912
[ "ant", "hudson", "java" ]
5,498,076
1
5,500,080
null
2
6,364
I have the following excel file ![enter image description here](https://i.stack.imgur.com/2ukXO.jpg) I set AdoConnection.ConnectionString to ``` AdoConnection.ConnectionString :=' Provider=Microsoft.Jet.OLEDB.4.0;' + 'Data Source=' +aFileName + ';' + 'Extended Properties=Excel 8.0;'; ``` where aFileName is the excel file name. After that, with an ADOQuery component(connection set to AdoConnection) I perform a 'select * from [Sheet1$]'. The problem is that rows 16802 and 17179 are not present in the query result,and I don't know why. All the fields from the sheet are set to general. I'm using Delphi 7. Do you have any ideas? LE:type of all the fields from the AdoQuery are WideString. In query are present only the rows where values from the last 2 columns have that 'green sign'. I'm not a genius in Excel, but the query should not get all the data existing in a sheet?
Delphi - Excel rows get by an ADO Query
CC BY-SA 2.5
0
2011-03-31T09:56:43.097
2011-03-31T12:58:08.700
2011-03-31T11:12:37.223
368,364
368,364
[ "delphi", "excel", "ado" ]
5,498,280
1
null
null
0
167
Please help on choosing the right way to use the entities in n-tier web application. At the present moment I have the following assembleis in it: ![enter image description here](https://i.stack.imgur.com/1Ncka.jpg) 1. The Model (Custom entities) describes the fields of the classes that the application use. 2. The Validation is validating the data integrity from UI using the reflection attributes method (checks data in all layers). 3. The BusinessLogicLayer is a business facade for additional logic and caching that use abstract data providers from DataAccessLayer. 4. The DataAccessLayer overrides the abstarct data providers using LinqtoSql data context and Linq queries. And here is the point that makes me feel i go wrong... My DataLayer right before it sends data to the business layer, maps (converts) the data retrieved from DB to the Model classes (Custom entities) using the mappers. It looks like this: internal static model.City ToModel(this City city) { if (city == null) { return null; } return new model.City { Id = city.CountryId, CountryId = city.CountryId, AddedDate = city.AddedDate, AddedBy = city.AddedBy, Title = city.Title }; } So the mapper maps data object to the describing model. Is that right and common way to work with entities or do I have to use the data object as entities (to gain a time)? Am I clear enough?
Please help on choosing the right arhitecture of n-tier web application
CC BY-SA 2.5
0
2011-03-31T10:17:56.407
2011-03-31T10:52:01.510
2011-03-31T10:26:55.187
70,386
599,617
[ "c#", "asp.net", "n-tier-architecture" ]
5,498,350
1
5,516,239
null
0
1,207
# update I have made this table: I have 2 array's UGentArray and InternshipsArray. How can I set these in my table? instead of "Row column 1 data" and "Row column 2 data". My question is: I want the values from UgentArray and InternshipArray as 2 columns under Each title UGentID and Internships ``` enter code here// Make table and display on screen. $tbl_header = array(); $tbl_header[] = array("data" => "UGentID"); $tbl_header[] = array("data" => "Internships"); $tbl_row = array(); foreach($studentUGentID as $key => $value) { for($i = 0; $i<count($value); $i++) { $tbl_row[] = $value[$i]['value']; } } $tbl_row[] = "Row column 2 data"; $tbl_rows = array(); $tbl_rows[] = $tbl_row; $html = theme_table($tbl_header,$tbl_rows); return $html;![enter image description here][1] ``` ![enter image description here](https://i.stack.imgur.com/IRbhY.png)
theme_table drupal development
CC BY-SA 2.5
null
2011-03-31T10:22:56.063
2011-04-01T16:35:22.607
2020-06-20T09:12:55.060
-1
642,760
[ "php", "drupal", "drupal-6", "drupal-modules", "drupal-7" ]
5,498,789
1
5,500,549
null
1
503
Im very new to Adobe Flex/Actionscript and am trying to create a person search application. So far I have my results showing as a horizontal list, but Id like to include an image above each name as my wonderful paint skills show: ![enter image description here](https://i.stack.imgur.com/0edUt.jpg) ``` /* listOfPeople is a list of arrays with a["name"] a["sex"] a["dob"] and a["image"] which is just a URI to the image */ <s:List width="100%" height="100%" id="results" dataProvider="{listOfPeople}" change="clickPerson(event)"> <s:itemRenderer> <fx:Component> <s:MobileIconItemRenderer iconField="{data.image}" iconHeight="100" iconWidth="100" label="{data.name} - {data.sex}" messageField="dob"/> </fx:Component> </s:itemRenderer> <s:layout> <s:HorizontalLayout paddingBottom="100" gap="6" paddingTop="100" paddingLeft="0" paddingRight="0" requestedColumnCount="-1" variableColumnWidth="true" verticalAlign="bottom" /> </s:layout> </s:List> ``` Any ideas? The iconField doesn't seem to show at all... even when using the full path with correct backslashes Cheers Phil EDIT: The image displays fine on the PersonDetails screen, when the person is clicked upon: ``` <s:HGroup verticalAlign="middle" gap="12" paddingTop="10" paddingLeft="10"> <s:Image source="{data.image}" height="170" width="170"/> <s:VGroup> <s:Label text="{data.name}"/> <s:Label text="{data.dOB}"/> <s:Label text="{data.sex}"/> <s:Label text="{data.birthplace}"/> <s:Label text="{data.colour} {data.ethnicity}"/> <s:Label text="{data.height}"/> </s:VGroup> </s:HGroup> ```
Images in Adobe Flex
CC BY-SA 2.5
null
2011-03-31T11:02:15.187
2011-03-31T13:27:08.633
2011-03-31T13:27:08.633
93,163
653,331
[ "apache-flex", "image", "mobile", "renderer", "flex4.5" ]
5,498,851
1
5,521,063
null
1
1,028
I want a jQuery horizontal tab pane (screenshot below) where clicking on a tab loads an external page in the div but where clicking on it after it is loaded does not load the page again. There are 7 tabs `Wall`, `Latest`, `Discussion`, `Poll`, `Club Message`, `Create`. ![http://i.stack.imgur.com/Y2tTx.jpg](https://i.stack.imgur.com/QwuhM.jpg) A demo can be seen here [http://www.web-shine.in/tabs/](http://www.web-shine.in/tabs/) I want the TAB to load the page once, and next time the user clicks on it, it should show the page from browser cache, not from the server. What is the best way to code this?
How to make a jQuery Horizontal Tab that loads the page once
CC BY-SA 3.0
0
2011-03-31T11:07:58.877
2013-08-19T04:59:28.910
2013-08-19T04:59:28.910
445,131
683,233
[ "jquery", "jquery-tabs" ]
5,499,037
1
null
null
1
304
I have this GUI: ![enter image description here](https://i.stack.imgur.com/Bd6xa.png) I would like after I enter a number in the Length of hot tub text box for that number to be automatically entered into the Width of hot tub text box, but only if the Round Tub radio button is selected. ``` public void createHotTubs() { hotTubs = new JPanel(); hotTubs.setLayout(null); labelTubStatus = new JTextArea(6, 30); hotTubs.add(labelTubStatus); JLabel lengthLabel = new JLabel( "Length of hot tub(ft):"); lengthLabel.setBounds(10, 15, 260, 20); hotTubs.add(lengthLabel); hotTubLengthText = new JTextField(); hotTubLengthText.setBounds(180, 15, 150, 20); hotTubs.add(hotTubLengthText); JLabel widthLabel = new JLabel( "Width of hot tub(ft):"); widthLabel.setBounds(10, 40, 260, 20); hotTubs.add(widthLabel); hotTubWidthText = new JTextField(); hotTubWidthText.setBounds(180, 40, 150, 20); hotTubs.add(hotTubWidthText); JLabel depthLabel = new JLabel( "Average depth the hot tub(ft):"); depthLabel.setBounds(10, 65, 260, 20); hotTubs.add(depthLabel); hotTubDepthText = new JTextField(); hotTubDepthText.setBounds(180, 65, 150, 20); hotTubs.add(hotTubDepthText); JLabel volumeLabel = new JLabel("The hot tub volume is:(ft ^3"); volumeLabel.setBounds(10, 110, 260, 20); hotTubs.add(volumeLabel); hotTubVolumeText = new JTextField(); hotTubVolumeText.setBounds(180, 110, 150, 20); hotTubVolumeText.setEditable(false); hotTubs.add(hotTubVolumeText); final JRadioButton rdbtnRoundTub = new JRadioButton("Round Tub"); rdbtnRoundTub.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { hotTubWidthText.setEditable(false); } }); rdbtnRoundTub.setSelected(true); rdbtnRoundTub.setBounds(79, 150, 109, 23); hotTubs.add(rdbtnRoundTub); JRadioButton rdbtnOvalTub = new JRadioButton("Oval Tub"); rdbtnOvalTub.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { hotTubWidthText.setEditable(true); } }); rdbtnOvalTub.setBounds(201, 150, 109, 23); hotTubs.add(rdbtnOvalTub); ButtonGroup radioBtnGroup = new ButtonGroup(); radioBtnGroup.add(rdbtnRoundTub); radioBtnGroup.add(rdbtnOvalTub); JButton btnCalculateVlmn = new JButton("Calculate Volume"); btnCalculateVlmn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { double width = 0, length = 0, depth = 0, volume = 0; String lengthString, widthString, depthString; lengthString = hotTubLengthText.getText(); widthString = hotTubWidthText.getText(); depthString = hotTubDepthText.getText(); depth = Double.valueOf(depthString); length = Double.valueOf(lengthString); width = Double.valueOf(widthString); try { if (rdbtnRoundTub.isSelected()) { volume = length * width * depth; } else { volume = Math.PI * length * width / 4 * depth; } DecimalFormat formatter = new DecimalFormat("#,###,###.###"); hotTubVolumeText.setText("" + formatter.format(volume)); } catch (NumberFormatException e) { labelTubStatus .setText("Enter all three numbers!!"); } } }); ```
Automatic entry in text field
CC BY-SA 2.5
null
2011-03-31T11:25:01.340
2011-03-31T12:14:57.767
2011-03-31T11:31:17.607
373,861
640,015
[ "java", "swing", "user-interface", "event-handling" ]