Daily Archives

Articles indexed Friday March 12 2010

Page 25/130 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Can I resize the screen resolution of a remote desktop session?

    - by At Nel
    Is it possible to change the screen resolution of a Windows remote desktop session after I'm already logged on? For example: it's set for fullscreen but afterwards I want to make the window smaller but now it's Windowed with scrollbars etc. making it a real pain. Basically what I'm hoping for is like when you resize a VMWare session, the guest OS can resize the resolution and everything works beautifully.

    Read the article

  • jQuery: modify href attribute for first level list only

    - by bloggerious
    I'm a noob in jQuery and have stuck at this. I have the following HTML code output from a PHP page: <ul class="cats"> <li><span><a href="cant_post_link_yet1">Lifestyle</a></span></li> <li><span><a href="cant_post_link_yet2">Entertainment</a></span></li> <li class="has_child"> <span><a href="cant_post_link_yet3">Technology</a></span> <ul class="subcats"> <li><span><a href="cant_post_link_yet4">Gadgets</a></span></li> <li><span><a href="cant_post_link_yet5">Hardware</a></span></li> </ul> </li> <li><span><a href="cant_post_link_yetsports">Sports</a></span></li> <li class="has_child"> <span><a href="cant_post_link_yet6">Design</a></span> <ul class="subcats"> <li class="has_child"> <span><a href="cant_post_link_yet7">Web Design</a></span> <ul class="subcat"> <li><span><a href="cant_post_link_yet8">Adobe Photoshop</a></span></li> </ul> </li> <li><span><a href="cant_post_link_yet9">Graphics and Print</a></span></li> </ul> </li> What's the correct jQuery code so that I can modify the href attribute for the first-level list only? Basically, I want to change the href of Technology and Design to be "#" but will not change the href of Web Design which is already on second-level list. More Info: In the code above, if list has subcategories, then it has the class has_child, whether it's on first-level or not. So I want only the first-level list which has class has_child to be modified the href to "#" I can't alter output anymore because it's in the PHP code. Any help is greatly appreciated.

    Read the article

  • python 'with' statement

    - by Stephen
    Hi, I'm using Python 2.5. I'm trying to use this 'with' statement. from __future__ import with_statement a = [] with open('exampletxt.txt','r') as f: while True: a.append(f.next().strip().split()) print a The contents of 'exampletxt.txt' are simple: a b In this case, I get the error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/tmp/python-7036sVf.py", line 5, in <module> a.append(f.next().strip().split()) StopIteration And if I replace f.next() with f.read(), it seems to be caught in an infinite loop. I wonder if I have to write a decorator class that accepts the iterator object as an argument, and define an __exit__ method for it? I know it's more pythonic to use a for-loop for iterators, but I wanted to implement a while loop within a generator that's called by a for-loop... something like def g(f): while True: x = f.next() if test(x): a = x elif test(x): b = f.next() yield [a,x,b] a = [] with open(filename) as f: for x in g(f): a.append(x)

    Read the article

  • How to parse XML to flex Data Grid contents.

    - by Jeeva
    My xml file which is in a webserver is show below. <root> <userdetails> <username>raja</username> <status>offline</status> </userdetails> <userdetails> <username>Test</username> <status>online</status> </userdetails> </root> How can i parse this to flex data grid contents. I tried with below coding < ?xml version="1.0" encoding="utf-8"? < mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="initApp()" < mx:HTTPService id="userList" result="handleData(event)" resultFormat="object" url="http://apps.facebook.com/ajparkin/user_list.xml" / <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.controls.Alert; public function initApp():void { userList.send(); } [Bindable] var userdetailsArray:ArrayCollection; private function handleData(evt:ResultEvent):void { this.userdetailsArray= evt.result.userdetails; } ]]> </mx:Script> <mx:DataGrid dataProvider="{userdetailsArray}"> <mx:columns> <mx:DataGridColumn dataField="username" headerText="User Name"/> <mx:DataGridColumn dataField="status" headerText="Status" /> </mx:columns> </mx:DataGrid> </mx:Application> I'm getting only the field names not the data.

    Read the article

  • Rails - Dynamic cookie domains using Rack

    - by Tim B.
    I'm fairly new to Rails and Rack, but this guy had a seemingly straightforward write-up about using Rack to implement dynamic session domain middleware. The code looks good to and I've implemented it here on my local machine, but I'm still not able to transcend top level domains on a single login. Here's the middleware code: class SetCookieDomain def initialize(app, default_domain) @app = app @default_domain = default_domain end def call(env) host = env["HTTP_HOST"].split(':').first env["rack.session.options"][:domain] = custom_domain?(host) ? ".#{host}" : "#{@default_domain}" @app.call(env) end def custom_domain?(host) domain = @default_domain.sub(/^\./, '') host !~ Regexp.new("#{domain}$", Regexp::IGNORECASE) end end And then in environment.db: config.load_paths += %W(#{RAILS_ROOT}/app/middlewares) Lastly in production.db (and development.db): config.middleware.use "SetCookieDomain", ".example.org" Any help is greatly appreciated. EDIT: I'm running Rails 2.3.3 and Rack 1.0

    Read the article

  • iPhone Shell - is there any?

    - by alee
    While working on iphone security architecture, i came to know that i can run applications from other applications in iphone. referring to the following url http://iphonedevelopertips.com/cocoa/launching-other-apps-within-an-iphone-application.html for example, i can put a link in a website with following hyperlink skype:// will result skype to run and call at particular number. Now i have few concerns here. is there a shell running in background in iphone, so that it allows other application to run basic app commands. if the above statement is true then how can i enable or run commands directly into iphone shell? if above statements are false, then could you please explain how these commands are being executed? is this part of iPhone SDK? or this funcationality is iPhone OS

    Read the article

  • Occasional conversion error using SUM function

    - by user153777
    My app uses sql2000 and a select statement it uses will sometimes fail. Once a week or so the select returns the error 'Error Converting data type varchar to numeric' SQL: sum(case when ISNULL(form_prsn_id, -1) = irpd_prsn_id then convert(dec(11,2), case when valu_value = '' then '0' else isnull (valu_value,'0') end)* case when fmdt_deduction_flag = 'Y' then -1 else 1 end else 0 end) as client_sum The valu_value field is a varchar and stores some numeric and some varchar. But including my join and where clause filter it will always select numeric or empty string. When it is failing I can remove the SUM, see the data and know that its numeric. So why would the SUM function sometimes (say 5% of time) fail on data that is numeric. I wonder if SQL somehow "looks ahead" to ensure it could convert to decimal on more than just the rows returned without the sum. Note I have discovered a fix where I include ( where isNumeric(valu_value) = 1 ) Thanks

    Read the article

  • Setting up GCALDaemon in Eclipse

    - by amadib
    Hello, my eventual goal is to be able to use the authentication and communication to a GMail inbox. In my attempt, I stumbled up on GCALDaemon and am trying to set it up as a project within eclipse. However, I am running into problems running the project from the included .launch files. I am receiving the following errors after running with -Dlog4j.debug on log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@1ba34f2. log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@1ba34f2 class loader. log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource(). log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@1ba34f2. log4j: Trying to find [log4j.properties] using sun.misc.Launcher$AppClassLoader@1ba34f2 class loader. log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource(). log4j: Could not find resource: [null]. log4j:WARN No appenders could be found for logger (org.gcaldaemon.core.Configurator). log4j:WARN Please initialize the log4j system properly. FATAL | Service terminated! Thanks.

    Read the article

  • WPF Menu Items Styles

    - by Allen Ho
    Hi, I have an application resource of the following <Style TargetType="{x:Type TextBlock}"> <Setter Property="Background" Value="{DynamicResource windowTextBackColor}"/> <Setter Property="Foreground" Value="{DynamicResource windowsTextForeColor}"/> </Style> So all the text blocks in my application should assume those colours. However the Menu and its containing MenuItems on my Main Window does not take these colours? I have to do the XAML for it to assume those colours, Is there a reason why setting a style that targets Text blocks does not work? Thanks

    Read the article

  • How to use DML on Oracle temporary table without generating much undo log

    - by Sambath
    Hi, Using an Oracle temporary table does not generate much redo log as a normal table. However, the undo log is still generated. Thus, how can I write insert, update, or delete statement on a temporary table but Oracle will not generate undo log or generate as little as possible? Moreover, using /+append/ in the insert statement will generate little undo log. Am I correct? If not, could anyone explain me about using the hint /+append/? INSERT /*+APPEND*/ INTO table1(...) VALUES(...); Thank you.

    Read the article

  • Case Statements versus coded if statements

    - by Eric
    What is more efficient - handling with case statements in sql or handling the same data using if statements in code. I'm asking because my colleague has a huge query that has many case statements. I advised her to take stress off of the DB by coding the case statements. I've found that it is more efficient...but why?

    Read the article

  • Mocking imported modules in Python

    - by Evgenyt
    I'm trying to implement unit tests for function that uses imported external objects. For example helpers.py is: import os import pylons def some_func(arg): ... var1 = os.path.exist(...) var2 = os.path.getmtime(...) var3 = pylons.request.environ['HTTP_HOST'] ... So when I'm creating unit test for it I do some mocking (minimock in my case) and replacing references to pylons.request and os.path: import helpers def test_some_func(): helpers.pylons.request = minimock.Mock("pylons.request") helpers.pylons.request.environ = { 'HTTP_HOST': "localhost" } helpers.os.path = minimock.Mock(....) ... some_func(...) # assert ... This does not look good for me. Is there any other better way or strategy to substitute imported function/objects in Python?

    Read the article

  • Dell Poweredge 2650 RAM Upgrade

    - by Vik
    Hi, I bought an old Dell Poweredge 2650 off ebay to use as a dev server, but I need to get more RAM for it. From what I understand there were 2 versions of the 2650 released, with the older version only supporting PC1600 RAM (200MHz) and the 2nd version supporting PC2400. Unfortunately Dell thought it wasn't necessary to label their servers as such so I can't tell what version I have. Does anyone know if there is a way to tell without buying and testing RAM in the server?

    Read the article

  • Does anyone know why rsync would keep sending the files over and over again?

    - by beagleguy
    I'm trying to using rsync to backup some files, about half a TB. It's now it a state where it keeps sending the same files everytime it runs. for example: rsync -av /data/source/* user@host:/data/dest sending incremental file list source/file1.txt source/file2.txt I then verify those files are copied over... then the next time it runs it does the same thing rsync -av /data/source/* user@host:/data/dest sending incremental file list source/file1.txt source/file2.txt any idea why it's getting stuck on these files? I've tried to wipe the whole dest directory out and start over but no luck. thanks,

    Read the article

  • mp3 downsampling / compression in java

    - by veenit33
    Well, i was looking forward to modify the bit rate of a mp3 file in java. I want to downsample(change its bit rate) the mp3 file from 256/384 kbps to say 64/128 kbps.. (I guess this is the only way one can achieve mp3 compression..or is there any other way.?) I searched for LameOnJ but that website is temperoraly down and so im not able to get the license file which we need to download in every 2 days. Is this possible using JMF..? What are the other option i have..? Regards, Veenit Shah

    Read the article

  • NLog: Force BufferingTargetWrapper to empty on AppDomain UnhandledException

    - by Superdumbell
    I have NLog configured in my application to to use the BufferingTargetWrapper for sending emails with the MailTarget. The problem I'm running into is I can not find a way to force NLog to empty the BufferingTargetWrapper before the application exits from Unhandled Exceptions. I tried calling LogManager.Flush() and LogManager.DisableLogging() from the Current App Domain's UnhandledException Event but it does not seam to work. What would I need to do to make it send the emails?

    Read the article

  • Silverlight - Access the Layout Grid's DataContext in a DataGrid CellTemplate's DataTemplate?

    - by Sudeep
    Hi, I am using Silverlight 3 to develop an application. In my app, I have a layout Grid (named "LayoutGrid") in which I have a DataGrid (named "PART_datagrid") with DataGridTemplateColumns. The LayoutGrid is set a DataContext in which there is a Ladders list as a property. This Ladders list is set as the ItemsSource for the PART_datagrid. <Grid x:Name="LayoutRoot"> <DataGrid x:Name="PART_datagrid" ItemsSource="{Binding Ladders}"> ... <DataGridTemplateColumn> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Name="DeleteLadder" Click.Command="{Binding ElementName=LayoutRoot, Path=DataContext.DeleteLadderCommand}" /> Now in one of the DataGridTemplateColumns I have a button which should invoke a Command thats present in the LayoutGrid's DataContext. So I tried Element-To-Element binding on my DataTemplate button as follows <Button Name="DeleteLadder" Click.Command="{Binding ElementName=LayoutRoot, Path=DataContext.DeleteLadderCommand}" /> But this does not seem to work. What I want to achieve is to handle the event of deletion of a DataGrid row at the parent DataContext level using the command. Can someone pls suggest how do I proceed on this? Thanks in advance...

    Read the article

  • Lucene multiple indexes : Normalize document scores??

    - by Roey
    Hi All. Suppose I've got multiple lucene indexes (not replicas) on several PC's. I query each index and then merge the results. Is there any way to normalize the document scores so that I could sort by score (relevance)? I mean, the scores for document A from index A would not be comparable with document B from index B, unless I do some sort of normalization.... not so? Thanks Roey

    Read the article

  • PHP loop hanging/interspersed/threaded through HTML

    - by sandyv
    I can't figure out how to say what I'm talking about which is a big part of why I'm stuck. In PHP I often see code like this html <?php language construct that uses brackets { some code; ?> more html <?php some more code; } ?> rest of html Is there any name for this? Having seen this lead me to try it out so here is a concrete example whose behavior doesn't make sense to me <div id="content"> <ul id="nav"> <?php $path = 'content'; $dir = dir($path); while(false !== ($file = $dir->read())) { if(preg_match('/.+\.txt/i', $file)) { echo "<li>$file</li>"; ?> </ul> <?php echo file_get_contents($path . '/' . $file); } } ?> </div> Which outputs roughly <div><ul><li></li></ul><li></li>...</div> instead of <div><ul><li></li>...</ul></div> which is what I thought would happen and what I want to happen.

    Read the article

  • magento getCollection() can we put where condition?

    - by jarus
    hello , i am working on a magento project and i need to get the value according to country wise like select address where country ="Nepal" can we send the where condition in getCollection() function $collection = Mage::getModel('relocator/location')-getCollection(); any help will be appreciated

    Read the article

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