Search Results

Search found 46075 results on 1843 pages for 'system cats lol'.

Page 129/1843 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • linux's fork and system resources

    - by Dmitry Bespalov
    Suppose I have following code in linux: int main() { FILE* f = fopen("file.txt", "w"); fork(); fwrite("A", 1, 1, f); fclose(f); return 0; } What I know about fork from documentation, is that it makes the copy of current process. It copies state of the memory as well, so *f should be equal in both instances. But what happens with system resources, such as a file handle? In this example I open the file with write intentions, so only one instance can write into file, right? Which of the instances will actually write into file? Who should care further about the file handle, and call fclose() ?

    Read the article

  • how to convert numbers to alpha numeric system with php

    - by Patrick
    Im not sure what this is called, which is why im having trouble searching for it. What im looking to do, is take numbers, and convert them to some alpha numeric base so that the number say 5000, wouldnt read 5000, but like G4u or something like that. The idea being to save space and also not make it obvious how many records there are in a given system. Im using php, so if there is something like this built into php even better, but even a name for this method would be helpful at this point Again, sorry for not being able to be more clear, im just not sure what this is called.

    Read the article

  • SAS(Statistical Analysis System) Career As a computer science student

    - by Renju
    Hi. I have completed MSc in Computer science this academic year. So I am fresher... While I am doing graduation and post graduation I did many projects using PHP and MySQL. Now I got opportunity to get into SAS(Statistical Analysis System) career, and I heard that SAS having better career growth than PHP developement. For the past 4 days, I was working with SAS and I feel interested in working. My questions are, Since i am a computer science student whether i will have any problem in my career growth in SAS? I am ready to learn statistics also, is there anything else I have to do? Doing certification in SAS will make any changes? Is it a bad idea to get into SAS with only CSc backgrond? So please guide me for my career...

    Read the article

  • Why There is a difference between assembly languages like Windows, Linux ?

    - by mcaaltuntas
    I am relatively new to all this low level stuff,assembly language.. and want to learn more detail. Why there is a difference between Linux, Windows Assembly languages? As I understand when I compile a C code Operating system does not really produce pure machine or assembly code, it produces OS dependent binary code.But why ? For example when I use a x86 system, CPU only understands x86 ASM am I right?.So Why we dont write pure x86 assembly code and why there are different assembly variations based on Operating system? If we would write pure ASM or OS produce pure ASM there wouldn't be binary compatilibty issues between Operating systems or Not ? I am really wondering all reasons behind them. Any detailed answer, article, book would be great. Thanks.

    Read the article

  • Rails + simple role system through associative table

    - by user202411
    So I have the Ninja model which has many Hovercrafts through ninja_hovercrafts (which stores the ninja_id and the hovercraft_id). It is of my understanding that this kind of arrangement should be set in a way that the associative table stores only enough information to bind two different classes. But I'd like to use the associative table to work as a very streamlined authorization hub on my application. So i'd also like this table to inform my system if this binding makes the ninja the pilot or co-pilot of a given hovercraft, through a "role" field in the table. My questions are: Is this ugly? Is this normal? Are there methods built into rails that would help me to automagically create Ninjas and Hovercrafts associations WITH the role? For exemple, could I have a nested form to create both ninjas and hcs in a way that the role field in ninjas_hovercrafts would be also filled? If managing my application roles this way isn't a good idea, whats the non-resource heavy alternative (my app is being designed trying to avoid scalability problems such as excessive joins, includes, etc) thank you

    Read the article

  • Visual C++/CLI "An unhandled exception of type 'System.StackOverflowException' occurred in"

    - by JennyWong
    Hi, I have a game I am making, it is giving me this message... "An unhandled exception of type 'System.StackOverflowException' occurred in game.exe" To explain...I have a 2D array with 9 different opening moves and I am getting a random number to use as the array reference to retrieve the details needed for a move... you may get the same move again - but that's illegal. the move may be illegal for other reasons too So to try and fix this, I am calling the function again from within the function. The error occurs very randomly Is this bad practise to call a function from within itself? What would be a better way to randomly row from a 2D array, AND if it isn't accept to get another one.... Or better still, how can I retrieve a random LEGAL move?

    Read the article

  • LINQ to Entites: How should I handle System.InvalidOperationException when checking for existance of

    - by chris
    I have a many-to-one relationship that users can edit via checkboxes. PK of Foo is ID, and fid contains the id from the checkbox. I'm checking to see if an element exists with: Foo ent; try { ent = ctx.Foo.First(f => f.ID == fid); } catch (System.InvalidOperationException ioe) { ent = new Foo(); } It seems to me that I should be able to do this without throwing an exception. What would be the best way to do this?

    Read the article

  • Installing OSQA on windows(Local system)

    - by Pankaj Khurana
    Hi I want to install osqa on windows local system for this i have downloaded bitnami-djangostack-1.1.1-2-windows-installer.exe which has in built django,python,mysql & apache. I have run a django example given on the django website. Its working fine. But i am confused how to install osqa. I have downloaded the source code available on osqa site and readed the installation instruction(requires django 1.1.1). But how to make it working? Please help me on this Thanks

    Read the article

  • System.NullReferenceException with WhoCanHelpMe Unit Test

    - by tlum
    I'm working with a test project based on WhoCanHelpMe, which is based on Sharp Architecture, NHibernateValidator, etc. As its written the when_the_profile_tasks_is_asked_to_create_a_profile unit test creates the profile object and saves it without issue. Now the profile object is a CreateProfileDetails type that derives from their own ValidatableValueObject which inherits the IValidatable interface. The problem surfaces when my class is based on an Entity rather than their ValidatableValueObject. When the test is run a System.NullReferenceException because Validate() is null. I'm afraid that I'm at a loss to resolve this bad behavior. Does anyone have some suggestions to get to the bottom of this? Thanks, -Ted-

    Read the article

  • "Make" system for Actionscript?

    - by Ender
    In working on larger Actionscript/Flash projects, I've started to really feel the need for some kind of "make" system, but I haven't found it yet. Does anyone know if it exists? Required features: Ability to associate SWCs with their source code and/or FLAs i.e. "this swc is compiled from this source" Ability to mark my current project as depending on these SWCs (either as compile-time or runtime libraries) A single, big shiny button, that when pressed does the following: Checks to see if any of the source files have changed, and if so, recompiles their associated SWCs Recompiles and relinks the main .swf, if necessary Runs the main .swf Have yet to find a way to get something like FlashDevelop to do this (but I don't know it well enough to be sure). Support for both code and FLA sources is preferred.

    Read the article

  • pass custom environment variables to System.Diagnostics.Process

    - by Mike Ruhlin
    I'm working on an app that invokes external processes like so: ProcessStartInfo startInfo = new ProcessStartInfo(PathToExecutable, Arguments){ ErrorDialog = false, RedirectStandardError = true, RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true, WorkingDirectory = WorkingDirectory }; using (Process process = new Process()) { process.StartInfo = startInfo; process.Start(); process.BeginErrorReadLine(); process.BeginOutputReadLine(); process.WaitForExit(); return process.ExitCode; } One of the processes I'm calling depends on an environment variable that I'd rather not require my users to set. Is there any way to modify the environment variables that get sent to the external process? Ideally I'd be able to make them visible only to the process that's running, but if I have to programmatically set them system-wide, I'll settle for that (but, would UAC force me to run as administrator to do that?) ProcessStartInfo.EnvironmentVariables is read only, so a lot of help that is...

    Read the article

  • password/login system in php

    - by Jonathan
    For a login system in php would this be a suitable outline of how it would work: users types in username and password, clicks login button. Checks if user exists in database, if it does, then retrieve the salt for that user hash the password and salt (would this be done on the client or server side? I think client side would be better, but php is server side so how would you do this?) check value against value in database, if the values match then user has typed in correct password and they are logged in.

    Read the article

  • How to determine on which file system a file was created in Java

    - by rafrafUk
    Hi Everyone! I get files in different formats coming from different systems that I need to import into our database. Part of the import process it to check the line length to make sure the format is correct. We seem to be having issues with files coming from UNIX systems where one character is added. I suspect this is due to the return carriage being encoded differently on UNIX and windows platform. Is there a way to detect on which file system a file was created, other than checking the last character on the line? Or maybe a way of reading the files as text and not binary which I suspect is the issue? Thanks Guys !

    Read the article

  • Javascript points calculating system

    - by coolboycsaba
    I trying to create a points calculating system with javascript, but the problem is with the mathematical part. I have saved on the server the points number, and based on that number I want to decide the level. Sorry for my bad english, I cant explain very well :D. I want something like: level 1 need 0 points level 2 needs 100 points level 3 needs 240 points level 4 needs 420 points level 5 needs 640 points and so on.... I need a mathematical function to calculate each level with it. Something that if I know the level to calculate the points needed, and if I know only the points to calculate the level.

    Read the article

  • Is there a way to get the expression in a string in vb.net

    - by Jim Thio
    LogEvents(System.Text.Encoding.UTF8.GetString(queryPlaces.ToBson)) I want to be able to output not just the content of System.Text.Encoding.UTF8.GetString(queryPlaces.ToBson) but also the actual string of System.Text.Encoding.UTF8.GetString(queryPlaces.ToBson) itself, perhaps with line numbers and file names. I know that I can do this easily with objective-c. How can I do that with .net? I've heard that that's what reflextion is for. But how? There is no macro in vb.net right?

    Read the article

  • antlr: Best practice to integrate generated parser into the system

    - by green
    Here is the background, I am trying to create a DSL to allow customer write simple scripts to query into our mongodb based database. I choose antlr to implement the DSL. From my understanding (and pls let me know if it's not correct) there are 2 approaches to integrate antlr generated parser into the system: Embed code into the grammar file so that the generated parser could be used directly to make query to the database and return result in a certain format (e.g. json encoded) Keep the parser purely a parser, after feed the DSL file to it, and construct the query in another class by retrieving the AST from generated parser class So antlrers, which one do you think is the way I as an antlr newbie should go? Can you list the pros and cos of each approach, or you have other way to recommend?

    Read the article

  • Raising hard limit on RLIMIT_NOFILE system-wide on Linux

    - by jonswar
    We need to raise RLIMIT_NOFILE when running memcached, as we're hitting the default hard limit (1024). However, raising a hard limit requires root, and for various reasons we don't want to have to run memcached or its containing shell as root. Right now we happily run it as a non-root user. Is there a way to raise the hard limit for RLIMIT_NOFILE system-wide, so that we can continue to run memcached as non-root and simply raise the soft limit? This is RedHat Linux with 2.6 kernel. Thanks! Jon

    Read the article

  • How to model file system operations with REST?

    - by massive
    There are obvious counterparts for some of file systems' basic operations (eg. ls and rm), but how would you implement not straightforwardly RESTful actions such as cp or mv? As answers to the question REST services - exposing non-data “actions” suggest, the preferred way of implementing cp would include GETting the resource, DELETing it and PUTting it back again with a new name. But what if I would need to do it efficiently? For instance, if the resource's size would be huge? How would I eliminate the superfluous transmission of resource's payload to client and back to the originating server? Here is an illustration. I have a resource: /videos/my_videos/2-gigabyte-video.avi and I want copy it into a new resource: /videos/johns_videos/copied-2-gigabyte-video.avi How would I implement the copy, move or other file system actions the RESTful way? Or is there even a proper way? Am I doing it all wrong?

    Read the article

  • Open URL with Safari no matter what system browser is set to

    - by Mark
    In my objective-c program, I need to open a URL in Safari no matter what the system's default browser is. That means that this won't work, because it could launch Firefox or whatever other browser: NSWorkspace * ws = [NSWorkspace sharedWorkspace]; [ws openURL: url]; I think I'm close with this: [ws launchAppWithBundleIdentifier: @"com.apple.Safari" options: NSWorkspaceLaunchWithoutActivation additionalEventParamDescriptor: NULL launchIdentifier: nil]; only need to figure out how to pass in the URL as parameter... Is there an easier way? Thanks!

    Read the article

  • Capturing Mac OS X System Audio output with Python

    - by richbs
    Hello, I've been trying to "hijack" the Mac OS X system audio using PyAudio and save to a wav in python. That is, I do not want to record from an input device such as a microphone. I want to grab the sound output from any or all applications. I have followed the tutorials on the PyAudio site but these do not appear to cover my use case and when I try to read from the output stream I unsurprisingly get the paCanNotReadFromAnOutputOnlyStream exception. Fair enough! Is there a way to do what I am proposing with the PyAudio or other FOSS Python Library?

    Read the article

  • InvalidCastException: System.Web.UI.PartialCachingControl -> MyCustomControl when OutputCaching

    - by marcinn
    The problem: I am unable to use OutputCaching with my controls which derives from MyCustomControl. Controls are loaded dynamically using definitions from database with Page.LoadControl method. When I add to ascx <%@ OutputCache VaryByParam="*" Duration="3600"% the "InvalidCastException: System.Web.UI.PartialCachingControl - MyCustomControl" exception is thrown. I am unable to modify assembly witch contains dynamic loading controls logic. Is there any way to fix it in derived controls? The second question is about iis7 and native output caching - is it resolves this problem? (I tried to set up several performance counters and I saw that cache wasn't hit...)

    Read the article

  • Mistake in dispaly and insert method (double - ended queue)

    - by MANAL
    1) My problem when i make remove from right or left program will be remove true but when i call diplay method the content wrong like this I insert 12 43 65 23 and when make remove from left program will remove 12 but when call display method show like this 12 43 65 and when make remove from right program will remove 23 but when call display method show like this 12 43 Why ?????? ); and when i try to make insert after remove write this Can not insert right because the queue is full . first remove right and then u can insert right where is the problem ?? Please Help me please 2) My code FIRST CLASS class dqueue { private int fullsize; //number of all cells private int item_num; // number of busy cells only private int front,rear; public int j; private double [] dqarr; //========================================== public dqueue(int s) //constructor { fullsize = s; front = 0; rear = -1; item_num = 0; dqarr = new double[fullsize]; } //========================================== public void insert(double data) { if (rear == fullsize-1) rear = -1; rear++; dqarr[rear] = data; item_num++; } public double removeLeft() // take item from front of queue { double temp = dqarr[front++]; // get value and incr front if(front == fullsize) front = 0; item_num --; // one less item return temp; } public double removeRight() // take item from rear of queue { double temp = dqarr[rear--]; // get value and decr rear if(rear == -1) // rear = item_num -1; item_num --; // one less item return temp; } //========================================= public void display () //display items { for (int j=0;j //========================================= public int size() //number of items in queue { return item_num; } //========================================== public boolean isEmpty() // true if queue is empty { return (item_num ==0); } } SECOND CLASS import java.util.Scanner; class dqueuetest { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println(" Welcome here** "); System.out.println(" * Mind Of Programming Group*** "); System.out.println(" _________________________ "); System.out.println("enter size of your dqueue"); int size = input.nextInt(); dqueue mydq = new dqueue(size); System.out.println(""); System.out.println("enter your itemes"); //===================================== for(int i = 0;i<=size-1;i++) { System.out.printf("item %d:",i+1); double item = input.nextDouble(); mydq.insert(item); System.out.println(""); } //===================================== int queue =size ; int c = 0 ; while (c != 6) { System.out.println(""); System.out.println("**************************"); System.out.println(" MAIN MENUE"); System.out.println("1- INSERT RIGHT "); System.out.println("2- REMOVE LEFT"); System.out.println("3- REMOVE RIGHT"); System.out.println("4- DISPLAY"); System.out.println("5- SIZE"); System.out.println("6- EXIT"); System.out.println("**************************"); System.out.println("choose your operation by number(1-6)"); c = input.nextInt(); switch (c) { case 1: if (queue == size) System.out.print("Can not insert right because the queue is full . first remove right and then u can insert right "); else { System.out.print("enter your item: "); double item = input.nextDouble(); mydq.insert(item);} break; case 2: System.out.println("REMOVE FROM REAR :"); if( !mydq.isEmpty() ) { double item = mydq.removeLeft(); System.out.print(item + "\t"); } // end while System.out.println(""); mydq.display(); break; case 3: System.out.println("REMOVE FROM FRONT :"); if( !mydq.isEmpty() ) { double item = mydq.removeRight(); System.out.print(item + "\t"); } // end while System.out.println(""); mydq.display(); break; case 4: System.out.println("The items in Queue are :"); mydq.display(); break; case 5: System.out.println("The Size of the Queue is :"+mydq.size()); break; case 6: System.out.println("Good Bye"); break; default: System.out.println("wrong chiose enter again"); } //end switch } //end while } // end main }//end class

    Read the article

  • Adding a comment system to my website

    - by MJ93
    Hey everyone, I'm trying to add some type of comment system to my website for the news that I post on the main page. What I would like it to do is have anybody comment on it (they don't need to login). The comment submission form just required a Name and comment. What would be the simplest way to do this? It would also be nice to have it display how many comments there currently are on the news post. I dont need anything fancy. Thanks!

    Read the article

  • Changing CCK content-types details results in numerous DB calls for the menu system

    - by Paul Strugger
    Every time I make a change in the details of a content-type it takes too long. I though it had to do with the fact that I had too many content-types and fields (~500), but when I load the devel module to see the queries that take that long I see: Executed 32212 queries in 12267.57 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 55763.32 ms When I see the details I notice that the vast majority of db calls come from the menu system, e.g.: _menu_route menu_local_tasks admin_menu_link_save Why is that? Can I avoid some of these? It doesn't seem logical!

    Read the article

  • Community based translating system

    - by mike
    Since we don't funds to hire translators for getting multiple languages translated we want the community to do the translation for us. Its a social network. I can't find any good open souce framework to auto do this. Thinking something like: User selects a language, system displays random sentences and user will translate it. Then other users can vote on how good it is. If it's 100 votes + with 95% yes then it becomes official. Site is in PHP. Any ideas?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >