Daily Archives

Articles indexed Saturday January 15 2011

Page 26/28 | < Previous Page | 22 23 24 25 26 27 28  | Next Page >

  • Prioritize file sharing performance in Windows Server 2008

    - by cmbrnt
    I've got a server running Windows Server 2008, and use it mainly for sharing files throughout the domain from a number of disks. It's running on VMware ESXi 4.0, in case that matters. My problem is that when I log in to the server to check user permissions etc, the access speed the files on the remote disks almost grinds to a halt. I havn't been able to measure the speeds, but I would guess it slows down to about 100kB/s as soon as I log in. This is on a gigabit network and the problems are equal for all users, even the ones connected to the same switch as the server. I've assigned 2 GB RAM to the server, and reserved it 1,5Ghz processor power. I don't have to do anything special on the server for this halt to occur. How can I make sure file sharing is prioritized on the server, so no matter what applications I'm using it will always make sure file sharing works properly? Could this be a VMware issue?

    Read the article

  • Turn Off Sleep on Seagate GoFlex?

    - by RPG Master
    I bought this 2tb Segate GoFlex this last Black Friday and since then every 15 minutes or so the drive spins down, and then a little while later completely dismounts. Very annoying. From what I understand you could turn this off using the including Windows and Mac only software. This function and what controls it isn't proprietary, right? There has to be something that'll let me set it in Ubuntu... Anyone have any suggestions? Also, I formatted it to EXT4. Hope I didn't screw myself up. :/

    Read the article

  • Adding a row to a ListView that displays "Loading" while information is downloaded. Like in the Market.

    - by user577139
    I've tried, but have had no luck trying to find this answer elsewhere. I want to add a row to the bottom of my listview that displays "Loading..." and maybe a spinning progress indicator. My program already loads additional information into the listview once the user scrolls to the bottom. But I want the user to be able to see that the program is indeed loading something. Example: If you go to the android marketplace and scroll to the bottom of one of the lists, the last row will say "Loading...". Then once the data is loaded, that bar is replaced with the first item of the new data. Sorry, it's a little hard to describe. I am NOT trying to add a footer to the bottom of the list view. I want it to be an actual item in the listview.

    Read the article

  • Server-side Audio Editor

    - by Kristen
    I am looking for an audio editor that we can use server side (ASP + IIS) We want users to be able to upload an audio file, and then offer a 10 second teaser clip to other users for download. Ideally I would like our application to be able to specify Input and Output Filename, Start and End time (or Duration), and be able to fade-in and fade-out, and equalise the volume. Maybe some audio editors have a batch edit facility, and it would just be a question of installing on the server? All the keywords I have tried putting into Google have led me on a wild goose chase, hopefully someone can help me with suggestions. Thanks.

    Read the article

  • Expand chaining hashtable. Errors on code.

    - by FILIaS
    Expanding a hashtable with linked lists there are some errors and warnings. I wanna make sure that the following code is right (expand method) and find out what happens that raise these warnings/errors typedef struct { int length; struct List *head; struct List *tail; } HashTable; //resolving collisions using linked lists - chaining typedef struct { char *number; char *name; int time; struct List *next; }List; //on the insert method i wanna check hashtable's size, //if it seems appropriate there is the following code: //Note: hashtable variable is: Hashtable * ...... hashtable = expand(hashtable,number,name,time); /**WARNING**:assignment makes pointer from integer without a cast*/ HashTable* expand( HashTable* h ,char number[10],char* name,int time) /**error**: conflicting types for ‘expand’ previous implicit declaration of ‘expand’ was here*/ { HashTable* new; int n; clientsList *node,*next; PrimesIndex++; int new_size= primes[PrimesIndex]; /* double the size,odd length */ if (!(new=malloc((sizeof( List*))*new_size))) return NULL; for(n=0; n< h->length; ++n) { for(node=h[n].head; node; node=next) { add (&new, node->number, node->name,node->time); next=node->next;//// free(node); } } free(h); return new; }

    Read the article

  • PHP & RSS Feeds & Special Characters validation Problem.

    - by BUGY
    I keep getting the following validation warning below. And I was wondering that some of my articles deal with special characters and was wondering how should I go about rendering or not rendering special characters in my RSS feeds? Should I use htmlentites or not? If so how? In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations. line 22, column 35: title should not contain HTML: &amp; PHP code. <title>' . htmlentities(strip_tags($title), ENT_QUOTES, "UTF-8") . '</title>

    Read the article

  • cannot get FilesMatch and mod_rewrite working together

    - by neil
    Hello, I'm having a little difficulty with my .htaccess when combining a password protection on a file and a mod_rewrite: If I only have this as my .htaccess <FilesMatch "manage.php"> AuthName "Member Only" AuthType Basic AuthUserFile /home/myuser/.htpasswd require valid-user </FilesMatch> It password protects manage.php fine. If I have this as my .htaccess RewriteEngine on RewriteCond $1 !^(index\.php|manage\.php|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] It works as expected: robots.txt, index.php and manage.php are left alone and are called as normal, everything else is redirected to index.php/$1 HOWEVER, If I combine them then when I visit manage.php it gets redirected as index.php/$1, i.e. the FilesMatch is causing the entry in rewritecond to be ignored. If I actually enter a password in the original test and get to the file, it works in this last test. So I guess something is up with the rewrite and the file match. i.e. entering this causes .\manage.php to be called as .\index.php\manage.php <FilesMatch "manage.php"> AuthName "Member Only" AuthType Basic AuthUserFile /home/myuser/.htpasswd require valid-user </FilesMatch> RewriteEngine on RewriteCond $1 !^(index\.php|manage\.php|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] Thanks for any help :)

    Read the article

  • java label setText and setBounds clashing?

    - by java
    I would like to have a JLabel changint color to a random one, while jumping to a random position, and while changing its text. but the setText and setBounds seem to clash and i don't know why. if you comment out the setText then the setBounds will work, but they won't work together. import java.awt.*; import java.util.*; import javax.swing.*; public class test2 extends JFrame { private static JLabel label = new JLabel("0"); private static Random gen = new Random(); public test2() { JPanel panel = new JPanel(); panel.add(label); this.add(panel); } public static void move() { for (int i = 0; i < 10; i++) { int n = gen.nextInt(254)+1; int nn = gen.nextInt(254)+1; int nnn = gen.nextInt(254)+1; label.setText(""+i); //the setBounds command will not work with the setText command. why? label.setBounds(n*2, nn*2, 20, 20); label.setForeground(new Color(n, nn, nnn)); try { Thread.sleep(200); } catch (Exception e) {} } } public static void main(String[] args) { test2 frame = new test2(); frame.setVisible(true); frame.setSize(600, 600); frame.setResizable(true); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); move(); } }

    Read the article

  • Flash Sprite looses focus on MOUSE_DOWN event

    - by John
    My Sprite class keeps losing focus when I click with the mouse - specifically after the MOUSE_DOWN event (before the click is complete). I have set mouseEnabled to false on the children, no change. I added a listener for FOCUS_OUT and noticed that the FocusEvent.relatedObject property is NULL, which is confusing me - doesn't that mean there is no new focus target, the focus is just getting lost? The exact sequence of events I get, by tracing them, as I click: [FocusEvent type="focusOut" bubbles=true cancelable=false eventPhase=2 relatedObject=null shiftKey=false keyCode=0] [MouseEvent type="mouseDown" bubbles=true cancelable=false eventPhase=2 localX=355 localY=362 stageX=360 stageY=367 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=true delta=0]) [MouseEvent type="click" bubbles=true cancelable=false eventPhase=2 localX=355 localY=362 stageX=360 stageY=367 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=false delta=0]

    Read the article

  • jQuery: if value is true without user action

    - by Kevin Brown
    I want to show a div if the value of an input =='CP'. Right now this is my code: $(".register-type").change(function(){ var value = $(this).val(); if(value == 'CP'){ $('.cp-show').show(); This works fine if they change the input, but if things get validated false and the page reloads, this input is still 'CP', but the div doesn't show... Is there a way to correct this so that jquery checks if this is set on the page load?

    Read the article

  • I could use some help with my SQL command

    - by SuperSpy
    I've got a database table called 'mesg' with the following structure: receiver_id | sender_id | message | timestamp | read Example: 2 *(«me)* | 6 *(«nice girl)* | 'I like you, more than ghoti' | yearsago | 1 *(«seen it)* 2 *(«me)* | 6 *(«nice girl)* | 'I like you, more than fish' | now | 1 *(«seen it)* 6 *(«nice girl)* | 2 *(«me)* | 'Hey, wanna go fish?' | yearsago+1sec | 0 *(«she hasn't seen it)* It's quite a tricky thing that I want to achieve. I want to get: the most recent message(=ORDER BY time DESC) + 'contact name' + time for each 'conversation'. Contact name = uname WHERE uid = 'contact ID' (the username is in another table) Contact ID = if(sessionID*(«me)*=sender_id){receiver_id}else{sender_id} Conversation is me = receiver OR me = sender For example: From: **Bas Kreuntjes** *(« The message from bas is the most recent)* Hey $py, How are you doing... From: **Sophie Naarden** *(« Second recent)* Well hello, would you like to buy my spam? ... *(«I'll work on that later >p)* To: **Melanie van Deijk** *(« My message to Melanie is 3th)* And? Did you kiss him? ... That is a rough output. QUESTION: Could someone please help me setup a good SQL command. This will be the while loup <?php $sql = "????"; $result = mysql_query($sql); while($fetch = mysql_fetch_assoc($result)){ ?> <div class="message-block"> <h1><?php echo($fetch['uname']); ?></h1> <p><?php echo($fetch['message']); ?></p> <p><?php echo($fetch['time']); ?></p> </div> <?php } ?> I hope my explanation is good enough, if not, please tell me. Please don't mind my English, and the Dutch names (I am Dutch myself) Feel free to correct my English UPDATE1: Best I've got until now: But I do not want more than one conversation to show up... u=user table m=message table SELECT u.uname, m.message, m.receiver_uid, m.sender_uid, m.time FROM m, u WHERE (m.receiver_uid = '$myID' AND u.uid = m.sender_uid) OR (m.sender_uid = '$myID' AND u.uid = m.receiver_uid) ORDER BY time DESC;

    Read the article

  • Segmentation fault on returning from main (very short and simple code, no arrays or pointers)

    - by Gábor Kovács
    I've been wondering why the following trivial code produces a segmentation fault when returning from main(): //Produces "Error while dumping state (probably corrupted stack); Segmentation fault" #include <iostream> #include <fstream> #include <vector> using namespace std; class Test { vector<int> numbers; }; int main() { Test a; ifstream infile; cout << "Last statement..." << endl; // this gets executed return 0; } Interestingly, 1) if only one of the two variables is declared, I don't get the error, 2) if I declare a vector variable instead of an object with a vector member, everything's fine, 3) if I declare an ofstream instead of an ifstream, again, everything works fine. Something appears to be wrong with this specific combination... Could this be a compiler bug? I use gcc version 3.4.4 with cygwin. Thanks for the tips in advance. Gábor

    Read the article

  • Better understanding of my SQL transactions

    - by Slew Poke
    I just realized that my application was needlessly making 50+ database calls per user request due to some hidden coding -- hidden in the sense that between LINQ, persistence frameworks and events it just so turned out that a huge number of calls were being made without me being aware. Is there a recommended way to analyze individual transactions going to my SQL 2008 database, preferably with some integration to my Visual Studio 2010 environment? I want to be able to 'spy' on individual transactions being made, but only for certain pieces of my code, and without making serious changes to either the code or database.

    Read the article

  • How to redirect with .htaccess (keeping legacy links)

    - by Laurent
    Hello, I recently switched CMSes. While using Wordpress, I had this permalink convention: "/year/post". Now, I'd like to have "year/month/post". To keep legacy links, I need to redirect from "http://site.com/2009/sample-post" to "http://site.com/2009/01/sample-post". "01" should be permanent in this case. This is what I've got atm: RewriteEngine on RewriteCond $1 !^(images|system|themes|_|wp-content|mint|assets|favicon\.ico|robots\.txt|index\.php) [NC] RewriteRule ^(.*)$ /index.php?/$1 [L] Thanks in advance!

    Read the article

  • Loop crashing program having to do with 2D arrays

    - by user450062
    I am creating an encoding program and when I instruct the program to create a 5X5 grid based on the alphabet while skipping over letters that match up to certain pre-defined variables(which are given values by user input during runtime). I have a loop that instructs the loop to keep running until the values that access the array are out of bounds, the loop seems to cause the problem. This code is standardized so there shouldn't be much trouble compiling it in another compiler. Also would it be better to seperate my program into functions? here is the code: #include<iostream> #include<fstream> #include<cstdlib> #include<string> #include<limits> using namespace std; int main(){ while (!cin.fail()) { char type[81]; char filename[20]; char key [5]; char f[2] = "q"; char g[2] = "q"; char h[2] = "q"; char i[2] = "q"; char j[2] = "q"; char k[2] = "q"; char l[2] = "q"; int a = 1; int b = 1; int c = 1; int d = 1; int e = 1; string cipherarraytemplate[5][5]= { {"a","b","c","d","e"}, {"f","g","h","i","j"}, {"k","l","m","n","o"}, {"p","r","s","t","u"}, {"v","w","x","y","z"} }; string cipherarray[5][5]= { {"a","b","c","d","e"}, {"f","g","h","i","j"}, {"k","l","m","n","o"}, {"p","r","s","t","u"}, {"v","w","x","y","z"} }; cout<<"Enter the name of a file you want to create.\n"; cin>>filename; ofstream outFile; outFile.open(filename); outFile<<fixed; outFile.precision(2); outFile.setf(ios_base::showpoint); cin.ignore(std::numeric_limits<int>::max(),'\n'); cout<<"enter your codeword(codeword can have no repeating letters)\n"; cin>>key; while (key[a] != '\0' ){ while(b < 6){ cipherarray[b][c] = key[a]; if ( f == "q" ) { cipherarray[b][c] = f; } if ( f != "q" && g == "q" ) { cipherarray[b][c] = g; } if ( g != "q" && h == "q" ) { cipherarray[b][c] = h; } if ( h != "q" && i == "q" ) { cipherarray[b][c] = i; } if ( i != "q" && j == "q" ) { cipherarray[b][c] = j; } if ( j != "q" && k == "q" ) { cipherarray[b][c] = k; } if ( k != "q" && l == "q" ) { cipherarray[b][c] = l; } a++; b++; } c++; b = 1; } while (c < 6 || b < 6){ if (cipherarraytemplate[d][e] == f || cipherarraytemplate[d][e] == g || cipherarraytemplate[d][e] == h || cipherarraytemplate[d][e] == i || cipherarraytemplate[d][e] == j || cipherarraytemplate[d][e] == k || cipherarraytemplate[d][e] == l){ d++; } else { cipherarray[b][c] = cipherarraytemplate[d][e]; d++; b++; } if (d == 6){ d = 1; e++; } if (b == 6){ c++; b = 1; } } cout<<"now enter some text."<<endl<<"To end this program press Crtl-Z\n"; while(!cin.fail()){ cin.getline(type,81); outFile<<type<<endl; } outFile.close(); } } I know there is going to be some mid-forties guy out there who is going to stumble on to this post, he's have been programming for 20-some years and he's going to look at my code and say: "what is this guy doing".

    Read the article

  • Move an object in the direction of a bezier curve?

    - by Sent1nel
    I have an object with which I would like to make follow a bezier curve and am a little lost right now as to how to make it do that based on time rather than the points that make up the curve. .::Current System::. Each object in my scene graph is made from position, rotation and scale vectors. These vectors are used to form their corresponding matrices: scale, rotation and translation. Which are then multiplied in that order to form the local transform matrix. A world transform (Usually the identity matrix) is then multiplied against the local matrix transform. class CObject { public: // Local transform functions Matrix4f GetLocalTransform() const; void SetPosition(const Vector3f& pos); void SetRotation(const Vector3f& rot); void SetScale(const Vector3f& scale); // Local transform Matrix4f m_local; Vector3f m_localPostion; Vector3f m_localRotation; // rotation in degrees (xrot, yrot, zrot) Vector3f m_localScale; } Matrix4f CObject::GetLocalTransform() { Matrix4f out(Matrix4f::IDENTITY); Matrix4f scale(), rotation(), translation(); scale.SetScale(m_localScale); rotation.SetRotationDegrees(m_localRotation); translation.SetTranslation(m_localTranslation); out = scale * rotation * translation; } The big question I have are 1) How do I orientate my object to face the tangent of the Bezier curve? 2) How do I move that object along the curve without just setting objects position to that of a point on the bezier cuve? Heres an overview of the function thus far void CNodeControllerPieceWise::AnimateNode(CObject* pSpatial, double deltaTime) { // Get object latest pos. Vector3f posDelta = pSpatial->GetWorldTransform().GetTranslation(); // Get postion on curve Vector3f pos = curve.GetPosition(m_t); // Get tangent of curve Vector3f tangent = curve.GetFirstDerivative(m_t); } Edit: sorry its not very clear. I've been working on this for ages and its making my brain turn to mush. I want the object to be attached to the curve and face the direction of the curve. As for movement, I want to object to follow the curve based on the time this way it creates smooth movement throughout the curve.

    Read the article

  • What is the best way to handle this type of inclusive logic in Ruby?

    - by Steve McLelland
    Is there a better way of handling this in Ruby, while continuing to use the symbols? pos = :pos1 # can be :pos2, :pos3, etc. if pos == :pos1 || pos == :pos2 || pos == :pos3 puts 'a' end if pos == :pos1 || pos == :pos2 puts 'b' end if pos == :pos1 puts 'c' end The obvious way would be swapping out the symbols for number constants, but that's not an option. pos = 3 if pos >= 1 puts 'a' end if pos >= 2 puts 'b' end if pos >= 3 puts 'c' end Thanks.

    Read the article

  • node.js storing gamestate, how?

    - by expressnoob
    I'm writing a game in javascript, and to prevent cheating, i'm having the game be played on the server (it's a board game like a more complicated checkers). Since the game is fairly complex, I need to store the gamestate in order to validate client actions. Is it possible to store the gamestate in memory? Is that smart? Should I do that? If so, how? I don't know how that would work. I can also store in redis. And that sort of thing is pretty familiar to me and requires no explanation. But if I do store in redis, the problem is that on every single move, the game would need to get the data from redis and interpret and parse that data in order to recreate the gamestate from scratch. But since moves happen very frequently this seems very stupid to me. What should I do?

    Read the article

  • Checking date against date range in Python

    - by Flowpoke
    I have a date variable: 2011-01-15 and I would like to get a boolean back if said date is within 3 days from TODAY. Im not quite sure how to construct this in Python. Im only dealing with date, not datetime. My working example is a "grace period". A user logs into my site and if the grace period is within 3 days of today, additional scripts, etc. are omitted for that user. I know you can do some fancy/complex things in Python's date module(s) but Im not sure where to look.

    Read the article

  • CSS working in IE, but not FF

    - by cdotlister
    Hi guys, I have a very simple css file for my Asp.Net MVC application. body { font-family: Arial, Helvetica, sans-serif; font-size: x-small; color: #663300; } input { font-family: Arial, Helvetica, sans-serif; font-size: x-small; background-color: #FFFF99; color: #CC6600; border: 1px solid #808000; } .headerRow { background-color: #FFFFCC; border-style: none none dotted none; border-bottom-width: 1px; border-bottom-color: #800000; font-family: Arial, Helvetica, sans-serif; font-size: x-small; font-weight: bold; text-align: left; vertical-align: middle; text-transform: uppercase; } The Body is working well in both... as is the input. However, the headerRow isn't working in FF, yet works well in IE. Here it is, being used: <table width="700" border="0" cellspacing="1" cellpadding="2"> <tr class="headerRow"> <td> Transaction Date </td> <td> Type </td> <td> Category </td> <td> Budget Assignment </td> <td> Cost Center </td> <td align="right"> Amount </td> </tr> The header row just displays as normal body text though...

    Read the article

  • best way to use CoreLocation across multiple views

    - by Matt
    I have two views in my app, one is a general view where CoreLocation works away calculating the users location while the user is doing other stuff in the view. The second view is accessed by the user when they touch a button allowing them to locate themselves more accurately using a mapview and MapKit, i would like the mapview in this view to show the location that CoreLocation has already identified in the first view AND to continue displaying this location based on updates from CoreLocation in the other view. Is the best way here to create a singleton that encapsulates the CoreLocation stuff and have this referenced in the view with the map, or to use notifications ? or to use some other better practice for my scenario ? Thanks

    Read the article

  • Multiple servers vs 1 big server performace

    - by pistacchio
    Hi to all! My team of developers has suggested a server structure for an upcoming project we are developing. Our structure is "logical", meaning that the various logical components of the application (it is a distributed one) relies on different servers. Some components are more critical than others and will be subjected to more load. Our proposal was to have 1 server per component but the hardware guys suggested to replace the various machines with a single, bigger one with virtual servers. They're gonna use Blade Servers. Now, I'm not an expert at all, but my question to the guys was: so if we need, for example, 3 2GHz CPU / 2GB RAM machines and you give me 1 machine with 3 2GHz CPUs and 6 GB of RAM it is the same? They told me it is. Is this accurate? What are the advantages or disadvantages of both the solutions? What are the generally accepted best practices? Could you point out some URL reference dealing with the problem? Thank you in advance! EDIT: Some more info. The (internet / intranet) application is already layered. We have some servers on the DMZ that will expose pages to the internet and the databases are on their own machines. What we want to split (and they want to join) are some webservers that mainly expose webservices. One is a DAL that communicates with the database layer, one is our Single Sign On / User Profile application that gets called once per page and one is a clone of what seen on the Internet to be used on our lan.

    Read the article

  • Mail sent from local Postfix marked as "possible phishing" in Outlook

    - by leo grrr
    Hi folks, Sorry for the newbie question--this is not my area of expertise by a long shot. I work at a small development shop and we finally got around to doing code reviews. (Yay!) I set up an instance of Review Board -- an open-source code review tool -- on one of our local servers but it doesn't seem to like talking to our hosted Exchange server to send notification emails. I decided to just install Postfix on that same box and send mail from localhost, which is working much more reliably, but Outlook disables all links in the email announcements and marks it as possible phishing. What is making these emails look suspicious and what can I change? Would the best thing be to figure out how to relay to Exchange from Postfix? Thanks!

    Read the article

  • Xen: How to install bootloader for domU (guest os) ?

    - by holms
    I tried to install with "grub-install" grub for guest os (which is debian) from host (centos). Tried with chroot, tried with deboostrap, tried with netinstaller. Centos is running on two raid hdd's,under LVM. Lvm volumes are created everything is formated and works. Only bootloader problem left. Netinstaller just throws me a window with error that grub can't be installed, debootstrap instructions is not clear for me in here, grub-install doesn't work in chroot, and out of chroot (grub-install /dev/mylvm/partition) Please can somebody write how to install grub for domU (guest) os from centos?

    Read the article

  • How to create batch file that delete all the folders named `bin` or `obj` recursively?

    - by Nam Gi VU
    I have the need of deleting all bin & obj folders in a folder on my PC. So, I'm thinking of a batch file to do that but I'm not famaliar with batching file in Windows. Please help. [Edit] After discussion with user DMA57361, I got to the current solution (still having problem though, see our comments): Create a .bat file, and paste the below command: start for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d" OR start for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s "%%d" @DMA57361: When I run your script, I get the below error. Any idea?

    Read the article

< Previous Page | 22 23 24 25 26 27 28  | Next Page >