Daily Archives

Articles indexed Thursday February 10 2011

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

  • Why do I need lib64 on my 32 bit machine?

    - by Tim
    I am trying to install Oracle on my 32-bit machine that runs Ubuntu 10.4. I am following install Oracle on Ubuntu tutorial. At the very first step there is a requirement to manually install library libstdc++5. Author does 2 steps: download libstdc++5_3.3.6-17ubuntu1_amd64.deb from here download ia32-libs_2.7ubuntu6.1_amd64.deb from here As you may have probably noticed these 2 files contain an "_amd64" postfix, which pointed me out that author is using 64-bit amd processor. Each of these files author copied to /usr/lib64 and /usr/lib32 folders correspondingly and simply make soft links libstdc++.so.5 in both folders. Since I am running 32-bit machine I have simply downloaded those 2 files without "_amd64" postfix. Unexpectedly for me I have also found 2 lib folders in my /usr folder: /usr/lib64 and /usr/lib. So here is my problem: I do not understand which files and where do I have to copy: 1) Do I have to make the same steps as the author has done, i.e. download files with "_amd64" postfixes and place them in my /usr/lib64 and /usr/lib folders? 2) Or do I have to use libraries without "_amd64" postfix? And one more question: why do I have /usr/lib64 at all?

    Read the article

  • nginx PPA does not work?

    - by Peter Smit
    I want to use the newest version of nginx, so I wanted to add the nginx/stable ppa sudo add-apt-repository ppa:nginx/stable sudo apt-get update However, the upgrade command says that there are no upgrades available and nginx is still the old version. Did I do something wrong? I use Ubuntu server 10.04 Lucid add-apt-repository output: $ sudo apt-add-repository ppa:nginx/stable Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv 8B3981E7A6852F782CC4951600A6F0A3C300EE8C gpg: requesting key C300EE8C from hkp server keyserver.ubuntu.com gpg: key C300EE8C: "Launchpad Stable" not changed gpg: Total number processed: 1 gpg: unchanged: 1 apt-cache policy ouput: $ sudo apt-cache policy nginx nginx: Installed: 0.7.65-1ubuntu2 Candidate: 0.7.65-1ubuntu2 Version table: *** 0.7.65-1ubuntu2 0 500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ lucid/universe Packages 100 /var/lib/dpkg/status

    Read the article

  • Racing MMO for Linux - 2D or 3D - Massively Multiplayer Online Racing Games for Linux

    - by Paulocoghi
    I really like multiplayer racing games, like Need for Speed World or similar. I wonder if there is any MMO racing game for Linux (2D or 3D). Browser-based games are also accepted. Note: I tried this question in the Gaming Q&A of StackExchange (see link below), but one user said that my question was off-topic. http://gaming.stackexchange.com/questions/16329/racing-mmo-for-linux-2d-or-3d-massively-multiplayer-online-racing-games

    Read the article

  • How can I get the Creative Zen Touch to work?

    - by Hello71
    I've tried using gnomad2 (too lazy to configure all the dependencies) and Amarok (segfaulted when I tried to do anything with it). $ lsusb Bus 002 Device 004: ID 041e:4131 Creative Technology, Ltd Zen Touch (mtp) # SNIP OUTPUT # $ lsusb --verbose -s 002:004 Bus 002 Device 004: ID 041e:4131 Creative Technology, Ltd Zen Touch (mtp) Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 255 Vendor Specific Class bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x041e Creative Technology, Ltd idProduct 0x4131 Zen Touch (mtp) bcdDevice 1.00 iManufacturer 1 Creative Technology Ltd iProduct 2 Creative Zen Touch iSerial 3 010125517D039098 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 16 Configuration 1 bmAttributes 0xc0 Self Powered MaxPower 440mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 0 (Defined at Interface level) bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 33 MTP Interface Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 4 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 255 Vendor Specific Class bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 can't get debug descriptor: Connection timed out Device Status: 0x0000 (Bus Powered)

    Read the article

  • How to disable Alert volume from the command line?

    - by Bryce
    There is an option in the Sound Preferences dialog, Sound Effects tab, to toggle Alert volume 'mute'. It works and suffices for my needs to disable the irritating system beep/bell. However, I reinstall systems a LOT for testing purposes and would like to set this setting in a shell script so it's off without having to fiddle with a GUI. But for the life of me I can't seem to find where this can be toggled via a command line tool. I've scanned through gconf-editor, pulseaudio's pacmd, grepped through /etc, even dug through the gnome-volume-control source code, but I am not seeing how this can be set. I gather that gnome-volume-control has changed since a few releases ago. Ideas?

    Read the article

  • Partition tool with console UI (as in server installation)?

    - by lepe
    Back in 2006, Ray (3DLover) posted the same question in: http://ubuntuforums.org/showthread.php?t=309680 but none of the answers were really useful. Now with a little help from AskUbuntu community, I would like to repeat his question again to see if this time it can be answered correctly. So this is the question (and what I wish too): I'm looking for a UI tool for managing partitions in a console. I have installed Ubuntu Server, so I don't have X Windows at all. fdisk and sfdisk are entirely command line. parted is slightly better, but it's not really a UI. cfdisk has somewhat of a UI, but it only works on one disk at a time, and there's no advanced options like configuring LVM or RAID. Just partitioning. I love the partition tool that is available during the OS install procedure. You can partition, configure RAID's and LMV sets. It can format the partitions with several different file systems, it can set labels, mount options and it can insert your volumes into your fstab. Is this tool available as a stand-alone program? I can't find it anywhere. I think it's called parted_server, but I can't find much information about where to get it. In the past, I have run the Ubuntu install procedure just to use the partition manager that comes with it. (canceling the install after making my partition edits) Anyone help me on this? Thanks -Ray Thanks in advance.

    Read the article

  • Laptop's battery is stuck on "estimating"?

    - by xd1936
    Hello! After installing Ubuntu 10.10, the battery indicator worked fine (both percent remaining and estimation on time). I then installed and configured some software (Skype, Pidgin, Thunderbird, removed Empathy and Evolution, ect) and the battery meter, when clicked, always says "(estimating...)" I've tried running the battery down to zero and charging it fully again. If I go into the history or details, the percentage is recorded correctly. Any ideas?

    Read the article

  • Is paypal's IPN reliable enough?

    - by Joann
    I am creating my first ever major plugin for Wordpress and I intend to share it to the community. It integrates paypal's subscription button which is very useful for people who wishe to build a membership site using Wordpress. Question: Is IPN reliable enough that there's no need to control the subscription thru cron myself? I have not tested my plugin for a span of a month or so though because doing so would eat a lot of my time.

    Read the article

  • Creating User Generated Subdomains

    - by nicks451
    Hi there, The company I work for is close to being finished with our first web app and we recently made the decision to offer hosting for our smaller customers. (We provide software to lending companies and our larger customers are required to buy redundant servers to host their application). What we are trying to work out right now is how to create user generated subdomains that will hold a new instance of the software. So a user will be able to sign up and say that the company name is XYZ Credit once they click on the create account button a url of xyzcredit.ourcompanyname.com is created and the user is redirected to it. The servers that we want to use are running CentOS 5.5 and Virtualmin 3.83. Thank you for your help, Nick

    Read the article

  • Should I work on CSS or apps first?

    - by Fred
    I am working on my own website for my business, and I need to contract out some assistance. For example, I have the site looking pretty good on Firefox, but it needs help on other browsers. I also need some help with adding some Django apps to the site and setting up a database. I plan to seek the help of two different individuals via elance or odesk. My question is which to do first - get the css and html right then do the apps, or get the apps done and then work on the css and html? Thanks in advance for any suggestions.

    Read the article

  • Looking for a package allowing user-entered profiles

    - by Mark
    Title was a little hard to work, but take this as an example. User goes to site, creates account, and then has his/her own profile to edit. Let's say the profile includes height, weight, sex, eye color, etc.. I've really only used wordpress before, but I'm sure something else would cater to this better. The entire site is focused around a person having their own profile page with the info they supply. Thanks!

    Read the article

  • Simple CMS for clients?

    - by jae
    I'm looking for something fairly simple for clients to use and very easy for me to skin (somewhat complicated themes). something like Perch or Couchcms, but has to be open source to satisfy some license requirements.. I can't really seem to find any CMS that is like this {Wordpress, drupal etc are way too heavy for this use} , really appreciated There aren't much requirements, anything will really work - each site gets their own jailed instance and stuff, just PHP/MySQL

    Read the article

  • How do I draw video frames onto the screen permanently using XNA?

    - by izb
    I have an app that plays back a video and draws the video onto the screen at a moving position. When I run the app, the video moves around the screen as it plays. Here is my Draw method... protected override void Draw(GameTime gameTime) { Texture2D videoTexture = null; if (player.State != MediaState.Stopped) videoTexture = player.GetTexture(); if (videoTexture != null) { spriteBatch.Begin(); spriteBatch.Draw( videoTexture, new Rectangle(x++, 0, 400, 300), /* Where X is a class member */ Color.White); spriteBatch.End(); } base.Draw(gameTime); } The video moves horizontally acros the screen. This is not exactly as I expected since I have no lines of code that clear the screen. My question is why does it not leave a trail behind? Also, how would I make it leave a trail behind?

    Read the article

  • DirectX10 How to use Constant Buffers

    - by schnozzinkobenstein
    I'm trying to access some variables in my shader, but I think I'm doing this wrong. Say I have a constant buffer that looks like this: cbuffer perFrame { float foo; float bar; }; I got an ID3D10EffectConstantBuffer reference to it, and I can get a specific index by calling GetMemberByIndex, but how can I figure out how many members perFrame has so that I can get each member without going out of bounds?

    Read the article

  • Adding objects to the environment at timed intervals

    - by david
    I am using an ArrayList to handle objects and at each interval of 120 frames, I am adding a new object of the same type at a random location along the z-axis of 60. The problem is, it doesn't add just 1. It depends on how many are in the list. If I kill the Fox before the time interval when one is supposed to spawn comes, then no Fox will be spawned. If I don't kill any foxes, it grows exponentially. I only want one Fox to be added every 120 frames. This problem never happened before when I created new ones and added them to the environment. Any insights? Here is my code: /**** FOX CLASS ****/ import env3d.EnvObject; import java.util.ArrayList; public class Fox extends Creature { private int frame = 0; public Fox(double x, double y, double z) { super(x, y, z); // Must use the mutator as the fields have private access // in the parent class setTexture("models/fox/fox.png"); setModel("models/fox/fox.obj"); setScale(1.4); } public void move(ArrayList<Creature> creatures, ArrayList<Creature> dead_creatures, ArrayList<Creature> new_creatures) { frame++; setX(getX()-0.2); setRotateY(270); if (frame > 120) { Fox f = new Fox(60, 1, (int)(Math.random()*28)+1); new_creatures.add(f); frame = 0; } for (Creature c : creatures) { if (this.distance(c) < this.getScale()+c.getScale() && c instanceof Tux) { dead_creatures.add(c); } } for (Creature c : creatures) { if (c.getX() < 1 && c instanceof Fox) { dead_creatures.add(c); } } } } import env3d.Env; import java.util.ArrayList; import org.lwjgl.input.Keyboard; /** * A predator and prey simulation. Fox is the predator and Tux is the prey. */ public class Game { private Env env; private boolean finished; private ArrayList<Creature> creatures; private KingTux king; private Snowball ball; private int tuxcounter; private int kills; /** * Constructor for the Game class. It sets up the foxes and tuxes. */ public Game() { // we use a separate ArrayList to keep track of each animal. // our room is 50 x 50. creatures = new ArrayList<Creature>(); for (int i = 0; i < 10; i++) { creatures.add(new Tux((int)(Math.random()*10)+1, 1, (int)(Math.random()*28)+1)); } for (int i = 0; i < 1; i++) { creatures.add(new Fox(60, 1, (int)(Math.random()*28)+1)); } king = new KingTux(25, 1, 35); ball = new Snowball(-400, -400, -400); } /** * Play the game */ public void play() { finished = false; // Create the new environment. Must be done in the same // method as the game loop env = new Env(); // Make the room 50 x 50. env.setRoom(new Room()); // Add all the animals into to the environment for display for (Creature c : creatures) { env.addObject(c); } for (Creature c : creatures) { if (c instanceof Tux) { tuxcounter++; } } env.addObject(king); env.addObject(ball); // Sets up the camera env.setCameraXYZ(30, 50, 55); env.setCameraPitch(-63); // Turn off the default controls env.setDefaultControl(false); // A list to keep track of dead tuxes. ArrayList<Creature> dead_creatures = new ArrayList<Creature>(); ArrayList<Creature> new_creatures = new ArrayList<Creature>(); // The main game loop while (!finished) { if (env.getKey() == 1 || tuxcounter == 0) { finished = true; } env.setDisplayStr("Tuxes: " + tuxcounter, 15, 0); env.setDisplayStr("Kills: " + kills, 140, 0); processInput(); ball.move(); king.check(); // Move each fox and tux. for (Creature c : creatures) { c.move(creatures, dead_creatures, new_creatures); } for (Creature c : creatures) { if (c.distance(ball) < c.getScale()+ball.getScale() && c instanceof Fox) { dead_creatures.add(c); ball.setX(-400); ball.setY(-400); ball.setZ(-400); kills++; } } // Clean up of the dead tuxes. for (Creature c : dead_creatures) { if (c instanceof Tux) { tuxcounter--; } env.removeObject(c); creatures.remove(c); } for (Creature c : new_creatures) { creatures.add(c); env.addObject(c); } // we clear the ArrayList for the next loop. We could create a new one // every loop but that would be very inefficient. dead_creatures.clear(); new_creatures.clear(); // Update display env.advanceOneFrame(); } // Just a little clean up env.exit(); } private void processInput() { int keyDown = env.getKeyDown(); int key = env.getKey(); if (keyDown == 203) { king.setX(king.getX()-1); } else if (keyDown == 205) { king.setX(king.getX()+1); } if (ball.getX() <= -400 && key == Keyboard.KEY_S) { ball.setX(king.getX()); ball.setY(king.getY()); ball.setZ(king.getZ()); } } /** * Main method to launch the program. */ public static void main(String args[]) { (new Game()).play(); } } /**** CREATURE CLASS ****/ /* (Parent class to Tux, Fox, and KingTux) */ import env3d.EnvObject; import java.util.ArrayList; abstract public class Creature extends EnvObject { private int frame; private double rand; /** * Constructor for objects of class Creature */ public Creature(double x, double y, double z) { setX(x); setY(y); setZ(z); setScale(1); rand = Math.random(); } private void randomGenerator() { rand = Math.random(); } public void move(ArrayList<Creature> creatures, ArrayList<Creature> dead_creatures, ArrayList<Creature> new_creatures) { frame++; if (frame > 12) { randomGenerator(); frame = 0; } // if (rand < 0.25) { // setX(getX()+0.3); // setRotateY(90); // } else if (rand < 0.5) { // setX(getX()-0.3); // setRotateY(270); // } else if (rand < 0.75) { // setZ(getZ()+0.3); // setRotateY(0); // } else if (rand < 1) { // setZ(getZ()-0.3); // setRotateY(180); // } if (rand < 0.5) { setRotateY(getRotateY()-7); } else if (rand < 1) { setRotateY(getRotateY()+7); } setX(getX()+Math.sin(Math.toRadians(getRotateY()))*0.5); setZ(getZ()+Math.cos(Math.toRadians(getRotateY()))*0.5); if (getX() < getScale()) setX(getScale()); if (getX() > 50-getScale()) setX(50 - getScale()); if (getZ() < getScale()) setZ(getScale()); if (getZ() > 50-getScale()) setZ(50 - getScale()); // The move method now handles collision detection if (this instanceof Fox) { for (Creature c : creatures) { if (c.distance(this) < c.getScale()+this.getScale() && c instanceof Tux) { dead_creatures.add(c); } } } } } The rest of the classes are a bit trivial to this specific problem.

    Read the article

  • XSD: how to use 'unique' & 'key'/'keyref' with element values?

    - by Koohoolinn
    I trying to use and / with element values but I just can't get it to work. If I do it with attrubute values it works like a charm. Test.xml <test:config xmlns:test="http://www.example.org/Test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/Test Test.xsd "> <test:location id="id1" path="/path2"> <test:roles> <test:role>role1</test:role> <test:role>role2</test:role> <test:role>role2</test:role> <!-- DUPLICATE: FAIL VALIDATION --> </test:roles> <test:action name="action1"> <test:roles> <test:role>role1</test:role> <test:role>role1</test:role> <!-- DUPLICATE: FAIL VALIDATION --> <test:role>role3</test:role> <!-- NOT DEFINED: FAIL VALIDATION --> </test:roles> </test:action> </test:location> </test:config> I want ensure that roles are only defined once and that the roles defined under the action element are only those defined at the upper level. Test.xsd <xs:element name="config"> <xs:complexType> <xs:sequence> <xs:element ref="test:location" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="location" type="test:LocationType"> <xs:key name="keyRole"> <xs:selector xpath="test:roles" /> <xs:field xpath="test:role" /> </xs:key> <xs:keyref name="keyrefRole" refer="test:keyRole"> <xs:selector xpath="test:action/test:roles" /> <xs:field xpath="test:role" /> </xs:keyref> </xs:element> <xs:complexType name="LocationType"> <xs:sequence> <xs:element ref="test:roles" minOccurs="0" /> <xs:element name="action" type="test:ActionType" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="id" type="xs:string" use="required"/> <xs:attribute name="path" type="xs:string" use="required"/> </xs:complexType> <xs:element name="roles" type="test:RolesType"> <xs:unique name="uniqueRole"> <xs:selector xpath="." /> <xs:field xpath="test:role" /> </xs:unique> </xs:element> <xs:complexType name="RolesType"> <xs:sequence> <xs:element name="role" type="xs:string" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="ActionType"> <xs:sequence> <xs:element ref="test:roles" /> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required" /> </xs:complexType> The validation fails with these messages: Description Resource Path Location Type cvc-identity-constraint.3: Field "./test:role" of identity constraint "keyrefRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 15 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "keyrefRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 16 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "keyRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 9 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "keyRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 10 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "uniqueRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 9 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "uniqueRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 10 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "uniqueRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 15 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "uniqueRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 16 XML Problem cvc-identity-constraint.4.1: Duplicate unique value [role1] declared for identity constraint "uniqueRole" of element "roles". Test.xml /filebrowser-ejb/src/test/resources line 9 XML Problem cvc-identity-constraint.4.1: Duplicate unique value [role1] declared for identity constraint "uniqueRole" of element "roles". Test.xml /filebrowser-ejb/src/test/resources line 15 XML Problem cvc-identity-constraint.4.2.2: Duplicate key value [role1] declared for identity constraint "keyRole" of element "location". Test.xml /filebrowser-ejb/src/test/resources line 9 XML Problem cvc-identity-constraint.4.3: Key 'keyrefRole' with value 'role3' not found for identity constraint of element 'location'. Test.xml /filebrowser-ejb/src/test/resources line 19 XML Problem If I comment out the lines that should fail, validation still fails now with these messages: Description Resource Path Location Type cvc-identity-constraint.3: Field "./test:role" of identity constraint "keyRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 10 XML Problem cvc-identity-constraint.3: Field "./test:role" of identity constraint "uniqueRole" matches more than one value within the scope of its selector; fields must match unique values. Test.xml /filebrowser-ejb/src/test/resources line 10 XML Problem What am I doing wrong?

    Read the article

  • Reconnect to GPRS from J2ME

    - by ouzz
    Dear All, I have a little problem. I have developed a midlet application that call some webservices through internet. I'm using cell phones with GPRS connection. For some time it runs as I wanted, run the apps, call the webservices through the GPRS, it returns the result, call the webservices again, and so on. But say, I call the webservices and after the apps return the result I needed, I left it for a while. The next time I continue to access the webservices, the apps takes a while to connect through the GPRS. In nokia, it is marked with a G in a box. In SE it is marked with a glowing globe. This 'G' in the box or the glowing globe will appear after a while or won't appear at all, but the apps is still trying to connect to the internet. Does it come from my apps or it come from the cell phone? And could I know [or the apps knows] that at the moment the apps tries to connect the GPRS is ready? Thanks a lot for your responses...

    Read the article

  • What are possible suffixes after variable name in VBA?

    - by archimed7592
    As I've already figured out, there is at least six of them: !@#$%&. Here is snip: Dim A!, B@, C#, D$, E%, F& Debug.Print "A! - " & TypeName(A) Debug.Print "B@ - " & TypeName(B) Debug.Print "C# - " & TypeName(C) Debug.Print "D$ - " & TypeName(D) Debug.Print "E% - " & TypeName(E) Debug.Print "F& - " & TypeName(F) Outputs A! - Single B@ - Currency C# - Double D$ - String E% - Integer F& - Long Where is documentation on this syntax sugar? What other possible suffixes are there? Is there one for Date?

    Read the article

  • php string search - grabbing specific urls

    - by MEM
    Hello, I have this string that may contain some urls that I need to grab. For instance, if the user does: www.youtube ... or www.vimeo ... or http://www.youtube ... or HttP://WwW.viMeo I need to grab it (until he finds a space perhaps). and store it on a already created array. The need is to separate the vimeo links from the youtube ones and place each of those on the appropriate video object. I'm not sure if this is possible, I mean, if the URL coming from the browser could be used to be placed on a predefined video object. If it is, then this is the way to go (so I believe). If all this is feasible, can I have your help in order to build such a rule? Thanks in advance

    Read the article

  • terminal: where am I?

    - by sid_com
    Is there a variable or a function, which can tell me the actual position of the cursor? #!/usr/bin/env perl use warnings; use 5.012; use Term::ReadKey; use Term::Cap; use POSIX; my( $col, $row ) = GetTerminalSize(); my $termios = new POSIX::Termios; $termios->getattr; my $ospeed = $termios->getospeed; my $terminal = Tgetent Term::Cap { TERM => undef, OSPEED => $ospeed }; # some movement ... # at which position (x/y) is the cursor now?

    Read the article

  • Ruby: backslash all non-alphanumeric characters in a string

    - by HBlend
    I have a script where I need to take a user's password and then run a command line using it. I need to backslash all (could be more then one) non-alphanumeric characters in the password. I have tried several things at this point including the below but getting no where. This has to be easy, just missing it. Tried these and several others: password = password.gsub(/(\W)/, '\\1') password = password.gsub(/(\W)/, '\\\1') password = password.gsub(/(\W)/, '\\\\1')

    Read the article

  • SQL, problem with OrderBy / GroupBy

    - by Tristan
    Hi, In my table I have two fields among others : article_id and *version* *example: article_id : 5 // version 1 aricle_id: 5 // version 2 article_id: 6 // version 1* What i want to do is to retrieve the latest version for each article id (in my example i want to retrieve the article 5 version 2 object and article 6 and version 1 object). The problem is that mysql is doing the groupBy instead of the OrderBy so it returns to me the FIRST version of each article, but i want the opposit. Do you have an idea please ?

    Read the article

  • Windows service thread not updating database until complete

    - by dfarney
    I have a windows service with a FileSystemWatcher. When a new file is dropped in my folder a new thread is created, started, and I begin processing the file. Throughout this process I am making updates to the database (Linq to SQL) to keep track of the file's processing progress. Problem is none of my database updates are reflected throughout the process, just an update after everything has been completed. Any ideas? Note: when doing dev/testing my code was in an aspx page and worked great, but when I put it in a windows service I no longer get the progress updates. Thanks!

    Read the article

  • $HOME git repo (selectively) to github?

    - by user428502
    I keep many files in my home directory under git. Important dotfiles, my thesis, etc. I want to push certain files to github, e.g., my emacs configuration, to share. Obviously, I don't want to push the entire repo. Are submodules the way to go? My first thought is to make a directory ~/github/emacs, and rsync selective files here, then add a submodule under that directory, pointing to github, to push. Is this a good idea, or is there a better way? (I don't want my local git repo storing all files to get muddled up with this stuff, though.)

    Read the article

  • div block going to next line in Firefox

    - by user550265
    I have a div with display:block in my css. This div block uses the align = "absmiddle" . It displays all the elements in 1 line in Chrome. However, in firefox, the elements are displyed on to the next line as well. How do I get them to display in 1 single line in firefox. P.S: I have already tried display: inline but it does not bring it in 1 line. <div class="one"><input name="elementone" value="1" align="absmiddle" class="subone" /></div> Css is div.one,div.subone{ display:block; width:16px; height:100%; background-position:0 0px; border:0 }

    Read the article

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