Search Results

Search found 179 results on 8 pages for 'emil hansen'.

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

  • How to choose size for a cloud server (rackspace)

    - by Emil
    We're going to test the rackspace cloud next week to see how it's working with our web app. It's a LAMP environment with a lot of MySQL databases. How do I choose the "right" server size? On Rackspace I can choose slices with the memory of 256, 512, 1024, 2048, 4096 etc. Right now we don't have a lot of traffic (approx. 1000 visitors/day) but I thought the whole "cloud" idea was to not be limited and auto scale. Update: What I'm looking for is now a specification of what I need. I know it's too complex. I'm looking for examples, case studies etc. It would be interesting to hear something like "Yes we're serving 10 000 daily requests without spikes on a LAMP stack with only one slice on with 2 GB RAM".

    Read the article

  • Any non-custom way to manage iptables with fail2ban and libvirt+kvm?

    - by Peter Hansen
    I have an Ubuntu 9.04 server running libvirt/kvm and fail2ban (for SSH attacks). Both libvirt and fail2ban integrate with iptables in different ways. Libvirt uses (I think) some XML config and during startup (?) configures forwarding to the VM subnet. Fail2ban installs a custom chain (probably at init) and periodically modifies it to ban/unban probable attackers. I also need to install my own rules to forward various ports to servers running in VMs and on other machines, and set up rudimentary security (e.g. drop all INPUT traffic except the few ports I want open), and of course I'd like the ability to add/remove rules safely without restarting. It seems to me iptables is a powerful tool that's sorely lacking some sort of standardized way of juggling all this stuff. Every project, and every sysadmin, seems to do it differently! (And I think there's lots of "cargo cult" admin going on here, with people cloning crude approaches like "use iptables-save like so".) Short of figuring out the gory details of exactly how both of these (and potentially other) tools manipulate the netfilter tables, and developing my own scripts or just manually executing iptables commands, is there any way to safely work with iptables while not breaking the functionality of these other tools? Any nascent standards or projects defined to bring sanity to this area? Even a helpful web page I missed that might cover at least these two packages together?

    Read the article

  • Multiple subdomains, SSL on only one using port 80

    - by Emil Flink
    I am running a Apache2 server with three subdomains defined in separate files in /etc/apache2/sites-available I need ONE of those subdomains to be SSL-secured on port 80 for an application to work. Port 80 is required due to circumstances out of my control. The other subdomains are also on port 80. Now, when all subdomains are enabled in Apache the SSL-subdomain is NOT running SSL. If I disable the other subdomains SSL on the SSL-subdomain WORKS. Is there a way to fix this?

    Read the article

  • Equivalent of phpMyAdmin for MSSQL?

    - by Tedd Hansen
    Is there any webinterface for administrating MSSQL similar to phpMyAdmin (for MySQL)? I want a self-service setup where developers can create a database through webinterface and upload/download backups of the database without local access. I've considered phpMSAdmin, but it hasn't had a release since 2006 so I'm not sure its worth the effort of setting it up. If there is something else (free or not-so-free) that would be great. My question is similar to this one posted 2 years ago, but no good webinterface was found back then. SQL Web Data Administrator seems interesting, but it lacks a few features - most notably creating new databases (also, not updated since 2007).

    Read the article

  • Multiple Reporting Services databases in one instance?

    - by Tedd Hansen
    Is it possible to have multiple Reporting Services databases in one MSSQL instance? I have a MSSQL 2008 R2 with RS set to SharePoint Integrated Mode. This RS is in use and can't be changed. I do however need a RS in native mode for the TFS installation to be able to use it. Am I required to set up a new instance of MSSQL? Bonus question: If so, is that permitted under the MS licensing scheme or is it an additional cost?

    Read the article

  • authenticating to exchange 2010 smarthost?

    - by Richard Hansen
    I have a postfix mail server that should relay all outgoing mail to an Exchange 2010 server (the Exchange box is my smarthost). I have administrator access to the Exchange 2010 system, but I'm not very familiar with it. How should I set up authentication on the Exchange 2010 system? I guess I could add a standard user with a mailbox on the Exchange box, then configure my postfix box to log in to port 587 to relay mail. That option doesn't feel right -- it seems like there should be way to do server to server authentication, not just client to server authentication. Is there? If so, how would I set it up?

    Read the article

  • Lots of dropped packages when tcpdumping on busy interface

    - by Frands Hansen
    My challenge I need to do tcpdumping of a lot of data - actually from 2 interfaces left in promiscuous mode that are able to see a lot of traffic. To sum it up Log all traffic in promiscuous mode from 2 interfaces Those interfaces are not assigned an IP address pcap files must be rotated per ~1G When 10 TB of files are stored, start truncating the oldest What I currently do Right now I use tcpdump like this: tcpdump -n -C 1000 -z /data/compress.sh -i any -w /data/livedump/capture.pcap $FILTER The $FILTER contains src/dst filters so that I can use -i any. The reason for this is, that I have two interfaces and I would like to run the dump in a single thread rather than two. compress.sh takes care of assigning tar to another CPU core, compress the data, give it a reasonable filename and move it to an archive location. I cannot specify two interfaces, thus I have chosen to use filters and dump from any interface. Right now, I do not do any housekeeping, but I plan on monitoring disk and when I have 100G left I will start wiping the oldest files - this should be fine. And now; my problem I see dropped packets. This is from a dump that has been running for a few hours and collected roughly 250 gigs of pcap files: 430083369 packets captured 430115470 packets received by filter 32057 packets dropped by kernel <-- This is my concern How can I avoid so many packets being dropped? These things I did already try or look at Changed the value of /proc/sys/net/core/rmem_max and /proc/sys/net/core/rmem_default which did indeed help - actually it took care of just around half of the dropped packets. I have also looked at gulp - the problem with gulp is, that it does not support multiple interfaces in one process and it gets angry if the interface does not have an IP address. Unfortunately, that is a deal breaker in my case. Next problem is, that when the traffic flows though a pipe, I cannot get the automatic rotation going. Getting one huge 10 TB file is not very efficient and I don't have a machine with 10TB+ RAM that I can run wireshark on, so that's out. Do you have any suggestions? Maybe even a better way of doing my traffic dump altogether.

    Read the article

  • TCP/IP communication between Hyper-V host and guests

    - by Tedd Hansen
    This may be a simple one. :) I have a simple Hyper-V setup with a few guest os running. The host has 1 physical network adapter with a static IP assigned to it. The guests have network adapters assigned to "Internet" (Hyper-V network) which is bound to the physical host network adapter (Hyper-V "External" connection type). I am not able to communicate (ping or anything else) between guests and host. I've checked firewall and it seems fine (ports open from anywhere still don't work). I'm trying to communicate with the hosts IP assigned to the same physical interface that the guests are sharing. Guests can communicate between them just fine. I can't seem to find any relevant setting (I might just be missing it). So my questions: How do I fix it so host and guests can communicate?

    Read the article

  • How to Increase Memory Allocated to IIS .NET Application?

    - by Mark Hansen
    We are using Windows 2008 R2 and IIS 7 running on Amazon EC2. IIS is running a single .NET application written in C#. We are having performance issues and I want to give the application more memory, but I cannot figure out how to do it. How do I control the amount of memory that the CLR gets? I'm a total newbie with IIS, .NET and the CLR. If I were working with Java, I would just use the -Xmx flag to increase the memory available to the JVM (e.g., -Xmx3000m for 3GB). But, I cannot seem to figure out how to do this in the Windows world.

    Read the article

  • Silverlight Cream for March 15, 2011 -- #1061

    - by Dave Campbell
    In this Issue: Peter Kuhn, Emil Stoychev, Viktor Larsson(-2-), Kevin Hoffman, Rudi Grobler, WindowsPhoneGeek, Jesse Liberty(-2-), and Martin Krüger. Above the Fold: Silverlight: "Image comparison using a GridSplitter" Martin Krüger WP7: "Using WP7 accent color effectively" Viktor Larsson XNA: "XNA for Silverlight developers: Part 7 - Collision detection" Peter Kuhn From SilverlightCream.com: XNA for Silverlight developers: Part 7 - Collision detection Peter Kuhn has part 7 of his XNA for Silverlight devs tutorial series up at SilverlightShow... discussing Collision detection... something you need to get your head around if you're going to do a game. Interview with John Papa about the upcoming MIX11 event and the Open Source Fest Emil Stoychev of SilverlightShow reverses the roles with John Papa and interviews John on this MIX11 and Open Source Fest discussion they had at the MVP Summit Debugging Videos or Camera in WP7 Viktor Larsson has a quick post up on the 3 ways of debugging a WP7 app and why and under what circumstances you should change debug method. Using WP7 accent color effectively Viktor Larsson's next post is about the 10 accent colors available on WP7 devices. He shows how to make best use of that capability in XAML and runtime code. WP7 for iPhone and Android Developers - Hardware and Device Services Kevin Hoffman's part 4 of a 12-part tutorial series at SilverlightShow on WP7 for iPhone/Android devs is up ... this oe concentrates on Hardware and Device Services... Launchers/Choosers/Sensors. How to publish WP7 applications if you live in the Middle-east & Africa region Rudi Grobler has a short post up on a legit way to publish WP7 apps if you are in the MEA region. Creating WP7 Custom Theme – Sample Theme Implementation WindowsPhoneGeek has a new post up and he's starting a series of 3 articles on Creating Wp7 Custom Themes... first up is this tutorial on Basic Theme Implementation... and use it as well. From Android to Windows Phone For "Windows Phone from Scratch #43", Jesse Liberty begins a series on moving apps from Android to WP7, beginning with a tip calculating program. Yet Another Podcast #28–Jeremy Likness Jesse Liberty's next post is his "Yet Another Podcast #28" with Jeremy Likness this time around... the list of all things fun that Jeremy's involved in is getting long... should be a good podcast! Image comparison using a GridSplitter Martin Krüger posted a cool 'Clip Splitter' for comparing images, and what a great set of example images he's using... pretty darn cool lining them up with a grid-splitter. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for April 20, 2010 -- #842

    - by Dave Campbell
    In this Issue: Zoltan Arvai, Svetla Stoycheva, Alexey Zakharov, Chris Rouw, David Anson(-2-), Bill Reiss, John Papa and Adam Kinney, Chris Klug, CorrinaB, and Mike Snow. Shoutouts: Pete Brown interviewed David Kelley at MIX10: Pete at MIX10: David Kelley on the Prototype WPF and Silverlight Retail Experience Pete Brown also interviewed Emil Stoychev at MIX10: Pete at MIX10: Emil Stoychev on the CompletIT Silverlight Site SilverlightShow has a MIX10 Review by SilverlightShow Live Reporter Cigdem Patlak SilverlightShow also has an Interview with SilverlightShow Article Author Andrej Tozon From SilverlightCream.com: Implementing Push Notifications in Windows Phone 7 Zoltan Arvai has a post up on SilverlightShow discussing Push Notification on WP7 ... what it is, and how to use it. Completit.com - the challenges behind building a corporate website in Silverlight Svetla Stoycheva shows off the new CompleteIT corporate website which is pretty darn cool... and disucusses some of the challenges and solutions Introducing to Halcyone - Silverlight Application Framework: Silverlight Rest Extensions Alexey Zakharov has a tutorial up on a Silverlight application framework he's working on called Halcyone which is available on CodePlex Using the Tag Property during Silverlight Binding Chris Rouw details his SL3 to SL4 conversion and some issues he had, and how he was able to resolve a binding problem using the tag property. Using ContextMenu to implement SplitButton and MenuButton for Silverlight (or WPF) David Anson has a cool discussion up of using the ContextMenu code he put up previously to build a Split button, and includes all the code as usual. Silverlight/WPF Data Visualization Development Release 4 and Windows Phone 7 Charting sample! David Anson updated his Data Visualization because of the new releases, and this time he's including WP7... charting in WP7... ! Space Rocks game step 10: More fun with rocks In episode 10, Bill Reiss shows how to deal with multiple asteroids and all the interaction. Silverlight Training Course (Silverlight 4) Get your serious Silverlight 4 Mojo on with a new SL4 Training kit on Channel 9 ... buncha folks, spearheaded (it looks like) by John Papa and Adam Kinney... Plug-ins and composite applications in Silverlight – pt 3 Chris Klug is back with part 3 of his series on extensions and plug-in loading. So far he's covered a roll-your-own concept and MEF, now he digs into Prism. Transitions, Animations, and Effects with Blend - Part One How cool to have CorrinaB speak at your User Group meeting! ... She did just that in Portland, and instead of simply dropping a deck and some code in her blog, she's giving the run-down on her presentation... always good stuff, Corrina! Tip of the Day #110 – Using Static Resources in Class Libraries Mike Snow's latest tip is about how to create and use a Resource Dictionary. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Scrolling an HTML 5 page using JQuery

    - by nikolaosk
    In this post I will show you how to use JQuery to scroll through an HTML 5 page.I had to help a friend of mine to implement this functionality and I thought it would be a good idea to write a post.I will not use any JQuery scrollbar plugin,I will just use the very popular JQuery Library. Please download the library (minified version) from http://jquery.com/download.Please find here all my posts regarding JQuery.Also have a look at my posts regarding HTML 5.In order to be absolutely clear this is not (and could not be) a detailed tutorial on HTML 5. There are other great resources for that.Navigate to the excellent interactive tutorials of W3School.Another excellent resource is HTML 5 Doctor.Two very nice sites that show you what features and specifications are implemented by various browsers and their versions are http://caniuse.com/ and http://html5test.com/. At this times Chrome seems to support most of HTML 5 specifications.Another excellent way to find out if the browser supports HTML 5 and CSS 3 features is to use the Javascript lightweight library Modernizr.In this hands-on example I will be using Expression Web 4.0.This application is not a free application. You can use any HTML editor you like.You can use Visual Studio 2012 Express edition. You can download it here. Let me move on to the actual example.This is the sample HTML 5 page<!DOCTYPE html><html lang="en">  <head>    <title>Liverpool Legends</title>        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >        <link rel="stylesheet" type="text/css" href="style.css">        <script type="text/javascript" src="jquery-1.8.2.min.js"> </script>     <script type="text/javascript" src="scroll.js">     </script>       </head>  <body>    <header>        <h1>Liverpool Legends</h1>    </header>        <div id="main">        <table>        <caption>Liverpool Players</caption>        <thead>            <tr>                <th>Name</th>                <th>Photo</th>                <th>Position</th>                <th>Age</th>                <th>Scroll</th>            </tr>        </thead>        <tfoot class="footnote">            <tr>                <td colspan="4">We will add more photos soon</td>            </tr>        </tfoot>    <tbody>        <tr class="maintop">        <td>Alan Hansen</td>            <td>            <figure>            <img src="images\Alan-hansen-large.jpg" alt="Alan Hansen">            <figcaption>The best Liverpool Defender <a href="http://en.wikipedia.org/wiki/Alan_Hansen">Alan Hansen</a></figcaption>            </figure>            </td>            <td>Defender</td>            <td>57</td>            <td class="top">Middle</td>        </tr>        <tr>        <td>Graeme Souness</td>            <td>            <figure>            <img src="images\graeme-souness-large.jpg" alt="Graeme Souness">            <figcaption>Souness was the captain of the successful Liverpool team of the early 1980s <a href="http://en.wikipedia.org/wiki/Graeme_Souness">Graeme Souness</a></figcaption>            </figure>            </td>            <td>MidFielder</td>            <td>59</td>        </tr>        <tr>        <td>Ian Rush</td>            <td>            <figure>            <img src="images\ian-rush-large.jpg" alt="Ian Rush">            <figcaption>The deadliest Liverpool Striker <a href="http://it.wikipedia.org/wiki/Ian_Rush">Ian Rush</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>51</td>        </tr>        <tr class="mainmiddle">        <td>John Barnes</td>            <td>            <figure>            <img src="images\john-barnes-large.jpg" alt="John Barnes">            <figcaption>The best Liverpool Defender <a href="http://en.wikipedia.org/wiki/John_Barnes_(footballer)">John Barnes</a></figcaption>            </figure>            </td>            <td>MidFielder</td>            <td>49</td>            <td class="middle">Bottom</td>        </tr>                <tr>        <td>Kenny Dalglish</td>            <td>            <figure>            <img src="images\kenny-dalglish-large.jpg" alt="Kenny Dalglish">            <figcaption>King Kenny <a href="http://en.wikipedia.org/wiki/Kenny_Dalglish">Kenny Dalglish</a></figcaption>            </figure>            </td>            <td>Midfielder</td>            <td>61</td>        </tr>        <tr>            <td>Michael Owen</td>            <td>            <figure>            <img src="images\michael-owen-large.jpg" alt="Michael Owen">            <figcaption>Michael was Liverpool's top goal scorer from 1997–2004 <a href="http://www.michaelowen.com/">Michael Owen</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>33</td>        </tr>        <tr>            <td>Robbie Fowler</td>            <td>            <figure>            <img src="images\robbie-fowler-large.jpg" alt="Robbie Fowler">            <figcaption>Fowler scored 183 goals in total for Liverpool <a href="http://en.wikipedia.org/wiki/Robbie_Fowler">Robbie Fowler</a></figcaption>            </figure>            </td>            <td>Striker</td>            <td>38</td>        </tr>        <tr class="mainbottom">            <td>Steven Gerrard</td>            <td>            <figure>            <img src="images\steven-gerrard-large.jpg" alt="Steven Gerrard">            <figcaption>Liverpool's captain <a href="http://en.wikipedia.org/wiki/Steven_Gerrard">Steven Gerrard</a></figcaption>            </figure>            </td>            <td>Midfielder</td>            <td>32</td>            <td class="bottom">Top</td>        </tr>    </tbody></table>          </div>            <footer>        <p>All Rights Reserved</p>      </footer>     </body>  </html>  The markup is very easy to follow and understand. You do not have to type all the code,simply copy and paste it.For those that you are not familiar with HTML 5, please take a closer look at the new tags/elements introduced with HTML 5.When I view the HTML 5 page with Firefox I see the following result. I have also an external stylesheet (style.css). body{background-color:#efefef;}h1{font-size:2.3em;}table { border-collapse: collapse;font-family: Futura, Arial, sans-serif; }caption { font-size: 1.2em; margin: 1em auto; }th, td {padding: .65em; }th, thead { background: #000; color: #fff; border: 1px solid #000; }tr:nth-child(odd) { background: #ccc; }tr:nth-child(even) { background: #404040; }td { border-right: 1px solid #777; }table { border: 1px solid #777;  }.top, .middle, .bottom {    cursor: pointer;    font-size: 22px;    font-weight: bold;    text-align: center;}.footnote{text-align:center;font-family:Tahoma;color:#EB7515;}a{color:#22577a;text-decoration:none;}     a:hover {color:#125949; text-decoration:none;}  footer{background-color:#505050;width:1150px;}These are just simple CSS Rules that style the various HTML 5 tags,classes. The jQuery code that makes it all possible resides inside the scroll.js file.Make sure you type everything correctly.$(document).ready(function() {                 $('.top').click(function(){                     $('html, body').animate({                         scrollTop: $(".mainmiddle").offset().top                     },4000 );                  });                 $('.middle').click(function(){                     $('html, body').animate({                         scrollTop: $(".mainbottom").offset().top                     },4000);                  });                     $('.bottom').click(function(){                     $('html, body').animate({                         scrollTop: $(".maintop").offset().top                     },4000);                  }); });  Let me explain what I am doing here.When I click on the Middle word (  $('.top').click(function(){ ) this relates to the top class that is clicked.Then we declare the elements that we want to participate in the scrolling. In this case is html,body ( $('html, body').animate).These elements will be part of the vertical scrolling.In the next line of code we simply move (navigate) to the element (class mainmiddle that is attached to a tr element.)      scrollTop: $(".mainmiddle").offset().top  Make sure you type all the code correctly and try it for yourself. I have tested this solution will all 4-5 major browsers.Hope it helps!!!

    Read the article

  • Programmatically examine DLL contents

    - by Peter Hansen
    Is it possible programmatically to discover the exported names (globals, entry points, whatever) in a Windows DLL file without implementing a parser for the binary executable file format itself? I know there are tools to do this (though no open source ones I've found), but I'm curious whether there is a Windows API to accomplish the same thing or whether such tools operate merely by examining the binary file directly. I suspect there is an API for .NET libraries: if that's the case then is there a similar one for native DLLs? Edit: http://stackoverflow.com/questions/1128150 is basically an exact duplicate. The answer there is roughly "there is no API, but you can hack it using LoadLibraryEx() and navigating a few resulting data structures". Edit: I was able to use the accepted answer at http://stackoverflow.com/questions/1128150 to create a quick DLL dumper with Python and ctypes that works.

    Read the article

  • WebClient on WP7 - Throw "A request with this method cannot have a request body"

    - by Peter Hansen
    If I execute this code in a Consoleapp it works fine: string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&offset=0"; WebClient wc = new WebClient(); wc.Headers["Content-Type"] = "application/json"; wc.Headers["Authorization"] = AuthString.Replace("\\", ""); string responseArrayKvitteringer = wc.DownloadString(uriString); Console.WriteLine(responseArrayKvitteringer); But if I move the code to my WP7 project like this: string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&offset=0"; WebClient wc = new WebClient(); wc.Headers["Content-Type"] = "application/json"; wc.Headers["Authorization"] = AuthString.Replace("\\", ""); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted); wc.DownloadStringAsync(new Uri(uriString)); void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { MessageBox.Show(e.Result); } I got the exception: A request with this method cannot have a request body. Why? The solution is to remove the Content-type: string uriString = "http://url.com/api/v1.0/d/" + Username + "/some?amount=3&offset=0"; WebClient wc = new WebClient(); //wc.Headers["Content-Type"] = "application/json"; wc.Headers["Authorization"] = AuthString.Replace("\\", ""); wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted); wc.DownloadStringAsync(new Uri(uriString)); void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { MessageBox.Show(e.Result); }

    Read the article

  • MPVolumeView, avoid displaying "No Volume Available"

    - by Emil
    Hey. I have a project with a MPVolumeView in it. It is set up, and it works, the only thing is that when I mute the device, the text "No Volume Available" comes up instead of the MPVolumeView. The volumeView is initialized in the view volumeBounds, with that view's bounds. MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:volumeBounds.bounds] autorelease]; [volumeBounds addSubview:volumeView]; [volumeView sizeToFit]; Thanks :)

    Read the article

  • MPVolumeView, avoid displaying "No Volume Available"

    - by Emil
    Hey. I have a project with a MPVolumeView in it. It is set up, and it works, the only thing is that when I mute the device, the text "No Volume Available" comes up instead of the MPVolumeView. The volumeView is initialized in the view volumeBounds, with that view's bounds. MPVolumeView *volumeView = [[[MPVolumeView alloc] initWithFrame:volumeBounds.bounds] autorelease]; [volumeBounds addSubview:volumeView]; [volumeView sizeToFit]; Thanks :)

    Read the article

  • Changing size of content in HorizontalScrollView when phone is rotated by overriding onConfiguration

    - by Emil Arfvidsson
    Hello I have a problem with resizing content in a HorizontalScrollView when the phone is rotated. I'm overriding onConfigurationChanged in my activity containing the HorizontalScrollView, since I want to handle the resizing myself. However, I'm having great problem finding where i should put the resizing of the content. The HorizontalScrollView it self has FILL_PARENT as width and a fixed height. The idea is that it should always fill the screen width-wise, while having several cells of content, each as wide as the HorizontalScrollView itself. The content in my HorizontalScrollView consists of one LinearLayout (let's call it wrapperLayout) with several LinearLayouts inside it. When the phone rotates I simply want to change the width of all the LinearLayouts inside the wrapperLayout. This is easy to do and works great when I test the resizing code by putting it in onInterceptTouchEvent(MotionEvent ev), that is the views are resized just as they are supposed to when I touch the HorizontalScrollView. The difficulty appears when I try to find a good spot to execute resizing code, so that the resizing happens automatically when the phone is rotated. I have tried all possible combinations of requestLayout, onSizeChanged, onLayout, onConfigurationChanged and a few others and varying their calls to super (if any) before and after the resizing code. I can not make this work (the views are not resized even though the resize code is executed) and it is really frustrating. I've done a lot of logging to make sure the HorizonalScrollView really has changed width before calling my resize code but to no avail. Does anyone have any clue as to what is going on? What methods are called and in what order when I handle the onConfigurationChanged by myself like this? Thanks in advance

    Read the article

  • TextBox, Button and ListBox in a ListBox

    - by Emil C
    I have a listbox with a bunch of contols in each list item. <ListBox x:Name="projectList" IsSynchronizedWithCurrentItem="True"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}" /> <ListBox x:Name="taskList" ItemsSource="{Binding Tasks}"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <TextBox x:Name="textBoxTask" /> <Button x:Name="ButtonAddNewTask" Content="Test" CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" Click="ButtonAddNewTask_Click" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> </ListBox> When I click on the button in the listbox i want to add a new item to the listbox within the listbox. I've come this far. So my question is how do I get hold of the textbox and how do I update the listbox? Here is my click event private void ButtonAddNewTask_Click(object sender, RoutedEventArgs e) { Button button = (Button)sender; Project proj = button.DataContext as Project; if(proj.Tasks == null) proj.Tasks = new List<Task>(); proj.Tasks.Add(new Task("Added Task")); } Thanx

    Read the article

  • Dynamic ASP.NET controls using Infragistics

    - by Emil D
    So, in my asp.net webapp I need to dynamically load a custom control, based on the selected value of a dropdown list.That seems to work at first glance, but for some reason all infragistics controls that I have in my custom control appear, but won't work.I get a "Can't init [controlname]" warning in my browser.If I declare my custom control statically, this problem doesn't apprear Here's my code: Markup: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GenericReportGUI.ascx.cs" Inherits="GenericReportGUI" %> <%@ Register assembly="Infragistics35.WebUI.Misc.v8.3, Version=8.3.20083.1009,Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.Misc" tagprefix="igmisc" %> <asp:UpdatePanel ID="myUpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <igmisc:WebPanel ID="WebPanel1" runat="server"> <Template> <div> <asp:PlaceHolder ID="Placeholder" runat="server"> </asp:PlaceHolder> </div> </Template> </igmisc:WebPanel> </ContentTemplate> </asp:UpdatePanel> Code-behind: public partial class GenericReportGUI : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } protected override void OnPreRender( EventArgs e ) { base.OnPreRender(e); loadCustomControl(); } protected void loadCustomControl() { Placeholder.Controls.Clear(); string controlPath = getPath(); //getPath() returns the path to the .ascx file we need to load, based on the selected value of a dropdownlist try { Control newControl = LoadControl( controlPath ); Placeholder.Controls.Add( newControl ); } catch { //if the desired control cannot be loaded, display nothing } myUpdatePanel.Update();//Update the UpdatePanel that contains the custom control } } I'm a total noob when it comes to asp.net, so any help with this issue would be greatly appreciated.

    Read the article

  • LGPL and Dual Licensing Ajax Library

    - by Thomas Hansen
    Hi guys, I'm the previous founder of Gaiaware and Gaia Ajax Widgets and when I used to work there we had this rhetoric (which I have confirmed with some very smart FOSS people is correct) that when using a GPL Ajax library you're basically "distributing" the JavaScript which in turn makes the GPL viral clause kick in and forces people to purchase a proprietary license if they're going to build Closed Source stuff... So now I'm the the LGPL world here with Ra-Ajax which is an LGPL licensed library and I've got no intentions of creating a GPL licensed library since I believe strongly in that the LGPL is the "enabler" of the Open Web to prevail. But something interesting have happened which I think might still give me a "business model" here which is the Linking clause of the LGPL which I think goes something like this (pseudo); "If you link to an LGPL licensed thing you get no restrictions on your own derived works"... But so we started creating something we're calling Ajax Starter-Kits which effectively is a "Project Kickstarter" where you can download a finished project/solution which basically enables you to start out with some pre-done boiler plate code for problems such as Ajax DataGrids, Ajax Calendar Applications, Ajax TreeView Applications etc. And the funny thing is that our users would NOT "link" to these, they would effectively BE our users applications... So to wrap up my question. Would this force users of our LGPL licensed Ajax Starter-Kits to LGPL license their own work? Basically if it does we have a business model (and I get very happy) if not I'd just have to hope people would still like to pay us those $29 for our Starter-Kits to support the project... ;) Help rewarded with extreme gratitude...

    Read the article

  • styleWithCSS for IE

    - by Kristoffer S Hansen
    I'm building a custom RTE that converts user input to a homebrewn markup, now idiot that I am I did this using an iframe with designMode = "On" and got it to work in firefox using styleWithCSS = false so that I could easily convert the <b> (yes... b :( ) into my markup which would then output the proper code instead of me having to read from <span style="... now my problem is, I cant seem to find something that looks or acts like styleWithCSS = false for IE, Chrome or Opera, any suggestions are welcome.

    Read the article

  • Inheriting from ViewPage forces explicit casting of model in view

    - by Martin Hansen
    I try to inhering from ViewPage as shown in this question http://stackoverflow.com/questions/370500/inheriting-from-viewpage But I get a Compiler Error Message: CS1061: 'object' does not contain a definition for 'Spot' and no extension method 'Spot' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) My viewpage, normally I can do Model.ChildProperty(Spot) when I inherit from ViewPage directly, so I do that here too. But it fails. <%@ Page Language="C#" Inherits="Company.Site.ViewPageBase<WebSite.Models.SpotEntity>" %> <h1><%= Html.Encode(Model.Spot.Title) %></h1> To get it working correctly I have to do like this: <%@ Page Language="C#" Inherits="Company.Site.ViewPageBase<WebSite.Models.SpotEntity>" %> <h1><%= Html.Encode(((WebSite.Models.SpotEntity)Model).Spot.Title) %></h1> Here is my classes: namespace Company.Site { public class ViewPageBase<TModel> : Company.Site.ViewPageBase where TModel:class { private ViewDataDictionary<TModel> _viewData; [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public new ViewDataDictionary<TModel> ViewData { get { if (_viewData == null) { SetViewData(new ViewDataDictionary<TModel>()); } return _viewData; } set { SetViewData(value); } } protected override void SetViewData(ViewDataDictionary viewData) { _viewData = new ViewDataDictionary<TModel>(viewData); base.SetViewData(_viewData); } } public class ViewPageBase : System.Web.Mvc.ViewPage { } } So how do I get it to work without the explicit cast?

    Read the article

  • 301 versus inline rewrites

    - by Kristoffer S Hansen
    I'm in the process of adding 'pretty' URLs to an existing CMS, the menu is auto generated and the new 'pretty' URLs are to be handled independently as a seperate module. The auto-generated menu allways has URLs that look like this index.php?menu_id=n which ofcourse we would like to see as eg. /news or /products I'm currently at the point where I have to decide if I'm going to rewrite all output of the current system or simply put in a hook where I redirect to the 'pretty' URL. To put it differently, should i connect to the database, fetch all 'pretty' URLs, run through the existing output from WYSIWYG's, news modules, forums etc. and do some str_replace or other string manipulation (which I think would be a rather tedious and boring process), or should I simply hook in and throw a 301 redirecting index.php?menu_id=3 to /news will Google (or other search engines) penalize me for having 301's in the menus?

    Read the article

  • UIWebView - get total height of contents using Javascript

    - by Emil
    Hey. I'm trying to use a UIWebView for displaying content higher than the screen of the iPhone, without needing to scroll in the webView itself. For that, I need a way to get the total document size, including the scrollable area. I have tried a number of different Javascript solutions: (document.height !== undefined) ? document.height : document.body.offsetHeight // Returns height of UIWebView document.body.offsetHeight // Returns zero document.body.clientHeight // Returns zero document.documentElement.clientHeight // Returns height of UIWebView window.innerHeight // Returns height of UIWebView -2 Can you think of any other way to do it? Thanks.

    Read the article

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