Posts

php - Conversion of PDF to PNG or JPEG using Ghostscript, PHP5.10 & MacOSX (10.9.4) -

मैंने निम्न लिंक से सहायता ली है: उपरोक्त प्रश्न को दिए गए शीर्ष उत्तर से .pdf फ़ाइल को .png कन्वर्ट करने की कोशिश की। जब मैंने निष्पादित किया टर्मिनल से निम्न कमांड, यह काम करती है। जीएस -ओ / यूज़र्स / डाइवैट डीजी / डीस्कटॉप / टायररोध 2.png -sDEVICE = pngalpha -dLastPage = 1 -quality = 200-r72 / उपयोगकर्ता / धोवित / डेस्कटॉप / एक.pdf अर्थात्, मेरा पहला पृष्ठ one.pdf को terror.png में बदल दिया गया था लेकिन जब मैंने एक ही PHP स्क्रिप्ट का प्रयोग करने की कोशिश की तो यह काम नहीं कर रहा था और मेरा कोड निम्न है: exec ("gs -o / users / dhwatdg / desktop / terror2" Png -sDEVICE = pngalpha -dLastPage = 1 -quality = 200 -r72 / यूज़र्स / दीव्वेट्ड / डेस्कटॉप /ऑन.पीडीएफ "); मुझे लगता है कि सर्वर gs पहचानने में सक्षम नहीं था मैं यह कैसे तय करूँ? कृपया जी टर्मिनल में इसे टाइप करके उपयोग किया जाता है: जो gs यह आपको एक्जीक्यूटेबल का पूर्ण पथ देगा। मेरे उबुंटू में: $ gs / usr / bin / gs आशा है कि यह मदद करता है।

ruby on rails - PendingMigrationError after running db:rollback -

I'm a bit confused about migration and rollback in Rails 4.0.x I use my rack DB: Migrate and Rake DB: site before and after a migration change using rollback. However, when I try to view the site after rollback, I get an ActiveRecord error for a pending meeting error. Migration is pending; Run 'Rake DB: RARS_NV = Evolution' to resolve this issue Migrate It seems that after my rollback my site is not allowed to see if it works is? I assumed that using rollback, you can take your app back to its previous state and keep using it there. The Active Record Migration Guide does not cover this situation, Even though you have rolled back the database, The file system still has a migration under DB / Migrate, the railways know that it has not run. You must either migrate (as mentioned by the user3865871 above, or you need to remove the migration file from the file system.

.net - Is there a library/tool I can use to do a google like search inside a non public web application? -

I am working on a .NET based web application. This web app is not available publicly. However, I want to know that it is possible to use a library with modern Google like search algorithms to find data in web applications. Is there a good library / tool that I can use? Pages are not available publicly It all depends on how you want to do the search. The basic way to find the full text is to search your SQL base, if the text is what you want to do. If you want a more advanced search capability, then perhaps you should run Solar / Aliccex. I prefer myself elastic search. You can either host yourself (in the role of a VM / Azure worker), or buy from them a mother-in-law who offers an Elastic Schaezar mother-in-law.

java - Program to get the lowest number in a file -

I am trying to access the program to a file name "highscore.txt", then: Write a new number in the file Get the lowest value in the list of numbers in the file. I am new to Java, so I do not even know how the file has reached. I got a code that I believe should be, but when I run the program it says that is the exception to the thread "main" java.util. InputMismatchException at java.util.Scanner.throwFor (Scanner.java:864) at java.util.Scanner.next (at Java.util.Scanner.nextDouble (scanner.java144185) at game.game.main (game.java: 91 ) Java result: 1 Here is the line 84 - 94, and the code I got. 84: Author wr = new filewriter ("highscore.txt "); 85: Write (attempt); 86: wr.close (); 87: lowest = tries; 88: file file = new file (" high 89: scanner inputfile = new scanner (file); 90: while (inputFile.hasNext ()) {91: numb = inputFile.nextDouble (); 92: if (numerator; minimum) minimum = Number; 93:} 94: input file.close (); ...

java - MigLayout align center won't center JLabel component -

Image
I find it flexible, etc. But I'm having trouble concentrating the content with it. I internal 50% but it seems that the percentage need to be changed in different frame sizes, as it is also based on the size of the component. So if the component is centered using gapleft 25% , then it will be in a different place if I change the width of my frame. I just have the align center and it's nothing. I have also tried the new cc (). AlignX ("center"). SpanX () and the same thing: It sticks to the left, but when I use the interval, it works, why? Super .Customize (New Migrateout)); This.loginPane = New LoginPanel (); Buffed Eyes Logo - Imagio Reed (new file ("Assets / Logo Page")); Jellabell Logo Labell = New JLABEL (New Imagine (logo)); Super.edd (logo label, new cc). Arranges ("center"). SpanX ()); It sticks to the left, but it works When does I use intervals, why? Based on this single line: Super .Customize (New Migr...

Rails: serializing a model's validators into json -

After I have been working with rail and frontend js frameworks and libs, amber, multiple including angular, and feedback. While all three libraries are powerful in their respective, a pain point (at least for me) has always been a form of legalization. I always hate to recognize the recognition of my model (in rail) with the verification of my form (Amber / Analer / React). Recently, I was trying to sort the legalists of a model in JSN. However, by calling as_json on a record, I will return a Jason hash, it does not give me the type of validators for a special feature. For example, suppose I have a model called assignment when I have a new assignment record and call _validators , I get it. pry (main)> Assignment.new_video1 = & gt; {: Title = & gt; [# & Lt; ActiveRecord :: Verification :: PresenceValidator: 0x0000010e123900 @ attributes = [: title], @options = {} & gt;] ,: full_prompt = & gt; [# & Lt; ActiveRecord :: Verification:: Presenc...

Split string containing command-line parameters into string[] in C# -

I have a string that contains command-line parameters to pass the second executable and I need to remove the string [] In which the same criteria are included, if the command line is specified on the command line in C #, the string [] will be used when other assembly entry points will be executed through reflection. Is this a standard work? Or is there any preferred method (regex?) To correctly divide the parameters? It should handle the '' delimited strings in which the spaces may be correct, so I can not just divide ''. Example string: string parameter string = @ "/ Src:" "C: \ tmp \ some folder \ sub folder" "/ users:" " Abcdefg@hijkl.com "" Job: "" Some Tasks, Some Other Tasks "" -Somaparam Fu "; Example of the result: string [] parameter array = new string [] {@ "/ src: c: \ tmp \ some folder \ sub folder ", @" / User: abcdefg@hijkl.com ", @" Job: some tasks, ...