Daily Archives

Articles indexed Sunday March 21 2010

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

  • Display custom file format's metadata in Windows Explorer

    - by Benny Jobigan
    When viewing a jpg or mp3 in Windows Explorer, the bottom pane shows metadata from the media file. Furthermore, for video and picture, the icon is shown as a preview of the media. Is there a way to add this kind of functionality to windows for custom file types that aren't supported by default in windows? Is there a certain sort of plugin or extension that must be written? If so, how is it implemented? Thank you.

    Read the article

  • C++ sort array of char pointers

    - by user69514
    Can you tell me what's wrong with my method? I ends up putting the same thing everywhre and it's actually not sorting. void sortArrays(){ int i, j; for(i=0; i<counter; i++){ for( j=0; j<i; j++){ if( strcmp(title_arr[i], title_arr[j]) < 0){ char* title_temp = title_arr[i]; title_arr[j] = title_temp; } } }

    Read the article

  • NSString to NSData Failing in Encoding

    - by Travis
    I'm trying to use NSXmlParser to parse ISO-8859-1 data. Using Apple's own example for parsing ISO-8859-1, I have the following. NSString *xmlFilePath = [[NSBundle mainBundle] pathForResource:sampleFileName ofType:@"xml"]; NSString *xmlFileContents = [NSString stringWithContentsOfFile:xmlFilePath encoding:NSISOLatin1StringEncoding error:nil]; NSLog(@"contents: %@", xmlFileContents); I see that in the console, the contents of the string is accurate. However when I try to convert it to an NSData object (for use with the parser), I do the following. NSData *xmlData = [xmlFileContents dataUsingEncoding:NSISOLatin1StringEncoding]; But then when my didStartElement delegate gets called, I see  showing up which I think is from an encoding discrepancy. Can NSXmlParser handle ISO-8859-1 and if so, what am I doing wrong?

    Read the article

  • rspec install failed

    - by chenge2k
    screen: E:\ir\InstantRails\rails_appsgem install rspec Attempting local installation of 'rspec' Local gem file not found: rspec*.gem Attempting remote installation of 'rspec' ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rspec ( 0) in the repository my env: InstantRails 1.3a on windows thanks for help!

    Read the article

  • 7 Tips to Avoid Fatal Results in Search Engine Optimization Process

    Most companies whether big or small rely on the search engine marketing techniques for making the site more popular and definitely more search-engine friendly. You have to understand that there will be a lot of companies which will offer their SEO techniques. But you need to be extra cautious when you choose the company. Check out the 7 tips which should be followed if you want to avoid fatal mistakes.

    Read the article

  • 5 Common Mistakes Made by Search Engine Optimization Companies

    Search engine optimization process or SEO is used for making the website search-friendly. The websites are made friendly not only for the search-engines, but also for those who search for products and services with the help of search-engines. There are 5 common mistakes which people make while optimizing the site. You should be aware that these mistakes can affect your ranking in the SE.

    Read the article

  • Count # of links programmatically

    - by Duber
    You know how if you type links: "yourwebsite.com" into the normal google search box, it tells you the number of sites linking to you and their addresses. How can I do it programmatically with php? Does google provide an api that can I can programmatically query? What are my options?

    Read the article

  • How to handle relative paths in ASP.NET MVC?

    - by AngryHacker
    I have a master page which references a style in the following manner: <link rel="stylesheet" type="text/css" href="../../Content/Style.css" /> All my pages inherit from this master page. And this works well when the URL is http://www.domain.com/home/details/5, however the URL is http://www.domain.com/home/create, then, of course, Style.css cannot be found because `../../Content/Style.css' resolves to a directory one higher where there is nothing there. How is this typically handled?

    Read the article

  • Eclipse CDT on Snow Leopard cannot find binaries

    - by ejel
    After upgraded to Snow Leopard, I can no longer run Eclipse CDT project on my computer. While the build process completes without any error, Eclipse does not recognize the binary file it created. When try to point to the binary file in Run Configuration.. dialog, it cannot find any binary in the project. Though executing the file from Terminal works fine. According to a post at on Eclipse forum, this might be a problem that Mach-O parser does not recognize 64-bit binaries. Does anyone know what are the solutions or workarounds to the problem so that I can run/debug my C++ projects on Snow Leopard. UPDATED The solution suggested by Shane, though allowing the binary created to be recognized, does introduce another problem. Since system libraries in Snow Leopard are all 64 bits, it is no longer possible to link the code created with -arch i386 with these libraries, and hence not a feasible solution yet.

    Read the article

  • storing/retrieving data for graph with long continuous stretches

    - by james
    i have a large 2-dimensional data set which i would like to graph. the graph is displayed in a browser and the data is retrieved via ajax. long stretches of this graph will be continuous - e.g., for x=0 through x=1000, y=9, then for x=1001 through x=1100, y=80, etc. the approach i'm considering is to send (from the server) and store (in the browser) only the points where the data changes. so for the example above, i would say data[0] = 9, then data[1001] = 80. then given x=999 for example, retrieving data[999] would actually look up data[0]. the problem that arises is finding a dictionary-like data structure which behaves like this. the approach i'm considering is to store the data in a traditional dictionary object, then also maintain a sorted array of key for that object. when given x=999, it would look at the mid-point of this array, determine whether the nearest lower key is left or right of that midpoint, then repeat with the correct subsection, etc.. does anyone have thoughts on this problem/approach?

    Read the article

  • How do you embed XHTML into APT file when using Maven to generate a site?

    - by Clinton
    I am using maven to generate a website for a Java project, which uses APT "Almost Plain Text" as a wiki like markup. Maven takes this and turns it into XHTML. I already have a custom template/skin that I am using for the site, but the index page will have a couple of extra custom design elements that are beyond the capabilities of APT. So how can you add xhtml to the apt file so that it gets correctly embedded in the final output? Thanks.

    Read the article

  • What power do I have over my license?

    - by DavidG
    Say for example, I've written some code under GPL 3. My company wants to use that code for a commercial product. Am I allowed to then say to them that they can use it under LGPL/MIT or any other license? If so, would I then have to change the included header at the top of each file? If so, what is stopping someone else from changing the license on my code?

    Read the article

  • a pdf reader - please guide - a step by step guidence - reference to guidence-

    - by user287745
    have to make a hardware project using micro controller, memory, screens, etc. is it possible to make an independent .dpf / documents reader, which is capable of running on battery power.? please note dont want to use any technology which needs licensing all free wares readers etc and programing say assembly and c or flash or any. please help, have submitted proposal of pdf reader project (independent hardware), many say its impossible, wht should i do??

    Read the article

  • Sharing Bandwidth and Prioritizing Realtime Traffic via HTB, Which Scenario Works Better?

    - by Mecki
    I would like to add some kind of traffic management to our Internet line. After reading a lot of documentation, I think HFSC is too complicated for me (I don't understand all the curves stuff, I'm afraid I will never get it right), CBQ is not recommend, and basically HTB is the way to go for most people. Our internal network has three "segments" and I'd like to share bandwidth more or less equally between those (at least in the beginning). Further I must prioritize traffic according to at least three kinds of traffic (realtime traffic, standard traffic, and bulk traffic). The bandwidth sharing is not as important as the fact that realtime traffic should always be treated as premium traffic whenever possible, but of course no other traffic class may starve either. The question is, what makes more sense and also guarantees better realtime throughput: Creating one class per segment, each having the same rate (priority doesn't matter for classes that are no leaves according to HTB developer) and each of these classes has three sub-classes (leaves) for the 3 priority levels (with different priorities and different rates). Having one class per priority level on top, each having a different rate (again priority won't matter) and each having 3 sub-classes, one per segment, whereas all 3 in the realtime class have highest prio, lowest prio in the bulk class, and so on. I'll try to make this more clear with the following ASCII art image: Case 1: root --+--> Segment A | +--> High Prio | +--> Normal Prio | +--> Low Prio | +--> Segment B | +--> High Prio | +--> Normal Prio | +--> Low Prio | +--> Segment C +--> High Prio +--> Normal Prio +--> Low Prio Case 2: root --+--> High Prio | +--> Segment A | +--> Segment B | +--> Segment C | +--> Normal Prio | +--> Segment A | +--> Segment B | +--> Segment C | +--> Low Prio +--> Segment A +--> Segment B +--> Segment C Case 1 Seems like the way most people would do it, but unless I don't read the HTB implementation details correctly, Case 2 may offer better prioritizing. The HTB manual says, that if a class has hit its rate, it may borrow from its parent and when borrowing, classes with higher priority always get bandwidth offered first. However, it also says that classes having bandwidth available on a lower tree-level are always preferred to those on a higher tree level, regardless of priority. Let's assume the following situation: Segment C is not sending any traffic. Segment A is only sending realtime traffic, as fast as it can (enough to saturate the link alone) and Segment B is only sending bulk traffic, as fast as it can (again, enough to saturate the full link alone). What will happen? Case 1: Segment A-High Prio and Segment B-Low Prio both have packets to send, since A-High Prio has the higher priority, it will always be scheduled first, till it hits its rate. Now it tries to borrow from Segment A, but since Segment A is on a higher level and Segment B-Low Prio has not yet hit its rate, this class is now served first, till it also hits the rate and wants to borrow from Segment B. Once both have hit their rates, both are on the same level again and now Segment A-High Prio is going to win again, until it hits the rate of Segment A. Now it tries to borrow from root (which has plenty of traffic spare, as Segment C is not using any of its guaranteed traffic), but again, it has to wait for Segment B-Low Prio to also reach the root level. Once that happens, priority is taken into account again and this time Segment A-High Prio will get all the bandwidth left over from Segment C. Case 2: High Prio-Segment A and Low Prio-Segment B both have packets to send, again High Prio-Segment A is going to win as it has the higher priority. Once it hits its rate, it tries to borrow from High Prio, which has bandwidth spare, but being on a higher level, it has to wait for Low Prio-Segment B again to also hit its rate. Once both have hit their rate and both have to borrow, High Prio-Segment A will win again until it hits the rate of the High Prio class. Once that happens, it tries to borrow from root, which has again plenty of bandwidth left (all bandwidth of Normal Prio is unused at the moment), but it has to wait again until Low Prio-Segment B hits the rate limit of the Low Prio class and also tries to borrow from root. Finally both classes try to borrow from root, priority is taken into account, and High Prio-Segment A gets all bandwidth root has left over. Both cases seem sub-optimal, as either way realtime traffic sometimes has to wait for bulk traffic, even though there is plenty of bandwidth left it could borrow. However, in case 2 it seems like the realtime traffic has to wait less than in case 1, since it only has to wait till the bulk traffic rate is hit, which is most likely less than the rate of a whole segment (and in case 1 that is the rate it has to wait for). Or am I totally wrong here? I thought about even simpler setups, using a priority qdisc. But priority queues have the big problem that they cause starvation if they are not somehow limited. Starvation is not acceptable. Of course one can put a TBF (Token Bucket Filter) into each priority class to limit the rate and thus avoid starvation, but when doing so, a single priority class cannot saturate the link on its own any longer, even if all other priority classes are empty, the TBF will prevent that from happening. And this is also sub-optimal, since why wouldn't a class get 100% of the line's bandwidth if no other class needs any of it at the moment? Any comments or ideas regarding this setup? It seems so hard to do using standard tc qdiscs. As a programmer it was such an easy task if I could simply write my own scheduler (which I'm not allowed to do).

    Read the article

  • Windows 7: blue faces in VLC... sometimes

    - by Mala
    Hi There are a bunch of forum posts about this issue from the last several years but no resolution that I could find. I have the newest VLC installed on Windows 7 with the newest nvidia drivers. Suddenly, VLC plays some videos in such a way as faces are blue. When viewed in another media player, or when looking at the thumbnails, this is not an issue. Other videos are not affected. I've tried resetting VLC options, deleting the VLC folder in the AppData area, etc. I have no other color issues. Does anyone have a fix?

    Read the article

  • Operator overloading in C++

    - by user265260
    If you overload - like operator-(), it is to be used to the left of the object, however overloading () like operator()() it is used to the right of the object. How do we know which operator is to be used on the left and which ones to be used on the right?

    Read the article

  • django app with a generic name

    - by zaharpopov
    Django tutorials everywhere use constant-set application name all around - in urls file, in HTML templates, in views. But if I want to distribute an application and let the user sets it name (i.e. its URL postfix on http://server.com/appname) - how can I do? I must have some common name setting then in configuration, but how to work it for template files, etc?

    Read the article

  • Bubble sort algorithm implementations (Haskell vs. C)

    - by kingping
    Hello. I have written 2 implementation of bubble sort algorithm in C and Haskell. Haskell implementation: module Main where main = do contents <- readFile "./data" print "Data loaded. Sorting.." let newcontents = bubblesort contents writeFile "./data_new_ghc" newcontents print "Sorting done" bubblesort list = sort list [] False rev = reverse -- separated. To see rev2 = reverse -- who calls the routine sort (x1:x2:xs) acc _ | x1 > x2 = sort (x1:xs) (x2:acc) True sort (x1:xs) acc flag = sort xs (x1:acc) flag sort [] acc True = sort (rev acc) [] False sort _ acc _ = rev2 acc I've compared these two implementations having run both on file with size of 20 KiB. C implementation took about a second, Haskell — about 1 min 10 sec. I have also profiled the Haskell application: Compile for profiling: C:\Temp ghc -prof -auto-all -O --make Main Profile: C:\Temp Main.exe +RTS -p and got these results. This is a pseudocode of the algorithm: procedure bubbleSort( A : list of sortable items ) defined as: do swapped := false for each i in 0 to length(A) - 2 inclusive do: if A[i] > A[i+1] then swap( A[i], A[i+1] ) swapped := true end if end for while swapped end procedure I wonder if it's possible to make Haskell implementation work faster without changing the algorithm (there's are actually a few tricks to make it work faster, but neither implementations have these optimizations)

    Read the article

  • Can i get the particular disk space(like C: ) using Jav program..?

    - by Venkats
    I used SystemEnvironment class in java for getting system information. In that i can get only RAM size, i can't get the specific disk space like c: and D: code is, com.sun.management.OperatingSystemMXBean mxbean = (com.sun.management.OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean(); System.out.println("Total RAM:"+mxbean.getTotalSwapSpaceSize()/(1024*1024*1024)+""+"GB"); Can i get this using in java program?

    Read the article

  • deleting registry key, using visual stusdio 2008 setup and deployment project in windows 7

    - by Isuru
    Hi, I have created a setup and deployment project in visual studio 2008 pro. using visual C++, and in it I have two exe files which run under custom actions. One is running in commit and other in uninstall. Purpose is to add a registry key at install time and remove it at uninstall. It works perfectly on Windows XP but when I change to Windows 7 and run the setup, only the key-adding part works. The key doesn't get deleted at uninstall. But when I take the uninstall exe file out from the setup and run it separately on Windows 7, (not through the setup, by just double-clicking on the exe) it removes the registry entry perfectly. Any idea what the problem is??? Thanks and Regards.

    Read the article

  • C++ alignment when printing cout <<

    - by user69514
    Is there a way to align text when priting using cout? I'm using tabs, but when the words are too big they won't be aligned anymore Sales Report for September 15, 2010 Artist Title Price Genre Disc Sale Tax Cash Merle Blue 12.99 Country 4% 12.47 1.01 13.48 Richard Music 8.49 Classical 8% 7.81 0.66 8.47 Paula Shut 8.49 Classical 8% 7.81 0.72 8.49

    Read the article

  • Whats wrong with my backgroundwork method

    - by diver-d
    I am trying to get a background worker process working in a wpf application. it creates 2 files then crashes. BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += delegate(object s, DoWorkEventArgs args) { CreateFile(i.ToString()); }; worker.RunWorkerAsync(); private void CreateFile(string fileName) { string path = string.Format(@"{0}\{1}.txt", directory, fileName); using (StreamWriter sw = new StreamWriter(path)) { sw.WriteLine(fileName); } } I get this error " The requested operation cannot be performed on a file with a user-mapped section open." what am I doing wrong? Any help would be great

    Read the article

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