Search Results

Search found 1507 results on 61 pages for 'spaces'.

Page 23/61 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • CMYK + CMYK = ? CMYK / 2 = ?

    - by Pete
    Suppose there are two colors defined in CMYK: color1 = 30, 40, 50, 60 color2 = 50, 60, 70, 80 If they were to be printed what values would the resulting color have? color_new = min(cyan1 + cyan2, 100), min(magenta1 + magenta2, 100), min(yellow1 + yellow2, 100), min(black1 + black2, 100)? Suppose there is a color defined in CMYK: color = 40, 30, 30, 100 It is possible to print a color at partial intensity, i.e. as a tint. What values would have a 50% tint of that color? color_new = cyan / 2, magenta / 2, yellow / 2, black / 2? I'm asking this to better understand the "tintTransform" function in PDF Reference 1.7, 4.5.5 Special Color Spaces, DeviceN Color Spaces Update: To better clarify: I'm not entirely concerned with human perception or how the CMYK dyies react to the paper. If someone specifies 90% tint which, when printed, looks like full intensity colorant, that's ok. In other words, if I asking how to compute 50% of cmyk(40, 30, 30, 100) I'm asking how to compute the new values, regardless of whether the result looks half-dark or not. Update 2: I'm confused now. I checked this in InDesign and Acrobat. For example Pantone 3005 has CMYK 100, 34, 0, 2, and its 25% tint has CMYK 25, 8.5, 0, 0.5. Does it mean I can "monkey around in a linear way"?

    Read the article

  • confusing fork system call

    - by benjamin button
    Hi, i was just checking the behaviour of fork system call and i found it very confusing. i saw in a website that Unix will make an exact copy of the parent's address space and give it to the child. Therefore, the parent and child processes have separate address spaces #include <stdio.h> #include <sys/types.h> int main(void) { pid_t pid; char y='Y'; char *ptr; ptr=&y; pid = fork(); if (pid == 0) { y='Z'; printf(" *** Child process ***\n"); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); sleep(5); } else { sleep(5); printf("\n ***parent process ***\n",&y); printf(" Address is %p\n",ptr); printf(" char value is %c\n",y); } } the output of the above program is : *** Child process *** Address is 69002894 char value is Z ***parent process *** Address is 69002894 char value is Y so from the above mentioned statement it seems that child and parent have separet address spaces.this is the reason why char value is printed separately and why am i seeing the address of the variable as same in both child and parent processes.? Please help me understand this!

    Read the article

  • OO vs Simplicity when it comes to user interaction

    - by Oetzi
    Firstly, sorry if this question is rather vague but it's something I'd really like an answer to. As a project over summer while I have some downtime from Uni I am going to build a monopoly game. This question is more about the general idea of the problem however, rather than the specific task I'm trying to carry out. I decided to build this with a bottom up approach, creating just movement around a forty space board and then moving on to interaction with spaces. I realised that I was quite unsure of the best way of proceeding with this and I am torn between two design ideas: Giving every space its own object, all sub-classes of a Space object so the interaction can be defined by the space object itself. I could do this by implementing different land() methods for each type of space. Only giving the Properties and Utilities (as each property has unique features) objects and creating methods for dealing with the buying/renting etc in the main class of the program (or Board as I'm calling it). Spaces like go and super tax could be implemented by a small set of conditionals checking to see if player is on a special space. Option 1 is obviously the OO (and I feel the correct) way of doing things but I'd like to only have to handle user interaction from the programs main class. In other words, I don't want the space objects to be interacting with the player. Why? Errr. A lot of the coding I've done thus far has had this simplicity but I'm not sure if this is a pipe dream or not for larger projects. Should I really be handling user interaction in an entirely separate class? As you can see I am quite confused about this situation. Is there some way round this? And, does anyone have any advice on practical OO design that could help in general?

    Read the article

  • Rails - strip xml import from whitespace and line break

    - by val_to_many
    Hey folks, I am stuck with something quite simple but really annoying: I have an xml file with one node, where the content includes line breaks and whitspaces. Sadly I can't change the xml. <?xml version="1.0" encoding="utf-8" ?> <ProductFeed> ACME Ltd. Fooproduct Foo Root :: Bar Category I get to the node and can read from it without trouble: url = "http://feeds.somefeed/feed.xml.gz" @source = open((url), :http_basic_authentication=>["USER", "PW"]) @gz = Zlib::GzipReader.new(@source) @result = @gz.read @doc = Nokogiri::XML(@result) @doc.xpath("/ProductFeed/Vendors/Vendor").each do |manuf| vendor = manuf.css("Name").first.text manuf.xpath("//child::Product").each do |product| product_name = product.css("Name").text foocat = product.css("Category").text puts "#{vendor} ---- #{product_name} ---- #{foocat} " end end This results in: ACME Ltd. ---- Fooproduct ---- Foo Root :: Bar Category Obviously there are line breaks and tab stops or spaces in the string returned by product.css("Category").text. Does anyone know how to strip the result from linebreaks and taps or spaces right here? Alternatively I could do that in the next step, where I do a find on 'foocat' like barcat = Category.find_by_foocat(foocat) Thanks for helping! Val

    Read the article

  • Segmentation in Linux : Segmentation & Paging are redundant?

    - by claws
    Hello, I'm reading "Understanding Linux Kernel". This is the snippet that explains how Linux uses Segmentation which I didn't understand. Segmentation has been included in 80 x 86 microprocessors to encourage programmers to split their applications into logically related entities, such as subroutines or global and local data areas. However, Linux uses segmentation in a very limited way. In fact, segmentation and paging are somewhat redundant, because both can be used to separate the physical address spaces of processes: segmentation can assign a different linear address space to each process, while paging can map the same linear address space into different physical address spaces. Linux prefers paging to segmentation for the following reasons: Memory management is simpler when all processes use the same segment register values that is, when they share the same set of linear addresses. One of the design objectives of Linux is portability to a wide range of architectures; RISC architectures in particular have limited support for segmentation. All Linux processes running in User Mode use the same pair of segments to address instructions and data. These segments are called user code segment and user data segment , respectively. Similarly, all Linux processes running in Kernel Mode use the same pair of segments to address instructions and data: they are called kernel code segment and kernel data segment , respectively. Table 2-3 shows the values of the Segment Descriptor fields for these four crucial segments. I'm unable to understand 1st and last paragraph.

    Read the article

  • Varchar columns: Nullable or not.

    - by NYSystemsAnalyst
    The database development standards in our organization state the varchar fields should not allow null values. They should have a default value of an empty string (""). I know this makes querying and concatenation easier, but today, one of my coworkers questioned me about why that standard only existed for varchar types an not other datatypes (int, datetime, etc). I would like to know if others consider this to be a valid, defensible standard, or if varchar should be treated the same as fields of other data types? I believe this standard is valid for the following reason: I believe that an empty string and null values, though technically different, are conceptually the same. An empty, zero length string is a string that does not exist. It has no value. However, a numeric value of 0 is not the same as NULL. For example, if a field called OutstandingBalance has a value of 0, it means there are $0.00 remaining. However, if the same field is NULL, that means the value is unknown. On the other hand, a field called CustomerName with a value of "" is basically the same as a value of NULL because both represent the non-existence of the name. I read somewhere that an analogy for an empty string vs. NULL is that of a blank CD vs. no CD. However, I believe this to be a false analogy because a blank CD still phyically exists and still has physical data space that does not have any meaningful data written to it. Basically, I believe a blank CD is the equivalent of a string of blank spaces (" "), not an empty string. Therefore, I believe a string of blank spaces to be an actual value separate from NULL, but an empty string to be the absense of value conceptually equivalent to NULL. Please let me know if my beliefs regarding variable length strings are valid, or please enlighten me if they are not. I have read several blogs / arguments regarding this subject, but still do not see a true conceptual difference between NULLs and empty strings.

    Read the article

  • Escape whitespace in paths using nautilus script

    - by Tommy Brunn
    I didn't think this would be as tricky as it turned out to be, but here I am. I'm trying to write a Nautilus script in Python to upload one or more images to Imgur just by selecting and right clicking them. It works well enough with both single images and multiple images - as long as they don't contain any whitespace. In fact, you can upload a single image containing whitespace, just not multiple ones. The problem is that NAUTILUS_SCRIPT_SELECTED_FILE_PATHS returns all the selected files and directories as a space separated string. So for example, it could look like this: print os.environment['NAUTILUS_SCRIPT_SELECTED_FILE_PATHS'] /home/nevon/Desktop/test image.png /home/nevon/Desktop/test.jpg What I need is a way to -either in bash or Python- escape the spaces in the path - but not the spaces that delimit different items. Either that, or a way to put quotation marks around each item. The ultimate solution would be if I could do that in bash and then send the items as separate arguments to my python script. Something like: python uploader.py /home/nevon/Desktop/test\ image.png /home/nevon/Desktop/test.jpg I've tried RTFM'ing, but there doesn't seem to be a lot of good solutions for this. At least not that I've found. Any ideas?

    Read the article

  • VC++ 6 and MS Speech SDK 5.1 fatal error C1083: Cannot open source file: 'files\microsoft': No such

    - by eg123
    Trying to compile an application (flite synthesis sapi) on vc++6. This requires Microsoft Speech SDK 5.1 Have included C:\Program Files\Microsoft Speech SDK 5.1\IDL C:\Program Files\Microsoft Speech SDK 5.1\include using Toolsoptionsdirectories and also on another attempt via ProjectSettings Repeatedly get this error microsoft fatal error C1083: Cannot open source file: 'files\microsoft': No such file or directory speech fatal error C1083: Cannot open source file: 'speech': No such file or directory sdk fatal error C1083: Cannot open source file: 'sdk': No such file or directory idl fatal error C1083: Cannot open source file: '5.1\idl': No such file or directory FliteCMUKalDiphone.idl Thought it may be spaces related so included full path in quotes in relevant .h files. No joy Installed Microsoft Speech SDK 5.1 on another machine in same folder as flite and renamed to mssdk51 (so no spaces in pathname) but same error came up. Tried pasting in contents of each .idl called in file where glitch seems to generate Still same message. I am new to C++ and programming in general. My only guess is that something in the speech sdk is calling the .idl file and I can't find where from. Of course this is probably way wrong!

    Read the article

  • Span with white-space style in IE (7) applied _past_ end of span

    - by WaldenL
    We've got an application where users can enter "notes" into a rich edit control (Telerik's RedEditor, but that doesn't matter here). We had a user enter notes from w/in Safari that had a <span></span> in the middle of the note, and that span had a style on it specifying white-space:pre The HTML of the note was in the form of: <div> This is a note <span class="Apple-tab-span" style="white-space: pre; "> </span> and here's more of the note. </div> Simple enough, the style should apply to the span, and the span had 4 spaces in it. There should have been 4 spaces in the resulting output. Here's the problem. IE seems to apply that white-space: pre; style not only to the span, but to the enclosing div! Therefore, this long line that should have wrapped since it's not in the span, now pushed the document out until the line fits on the page. What am I missing. I know IE has problems, but this doesn't seem right, even for IE. So, the question(s): 1) Am I correct that the white-space attribute should only have applied to the span? 2) Can this be resolved somehow? Remember, I'm not in control of the content being entered. And it's entered from a mac w/Safari and being viewed in IE. Edit: The doctype on the page in question is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Read the article

  • Read char from txt file in C++

    - by Jack in the Box
    I have a program that will read the number of rows and columns from a txt file. Also, the program has to read the contents of a 2D array from the same file. Here is the txt file 8 20 * * *** *** 8 and 20 are the number of rows and columns respectively. The spaces and asterisks are the contents of the array, Array[8][20] For example, Array[0][1] = '*' I did make the program reading 8 and 20 as follow: ifstream myFile; myFile.open("life.txt"); if(!myFile) { cout << endl << "Failed to open file"; return 1; } myFile >> rows >> cols; myFile.close(); grid = new char*[rows]; for (int i = 0; i < rows; i++) { grid[i] = new char[cols]; } Now, how to assign the spaces and the asterisks to to the fields in the array? I hope you got the point.

    Read the article

  • Need some ideas on how to acomplish this in Java (parsing strings)

    - by Matt
    Sorry I couldn't think of a better title, but thanks for reading! My ultimate goal is to read a .java file, parse it, and pull out every identifier. Then store them all in a list. Two preconditions are there are no comments in the file, and all identifiers are composed of letters only. Right now I can read the file, parse it by spaces, and store everything in a list. If anything in the list is a java reserved word, it is removed. Also, I remove any loose symbols that are not attached to anything (brackets and arithmetic symbols). Now I am left with a bunch of weird strings, but at least they have no spaces in them. I know I am going to have to re-parse everything with a . delimiter in order to pull out identifiers like System.out.print, but what about strings like this example: Logger.getLogger(MyHash.class.getName()).log(Level.SEVERE, After re-parsing by . I will be left with more crazy strings like: getLogger(MyHash getName()) log(Level SEVERE, How am I going to be able to pull out all the identifiers while leaving out all the trash? Just keep re-parsing by every symbol that could exist in java code? That seems rather lame and time consuming. I am not even sure if it would work completely. So, can you suggest a better way of doing this?

    Read the article

  • Basic formatting. sed, or cut, or what?

    - by dsclough
    Very new to this whole Unix thing. I'm currently using korn shell to try and format some lines of text. My input has a couple of lines that look something like this Date/Time :- Monday June 03 00:00:00 EDT 2013 Host Name :- HostNameHere PIDS :- NumbersNLetters Product Name :- ProductName The desired output would be as follows: Date/Time="Monday June 03 00:00:00 EDT 2013" HostName="HostNameHere" PIDS="NumbersNLetters" ProductName="ProductName" So, I need to get rid of any spaces in the leftmost column, and throw everything in the rightmost column between quotations. I've looked at the cut command, and got this far: Cut -f 1,2 -d - Which might produce a result like Date/Time:Monday June 03 00:00:00 EDT 2013, which is close to what I want, but not quite. I wasn't sure if cut could let me add parentheses, and it doesn't look like I can remove spaces that way either. sed seems like it might be closer to the answer, but I wasn't able to find through googling how I might just look for any pattern and not a specific one. I apologize for the incredibly basic question, but reading documentation only gets you so far before your brain starts to ache... If there are any better resources I should be looking at I would be happy to get pointed in the right direction. Thanks!

    Read the article

  • accessing values in two dimensional arrays

    - by BrainLikeADullPencil
    In some code I'm trying to learn from, the Maze string below is turned into an array (code not shown for that) and saved in the instance variable @maze. The starting point of the Maze is represented by the letter 'A' in that Maze, which can be accessed at @maze[1][13]---row 1, column 13. However, the code I'm looking at uses @maze[1][13,1] to get the A, which you can see returns the same result in my console. If I do @maze[1][13,2], it returns the letter "A " with two blank spaces next to it, and so on. [13,3] returns "A " with three blank spaces. Does the 2 in [13,2] mean, "return two values starting at [1][13]? If so, why? Is this some feature of arrays or two dimensional arrays that I don't get? [20] pry(#<Maze>):1> @maze[1][13] => "A" [17] pry(#<Maze>):1> @maze[1][13,1] => "A" [18] pry(#<Maze>):1> @maze[1][13,2] => "A " [19] pry(#<Maze>):1> @maze[1][13,3] => "A " Maze String MAZE1 = %{##################################### # # # #A # # # # # # # # # ####### # ### # ####### # # # # # # # # # # # ##### # ################# # ####### # # # # # # # # # ##### ##### ### ### # ### # # # # # # # # # # # # B# # # # # # # # ##### ##### # # ### # # ####### # # # # # # # # # # # # # # ### ### # # # # ##### # # # ##### # # # # # # # # #####################################}

    Read the article

  • Mysterious combination

    - by pstone
    I decided to learn concurrency and wanted to find out in how many ways instructions from two different processes could overlap. The code for both processes is just a 10 iteration loop with 3 instructions performed in each iteration. I figured out the problem consisted of leaving X instructions fixed at a point and then fit the other X instructions from the other process between the spaces taking into account that they must be ordered (instruction 4 of process B must always come before instruction 20). I wrote a program to count this number, looking at the results I found out that the solution is n Combination k, where k is the number of instructions executed throughout the whole loop of one process, so for 10 iterations it would be 30, and n is k*2 (2 processes). In other words, n number of objects with n/2 fixed and having to fit n/2 among the spaces without the latter n/2 losing their order. Ok problem solved. No, not really. I have no idea why this is, I understand that the definition of a combination is, in how many ways can you take k elements from a group of n such that all the groups are different but the order in which you take the elements doesn't matter. In this case we have n elements and we are actually taking them all, because all the instructions are executed ( n C n). If one explains it by saying that there are 2k blue (A) and red (B) objects in a bag and you take k objects from the bag, you are still only taking k instructions when 2k instructions are actually executed. Can you please shed some light into this? Thanks in advance.

    Read the article

  • Need Multiple Sudoku Solutions

    - by user1567909
    I'm trying to output multiple sudoku solutions in my program. For example, when You enter this as input: 8..6..9.5.............2.31...7318.6.24.....73...........279.1..5...8..36..3...... .'s denote blank spaces. Numbers represent already-filled spaces. The output should be a sudoku solution like so: 814637925325149687796825314957318462241956873638274591462793158579481236183562749 However, I want to output multiple solutions. This would be all the solutions that should be printed: 814637925325149687796825314957318462241956873638274591462793158579481236183562749 814637925325941687796825314957318462241569873638472591462793158579184236183256749 834671925125839647796425318957318462241956873368247591682793154579184236413562789 834671925125839647796524318957318462241956873368247591682793154519482736473165289 834671925125839647796524318957318462241965873368247591682793154519482736473156289 But my program only prints out one solution. Below is my recursive solution to solving a sudoku solution bool sodoku::testTheNumber(sodoku *arr[9][9], int row, int column) { if(column == 9) { column = 0; row++; if(row == 9) return true; } if(arr[row][column]->number != 0) { return testTheNumber(arr, row, column+1); } for(int k = 1; k < 10; k++) { if(k == 10) { arr[row][column]->number = 0; return false; } if(rowIsValid(arr, k, row) && columnIsValid(arr, k, column) && boxIsValid(arr, k, row, column)) { arr[row][column]->number = k; if(testTheNumber(arr, row, column+1)==true) { return true; } arr[row][column]->number = 0; } } return false; } Could anyone help me come up with a way to print out multiple solutions? Thanks.

    Read the article

  • replacing space with %20

    - by Codenotguru
    The following program replaces all spaces with %20.the compilation works fine but the program terminates during the runtime.Any help??? #include<iostream> #include<string> using namespace std; void removeSpaces(string url){ int len=url.length(); int i,count=0; while(i<=len){ if(url[i]==' ') count++; i++; } int length2=len+(count*2); string newarr[length2]; for(int j=len-1;j>=0;j--){ if(url[j]==' ') { newarr[length2-1]='0'; newarr[length2-2]='2'; newarr[length2-3]='%'; length2=length2-3; } else { newarr[length2-1]=url[j]; length2=length2-1; } } cout<<"\nThe number of spaces in the url is:"<<count; cout<<"\nThe replaced url is:"<<newarr; } int main(){ string url="http://www.ya h o o.com/"; removeSpaces(url); }

    Read the article

  • Delete until previous punctuation mark in Bash

    - by hekevintran
    In Bash, Ctrl + W will erase the last word. Bash considers words to be delimited by spaces. This means that if the cursor is at the end of the string "cd /dir1/dir2/dir3" and you hit Ctrl + W you will be left with "cd ". Is there a Bash shortcut (custom defined is okay) that will leave me with "cd /dir1/dir2/"?

    Read the article

  • Unicode paragraph end/line break breaking space / non breaking space aware text editor

    - by martinr
    I want one of those to write my blog articles with. I'm tired of manually converting breaks from rough notes to either paragraphs or line breaks for release as HTML, and tired of converting spaces to breaking or non-breaking ones. There are standard Unicode code points for the difference - what editor lets me use almost plain ASCII text but with builtin support and understanding for Unicode paragraph and non-breaking space characters? And ideally will let me save straight to either plain text UTF8 or to a file of plain HTML paragraphs?

    Read the article

  • Unicode paragraph end/line break breaking space / non breaking space aware text editor

    - by martinr
    I want one of those to write my blog articles with. I'm tired of manually converting breaks from rough notes to either paragraphs or line breaks for release as HTML, and tired of converting spaces to breaking or non-breaking ones. There are standard Unicode code points for the difference - what editor lets me use almost plain ASCII text but with builtin support and understanding for Unicode paragraph and non-breaking space characters? And ideally will let me save straight to either plain text UTF8 or to a file of plain HTML paragraphs?

    Read the article

  • Importing tab based outline txt file into Word outline

    - by Bernard Vander Beken
    Given a text file containing and outline with tabs to indent each level, I would like to import this into a Word 2007 document so that the each indentation level is converted to a H1, H2, etc heading level. I tried copy pasting the text into the outline view and opening the text file via File, Open. Both did not give the expected result. Level 1 Level 2 Level 3 Level 1 Level 2 Note: I am using spaces instead of tabs to indent this sample.

    Read the article

  • Merging free space of hard drive to primary partition

    - by Dibya Ranjan
    I have purchased a new HDD, I tried to format making 1 primary partition, I converted the rest unallocated space to extended partition then to logical drive now I have 3 logical drives. I feel that the size allocated to the primary partition is less so I used shrink option to the 3 logical partitions in diskmgmt but each partition is resulting in one memory block of Free space. Now I want to merge these free spaces to my primary partition.

    Read the article

  • Modify Sublime Text 2 whitespace representation?

    - by Mike Grace
    Is there a way to modify the whitespace representation characters so I can change it from dots and dashes to something else? Because I currently have whitespace characters being drawn always, it looks like this. I don't need it turned off, just interested in changing how it's represented. I like how TextMate shows invisible characters but I would be ok with just being able to change the spaces to show a blank space instead of a dot.

    Read the article

  • OS X Enclosing folder shortcut?

    - by Nano8Blazex
    This may have been asked before, but I'm wondering whether there is a shortcut for navigating to the enclosing folder in OS X (Snow Leopard)? I find navigating Finder particularly frustrating since it's hard navigating back to the enclosing folder (especially when you jump to a folder and realize the back button is disabled)... I'm hoping for something other than Command+Up, since that's the key combination I use to navigate Spaces.

    Read the article

  • How to backup a folder and it's subfolders to CD/DVD

    - by Maximus
    If I've got a folder structure that I'd like to split so that it could be burned to multiple CDs or DVDs, what's the best tool out there to accomplish this? The folders/files have to be natively accessible once the split is done (no compression or physical splitting that would require a later join), and the folder structure should still remain intact as it spaces discs. Any ideas?

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >