Daily Archives

Articles indexed Wednesday April 21 2010

Page 27/126 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • How to use #if directives in C#(3.0)

    - by Newbie
    I just found two piece of code #if CONSOLE // defined by the console version using ournamespace.FactoryInitializer; #endif and #if _NET_1_1 log4net.Config.DOMConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) ); #else log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(s) ); #endif Can any one please tell me with a running sample( please provide a simple one) what is the significance of those code snippets and when and how to use those? Thanks.

    Read the article

  • ql-server-2008 client Access license

    - by thushya
    Hi, case 1 : i have one user makes 10 connection from single computer, maximum number of connection at a given time = 10, what is the number CAL i need here ? case 2 : i have 10 users have access to only 1 computer, 10 user connect from single computer - maximum connection at any given time = 1, what is the number CAL i need here ? case 3 : i have 10 users using 10 computers, all 10 are making total of 5 connection maximum in any given time, what is the number of CAL i need here ? Thanks.

    Read the article

  • help with Outlook Exchange server and curl

    - by stib
    I work on a mac in a building full of PCs, and the IT department here doesn't have IMAP access turned on on the exchange servers. So I miss a lot of meetings because I don't get reminders because I access my mail via Outlook Web access. I had written a script to scrape my Outlook Web Access calendar and turn it into iCal format, so I could get my reminders via thunderbird or iCal.app. It basically downloaded the calendar page via curl, parsed the HTML and reformatted all the appointments as ical. it wasn't elegant, but it worked. Then they changed to outlook 2007, and it doesn't work any more. I have a sketchy knowledge of curl, and almost zero knowledge of how outlook works. Can anyone point me towards a reference for getting calendar info out of an exchange server without using outlook? If I can configure curl to get the HTML I will be happy, but if there's a more elegant way, such as getting the calendar info as XML I'll be delirious.

    Read the article

  • vertical scrolling of text in UItextfield

    - by mindfreak
    I am filling Uitextfield with Uibutton click event.(e.g. clicking on BUTTONA will add 'a' to textfield.). my problem is that when inserted text reaches the end of textfield, further characters inserted into textfield via UIbutton are not visible.instead ... is seen . how to let text inside Uitextfield scroll to left when width of UItextfield is reached(just like when we enter characters in UItextfield via keyboard) ? Please let me know.

    Read the article

  • jquery.position() isn't working correctly.

    - by devzero
    I'm working on a menu system where I want a ul to show as a dropdown when the users does a mouseOver on li in another ul. I thought I'd use position to set the position of the dropdown (so it actually looks like a menu). What I want is the dropdown's top left corner to start at the same place as the bottom left corner of the wrapping listitem. Unfortunately the positioning fails in several different ways: In Firefox it seems like the dropdown's are offset with approximately -100 25 pixels the first item in the list has a different offset on the left side compared to the other items The offset in IE is not the same as in FF Doing the positioning repeatedly in explorer results in different positions each time. I've created a test page where you can see the effects: http://test.evju.biz/test/test_position.html

    Read the article

  • Flex: How to resize DisplayObject to fit panel in Flex application

    - by ohm
    I am trying to attach some of my actionscript class, inherited from Sprite, to my Flex application by attaching it to a UIComponent, then add UIComponent to a panel. However, the size of my Sprite class appears to be larger than the panel. So, I try to resize it using DisplayObject.scale property, but I need to know the size of my container. Since I try to make my code reusable, I figure that I should let my Sprite class handle the resize by getting it via its parent property (let's say, I can resize it by set this.scaleX = this.parent.Width/this.width or something like this) However, my Sprite class's parent, which is the UIComponent, has width/height of 0. So, my question is: 1) Is there any better way to resize DisplayObject class to fit its container when attached to Flex object? 2) If you know, why my UIComponent's size remain 0 and my DisplayObject still appears at its full size? Here's my code, using Flash Builder 4: private var loader:Loader = new Loader(); private function testLoader():void { var urlRequest:URLRequest = new URLRequest("http://localhost/welcome.png"); loader.load(urlRequest); loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderLoadComplete); } private function onLoaderLoadComplete(e:Event):void { loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,onLoaderLoadComplete); var ui : UIComponent = new UIComponent(); ui.addChild(loader); panelTest.addElement(ui); trace("ui.width = " + ui.width); trace("ui.height = " + ui.height); trace("loader.width = " + loader.width); trace("loader.height = " + loader.height); trace("panelTest.width = " + panelTest.width); trace("panelTest.height = " + panelTest.height); } And this is the result when run: ui.width = 0 ui.height = 0 loader.width = 571 loader.height = 411 panelTest.width = 480 panelTest.height = 320

    Read the article

  • strange redefined symbols

    - by Chris H
    I included this header into one of my own: http://codepad.org/lgJ6KM6b When I compiled I started getting errors like this: CMakeFiles/bin.dir/SoundProjection.cc.o: In function `Gnuplot::reset_plot()': /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include/g++-v4/new:105: multiple definition of `Gnuplot::reset_plot()' CMakeFiles/bin.dir/main.cc.o:project/gnuplot-cpp/gnuplot_i.hpp:962: first defined here CMakeFiles/bin.dir/SoundProjection.cc.o: In function `Gnuplot::set_smooth(std::basic_string, std::allocator const&)': project/gnuplot-cpp/gnuplot_i.hpp:1041: multiple definition of `Gnuplot::set_smooth(std::basic_string, std::allocator const&)' CMakeFiles/bin.dir/main.cc.o:project/gnuplot-cpp/gnuplot_i.hpp:1041: first defined here CMakeFiles/bin.dir/SoundProjection.cc.o:/usr/include/eigen2/Eigen/src/Core/arch/SSE/PacketMath.h:41: multiple definition of `Gnuplot::m_sGNUPlotFileName' I know it's hard to see in this mess, but look at where the redefinitions are taking place. They take place in files like /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include/g++-v4/new:105. How is the new operator getting information about a gnuplot header? I can't even edit that file. How could that ever even be possible? I'm not even sure how to start debugging this. I hope I've provided enough information. I wasn't able to reproduce this in a small project. I mostly just looking for tips on how to find out why this is happening, and how to track it down. Thanks.

    Read the article

  • How to paste text from one app to another using Cocoa?

    - by Navi Sidhu
    I have read about NSPasteBoard in the Apple documentation, and how it allows for applications to write into the PasteBoard and allow other applications to read that text and use it. Could someone tell me how to paste text from am application (that sits in the status bar) into a NSTextField that is inside a different application. What I am trying to do is something similar what Snippet and SnippetsApp do. If I am completely stupid and missed the obvious in Apple Docs, could you please point me to the right path :) Thanks!

    Read the article

  • iPhone + Provisioning Profile + app-info.plist + entitlements.plist = iPhoneApp ? How ? What exactly

    - by sagar
    To execute my application in iPhone first of all I have to add provisioning profile in to my iPhone. Good. But I don't understand the reason behind adding a entitlements.plist in iphone application in xCode under resources. What does that entitlements.plist file do actually ? Why that .plist file have only single Boolean in it ? (get-task-allow) Can't we add that Boolean variable to application-info.plist ? I mean, I can't find the reason behind storing a single Boolean variable in separate plist file. Instead application-info.plist already contains many many application settings. Can't we just add this Boolean variable to application-info.plist. Ok, any way. I know - it won't be possible. Because we have to follow - what apple says. But, here main intention behind all these was "what is the basic need of entitlements.plist ?" or "what is the functionality of entitlements.plist ?" "How provisioning profile, entitlements.plist, application-info.plist & iPhone application compile all together & make verification on iPhone & execute it on iPhone ? "

    Read the article

  • Setting selected item in custom Zend_Form_Element

    - by sanders
    Hello Everyone, I have created my own little form element for inputting time's. Since I need this on a few places in my application, i decided to create a seperate element for it. Here is the code so fa: class EventManager_Form_Element_Time extends Zend_Form_Element { public function init() { parent::init(); $this->addDecorator('ViewScript', array( 'viewScript' => 'time.phtml' )); $this->addValidator(new Zend_Validate_Regex('/^[0-9]+:[0-9]+:[0-9]+$/')); } public function setValue($value) { if(is_array($value)) { @list($hours, $minutes, $seconds) = $value; $value = sprintf('%s:%s:%s', $hours, $minutes, $seconds); } return parent::setValue($value); } } The corresponding view script, which I have created is: <?php @list($hours, $minutes, $seconds) = explode(':', $this->element->getValue()); ?> <dt> <?= $this->formLabel($this->element->getName(), $this->element->getLabel()); ?> </dt> <dd> <select id="<?= $this->element->getName();?>"> <option value="00">00</option> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> </select> <select id="<?= $this->element->getName();?>"> <option value="00">00</option> <option value="15">15</option> <option value="30">30</option> <option value="45">45</option> </select> <input id="<?= $this->element->getName(); ?>" type="hidden" name="<?= $this->element->getName(); ?>[]" value="00" /> <?php if(count($this->element->getMessages()) > 0): ?> <?= $this->formErrors($this->element->getMessages()); ?> <?php endif; ?> </dd> My problem is that sometimes i want to set a default selected value to my selecboxes when I populate my form. The question is how? Is there anyone that could help me out with this? Thanks.

    Read the article

  • WPF: IEditableCollectionView and CanAddNew and empty collections

    - by Aran Mulholland
    We were having some issues with the wpf datagrid and IEditableCollectionView (although this question applies to using IEditableCollectionView and ItemsControl) When you have a collection with no items in it, the IEditableCollectionView cannot determine what items should be inserted so it sets CanAddNew=false we found a solution here (buried deep in the comments) that goes like so : If you derive from ObservableCollection like this public class PersonsList : ObservableCollection<Person> { } you will find out that if the initial collection is empty, there won't be a NewItemPlaceHolder showing up on the view. That's because PersonsList cannot resolve type T at design time. A workaround that works for me is to pass type T as a parameter into the class like this PersonsList<T> : ObservableCollection<T> where T : Person { } This approach will place the NewItemPlaceHolder even if the collection is empty. I'm wondering if there is an interface i can implement on my collections that inform the IEditableCollectionView which type to create should i get an AddNew request.

    Read the article

  • Detect if an app was uninstalled

    - by mobilekid
    Is there a way to get a system notification when an app has been uninstalled? I would like to maintain a table of all clients' info currently using my app. However, that seems impossible if there is no way to detect this event. The first solution I can think of is to have an always running service in the background listening for android.intent.action.PACKAGE_REMOVED. But then would that service be killed once the uninstallation process has ended, or would it be stopped just before the process has kicked off? Also even if this is a solution it's has the potential to put off a lot of people when they realise that part of the app is running in the background. Any suggestions? Thanks!

    Read the article

  • ASP.NET Membership - Change password without asking the old (WITH Question and Answer)

    - by djsolid
    I have received many comments and questions about how you can do what is described in this post when you site requires question and answer. The solution is definiterly not the best and should be used with EXTREME caution because in a high traffic website can cause problems but I write it down anyway. We will use reflection in order to solve our problem. And this is the code But this code changes the only instance of MembershipProvider meaning if you access somewhere else from your application the property RequiresQuestionAndAnswer until you set back it’s original value you will get false instead of true. So again be VERY careful. Hope you find it useful!

    Read the article

  • Microsoft Townhall, An Example for Azure and MVC

    - by Shaun
    Microsoft just released an example named Microsoft Townhall which was built and deployed on Azure. It uses ASP.NET MVC as its webiste framework and the SQL Azure plus LinqToSQL as its the database and the ORM framework. You can download the source code at the MSDN Code Gallery. Basides the Azure it might be more useful to us to learn how they utilized ASP.NET MVC. Just a very quickly review I found it utilized the Enterprise Library Unity as the main IoC container for controllers, services and repositories and customized a lot of ModelBinders, Filters, etc.   Hope this helps, Shaun   All documents and related graphics, codes are provided "AS IS" without warranty of any kind. Copyright © Shaun Ziyan Xu. This work is licensed under the Creative Commons License.

    Read the article

  • How do I search only my twits in twitter?

    - by terrani
    Hi, I am new to twitter. Rather than using twitter to broadcast my text, I would like to organize my ideas using hashtags. One thing I can't figure out is that I can't search my twits ONLY. How do I limit search result so I can only see my twits? I tried from:myid #test, it does not work.

    Read the article

  • automator scripts - resources

    - by sagar
    In Leopard, on Finder - desktop, right click pop up menu has an option for automator scripts. In Snow Leopard - they have removed this option. More over, I would like to learn some automator scripts. What are the great resources for learning about automator & it's script ? Suppose, I want to create an automator for creating a tar.gz for selected files & folders. What should I do ? Thanks in advance for sharing your knowledge. Please add comment before down vote or close vote. Sagar.

    Read the article

  • What are the exact versions of stuff you have to install in order to be able to step-debug a Scala p

    - by Alex R
    How do YOU debug a Scala program? I mean YOU as in the person posting the Answer :) Please answer only from personal experience, not from stuff you've heard or read on the Internet. You should not believe everything you read on the Internet, especially tales of complex open-source software configurations that actually work :-) The are many Java tools which claim to support Scala in some way or another, but I have so far struck out in trying to get any one of them to actually let me set a breakpoint in Scala code and step through it. These are big, major open-source IDEs I'm talking about here. The main problem in getting a debugger to work seems to be the "version hell" with fast-changing IDEs, Plug-Ins, JDKs, and the Scala language itself. Hence, the more detailed re-statement of the question is appropriate: What is the exact version number of the IDE, Plug-In, JDK, Scala, and even Operating System, that you are successfully using? My question is related to this one, but wider in scope: http://stackoverflow.com/questions/2272705/how-to-debug-scala-code-when-outside-of-an-ide Thanks

    Read the article

  • How i calling UITableViewController in UITabBarController screen using Navigation bar on button clic

    - by Rajendra Bhole
    Hi, My i have to develop simple window based iphone application. In my first screen I design the UITabBarController with four TabBarButton.On first Tab screen contains three buttons. When i click on of the button, the screen should navigate on simple tableView screen.But tableView screen the TabBarController should have be visible. Means simply first replacing with table view and move back to again previous one(The UITabBarController should be visible on all srceen).

    Read the article

  • Anomalous results getting color components of some UIColors

    - by hkatz
    I'm trying to extract the rgb components of a UIColor in order to hand-build the pixels in a CGBitmapContext. The following sample code works fine for most of the UIColor constants but, confusingly, not all. To wit: CGColorRef color = [[UIColor yellowColor] CGColor]; const float* rgba = CGColorGetComponents(color); float r = rgba[0]; float g = rgba[1]; float b = rgba[2]; float a = rgba[3]; NSLog( @"r=%f g=%f b=%f a=%f", r, g, b, a); The results for [UIColor yellowColor] above are r=1.000000 g=1.000000 b=0.000000 a=1.000000, as expected. [UIColor redColor] gives r=1.000000 g=0.000000 b=0.000000 a=1.000000, again as expected. Similarly for blueColor and greenColor. However, the results for [UIColor blackColor] and [UIColor whiteColor] seem completely anomalous, and I don't know what I'm doing wrong (if indeed I am). To wit, [UIColor blackColor] gives r=0.000000 g=1.000000 b=0.000000 a=0.000000, which is a tranparent green, and [UIColor whiteColor] gives r=1.000000 g=1.000000 b=0.000000 a=0.000000, which is a transparent yellow. I'd appreciate it if somebody could either: (1) explain what I'm doing wrong (2) replicate my anomalous results and tell me it's not me, or (3) hit me over the head with a big hammer so it stops hurting so much. Howard

    Read the article

  • removing data from session

    - by sarah
    Hi All, i am using the following code to remove a attribute from session List l=(List) sess.getAttribute("allUserslist"); for(int ii=0;ii l1=(List) sess.getAttribute("allUserslist"); System.out.println("final size"+l1.size()); } te final size after removing is still one as before,where i am doing wrong ? }

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >