Search Results

Search found 185 results on 8 pages for 'stacked'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • Timeline chart in Excel

    - by Axarydax
    Hi, I'd like to see a timeline of events from a database in a "timeline chart", that should look like this: http://i46.tinypic.com/sw3dj5.png - I've made me a small c# program that paints this onto a Bitmap, but that isn't the way to go. I have input data that has 3 fields: StartX EndX Y 2596 15008 1 5438 6783 2 5450 5453 4 5456 5459 4 5462 5466 4 5470 5474 4 5477 5657 5 5662 5665 4 5668 5671 4 As the picture shows, for each line I'd like to have a line from StartX to EndX with a Y value of Y. Stacked bar chart almost solves my problem, but I don't want to have a new line on the chart for every row, I have thousands of rows and I'd like to have X axis as the time axis, and view which events (Y is the type of the event) happened simultaneously. The image ( http://i46.tinypic.com/sw3dj5.png) I've generated with a simple C# program shows that the event SYSTEM was active all the time, and the events TECH and BREAK were almost exclusive, but had some overlaps. I'd like to at least know the correct direction which I should take; I'm lost in the multitude of Excel chart types. Thanks.

    Read the article

  • ProCurve network expansion

    - by Blue Warrior NFB
    I've hit a bit of a wall with our network scale-out. As it stands right now: We have five ProCurve 2910al switches connected as above, but with 10GbE connections (two CX4, two fiber). This fully populates the central switch above, there will be no more 10GbE Ethernet connections from that device. This group of switches is not stacked (no stack directive). Sometime in the next two or three months I'll need to add a sixth, and I'm not sure how deep of a hole I'm in. Ideally I'd replace the core switch with something more capable and has more 10GbE ports. However, that's a major outage and that requires special scheduling. The two edge switches connected via fiber have dual-port 10GbE cards in them, so I could physically put another switch on the far end of one of those. I don't know how much of a good or bad idea that would be though. Is that too many segments between end-points? Some config-excerpts: Running configuration: ; J9147A Configuration Editor; Created on release #W.14.49 hostname "REDACTED-SW01" time timezone 120 module 1 type J9147A module 2 type J9008A module 3 type J9149A no stack trunk B1 Trk3 Trunk trunk B2 Trk4 Trunk trunk A1 Trk11 Trunk trunk A2 Trk12 Trunk vlan 15 name "VM-MGMT" untagged Trk2,Trk5,Trk7 ip helper-address 10.1.10.4 ip address 10.1.11.1 255.255.255.0 tagged 37-40,Trk3-Trk4,Trk11-Trk12 jumbo ip proxy-arp exit

    Read the article

  • Make router forward HTTP and HTTPS traffic to external App

    - by cOsticla
    I use a Linksys WRT54GL router with DD-WRT v24-sp2 (10/10/09) std (SVN revision 13064) which I am trying to make forward all HTTP and HTTPS traffic to an external app called Fiddler (used as proxy) on port 8888. After a lot of digging on this site, dd-wrt forum, dd-wrt.com and WWW, I am stacked with the following piece of code that works (thanks to the guys from dd-wrt support for this info), but only for forwarding HTTP traffic (port 80): #!/bin/sh PROXY_IP=1234567890 PROXY_PORT=8888 LAN_IP=`nvram get lan_ipaddr` LAN_NET=$LAN_IP/`nvram get lan_netmask` iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT I tried to edit the code from above and I came up with the following but it's still not forwarding HTTPS but just HTTP traffic: #!/bin/sh PROXY_IP=1234567890 PROXY_PORT=8888 LAN_IP=`nvram get lan_ipaddr` LAN_NET=$LAN_IP/`nvram get lan_netmask` iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp -m multiport --dports 80,443 -j ACCEPT iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp -m multiport --dports 80,443 -j DNAT --to $PROXY_IP:$PROXY_PORT iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT I am not sure if is possible to forward HTTPS traffic anymore by just using a router so I'd appreciate if somebody will share his thoughts and/or examples regarding this subject here. Thanks!

    Read the article

  • Google app mail hosting and windows 2008 server DNS configuration

    - by fyasar
    Hi There, I used to use shared hosting before and I created a google app account and I configured DNS records on shared hosting's contol panel according to google dns documentations. Everything was working until I switched to dedicated server. First I added DNS role to my new server and I configured whole DNS and NS stuff. I have mail address that mail.domain.com that was redirecting to google app email before. Rightnow, It's not possible to access to mail.domain.com addres from somewhere. But I'm accessing from a few point which located some computer on different network. I stacked in this problem. Please, see the below screen shots I checked on DNSStuff.com,everything is green. Also, I checked on InteliWiz, it seems correct And, Here is the my DNS records. I was accessing to my mail.domain.com address from everywhere, Now, I cannot access to mails from many places since 3 week. Where is the my mistake ? Any help would be appriciated.

    Read the article

  • Multidimensional data table?

    - by ShreevatsaR
    [Apologies if this sort of question is off-topic for SuperUser. Please redirect to the right place if so.] There is a 3-dimensional array of values. (That is, instead of a table/2-dimensional array with values in a grid, the values can be thought of in a cube instead.) Is there a way to display this "cube" interactively, ideally on a webpage? Specifically, given the data, it would work something like this: the user selects two of the 3 variables. He then sees a "stack" of tables, one for each value of the third variable (cross-sections, in other words). By selecting the appropriate table from the stack, he can see the (i,j,k) value he wants. The "technology" for displaying such a thing (stacked tables, rotation, etc.) already exists, so this seems the sort of thing that someone ought to have written already. To be clear: I don't need sophisticated graphics necessarily, just the ability to select from cross-sections of variables. But I have no experience with (say, for displaying on a webpage) what web gadgets exist, so I'm clueless how to even search for one. (Google searches like "multidimensional data visualization" didn't throw up anything useful. Google Spreadsheets can do a few kinds of charts which can be embedded on a webpage, but I cannot tell if this is one of them.) [I can imagine how it ought to work for higher dimensions. For four-dimensions, instead of selecting just a stack, you'd first select an (i,j) from an "outer table", which would show all (k,l) values for that (i,j). For higher dimensions, inductively: you select (i,j), and then repeat what you'd do with 2 fewer dimensions.] So has this been written? Is this easy to write? Where ought one to look for such a thing?

    Read the article

  • Tools for displaying a multidimensional data table?

    - by ShreevatsaR
    [Apologies if this sort of question is off-topic for SuperUser. Please redirect to the right place if so.] There is a 3-dimensional array of values. (That is, instead of a table/2-dimensional array with values in a grid, the values can be thought of in a cube instead.) Is there a way to display this "cube" interactively, ideally on a webpage? Specifically, given the data, it would work something like this: the user selects two of the 3 variables. He then sees a "stack" of tables, one for each value of the third variable (cross-sections, in other words). By selecting the appropriate table from the stack, he can see the (i,j,k) value he wants. The "technology" for displaying such a thing (stacked tables, rotation, etc.) already exists, so this seems the sort of thing that someone ought to have written already. To be clear: I don't need sophisticated graphics necessarily, just the ability to select from cross-sections of variables. But I have no experience with (say, for displaying on a webpage) what web gadgets exist, so I'm clueless how to even search for one. (Google searches like "multidimensional data visualization" didn't throw up anything useful. Google Spreadsheets can do a few kinds of charts which can be embedded on a webpage, but I cannot tell if this is one of them.) [I can imagine how it ought to work for higher dimensions. For four-dimensions, instead of selecting just a stack, you'd first select an (i,j) from an "outer table", which would show all (k,l) values for that (i,j). For higher dimensions, inductively: you select (i,j), and then repeat what you'd do with 2 fewer dimensions.] So has this been written? Is this easy to write? Where ought one to look for such a thing?

    Read the article

  • VLAN ACLs and when to go Layer 3

    - by wuckachucka
    I want to: a) segment several departments into VLANs with the hopes of restricting access between them completely (Sales never needs to talk to Support's workstations or printers and vice-versa) or b) certain IP addresses and TCP/UDP ports across VLANS -- i.e. permitting the Sales VLAN to access the CRM Web Server in the Server VLAN on port 443 only. Port-wise, I'll need a 48-port switch and another 24-port switch to go with the two existing 24-port Layer 2 switches (Linksys); I'm looking at going with D-Links or HP Procurves as Cisco is out of our price range. Question #1: From what I understand (and please correct me if I'm wrong), if the Servers (VLAN10) and Sales (VLAN20) are all on the same 48-port switch (or two stacked 24-port switches), afaik, the switch "knows" what VLANs and ports each device belongs to and will switch packets between them; I can also apply ACLs to restrict access between VLANs at this point. Is this correct? Question #2: Now lets say that Support (VLAN30) is on a different switch (one of the Linksys) switches. I'm assuming I'll need to trunk (tag) switch #2's VLANs across to switch #1, so switch #1 sees switch #2's VLAN30 (and vice-versa). Once Switch #1 can "see" VLAN30, I'm assuming I can then apply ACLs as stated in Question #1. Is this correct? Question #3: Once Switch #1 can see all the VLANs, can I achieve the seemingly "Layer 3" ACL filtering of restricting access to Server VLAN on only certain TCP/UDP ports and IP addresses (say, only permitting 3389 to the Terminal Server, 192.168.10.4/32). I say "seemingly" because some of the Layer 2 switches mention the ability to restrict ports and IP addresses through the ACLs; I (perhaps mistakenly) thought that in order to have Layer 3 ACLs (packet filtering), I'd need to have at least one Layer 3 switch acting as a core router. If my assumptions are incorrect, at which point do you need a Layer 3 switch for inter-VLAN routing vs. inter-VLAN switching? Is it generally only when you need that higher-level packet filtering ability between your departments?

    Read the article

  • How do I keep a bridge enabled on a bonded interface?

    - by jlawer
    I'm working on setting up a pair of CentOS 6.3 servers that will run a couple of KVM vms and have come across a problem setting up a bridge on a bond. I am using Mode 4 (802.3ad) bonding on a pair of stacked Dell Powerconnect 5524 switches connecting to R320 servers. There are 2 links (1 to each switch) that form a Link Aggregation Group (802.3ad / LACP bonding). On top of the bond I have VLAN Tagging. I've verified this is a problem on multiple other bonding modes so it isn't just a mode 4 issue. I am testing what happens when 1 link is dropped (ie switch dies, cable breaks, etc). If I don't have a bridge (for KVM), everything works fine, failover happens as expected. If I have the bridge enabled, it works fine until failover (unplugging a cable). When failover happens /var/log/messages shows the slave link going down, followed within a second by: kernel: br1: port 1(bond0.8) entering disabled state The thing is /proc/net/bonding/bond0 shows the link is up as expected (simply with only 1 slave instead of 2). If I plug the cable back in it recovers and brings the bridge back to an enabled state. I actually have tested this while a ping is occuring and if the timing is right a packet will actually leave the system after the link is lost, but before the disabled message occurs. This disabled state I assumed was STP, but I have disabled STP on the bridge configuration and this issue still occurs. brctl showstp br1 still shows the link as disabled when it is running without a slave. I also switched between the nics in the server (I have 2x Broadcom & 4x intel). It doesn't matter which configuration I have. Does anyone know of a way to force the bridge to stay enabled or why its detecting the bond as disabled, when it isn't?

    Read the article

  • Managing game state / 'what to update' within an XNA game 'screen'

    - by codinghands
    Note - having read through other GDev questions suggested when writing this question I'm confident this isn't a dupe. Of course, it's 3am and I'm likely wrong, so please mod as such if so. I'm trying to figure out how best to manage state within my game screens - please bare with me though! At the moment I'm using a heavily modified version of the fantastic game state management example on the XNA site available here. This is working perfectly for my 'Screens' - 'IntroScreen' with some shiny logos, 'TitleScreen' and a 'MenuScreen' stacked on top for the title and menu, 'PlayScreen' for the actual gameplay, etc. Each screen has the a bunch of sprites, and an 'Update' and 'Draw', managed by a 'ScreenManager'. In addition to the above, and as suggested as an answer to my other question here, most screens have a 'GameProcessQueue' class full of 'GameProcess'es which lets me do just about anything (animations, youbetcha!), in any order, in sequence or parallel. Why mention all this? When I talk about managing game state I'm thinking more for complex scenarios within a 'Screen'. 'TitleScreen', 'MenuScreen' and the like are all relatively simple. 'Play Screen' less so. How do people manage the different 'states' within the screen (or whatever you call it) that 'does' gameplay? (for me, the 'PlayScreen') I've thought about the following: Enum of different states in the Screen, 'activeState' enum-type variable, switching on the enum in the Screen Update() loop to determine what Screen Update 'sub'-function is called. I can see this getting hairy pretty fast though as screens get more complex and with the 'PlayScreen' becoming a behemoth mega-class. 'State' class with Update loop - a Screen can have any number of 'States', 1+ of which are 'active'. Screen update loop calls update on all active states. States themselves know which screen they belong to, and may even belong to a 'StateManager' which handles transitioning from one state to the next. Once a state is over it's removed from the ScreenState list. The Screen doesn't need a bunch of GameProcessQueues, each State has its own. Abstract Screen further to be more flexible - I can see the similarities between what I've got (game 'Screens' handled by a ScreenManager) and what I want (states within a screen, and a mechanism to manage them). However at the moment I see 'Screens' as high level and very distinct ('PlayScreen' with baddies != 'MenuScreen' with 4 words and event handlers), where as my proposed 'States' are more intrinsically tied to a specific screen with complex requirements. I think. This is for a turn-based board game, so it's easier to define things as a discrete series of steps (IntroAnimation - P1Turn - P2Turn - P1Turn ... - GameOver - .... Obviously with an open-world RPG things are very different, but any advice in this scenario is appreciated. If I'm just going OOP-crazy please say so. Similarly I'm concious there's a huge amount on this site re: state management. But as my first 'serious' game after a couple of false starts I'd like to get this right, and would rather be harassed and modded down than never ask :)

    Read the article

  • Django one form for two models

    - by martinthenext
    Hello! I have a ForeignKey relationship between TextPage and Paragraph and my goal is to make front-end TextPage creating/editing form as if it was in ModelAdmin with 'inlines': several field for the TextPage and then a couple of Paragraph instances stacked inline. The problem is that i have no idea about how to validate and save that: @login_required def textpage_add(request): profile = request.user.profile_set.all()[0] if not (profile.is_admin() or profile.is_editor()): raise Http404 PageFormSet = inlineformset_factory(TextPage, Paragraph, extra=5) if request.POST: try: textpageform = TextPageForm(request.POST) # formset = PageFormSet(request.POST) except forms.ValidationError as error: textpageform = TextPageForm() formset = PageFormSet() return render_to_response('textpages/manage.html', { 'formset' : formset, 'textpageform' : textpageform, 'error' : str(error), }, context_instance=RequestContext(request)) # Saving data if textpageform.is_valid() and formset.is_valid(): textpageform.save() formset.save() return HttpResponseRedirect(reverse(consults)) else: textpageform = TextPageForm() formset = PageFormSet() return render_to_response('textpages/manage.html', { 'formset' : formset, 'textpageform' : textpageform, }, context_instance=RequestContext(request)) I know I't a kind of code-monkey style to post code that you don't even expect to work but I wanted to show what I'm trying to accomplish. Here is the relevant part of models.py: class TextPage(models.Model): title = models.CharField(max_length=100) page_sub_category = models.ForeignKey(PageSubCategory, blank=True, null=True) def __unicode__(self): return self.title class Paragraph(models.Model): article = models.ForeignKey(TextPage) title = models.CharField(max_length=100, blank=True, null=True) text = models.TextField(blank=True, null=True) def __unicode__(self): return self.title Any help would be appreciated. Thanks!

    Read the article

  • improve my code for collapsing a list of data.frames

    - by romunov
    Dear StackOverFlowers (flowers in short), I have a list of data.frames (walk.sample) that I would like to collapse into a single (giant) data.frame. While collapsing, I would like to mark (adding another column) which rows have came from which element of the list. This is what I've got so far. This is the data.frame that needs to be collapsed/stacked. > walk.sample [[1]] walker x y 1073 3 228.8756 -726.9198 1086 3 226.7393 -722.5561 1081 3 219.8005 -728.3990 1089 3 225.2239 -727.7422 1032 3 233.1753 -731.5526 [[2]] walker x y 1008 3 205.9104 -775.7488 1022 3 208.3638 -723.8616 1072 3 233.8807 -718.0974 1064 3 217.0028 -689.7917 1026 3 234.1824 -723.7423 [[3]] [1] 3 [[4]] walker x y 546 2 629.9041 831.0852 524 2 627.8698 873.3774 578 2 572.3312 838.7587 513 2 633.0598 871.7559 538 2 636.3088 836.6325 1079 3 206.3683 -729.6257 1095 3 239.9884 -748.2637 1005 3 197.2960 -780.4704 1045 3 245.1900 -694.3566 1026 3 234.1824 -723.7423 I have written a function to add a column that denote from which element the rows came followed by appending it to an existing data.frame. collapseToDataFrame <- function(x) { # collapse list to a dataframe with a twist walk.df <- data.frame() for (i in 1:length(x)) { n.rows <- nrow(x[[i]]) if (length(x[[i]])>1) { temp.df <- cbind(x[[i]], rep(i, n.rows)) names(temp.df) <- c("walker", "x", "y", "session") walk.df <- rbind(walk.df, temp.df) } else { cat("Empty list", "\n") } } return(walk.df) } > collapseToDataFrame(walk.sample) Empty list Empty list walker x y session 3 1 -604.5055 -123.18759 1 60 1 -562.0078 -61.24912 1 84 1 -594.4661 -57.20730 1 9 1 -604.2893 -110.09168 1 43 1 -632.2491 -54.52548 1 1028 3 240.3905 -724.67284 1 1040 3 232.5545 -681.61225 1 1073 3 228.8756 -726.91980 1 1091 3 209.0373 -740.96173 1 1036 3 248.7123 -694.47380 1 I'm curious whether this can be done more elegantly, with perhaps do.call() or some other more generic function?

    Read the article

  • Android - Views in Custom Compound Component are not inflated (findByView returns null)

    - by Julian Arz
    I have made a Custom Component in XML, consisting of a button with an imageview stacked on top of it: <myapp.widget.ClearableCaptionedButton xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content"> <Button android:id="@+id/ccbutton_button" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical|left" android:textAppearance="?android:attr/textAppearanceMedium" android:background="@android:drawable/edit_text"/> <ImageView android:id="@+id/ccbutton_clear" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dip" android:layout_alignRight="@id/ccbutton_button" android:layout_alignTop="@id/ccbutton_button" android:layout_alignBottom="@id/ccbutton_button"/> </myapp.widget.ClearableCaptionedButton> extract of java source code: public class ClearableCaptionedButton extends RelativeLayout implements OnClickListener { ... public ClearableCaptionedButton(Context context, AttributeSet attrs) { super(context, attrs); // some stuff that works fine } .. protected void onFinishInflate() { super.onFinishInflate(); mButton = (Button) findViewById(R.id.ccbutton_button); mClear = (ImageView) findViewById(R.id.ccbutton_clear); mButton.setText(""); // error here: mButton == null } My problem is similar to this one. When i try to find the views inside the custom compound, findViewById returns null. But, as you can see, i already added super(context, attrs); to the constructor. i am using the custom component directly in xml layout, like this: <LinearLayout> <!-- some stuff --> <de.pockettaxi.widget.ClearableCaptionedButton android:layout_width="fill_parent" android:layout_height="wrap_content" app:caption="to"/> </LinearLayout> can anybody spot something? thanks.

    Read the article

  • Help with Android LinearLayout or RelativeLayout

    - by PeEll
    I need to create two views programmatically (because I need to access the ondraw of one of the views). For some reason, no matter what I do to add the views to the contentview, they don't show up vertically stacked, one below the other. I can do it just fine using the XML using a RelativeLayout and layout positioning, but with the XML I can't create a view object and overload the ondraw method. What am I doing wrong with the programmatic approach, and how do I solve this problem? LinearLayout mLinearLayout; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Create a LinearLayout in which to add the ImageView mLinearLayout = new LinearLayout(this); TextView tv = new TextView(this); tv.setBackgroundColor(0xff333333); tv.setText("Enter your member number:"); tv.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); DrawableView i = new DrawableView(this); i.layout(0,40,0,0); i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mLinearLayout.addView(tv); mLinearLayout.addView(i,300,300); setContentView(mLinearLayout); }

    Read the article

  • Newbie question: How do you layout an icon, 2 text lines and a button?

    - by Keith Barrows
    I am trying to extend a sample I found at http://developer.android.com/resources/articles/layout-tricks-efficiency.html. I am a brand new MonoDroid developer, just installed it yesterday, and trying to jump right into UI design and so far it is not clicking for me completely. I have this main.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="?android:attr/listPreferredItemHeight" android:padding="6dip"> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="6dip" android:src="@drawable/icon" /> <TextView android:id="@+id/secondLine" android:layout_width="200dip" android:layout_height="26dip" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:singleLine="true" android:ellipsize="marquee" android:text="Second line which is a long line of text and needs to scroll" /> <TextView android:id="@+id/firstLine" android:layout_width="200dip" android:layout_height="wrap_content" android:layout_toRightOf="@id/icon" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_above="@id/secondLine" android:layout_alignWithParentIfMissing="true" android:singleLine="true" android:ellipsize="marquee" android:gravity="center_vertical" android:text="First line" /> <Button android:id="@+id/logonButton" android:layout_width="50dip" android:layout_height="wrap_content" android:layout_toRightOf="@id/secondLine" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:gravity="center_vertical" android:text="Login" /> /> </RelativeLayout> What I am trying to do is have an icon on the left, 2 lines of text stacked in the middle and a button on the right. When I run this in my emulator I am seeing: The second line is not scrolling. The button does not show up. Is there by any chance a simple WYSIWYG editor for layout? Or is there an app to give me a quick view of my layout XML? Something like FireBug in FireFox would be fine. Barring the slim chance there are UI helpers for Droid, what am I doing wrong? :)

    Read the article

  • Using of Templated Helpers in MVC 2.0 : How can use the name of the property that I'm rendering insi

    - by Andrey Tagaew
    Hi. I'm reviewing new features of ASP.NET MVC 2.0. During the review i found really interesting using Templated Helpers. As they described it, the primary reason of using them is to provide common way of how some datatypes should be rendered. Now i want to use this way in my project for DateTime datatype My project was written for the MVC 1.0 so generating of editbox is looking like this: <%= Html.TextBox("BirthDate", Model.BirthDate, new { maxlength = 10, size = 10, @class = "BirthDate-date" })%> <script type="text/javascript"> $(document).ready(function() { $(".BirthDate-date").datepicker({ showOn: 'button', buttonImage: '<%=Url.Content("~/images/i_calendar.gif") %>', buttonImageOnly: true }); }); </script> Now i want to use Template Helper, so i want to have above code once i type next sentence: <%=Html.EditorFor(f=>f.BirthDate) %> According to the manual I create DataTime.ascx partial view inside Shared/EditorTemplates folder. I put there above code and stacked with the problem. How can i pass the name of the property that I'm rendering with template helper? As you can see from my example, i really need it, since I'm using the name of the property to specify data value and parameter name that will be send during the POST requsest. Also, I'm using it to generate class name for JS calendar building. I tried to remove my partial class for template helper and made MVC to generate its default behavior. Here what it generated for me: <input type="text" value="04/29/2010" name="LoanApplicationDays" id="LoanApplicationDays" class="text-box single-line"> As you can see, it used the name of the property for "name" and "id" attributes. This example let me to presume that Template Helper knows about the name of the property. So, there should be some way of how to use it in custom implementation. Thanks for your help!

    Read the article

  • forcing a child component to resize itself larger than its container

    - by Josh
    I am creating a component that displays a variable amount of "gauges" (square tiles of content if you will), that is laid out like so: <HDividedBox id="container"> <VBox id="myComponent"> <HBox id="header"> ...header content... </HBox> <Tile id="body"> ...gauges are added to the body... </Tile> </Vbox> </HDividedBox> The body Tile has a horizontal direction. When I drag the HDividedBox to make myComponent smaller, the body component will get smaller as well, and eventually if there are too many gauges to fit horizontally, they will be bumped to the next row, and thus the smaller I make myComponent, the number of vertically stacked gauges grows. This is all well and good. The problem is, no matter what combination of settings I use, I absolutely cannot get the body (a Tile) to size itself beyond the size of myComponent, which would ideally cause myComponent to scroll vertically. Even setting the maxHeight of the body to some huge value, it will never size itself larger than it's container. Any ideas on how to accomplish this? Thanks

    Read the article

  • Adding jQuery event handler to expand div when a link is clicked

    - by hollyb
    I'm using a bit of jQuery to expand/hide some divs. I need to add an event handler so that when a link is clicked, it opens a corrisponding div. Each toggled div will have a unique class assigned to it. I am looking for some advice about how to build the event handler. The jQuery $(document).ready(function(){ $(".toggle_container:not(:first)").hide(); $(".toggle_container:first").show(); $("h6.trigger:first").addClass("active"); $("h6.trigger").click(function(){ $(this).toggleClass("active"); $(this).next(".toggle_container").slideToggle(300); }); The css: // uses a background image with an on (+) and off (-) state stacked on top of each other h6.trigger { background: url(buttonBG.gif) no-repeat;height: 46px;line-height: 46px;width: 300px;font-size: 2em;font-weight: normal;} h6.trigger a {color: #fff;text-decoration: none; display: block;} h6.active {background-position: left bottom;} .toggle_container { overflow: hidden; } .toggle_container .block {padding: 20px;} The html has a list of links, such as: <a href="#">One</a> <a href="#">Two</a> and the coorisponding divs to open: <h6 class="trigger">Container one</h6> <div class="toggle_container"> div one </div> <h6 class="trigger">Container two</h6> <div class="toggle_container Open"> div one </div> As I mentioned, I will be assigning a unique class to facilitate this. Any advice? Thanks! To clarify, i'm looking for some advice to build an event handler to toggle open a specific div when a link is clicked from a different part of the page, from a nav for instance.

    Read the article

  • ExtJS 4 Chart Axis Display Issue in Chrome

    - by SerEnder
    I've run into an issue while using ExtJS 4.0.7. I'm trying to display a chart with two series on a Numeric/Category Chart. The chart displays correctly in Firefox, but while using Chrome (18.0.1025.142) the x axis labels are either all stacked upon each or else (when using rotate) rendered behind the chart in the specified angle. Any ideas would be appreciated. Screen shot in Firefox: Screen Shot in Chrome: And the code that's used to generate both: Ext.require(['Ext.chart.*']); Ext.onReady(function() { var iChartWidth = 800; // Defines chart width var iChartHeight = 550; // Defines chart height Ext.define('RulesCreatedModel',{ extend:'Ext.data.Model', fields:[ {name:'sHourName', type:'string'}, {name:'User_2', type:'number'}, {name:'User_1', type:'number'}, ] }); var RulesCreatedStore = Ext.create('Ext.data.Store',{ id:'RulesCreatedStore', model:'RulesCreateModel', fields: [ 'sHourName','dayNum','hour','User_2','User_1'], data:[{ 'sHourName':'3pm', 'User_1':82, 'User_2':56 },{ 'sHourName':'4pm', 'User_1':39, 'User_2':44 },{ 'sHourName':'5pm', 'User_1':80, 'User_2':14 },{ 'sHourName':'6pm', 'User_1':55, 'User_2':0, },{ 'sHourName':'7pm', 'User_1':36, 'User_2':0, },{ 'sHourName':'8pm', 'User_1':66, 'User_2':0 },{ 'sHourName':'9pm', 'User_1':39, 'User_2':0, },{ 'sHourName':'10pm', 'User_1':0, 'User_2':0 },{ 'sHourName':'11pm', 'User_1':0, 'User_2':0 },{ 'sHourName':'12am', 'User_1':0, 'User_2':0 },{ 'sHourName':'1am', 'User_1':0, 'User_2':0 },{ 'sHourName':'2am', 'User_1':0, 'User_2':0 },{ 'sHourName':'3am', 'User_1':0, 'User_2':0 },{ 'sHourName':'4am', 'User_1':0, 'User_2':0 },{ 'sHourName':'5am', 'User_1':0, 'User_2':0 },{ 'sHourName':'6am', 'User_1':0, 'User_2':0 },{ 'sHourName':'7am', 'User_1':0, 'User_2':1 },{ 'sHourName':'8am', 'User_1':0, 'User_2':99 },{ 'sHourName':'9am', 'User_1':0, 'User_2':28 },{ 'sHourName':'10am', 'User_1':0, 'User_2':28 },{ 'sHourName':'11am', 'User_1':0, 'User_2':153 },{ 'sHourName':'12pm', 'User_1':0, 'User_2':58 },{ 'sHourName':'1pm', 'User_1':0, 'User_2':42 },{ 'sHourName':'2pm', 'User_1':20, 'User_2':10 }] }); Ext.create('Ext.chart.Chart',{ id: 'RulesWrittenChart', renderTo: 'StatCharts_Display', width: iChartWidth, height: iChartHeight, animate: true, store: RulesCreatedStore, axes: [{ type: 'Numeric', position: 'left', fields: ['User_2','User_1'], title: 'Rules Written', grid: true },{ type: 'Category', position: 'bottom', fields: ['sHourName'], title: 'Hour', grid: false, label: { rotate: { degrees: 315 } } }], series: [{ type: 'line', axis: 'left', xField: 'sHourName', yField: 'User_2', highlight: { size: 3, radius: 3 } },{ type: 'line', axis: 'left', xField: 'sHourName', yField: 'User_1', highlight: { size: 3, radius: 3 } }] }); });

    Read the article

  • Align col in a bootstrap collapsable menu

    - by Grimm
    I got my hands on bootstrap recently and I'm still discovering it. I made collapsable menu from a tutorial online but now that I want to had an image on each entry of my menu that I wasn't expecting. I want my image to be always aligned to the text in the menu but it still getting on top of it. I tried to remove row and col tag and forget about the responsiveness of my menu but it still doesn't work... Here is the source code of my menu: <div id="menu" class="menu nav-collapse collapse width"> <div class="collapse-inner"> <div class="navbar navbar-inverse"> <div class="menu_titlenav nav-tabs nav-stacked"> <h3>Menu</h3> </div> </div> <div class="row well menu_entry"> <div class="span2 search_ico_ina"></div> <div class="span9 search_ent_ina">Recherche</div> </div> <div class="row well menu_entry" > <div class="span2 pro_ico_ina"></div> <div class="span9 pro_ent_ina">Espace PRO</div> </div> <div class="row well menu_entry"> <div class="span2 account_ico_ina"></div> <div class="span9 account_ent_ina">Mon Compte</div> </div> </div> </div> and the entire source: http://jsfiddle.net/Grimtork/JLFMW/

    Read the article

  • Register new memer for vBulletin via Mobile API

    - by Nikolay Stariradeff
    I'm trying to use the vBulletin REST Mobile API to simply register. The sourced are installed on my local machine and according the documentation https://www.vbulletin.com/forum/content.php/393-User-Registration-Process-Mobile-API This procedure should not be so hard, especially without humanity and COPPA authentication. However I've stacked! The method definition describes "addnewmember" clear, so I've generated a test link, which should do the job. https://www.vbulletin.com/forum/content.php/365-User-Related-Methods The link is: .../forum/api.php?&api_m=register_addmember&api_c=1&api_s=76ec9eec61e7fdfef2f3feee28d5f392&api_sig=8fe54313b333cc0fef4ddd8e398b5c80&api_v=6&agree=1&username=testuser&email=XXXXXX%40gmail.com&emailconfirm=XXXXX%40gmail.com&password=12345678&passwordconfirm=12345678 As a response I get: register_not_agreed The Docs: register_not_agreed The agree parameter should be set to 1. Which is also clear - agree parameter was not there. Here comes the funny part - In the API-Log I can see that the 'agree' parameter is correctly passed *1 test_client Gast 13:23, 18.06.2012 register_addmember Array ( [api_m] = register_addmember [api_c] = 1 [api_s] = 76ec9eec61e7fdfef2f3feee28d5f392 [api_sig] = 8fe54313b333cc0fef4ddd8e398b5c80 [api_v] = 6 [agree] = 1 [username] = testuser [email] = ....* Is there anybody with experience with the Mobile API that could help?

    Read the article

  • jQuery sliding animation not working

    - by Jake Zeitz
    I have three divs stacked on each other but offset so that a part of each div is visible. When one of the bottom divs is clicked I want the top div to animate out and back into the stack at the bottom, then the div that is clicked will appear at the top. So far I only have the code for when the middle div is clicked, but I cannot get it to work properly. What am I doing wrong? (I also realize that the code I wrote is probably terrible, this is the first jQuery code I have written.) The css is very very simple: .first { z-index: 3; } .second { z-index: 2; } .third { z-index: 1; } The basic html is this: <div class="first"></div> <div class="second"></div> <div class="third"></div> Here is my code: $("div.second").click(function () { $("div.first").animate({ left: "-=200px"}, {duration: "fast", complete: function () { $("div.first").removeClass("first").addClass("third").animate({left: "+=350px", top: "+=60px"}, "fast"); } }); $("div.second").animate({ left: "-=24px", top: "-=30px"}, {duration: "fast", complete: function () { $("div.second").removeClass("second").addClass("first"); } }); $("div.third").animate({ left: "-=24px", top: "-=30px"}, {duration: "fast", complete: function () { $("div.third").removeClass("third").addClass("second"); } }); }); I can get the div.first to move to the side and back. But now I can't get the classes to stay changed. What keeps happening is the div.second will remove it's class and add .first in the animation, but when the animation is complete, it acts like it still has a class of .second.

    Read the article

  • Easyslider content loading sooner than I would like.

    - by Jason
    I am using a jquery easyslider on a page and also pulling some rss feeds using php. Pulling the feeds is taking a long time and as a result delaying the load of the easy slider until after the feeds have been pulled in. This can be seen here: http://perksconsulting.com/dev/ I am looking for a way to display a loader image in the space where the easy slider is so the images do not appear stacked vertically for a few seconds while the php is interpreted by the server, but I have never used a loader image and am not sure how I would do that. I am currently using this script to hide the page contents until everything is loaded, but the one thing it is not hiding is the images from the easy slider: <SCRIPT TYPE="text/javascript" LANGUAGE="javascript"> function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </SCRIPT> Ideally I would like to be able to display a loading image in place of the slider in the middle of the page until everything loads. Could anyone tell me how to do this? Thank you.

    Read the article

  • Which is better Java programming practice: stacking enums and enum constructors, or subclassing?

    - by Arvanem
    Hi folks, Given a finite number of items which differ in kind, is it better to represent them with stacked enums and enum constructors, or to subclass them? Or is there a better approach altogether? To give you some context, in my small RPG program (which ironically is supposed to be simple), a character has different kinds of items in his or her inventory. Items differ based on their type and use and effect. For example, one item of inventory is a spell scroll called Gremlin that adjusts the Utility attribute. Another item might be a sword called Mort that is used in combat and inflicts damage. In my RPG code, I now have tried two ways of representing inventory items. One way was subclassing (for example, InventoryItem - Spell - AdjustingAttributes; InventoryItem - Weapon - Sword) and instantiating each subclass when needed, and assigning values such as names like Gremlin and Mort. The other way was by stacking enums and enum constructors. For example, I created enums for itemCategory and itemSpellTypes and itemWeaponTypes, and the InventoryItem enum was like this: public enum InventoryItem { GREMLIN(itemType.SPELL, itemSpellTypes.ATTRIBUTE, Attribute.UTILITY), MORT(itemType.WEAPON, itemWeaponTypes.SWORD, 30); InventoryItem(itemType typeOfItem, itemSpellTypes spellType, Attribute attAdjusted) { // snip, enum logic here } InventoryItem(itemType typeOfItem, itemWeaponTypes weaponType, int dmg) { // snip, enum logic here } // and so on, for all the permutations of items. } Is there a better Java programming practice than these two approaches? Or if these are the only ways, which of the two is better? Thanks in advance for your suggestions.

    Read the article

  • Customizing the Stars Image for Ajaxful_Rating RoR plugin

    - by Kevin
    I'm trying to come up with my own star image that's slightly smaller and different style than the one provided in the gem/plugin, but Ajaxful_rating doesn't have an easy way to do this. Here's what I've figured out so far: The stars.png in the public folder is three 25x25 pixel tiles stacked vertically, ordered empty star, normal star, and hover star. I'm assuming as long as you keep the above constraints, you should be fine without modifying any other files. But what if you want to change the image size of the stars to larger or smaller? I've found where you can change the height in the stylesheets/ajaxful_rating.css .ajaxful-rating{ position: relative; /*width: 125px; this is setted dynamically */ height: 25px; overflow: hidden; list-style: none; margin: 0; padding: 0; background-position: left top; } .ajaxful-rating li{ display: inline; } .ajaxful-rating a, .ajaxful-rating span, .ajaxful-rating .show-value{ position: absolute; top: 0; left: 0; text-indent: -1000em; height: 25px; line-height: 25px; outline: none; overflow: hidden; border: none; } You just need to change every place that says "25px" above to whatever height your new star image is. This works fine but doesn't display the horizontal part correctly. Anyone know where I would look to set the horizontal part as well? (I'm assuming it's in an .rb file somewhere based upon how many stars you specified in your ajaxful_rating setup)

    Read the article

  • Have something loaded only when JList item is visibile

    - by elvencode
    Hello, i'm implementing a Jlist populated with a lot of elements. Each element corresponds to a image so i'd like to show a resized preview of them inside each row of the list. I've implemented a custom ImageCellRenderer extending the Jlabel and on getListCellRendererComponent i create the thumbnail if there'snt any for that element. Each row corresponds to a Page class where i store the path of the image and the icon applied to the JLabel. Each Page object is put inside a DefaultListModel to populate the JList. The render code is something like this: public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Page page = (Page) value; if (page.getImgIcon() == null) { System.out.println(String.format("Creating thumbnail of %s", page.getImgFilename())); ImageIcon icon = new ImageIcon(page.getImgFilename()); int thumb_width = icon.getIconWidth() > icon.getIconHeight() ? 128 : ((icon.getIconWidth() * 128) / icon.getIconHeight()); int thumb_height = icon.getIconHeight() > icon.getIconWidth() ? 128 : ((icon.getIconHeight() * 128) / icon.getIconWidth()); icon.setImage(getScaledImage(icon.getImage(), thumb_width, thumb_height)); page.setImgIcon(icon); } setIcon(page.getImgIcon()); } I was thinking that only a certain item is visibile in the List the cell renderer is called but i'm seeing that all the thumnails are created when i add the Page object to the list model. I've tried to load the items and after set the model in the JList or set the model first and after starting appending the items but the results are the same. Is there any way to load the data only when necessary or do i need to create a custom control like a JScrollPanel with stacked items inside where i check myself the visibility of each elements? Thanks

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >