Search Results

Search found 317 results on 13 pages for 'viktor ax'.

Page 4/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • yahoo's attribute exchange -> blank data is coming

    - by Gaurav Sharma
    Hello everybody, I am trying to build openid login system for my website. To do this I used JanRain's php openid library v 2.1.3. I am also using openid selector to select the openid provider from the list. I first created the attributes array that I need to fetch from the provider as follows: $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',2,1, 'email'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/first',1,1, 'firstname'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/last',1,1, 'lastname'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson',1,1, 'fullname'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/friendly',1,1, 'username'); $ax = new Auth_OpenID_AX_FetchRequest; foreach($attribute as $attr) { $ax-add($attr); } $auth_request-addExtension($ax); and in the finish_auth.php file I wrote this to fetch the attributes returned $ax = new Auth_OpenID_AX_FetchResponse(); $obj = $ax-fromSuccessResponse($response); Google gives me all the attributes requested but yahoo doesn't (as stated here that yahoo now supports attribute exchange). Is there any limitation set by yahoo on attribute exchange too. (they give limited websites access to sreg extension of openid). :( Please help me, I am stuck over here. Thanks

    Read the article

  • How to update the contents of a FigureCanvasTkAgg

    - by Copo
    I'm plotting some data in a Tkinter FigureCanvasTkagg using matplotlib. I need to clear the figure where i plot data and draw new data when a button is pressed. here is the plotting part of the code (there's an App class defined before..) self.fig = figure() self.ax = self.fig.add_subplot(111) self.ax.set_ylim( min(y), max(y) ) self.line, = self.ax.semilogx(x,y,'.-') #tuple of a single element self.canvas = FigureCanvasTkAgg(self.fig,master=master) self.ax.semilogx(x,y,'o-') self.canvas.show() self.canvas.get_tk_widget().pack(side='top', fill='both', expand=1) self.frame.pack() how do i update the contents of such a canvas? regards, Jacopo

    Read the article

  • Plotting 3D Polygons in python-matplotlib

    - by Developer
    I was unsuccessful browsing web for a solution for the following simple question: How to draw 3D polygon (say a filled rectangle or triangle) using vertices values? I have tried many ideas but all failed, see: from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import PolyCollection import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig) x = [0,1,1,0] y = [0,0,1,1] z = [0,1,0,1] verts = [zip(x, y,z)] ax.add_collection3d(PolyCollection(verts),zs=z) plt.show() I appreciate in advance any idea/comment. Updates based on the accepted answer: import mpl_toolkits.mplot3d as a3 import matplotlib.colors as colors import pylab as pl import scipy as sp ax = a3.Axes3D(pl.figure()) for i in range(10000): vtx = sp.rand(3,3) tri = a3.art3d.Poly3DCollection([vtx]) tri.set_color(colors.rgb2hex(sp.rand(3))) tri.set_edgecolor('k') ax.add_collection3d(tri) pl.show() Here is the result:

    Read the article

  • What rules govern cross-version compatibility for .NET applications and the C# language?

    - by John Feminella
    For some reason I've always had trouble remembering the backwards/forwards compatibility guarantees made by the framework, so I'd like to put that to bed forever. Suppose I have two assemblies, A and B. A is older and references .NET 2.0 assemblies; B references .NET 3.5 assemblies. I have the source for A and B, Ax and Bx, respectively; they are written in C# at the 2.0 and 3.0 language levels. (That is, Ax uses no features that were introduced later than C# 2.0; likewise Bx uses no features that were introduced later than 3.0.) I have two environments, C and D. C has the .NET 2.0 framework installed; D has the .NET 3.5 framework installed. Now, which of the following can/can't I do? Running: run A on C? run A on D? run B on C? run C on D? Compiling: compile Ax on C? compile Ax on D? compile Bx on C? compile Bx on D? Rewriting: rewrite Ax to use features from the C# 3 language level, and compile it on D, while having it still work on C? rewrite Bx to use features from the C# 4 language level on another environment E that has .NET 4, while having it still work on D?' Referencing from another assembly: reference B from A and have a client app on C use it? reference B from A and have a client app on D use it? reference A from B and have a client app on C use it? reference A from B and have a client app on D use it? More importantly, what rules govern the truth or falsity of these hypothetical scenarios?

    Read the article

  • Linux multiplayer server, need some help.

    - by Viktor
    I need to write a server for a game, which is closer to action type game, so needs fast communication. There must be only one server, I'll just split the world in zones, but this is not the question. Client will be written in java using jMonkeyEngine. In my opinion I should write the server in java. I don't want to implement any low level features such as communication, reliable udp, etc. Can you suggest any java libraries that already implement this? Or maybe there is more suitable languages to implement this project (must run on linux)?

    Read the article

  • Change permission for ALL folders and files

    - by Xweque
    I've been around Ubuntu for not too long now and I'm getting tired of a thing I used to accept. When I installed Apache and PHP on Ubuntu it was done with root meaning it got permission. So I changed that to me. Now I've just copied a big number of files, (PHP), to be viewed and edited in these directories. Now my problem: I can not view the files from var/www/ because it requires, for some reason, everyone to have access to the files. Not only me, or my group but everyone. No one else is using the computer but me, so I'm cool with it. Though I need a command to change ALL files permission recursively. When I've browsed the questions already been answered I find for example chown -R viktor:viktor /var/www/, or using sudo as well. This worked on the single var/www and the folders inside but not the files inside the folders and very odd I notice I can't do the same thing on example /var/www/dev/.

    Read the article

  • Render SVG font in Adobe Illistrator or Corel Draw

    - by Viktor Burdeinyi
    Hello! I'm developing a project that produces SVG files with custom embed fonts. SVG font definition I compose as SVG font tag with help of http://www.fontsquirrel.com/fontface/generator or Batik SVG Toolkit. The resulted SVG file I try to open in following applications: Adobe Illustrator CS4 - text has default font and message noticed about font not found in system CorelDRAW X5 - text has default font and any messages don't noticed Batik SVG Browser (Squiggle) - renders text correctly The problem is all modern typographies use CorelDRAW and Abode Illustrator for print vector graphic and them render not correctly SVG. Solution As for me, I see follow solutions: Save the text with custom font as SVG path. This will work but, I can't find any solution that can convert text + TTF to SVG path data; Use other vector format, f.e. AI, EPS or CDR. This solution is difficult for me, because I use SVG paths as part of input data; Recommend our users to use Batik SVG Browser (Squiggle) or any other application which are based on Batik SVG Toolkit library. Batik SVG Toolkit requires Java runtime :( If anyone know some knowledge to open SVG embed fonts in Adobe Illustrator or CorelDRAW please share them. I would be grateful for any help. Thank you. -Viktor Burdeinyi

    Read the article

  • Microsoft augmente l'interopérabilité entre ses ERP et son CRM et sort un assistant de migration des données d'Oracle vers SQL Server

    Microsoft augmente l'interopérabilité entre ses ERP et son CRM Et sort un assistant de migration des données d'Oracle vers SQL Server Mercredi dernier, Microsoft Dynamics a annoncé la mise à disposition mondiale de nouvelles ressources à destination des entreprises équipées de son progiciel de gestion intégré Microsoft Dynamics (ERP). Ces nouvelles ressources incluent d'une part un connecteur entre Microsoft Dynamics CRM et Microsoft Dynamics AX, ainsi que d'autre part un assistant de migration de données pour les clients Microsoft Dynamics AX qui souhaitent faire migrer leurs bases de données Oracle vers Microsoft SQL Server. Ce nouveau connecteur facilite l

    Read the article

  • Are applications optimized for XenApp?

    - by damitamit
    Our IT dept are about to deploy virtualized apps using Citrix XenApp. One of these apps will be Dynamics AX 4.0 SP2, a ERP client (which I develop on). They have supposedly reached a roadblock because an external 'Dynamics AX Consultant' has told our IT Dept that Dynamics 4 will not work optimally on Citrix and will run very slow because it is not optimized for Citrix. We have it running in a Test environment now and seems ok. They have been told that the only 'solution' is to upgrade to Dynamics AX 2009 where supposedly this problem as been fixed. (not a small task for my team!) When I heard about this, I was quite surprised. From my brief knowledge of Citrix, I thought it would be application independent. How does the citrix app virtualization work, in that a particular app would work better than others on citrix? Would the speed of the virtualized app not just depend on the resources/network connection the citrix server has? FYI, Dynamics AX is a 3-tier client/server system, so the client will be accessing a AOS application server, which then accesses the database. Please enlighten me :)

    Read the article

  • PHP GD Text Transparency..

    - by Deagle
    Hello, I can't slove this. I'm trying to make a text transparency but doesn't work.. Here how it looks: qshort.com/userbar/gd.php Here how if possible to show with transparency: qshort.com/userbar/transparent.png Is that possible? Here my PHP Code: <?php header('Content-type: image/png'); $im = imagecreatefrompng("signature.png"); $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 114, 114, 114); $black = imagecolorallocate($im, 0, 0, 0); $tr = imagecolorallocatealpha($im, 255, 255, 255, 20); $trg = imagecolorallocatealpha($im, 114, 114, 114, 50); $font = 'TCCB.TTF'; $mtext="Money: $0"; $mx="261"; $my="80"; $ms="16"; imagettftext($im, $ms, 0, $mx+1, $my, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx-1, $my, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my+1, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my-1, $grey, $font, $mtext); imagettftext($im, $ms, 0, $mx, $my, $white, $font, $mtext); $atext="Score: 0"; $ax="261"; $ay="100"; $as="16"; imagettftext($im, $as, 0, $ax+1, $ay, $grey, $font, $atext); imagettftext($im, $as, 0, $ax-1, $ay, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay+1, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay-1, $grey, $font, $atext); imagettftext($im, $as, 0, $ax, $ay, $white, $font, $atext); $ctext="Properties: 0"; $cx="261"; $cy="120"; $cs="16"; imagettftext($im, $cs, 0, $cx+1, $cy, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx-1, $cy, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy+1, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy-1, $grey, $font, $ctext); imagettftext($im, $cs, 0, $cx, $cy, $white, $font, $ctext); $ntext="Nickname"; $nx="20"; $ny="45"; $ns="35"; imagettftext($im, $ns, 0, $nx+1, $ny, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx-1, $ny, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny+1, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny-1, $trg, $font, $ntext); imagettftext($im, $ns, 0, $nx, $ny, $tr, $font, $ntext); imagepng($im); imagedestroy($im); ?> Thanks, Waiting for answer.

    Read the article

  • Need Help About Using XPathNavigator in C#?

    - by Nano HE
    Hello. My XML file as below. It mixed schema and normal elements. <?xml version="1.0" encoding="utf-8"?> <!-- R1 --> <ax:root xmlns:ax="http://amecn/software/realtime/ax"> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="EquipmentConstants"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" maxOccurs="unbounded" ref="EquipmentConstant" /> </xsd:sequence> </xsd:complexType> <xsd:unique name="id"> <xsd:selector xpath=".//EquipmentConstant" /> <xsd:field xpath="@id" /> </xsd:unique> </xsd:element> ...... ...... </xsd:schema> <EquipmentConstants xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <EquipmentConstant id="0"> <Name>SerialNumber</Name> <Group>SYSTEM</Group> <Data> <Value min="0" max="10000000" scale_factor="0" unit="U_NO_UNITS" permission="NolimitedAndNoChangeable" type="xsd_string" enum="" flag="0">0</Value> </Data> <Description>Serial Number</Description> </EquipmentConstant> ..... ..... </EquipmentConstants> </ax:root> My C# code as below. I want to loop the elements from <EquipmentConstants xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> XPathDocument doc = new XPathDocument("test.xml"); XPathNavigator navigator = doc.CreateNavigator(); navigator.MoveToRoot(); // <?xml version="1.0" encoding="utf-8"?> //navigator.MoveToFirstChild(); // <!-- R1 --> // 1st, I tried to use MoveToChield(), But I failed to move there. navigator.MoveToChild("EquipmentConstants"); // Then, I also tried to use SelectSingleNode(). But I failed too. navigator.SelectSingleNode("ax/EquipmentConstants"); while (navigator.MoveToNext()) { // do something. } Could you please give me some suggestion. Thank you.

    Read the article

  • HOW TO: Draggable legend in matplotlib

    - by Adam Fraser
    QUESTION: I'm drawing a legend on an axes object in matplotlib but the default positioning which claims to place it in a smart place doesn't seem to work. Ideally, I'd like to have the legend be draggable by the user. How can this be done? SOLUTION: Well, I found bits and pieces of the solution scattered among mailing lists. I've come up with a nice modular chunk of code that you can drop in and use... here it is: class DraggableLegend: def __init__(self, legend): self.legend = legend self.gotLegend = False legend.figure.canvas.mpl_connect('motion_notify_event', self.on_motion) legend.figure.canvas.mpl_connect('pick_event', self.on_pick) legend.figure.canvas.mpl_connect('button_release_event', self.on_release) legend.set_picker(self.my_legend_picker) def on_motion(self, evt): if self.gotLegend: dx = evt.x - self.mouse_x dy = evt.y - self.mouse_y loc_in_canvas = self.legend_x + dx, self.legend_y + dy loc_in_norm_axes = self.legend.parent.transAxes.inverted().transform_point(loc_in_canvas) self.legend._loc = tuple(loc_in_norm_axes) self.legend.figure.canvas.draw() def my_legend_picker(self, legend, evt): return self.legend.legendPatch.contains(evt) def on_pick(self, evt): if evt.artist == self.legend: bbox = self.legend.get_window_extent() self.mouse_x = evt.mouseevent.x self.mouse_y = evt.mouseevent.y self.legend_x = bbox.xmin self.legend_y = bbox.ymin self.gotLegend = 1 def on_release(self, event): if self.gotLegend: self.gotLegend = False ...and in your code... def draw(self): ax = self.figure.add_subplot(111) scatter = ax.scatter(np.random.randn(100), np.random.randn(100)) legend = DraggableLegend(ax.legend()) I emailed the Matplotlib-users group and John Hunter was kind enough to add my solution it to SVN HEAD. On Thu, Jan 28, 2010 at 3:02 PM, Adam Fraser wrote: I thought I'd share a solution to the draggable legend problem since it took me forever to assimilate all the scattered knowledge on the mailing lists... Cool -- nice example. I added the code to legend.py. Now you can do leg = ax.legend() leg.draggable() to enable draggable mode. You can repeatedly call this func to toggle the draggable state. I hope this is helpful to people working with matplotlib.

    Read the article

  • Matplotlib PDF export uses wrong font

    - by Konrad Rudolph
    I want to generate high-quality diagrams for a presentation. I’m using Python’s matplotlib to generate the graphics. Unfortunately, the PDF export seems to ignore my font settings. I tried setting the font both by passing a FontProperties object to the text drawing functions and by setting the option globally. For the record, here is a MWE to reproduce the problem: import scipy import matplotlib matplotlib.use('cairo') import matplotlib.pylab as pylab import matplotlib.font_manager as fm data = scipy.arange(5) for font in ['Helvetica', 'Gill Sans']: fig = pylab.figure() ax = fig.add_subplot(111) ax.bar(data, data) ax.set_xticks(data) ax.set_xticklabels(data, fontproperties = fm.FontProperties(family = font)) pylab.savefig('foo-%s.pdf' % font) In both cases, the produced output is identical and uses Helvetica (and yes, I do have both fonts installed). Just to be sure, the following doesn’t help either: matplotlib.rc('font', family = 'Gill Sans') Finally, if I replace the backend, instead using the native viewer: matplotlib.use('MacOSX') I do get the correct font displayed – but only in the viewer GUI. The PDF output is once again wrong. To be sure – I can set other fonts – but only other classes of font families: I can set serif fonts or fantasy or monospace. But all sans-serif fonts seem to default to Helvetica.

    Read the article

  • How to find the latest row for each group of data

    - by Jason
    Hi All, I have a tricky problem that I'm trying to find the most effective method to solve. Here's a simplified version of my View structure. Table: Audits AuditID | PublicationID | AuditEndDate | AuditStartDate 1 | 3 | 13/05/2010 | 01/01/2010 2 | 1 | 31/12/2009 | 01/10/2009 3 | 3 | 31/03/2010 | 01/01/2010 4 | 3 | 31/12/2009 | 01/10/2009 5 | 2 | 31/03/2010 | 01/01/2010 6 | 2 | 31/12/2009 | 01/10/2009 7 | 1 | 30/09/2009 | 01/01/2009 There's 3 query's that I need from this. I need to one to get all the data. The next to get only the history data (that is, everything but exclude the latest data item by AuditEndDate) and then the last query is to obtain the latest data item (by AuditEndDate). There's an added layer of complexity that I have a date restriction (This is on a per user/group basis) where certain user groups can only see between certain dates. You'll notice this in the where clause as AuditEndDate<=blah and AuditStartDate=blah Foreach publication, select all the data available. select * from Audits Where auditEndDate<='31/03/10' and AuditStartDate='06/06/2009'; foreach publication, select all the data but Exclude the latest data available (by AuditEndDate) select * from Audits left join (select AuditId as aid, publicationID as pid and max(auditEndDate) as pend from Audit where auditenddate <= '31/03/2009' /* user restrict / group by pid) Ax on Ax.pid=Audit.pubid where pend!=Audits.auditenddate AND auditEndDate<='31/03/10' and AuditStartDate='06/06/2009' / user restrict */ Foreach publication, select only the latest data available (by AuditEndDate) select * from Audits left join (select AuditId as aid, publicationID as pid and max(auditEndDate) as pend from Audit where auditenddate <= '31/03/2009'/* user restrict / group by pid) Ax on Ax.pid=Audit.pubid where pend=Audits.auditenddate AND auditEndDate<='31/03/10' and AuditStartDate='06/06/2009' / user restrict */ So at the moment, query 1 and 3 work fine, but query 2 just returns all the data instead of the restriction. Can anyone help me? Thanks jason

    Read the article

  • Cannot change font size /type in plots

    - by Sameet Nabar
    I recently had to re-install my operating system (Ubuntu). The only thing I did differently is that I installed Matlab on a separate partition, not the main Ubuntu partition. After re-installing, the fonts in my plots are no longer configurable. For example, if I ask the title font to be bold, it doesn't happen. I ran the sample code below on my computer and then on my colleague's computer and the 2 results are attached. This cannot be a problem with the code; rather in the settings of Matlab. Could somebody please tell me what settings I need to change? Thanks in advance for your help. Regards, Sameet. x1=-pi:.1:pi; x2=-pi:pi/10:pi; y1=sin(x1); y2=tan(sin(x2)) - sin(tan(x2)); [AX,H1,H2]=plotyy(x1,y1,x2,y2); xlabel ('Time (hh:mm)'); ylabel (AX(1), 'Plot1'); ylabel (AX(2), 'Plot2'); axes(AX(2)) set(H1,'linestyle','none','marker','.'); set(H2,'linestyle','none','marker','.'); title('Plot Title','FontWeight','bold'); set(gcf, 'Visible', 'off'); [legh, objh] = legend([H1 H2],'Plot1', 'Plot2','location','Best'); set(legend,'FontSize',8); print -dpng Trial.png; Bad image: http://imageshack.us/photo/my-images/708/trial1u.png/ Good image: http://imageshack.us/photo/my-images/87/trial2.png/

    Read the article

  • Windows 2000 uninstall on a dual-boot 2000/XP system

    - by Viktor
    While several questions have already been answered about removing an OS from a dual-booting machine, most refer to Windows 7 vs. Linux/Vista/XP. I have W2K installed on my older HDD (Drive C). Later on I bought a new HDD and installed XP's under W2K environment. Each time I turned my PC on, I had the choice of W2K or XP OS, which I still have. I eventually stopped using the w2k OS and as the older HDD where this OS is installed is getting old, I plan to remove it completely. The problem is that the active master boot record is on this very HDD. So when I remove the HDD, I get no OS loader, no matter what boot drive I choose in BIOS. Apparently I have to set the boot record on the newer HDD with XP's. Some advise to use the bootable XP CD and try to set the active MBR from there.. I don't have the CD anymore. Regardless, I suspect there is much less to solving this problem than running the recovery console, like a simple boot.ini file edit. But I might be wrong.

    Read the article

  • run script as another user from a root script with no tty stdin

    - by viktor tron
    Using CentOs, I want to run a script as user 'training' as a system service. I use daemontools to monitor the process, which needs a launcher script that is run as root and has no tty standard in. Below I give my four different attempts which all fail. : #!/bin/bash exec >> /var/log/training_service.log 2>&1 setuidgid training training_command This last line is not good enough since for training_command, we need environment for trqaining user to be set. : su - training -c 'training_command' This looks like it (http://serverfault.com/questions/44400/run-a-shell-script-as-a-different-user) but gives 'standard in must be tty' as su making sure tty is present to potentially accept password. I know I could make this disappear by modifying /etc/sudoers (a la http://superuser.com/questions/119376/bash-su-script-giving-an-error-standard-in-must-be-a-tty) but i am reluctant and unsure of consequences. : runuser - training -c 'training_command' This one gives runuser: cannot set groups: Connection refused. I found no sense or resolution to this error. : ssh -p100 training@localhost 'source $HOME/.bashrc; training_command' This one is more of a joke to show desparation. Even this one fails with Host key verification failed. (the host key IS in known_hosts, etc). Note: all of 2,3,4 work as they should if I run the wrapper script from a root shell. problems only occur if the system service monitor (daemontools) launches it (no tty terminal I guess). I am stuck. Is this something so hard to achieve? I appreciate all insight and guidance to best practice. (this has also been posted on superuser: http://superuser.com/questions/434235/script-calling-script-as-other-user)

    Read the article

  • Silverlight Cream for June 12, 2010 -- #880

    - by Dave Campbell
    In this Issue: Michael Washington, Diego Poza, Viktor Larsson, Brian Noyes, Charles Petzold, Laurent Bugnion, Anjaiah Keesari, David Anson, and Jeremy Likness. From SilverlightCream.com: My MEF Rant Read Michael Washington's discussion about MEF from someone that's got some experience, but not enough to remember the pain points... how it works, and what he'd like to see. Prism 4: What’s new and what’s next Diego Poza Why Office Hub is important for WP7 Viktor Larsson has another WP7 post up and he's talking about the Office Hub ... good description and maybe the first I've seen on the Office Hub. WCF RIA Services Part 1: Getting Started Brian Noyes has part 1 of a 10-part tutorial series on WCF RIA Services up at SilverlightShow. This first is the intro, but it's a good one. CompositionTarget.Rendering and RenderEventArgs Charles Petzold talks about CompositionTarget.Rendering and using it for calculating time span ... and it works in WPF and WP7 too... cool example from his WPF book, and all the code. Two small issues with Windows Phone 7 ApplicationBar buttons (and workaround) Laurent Bugnion has a post up from earlier this week that I missed describing problems with the WP7 ApplicationBar ... oh, and a workaround for it :) Animation in Silverlight Anjaiah Keesari has a really extensive post up on Silverlight animation, and this is an all-XAML thing... so buckle up we're going old-school :) Two fixes for my Silverlight SplitButton/MenuButton implementation - and true WPF support David Anson revisits and revises his SplitButton code based on a couple problem reports he received. Source for the button and the test project is included. Tips and Tricks for INotifyPropertyChanged Jeremy Likness is discussing INotifyPropertyChanged and describes an extension method. He does bring up a problem associated with this, so check that out. He finishes the post off with a discussion of "Observable Enumerables" 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

  • script calling script as other user

    - by viktor tron
    Using CentOs, I want to run a script as user 'training' as a system service. I use daemontools to monitor the process, which needs a launcher script that is run as root: : #!/bin/bash exec >> /var/log/training_service.log 2>&1 setuidgid training training_command This last line is not good enough since for training_command, we need environment for training user to be set. : su - training -c 'training_command' gives 'standard in must be tty' as su making sure tty is present to potentially accept password. I know I could make this disappear by modifying /etc/sudoers a la Bash & 'su' script giving an error "standard in must be a tty" but i am reluctant and unsure of consequences. : runuser - training -c 'training_command' gives runuser: cannot set groups: Connection refused. I found no sense or resolution to this message. I am stuck. Is this something so hard to achieve? I appreciate all insight and guidance to best practice.

    Read the article

  • Accessing guests on virtual network when connected to host via PPTP

    - by Viktor Elofsson
    I'm setting up a development machine which runs Ubuntu 12.04 and KVM for virtualization. I have a guest running Ubuntu 12.04 which can be accessed from the host via its IP address which is assigned by libvirt. The guest can also access the internet, no problem there. However, now I want to setup PPTP so I can connect to the host (from my workstation running Windows 7) and directly access guests without relying on SSH port forwarding. I can connect from my W7-machine to the host (PPTP), but I cannot access any virtual machines (which are accessable from the host directly). Relevant configuration files cat /etc/network/interfaces auto lo iface lo inet loopback # device: eth0 auto eth0 iface eth0 inet static address x.x.x.x broadcast x.x.x.x netmask x.x.x.x gateway x.x.x.x # default route to access subnet up route add -net x.x.x.x netmask x.x.x.x gw x.x.x.x eth0 virsh net-edit default <network> <name>default</name> <uuid>xxxxxxxx-72ce-3c20-af0f-d3a010f1bef0</uuid> <forward mode='nat'/> <bridge name='virbr0' stp='on' delay='0' /> <mac address='52:54:00:xx:xx:xx'/> <ip address='192.168.122.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.122.2' end='192.168.122.254' /> <host mac='52:54:00:yy:yy:yy' name='web1' ip='192.168.122.11' /> </dhcp> </ip> </network> cat /etc/pptpd.conf (commented lines removed) # TAG: option # Specifies the location of the PPP options file. # By default PPP looks in '/etc/ppp/options' # option /etc/ppp/pptpd-options # TAG: logwtmp # Use wtmp(5) to record client connections and disconnections. # logwtmp #(Recommended) localip 192.168.122.1 remoteip 192.168.122.234-238,192.168.122.245 cat /etc/ppp/chap-secrets* # Secrets for authentication using CHAP # client server secret IP addresses xxxxx * yyyyyyyyyy 192.168.122.100 I get the correct IP address when connecting my W7-machine, but when I try to ping the virtual machine at 192.168.122.11 I get Reply from 192.168.122.1: Destination port unreachable. It's probably something trivial I'm missing but I can't for the life of me figure out what it is. So I'm turning to you, serverfault.

    Read the article

  • Matlab - plot multiple data sets on a scatter plot

    - by Mark
    Hey all, I have 2 sets of data (Ax, Ay; Bx, By) - I'd like to plot both of these data sets on a scatter plot with different colors, but can't seem to get it to work because it seems scatter() does not work like plot(). Is it possible to do this? I've tried... scatter(Ax, Ay, 'g', Bx, By, 'b') And scatter(Ax, Ay, 'g') scatter(Bx, By, 'b') The first way returns an error. The latter only plots the Bx/By data. Many thanks!

    Read the article

  • Sans-serif math with latex in matplotlib

    - by Morgoth
    The following script: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as mpl mpl.rc('font', family='sans-serif') mpl.rc('text', usetex=True) fig = mpl.figure() ax = fig.add_subplot(1,1,1) ax.text(0.2,0.5,r"Math font: $451^\circ$") ax.text(0.2,0.7,r"Normal font (except for degree symbol): 451$^\circ$") fig.savefig('test.png') is an attempt to use a sans-serif font in matplotlib with LaTeX. The issue is that the math font is still a serif font (as indicated by the axis numbers, and as demonstrated by the labels in the center). Is there a way to set the math font to also be sans-serif?

    Read the article

  • How do I set a matplotlib colorbar extents?

    - by Adam Fraser
    I'd like to display a colorbar representing an image's raw values along side a matplotlib imshow subplot which displays that image, normalized. I've been able to draw the image and a colorbar successfully like this, but the colorbar min and max values represent the normalized (0,1) image instead of the raw (0,99) image. f = plt.figure() # create toy image im = np.ones((100,100)) for x in range(100): im[x] = x # create imshow subplot ax = f.add_subplot(111) result = ax.imshow(im / im.max()) # Create the colorbar axc, kw = matplotlib.colorbar.make_axes(ax) cb = matplotlib.colorbar.Colorbar(axc, result) # Set the colorbar result.colorbar = cb If someone has a better mastery of the colorbar API, I'd love to hear from you. Thanks! Adam

    Read the article

  • How to access "overridden" inner class in Scala?

    - by doom2.wad
    I have two traits, one extending the other, each with an inner class, one extending the other, with the same names: trait A { class X { def x() = doSomething() } } trait B extends A { class X extends super.X { override def x() = doSomethingElse() } } class C extends B { val x = new X() // here B.X is instantiated val y = new A.X() // does not compile val z = new A.this.X() // does not compile } How do I access A.X class in the C class's body? Renaming B.X not to hide A.X is not a preferred way. To make things a bit complicated, in the situation I have encountered this problem the traits have type parameters (not shown in this example).

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >