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
6,289,049
1
6,300,238
null
2
8,150
If there are more tree items based on the same object in the tree viewer, making a `TreePath` and passing it to `TreeViewer.setSelection()` does not select the item correctly when the current selection is equal to the one I want to navigate. Example: There's a tree with 2 items that show the same object (`BigDecimal.ONE` in this case). They have different paths (different parents): ![tree](https://i.stack.imgur.com/XZD91.png) I want that when I am on one `BigDecimal.ONE` item, to click on the link and navigate to the other `BigDecimal.ONE`. On the selection listener of the link I make a `TreeSelection` with a correct `TreePath`. Then I call `setSelection`. But the navigation does not work. However, if the root item is initially collapsed, I notice that it expands it, but does not navigate to the correct item. The code is this: ``` import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.viewers.*; import org.eclipse.jface.window.ApplicationWindow; import org.eclipse.jface.window.Window; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.*; public class TreeViewerExample { static class Model { String name; Number[] children; public Model(String name, Number... numbers) { this.name = name; this.children = numbers; } public String toString() { return name; } } static class ModelTreeProvider extends LabelProvider implements ITableLabelProvider, ITreeContentProvider { public Object[] getChildren(Object parentElement) { if (parentElement instanceof Model) { return ((Model) parentElement).children; } else { return new Object[0]; } } public Object getParent(Object element) { System.err.println("requesting the parent for " + element); return null; } public boolean hasChildren(Object element) { return getChildren(element) == null ? false : getChildren(element).length > 0; } public Object[] getElements(Object inputElement) { return (inputElement instanceof List)? ((List) inputElement).toArray():new Object[0]; } public void dispose() { } public void inputChanged(Viewer arg0, Object arg1, Object arg2) { } public String getColumnText(Object element, int columnIndex) { return element.toString(); } public Image getColumnImage(Object element, int columnIndex) { return null; } } public static void main(String[] args) { final List<Model> models = new ArrayList<Model>(); models.add(new Model("Zero and one", BigDecimal.ZERO, BigDecimal.ONE)); models.add(new Model("One and ten", BigDecimal.ONE, BigDecimal.TEN)); Window app = new ApplicationWindow(null) { private TreeViewer treeViewer; private Link link; protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new FillLayout()); treeViewer = new TreeViewer(composite); ModelTreeProvider provider = new ModelTreeProvider(); treeViewer.setContentProvider(provider); treeViewer.setLabelProvider(provider); treeViewer.setInput(models); treeViewer.getTree().addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (((TreeItem) e.item).getText().equals("1")) { link.setText("This is from "+((TreeItem) e.item).getParentItem().getText() + "\r\n<a href=\"go\">Go to the other " + ((TreeItem) e.item).getText() + "</a>"); } else { link.setText(" - "); } link.setData(e.item); } }); link = new Link(composite, SWT.NONE); link.setText(" - "); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { List<Object> path = new ArrayList<Object>(); if (treeViewer.getTree().indexOf(treeViewer.getTree().getSelection()[0].getParentItem()) == 0) {// if the first is selected, go to the second path.add(treeViewer.getTree().getItem(1).getData()); } else { path.add(treeViewer.getTree().getItem(0).getData()); } path.add(BigDecimal.ONE); treeViewer.setSelection(new TreeSelection(new TreePath(path.toArray())), true); } }); return composite; } }; app.setBlockOnOpen(true); app.open(); } } ``` My question is if this a jface bug or am I not doing this the right way? --- It looks that there is already a posted bug on eclipse.org: [https://bugs.eclipse.org/bugs/show_bug.cgi?id=332736](https://bugs.eclipse.org/bugs/show_bug.cgi?id=332736)
TreeViewer.setSelection() does not select the correct item after the path given
CC BY-SA 3.0
null
2011-06-09T06:46:27.900
2011-06-10T09:12:14.353
2011-06-10T09:12:14.353
137,483
137,483
[ "eclipse", "selection", "jface", "treeviewer" ]
6,289,155
1
6,289,486
null
0
4,005
The entire popup-div is visible, and when I scroll vertically, it follows. ![enter image description here](https://i.stack.imgur.com/DEZH1.png) Only half of the popup-div is visible, and when I scroll vertically it follows, but it's impossible to view the second part of the popup-div. ![enter image description here](https://i.stack.imgur.com/fOem5.png) css code: ``` .popup { position:fixed; z-index:9002; background-color:#FFFFFF; border:solid 1px #000000; top: 20%; left: 20%; overflow: auto; } .popupbackground { background-color:#111; opacity:0.65; filter:alpha(opacity=65); position:fixed; z-index: 500; top:0px; left:0px; width: 100%; height: 100%; } ``` I'm working with ASP.NET, if the code-behind is needed to answer this question I will provide it. I have read about solutions such as setting the overflow parameter to auto or scroll, but haven't gotten that to work. Update follows below: Now the popup is scrollable vertically as wanted, but only if the scrollbar is visible horizontally. ![enter image description here](https://i.stack.imgur.com/Pqhb0.png) Here, it's not possible to scroll vertically because the scrollbar is not visible, and scrolling horizontally in the browser just forces the popupdiv to follow along. ![enter image description here](https://i.stack.imgur.com/ObqAs.png)
Scroll on fixed position div
CC BY-SA 3.0
null
2011-06-09T06:57:54.860
2011-06-09T07:31:09.247
2011-06-09T07:17:00.180
463,833
463,833
[ "javascript", "css" ]
6,289,192
1
6,290,098
null
1
51
I have a class lib and I referenced it to another windows project. I added its namespace to my Form.cs (`using SaglikNetClassLib;`). they are seem unknown when I want to access to classes. I can see their properties and methods. But the complier says "Error 7 The type or namespace name 'SaglikNetClassLib' could not be found (are you missing a using directive or an assembly reference?), Do you have any suggestion? KR, Çağın ![enter image description here](https://i.stack.imgur.com/cEaNt.png)
Referenced class lib doesn't seem
CC BY-SA 4.0
0
2011-06-09T07:01:41.497
2018-05-22T16:04:08.177
2018-05-22T16:04:08.177
1,033,581
117,899
[ "c#", "visual-studio-2010", "class-library" ]
6,289,248
1
null
null
1
1,326
I am trying to create a login system thats generic so that it can be adapted for use in various apps. I decided that 2 main "parts" of the system will be User Meta Data & Roles/Resources/ACL. I thought of keeping most data like what meta data are available for users in the database, so that admins can manage them using some GUI. Problem is how can I then configue how I want inputs to render (textbox, checkbox, radios etc.). Then another problem is validation, filters. I think for simple ACL it will work fine. But suppose I want say users to be able to modify posts they own. In `Zend_ACL` that is accomplished with Assertions. I thought that will make a "simple" login system overlly complex? Also it will be hard to build I suppose? --- Currently I have my database like ![enter image description here](https://i.stack.imgur.com/X8FUe.gif)
Creating a User Login System: Put logic in Code or Database
CC BY-SA 3.0
null
2011-06-09T07:06:11.543
2011-06-10T12:14:26.720
null
null
637,041
[ "php", "mysql", "database-design" ]
6,289,344
1
6,289,505
null
0
443
I started reading about yesterday and came across the below slide. Site [link](http://www.jeetrainers.com/course/struts2_chapter1_wep_applications-2-1-1) ![enter image description here](https://i.stack.imgur.com/VCZqD.png) It gave a good picture of what can be done with struts2, I want if somebody can demonstrate the above image with an example working code for a simple CRUD webapp (with simple empid and empname in db) . This can turn out to be a nice tutorial for others too. Thanks
Basic struts 2 application for understanding
CC BY-SA 3.0
null
2011-06-09T07:16:11.347
2011-06-10T09:45:03.727
null
null
707,414
[ "java", "struts2" ]
6,289,526
1
6,289,740
null
4
2,169
So i have a ul list where i click a div above it and then i toggle it so i can slidedown/up the list... but when i slidedown the list on IE9 i see this weird effect below it: ![enter image description here](https://i.stack.imgur.com/CsQVe.jpg) this happens on slideUp my code looks like this: ``` $(".btn").click(function() { if ($(this).next().is(":visible")){ $(".slide_menu").slideUp("fast"); }else{ $(".slide_menu").slideUp("fast"); } }); ``` html looks like this: ``` <div class="btn">Button</a></div> <ul class="slide_menu"> <li><a href="http://domain.com">Link</a></li> </ul> ```
IE9 jquery slidedown effect issue
CC BY-SA 3.0
null
2011-06-09T07:36:16.753
2011-08-11T19:17:07.750
2011-06-09T07:41:38.490
705,926
705,926
[ "jquery", "internet-explorer-9", "effect", "slideup" ]
6,289,594
1
6,819,774
null
1
821
See the image below (I sat a breakpoint on CGPostError). Is there anything to do with this error?? In console the following message was printed out: `<Error>: doClip: empty path` We're building an iPad app and uses webkit to display custom ads. ![enter image description here](https://i.stack.imgur.com/lCYNK.png)
"<Error>: doClip: empty path" - from webview
CC BY-SA 3.0
0
2011-06-09T07:42:49.270
2011-07-25T17:05:23.830
2011-06-10T08:34:51.617
202,451
202,451
[ "iphone", "objective-c", "ios" ]
6,289,645
1
6,290,135
null
1
2,060
I want to bind the Tree view inside the repeater like below image: ![enter image description here](https://i.stack.imgur.com/rMooq.png) please tell me the way how can I do this.
Bind Treeview inside Repeater
CC BY-SA 3.0
null
2011-06-09T07:47:26.890
2011-06-09T08:37:32.720
null
null
165,873
[ "c#", "asp.net", "treeview", "repeater" ]
6,289,897
1
6,576,329
null
3
873
I am developing an app which supposed to work on devices that have OS 4.5 or later. In my application I need to know when the virtual keyboard is visible or invisible. Because if virtual keyboard is visible, the text area which the user is supposed to type in is behind the keyboard. If I could determine the moment of virtual keyboards state changed, I could refresh the screen and move the text area upper location. Is there a way to do that? the next button is at the status panel. The edit field is at the custom horizontal field manager. ![enter image description here](https://i.stack.imgur.com/Ars1l.png) When I touch the edit field, the virtual keyboard opens and the contents of the edit field is lost. ![enter image description here](https://i.stack.imgur.com/v3ZFG.png)
BlackBerry software keyboard listener on OS 4.5 (or later) compatible code
CC BY-SA 3.0
0
2011-06-09T08:12:55.063
2011-08-03T09:21:45.993
2011-08-03T09:17:07.193
63,550
697,270
[ "blackberry", "java-me", "soft-keyboard" ]
6,289,993
1
6,472,817
null
2
805
I haven't made much progress, so rather then look for an answer to the error stated in my original question, I think my problem would best be solved by some overall instructions on how to use Oauth properly. Please look below to question reformulated. --- # ORIGINAL QUESTION I'm using the cocoa-wrapper api for soundcloud on my iPhone app. I'm trying to post with the code below, but get an error 422. I believe it has to do with the string , but the url's given to me by soundcloud look like this: ``` https://soundcloud.com/connect https://api.soundcloud.com/oauth2/token http://api.soundcloud.com/oauth/request_token http://api.soundcloud.com/oauth/access_token http://soundcloud.com/oauth/authorize ``` and I don't think they need to be plugged into the Dictionary below. On the other hand I don't know what else to put there. Also, it seems to me there were some errors in the [original sample code](https://i.stack.imgur.com/xE9Nj.png) which I have corrected, but maybe erroneously. ``` [api performMethod:@"POST" onResource:@"connections" withParameters:[NSDictionary dictionaryWithObjectsAndKeys: @"service", @"twitter", @"x-myapplicationsurlscheme://connection", @"redirect_uri", @"touch", @"display", //optional, forces services to use the mobile auth page if available nil] context:nil userInfo:nil]; ``` So the question is.... How do I use this POST correctly? What am I doing wrong that gives the error 422? --- # QUESTION REFORMULATED What I'm trying to accomplish is to have the user press a button to be able to connect their Soundcloud account to Facebook. This way they can have audio posted to FB automatically after it is uploaded to Soundcloud. Below are screen shots of my Soundcloud configuration page and places within my app that need setting up. I believe that it is just a matter of plugging in the right the values in the right place, but I'm not sure exactly how to do this. Help, please! Also, the last screenshot shows what happens when the user presses the Facebook connect button. Does this look right? Thanks so much, ![enter image description here](https://i.stack.imgur.com/xE9Nj.png) ![enter image description here](https://i.stack.imgur.com/h8Joj.png) ![enter image description here](https://i.stack.imgur.com/JUNgK.png) ![enter image description here](https://i.stack.imgur.com/Ken2A.png)
How to use Oauth properly
CC BY-SA 3.0
0
2011-06-09T08:22:41.670
2011-07-25T18:55:38.733
2011-06-21T17:03:31.587
385,559
385,559
[ "iphone", "objective-c", "http", "post", "soundcloud" ]
6,290,230
1
6,290,322
null
3
6,340
How can I make a UIBarButtonItem like this: ![enter image description here](https://i.stack.imgur.com/V1dxi.png) I can't find it in the SystemItem values. Thanks
How to make a UIBarButtonItem like this
CC BY-SA 3.0
0
2011-06-09T08:47:31.753
2016-01-10T22:19:46.703
null
null
635,064
[ "objective-c", "cocoa-touch", "ios", "uibarbuttonitem" ]
6,290,511
1
6,290,846
null
14
16,477
Another 'Entity Type 'x' has no key defined' question, but I've set the `[Key]` attribute on a property so I'm a bit confused. Here's my entity and context classes: ``` namespace DoctorDB.Models { public class Doctor { [Key] public string GMCNumber; [Required] public string givenName; [Required] public string familyName; public string MDUNumber; public DateTime MDUExpiry; public string MDUCover; } public class DoctorContext : DbContext { public DbSet<Doctor> Doctors { get; set; } } } ``` When I go to create my controller, I've selected to create it with the Entity Framework methods using this entity and context: ![enter image description here](https://i.stack.imgur.com/K1IS1.png) and I get this error: ![enter image description here](https://i.stack.imgur.com/hGHhj.png) My only thought is whether you can't successfully use [Key] on a string property. If you can't then fair enough, I'll work round it, but I'd be grateful if someone could confirm this one way or the other.
Entity Type Has No Key Defined
CC BY-SA 3.0
0
2011-06-09T09:10:50.290
2016-05-19T23:27:43.033
null
null
1,738
[ "entity-framework-4.1", "ef-code-first" ]
6,290,534
1
6,291,016
null
2
4,403
I would like to create an outer glow effect on a UserControl derived class in c# 2.0 (WinForms). Is this (easily) possible? If yes, please show me how :) What I mean with "glow effect" is something like this: ![enter image description here](https://i.stack.imgur.com/b2vDU.gif)
Is it possible to create a glow effect in C# 2.0?
CC BY-SA 3.0
0
2011-06-09T09:12:09.037
2020-11-23T10:28:53.027
2011-06-09T09:32:23.153
769,570
769,570
[ "c#", "winforms", "drawing", "c#-2.0", "glow" ]
6,290,559
1
6,296,661
null
0
214
I have a rails app . I have created a sessionscontroller and want to redirect to users page '/users' once the user signs in. But the redirect doesnt seem to be happening. ``` class SessionsController < ApplicationController def create user = User.find_or_create_by_fbid(params[:user][:fbid]) #...Success user.update_attributes(params[:user]) #....Sucess sign_in(user) # ....This occurs successfully redirect_to users_path # .... Redirect doesnt occur on the browser side end end ``` The sign_in method is defined inside the Application Controller ``` class ApplicationController < ActionController::Base def sign_in(user) session[:fbid] = user.fbid @current_user = user end end ``` Server Logs below . The redirect actually seems to be happening on the server side . But I do not see any change on the client side. The browser doesnt change page. ![Server Logs](https://i.stack.imgur.com/jXqdS.jpg) The UsersController ``` class UsersController < ApplicationController def index @users = User.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @users } end end end ``` Original Ajax Post - ``` $.post("/sessions",{user:{name:profile.name, email:profile.email,fbid:profile.id}}); ``` The redirect occurs successfully if I use a javascript redirect statement inside the $post() as a callback function . ``` $.post("/sessions",{user:{name:profile.name, email:profile.email,fbid:profile.id}},function( data ) { window.location="/users"; } ); ```
Failure to Redirect on user Sign-in
CC BY-SA 3.0
0
2011-06-09T09:15:12.593
2011-06-09T19:07:01.690
2011-06-09T17:08:53.620
609,235
609,235
[ "ruby-on-rails", "view", "controller", "redirect" ]
6,290,630
1
null
null
4
1,750
Why does a simple Java GUI application create so many threads? ![enter image description here](https://i.stack.imgur.com/XCUCX.jpg)
A lot of threads in java process
CC BY-SA 3.0
null
2011-06-09T09:20:54.343
2014-05-05T14:00:26.667
2014-05-05T14:00:26.667
4,572
771,453
[ "java", "multithreading", "jvm" ]
6,290,705
1
6,328,787
null
7
3,731
I'm trying to display a small text (new messages count) over icon in toolbar button, something like Chrome and Opera extensions have with badge over the toolbar icons. Text should not cover the whole icon, it should be at the bottom so the user can still see main part of the icon and recognize what extension it is. How can I do this? You can see what I want on this example image from Chrome: ![toolbar button text overlay on chrome](https://i.stack.imgur.com/0hZRV.png) I tried with description, span and div inside stack element but I couldn't get none of them to position at the bottom. Description and div always display text at the center, while span displays it on the right side of the icon making the entire button wider. ``` <toolbarpalette id="BrowserToolbarPalette"> <toolbarbutton class="toolbarbutton-1"> <stack> <image></image> <description right="0" bottom="0" value="4"></description> <!-- <html:div right="0" bottom="0">5</html:div> --> </stack> </toolbarbutton> </toolbarpalette> ```
How can I display text over toolbar button for a firefox addon?
CC BY-SA 3.0
0
2011-06-09T09:26:33.700
2015-03-03T08:19:45.960
2012-06-12T19:55:29.707
785,541
111,433
[ "firefox", "firefox-addon", "xul" ]
6,290,797
1
6,293,079
null
1
38
I need to implement the gluing objects to each other. If the objects intersect the borders. attach to each other. the objects intersect the borders ![enter image description here](https://i.stack.imgur.com/EzhoH.jpg) the objects attached ![enter image description here](https://i.stack.imgur.com/40XGL.jpg) or it must implement code ?
Whether by means of Silverlight 4 stick objects
CC BY-SA 3.0
null
2011-06-09T09:36:06.570
2011-06-09T12:55:37.760
2011-06-09T12:55:37.760
17,516
450,466
[ "c#", "silverlight", "xaml", "silverlight-4.0" ]
6,290,931
1
6,353,974
null
3
3,395
I want to enable "Directory Browsing" for the for the following virtual web directory using WIX. ``` <iis:WebVirtualDir Id="LogsVirDir" Alias="Logs" Directory="ESGLOGFILES" /> ``` How do I accomplish this using WIX? ![IIS Directory Browsing Option](https://i.stack.imgur.com/Gzt5t.png) ![Directory Browsing Enabled](https://i.stack.imgur.com/5nQSr.png)
How do I enable Directory Browsing for an virtual web directory using wix?
CC BY-SA 3.0
null
2011-06-09T09:46:54.593
2014-04-23T17:08:57.673
2011-06-14T05:27:00.483
268,667
268,667
[ "iis-7", "installation", "wix" ]
6,291,045
1
6,295,405
null
2
1,046
I have the following chart: ![chart](https://i.stack.imgur.com/y84kC.png) Now my problem is I want to open a new chart containing the information for Linux OS when a user clicks on Linux portion of chart, shown in red. I have tried this: ``` //check if Linux OS is clicked on chart... if("Linux".equals(chartMouseEvent.getEntity().getToolTipText())) { //open new chart having the information for Linux } ``` But I think there may be some better alternate to do the same job. So please help if you know how to achieve this.
Need help to open a subchart from a main chart?
CC BY-SA 3.0
null
2011-06-09T09:57:16.823
2011-06-09T15:30:59.327
2011-06-09T10:51:22.380
230,513
1,130,032
[ "java", "mouseevent", "jfreechart" ]
6,291,128
1
6,291,248
null
1
590
I've got a little problem as seen below: ![enter image description here](https://i.stack.imgur.com/6EP9B.png) The cell has a background color, and the button doesn't. Still, it doesn't give me rounded edges, but corners. How can I fix that? ``` UIButton *meerKnop = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [[meerKnop layer] setCornerRadius:8.0f]; meerKnop.backgroundColor = [UIColor whiteColor]; meerKnop.frame = CGRectMake(11.0, (60.0 + (teller * 52.5)), 299.0, 50.0); ... [meerKnop addSubview:locationLabel]; ... [meerKnop addSubview:categoryLabel]; UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)]; swipe.direction = UISwipeGestureRecognizerDirectionRight; [meerKnop addGestureRecognizer:swipe]; [swipe release]; [meerKnop addTarget:self action:@selector(alertPressed:) forControlEvents:UIControlEventTouchUpInside]; meerKnop.tag = incId; [cell addSubview:meerKnop]; ```
Rounding color around borders of a button
CC BY-SA 3.0
0
2011-06-09T10:05:49.923
2011-06-10T10:53:53.173
2011-06-09T10:52:55.203
685,314
685,314
[ "iphone", "objective-c", "button", "colors", "tableview" ]
6,291,262
1
6,291,450
null
0
1,252
I am using gridview with layout inflator to display icon with text with the difference that I have to provide a button at the bottom of the screen. My layout file looks like this: ``` <?xml version="1.0" encoding="utf-8"?> <merge xmlns:android="http://schemas.android.com/apk/res/android"> <GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/sdcard" android:layout_width="fill_parent" android:layout_height="fill_parent" android:verticalSpacing="10dp" android:horizontalSpacing="10dp" android:numColumns="3" android:stretchMode="columnWidth" android:gravity="center" android:background="#ffffff"/> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:text="submit" android:id="@+id/button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:paddingTop="5dp"> </Button> </RelativeLayout> </merge> ``` When I test it on the emulator (size according to the real device). Grid view is correctly populated but when I scroll to the last row the image is visible but not the text and button is hindering the view. I want the text to visible also. How can I achieve this? ![enter image description here](https://i.stack.imgur.com/1G16H.jpg)
Display Issue in GridView (layout inflator) having button at the bottom of the screen?
CC BY-SA 4.0
0
2011-06-09T10:16:56.163
2022-04-18T10:47:05.897
2022-04-18T10:47:05.897
1,839,439
146,192
[ "android", "android-layout", "android-gridview" ]
6,291,383
1
6,291,864
null
2
535
I have a login screen with a username and password textbox. However, I've come across a better way to present my username and password textboxes. The textboxes seems to be merged. Just like the login screen on Windows Live Messenger iPhone app. ![enter image description here](https://i.stack.imgur.com/KRAa2.jpg) Does anyone know how to make this? Thanks.
Login textbox style - iPhone
CC BY-SA 3.0
null
2011-06-09T10:29:21.940
2011-06-09T11:25:17.390
2011-06-09T11:25:17.390
685,314
735,746
[ "iphone", "ios4", "uiview", "authentication" ]
6,291,612
1
6,413,283
null
1
469
We have a client who is migrating from Report Builder 1.0 to Report Builder 2.0. Yes, I realise they are very behind the game, and RB3 has been out ages, but there are internal reasons why they are making this decision ... This being the position we are at, there is a "search" button on RB1, that doesn't exist on RB2. ![Report builder 1.0 search button](https://i.stack.imgur.com/e7RZy.jpg) It allows the user to search for fields in the database at report design time. Does anyone have any thoughts on if/where the same feature exists in RB2? My suspicion is that the functionality is somehow part of Report Models in RB1 and so obviously doesnt exist in RB2. Many thanks, Marcus
Report Builder 1.0 vs 2.0. Search function disappeared?
CC BY-SA 3.0
null
2011-06-09T10:48:33.553
2011-06-21T08:09:59.927
2011-06-14T09:36:47.647
540,768
540,768
[ "sql-server", "reportbuilder", "report-builder2.0" ]
6,291,810
1
6,291,856
null
4
2,098
![Model-View-Controler](https://i.stack.imgur.com/MaA3f.png) A naive implementation of MVC leeds to infinite loops. Example: Model is a Workbook with Worksheets, View is a Tabbar with Tabs 1. User interakts with Tabbar to create new Tab 2. Tabbar sends event onTabAdded to Controler 3. Controler calls Workbook.addWorksheet() 4. Workbook sends event onWorksheetAdded to Tabbar 5. Tabbar adds Tab and sends onTabAdded to Controler -> 2) Infinite Loop! Alternatively, the loop could be initiated by programmatically adding a Worksheet through a macro. Or a tab could be added programmatically by automated UI testing. It seems that the more components you have and the looser the coupling is (considered good design), the more likely it is to have infinite loops. Do you know about implementation patterns how to avoid such infinite loops? An evaluation of pros/cons of such patterns? My special interest is a solution for a rich JavaScript client. The answers to the following questions are not really on the implementation level: - [should the Observer Pattern include some infinite loop detection?](https://stackoverflow.com/questions/964565/should-the-observer-pattern-include-some-infinite-loop-detection)- [Event driven architecture...infinite loop](https://stackoverflow.com/questions/3688117/event-driven-architecture-infinite-loop)- [how to avoid infinite loop in observer pattern?](https://stackoverflow.com/questions/2464596/how-to-aviod-infinite-loop-in-observer-pattern)
Implementation patterns to avoid infinite loops with events
CC BY-SA 3.0
null
2011-06-09T11:07:23.463
2011-06-09T11:11:20.873
2017-05-23T10:29:09.187
-1
570,118
[ "javascript", "design-patterns", "architecture" ]
6,291,886
1
6,291,958
null
0
182
I'm trying to create a gallery of images using a UITableView. The application I'm trying to build is similar to the iBook app. ![enter image description here](https://i.stack.imgur.com/AQjzu.jpg) Are there any blogs/resources out there that talk about achieving the 'gallery' look?
Customizing a table view to achieve a 'gallery' look
CC BY-SA 3.0
0
2011-06-09T11:13:10.723
2011-06-09T11:19:06.470
null
null
558,423
[ "iphone", "ios", "ipad", "uitableview" ]
6,292,438
1
6,292,482
null
3
3,731
I'm struggling with pycurl. These are my headers: ``` headers.append('User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0') headers.append('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8') headers.append('Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3') headers.append('Accept-Encoding: gzip, deflate') headers.append('Accept-Charset: UTF-8,*') headers.append('Connection: Keep-Alive') ``` Original: ![http://dl.dropbox.com/u/25733986/test.jpg](https://i.stack.imgur.com/hoxfh.jpg) What I get: ![http://dl.dropbox.com/u/25733986/test_kaputt.jpg](https://i.stack.imgur.com/iCKHw.jpg) As you can see, the one I get with pycurl is broken. If I compare them with a text-compare-tool, it tells me they are the same. (There was a difference in line-endings where the original had only LF and the broken had CRLF, but I changed that and now I have identical images, still broken) The host where I'm downloading from, is not the reason. I tried to do the same from the dropbox and a local apache. Both didn't work. This is how I save the image: ``` self.buffer = StringIO.StringIO() # other curl options like ssl, cookies, followlocation and GET Request URL Setup to the Image: http://dl.dropbox.com/u/25733986/test.jpg self.curl.setopt(pycurl.WRITEFUNCTION, self.buffer.write) # -> curl.perform() f = open("temp/resources/%s" % (filename,), 'w') f.write(self.buffer.getvalue()) f.close() ``` I would be happy if anyone has some suggestions on this, so I can find my error.
Image Download with PycURL gets me broken Images
CC BY-SA 3.0
null
2011-06-09T12:00:37.823
2011-06-09T12:04:25.653
null
null
145,489
[ "python", "image", "curl", "download", "pycurl" ]
6,292,454
1
null
null
4
549
I've searched and searched and for some reason cannot find how to create one of these. Are they custom? I used to see them in some fairly basic looking apps and assumed they would be part of the API: ![Google Docs](https://i.stack.imgur.com/O8f1U.png) ![Whatsapp](https://i.stack.imgur.com/ZebMV.png)
Android - what is this widget? (A sort of context menu)
CC BY-SA 3.0
0
2011-06-09T12:01:39.793
2016-03-03T17:48:27.110
null
null
663,370
[ "android", "android-widget", "contextmenu" ]
6,292,713
1
6,785,110
null
1
1,056
A few days ago, I started having problems with . They return (a view with nothing on it). I also noticed that they are (in case that detail helps). As such my revenue dropped almost completely (to a few cents per app), CTR dropped and all that. I noticed that it started happening some day with no reason on the previous SDK (4.0.4 IIRC). I tried uploading a version with the new SDK (4.1), but still have problems. Despite all that, , which leaves me wondering... Questions here on SO and on the Internet [[1](https://stackoverflow.com/questions/6090261/admob-ads-not-clickable-and-not-displaying-well-urgent), [2](http://groups.google.com/group/google-admob-ads-sdk/browse_thread/thread/c9219ceadb6f5e62?pli=1) and [3](https://stackoverflow.com/questions/5060672/my-android-admod-ad-is-blank-in-test-mode) (this one isn't Android, but still...)] didn't help much. Screenshot: ![blank AdMob ad](https://i.stack.imgur.com/X2MEk.png) Log follows. I'm intrigued with the last warning (I indented), as I suspect that's the problem... and I have no idea of what it means. ``` 06-09 08:44:16.730: INFO/Ads(27033): To get test ads on this device, call adRequest.addTestDevice("1355EC5CAF8FDBFF50FFE95E7C3187E9"); 06-09 08:44:16.800: WARN/InputManagerService(110): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@40759998 (uid=10071 pid=27033) 06-09 08:44:16.800: WARN/InputManagerService(110): Client not active, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@407f8418 06-09 08:44:16.906: INFO/Ads(27033): adRequestUrlHtml: <html><head><script src="http://www.gstatic.com/afma/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":1,"u_sd":1.5,"slotname":"b23d5315c744d5a","u_w":320,"msid":"com.dc.test","js":"afma-sdk-a-v4.1.0","isu":"1355EC5CAF8FDBFF50FFE95E7C3187E9","format":"320x50_mb","net":"wi","app_name":"12.android.com.dc.test","hl":"pt","u_h":533,"u_audio":1,"u_so":"p"});</script></head><body></body></html> 06-09 08:44:17.050: INFO/ActivityManager(110): Displayed com.dc.test/.ui.MainActivity: +495ms (total +45s519ms) 06-09 08:44:17.500: INFO/Ads(27033): Received ad url: <"url": "http://r.admob.com:80/ad_source.php?preqs=1&u_sd=1.5&slotname=b23d5315c744d5a&u_w=320&msid=com.dc.test&js=afma-sdk-a-v4.1.0&isu=1355EC5CAF8FDBFF50FFE95E7C3187E9&format=320x50_mb&net=wi&app_name=12.android.com.dc.test&hl=pt-BR&u_h=533&u_audio=1&u_so=p&output=html&region=mobile_app&u_tz=180&ex=1&client_sdk=1&askip=1", "afmaNotifyDt": "null"> 06-09 08:44:18.097: WARN/webcore(27033): Can't get the viewWidth after the first layout 06-09 08:44:18.101: INFO/Ads(27033): onReceiveAd() ``` After this I get standard dalvikvm stuff, so I guess it ends here. I can include more details if needed. I didn't include code because I didn't change anything for that to start happening.
Android AdMob returning blank, not clickable ads (picture and small log included)
CC BY-SA 3.0
null
2011-06-09T12:23:01.863
2013-09-08T09:54:00.980
2017-05-23T12:12:05.437
-1
489,607
[ "android", "admob" ]
6,293,016
1
6,293,078
null
11
3,940
What technology is used at [the Google homepage](http://www.google.be/) (9 June 2011)? They made something like a guitar pickup for the snares. When you move the mouse over it, the snares are being played.![enter image description here](https://i.stack.imgur.com/AFUIE.png) I know it is no flash, otherwise the add-on for Firefox would have blocked it. Thanks.
What technology is used at the Google homepage (guitarstrings)
CC BY-SA 3.0
0
2011-06-09T12:49:53.623
2011-06-10T19:38:39.117
2011-06-09T12:55:00.287
110,707
155,137
[ "html", "web-applications" ]
6,293,153
1
6,293,225
null
3
58
I have run into ...I don't think I would call it a problem as much as I would a quirk. It confuses and confounds me. I am adding `Ninject` to my site. It works fine. No questions about troubleshooting Ninject specifically, but I encountered this when setting up my modules... Here is my `SessionModule.cs` file. ``` namespace Lightcast.Web.Mvc.Injection.Modules { public class SessionModule : Ninject.Modules.NinjectModule { public override void Load() { } } } ``` Also shown in this screenshot. ![SessionModule.cs](https://i.stack.imgur.com/tIli1.png) I get the error > Unknown type 'Modules' of Lightcast.Web.Mvc.Injection.Ninject Now if I change it to this ... ![SessionModule.cs(2)](https://i.stack.imgur.com/bYcW5.png) It works just fine. So obviously there is a namespace collision. What I do not understand is ? I have encountered this before. It just seems like the absolute oddest thing to me.
Why do I need global:: here?
CC BY-SA 3.0
null
2011-06-09T13:00:40.410
2011-06-09T13:06:05.283
null
null
84,685
[ ".net", "namespaces", "ninject" ]
6,293,296
1
null
null
0
697
I'm making an scoreboard and want to keep track of the total score. If i fill a random number in both textviews, i want a sum of the 2 numbers as a total in the totalscore. how do i do that. in my previous question i had this code as an answer but they said i must incrementing each of the score TextViews and hook up each of the TextViews with a TextWatcher. ![enter image description here](https://i.stack.imgur.com/jgxsk.png) ``` final TextView TotalScore = (TextView) findViewById(R.id.Total); final EditText One = (EditText) findViewById(R.id.Score1); final EditText Two = (EditText) findViewById(R.id.Score2); TotalSore.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) { int Score1 = Integer.parseInt((String) One.getText().toString()); int Score2 = Integer.parseInt((String) Two.getText().toString()); TotalScore.setText(String.valueOf(Score1 + Score2)); } public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } public void afterTextChanged(Editable s) { // TODO Auto-generated method stub } }); ```
How to incrementing each of the score TextViews?
CC BY-SA 3.0
null
2011-06-09T13:10:33.423
2011-06-09T21:32:39.007
2011-06-09T21:12:51.367
752,358
752,358
[ "android" ]
6,293,432
1
6,293,795
null
34
37,812
Is it possible to change the [blue dot](https://i.stack.imgur.com/ELWID.jpg) which indicates the user's location in `MKMapView` to an image? For example a little car or any `.png` image? ![enter image description here](https://i.stack.imgur.com/013GV.jpg)
How to change MKMapView's user-location blue dot to an image of choice?
CC BY-SA 3.0
0
2011-06-09T13:22:02.403
2016-12-20T07:32:35.040
2013-05-01T14:20:04.710
2,259,721
679,277
[ "iphone", "objective-c", "ios", "mkmapview", "userlocation" ]
6,293,708
1
6,293,900
null
2
4,281
I want to insert the current datetime whenever a new row is inserted or updated. The getdate() gives the datetime whenever a row is inserted. But it doesn’t update itself at the time of row update. Is there any way to do this? I don't want to use Triggers. ![Field Structure](https://i.stack.imgur.com/izimz.png)
Automatic Update of datetime on Table Update :MS SQL08
CC BY-SA 3.0
null
2011-06-09T13:40:54.017
2017-07-17T18:02:46.447
2011-06-09T14:51:46.570
637,726
637,726
[ "sql-server-2008" ]
6,293,856
1
6,294,171
null
0
280
I am trying to get the following layout, im using StackLayout framework ![enter image description here](https://i.stack.imgur.com/bCxZx.png) I am not able to get the Box1, Box2 and Box 3 stacked. Also, the header of each box is giving me trouble, when i wrap them in divs. Here is the code i have so far: ``` <div class="wrapper"> <div id="column1" class="stack3of4"> <div class="stackContent"> <h2>Heading</h2> </div> </div> <div id="column2" class="stack1of4"> <div id="box1" class="stackContent"> <h2>Box 1 Heading</h2> </div> <div id="box2" class="stackContent"> <h2>Box 2 Heading</h2> </div> <div id="box3" class="stackContent"> <h2>Box 3 Heading</h2> </div> </div> </div> ``` Here is the CSS ``` .stackContent { display: block; letter-spacing: normal; text-align: left; word-spacing: normal; } .stack3of4 { width: 75%; } .stack1of4 { width: 25%; } ```
Stuck with the CSS StackLayout framework
CC BY-SA 3.0
null
2011-06-09T13:52:20.540
2011-06-09T14:19:25.760
null
null
103,132
[ "css", "frameworks", "html" ]
6,294,414
1
6,295,468
null
2
3,001
When I use `clear:both` code in CSS div tag it doesn't show correctly on IE. this is firefox: ![enter image description here](https://i.stack.imgur.com/LIN05.jpg) this is IE 6 ![enter image description here](https://i.stack.imgur.com/VBtnv.jpg) You can see in firefox it's show correctly, But it doesn't show correctly. Please help me to solve this problem. Thank you. Please check this. [http://jsfiddle.net/sasindu555/xmKAT/](http://jsfiddle.net/sasindu555/xmKAT/)
CSS clear both IE bug
CC BY-SA 3.0
null
2011-06-09T14:26:58.180
2020-07-09T09:57:26.313
2020-07-09T09:57:26.313
8,422,953
776,044
[ "css", "internet-explorer" ]
6,294,509
1
6,318,594
null
1
398
When I am in a Java class file, I can get context info of a certain method/attribute/etc. (in IntelliJ, this shortcut is Ctrl+Q), which is basically a short help file describing what that element does. Look at the image 1. ![](https://i.stack.imgur.com/vT7ap.png) But when I am in an XML file, I cannot get any contextual info on any element. Look at the image 2. ![](https://i.stack.imgur.com/IJkbT.png) How should I enable it? Do I have to download some additional Android doc (javadoc?) file?
How to get class/method/attribute info in Android XML file?
CC BY-SA 3.0
null
2011-06-09T14:32:40.443
2011-06-11T21:16:47.193
2011-06-09T14:52:35.243
437,039
437,039
[ "android", "xml", "intellij-idea" ]
6,294,515
1
6,295,075
null
2
613
I'm trying to add a title to my the elements of my listview. Right now all the information is populated from a static array which consists of several elements but basically now is an Image followed by several different textviews. I would like to have a title bar above the image and textviews but still contained with in the scrollview element (Does this make sense? I'm still trying to get programming jargon down, haha.) I've tried adding a relative layout/textview/tablerow above the imageview to no avail. Here is the LayoutCode ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip" > <ImageView android:id="@+id/icon" android:layout_width="100sp" android:layout_height="100sp" android:layout_marginRight="6dip" android:src="@drawable/car1" /> <LinearLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent" > <TextView android:id="@+id/make" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:gravity="center_vertical" android:textColor="#000" /> </LinearLayout> </LinearLayout> ``` This is all contained in this: ``` <?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"> <RelativeLayout android:orientation="vertical" android:background="@drawable/banner" android:layout_width="fill_parent" android:layout_height="50sp" android:gravity="center" > </RelativeLayout> <RelativeLayout android:orientation="vertical" android:background="#FFFFF0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="fill_vertical"> <Button android:text="Change Location" android:id="@+id/ListingsLocationbtn" android:layout_height="wrap_content" android:gravity="center" android:layout_width="100sp" android:layout_margin="3sp"></Button> <Button android:id="@+id/ListingsDetailsbtn" android:text="Details" android:layout_toRightOf="@+id/ListingsLocationbtn" android:layout_alignTop="@+id/ListingsLocationbtn" android:layout_alignBottom="@+id/ListingsLocationbtn" android:layout_height="match_parent" android:gravity="center|center_vertical" android:layout_width="100sp" android:layout_margin="3sp"></Button> <Button android:layout_height="wrap_content" android:id="@+id/ListingsFilterbtn" android:text="Filter Results" android:layout_alignParentRight="true" android:layout_width="100sp" android:gravity="center" android:layout_margin="3sp"></Button> </RelativeLayout> <RelativeLayout android:orientation="vertical" android:background="#FFFFF0" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="fill_vertical"> <TextView android:id="@+id/zipcodeTV" android:paddingTop="2sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#000" android:textStyle="bold"/> </RelativeLayout> <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFF0" /> <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/main_no_items" android:textColor="#000" /> </LinearLayout> ``` *I deleted some of the textviews as my code didn't take over the entire page ![enter image description here](https://i.stack.imgur.com/DE6l1.png) Thanks in advance for the help :)!
Android: Layout problem for a listview
CC BY-SA 3.0
0
2011-06-09T14:33:07.547
2011-06-09T15:53:37.290
2011-06-09T15:13:04.060
779,920
779,920
[ "android", "xml", "layout", "android-linearlayout" ]
6,294,570
1
null
null
8
1,009
My task is to make something like an erasing tool (operated with a finger) that will reveal a background image instead of an erased image. Here are my source and destination images (just for test, real ones will differ): ![image1](https://i.stack.imgur.com/EJIiM.png) [http://img232.imageshack.us/img232/6030/29572847.png](http://img232.imageshack.us/img232/6030/29572847.png) And here's my code. Creating the pattern: ``` - (void)setFrame:(CGRect)frame { [super setFrame:frame]; if(revealPattern) CGPatternRelease(revealPattern); CGPatternCallbacks callbacks = { 0, &patternCallback, NULL}; revealPattern = CGPatternCreate(self, self.bounds, CGAffineTransformIdentity, self.bounds.size.width, self.bounds.size.height, kCGPatternTilingConstantSpacing, true, &callbacks); } ``` Pattern callback function (**info* contains the pointer to ): ``` void patternCallback(void *info, CGContextRef context) { CGRect rect = ((DrawView *)info).bounds; CGImageRef imageRef = ((DrawView *)info).backgroundImage.CGImage; CGContextTranslateCTM(context, 0, rect.size.height); CGContextScaleCTM(context, 1.0, -1.0); CGContextDrawImage(context, rect, imageRef); } ``` And the drawing method: ``` - (void)drawPoints:(CGContextRef)context{ if([points count] < 2) return; CGPoint lastPoint = [[points objectAtIndex: 0] CGPointValue]; CGContextBeginPath(context); CGContextMoveToPoint(context, lastPoint.x, lastPoint.y); CGContextSetBlendMode(context, kCGBlendModeNormal); CGColorSpaceRef revealPatternSpace = CGColorSpaceCreatePattern(NULL); CGContextSetStrokeColorSpace(context, revealPatternSpace); CGFloat revealAlpha = 1.0; CGContextSetStrokePattern(context, revealPattern, &revealAlpha); CGContextSetAlpha(context, 0.1); CGColorSpaceRelease(revealPatternSpace); CGContextSetLineCap(context, kCGLineCapRound); CGContextSetLineJoin(context, kCGLineJoinRound); CGContextSetLineWidth(context, self.lineWidth); for(int i = 1; i < [points count]; i++){ CGPoint currPoint = [[points objectAtIndex: i] CGPointValue]; CGContextAddLineToPoint(context, currPoint.x, currPoint.y); lastPoint = currPoint; } CGContextStrokePath(context); } ``` If the local variable has value (as shown in the last code piece), everything works fine. But I need the erasing to be semi-transparent (so that a user needs to swipe the same place several times to erase it fully). And here the problem appears. If I make to be less than , the revealed destination image looks corrupted. Here are the results for and : ![image2](https://i.stack.imgur.com/C5Hri.png) [http://img593.imageshack.us/img593/1809/69373874.png](http://img593.imageshack.us/img593/1809/69373874.png) If you look close enough, you will notice that the blue gradient on the right picture is not smooth anymore.
iOS CoreGraphics: Stroking with semi-transparent patterns leads to colors corruption
CC BY-SA 3.0
0
2011-06-09T14:36:47.320
2012-05-03T17:09:03.640
2012-05-03T17:09:03.640
1,218,605
790,989
[ "iphone", "ios", "core-graphics" ]
6,295,084
1
6,295,183
null
46
12,929
I need to cut out an image in the shape of the text in another image. I think it's best shown in images. This is a photo of a cat: ![Photo of a nice cat](https://i.stack.imgur.com/Nqf3H.jpg) and this is the text I wish to cut out: ![Text to cut out of the cat photo](https://i.stack.imgur.com/EUtiX.png) The resulting image would be this: ![Resulting cut-out of the cat photo](https://i.stack.imgur.com/ul5yw.png) The text image will always be black with a transparent background, and the resulting cut-out should too have a transparent background. Both input images will also be the same size.
Cut out image in shape of text
CC BY-SA 3.0
0
2011-06-09T15:10:44.020
2014-12-17T09:39:45.223
null
null
366,133
[ "java", "image", "image-processing" ]
6,295,643
1
6,296,273
null
0
877
I am creating Web user interface for a Web application. The interface has header, footer and in between two rectangles in horizontal line. Rectangles are separated by space. All these features are created using tags. Below is given CSS to format the left rectangle: ``` #sidebar1 { position: absolute; left: 150px; width: 450px; height:250px; background: #EBEBEB; padding: 20px 0; padding-left:20px; padding-right:20px; margin: 50px auto; border: 1px solid #000000; } ``` The problem is that when you squeeze or extend the window of browser those rectangles change position or overlap one another. This is not acceptable. I have tried other options of position keyword in CSS such as position: fixed or position:relative or static but the representation is still wrong. Likewise I tried float:left and float: right but that still makes the rectangles to move and overlap. I want those rectangles to stand still despite that you are extending or squeezing the window. What are your solutions, please? Best regards![enter image description here](https://i.stack.imgur.com/GgS7G.png) Current code: ``` <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Welcome to Spring Web MVC project</title> <style type="text/css"> body { font: 100% Verdana, Arial, Helvetica, sans-serif; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ /*padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: black; } #header { background: green; /* top: 100px; */ text-align: center; margin: 55px; padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */ } #sidebar1 { position: absolute; left: 150px; width: 450px; /* since this element is floated, a width must be given */ height:250px; background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */ padding: 20px 0; /* top and bottom padding create visual space within this div */ padding-left:20px; padding-right:20px; margin: 50px auto; border: 1px solid #000000; } #sidebar2 { position: absolute; right: 150px; width: 450px; /* since this element is floated, a width must be given */ height: 250px; background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */ padding: 20px 0; /* top and bottom padding create visual space within this div */ padding-left:20px; padding-right:20px; margin: 50px auto; border: 1px solid #000000; } #footer { padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */ background:green; width:95%; margin:55px; position: relative; bottom: -300px;; } .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */ clear:both; height:0px; font-size: 1px; line-height: 0px; } </style><!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .thrColHybHdr #sidebar1, .thrColHybHdr #sidebar2 { padding-top: 30px; } .thrColHybHdr #mainContent { zoom: 1; padding-top: 15px; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--></head> <body> <div id="header"> <h1>Header</h1> <!-- end #header --></div> <!--<div id="container"> --> <div id="sidebar1"> <h3>blah blah</h3> <p><li>blah blah</li> </p> <p><li>blah blah</li> </p> <p><li>blah blah</li></p> <!-- end #sidebar1 --></div> <div id="sidebar2"> <h3>blah blah</h3> <p><li>blah blah</li> </p> <p><li>blah blah </li></p> <p><li>blah blah</li></p> <!-- end #sidebar2 --></div> <p> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> </p> <p><br class="clearfloat" /> </p> <div id="footer"> <p>Footer</p> <p>Terms & Conditions</p> <!-- end #footer --></div> <!-- end #container --> <!--</div> --> </body> </html> ```
Positioning objects on the XHTML page
CC BY-SA 3.0
null
2011-06-09T15:49:15.663
2011-06-09T17:05:30.570
2011-06-09T17:05:30.570
768,691
768,691
[ "css", "xhtml" ]
6,295,720
1
6,295,873
null
4
3,038
I wanted to create a flat image push button like the Windows 7 mute button. Here's the picture: [flat button](http://dl.dropbox.com/u/2098541/temp/flat.jpg) ![enter image description here](https://i.stack.imgur.com/YDI9t.jpg) When mouse hover it(display border): [flat button hover](http://dl.dropbox.com/u/2098541/temp/hover.jpg) ![enter image description here](https://i.stack.imgur.com/8w7Sb.jpg) I tried to use BS_FLAT style, but nothing changed. My code is using visual style. When I try BS_FLAT without visual style, it does look flat, but still has a one pixel border. So I want the button to look flat and without border, but when mouse hover it, it become a normal button. How to achieve this?
How to create a Flat Button in WinAPI with visual style
CC BY-SA 3.0
null
2011-06-09T15:54:34.093
2011-06-09T20:18:15.877
2011-06-09T20:18:15.877
91,299
264,125
[ "c++", "winapi", "button", "visual-styles" ]
6,295,736
1
6,300,159
null
4
1,489
Is it possible to stroke an SVG polyline with an horizontal linear gradient where the gradient's angle changes at every polyline vertex? it would look something like this: ![enter image description here](https://i.stack.imgur.com/XTA7J.png)
Stroking an SVG polyline with a gradient
CC BY-SA 3.0
0
2011-06-09T15:55:40.177
2012-01-27T01:02:41.453
null
null
727,379
[ "svg", "gradient" ]
6,295,974
1
6,298,079
null
2
7,914
I need to perform image smoothing. I've searched the web but I didn't find anything - every thing I tried doesn't preform like I want. for example: ![enter image description here](https://i.stack.imgur.com/x029w.jpg) ![enter image description here](https://i.stack.imgur.com/bJgOr.jpg) as you see there are bumps or something like stairs, so what should I do so the lines will be straight? thanks....
smoothing image in Matlab
CC BY-SA 3.0
null
2011-06-09T16:13:44.903
2011-06-09T19:21:08.983
2011-06-09T19:09:45.323
677,667
556,011
[ "matlab", "image-processing", "smoothing" ]
6,296,302
1
6,297,203
null
4
4,311
The documentation states that "This project compiles to a static library which you can include, or you can just reference the source files directly." Here's what I've done. I've downloaded it from GitHub and unzipped it. Here are the classes I can see. ![enter image description here](https://i.stack.imgur.com/ib4mX.png) Now which file among these is the 'static library' that I should import into my project? Additionally, if I just want to reference the source files, should I just copy the .h/.m files in Classes into my project? I tried doing that but throws the following error when I try to build it: ``` Undefined symbols for architecture i386: "_OBJC_CLASS_$_CALayer", referenced from: objc-class-ref in AQGridViewCell.o ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status ``` Can any one show me how to set this up?
How to incorporate AQGridView into ones project?
CC BY-SA 3.0
null
2011-06-09T16:42:27.420
2012-10-12T04:38:14.523
null
null
558,423
[ "iphone", "objective-c", "xcode", "ios", "aqgridview" ]
6,296,303
1
null
null
0
926
I'm trying to log Telephone Calls made via Skype to SugarCRM. I've been able to get as far as hooking onto Skype Events, creating a Call record in Sugar via SOAP (with status as Held or Not Held). However, any call that I log as "Not Held" remains in an "Open" state (with that x mark beside it) in the Activities section and doesn't float up to the History subpanel. Now if one clicks on the 'x' mark to close the call, and only then it moves up to History - which beats the purpose, as I want to . ![enter image description here](https://i.stack.imgur.com/vmD8j.png) Is this the default and unavoidable behavior of SugarCRM or is there a way to mark the call as not held and YET close it down? I don't seem to find any field in the sugar database that corresponds to the Close button.
SugarCRM SOAP: Logging and Closing "Calls"
CC BY-SA 3.0
null
2011-06-09T16:42:31.987
2014-03-04T20:36:55.423
2014-03-04T20:36:55.423
321,731
112,364
[ "soap", "module", "call", "sugarcrm" ]
6,296,574
1
6,296,639
null
38
12,302
I tried to figure it out looking at the source code but I couldn't figure it out. I would like to know how to make a dynamic favicon with a count like Gmail does. ![enter image description here](//i.stack.imgur.com/Wd43t.png) Any idea on how to do this?
Dynamic favicon using image manipulation similar to Gmail adding a count
CC BY-SA 3.0
0
2011-06-09T17:03:12.817
2016-10-26T20:16:52.373
2016-10-26T20:16:52.373
322,395
466,318
[ "javascript", "canvas", "dynamic", "favicon" ]
6,296,663
1
6,296,744
null
0
1,056
I am a new to IntelliJ Idea from Jetbrains and the installer asks me various questions at first launch. Though i managed Subversion/Version control system settings in first window other seem alien to me. Can i have a experienced hand at completing other steps. I am used to visual studio and .net and C#. But Java for first time, hence such a subjective question, mostly i want to develop Google data, android , java webapps[so database comes along], console application[does java have one??] couple of screenshots from installation ![Scrren1](https://i.stack.imgur.com/qGtkq.jpg) ![This is window 2](https://i.stack.imgur.com/gQdHR.jpg) ![This is screen3](https://i.stack.imgur.com/35Zrs.jpg) ![This is screen 4](https://i.stack.imgur.com/XUpYy.jpg) I did manage find out what other's were but these bother me. I haven't completed the steps yet waiting for answers to complete and finish the installation
Could someone recommend best settings and plugins to Enable in JetBrains IntelliJ Idea for beginner
CC BY-SA 3.0
null
2011-06-09T17:11:03.543
2011-06-10T11:30:13.033
2011-06-10T11:30:13.033
1,853
571,507
[ "java", "ide", "installation", "intellij-idea" ]
6,296,698
1
6,296,760
null
1
4,483
This is a follow-up to: [Getting Started With ASP.NET MVC3 & Google Checkout: Take 2](https://stackoverflow.com/questions/6295359/getting-started-with-asp-net-mvc3-google-checkout-take-2) It seems that the problem why I'm getting a Bad Request (400 error) - refer to the topic above - is because of this error. Checkout the screen shot below: ![enter image description here](https://i.stack.imgur.com/oUfN3.jpg) So as you can see, there's an exception being thrown and that's probably what's causing all the mess. I tried using a `MemoryStream` but I got an exception telling me that it cannot cast a `System.Net.ConnectStream` to a `MemoryStream`. So how can I solve this problem?
This Stream Does Not Support Seek Operations
CC BY-SA 3.0
null
2011-06-09T17:13:41.327
2011-06-09T17:25:22.320
2017-05-23T12:12:05.437
-1
565,283
[ "c#", "asp.net", "asp.net-mvc-3", "stream", "io" ]
6,297,099
1
6,298,287
null
2
833
I am having trouble understanding if I am doing this correctly or not. I have 3 entities that are dependent on each other. I am trying to add new objects to these entities and then call save changes ultimately adding the corresponding records to the tables honoring the FK constraints. I am getting the error: ![enter image description here](https://i.stack.imgur.com/C2mMk.jpg) In my code I am parsing some XML with linq while adding the new objects to the context as I go. In my service layer I have the following method to handle processing the incoming data. ``` public void ProcessSurvey(int surveyContentId, int caseNo, string surveyTitle, string reportVersion, string reportXml) { // get surveyid var surveyContent = _surveyContentRepository.GetSurveyContent(surveyContentId); // create response obj var surveyResponse = new SurveyResponse() { SurveyId = surveyContent.SurveyId, CaseNo = caseNo, SurveyTitle = surveyTitle, ReportVersion = reportVersion, Created = DateTime.Now, ResponseXML = reportXml }; // add response obj to context? _surveyResponseRepository.Add(surveyResponse); // get the questions elements from the xml data var questions = SurveyResponseHelper.GetResponseQuestions(reportXml); // iterate over questions foreach (XElement question in questions) { SurveyQuestion thisSurveyQuestion = SurveyResponseHelper.ProcSurveyQuestion(question, surveyContentId); // add question? _surveyQuestionRepository.Add(thisSurveyQuestion); // get question answer SurveyAnswer thisSurveyAnswer = SurveyResponseHelper.GetAnswer(question); //update the answer with the question and response obj to satisfy the FK reference thisSurveyAnswer.SurveyQuestion = thisSurveyQuestion; thisSurveyAnswer.SurveyResponse = surveyResponse; // This is where it breaks ERRROR: The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects _surveyAnswerRepository.Add(thisSurveyAnswer); } //commit _surveyAnswerRepository.Save(); } ``` My Repositories look like this.. ``` public interface ISurveyAnswerRepository { void Add(SurveyAnswer surveyAnswer); void Save(); } public class SurveyAnswerRepository : Repository, ISurveyAnswerRepository { //private DiversionProgramsEntities _db; public SurveyAnswerRepository() { //_db = new DiversionProgramsEntities(); } public void Add(SurveyAnswer surveyAnswer) { this.DataContext.SurveyAnswers.AddObject(surveyAnswer); } public void Save() { this.DataContext.SaveChanges(); } ``` my base repository ``` public class Repository { private DiversionProgramsEntities _dataContext; public DiversionProgramsEntities DataContext { get { return _dataContext ?? (_dataContext = DatabaseFactory.CreateContext()); } } } ``` and static class / method to create the context ``` public static class DatabaseFactory { public static DiversionProgramsEntities CreateContext() { return new DiversionProgramsEntities(); } } ``` here is my helper code.. ``` public class SurveyResponseHelper { public static IEnumerable<XElement> GetResponseQuestions(string xmlResponseData) { XElement xmlData = XElement.Parse(xmlResponseData); var questions = from n in xmlData.Descendants() where n.Parent.Name.LocalName == "questions" select n; return questions; } public static SurveyQuestion ProcSurveyQuestion(XElement question, int surveyContentId) { // get the question type var questionType = question.Name.LocalName; // get question element text. This is the actual question text var questionText = question.Elements().Where(e => e.Name.LocalName == "direction").SingleOrDefault().Value; // check to see if this question exists in the data table, if it does then we will use the questionid from that which will get used to tie the SurveyAnswer to this question. // if question does not already exist then a new one will be created SurveyQuestionRepository surveyQuestionRepository = new SurveyQuestionRepository(); SurveyQuestion surveyQuestion; surveyQuestion = surveyQuestionRepository.GetSurveyQuestion(surveyContentId, questionType, questionText); if (surveyQuestion == null) { surveyQuestion = new SurveyQuestion() { QuestionText = questionText, QuestionType = questionType, SurveyContentId = surveyContentId }; } return surveyQuestion; } public static SurveyAnswer GetAnswer(XElement question) { // get the answer index value var answers = question.Elements().Where(e => e.Name.LocalName == "answers").SingleOrDefault(); int userAnswerIndex = Int32.Parse(answers.Attribute("userAnswerIndex").Value); // move the answers to an array so we can use the index to get the correct answer XElement[] answersArray = answers.Elements().ToArray(); SurveyAnswer answer = new SurveyAnswer() { AnswerText = answersArray[userAnswerIndex].Value }; return answer; } } ```
Entity Framework 4 and Repository Pattern problem
CC BY-SA 3.0
0
2011-06-09T17:49:58.053
2011-06-09T19:39:39.797
2011-06-09T18:32:02.793
202,820
202,820
[ "entity-framework-4", "repository-pattern" ]
6,297,135
1
6,298,021
null
3
5,278
Here's a JFrame which I intended to show with a series of JLabels with the following properties: - - - - - But I get this instead: ![enter image description here](https://i.stack.imgur.com/dP0x6.png) The blue text, stacked vertically, green border work OK but the white background and centered horizontally do not. I also would have thought the labels would span the entire width of the JPanel. What am I doing wrong? --- edit: Missed [this question](https://stackoverflow.com/questions/2380314/how-do-i-set-a-jlabels-background-color) about background color. So my remaining question is about BoxLayout and the positioning of components in the other axis. --- ``` import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants; public class BoxLayoutLabelsTest extends JFrame { public BoxLayoutLabelsTest(String title) { super(title); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); addLabel(panel, "Hydrogen"); addLabel(panel, "Helium"); addLabel(panel, "Lithium"); addLabel(panel, "Beryllium"); addLabel(panel, "Boron"); setContentPane(panel); pack(); setDefaultCloseOperation(EXIT_ON_CLOSE); } static private void addLabel(JPanel panel, String text) { JLabel label = new JLabel(text); label.setBorder(BorderFactory.createLineBorder(Color.GREEN)); label.setBackground(Color.WHITE); label.setForeground(Color.BLUE); label.setHorizontalAlignment(SwingConstants.CENTER); panel.add(label); } public static void main(String[] args) { new BoxLayoutLabelsTest("BoxLayoutLabelsTest").setVisible(true); } } ```
JLabel horizontal positioning not working as expected
CC BY-SA 3.0
null
2011-06-09T17:54:37.687
2011-06-09T20:44:45.453
2017-05-23T11:54:07.570
-1
44,330
[ "swing", "jlabel", "layout-manager" ]
6,297,386
1
6,297,536
null
3
697
Using VisualBrush, I am taking snapshots of a Window that contains a TabControl. ![enter image description here](https://i.stack.imgur.com/wqgaR.png) ![enter image description here](https://i.stack.imgur.com/J8pcM.png) If I just take a picture of the TabControl or the DockPanel, everything works fine, this problem is particular to taking a picture of the Window. Help!! ``` using System; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; namespace WpfVisual { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { var bitmapSource = this.TakeSnapshot(this); Snapshot.Source = bitmapSource; } public BitmapSource TakeSnapshot(FrameworkElement element) { if (element == null) { return null; } var width = Math.Ceiling(element.ActualWidth); var height = Math.Ceiling(element.ActualHeight); element.Measure(new Size(width, height)); element.Arrange(new Rect(new Size(width, height))); var visual = new DrawingVisual(); using (var dc = visual.RenderOpen()) { var target = new VisualBrush(element); dc.DrawRectangle(target, null, new Rect(0, 0, width, height)); dc.Close(); } var renderTargetBitmap = new RenderTargetBitmap((int)width, (int)height, 96, 96, PixelFormats.Pbgra32); renderTargetBitmap.Render(visual); // maybe here? return renderTargetBitmap; } } } ``` ``` <Window x:Class="WpfVisual.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <DockPanel> <TabControl x:Name="Tabs" DockPanel.Dock="Left" Width="200"> <TabItem Header="Uno"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" Foreground="Red">#1</TextBlock> </TabItem> <TabItem Header="Dos"> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" Foreground="Green">#2</TextBlock> </TabItem> </TabControl> <Button DockPanel.Dock="Top" Margin="10" FontSize="14" Click="Button_Click">Take a snapshot</Button> <Image x:Name="Snapshot" Margin="10,0,10,10"></Image> </DockPanel> </Window> ```
VisualBrush from Window retains image of previous VisualBrush
CC BY-SA 3.0
0
2011-06-09T18:18:51.360
2011-06-09T18:31:35.460
null
null
339,843
[ "c#", "wpf", "visualbrush" ]
6,297,495
1
6,425,162
null
4
7,278
I've got long labels for a couple checkboxfields in my app, and unfortunately it causes some strange behavior. ![screenshot](https://i.stack.imgur.com/nbkAr.jpg) Is there any way to make this look a little better? I mean, if I 'touch' the gray area, the checkbox does not activate (even if the checkbox is inside the gray area)... but instead I have to click the white area. It's just kinda confusing. Even if I set `labelWidth: '80%'` to each `checkboxfield`, the words still wrap and show that little gray area. I'd rather that area be all white and all of it be 'touchable' to activate the checkbox.
Sencha Touch checkboxfield has funky layout with long label
CC BY-SA 3.0
0
2011-06-09T18:28:30.187
2012-06-28T19:54:49.273
2011-06-09T18:35:04.257
124,069
124,069
[ "checkbox", "sencha-touch" ]
6,297,661
1
6,297,713
null
0
55
``` public static void main(String args[]) { Random r = new Random(); BufferedImage buf = new BufferedImage(500, 500, BufferedImage.TYPE_3BYTE_BGR); Point[] points = new Point[50]; for(int i = 0; i < points.length; i++) { points[i] = new Point(r.nextInt(500), r.nextInt(500)); } int b = Color.BLUE.getRGB(); int w = Color.WHITE.getRGB(); int g = Color.GREEN.getRGB(); for(int i = 0; i < points.length; i++) { buf.setRGB(points[i].x, points[i].y, b); } Point close = null; int max = 5000; for(int k = 0; k < points.length; k++) { Point p = points[k]; int d = distance(0, 0, p.x, p.y); if(d < max) { close = p; d = max; } } Graphics gr = buf.getGraphics(); gr.drawLine(0, 0, close.x, close.y); try { ImageIO.write(buf, "png", new File("this.png")); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static int distance(int x1, int y1, int x2, int y2) { return (int)Math.sqrt((Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2))); } ``` I'll get images similar to this, but it's quite obviously not right...and I'm stumped as to why it won't work. ![](https://i.stack.imgur.com/LoXSX.png) --- EDIT: What it should look like is this: simply a line from the origin to the ![](https://i.stack.imgur.com/F9Fwn.png)
Why isn't the below code drawing a line closest to the top left?
CC BY-SA 3.0
null
2011-06-09T18:43:50.053
2011-06-09T19:07:02.500
2011-06-09T19:07:02.500
418,556
215,515
[ "java", "distance" ]
6,297,744
1
7,495,178
null
1
1,115
Is there any way to avoid the rendered HTML elements in a `WebView` from being cut when printing? This is a sample of what I'm trying to avoid: ![WebView image rendered in webview, cut when printed](https://i.stack.imgur.com/ZnsxK.png) I'm printing to PDF using the following code: ``` // Copy the NSPrintInfo's sharedPrintInfo dictionary to start off with sensible defaults NSDictionary* defaultValues = [[NSPrintInfo sharedPrintInfo] dictionary]; NSMutableDictionary* printInfoDictionary = [NSMutableDictionary dictionaryWithDictionary:defaultValues]; // Set the target destination for the file [printInfoDictionary setObject:[savePanel URL] forKey:NSPrintJobSavingURL]; // Create the print NSPrintInfo instance and change a couple of values NSPrintInfo* printInfo = [[[NSPrintInfo alloc] initWithDictionary: printInfoDictionary] autorelease]; [printInfo setJobDisposition:NSPrintSaveJob]; [printInfo setRightMargin:30.0]; [printInfo setLeftMargin:30.0]; [printInfo setTopMargin:70.0]; [printInfo setBottomMargin:70.0]; [printInfo setHorizontalPagination: NSFitPagination]; [printInfo setVerticalPagination: NSAutoPagination]; [printInfo setVerticallyCentered:NO]; [printInfo setHorizontallyCentered:NO]; // Create the print operation and fire it up, hiding both print and progress panels NSPrintOperation* printOperation = [NSPrintOperation printOperationWithView:view printInfo:printInfo]; [printOperation setShowsPrintPanel:NO]; [printOperation setShowsProgressPanel:NO]; [printOperation runOperation]; ```
Printing (Cocoa) WebView contents results in cut images
CC BY-SA 3.0
0
2011-06-09T18:51:45.397
2011-09-21T05:55:37.947
null
null
366,091
[ "html", "cocoa", "image", "webview" ]
6,297,791
1
6,329,380
null
1
3,328
I have a list view where each textview is supposed to show the value of the seekbar. I have got it working such that once the onStopTrackingTouch is called for a seekbar I update the corresponding textview. I would like for the change to occur as the user is moving the seekbar but I am having trouble doing the same as the listview doesn't refresh that often. ![enter image description here](https://i.stack.imgur.com/NGqWY.png) What would be an ideal method to achieve this?
Refresh seekbar + textview in a listview
CC BY-SA 3.0
0
2011-06-09T18:55:35.020
2015-02-27T06:33:48.483
null
null
304,673
[ "android", "listview", "textview", "seekbar" ]
6,297,996
1
null
null
0
1,990
Is it possible to flip a string vertically in C#, e.g. given ``` string s= "123456"; ``` The result is:![enter image description here](https://i.stack.imgur.com/IBdoJ.png) I need to assign the resulting string to a string type in C#. The reason I need the function is that I have a chart that needs to be rotated to meet requirements. Therefore, any texts within the chart have to be rotated.
C# how to flip a string vertically
CC BY-SA 3.0
null
2011-06-09T19:12:35.473
2011-12-09T14:42:57.193
2011-06-10T22:25:22.380
102,937
665,335
[ "c#", "string", "flip" ]
6,298,142
1
6,298,252
null
0
1,908
I'm just getting started with the canvas element and I want to create something like the panning element [here](http://www.ncbi.nlm.nih.gov/projects/sviewer/?id=NC_000001): and for the sake of clarity, it's pictured here: ![panning element](https://i.stack.imgur.com/UzYQ2.png). I'd like to maintain very similar functionality. to the example that I posted. I've made a [rough mockup](http://jsfiddle.net/radu/sjcbp/show/) (excuse terrible quality of code) of what I'd like to do. So, I've recently switched my graphics to employ canvas rather than clumsily styled DOM elements and I was wondering if it'd be wise to take the same route for this panning element. Also, how can I avoid redrawing the entire frame every time the panning element is moved or resized?
Adding user interaction to canvas element
CC BY-SA 3.0
null
2011-06-09T19:26:30.283
2011-06-09T19:36:15.220
null
null
383,744
[ "html", "canvas" ]
6,298,316
1
6,298,550
null
5
367
I've got a CSS problem. My DIVs are laying out differently depending on when I run my web app from the web server versus my local VS2010 development server. My three inside DIVs (preButtons, navContainer, postButtons) are all displayed inline when I run locally, but when I publish and run from IIS 7.5 web server there is a line break after each div. Any idea what I'm missing? Here is the HTML: ``` <style type="text/css"> div#pager div { display: inline-block; } #navContainer { width: 340px; height: 28px; overflow: hidden; position: relative; } #reel { position: absolute; top: 0; left: 0; width: 0; } </style> <div id="pager" class="buttons"> <div id="preButtons"></div> <div id="navContainer"> <div id="reel"> </div> </div> <div id="postButtons"></div> </div> ``` UPDATE: Here is a screenshot of the problem in action. The blue border is because I have the "pager" div selected in IE developer tools. ![enter image description here](https://i.stack.imgur.com/eDSgd.jpg) UPDATE: At the end of the day my issue was two-fold. My HTML & CSS needed to be cleaned up as was indicated, but also my site was opening in compatibility mode. This was because the option "Display Intranet Sites in Compatibility View" was checked positive under Tools --> Compatibility View Settings. I think was set automatically when my company deployed IE8 to our desktops. Thanks for everyone's help!
DIV layout is different when I run app from web server as opposed to local dev server
CC BY-SA 3.0
0
2011-06-09T19:41:32.333
2012-11-09T15:34:57.240
2012-11-09T15:34:57.240
364,708
708,430
[ "css", "html" ]
6,298,438
1
6,298,602
null
2
2,303
How do I let my include exactly at the end of the screen? At the time he gets to the end of the content. ``` <!-- language: lang-xml --> <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#f6ba79" android:orientation="vertical" android:id="@+id/layout"> <LinearLayout android:id="@+id/linearLayout2" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/preferences_background"> <include android:id="@+id/include1" android:layout_width="fill_parent" layout="@layout/top" android:layout_height="wrap_content"></include> <LinearLayout android:layout_width="fill_parent" android:gravity="center" android:id="@+id/linearLayout1" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_width="270dp" android:id="@+id/body" android:layout_height="wrap_content" android:focusableInTouchMode="true"> <ImageView android:src="@drawable/preferences" style="@style/Theme.Connector.ImageElement" android:layout_width="wrap_content" android:id="@+id/title" android:layout_height="wrap_content"></ImageView> <Spinner android:layout_width="fill_parent" style="@style/Theme.Connector.WelcomeSpinner" android:layout_weight="1" android:id="@+id/spinner_isp" android:layout_height="wrap_content" /> <EditText android:singleLine="true" android:hint="@string/txt_user" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edit_user" style="@style/Theme.Connector.PreferencesInput" /> <EditText android:singleLine="true" android:hint="@string/txt_password" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edit_password" android:password="true" style="@style/Theme.Connector.PreferencesInput" /> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:id="@+id/frm_action" android:layout_height="fill_parent" android:baselineAligned="false"> <Button android:text="@string/btn_save" android:layout_weight="0" android:layout_width="130dp" android:layout_height="wrap_content" style="@style/Theme.Connector.Button" android:layout_gravity="center" android:id="@+id/btn_save"></Button> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout> </ScrollView> <include android:id="@+id/include1" android:layout_width="fill_parent" layout="@layout/menu" android:layout_height="wrap_content" android:layout_alignParentBottom="true"></include> </RelativeLayout> ``` ![Device Screen Capture](https://i.stack.imgur.com/CFhEq.png)
RelativeLayout, Include and layout_alignParentBottom doesn't work
CC BY-SA 3.0
null
2011-06-09T19:52:43.363
2011-06-09T20:06:33.197
null
null
564,416
[ "android", "xml", "user-interface" ]
6,298,572
1
6,298,604
null
4
4,359
I have created initial import of my eclipse project to local file like this: ``` $svn import /home/miso/workspace/DatabaseManager/ file:///home/miso/svn/dbman -m 'Initial import' ``` Now I'd like to add this SVN repository to my Eclipse project (inside Eclipse itself). When I try to add new repository via SVN Reposistory Perspective (it came probably with Subclipse plugin) and navigate to `file:///home/miso/svn/dbman` then I get only this result: ![enter image description here](https://i.stack.imgur.com/rrxtO.png) What did I wrong? Thanks
Eclipse + Subclipse: SVN can't open local repository
CC BY-SA 3.0
0
2011-06-09T20:03:24.080
2011-06-10T18:27:20.260
null
null
314,073
[ "eclipse", "svn", "subclipse" ]
6,298,744
1
6,336,849
null
2
5,406
I've done this before, but it was a long trial and error process that resulted with my test machine having multiple copies of php, oci8, and the instant client, and I'm still not sure what it was that I did that made it work. So far, i've set up `yum` to use the remi repository, done `yum install php php-oci8 php-pdo`, and downloaded the oracle instant client and done `rpm -Uh oracle-instantclient11.2-basic-11.2.0.2.0.x86_64\ \(1\).rpm` When I do `phpinfo()` on a page though, it still doesn't list oci8 as one of the modules. I think the error is with the `ORACLE_HOME` environment variable, but I'm not sure what it's supposed to be set to. right now i have: ``` SetEnv LD_LIBRARY_PATH /usr/lib/oracle/11.2/client64/lib SetEnv ORACLE_HOME /usr/lib/oracle/11.2 ``` in /etc/httpd/conf/httpd.conf The last time I got this working I think I just kept on uninstalling php and php-oci8 and re-installing until things worked. My working server has ORACLE_HOME set like this: ![working server](https://lh6.googleusercontent.com/-N5XZHSTam_I/TfE2qQyTGgI/AAAAAAAAD1w/raXlUX6pvHk/enviroment.png) But the new non working one has ORACLE_HOME set here: ![non-working server](https://lh4.googleusercontent.com/-k5Nw1lucphI/TfE2sWLJvFI/AAAAAAAAD10/WMlgIjDSVXo/apacheviroment.png) how do i set the ORACLE_HOME that is in the `Enviroment` section of phpinfo()?
Setup oci8 on rhel 6 with REMI repository
CC BY-SA 3.0
null
2011-06-09T20:18:16.570
2012-12-20T22:21:42.603
2012-12-20T22:21:42.603
367,456
783,283
[ "php", "apache", "oracle-call-interface", "rhel" ]
6,299,060
1
6,299,306
null
5
873
I would like to have the Pink & Green CheckBox Control to be displayed on a single line. Despite extensive look on the ControlPlacement Help, I cannot adapt it to make it work. ``` Manipulate[ Graphics[{If[thePink, {Pink, Disk[{5, 5}, r]}], If[theGreen, {Green, Disk[{4, 2}, r]}]}, PlotRange -> {{0, 20}, {0, 10}}], {{r, 1, Style["Radius", Black, Bold, 12]}, 1, 5, 1, ControlType -> Setter, ControlPlacement -> Top}, {{thePink, True, Style["Pink", Black, Bold, 12]}, {True, False}}, {{theGreen, False, Style["Green", Black, Bold, 12]}, {True, False}}] ``` ![enter image description here](https://i.stack.imgur.com/BUb3x.png)
Control Placement using Manipulate in Mathematica
CC BY-SA 3.0
0
2011-06-09T20:48:10.213
2015-08-06T11:17:40.290
2015-08-06T11:17:40.290
1,743,957
769,551
[ "wolfram-mathematica", "controls" ]
6,299,215
1
6,299,430
null
3
989
Would it be possible to have a to show or not the different Shapes. With Green & Red written in each Button of the TogglerBar ? ``` Manipulate[ Graphics[{If[thePink, {Pink, Disk[{5, 5}, 3]}], If[theGreen, {Green, Disk[{15, 2}, 1]}]}, PlotRange -> {{0, 20}, {0, 10}}], {{thePink, True, Style["Pink", Black, Bold, 12]}, {True, False}}, {{theGreen, True, Style["Green", Black, Bold, 12]}, {True, False}}] ``` ![enter image description here](https://i.stack.imgur.com/Ho50a.png) The actual Manipulate object I am trying to adjust can be found there : [http://www.laeh500.com/LAEH/COG.html](http://www.laeh500.com/LAEH/COG.html) The purpose being to replace the CheckBox by a nice TogglerBar.
Can TogglerBar be used as multiple CheckBox in Mathematica?
CC BY-SA 3.0
null
2011-06-09T20:59:56.627
2015-08-06T11:13:44.997
2015-08-06T11:13:44.997
1,743,957
769,551
[ "checkbox", "wolfram-mathematica", "togglebutton" ]
6,299,334
1
6,299,363
null
5
1,228
This question is begging for a bunch of "why are you doing this?" responses. I haven't been able to find this information in the [68k Programmer's Reference Manual](http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf), but that may be because I'm not sure of what verbiage to search for. Here is the instruction format for the 68k's `ADD` opcode. ![enter image description here](https://i.stack.imgur.com/5e9XA.png) Bits 0-2 and 9-11 designate registers. What are the binary representations of the 68k's registers? Are they "addresses"? Yes, I am aware that I can write a 68k assembly program and debug it to find this information. I'm looking for a reference. Thanks!
68k register addresses
CC BY-SA 3.0
0
2011-06-09T21:11:01.443
2015-02-26T19:05:18.073
2011-06-09T21:12:03.200
36,723
215,148
[ "assembly", "machine-code", "instruction-set", "68000" ]
6,299,482
1
null
null
6
5,865
In one of my view I'm using a UIWebView and I like the default shadow effects on top and bottom of the background view, and also top and bottom of the scroll area. There is the same in the Clock app, with a custom background (blue line with world map) so it is possible using a UITableView also I guess... Here is what I have with my web view, and that I'd like to add to a table view. My web view: ![enter image description here](https://i.stack.imgur.com/XBqlW.png) So I added an custom background here (the light gray texture). Here is below the other view where I added the same background, but as you can see there is no shadow... It's not a built-in effect as a UIScrollView I guess. Is there a way to do the same with a table view? My table view: ![enter image description here](https://i.stack.imgur.com/oOPL9.png) I found this great article [UITableView Shadows](http://cocoawithlove.com/2009/08/adding-shadow-effects-to-uitableview.html) but there is no shadow for the bottom of the view.
UITableView Shadows top and bottom
CC BY-SA 3.0
0
2011-06-09T21:23:06.220
2015-08-05T09:26:23.707
2011-06-09T22:46:57.857
392,178
318,830
[ "iphone", "uitableview", "uiscrollview", "gradient" ]
6,299,513
1
6,299,607
null
0
61
Hi Folks i just want to know how can i make a or a "/n" inside of an expression of Microsoft reports i need to print the result ( for example ) Lab: lab something name: name something Minimum ammount: $12356, % of discount: 5% and i have this so far ``` ="Laboratorio:"& Fields!NombreProveedor.Value & "Nombre Oferta: " & Fields!NombreOferta.Value & "Monto Minimo: " & Fields!MontoMinimo.Value & "% de descuento " & Fields!Descuento.Value ``` ![enter image description here](https://i.stack.imgur.com/7LnaX.png)
Microsoft Reports Expressions ( <br/> )
CC BY-SA 3.0
null
2011-06-09T21:25:43.640
2015-11-08T23:30:44.557
2015-11-08T23:30:44.557
1,505,120
618,812
[ "report", "expression" ]
6,299,535
1
12,034,260
null
1
861
I have an iPhone Application, that uses a Navigation controller and TabBar controller. In a first view, I show an a tableview, and when I click on first tableview cell, I set a new view with new Toolbar and without TabBar. The new view correctly shows the toolbar, but this is far from 40px down, as if it were always leaving the seat to the previous TabBar. In that regard, I saw that Interface Builder sets the size of the view in 320 x 460, and not with the classic 320 x 480. Unfortunately they are not editable fields (they are grayed out as if it were a lock). Why? Images: iPhone APP ![iPhone APP](https://i.stack.imgur.com/viw8G.jpg) [http://img89.imageshack.us/img89/5717/schermata20110531a00243.jpg](http://img89.imageshack.us/img89/5717/schermata20110531a00243.jpg) Interface Builder Options ![Interface Builder Options](https://i.stack.imgur.com/TX1FW.png) [http://img716.imageshack.us/img716/2817/schermata20110531a00250.png](http://img716.imageshack.us/img716/2817/schermata20110531a00250.png) Thanks, Alessandro from Italy
Set Toolbar position in View when hide the TabBar
CC BY-SA 3.0
0
2011-06-09T21:28:14.307
2012-09-06T13:04:46.710
2011-12-21T21:47:19.080
53,195
789,917
[ "iphone", "ios", "view", "uitabbarcontroller", "toolbar" ]
6,299,569
1
6,299,932
null
2
743
I would like to create a little game where user would simply move some images around with their mouse to create some shapes. I found about this possibility in the [Nutts Puzzle](http://demonstrations.wolfram.com/NuttsPuzzle/) Demo by Karl Scherer. However looking into the source code I can`t figure out which part enable to manipulate the shapes with the mouse. ![enter image description here](https://i.stack.imgur.com/B1dha.png)
Move objects with the mouse using Manipulate in Mathematica
CC BY-SA 3.0
null
2011-06-09T21:31:33.517
2015-08-06T11:13:36.527
2015-08-06T11:13:36.527
1,743,957
769,551
[ "wolfram-mathematica", "mouse" ]
6,299,658
1
6,300,714
null
9
1,688
. Also, please don't be offended if I don't accept one answer, since this question seems to be rather open-ended. (But, if you solve it, you get the check mark, of course). Another user had posted a question about parallelizing a merge sort. I thought I'd write a simple solution, but alas, it is not much faster than the sequential version. ## Problem statement Merge sort is a divide-and-conquer algorithm, where the leaves of computation can be parallelized. ![mergesort](https://i.stack.imgur.com/nlxup.jpg) The code works as follows: the list is converted into a tree, representing computation nodes. Then, the merging step returns a list for each node. Theoretically, we should see some significant performanc gains, since we're going from an (n log n) algorithm to an (n) algorithm with infinite processors. The first steps of the computation are parallelized, when parameter (level) is greater than zero below. This is done by [via variable ] selecting the strategy, which will make sub-computation occur in parallel with . Then, we merge the results, and force its evaluation with . ``` data Tree a = Leaf a | Node (Tree a) (Tree a) deriving (Show) instance NFData a => NFData (Tree a) where rnf (Leaf v) = deepseq v () rnf (Node x y) = deepseq (x, y) () listToTree [] = error "listToTree -- empty list" listToTree [x] = Leaf x listToTree xs = uncurry Node $ listToTree *** listToTree $ splitAt (length xs `div` 2) xs -- mergeSort' :: Ord a => Tree a -> Eval [a] mergeSort' l (Leaf v) = return [v] mergeSort' l (Node x y) = do xr <- strat $ runEval $ mergeSort' (l - 1) x yr <- rseq $ runEval $ mergeSort' (l - 1) y rdeepseq (merge xr yr) where merge [] y = y merge x [] = x merge (x:xs) (y:ys) | x < y = x : merge xs (y:ys) | otherwise = y : merge (x:xs) ys strat | l > 0 = rpar | otherwise = rseq mergeSort = runEval . mergeSort' 10 ``` By only evaluating a few levels of the computation, we should have decent parallel as well -- some constant factor order of . ## Results Obtain the 4th version source code here [ [http://pastebin.com/DxYneAaC](http://pastebin.com/DxYneAaC) ], and run it with the following to inspect thread usage, or subsequent command lines for benchmarking, ``` rm -f ParallelMergeSort; ghc -O2 -O3 -optc-O3 -optc-ffast-math -eventlog --make -rtsopts -threaded ParallelMergeSort.hs ./ParallelMergeSort +RTS -H512m -K512m -ls -N threadscope ParallelMergeSort.eventlog ``` Results on a 24-core X5680 @ 3.33GHz show little improvement ``` > ./ParallelMergeSort initialization: 10.461204s sec. sorting: 6.383197s sec. > ./ParallelMergeSort +RTS -H512m -K512m -N initialization: 27.94877s sec. sorting: 5.228463s sec. ``` and on my own machine, a quad-core Phenom II, ``` > ./ParallelMergeSort initialization: 18.943919s sec. sorting: 10.465077s sec. > ./ParallelMergeSort +RTS -H512m -K512m -ls -N initialization: 22.92075s sec. sorting: 7.431716s sec. ``` Inspecting the result in threadscope shows good utilization for small amounts of data. (though, sadly, no perceptible speedup). However, when I try to run it on larger lists, like the above, it uses about 2 cpus half the time. It seems like a lot of sparks are getting pruned. It's also sensitive to the memory parameters, where 256mb is the sweet spot, 128mb gives 9 seconds, 512 gives 8.4, and 1024 gives 12.3! ## Solutions I'm looking for Finally, if anyone knows some high-power tools to throw at this, I'd appreciate it. (Eden?). My primary interest in Haskell parallelism is to be able to write small supportive tools for research projects, which I can throw on a 24 or 80 core server in our lab's cluster. Since they're not the main point of our group's research, I don't want to spend much time on the parallelization efficiency. So, for me, simpler is better, even if I only end up getting 20% usage. ## Further discussion - [homepage](http://research.microsoft.com/en-us/projects/threadscope/)- -
No speedup with naive merge sort parallelization in Haskell
CC BY-SA 3.0
0
2011-06-09T21:41:01.950
2011-06-11T01:10:24.020
2011-06-10T19:56:54.720
81,636
81,636
[ "haskell", "mergesort", "parallel-processing" ]
6,300,018
1
6,300,579
null
0
1,108
Contrast these two snippets of HTML: ``` <ul class="ui-state-default" style="list-style-type: none; margin: 0; padding: 0;"> <li> <table><tr> <td>Testing.</td> <td>One</td> <td>Two</td> <td>Three</td> </tr></table> </li> </ul> ``` Applying "ui-state-default" to a list, as in above, is roughly the desired appearance (nested table above is only used to make the result look similar to code below). However, when I try the same with just a table: ``` <table> <tbody> <tr class="ui-state-default"> <td>Testing.</td> <td>One</td> <td>Two</td> <td>Three</td> </tr> </tbody> </table> ``` I get nearly the same look, but the table has ugly white lines between the elements. Also, the TR doesn't have the nice border that the LI does. Screenshot: ![image of those two code snippets as rendered in IE9 quirks mode, similar in other browsers](https://i.stack.imgur.com/jnyk2.png) I really want to use the table version of jQuery UI sortable, but I can't seem to whip up any CSS magic that will make the TR look nice like the LI. Any bright ideas? --- edit: [jsFiddle magically makes it work perfectly](http://jsfiddle.net/S3ugZ/) (relevant lines of css copy/pasted directly from my the jquery-ui css source that I'm using. However, when I create the exact same page myself (even limiting myself to only the css pasted in the jsFiddle) and load it into a web browser, it retains the same erroneous behavior described above, whether or not I add a doctype to enter/exit quirks mode. ``` <html> <head> <style type="text/css"> .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } </style> </head> <body> <ul class="ui-state-default" style="list-style-type: none; margin: 0; padding: 0;"> <li> <table><tr> <td>Testing.</td> <td>One</td> <td>Two</td> <td>Three</td> </tr></table> </li> </ul> <br /><br /> <table> <tbody> <tr class="ui-state-default"> <td>Testing.</td> <td>One</td> <td>Two</td> <td>Three</td> </tr> </tbody> </table> </body> </html> ```
jQuery sortable: style table same as list
CC BY-SA 3.0
0
2011-06-09T22:22:10.277
2011-06-09T23:53:54.900
2011-06-09T23:04:28.027
208,257
208,257
[ "jquery", "css", "jquery-ui", "jquery-ui-sortable", "html-table" ]
6,300,171
1
6,300,876
null
6
2,799
i am using this [plugin](http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/samples/normal.html) Now i am doing a way to clone the select dropdown. A button to add cloned divs. So, an user have a initial dropdown, but he can add more. The div is cloned. The main problem is that when i clone the div, the dropdown is associated to initial dropdown and no to the new, that is cloned. The result is: all dropdowns of the new cloned divs have the event to open the select associated to the first. ![enter image description here](https://i.stack.imgur.com/2cfp3.png) Script to call the plug in ``` <script language="javascript" type="text/javascript"> $(document).ready(function() { $(".mydds").msDropDown(); }) </script> ``` script to clone ``` <script type="text/javascript"> $(document).ready(function() { $('#adicionar').live('click', function(){ var num = $('.linguas').length; var newNum = new Number(num + 1); var newElem = $('#copiar' + num).clone(true).prop('id', 'copiar' + newNum); newElem.children(':text').prop('name', "myformdata[languages" + newNum + "]").prop('languages', 'languages' + newNum).val(''); $('#copiar' + num).after(newElem); $('#apagar').prop('disabled', ''); }); </script> ``` Any idea to solve the problem? Basically i think the event associated to dropdown is not copied... thanks
problem when clone - jquery
CC BY-SA 3.0
0
2011-06-09T22:45:30.857
2011-06-10T17:15:11.687
2011-06-10T13:02:31.317
455,318
455,318
[ "javascript", "jquery", "events", "clone" ]
6,300,210
1
6,300,236
null
0
487
I'm trying to align a div at the bottom of another div (parent/child), but I can't seem to figure it out. ![enter image description here](https://i.stack.imgur.com/PPqJ3.png) What I want to do is align the text that has the date as well as the edit/delete links to the bottom of the "bubble". Here's the code I'm using: ``` <div class="bubble_wrap"> <div class="bubble_image"><img src="http://sitefrost.com/images/avatars/Avatar-3-Admin.gif"></div> <div class="bubble_content"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pellentesque auctor imperdiet. Morbi mollis nulla et odio scelerisque rutrum. Fusce sem justo, porta vel lacinia quis, convallis et elit. Sed id velit ut magna lobortis placerat at ut lectus. Aenean vel velit sem. <div class="date">June 9th, 2011 at 12:01 pm &ndash; <a href="#">Edit</a>&nbsp;&nbsp;<a href="#">Delete</a></div> </div> </div> .bubble_wrap { overflow: auto; margin-bottom: 10px; } .bubble_wrap .bubble_image { float: left; margin-right: 0px; margin-bottom:3px; } .bubble_wrap .bubble_image img { max-width: 85px; max-height: 85px; } .bubble_wrap .bubble_content { width: 565px; min-height:60px; background: #fbfcfe; background: -moz-linear-gradient(top, #fbfcfe 0%, #f3f4f6 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fbfcfe), color-stop(100%,#f3f4f6)); background: -webkit-linear-gradient(top, #fbfcfe 0%,#f3f4f6 100%); background: -o-linear-gradient(top, #fbfcfe 0%,#f3f4f6 100%); background: -ms-linear-gradient(top, #fbfcfe 0%,#f3f4f6 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fbfcfe', endColorstr='#f3f4f6',GradientType=0 ); background: linear-gradient(top, #fbfcfe 0%,#f3f4f6 100%); border:1px solid #CFD0D2; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; float: right; padding:10px; position:relative; } .bubble_wrap.bubble_right .bubble_image { float: right; margin-right: 0px; margin-left: 0px; } .bubble_wrap.bubble_right .bubble_content { float: left; } .bubble_wrap.bubble_right .right { text-align:right; } .bubble_wrap .date { color: #888; font-size:11px; display:block; } .bubble_wrap .date a:link, a:visited, a:hover { text-decoration:none; font-weight:bold; color:#888; } ```
CSS/HTML Div Alignment
CC BY-SA 3.0
null
2011-06-09T22:51:51.793
2011-06-09T22:58:25.770
null
null
464,901
[ "html", "css" ]
6,300,332
1
6,363,980
null
1
8,703
I have a current Android app that uses i18n via resources. res/values-es/strings.xml and so on. When I test it on a device with the language set to Espanol it pulls the correct resources, from the values-es file, but the accent characters are way out of whack. For example, I want to use the lowercase o with an accent (ó). I have tried with the actual character in the strings.xml file (using the character map on Ubuntu to create the string) and with the entity, in either case it comes out like some other character set accent I don't recognize: ![enter image description here](https://i.stack.imgur.com/JYwnQ.png) The same character looks perfect WITHIN strings.xml when using many different text editors. And the file is UTF-8 (tried recreating it with the Android "wizard" tool in Eclipse to make sure). strings.xml ``` <?xml version="1.0" encoding="utf-8"?> <resources> <string name="label_app_version">Versión</string> </resources> ``` Now I've used French, and German before in other Android apps, with all sorts of accents, and haven't seen this problem, so I'm entirely confused at the moment. What am I doing wrong this time?
Android app showing incorrect Spanish accent characters
CC BY-SA 3.0
0
2011-06-09T23:10:07.650
2011-06-15T20:31:47.823
2011-06-09T23:18:02.533
252,676
252,676
[ "android", "internationalization" ]
6,300,450
1
6,302,402
null
4
2,168
Bear with me as I am coming from a traditional web development background, using ASP.Net, and even server side MVC. I am attempting to build a highly interactive single-page application using Backbone.js to help organize my javascript code and build the UI. I am having trouble with some concepts, or approaches to building the components of my UI, and deciding how to handle certain aspects. I am going to use this oversimplified screen shot as a basis for my questions and discussion. ![enter image description here](https://i.stack.imgur.com/dH8bx.png) Let's use a "TO-DO" application as an example (of course.) The UI is pretty simple. I have the following "components"... - - - - - - - - - There are several models that I identified that are "data" related. These were easy to identify. - - - - - - This is where I am having trouble. I want to show which items in my menus (on the left side) are currently selected. I can certainly listen for events and add a "selected" class to items as they are selected, but I also have rules, like "only one list can be selected at a time", but "any number of tags" can be selected at a time. Also, because the To-Do List menu and the tags menu are dynamic, they already are associated with a ToDoListCollection and TagCollection models already. They are rendered according to the state of these "data models". So, how do I handle the management of this UI state for all these different views using Backbone? I appreciate any ideas or suggestions. Thanks!
How to Handling UI State for Single Page App With Backbone
CC BY-SA 3.0
0
2011-06-09T23:29:18.653
2011-06-10T17:25:38.563
2011-06-10T17:25:38.563
161,349
161,349
[ "backbone.js" ]
6,300,590
1
6,300,662
null
3
2,942
I have an iframe on my site in a div. I have set both to 100% in height I'm also using the blueprint framework hence `span-12 last` for the class. My question is why is there still a scroll bar on the site? ``` <div id="friend_pane" style="background-color: #FF0000;height: 100%;" class="span-12 last"> <iframe id="friendpane_area" style="width: 515px; height: 100%" src="http://friendsconnect.org/friendpane/shell.php" frameborder="0" allowTransparency="true"></iframe> </div> ``` Rather than just extent as much as possible it goes past the bottom of the page and has a scroll bar. Why is it assuming this height? ![enter image description here](https://i.stack.imgur.com/haXNm.png) iFrame in DIV marked in red.
Why does the iframe extend past the end of the page when 100% in height?
CC BY-SA 3.0
0
2011-06-09T23:55:52.687
2011-06-10T00:50:17.323
null
null
648,865
[ "css", "iframe", "html" ]
6,300,699
1
6,302,063
null
1
923
A small number of our users are experiencing an error when they try to launch our application through ClickOnce. it shows ``` "Application cannot be started. Contact the application vendor." ``` ![Error Box](https://i.stack.imgur.com/sdjrj.png) From reading other solutions on the web, we've figured that clearing the cache either using dfshim or by manually deleting the contents of the cache folder does solve the problem. Is anyone aware of a general solution we could deploy to the end-user instead of having to clear the ClickOnce cache each time this problem occurs? Does anyone know the root cause of this cache corruption issue?
Clickonce deployment error
CC BY-SA 3.0
0
2011-06-10T00:15:06.950
2011-06-10T04:44:55.597
null
null
4,435
[ "caching", "clickonce" ]
6,300,770
1
null
null
1
2,973
I'm trying to process a fixed width input file in pentaho and validate the format. The file will be a mixture of strings, numbers and dates. However when attempting to process a number field that has an incorrect character present (which i had expected would throw an error) it just reads the first part of the number and ignores the bad char. I can recreate this issue with a very simple input file containing a single field: ![enter image description here](https://i.stack.imgur.com/Er8sT.jpg) I specify the expected number format, along with start position and length: ![enter image description here](https://i.stack.imgur.com/vDsTi.jpg) On running the transformation i would have expected the 'Q' to cause an error instead the following result is displayed, just reading the first two digits "67" and padding the rest to match the specified format: ![enter image description here](https://i.stack.imgur.com/vRUd1.jpg) If the input file is formatted correctly it runs perfectly well, but need it to throw an error otherwise. Any suggestions would be awesome. Thanks!
Pentaho Spoon - Validate Fixed Width Input File Format
CC BY-SA 3.0
null
2011-06-10T00:28:56.427
2011-06-15T12:10:48.187
null
null
672,119
[ "pentaho", "kettle" ]
6,300,777
1
null
null
0
836
I've got a meeting minutes/actions application that is having a few problems with Jquery UI sortable. I've uploaded a screencast of my problem: [http://screencast.com/t/YCiuJ3YS](http://screencast.com/t/YCiuJ3YS) This only happens in Chrome, firefox4 and IE8 are fine. Any other browser is irrelevant. Basically my task page loads like this: ![page as its loaded](https://i.stack.imgur.com/gVMSM.png) Then the user can collapse an action group ![minimize a heading ](https://i.stack.imgur.com/vH61Y.png) they can also drag and drop tasks in between groups. The picture below shows me using the Jquery UI sortable and I'm dragging it over the top of ![drag the task over the minimized area](https://i.stack.imgur.com/poQ1P.png) after doing this, for some reason it leaves the blank space there that it created for the placeholder. If I drag multiple times, this will just add more and more space. ![blank space remains](https://i.stack.imgur.com/R4y3m.png) I had a look in the DOM using the inspector to the left and I can't see any changes there that weren't reversed when I finished dragging. I'm using the latest Jquery UI, Jquery and Chrome. ANyone got any ideas of where i cna look?
JQuery UI Sortable putting blank positions in only Chrome?
CC BY-SA 3.0
null
2011-06-10T00:30:02.463
2011-09-09T04:31:10.387
null
null
126,597
[ "javascript", "jquery", "jquery-ui", "google-chrome" ]
6,301,169
1
6,318,337
null
0
324
I'm trying out the example Hello World from this link here: [http://www.mulesoft.org/documentation/display/MULE2INTRO/Quick+Start](http://www.mulesoft.org/documentation/display/MULE2INTRO/Quick+Start) I have the MuleIDE installed and I'm on the "Create a Mule Application" section. I'm following it, but at the end when Mule IDE generates the project, there is no conf directory with the hello-config.xml file. Where have I gone wrong? Any ideas? My created project looks like this below. Thanks :) ![enter image description here](https://i.stack.imgur.com/BQVZB.jpg)
Problems getting HelloWorld for Mule to work
CC BY-SA 3.0
null
2011-06-10T01:47:55.320
2016-05-03T04:39:51.963
null
null
556,282
[ "eclipse", "mule" ]
6,301,316
1
6,355,000
null
0
489
Problem: How elegantly add in more courses in a drop down in MVC3 I'm using a seperate screen, however ideally would like to have it all on the same screen, probably using ajax, and jquery. ![enter image description here](https://i.stack.imgur.com/XfmYi.png) ![enter image description here](https://i.stack.imgur.com/5z0HI.png)
Adding to a dropdown in MVC3
CC BY-SA 3.0
null
2011-06-10T02:18:10.147
2011-06-22T11:39:38.000
null
null
26,086
[ "jquery", "ajax", "model-view-controller", "asp.net-mvc-3" ]
6,301,315
1
null
null
1
537
There's a game I play on firefox, and there's a way to recruit soldiers to me and to other players, all I have to do is click on the same word of an image, like this: ![](https://i.stack.imgur.com/GJ1Gk.png) Once I clicked the image disappears and this message appears, saying I've recruited a soldier for that player. ![](https://i.stack.imgur.com/HNOhf.png) On page source this element is where's this message is located: ``` <div id='population_increase'>You have just increased player's population to 128.933.</div> ``` After that I have to manually copy this message, "" and paste on the textfield of this, located on another tab/site ![](https://i.stack.imgur.com/d7hfI.png) This would be the proof, that others players need, to know I've clicked on them. So since I've to do this about twenty times a day, I'd like to ask if anybody knows any way to help to do this procedure. Like copy that text I need to highlight and copy manually, or just highlight that to me press ctrl+c. I've tryied looking for javascript/greasemonkey scripts without success and imacros too. The perfect automate procedure would be get that text I need to copy and throw to the textfield on the another tab, click send data and change tab to the other link that would be opened once send data was clicked, but I believe that would be very difficulty or impossible to do it, so any help would be welcome! thanks in advance.
auto highlight/copy
CC BY-SA 3.0
null
2011-06-10T02:17:49.743
2011-07-12T10:36:57.780
2011-06-10T03:15:00.730
197,788
792,006
[ "javascript", "copy-paste", "highlight", "imacros" ]
6,301,326
1
6,393,453
null
2
636
I've created a nav menu like in the screenshot below. It spans the entire width of the container and the left/right padding of each menu item is constant. This was easy to do by hardcoding the left/right padding in the CSS, but I want the paddings to be able to change as the site admin edits the menus. Is there a way to do this with pure CSS (CSS3 is okay)? This was easy enough to do with jQuery (I totaled up the width of the menu items and calculated the necessary padding). But I ran into some issues on some browsers due to our use of Google Web Fonts. On Chrome and Firefox 4 on Windows (not on Mac), the web font was not loaded at the time that my script ran, resulting in incorrect width measurements. I tried running the script in the [jQuery's DOM ready event](http://api.jquery.com/ready/) and in the [Google Font API's active event](http://code.google.com/apis/webfonts/docs/webfont_loader.html#Events). The `active` event worked in Chrome but in Firefox 4 it was often fired before the font had been applied. Thanks in advance. ![screenshot of nav menu](https://i.stack.imgur.com/cEsIo.png)
Nav menu that spans entire container width with constant horizontal padding
CC BY-SA 3.0
null
2011-06-10T02:20:04.480
2011-06-18T02:26:12.057
null
null
239,965
[ "menu", "css", "padding", "webfonts" ]
6,301,446
1
6,301,487
null
0
3,386
In my table, I would like to keep all rows' height even and so I am setting td height with the following jQuery script ``` $(document).ready(function() { $(".striped tr").css("min-width", "540px").css("padding-left", "5px"); $(".striped tr:odd").css("background-color", "#EDEDED"); $(".striped").css("font-size", "13px"); $(".striped td").css("min-height", "26px").css("vertical-align", "middle").css("display", "block"); }); ``` Page looked like this before the script is applied: ![enter image description here](https://i.stack.imgur.com/anqI4.jpg) after script is applied: ![enter image description here](https://i.stack.imgur.com/FTO3h.jpg) Where is the mistake?
HTML - Cant set <TD> Height properly with jQuery
CC BY-SA 3.0
null
2011-06-10T02:43:02.473
2011-06-10T14:39:13.217
2011-06-10T14:39:13.217
144,491
315,445
[ "jquery", "html", "jquery-selectors", "html-table" ]
6,301,483
1
6,301,534
null
0
115
Here's my current fiddle: [http://jsfiddle.net/UjAQf/28/](http://jsfiddle.net/UjAQf/28/) I want to design the table in such a way that it looks like this: ![enter image description here](https://i.stack.imgur.com/VqpHW.png) How do a nest an inner table like the one mocked-up here? I'm not sure that's even the right approach, so please suggest. ``
Table design - inner table?
CC BY-SA 3.0
null
2011-06-10T02:50:31.990
2017-07-20T16:57:37.357
2017-07-20T16:57:37.357
4,370,109
251,257
[ "html", "css", "html-table" ]
6,301,478
1
6,301,882
null
5
6,095
I'm working on a `CustomControl` that inherits from `TextBox` and can be re-sized by holding `Ctrl`while dragging the mouse, but sometimes when you re-size it, lines get cut off like this: ![enter image description here](https://i.stack.imgur.com/illC8.png) If this happens, I would like to adjust the chosen height, so that lines are not cut off. This is the code I have so far: ``` double LineHeight = ??; double requiredHeightAdjustment = this.Height % LineHeight; if (requiredHeightAdjustment != 0) { this.Height -= requiredHeightAdjustment; } ``` In case anyone needs this in the future here is what I ended up with: ``` double fontHeight = this.FontSize * this.FontFamily.LineSpacing; double requiredHeightAdjustment = this.Height % fontHeight; var parent = this.Parent as FrameworkElement; if (requiredHeightAdjustment != 0) { double upwardAdjustedHeight = (fontHeight - requiredHeightAdjustment) + this.Height; if (requiredHeightAdjustment >= fontHeight / 2 && this.MaxHeight >= upwardAdjustedHeight && (parent == null || parent.ActualHeight >= upwardAdjustedHeight)) this.Height = upwardAdjustedHeight; else this.Height -= requiredHeightAdjustment; } ``` This solution also makes the smallest necessary change to the chosen `TextBox` size instead of always making a negative change.
Wpf- How can I get the LineHeight of a normal TextBox in code?
CC BY-SA 3.0
0
2011-06-10T02:49:22.397
2021-04-27T11:10:36.843
2011-06-10T22:37:50.207
268,336
268,336
[ "c#", "wpf", "textbox" ]
6,301,676
1
6,307,392
null
18
10,129
There are times when exporting to a pdf image is simply troublesome. If the data you are plotting contains many points then your figure will be big in size and the pdf viewer of your choice will spend most of its time rendering this high quality image. We can thus export this image as a jpeg, png or tiff. The picture will be fine from a certain view but when you zoom in it will look all distorted. This is fine to some extent for the figure we are plotting but if your image contains text then this text will look pixelated. In order to try to get the best of both worlds we can separate this figure into two parts: Axes with labels and the 3D picture. The axes can thus be exported as pdf or eps and the 3D figure as a raster. I wish I knew how later combine the two in Mathematica, so for the moment we can use a vector graphics editor such as Inkscape or Illustrator to combine the two. I managed to achieve this for a plot I made in a publication but this prompt me to create routines in Mathematica in order to automatize this process. Here is what I have so far: ``` SetDirectory[NotebookDirectory[]]; SetOptions[$FrontEnd, PrintingStyleEnvironment -> "Working"]; ``` I like to start my notebook by setting the working directory to the notebook directory. Since I want my images to be of the size I specify I set the printing style environment to working, check [this](https://stackoverflow.com/questions/6093559/how-to-export-graphics-in-working-style-environment-rather-than-printout) for more info. ``` in = 72; G3D = Graphics3D[ AlignmentPoint -> Center, AspectRatio -> 0.925, Axes -> {True, True, True}, AxesEdge -> {{-1, -1}, {1, -1}, {-1, -1}}, AxesStyle -> Directive[10, Black], BaseStyle -> {FontFamily -> "Arial", FontSize -> 12}, Boxed -> False, BoxRatios -> {3, 3, 1}, LabelStyle -> Directive[Black], ImagePadding -> All, ImageSize -> 5 in, PlotRange -> All, PlotRangePadding -> None, TicksStyle -> Directive[10], ViewPoint -> {2, -2, 2}, ViewVertical -> {0, 0, 1} ] ``` Here we set the view of the plot we want to make. Now lets create our plot. ``` g = Show[ Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, Mesh -> None, AxesLabel -> {"x", "y", "z"} ], Options[G3D] ] ``` ![enter image description here](https://i.stack.imgur.com/Lx44o.png) Now we need to find a way of separating. Lets start by drawing the axes. ``` axes = Graphics3D[{}, AbsoluteOptions[g]] ``` ![enter image description here](https://i.stack.imgur.com/j6PY8.png) ``` fig = Show[g, AxesStyle -> Directive[Opacity[0]], FaceGrids -> {{-1, 0, 0}, {0, 1, 0}} ] ``` ![enter image description here](https://i.stack.imgur.com/QE4JU.png) I included the facegrids so that we can match the figure with the axis in the post editing process. Now we export both images. ``` Export["Axes.pdf", axes]; Export["Fig.pdf", Rasterize[fig, ImageResolution -> 300]]; ``` You will obtain two pdf files which you can edit in and put together into a pdf or eps. I wish it was that simple but it isn't. If you actually did this you will obtain this: ![enter image description here](https://i.stack.imgur.com/5chBj.png) The two figures are different sizes. I know axes.pdf is correct because when I open it in Inkspace the figure size is 5 inches as I had previously specified. I mentioned before that I managed to get this with one of my plots. I will clean the file and change the plots to make it more accessible for anyone who wants to see that this is in fact true. In any case, does anyone know why I can't get the two pdf files to be the same size? Also, keep in mind that we want to obtain a pretty plot for the Rasterized figure. Thank you for your time. PS. As a bonus, can we avoid the post editing and simply combine the two figures in mathematica? The rasterized version and the vector graphics version that is. --- ## EDIT: Thanks to rcollyer for his comment. I'm posting the results of his comment. One thing to mention is that when we export the axes we need to set `Background` to `None` so that we can have a transparent picture. ``` Export["Axes.pdf", axes, Background -> None]; Export["Fig.pdf", Rasterize[fig, ImageResolution -> 300]]; a = Import["Axes.pdf"]; b = Import["Fig.pdf"]; Show[b, a] ``` ![enter image description here](https://i.stack.imgur.com/FiHeR.png) And then, exporting the figure gives the desired effect ``` Export["FinalFig.pdf", Show[b, a]] ``` ![enter image description here](https://i.stack.imgur.com/qsrjA.png) The axes preserve the nice components of vector graphics while the figure is now a Rasterized version of the what we plotted. But the main question still remains. How do you make the two figures match? ## UPDATE: My question has been answered by Alexey Popkov. I would like to thank him for taking the time to look into my problem. The following code is an example for those of you want to use the technique I previously mentioned. Please see Alexey Popkov's answer for useful comments in his code. He managed to make it work in Mathematica 7 and it works even better in Mathematica 8. Here is the result: ``` SetDirectory[NotebookDirectory[]]; SetOptions[$FrontEnd, PrintingStyleEnvironment -> "Working"]; $HistoryLength = 0; in = 72; G3D = Graphics3D[ AlignmentPoint -> Center, AspectRatio -> 0.925, Axes -> {True, True, True}, AxesEdge -> {{-1, -1}, {1, -1}, {-1, -1}}, AxesStyle -> Directive[10, Black], BaseStyle -> {FontFamily -> "Arial", FontSize -> 12}, Boxed -> False, BoxRatios -> {3, 3, 1}, LabelStyle -> Directive[Black], ImagePadding -> 40, ImageSize -> 5 in, PlotRange -> All, PlotRangePadding -> 0, TicksStyle -> Directive[10], ViewPoint -> {2, -2, 2}, ViewVertical -> {0, 0, 1} ]; axesLabels = Graphics3D[{ Text[Style["x axis (units)", Black, 12], Scaled[{.5, -.1, 0}], {0, 0}, {1, -.9}], Text[Style["y axis (units)", Black, 12], Scaled[{1.1, .5, 0}], {0, 0}, {1, .9}], Text[Style["z axis (units)", Black, 12], Scaled[{0, -.15, .7}], {0, 0}, {-.1, 1.5}] }]; fig = Show[ Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, Mesh -> None], ImagePadding -> {{40, 0}, {15, 0}}, Options[G3D] ]; axes = Show[ Graphics3D[{}, FaceGrids -> {{-1, 0, 0}, {0, 1, 0}}, AbsoluteOptions[fig]], axesLabels, Epilog -> Text[Style["Panel A", Bold, Black, 12], ImageScaled[{0.075, 0.975}]] ]; fig = Show[fig, AxesStyle -> Directive[Opacity[0]]]; Row[{fig, axes}] ``` At this point you should see this: ![enter image description here](https://i.stack.imgur.com/Myu9Z.png) The magnification takes care of the resolution of your image. You should try different values to see how this changes your picture. ``` fig = Magnify[fig, 5]; fig = Rasterize[fig, Background -> None]; ``` Combine the graphics ``` axes = First@ImportString[ExportString[axes, "PDF"], "PDF"]; result = Show[axes, Epilog -> Inset[fig, {0, 0}, {0, 0}, ImageDimensions[axes]]]; ``` Export them ``` Export["Result.pdf", result]; Export["Result.eps", result]; ``` The only difference I found between M7 and M8 using the above code is that M7 does not export the eps file correctly. Other than that everything is working fine now. :) ![enter image description here](https://i.stack.imgur.com/YlZIR.png) The first column shows the output obtained from M7. Top is the eps version with file size of 614 kb, bottom is the pdf version with file size of 455 kb. The second column shows the output obtained from M8. Top is the eps version with file size of 643 kb, bottom is the pdf version with file size of 463 kb. I hope you find this useful. Please check Alexey's answer to see the comments in his code, they will help you avoid pitfalls with Mathematica.
Mathematica: Rasters in 3D graphics
CC BY-SA 3.0
0
2011-06-10T03:26:53.420
2014-07-05T17:39:42.127
2017-05-23T12:24:33.003
-1
788,553
[ "wolfram-mathematica" ]
6,301,736
1
6,302,866
null
1
6,085
I am getting below error when I use auto_now_add in my Model Form. `TypeError: __init__() got an unexpected keyword argument 'auto_now_add'` Here is my model field `modified = models.DateTimeField(blank = True)` Declaration in form. I have seen in one of the posts [DateTimeField Not Working](https://stackoverflow.com/questions/5899868/django-datetimefield-auto-now-add-not-working) to add `initial = datetime.datetime.now` for auto populating `import datetime` `modified = forms.DateTimeField(initial = datetime.datetime.now)` - When I use this no error is coming but datetime was not auto populating. I have used the same in `self.fields['modified']` - Still no use Any of the above statements were not working. Some one help me on this. --- I am pasting all my model class and Model Form here Model Class ``` class Users(models.Model): name = models.CharField(max_length = 100) role = models.ForeignKey(RolesConfig, db_column = 'role') level = models.ForeignKey(LevelConfig, db_column = 'level') team_name = models.ForeignKey(TeamNamesConfig, db_column = 'team_name') location = models.ForeignKey(LocationConfig, db_column = 'location') modified = models.DateTimeField(blank = True) class Meta: db_table = u'users' def __str__(self): return "%s" % (self.ldap) def __unicode__(self): return u'%s' % (self.ldap) ``` I have modified the field in phpmyadmin ![Modified field structure](https://i.stack.imgur.com/Efa4p.png) This is my ModelForm ``` class TargetForm(forms.ModelForm): modified = forms DateTimeField(initial = datetime.datetime.now) def __init__(self, *args, **kwargs): super(MMPodTargetForm, self).__init__(*args, **kwargs) self.fields['modified'] = forms.DateTimeField(initial = datetime.datetime.now) class Meta: model = models.Users ``` I need to get current date and time autopopulated in the form, when the form loads. Tell me whats wrong in my code.
Auto populate DateTimeField not working in django forms
CC BY-SA 3.0
0
2011-06-10T03:42:04.507
2011-06-13T04:36:15.417
2017-05-23T10:32:35.693
-1
727,495
[ "django", "forms", "datetime" ]
6,301,850
1
null
null
2
3,900
I am using VS2010's WPF Ribbon Application. Each RibbonGroup has a Header. Even If I leave the Header empty, the Ribbon will still reserve an empty space for the Header. How can I programmatically hide the header? For instance, I have following Xaml: ``` <ribbon:RibbonTab x:Name="HelpTab" Header="Help" FontSize="10"> <ribbon:RibbonGroup x:Name="HelpGroup" Header="Help Group" FontFamily="Verdana" FontWeight="Bold"> <!-- ..... --> </ribbon:RibbonButton> </ribbon:RibbonGroup> </ribbon:RibbonTab> </ribbon:Ribbon> ``` I want to programmatically hide the part (header text and height space) marked by red rectangle. ![enter image description here](https://i.stack.imgur.com/3KDkV.png) I'm looking for a C# code behind solution where I could hide the text and the space (height) the header takes up all together, something such as below: ``` // of course, this doesn't work HelpTab.HeaderStyle.Visibility = Visibility.Hide ```
Programmatically hide WPF Ribbon Header
CC BY-SA 3.0
null
2011-06-10T04:03:40.330
2012-03-07T19:35:32.620
null
null
529,310
[ "c#", "wpf", "ribbon" ]
6,301,861
1
6,301,923
null
7
597
How can I get these `dd` images floated next to the `dt` and other `dd` elements in a `dl`? Here's what I'd like: ![screenshot](https://i.stack.imgur.com/ZF0Qr.png) [Here is a JSFiddle](http://jsfiddle.net/SmFcs/), and here is the markup: ``` <dl> <dt>Bacon ipsum</dt> <dd class="img"><img src="http://placekitten.com/100/100" width="100" height="100" /></dd> <dd>Bacon ipsum dolor sit amet pork chop magna pork, tempor in jowl ham labore rump tenderloin pariatur pancetta tri-tip pork loin. Spare ribs meatloaf ground round chicken, non esse cow. </dd> <dt>Irure Jowl</dt> <dd class="img"><img src="http://placekitten.com/101/100" width="100" height="100" /></dd> <dd>Irure jowl non, chicken dolor veniam id in shoulder voluptate. Eu fugiat jowl, sunt drumstick id ad shankle shank aliquip bresaola aliqua reprehenderit. Fugiat shank pariatur strip steak laborum pork chop. Beef ribs aliquip fugiat, shankle id pork loin. </dd> <dt>Biltong labore turkey</dt> <dd class="img"><img src="http://placekitten.com/100/1002" width="100" height="100" /></dd> <dd>Biltong labore turkey swine dolor short ribs minim. Fugiat beef consectetur, sirloin do ham meatloaf hamburger pariatur jowl swine ham hock.</dd> </dl> ``` And the CSS: ``` dt { margin: .75em 0 .25em 0; font-weight: bold; } dd { margin: .25em 0; } dd.img { margin: 0 .25em 0 0; } img { border: solid #666666 1px; padding: 3px; } ``` If I just float the images left, the `dt` is above the image; but then I can't float the `dt` into the correct position. What's the cleanest and most semantic way to do this type of layout?
How can I get images floated to the left of other definition list elements?
CC BY-SA 3.0
0
2011-06-10T04:04:45.323
2012-11-08T22:49:22.430
2012-11-08T22:49:22.430
327,466
327,466
[ "html", "css" ]
6,302,056
1
6,302,098
null
0
125
I have a UItableView controller containing images. I also have a refresh button to re-retrieve the data from server in JSON format and populating the UITableView again. However I am facing an issue whereby the app will crash sometimes when I click on the refresh button (erratic behaviour). The screenshot of my crash is as follows From here is seems like the error comes from synthesizing a property, and my assumption is that the error comes from trying to access the property aConnection ![enter image description here](https://i.stack.imgur.com/BqyyB.png) I checked the thread on the left hand panel and the following screenshot seems to indicate that the crash happened somewhere when I tried to set the aConnection again. ![enter image description here](https://i.stack.imgur.com/ePLaJ.png) I am not sure if I posted enough information here, but any advise on how I can proceed will be greatly appreciated
Objective C: App Crashes when setting up connection (during refresh)
CC BY-SA 3.0
0
2011-06-10T04:43:16.003
2011-06-10T04:53:35.363
null
null
683,898
[ "objective-c", "ios", "memory-management" ]
6,302,064
1
6,302,277
null
2
525
I am using VS 2005. I want to drag-and-drop a Word Document 2003/2007 control in my form by .NET Framework. Like we do for PDF in the following screenshot. If you see the highlighted text, it is Adobe PDF Reader. I can show the PDF documents in this control in my form. Similarly can I do for Word? ![PDF](https://i.stack.imgur.com/udj3q.jpg)
Word Control in VS 2005
CC BY-SA 3.0
null
2011-06-10T04:44:56.583
2011-06-10T06:20:21.707
2011-06-10T06:20:21.707
726,802
726,802
[ "c#", "vb.net", "winforms", "visual-studio-2005" ]
6,302,087
1
6,302,102
null
3
419
Here's my current fiddle: [http://jsfiddle.net/UjAQf/79/](http://jsfiddle.net/UjAQf/79/) My target table design is this: ![enter image description here](https://i.stack.imgur.com/sZXnR.png) But I'm having some trouble as you can see getting all the nesting correct. What am I doing wrong? ``
CSS/HTML - trouble with nested table
CC BY-SA 3.0
null
2011-06-10T04:50:11.183
2017-07-20T16:58:21.187
2017-07-20T16:58:21.187
4,370,109
251,257
[ "html", "css", "html-table", "nested" ]
6,302,076
1
null
null
1
1,557
![datetime](https://i.stack.imgur.com/hOF6m.png) when the focus is on the calendar text box, time doesnot apper. only after tabbing out time appears which is as shown in attached image. I dint want time part in that. The code used is as follows: ``` <jkdp:XamDateTimeEditor Grid.Row="1" Grid.Column="1" KeyboardNavigation.TabIndex="1" InvalidValueBehavior="RetainValue" gcb:CommandBehavior.Event="LostFocus" gcb:CommandBehavior.Command="{Binding EndDateChangedCommand}" Style="{DynamicResource XamDateTimeEditor.SimpleStyle}" Text="{Binding EndDate, Mode=TwoWay, NotifyOnSourceUpdated=true}" > <Style x:Key="XamDateTimeEditor.SimpleStyle" TargetType="{x:Type igdEd:XamDateTimeEditor}" BasedOn="{StaticResource XamDateTimeEditor.DefaultFromStyle}"> <Setter Property="Height" Value="22" /> <Setter Property="Width" Value="150" /> <Setter Property="Margin" Value="10,0,10,0" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteEditorStyle}" /> <Setter Property="vw:InputBindingBehaviour.EnableErrorToolTip" Value="True" /> <Setter Property="Focusable" Value="False"></Setter> <Setter Property="KeyboardNavigation.IsTabStop" Value="False"></Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Grid Focusable="False" KeyboardNavigation.IsTabStop="False"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <TextBox Name="PART_TextBox" Grid.Column="0" VerticalAlignment="Center" Focusable="True" KeyboardNavigation.IsTabStop="True" Margin="0,0,2,0" Text="{Binding Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource TemplatedParent}}" ContextMenu="{Binding Path=ContextMenu, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" /> <TextBlock Name="PART_TextBlock" Grid.Column="0" Focusable="False" KeyboardNavigation.IsTabStop="False" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="3,0,2,0" Text="{Binding Path=NullText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource NullConverter}, ConverterParameter=Visibility}" /> <ToggleButton Grid.Column="1" Focusable="False" KeyboardNavigation.IsTabStop="False" MinWidth="{Binding Path=ActualHeight, Mode=OneWay, RelativeSource={RelativeSource Self}}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> <Image Source="Calendar.bmp" Focusable="False" KeyboardNavigation.IsTabStop="False" Margin="2" /> </ToggleButton> </Grid> <ControlTemplate.Triggers> <DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource NullConverter}}" Value="True"> <Setter TargetName="PART_TextBox" Property="Visibility" Value="Collapsed" /> </DataTrigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="EditTemplate"> <Setter.Value> <ControlTemplate TargetType="{x:Type igdEd:XamDateTimeEditor}"> <Grid Focusable="False" KeyboardNavigation.IsTabStop="False"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <igdEd:XamDateTimeEditor x:Name="PART_DateTimeEditor" BorderThickness="0" Background="Transparent" Focusable="False" KeyboardNavigation.IsTabStop="False" Grid.ColumnSpan="2" Theme="{Binding Path=Theme, Mode=OneTime, RelativeSource={RelativeSource TemplatedParent}}" NullText="{Binding Path=NullText, Mode=OneTime, RelativeSource={RelativeSource TemplatedParent}}" DataMode="{Binding Path=DataMode, Mode=OneTime, RelativeSource={RelativeSource TemplatedParent}}" InvalidValueBehavior="{Binding Path=InvalidValueBehavior, Mode=OneTime, RelativeSource={RelativeSource TemplatedParent}}" IsDropDownOpen="{Binding Path=IsChecked, ElementName=PART_ToggleButton, Mode=TwoWay}" Text="{Binding Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource TemplatedParent}}" Value="{Binding Path=Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource TemplatedParent}}" ValueConstraint="{Binding Path=ValueConstraint, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ContextMenu="{Binding Path=ContextMenu, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" /> <vw:CommitTextBox x:Name="PART_FocusSite" Grid.Column="0" Focusable="True" KeyboardNavigation.IsTabStop="True" MaxLength="10" Margin="0,0,2,0" Text="{Binding Path=Text, Mode=TwoWay, UpdateSourceTrigger=LostFocus, Converter={StaticResource DateTimeConverter}, ConverterParameter=DateFromStyle, RelativeSource={RelativeSource TemplatedParent}}" ContextMenu="{Binding Path=ContextMenu, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource TextBox.NormalStyle}"/> <ToggleButton x:Name="PART_ToggleButton" Grid.Column="1" Focusable="False" KeyboardNavigation.IsTabStop="False" MinWidth="{Binding Path=ActualHeight, Mode=OneWay, RelativeSource={RelativeSource Self}}" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"> <ToggleButton.Content> <Image Focusable="False" KeyboardNavigation.IsTabStop="False" Source="Calendar.bmp" Margin="2" /> </ToggleButton.Content> </ToggleButton> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> ```
How to remove the time from datetime from the calendar text box after tabbing out in XAML
CC BY-SA 3.0
null
2011-06-10T04:48:13.057
2011-07-31T20:12:05.103
2011-06-10T09:49:49.087
59,303
705,362
[ ".net", "wpf", "xaml", "datetime", "c#-4.0" ]
6,302,459
1
6,304,022
null
5
44,227
c#, mysql in my project. In that i create a rdlc report. I dont know to pass winform textbox value to rdlc report text field. I googled and try some set of code. but cant get that. If you worked in report. please help me. I am doing college project. In that they asked bonafide certificate. So i create a winform With reportviwer, name, course, year, semester, academic year, purpose textboxs and one button. Click the button when the textboxes are filled. those text values want to pass the record textboxes. Is it possible any way. ![enter image description here](https://i.stack.imgur.com/NHJrs.png)
How to pass textbox/Combobox value to rdlc report text field?
CC BY-SA 3.0
0
2011-06-10T05:47:12.113
2022-06-04T09:29:47.680
null
null
776,226
[ "c#", "winforms", "reporting-services", "reporting" ]
6,302,508
1
6,302,594
null
2
2,105
I'm running some fairly processor-intensive stuff on my PC, and notice my CPU usage looks pretty odd. My PC is a quad-core i7-870, which supposedly has eight virtual cores. I'm using the Task Parallel library in .NET 4, so expect all cores to be nicely utilised, but am getting information like this from Process Monitor: ![CPU usage](https://i.stack.imgur.com/Baf8o.png) Cores 6 and 8 are hardly getting touched, and apart from a brief burst, 4 isn't either. Is this what I should expect?
Is hyperthreading working?
CC BY-SA 3.0
0
2011-06-10T05:54:30.677
2011-06-10T06:10:00.693
null
null
130,230
[ "c#", "wpf", "task-parallel-library", "process-management", "hyperthreading" ]
6,302,597
1
null
null
2
1,028
I am building a data warehouse for the company's (which I am working for) core ERP application, for a particular client. Most of the data in the source database, which is related to hierarchies in the data warehouse are in columns as shown below:![Source ProductDescription table](https://i.stack.imgur.com/VvHzL.jpg) But traditionally the model to store dimension data according to my knowledge is as:![data warehouse DimProduct table](https://i.stack.imgur.com/FpKTz.jpg) I could pivot the data and fit them in the model shown above. But the issue comes when a user introduces a new hierarchy value. Say for instance the user in the future decides to define a new level called . Then my entire data warehouse model will collapse without a way to accommodate the new hierarchy level defined. Do let me know a way to overcome this situation. I hope my answer is clear enough. Just let me know if further details are needed.
Accommodating Dynamic Hierarchies in a Data Warehouse Model
CC BY-SA 3.0
null
2011-06-10T06:10:24.217
2011-10-04T13:18:52.347
2011-06-10T10:13:08.447
557,022
557,022
[ "sql", "sql-server", "data-warehouse", "business-intelligence" ]
6,302,664
1
null
null
0
1,219
Hi when I tried to generae one report in SSRS 2008 R2 (client machine) I'm getting report is being generated message but not showing any report. ![SSRS Report Error](https://i.stack.imgur.com/JEnmA.jpg) Any Idea? the same report I can able to get in other machines. thank you
ssrs report is being generated but not showing
CC BY-SA 3.0
null
2011-06-10T06:20:31.143
2011-06-17T17:18:20.040
null
null
225,264
[ "ssrs-2008", "reporting-services" ]
6,302,663
1
6,310,811
null
1
174
I have a difficult to nail down/solve problem. I am creating a system that has two parties: The User wants to perform and authorize an action , and the second party that needs to confirm this action has been authorized. The problem is, only the user that wants to perform the action will have an iphone (in many cases) and thus the ability to get authorization from our server. The second party does not have access to an internet connection, and will not be able to directly confirm that the first user's request was authorized. So, my problem is... what sort of system/item could I use to ensure that the second party can confirm that the first party's mobile phone action was authorized by our server? So far, all of the ideas I have come up with can be subverted by a clever hacker that just duplicates what the second party expects to see as a confirmed request. Things like... giving each second party a unique code that needed to be entered on the first party's mobile app in order to receive confirmation. But the clever user could just create a hacked app that mimics what the real app would do. Obviously, that would be a problem because if the second party believes that the action was authorized when it actually wasn't (due to hacking), they would lose out on money/time/etc... Here is a diagram that may make my question a bit clearer: ![Diagram](https://cl.ly/2a3e3y3C0N231I0H1R1u/Screen_shot_2011-06-10_at_%EC%98%A4%ED%9B%84_3.17.11.png) Any ideas would be greatly appreciated. ***Edit: I wanted to add - Party 2 does not have access to a mobile device/computer in some cases, so I need to figure out some piece of hardware that could be deployed cheaply but also perform the role of verification.
Mobile Phone Authorization System Question
CC BY-SA 3.0
null
2011-06-10T06:20:20.453
2011-06-14T11:37:26.067
2017-02-08T14:32:26.510
-1
510,513
[ "iphone", "security", "mobile" ]
6,302,699
1
6,302,967
null
2
1,812
I have a customTableViewCell in a tableView. I am highlighting the cell when selected using, `cell.selectionStyle = UITableViewCellSelectionStyleBlue;` But, the tableView appears like the following image. ![enter image description here](https://i.stack.imgur.com/3Fagk.png) It hides the labels and text in the customCell. I just want to highlight the cell simply without hiding the background image and labels. I do not know where I am making the mistake, whether in code or IB. .
iPhone SDK - Highlight the selected cell in TableView
CC BY-SA 3.0
null
2011-06-10T06:24:43.423
2013-01-04T01:29:31.647
2011-06-10T06:28:25.430
73,488
500,625
[ "iphone", "uitableview", "custom-cell" ]
6,303,124
1
6,307,302
null
9
28,338
I created my website with jQuery mobile and I would like to build the same bottom toolbar as showed on the picture below. Can someone point me in the right direction? The default navbar provided by jQuery mobile did not provide the same look. Here are the jQuery mobile navbar: [http://jquerymobile.com/test/#/test/docs/toolbars/docs-navbar.html](http://jquerymobile.com/test/#/test/docs/toolbars/docs-navbar.html) ![enter image description here](https://i.stack.imgur.com/aLiLc.png)
A bottom navbar in jQuery mobile looking like iPhone navbar, possible?
CC BY-SA 3.0
0
2011-06-10T07:13:19.930
2012-10-07T17:04:07.880
null
null
693,560
[ "jquery", "jquery-mobile" ]