Daily Archives

Articles indexed Friday November 9 2012

Page 13/19 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Upgrading Apache to 2.2.23 on ubuntu 12.04 LTS

    - by Salil P
    We had done a PCI scan on one of our servers running Ubuntu 12.04 LTS with apache 2.2.22. The scan reported a vulnerability in apache 2.2.22 (Apache HTTP Server Zero-Length Directory Name in LD_LIBRARY_PATH Vulnerability).The report states to upgrade the version to the latest stable release of either 2.2.23 or 2.2.24. How do I upgrade to the 2.2.23 to fix the vulnerability or is there a patch available that can fix this and if yes can you let me know how that can be patched.

    Read the article

  • High CPU load for 1:30 minutes when mounting ext4-raid partition

    - by sirion
    I have a raid 5 (software) with 5x2TB drives. I encrypted the raid with cryptsetup and put an ext4-partition on top. In the beginning opening and mounting the raid took less than 10 seconds, now (for a few weeks) mounting alone takes 1:30 minutes and the cpu stays around 93% the whole time: The output of "time sudo mount /dev/mapper/8000 /media/8000" is: real 1m31.952s user 0m0.008s sys 1m25.229s At the same time only one line is added to /var/log/syslog: kernel: [ 2240.921381] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null) My Ubuntu-version is "12.04.1 LTS" and no updates are pending. I checked the partition with fsck, but it says that all is ok. The "cryptsetup luksOpen" command only takes a few seconds. I also tried changing the raid-bitmap (as it was suggested in some forum) but it did not change the behaviour. sudo mdadm --grow /dev/md0 -b internal and sudo mdadm --grow /dev/md0 -b none I had the idea that it might be the hardware being slow, but a read test with "sudo hdparm -t /dev/md0" spit out values between 62 and 159 MB/sec: Timing buffered disk reads: 382 MB in 3.00 seconds = 127.14 MB/sec Timing buffered disk reads: 482 MB in 3.02 seconds = 159.62 MB/sec Timing buffered disk reads: 190 MB in 3.03 seconds = 62.65 MB/sec Timing buffered disk reads: 474 MB in 3.02 seconds = 157.12 MB/sec Although I think it is strange that the read rate jumps by more than 100% - could that mean something? The speed test when reading from the mapped (decrypted) device shows similar behavior, although it is of course much slower. "sudo hdparm -t /dev/mapper/8000": Timing buffered disk reads: 56 MB in 3.02 seconds = 18.54 MB/sec Timing buffered disk reads: 122 MB in 3.09 seconds = 39.43 MB/sec Timing buffered disk reads: 134 MB in 3.02 seconds = 44.35 MB/sec The output of a verbose mount "mount -vvv /dev/mapper/8000 /media/8000" does not help much: mount: fstab path: "/etc/fstab" mount: mtab path: "/etc/mtab" mount: lock path: "/etc/mtab~" mount: temp path: "/etc/mtab.tmp" mount: UID: 0 mount: eUID: 0 mount: spec: "/dev/mapper/8000" mount: node: "/media/8000" mount: types: "(null)" mount: opts: "(null)" mount: you didn't specify a filesystem type for /dev/mapper/8000 I will try type ext4 mount: mount(2) syscall: source: "/dev/mapper/8000", target: "/media/8000", filesystemtype: "ext4", mountflags: -1058209792, data: (null) Any idea where I could find additional information on why mounting takes so long, or what additional tests I could run?

    Read the article

  • How to remove "online accounts" from "system settings"?

    - by A_txt
    I uninstalled "Unity" and use "Gnome Shell" instead, but the new "online accounts" was still in the "system settings" menu. How can I completely remove it? I tried the command below but it doesn't work: sudo apt-get -y remove unity-lens-shopping account-plugin-aim account-plugin-facebook account-plugin-flickr account-plugin-google account-plugin-icons account-plugin-identica account-plugin-jabber account-plugin-salut account-plugin-twitter account-plugin-windows-live account-plugin-yahoo gnome-online-accounts

    Read the article

  • NetworkManager refuses to manage my WLAN interface

    - by user104167
    I'm using Ubuntu 12.10 with Gnome 3.6 on a brand-new Samsung NP900X4C. The installer detected the wireless adapter, took in the SSID and WPA passphrase, wrote these into /etc/network/interfaces and connected perfectly. Once installation was finished I wanted to switch to using NetworkManager to manage the wireless adapter, since this is much more convenient than fiddling with /etc/network/interfaces every time I find a new hotspot. Therefore I edited /etc/NetworkManager/NetworkManager.conf to set: [ifupdown] managed=true When I rebooted NetworkManager, the problems started: - The NetworkManager tray applet changed from saying device not managed to device not ready - I lost all internet connectivity as wlan0 would not associate to the Access Point - if I set managed=false in NetworkManager.conf and restarted both NetworkManager and networking services from the command-line, the Gnome desktop "semi-crashed" and lost all its Window Decorations, the panel, the launcher and basically became unusable. However if I restart the computer completely after setting managed=false, wlan0 once again works perfectly.

    Read the article

  • How do I make 3finger multitouch work on Samsung 530?

    - by RiaD
    I have Samsung 530U4C. How can I configure 3-finger gestures to work? Choosing next photo using 3 finger "scrool" worked in Windows 7. If I use synclient TapButton3=2 I may use it as medium mouse button, but there's problem: it gets cancelled after reboot, and as I read over the Internet, sometime else. Moreover, it would be great to see all gestures my laptop support and configure them all as I need. I find some info about touchegg, but I didn't manage to understand what it exactly is and even run it. Two-finger gestures works fine(configured using System setting menu)

    Read the article

  • Ati Radeon HD 3200 Graphics driver - Installation Problem

    - by samufi
    I have a fresh installation of Ubuntu 12.04 x86 and I am trying to install the proprietary driver for my "Radeon HD 3200 Graphics" video card. I know that there are already many threads about this topic, but I did not find a solution for my problem: For the installation I followed exactly these instructions: What is the correct way to install ATI Catalyst Video Drivers in 12.04 LTS? During the process I faced these problems: I executed ~$ debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases and got: debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Keine Berechtigung Can't exec "libstdc++6": Datei oder Verzeichnis nicht gefunden at /usr/share/perl/5.14/IPC/Open3.pm line 186. open2: exec of libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases failed at /usr/share/perl5/Debconf/ConfModule.pm line 59 (translation of the German parts: "Keine Berechtigung" means: "no permission"; "Datei oder Verzeichnis nicht gefunden" means: "File or folder not found") Because I had no idea if it was a big issue, I just continued: ~$ sudo apt-get install ia32-libs There I got: Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut Statusinformationen werden eingelesen... Fertig Paket ia32-libs ist nicht verfügbar, wird aber von einem anderen Paket referenziert. Das kann heißen, dass das Paket fehlt, dass es abgelöst wurde oder nur aus einer anderen Quelle verfügbar ist. E: Paket »ia32-libs« hat keinen Installationskandidaten (Translation: [...] the package ia32-libs is not available but is referenced by an other package [...] E: package »ia32-libs« has no installation candidate) Once more I went on. The next steps worked quite fine. But when I came to the point: ~$ sudo dpkg -i *.deb There I got A popup message, something like there was a problem with a system application but in the terminal no errors were reported, also the packages seemed to be installed. so now the Ati Catalyst Center works amdcccle but fglrxinfo gave me X Error of failed request: BadRequest (invalid request code or no such operation) Major opcode of failed request: 139 (ATIFGLEXTENSION) Minor opcode of failed request: 66 () Serial number of failed request: 13 Current serial number in output stream: 13 So there is something wrong. (Also there is not the possibility to enable these nice graphical features - the reason why I installed the proprietary driver) Because I worked with a completely fresh Installation I don't know how to fix the problem. If anybody could help I would be very tahnkful! =)

    Read the article

  • Using mod_speling with multi-level htaccess and rewriterules

    - by michaelcgorman
    We recently switched formats for managing our 301s. For the most part, everything went well, but it seems to have stopped mod_speling from working properly. Here's what we changed: old /var/www/html/.htaccess: RewriteEngine on RewriteBase / # Change SHTML to HTML RewriteRule ^(.*)\.shtml$ $1.html [R=permanent,L] # Change PCF to HTML ('cause, you know, we probably have CMS users like that...) RewriteRule ^(.*)\.pcf$ $1.html [R=permanent,L] # Force WWW subdomain for all requests RewriteCond %{HTTP_HOST} !^www.example.edu$ [NC] RewriteRule ^(.*)$ http://www.example.edu/$1 [R,L] # User accounts are on sun.example.edu RedirectMatch ^/~(.*)$ http://sun.example.edu/~$1 # Remove index.html at the end of URLs RewriteCond %{REQUEST_URI} ^(.*/)index\.html$ [NC] RewriteRule . %1 [R=301,NE,L] Redirect 301 /academics/calendar2012-13.html http://www.example.edu/academics/calendar.html Redirect 301 /academics/departments/ http://www.example.edu/majors/ Redirect 301 /academics/Pre-Medical.pdf http://www.example.edu/academics/Pre-Medicine.pdf Redirect 301 ... new /var/www/html/.htaccess: RewriteEngine on RewriteBase / # Change SHTML to HTML RewriteRule ^(.*)\.shtml$ $1.html [R=permanent,L] # Change PCF to HTML ('cause, you know, we probably have CMS users like that...) RewriteRule ^(.*)\.pcf$ $1.html [R=permanent,L] # Force WWW subdomain for all requests RewriteCond %{HTTP_HOST} !^www.example.edu$ [NC] RewriteRule ^(.*)$ http://www.example.edu/$1 [R,L] # User accounts are on sun.example.edu RedirectMatch ^/~(.*)$ http://sun.example.edu/~$1 # Remove index.html at the end of URLs RewriteCond %{REQUEST_URI} ^(.*/)index\.html$ [NC] RewriteRule . %1 [R=301,NE,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) 404/$1 And then we added a new file at /var/www/html/404/.htaccess: RewriteEngine on RewriteBase /404 RewriteRule ^academics/calendar2012-13.html$ /academics/calendar.html [R=302,L] RewriteRule ^academics/departments/$ /majors/ [R=301,L] RewriteRule ^academics/Pre-Medical.pdf$ /academics/Pre-Medicine.pdf[R=301,L] RewriteRule ... I do have (Webmin-based) access to the httpd.conf (though we don't want to store all our 301s there, if possible). We're running Apache 2.2.15 on RHEL 6 on a server in our own data center. Like I said, the only problem we're seeing is that mod_speling isn't doing its magic anymore. The new format has so many advantages over the old that we really don't want to go back, but mod_speling is so nice to have that we'd also really like it to work if possible. Any ideas for how we might be able to fix mod_speling?

    Read the article

  • Is it better to have multiple domains for cities or one single TLD?

    - by Brett
    I make websites for small businesses, and for some reason business owners love to have several domains with the same website but the TLD containing the city name. For example: 1. smallbizname.com 2. clevelandsmallbizname.com 3. columbussmallbizname.com 4. cincinnatismallbizname.com ... and so on. I've seen questions about localization per country aspects, but this is a much smaller scale, so I don't think the same rules apply. The problem I have is the companies never want to write separate content per domain, just have the same website hosted several times at each domain. I feel this probably hurts SEO for two reasons: 1. Traffic gets scattered throughout domains, could be boosting just one domain. 2. Duplicate content penalty because the content is identical. My question boils down to this... Should I redirect all the city domains to the main business name domain, or does having these separate sites help to rank better per city? And if they are redirected, how does google rank the redirects? Thanks for any input on this issue!!

    Read the article

  • Are there any risk if your DNS's SOA or admin contact are using the same domain as the DNS

    - by Yoga
    For example, Google.com [1] The SOA email is : dns-admin.google.com The contact is: Administrative Contact: DNS Admin Google Inc. dns-admin.google.com As you can see, both are using google.com, I am thinking it is safe to use the same domain, i.e. consider the case you lost control of the domain, you can receive email also. (Of course Google is a public company so the chance is low, but might occur for smaller company that their domain might be stolen..) So, do you recommend use your the same domain as the contact or others free services such as gmail? [1] http://whois.domaintools.com/google.com

    Read the article

  • Can I Hide a part of joomla link in source code? [migrated]

    - by pastor
    link rel="stylesheet" type="text/css" href="/nettt/plugins/system/jch_optimize/cache/jscss.php?f=019a87662ec9a3b8c890c566b8019f23-cache-plg_jch_optimize-652b9fac2d3cde50d0b5ec53b6e540d4&amp;type=css&amp;gz=gz&amp;d=30"/> I wont to hide /nettt/plugins/system/jch_optimize/cache/jscss.php?f=019a87662ec9a3b8c890c566b8019f23-cache-plg_jch_optimize-652b9fac2d3cde50d0b5ec53b6e540d4&amp any ideas?

    Read the article

  • Bookmark login_email at new PayPal URL [closed]

    - by Jonna Stevens
    I have used this Bookmark in Firefox so that my email would be autofilled and I only had to write in my password. PayPal has recently changed its login URL. Has anybody figured out a method to achieve this with the new URl ? Old URL: https://www.paypal.com/es/cgi-bin/webscr?cmd=_login-run&login_email=myemail%40myemail.com New URL (not working): https://www.paypal.com/es/webapps/mpp/home-merchant?login_email=myemail%40myemail.com

    Read the article

  • How to dump a MediaWiki for offline use?

    - by Sandra Schlichting
    I would like to be able to make an offline version of a MediaWiki site on a weekly basis. The DumpHTML extension actually does what I want, as it dumps all articles and media files, but I can't see any index of all the articles it have dumped, so I can't navigate in the dump. Reading about the XML dump feature MediaWiki have, I wonder if it would be possible to either use a program to view these files or perhaps convert them to html? Or are there other ways to make an offline version of a MediaWiki site?

    Read the article

  • How to redirect user into mobile website?

    - by iLa
    Hi how to redirect the user into mobile site when the user accessing from mobile. Say example i have site called www.mysite.com. Now, a person accessing a website from mobile it should redirect to www.mysite.com/mobile or www.m.mysite.com. I put some research in google that we can redirect using javascript to get the user agent(browser) if(mobile browser) { //redirect to www.mysite.com/mobile } else if(normal browser) { //redirect to www.mysite.com } or using screen resolution if(screen resolution < 800 ) { //redirect to www.mysite.com/mobile } else if(screen resolution > 800) { //redirect to www.mysite.com } I think It will not work If it is the case of javascript disable. Can we do this using .htaccess or php stuff? Is there any standard mechanism to do this?

    Read the article

  • Calculating distance from viewer to object in a shader

    - by Jay
    Good morning, I'm working through creating the spherical billboards technique outlined in this paper. I'm trying to create a shader that calculates the distance from the camera to all objects in the scene and stores the results in a texture. I keep getting either a completely black or white texture. Here are my questions: I assume the position that's automatically sent to the vertex shader from ogre is in object space? The gpu interpolates the output position from the vertex shader when it sends it to the fragment shader. Does it do the same for my depth calculation or do I need to move that calculation to the fragment shader? Is there a way to debug shaders? I have no errors but I'm not sure I'm getting my parameters passed into the shaders correctly. Here's my shader code: void DepthVertexShader( float4 position : POSITION, uniform float4x4 worldViewProjMatrix, uniform float3 eyePosition, out float4 outPosition : POSITION, out float Depth ) { // position is in object space // outPosition is in camera space outPosition = mul( worldViewProjMatrix, position ); // calculate distance from camera to vertex Depth = length( eyePosition - position ); } void DepthFragmentShader( float Depth : TEXCOORD0, uniform float fNear, uniform float fFar, out float4 outColor : COLOR ) { // clamp output using clip planes float fColor = 1.0 - smoothstep( fNear, fFar, Depth ); outColor = float4( fColor, fColor, fColor, 1.0 ); } fNear is the near clip plane for the scene fFar is the far clip plane for the scene

    Read the article

  • Is there any map maker for javaME game?

    - by user1494517
    For the past two weeks I was trying to make a map maker for my java ME 2D RPG game. I failed because i get errors using slick TWL and the forum for this is inactive. So I just wondered is there anyone that knows slick TWL (Themable Widget Library)? Or maybe do you know a good MapMaker where i could upload my map elements build a map and get numbers to use them for building map with LayerManager class? Already found one http://sourceforge.net/projects/tilemapeditor2d/. But the thing is my map elements are in different .png images. In one of those images there is 16 elements (trees water and etc) and those kind of images are 29. So it would be hard to build a map with LayerManager Well I was thinking putting everything into one image and that way it would be simplier.

    Read the article

  • Techniques to prevent non-official clients in network gaming?

    - by UpTheCreek
    In multi-player network games, what techniques exist to try to ensure that users are connecting with the official client application, and not some hacked client app? I realise there is probably no sure-fire way to do this, but rather I'm interested in techniques that can be employed to mitigate the problem. I'm especially interested in any techniques that can be used for web based games, but I imagine most can be applied generally. Thank you!

    Read the article

  • If I project a sphere in 3D will it be a circle?

    - by yuumei
    Assuming I have infinite vertices to represent the sphere, if I project the sphere from any position/scale in 3D to 2D, will it be a circle? I know it will not be a circle on the screen, because of scaling and different resolutions. But do field of view and aspect ratio effect the results? Edit: Sorry yes, I am talking about perspective projection. Seems the answer is no then, perspective will distort the sphere. Thanks!

    Read the article

  • HTML tables in JTextPane showing weird "form" boxes

    - by Ted
    import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextPane; import javax.swing.border.EmptyBorder; import javax.swing.text.Document; import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.StyleSheet; public class htmlEditor2 extends JFrame { private JPanel contentPane; public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { htmlEditor2 frame = new htmlEditor2(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public htmlEditor2() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setLayout(new BorderLayout(0, 0)); setContentPane(contentPane); Foo f = new Foo(); f.setText("<html><body><table border=\"1\" width=\"985\" cellpadding=\"3\" cellspacing=\"0\" style=\"table-layout: fixed; border-collapse: collapse; border-width: 0px; border-color: #010101; \"><colgroup><col width=\"328\"></col> <col width=\"328\"></col> <col width=\"328\"></col> </colgroup><tr><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><font face=\"Arial\"><span style=\"font-size:8pt\">row 1</span></font></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><font face=\"Arial\"><span style=\"font-size:8pt\">row2</span></font></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><font face=\"Arial\"><span style=\"font-size:8pt\">row3</span></font></div></td></tr><tr><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td></tr><tr><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td><td align=\"left\" valign=\"top\" width=\"321\" style=\"border: solid #010101 1px; \"><div align=\"left\"><span style=\"font-size: 8pt;\">&nbsp;</span></div></td></tr></table><div align=\"left\">&nbsp;&nbsp;</div></body></html>"); contentPane.add(f); } class Foo extends JTextPane { public Foo() { super(); HTMLEditorKit kit = new HTMLEditorKit(); setEditorKit(kit); StyleSheet styleSheet = kit.getStyleSheet(); styleSheet.addRule(""); //in case I need to add a CSS Document doc = kit.createDefaultDocument(); setDocument(doc); } } } I would paste a nicely formatted version of the html, but I'm not sure how to do it on here... So yeah.. I just want to know how to get rid of those weird colgroup and col boxes in my table and how to make the table work normally! Thanks yall!

    Read the article

  • DLL with JNA error looking up function?

    - by Thomas Nappo
    This is the code in my DLL (C#): http://pastebin.com/Uirn0z2V I have the DLL built and inside both the JDK bin folder along with inside my project. This is the Java code I am using to access with JNA: http://pastebin.com/NffpaEp8 Yet when I run my Java code this happens: Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'Run': The specified procedure could not be found. at com.sun.jna.Function.<init>(Function.java:179) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:391) at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:371) at com.sun.jna.Library$Handler.invoke(Library.java:205) at $Proxy0.Run(Unknown Source) at RunPETest.main(RunPETest.java:18) I have no experience with using JNA with custom DLLs or creating DLLs with C#... so I'm stuck here.

    Read the article

  • Mocha expects method

    - by Masha
    So my situation is: I have a 2 modules that have the same structure like that: module Module1 class Config def fee_rate 2 end end end So, say, Module2 would have class Config with the method fee_rate, just with a different value (those are actually implemented in a rails engine, but it shouldn't matter) and then my model can use either Module1 or Module2 to get the fee rate value like that: def config @config ||= "#{module_name.titleize}::Config".constantize.new @config end def get_value config.get_fee * some_other_value end What I'm trying to test is if get_fee function was called on the correct class: "#{model.module_name.titleize}::Config".constantize.any_instance.expects(:get_fee).at_least_once model.get_value and on the line when I call get_value I get the following error - undefined method `*' for nil:NilClass. I'm completely lost now, so I'd appreciate any help and ideas.

    Read the article

  • Accessing XAML Object Variables in XAML

    - by Asryael
    So, what I'm trying to do is access my Form's width and/or height to use in a storyboard. Essentially, I have a Translate Transform animation to slide what are essentially two pages. The animation works fine with hard coded From/To variables, however I need to use soft variables that enable the animation to start from the left/right of my form no matter what size it is. <Storyboard x:Key="SlideLeftToRight" TargetProperty="RenderTransform.(TranslateTransform.X)" AccelerationRatio=".4" DecelerationRatio=".4"> <DoubleAnimation Storyboard.TargetName="PageViewer" Duration="0:0:0.6" From="WindowWidth" To="0"/> <DoubleAnimation Storyboard.TargetName="BorderVisual" Duration="0:0:0.6" From="0" To="NegativeWindowWidth"/> </Storyboard> However, I have no idea how to do so. Any help is greatly appreciated. EDIT: I'm guessing it has something to do with: From="{Binding Width, Source=MainWindow}" However, when I attempt this, I don't know how to make it negative.

    Read the article

  • Python Turtle Graphics, how to plot functions over an interval?

    - by TheDragonAce
    I need to plot a function over a specified interval. The function is f1, which is shown below in the code, and the interval is [-7, -3]; [-1, 1]; [3, 7] with a step of .01. When I execute the program, nothing is drawn. Any ideas? import turtle from math import sqrt wn = turtle.Screen() wn.bgcolor("white") wn.title("Plotting") mypen = turtle.Turtle() mypen.shape("classic") mypen.color("black") mypen.speed(10) while True: try: def f1(x): return 2 * sqrt((-abs(abs(x)-1)) * abs(3 - abs(x))/((abs(x)-1)*(3-abs(x)))) * \ (1 + abs(abs(x)-3)/(abs(x)-3))*sqrt(1-(x/7)**2)+(5+0.97*(abs(x-0.5)+abs(x+0.5))-\ 3*(abs(x-0.75)+abs(x+0.75)))*(1+abs(1-abs(x))/(1-abs(x))) mypen.penup() step=.01 startf11=-7 stopf11=-3 startf12=-1 stopf12=1 startf13=3 stopf13=7 def f11 (startf11,stopf11,step): rc=[] y = f1(startf11) while y<=stopf11: rc.append(startf11) #y+=step mypen.setpos(f1(startf11)*25,y*25) mypen.dot() def f12 (startf12,stopf12,step): rc=[] y = f1(startf12) while y<=stopf12: rc.append(startf12) #y+=step mypen.setpos(f1(startf12)*25, y*25) mypen.dot() def f13 (startf13,stopf13,step): rc=[] y = f1(startf13) while y<=stopf13: rc.append(startf13) #y+=step mypen.setpos(f1(startf13)*25, y*25) mypen.dot() f11(startf11,stopf11,step) f12(startf12,stopf12,step) f13(startf13,stopf13,step) except ZeroDivisionError: continue

    Read the article

  • java.awt -- when java outputs an image to my monitor (screen), where is the file that is output to the monitor card?

    - by user1405870
    Suppose that I am drawing a set of images using java graphics objects. Suppose that I java is outputting these images to my monitor. Where is the file or files that are sent to the monitor card (the graphical representation files). How can I take this file and save it to disk, or how can I take this file and write it to an array, or how can I take these files and combine the results of their output (to the monitor) into a single file for saving? I don't want to use a screen shot feature, I want to be able to redirect (xor capture also) the output to the monitor to some sort of byte-stream. I note that monitors are much better than semaphores, when you are talking about display capabilities; I don't need a counter example. I might not be asking the correct question. It might be that I want to capture the file while it is still in User Space, before it is put into 'Device Space'. I would like to try and capture the byte stream so that I can convert it to MPEG-4 format. I either need a streaming output from the MPEG-4 converter, coming from the streaming input, or else, I need to take static images at discrete times and convert the images. What format will the output from User Space be in? What format will the Device Space output be in? Try to keep speculation to a minimum. http://docs.oracle.com/javame/config/cdc/opt-pkgs/api/jsr927/index.html I guess that Java has made a means of displaying AWT objects on a television screen. Thank you. Ryan Zoerner

    Read the article

  • How to solve generic algebra using solver/library programmatically? Matlab, Mathematica, Wolfram etc?

    - by DevDevDev
    I'm trying to build an algebra trainer for students. I want to construct a representative problem, define constraints and relationships on the parameters, and then generate a bunch of Latex formatted problems from the representation. As an example: A specific question might be: If y < 0 and (x+3)(y-5) = 0, what is x? Answer (x = -3) I would like to encode this as a Latex formatted problem like. If $y<0$ and $(x+constant_1)(y+constant_2)=0$ what is the value of x? Answer = -constant_1 And plug into my problem solver constant_1 > 0, constant_1 < 60, constant_1 = INTEGER constant_2 < 0, constant_2 > -60, constant_2 = INTEGER Then it will randomly construct me pairs of (constant_1, constant_2) that I can feed into my Latex generator. Obviously this is an extremely simple example with no real "solving" but hopefully it gets the point across. Things I'm looking for ideally in priority order * Solve algebra problems * Definition of relationships relatively straight forward * Rich support for latex formatting (not just writing encoded strings) Thanks!

    Read the article

  • How can I use Hibernate Criteria's to query nested tables?

    - by cbmeeks
    I've looked all over SO and Google but I guess I'm not using the right search terms or something. Anyway, say I have three tables: Companies ----------------------------------------- id name user_id Users ----------------------------------------- id username usertype_id UserTypes ----------------------------------------- id typeofuser So ACME would be a company, it would have a user Moe and Moe would be a usertype of Stooge. In SQL, I would do something like: select * from companies c join users u on (u.id = c.user_id) join usertypes ut on (ut.id = u.usertype_id) where ut.typeofuser = 'Stooge' But I can't seem to figure out how to do that in a Criteria. I have tried: Criteria crit = io.getSession().createCriteria(Company.class); List<Company> list = crit.createCriteria("users") .createCriteria("usertypes") .add(Restriction.eq("typeofuser", "Stooge").list(); But I get back way too many records. And the results don't even come close to being accurate. I've also tried: Criteria crit = io.getSession().createCriteria(Company.class); List<Company> list = crit.createAlias("users", "u") .createAlias("u.usertypes", "ut") .add(Restriction.eq("ut.typeofuser", "Stooge").list(); Seems to bring back the exact same result set. I actually have read the user manual. And when I nest only one level deep (ie, searching by users is fine) but when I get two layers deep, I can't quite get it. And the manual is no help. I just can't relate cats and kittens to business objects. Maybe they should use cats, kittens and fleas? :-/ Thanks for any suggestions.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19  | Next Page >