Posts

Showing posts from January, 2012

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, ...

javascript - AngularJS - Data-binding from JSON string -

I'm completely new to AngularJS and to capture, parsing and displaying data from a SOAP web service I am trying. So far, I can successfully call a public weather service, capture and display the returned XML data, I can convert the XML to JSON string, but to show / force JSON data to me There is no success. Below are my html and js files. Thanks in advance for any advice / suggestions! MyHelloView.html & lt ;! Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script language = "javascript" type = "text / javascript" src = "angular.min.js" & gt; & Lt; / Script & gt; & Lt; Script language = "javascript" type = "text / javascript" src = "xml2json.js" & gt; & Lt; / Script & gt; & Lt; Script language = "javascript" type = "text / javascript" src = "MyHelloController.js" & gt; & Lt; / Script & gt; & Lt; / ...

objective c - Displaying image from asset library -

I am trying to get an image selected with imagePickerControl and open it using the provided URL to open it Image View I'm displaying on If I use UIImagePickerControllerOriginalImage to set my image, then it works fine, but I do not want to store the image in my database, I just want to store the URL. Before I moved this into my code, I wanted to make sure that it would work as a BELO code that gives the selected image to the PickRCentron and attempts to display the image. image picture controller: (UIImagePickerController *) Picker didFinishPickingMediaWithInfo: (NSDictionary *) Information {[Dismissed ViewControllerAnimated: Yes Completed: Zero]; Self.imageURL = [for information object: UIImagePickerControllerReferenceURL]; CCLog (@ "image =% @", [information object: foreki: UIImagePickerControllerReferenceURL]); // self.image = [For information object: UIImagePickerControllerOriginalImage]; ALAuthorizationStatus Status = [Allsets Library Authority]; Switch (status...

javascript - How to, in AngularJS, use $http to update persistent memory -

This is an angular introduction code from the video series, which explains how to give the controller of an angle continuously with data from memory But it only stops to be understood because of lack of understanding, adding new product reviews to a stable memory Something seems to be about how to do this, but since I have to do angular New, I'm afraid I could not understand any of them. I have detected the syntax to request a post using $ http, but I do not know how to fit that code in the existing code, so that 1) a new element of the review array , And 2) Update the view on completion. I have a basic way to learn about adding new product reviews in a constant memory. (function () {var app = angular.module ('gemStore', ['store-directives']); app.controller ('StoreController', ['$ http', function ($ Http) {var store = this; store .products = []; $ http.get ('/ store-products.json'). Success (jobs) {store.products = data;});}] );...

Changes made to (static) CSS file not reflecting in Django development server -

I am creating a web app using Django and there is some problem in the changes made to the CSS file. Development Server To reflect on). The server is able to access the static files to clarify, however, it is currently connected to the previous recurrence of my CSS file. A similar problem occurred a few weeks ago, when I did not show any changes to the CSS file. This problem was cured only after a few days. However, it is very disappointing not to receive immediate visual feedback, I have made the following efforts to correct this problem: My debue is set to True. / Li> I've provided STATIC_URL I tried to 'collect' static files but this command works but the dev server is still not reflecting the changes made to the CSS file. Is I have a STATIC_ROOT, STATICFILES_DI R and STATICFILES_FINDER. This comment is currently made because I have found out that some of these are for production only or are unnecessary for development. My stable resource is placed i...

Solr dataimporthandler - read tab delimited file data source to add fields -

I have a table in the database that has some properties about different objects. I have another data source with a file and data like this - itemcode warehouse code warehouse type abc 123 black ABC 456 white xyz 444 black I can load all the data from the database using a DataMod handler, the SLR index. Is there any way to update all the documents in the index to include related warehouse and warehouse type? Here's my data-config.mml - & lt; The name of the datasource is "itemdb" type = "jdbcDataSource" driver = "org.postgresql.Driver" url = "jdbc: postgresql: // server: 5432 / ITDB" user = "alice" password = "endland" /> ; & Lt; Data source name = "places_file" type = "file data source" /> & Lt; Document name = "item_properties" & gt; & Lt; Entity name = "e_item" data source = "itemdb" pk = "iCode" query = "get_all_ite...

ios - How to import "UIButton+AFNetworking.h"(Obejctive-C category file) in Swift -

आयात UIButton + AFNetworking एक त्रुटि के कारण होगा, हम + स्विफ्ट में आयात करने के बाद। आप केवल स्विफ्ट में उद्देश्य- C फ़ाइल को # इंपोर्ट स्टेटमेंट आपको उद्देश्य-सी ब्रिजिंग हेडर बनाने और फ़ाइल को इस ब्रिजिंग हेडर में आयात करने की आवश्यकता है। कृपया इस पर एक नजर डालें। यह बताता है कि आप स्विफ्ट में उद्देश्य- C फ़ाइल कैसे आयात कर सकते हैं।

sql server - SSIS OLEDB COMMAND query issue -

Image
I am trying to run this query in SSIS OLEDB COMMAND, but for some reason I get this error ( See shot) updated district set district.distectnam =? From district to district, join the city. IID = city. In the city of the district where the city. Podocode =? And city.taxcode =? Try: update d set district name =? From the district d in the Inner Joint City C d.id = c.districtid where c.fdocode =? And c.taxcode =?

ios - Using the object returned from getObject in NSMutableDictionary -

I'm an Obj-C newbie, so this could be a clear question. I am adding 10 numbers as keys to an NSMutableDictionary, for all of those 0 value such as - (i = 1; i & Lt; 10; i ++) {{dict set object: [NSNumber number: 1] for KA: [NSNumber numberat: i]]; } Now in the code later I want to get the object for the key number and I want to get the value of it. In this case for example, we store the value 0 for the number 3. I use this code for this - ID number obz = [game object foreaki: [nsnumber number: 3]]; Int numbersobject value = ???? I see the ID in the debugger pointing to 0. But I'm not sure how to declare it in the integer variable, I declare it. Hope that makes sense. I print numbers oz and some address is expected as print, how do I change this general ID into an NSNumber and store it in the number objectview later? id is not a datatype, its simple meaning is that any Also can return the object type when you are certain that you have inserted N...

javascript - fetching data from xmlhttprequest as an array in php -

Is there a way to get data from XML? Object as an object (not using JSN and JQR) in php? I have encountered a text that will handle the AJAX requests in php for the first time to check whether the input data is an array or not. Here is the code about the text: You will need to create QUERY_STRING with encoded field names and digits (let's assume GET You will send these fields through a form, QUERY_STRING which you will see in the browser's address bar, which you will need to make through JS). example: var name = 'fld []', // field name encoding = encodericomputer (name), // encoded name query = [], data AFS = array = document.querySelectorAll ('input [name = "' + Name + '"]' to store the document; // Input for (var f = 0; f & lt; flds.length; ++ f) {// Repeat on input / gather data. Joining Push ([enc., EncodeURIComponent (flds [f] .Value]] ('=')); } // Prepare the data query = query.join ('& amp;'); // ...

python - How to render text on a GdkPixbuf.Pixbuf -

I am trying to add text to a pixbuf, using Python and Gdk3. For hours, searching the web for information about this topic, and it seems that I have to make a Cairo reference from Pixbuf. Unfortunately, I have zero experience with Cairo, but I I can put this piece of code together: gi.repository import from Gdk def put_text (pixbuf, text, x, y) : # GDK window window_rat = GdK. Windows (str) window_trat.width = pixbuff.tv_width () window_tat Het = pixbug.get_height () window_tat.windowprop = gdk Windows type OFFRN # ~ Window_Tread.Window_type = GdK Windows type. TEMP window_attr.redirect = true # ~ window_attr.redirect = false window = Gdk.Window (none, window_attr, Gdk.WindowAttributesType (0)) A reference to window reference = Gdk.cairo_create (window) #make Gdk .cairo_set_source_pixbuf (references, of course, 0, 0) #render text context.move_to (x, y) context.set_font_size (15) context.show_text (text) resulting in the result surface = context.get_target () result = Gdk.pixbuf_...

php - Request Entity Too Large with small files -

I know that there are many questions about the request unit too large on the internet but I I could not find the correct answer to my problem;) I am using HTML file input tags to upload my images to users. & lt; Input type = 'file' class = 'upload-pc' accept = 'image / *' id = 'folller' name = 'pro-picture' & gt; & Lt; Br> There is nothing wrong with files less than 2 MB which is allowed by my site But the problem is that if someone uploads a large file like 510 MB I can handle it by php and warn that this file is too large if ($ _ files ['pro-picture'] ['size'] > 2000000) {dead ("huge"); } But my problem is uploading a 5.10 MB file, the request unit will be launching a huge error and my other php codes could not work I have checked the post_max_size and both upload_max_filesize are set to 8MB but I get an error at 5.10MB! And I need to find a way to handle files 8 MB becau...

jquery change input value when scroll to div -

edited: Resolved I change the value of the input Tried the mouse to scroll to that page. HTML: & lt; Div class = "pagenum" & gt; Page number: & lt; Input type = "text" id = "page name" & gt; / 3 & lt; / Div & gt; & Lt; Div class = "page-container" & gt; & Lt; Div class = "page" id = "page -1" data-page-no = "1" & gt; This is div # 1 & lt; / Div & gt; & Lt; Div class = "page" id = "page-2" data-page-no = "2" & gt; This div # 2 & lt; / Div & gt; & Lt; Div class = "page" id = "page -3" data-page -n = "3" & gt; This div # 3 is & lt; / Div & gt; & Lt; / Div & gt; CSS: .page-container {padding-top: 30px; Width: 300px; Height: 1500px; }. Page {height: 300px; Limit: 1px solid # 000; Margin: 5 px; }. Pagenum {background: #fff; Status: fixed; Limit: 1px solid #...

java - loading the property file values into web.xml using servletContextListener -

I value my web I want to load XML as a property file This is my web Xml file And this is my service reference list class package com.kpowd.utility; Import java.io.IOException; Import java.util.Properties; Import javax.servlet.ServletContextEvent; Import javax.servlet.ServletContextListener; Public Square PropertyReading ServletContextListener {@Override Public Zero contextDestroyed (ServletContextEvent event) {// TODO Automatic Created Method Stub} @Override Public Zero contextInitialized (ServletContextEvent event) {Final String Theater content = "/config.properties" applies; Last property property file = new property (); Try {propsFromFile.load (getClass (). GetResourceAsStream (props)); } Hold (last IOException e) {e.printStackTrace (); } (String prop: propsFromFile.stringPropertyNames ()) {if (System.getProperty (support) == faucet} {System.setProperty (prop, propsFromFile.getProperty (prop)); }}}} When I print the values, this square shows property valu...

svn - Integrate TortoiseSVN with Jetbrains Youtrack -

Is it possible to integrate TetoiseSVN with JetBrean Youtube? Who succeeded and how? I came to the site, but I still have not been successful in setting up the property in SVN (no luck is working from the SVN command line ...). You badly unity (two steps and two ways operation) (The blog post is very disgusting, chapters can help you identify, the plugin will help The page has a list of all known bugtaps-plugins for TSVN, and referenced (you can get and You can install and plug in a plugin for use in some working copy from TortoiseSVN's settings page. Configuring PS - Settings are not necessarily required by the CLI mode: Turtles for this task are good for the SS editor (GUI)

android - How to pass in the Context for the activity, along with a string containing the public license key -

I do not know how to" play in the context "to begin a relationship with Google I'm following Google's guidelines "and" with a public license key string " Here's what I've done here so far. I'm not a Pro Programmer IabHelper mHelper; @Override protected void OnCreate (Bundle savedInstanceState) {// TODO Auto-generated method stub super.onCreate (savedInstanceState); SetContentView (R.layout.homepage); String base 64 encoded public; MHelper = new IabHelper (homepage. This, door); mHelper.startSetup (New IabHelper.OnIabSetupFinishedListener () {public void onIabSetupFinished (IabResult result) {if (! result.isSuccess ()) {// Oh no, there is a problem Log.d (the TAG. "Established in problem -app Billing: "+ result);} // Hooray, IAB is fully installed!}}); to getApplicationContext () or Home Use Try this. this look for the link for more information

Magento “Cannot add the item to shopping cart.” For no apparent reason -

I have a slightly weird problem that I need your help. I have three independent Magento installations on my server, two of which are under an SSL certificate: https: //apps.domain.com/store1 & amp; Https: //apps.domain.com/store2. These two stores are custom themes. Third installation is a fresh installation on the root of the domain without an SSL certificate: http: // www.domain.com/store3 What happens, all of a sudden, all three stores Due to being able to add items to the cart and give me this error, "The item can not be added to the shopping cart." And then either an hour or two hours later, adding the cart button starts working again. The strange thing is that I do not change anything to stop working or stop working, and do all these work or stop working together. Please advise! Update : Actually I found this exception in the log: 2014-07-27 T21: 09: 35 + 00: 00 Debug (7): Exception Message: Notice: Undefined Offset: 2 /home/---/store2/lib/Zend/Lo...

android - Accessing ActionBar Action Buttons container -

I am trying to customize the button on the actionbars and I am using the actionbase after API 7. I know how to use buttons 1, 2, 3 to see it, but I do not know how to reach overflow items (number 4) is. This is the reason that I think it would be better to get the container directly straight instead of a button. I think the container is a linear layout or similar. Is there any way to use it to set its height and margins? I want to have buttons with a small margin on the top and the same on the right. BTW, where can I see the default actionbar layout xml, or code? With this I will be able to take action. Thanks

http headers - getting content-length using requests using get gives correct result but why not with the head? -

I am a little surprised, while I was trying to understand request module. & gt; & Gt; & Gt; Furl = 'http://www.downvids.net/downloads/07275feaf477cc0f5a7a67cba965594d5c83/' & gt; & Gt; & Gt; Resp = requests.get (feral, header = {'approved-encoding': 'detection'})> gt; & Gt; & Gt; Resp.headers ['Content-Length'] '7254371' & gt; & Gt; & Gt; Resp2 = requests.head (furl) & gt; & Gt; & Gt; Resp2.headers ['content-length'] '20' but by requests.get I think that by doing this, download the whole file to buffer It's been the length of the material from which !!! So the right approach should be to get the right material-length, if this is the URL redirect issue which seems to be that because I resp2.status_code has given me the 302 a request, request set allow_redirects on the wrong, by default; This is different from all other HTTP methods, where ...

java - extend olink in odata4j library -

I need expert advice about what you need - I hope you will help me in solving this problem. I am using the Oditta 4J library I want to add uniqeId to my collection resource eg. UniqeId here is not part of the Odata and Atom Pub specification but I want to implement it, what is the best way? If I expand the halck, then I have to expand the other interface of Olx, Ointinti etc. I do not want to increase the extra overhead. As a specialty tag this unique ID is another way to add I used to get it

javascript - android webview click html link programatically -

People I'm trying to develop a simple YouTube MP3 download project. I am using the webview I am loading this link on my webview "" Then I want to click the "download" link programmatically. I have tried many ways but did not work. The code below works on Chrome console. But do not work in the Android app Can you help me? web.loadUrl ("Javascript: document.getElementById ('dl_link'). GetElementsByTagName ('A') [2]. Click ();"); web.loadUrl ("javascript: (function () {" + "l = document.getElementById ('dl_link'). GetElementsByTagName ('a') [2];" + "e = Document.createEvent ('HTMLEvents'); "+" e.initEvent ('click', true, true); "+" l.dispatchEvent (e); "+"}) () "); Ensure that you enable javascript on your webview: Webview GetSettings.setJavaScriptEnabled (true);

delphi - TDbLookupComboBox or equivalent control with a set of fixed values? -

Is there a TDbComboBox -like control, which is a fixed list (for example by code = 1 = small 2 = medium 3 = big database I save 1 or 2 or 3, but only this value should be displayed in the combo box. has a TRzDbComboBox where you have separate lists for items and values. With help: TRzDBComboBox A Valuation Supports property, which can be used to define the list of associated values ​​that are stored in the selected database field instead of the string values ​​created in the item list. For example, the item list includes the following items Can be set to: Visa, MasterCard, American Express; While the price list will have lower values: Visa, MC, Amex, if sub If the yogi selects the American Express item in the drop down, then the AMEX value will be stored in the database table.

How to use scrapy to crawl multi level pages? (two level) -

On the first page it scraps "test1" well in the title tag, but in page 2 "test2.html "None of my script: import scrapy.spider from scarves to spider. Selector from selector select selectors from 1. Import website class Dumoszepider (spider): name = "bill" allowed_domains = ["http: // www .mywebsite.com"] start_urls = ["http://www.mywebsite.com/test.html"] def pars (Self, response): site for feedback. Xpath ('// head'): item = website () item ['title'] = site.xpath ('// title / text ()'). Remove () yield produce scrap.Request (url = "www.mywebsite.com/test1.html", callback = Self.other_function) def_other_function (auto, response): response.xpath ('// head') to other_thing To: item = website () item ['title'] = other_thing.xpath ('// title / text ()'). Extracts () yield item Thank you in advance STEF Attempt yield scrapy.Request (url = "www.mywebsite.com...

ios app extension - iOS8 Custom Keyboard View Loading Management -

I'm creating a custom keyboard As Apple recommends, I viewDidLoad method The problem is that every time my keyboard is loading, it stammers Do you have anybody to manage the keyboard view load Also know about best practice? Thank you!

javascript - Regex and ISO8601 formatted DateTime -

मेरे पास डेटटाइम स्ट्रिंग ISO8601 formated है 2012-10-06T04: 13: 00 +00: 00 और निम्न रेगेक्स जो इस स्ट्रिंग से मेल नहीं खाता # (\ d {4}) - (\ d {2} ) - (\ घ {2}) टी (\ घ {2}) \: (\ घ {2}) \: (\ घ {2}) \ + (\ घ {2}) \: (\ घ { 2}) # मुझे पता नहीं लगा कि यह क्यों मेल नहीं खाता है। मैं मेटाचाक्टर्स से बच गया, मेरे लिए यह ठीक लगता है। संपादित करें: सही तरीका: जेएस में एक regex निर्दिष्ट करते समय regex का उद्धरण न करें। फ़ॉरवर्ड स्लैश पर्याप्त है। अलर्ट ($ ('# datepicker')। Val ()); मैच (/ (\ d {4}) - (\ d {2}) - (\ d {2}) टी (\ d {2}): \ ($ ('# datepicker')। (\ D {2}) \: (\ d {2}) [+] - (\ d {2}) \: (\ d {2}) /)) {चेतावनी ('ठीक'); } और {चेतावनी ('ठीक नहीं है'); }

c# - Windows Phone 8 : How to load content for each pivot item using MVVM? -

I am using Pivot control in my app. I want to load the contents of each pivot object through a remote url (i.e. using web services). For example - I have a detailed pivot page of a dish. It has 3 axis objects - information, reviews, gallery. And it has a progress indicator on the system tray. Once I want to load the data of each pivot object, if the user swipe back on the previously loaded pivot item, then he should not request the web again for that pivotal item and In that case the progress indicators should be invisible. . Should I use a single menuitom model for each vivid item or for everyone? How to manage the visibility of the progress indicator in the Pivot page? Can I create UserControl for each pivot object? The page's role is to show data for an "unit", recipe. Because of this, I will only use a recipe view model and will not also prepare user control for pivot items. You can use the binding to manage progress indiador. I personally use a l...

Android Image Ratio 3 4 6 8 -

I am creating some graphics for my app and stuck on the ratio. I understand the ratio of double values ​​for example ldpi = 75px / 75px (less than the start point quarter) mdpi = 100px / 100px (starting point) hdpi = 150px / 150px (start point 1.5) Xhdpi = 200px / 200px (2x starting point) But if the width and height are not equal, for example I saw a post here, which had such values ​​ ldpi = 240x320 mdpi = 320x480 uses the width ratio, but how does 480 get 320? 320 = A fourth of 80 but there is 160 difference between the height Using the same multiplier (scale factor) For x and y both: ldpi: 0.75 mdpi: 1.0 hdpi; xhdpi: 2.0 xxhdpi: 3.0 xxxhdpi: 4.0

java - Jackson Polymorphic Deserialization in Maps -

In the former cases, I have been hosted by the use of Jackson (Jackson 1.9, Kodehaus) format Bhulorfik Dharawahikkrn To sort the list of {"className": " Index "," id ": 0," fields ": {" classname ":" fieldmap "," df12 ": {" className ":" customing type "," value ":" ra Lf "}}} Where I have tried some things, along with the rapper implementation of the map ( fieldmap ). Whenever I try to deserialize it, then I 'ID' custom Metatip type 'Maibsetaip "can not be solved type id subtypes I have everything annotated Well, that JsonTypeInfo and JsonSubType included, there is a lot to do The easiest thing is. Let's say you're POJOs @JsonTypeInfo (using included = JsonTypeInfo.Id.NAME, or = JsonTypeInfo.As.PROPERTY, property = "className") @ Jesnignorproprtij (Andekhaagyat = true) Public Sector Index Records {Private Ent ID; @Js...

javascript - Expand hidden content in newly expanded div -

I have a lot of content that I'm using in one of the frequently asked type setups. When a user clicks on any number of links, then he will expand the section and will reveal a list of items which can be extended themselves too, some of which I am trying to achieve, some of these The list item is to expand, when the range of frequently asked questions is toggled Then the user clicks on the link that lists the list of items And the focus is set on the exact object content that runs alongside the link Basically, hyperlinks all this stuff like anchor is on one page and a slide toggle is followed by a second slide toggle. I am trying to complete here: P> & lt; H2 & gt; If you want to find out more about this exact thing, try & lt; A href = "#" id = "clicke" & gt; click here! & Lt; / A & gt; & Lt; / H2 & gt; & Lt; Div id = "myHiddenContent" style = "display: none" & gt; & Lt; Li id = "...

Sqlite format date from hour to hour -

Store me in the format DD / MM / YYYHH: MM-HH: MM at the date of your SQLite database Want to do its ? I only found out that YYYY-MM-DDTHH: MM's answer There is no SPALIC data type for SQLite dates. You can store dates in any format, but if you want to use one of these, you have to use one of them. A date you want to store (a point in time), but a time interval. There is no built-in support for the interval; The best you can do is to start at the start and end of the gap in two different columns. Please note that store a date and display a date two different things Calculating the length of the interval will be easy to calculate when the two date values ​​are stored in a numerical date format.

php - header("HTTP/1.1 200 $status_message") took more than 5 second to run on local host. AM I doing something wrong? -

itemprop = "text"> My code is given below, its a simple rest API, when the URL is called from any other page, the header (" HTTP / 1.1 "), it takes 5 seconds to return the response. I'm running it on a local host. & lt ;? Php header ("Content_type: application / json"); If (! $ _ GET ['name'])) {$ name = $ _ GET ['name']; $ Value = get_price ($ name); If (! Blank ($ value)) {response ('200', 'book found', $ value); } And {feedback ('200', 'Book Not Found', blank); }} And {feedback ('400', 'Invalid Request', Faucet); } Function response ($ position, $ position_conference, $ data) {header ("HTTP / 1.1 $ status, $ status_message"); // take this line more than 5 seconds to run the $ [$ status] = $ position; $ ['Status_message'] = $ status_message result; $ ['Data'] = $ data result; Echo json_encode ($ result); } Get_price function ($ name) {$ book = [...

r - Plotting scalar field -

Image
I was searching to plot this function as a scalar field in a specially consistent scaler field : Library (RGL) Issue = CEC (-2, 0, Length = 20) XY = Extension Grid (x = points, y = -points) zf & lt; - Function (X, Y) {X ^ 2-Y ^ 2; } Z & LT; - ZF (XY $ X, XYE Y) Open 3D () RGL Surface (x = points, y = matrix (z, 20), coord = c (1,3,2), z = points) Axes3d () A scalar field is usually Two axis is plotted with X and Y, where Z represents the color () With ggplot () I can do this: Daf = data.frame (XY $ X, XY $ Y, Z) ggplot (daf) + geom_point (AES (XY.X, XY.Y, Color = Z)) but still not a continuous field. This can be achieved by the 'image' function: Z & lt; - External (Points, Points, Zf) Image (Points, Points, Z) This method uses only the closest neighboring interpolation, but if you want a smooth representation, you can use other types of interpolation: Library (field) #Biller interpolation interp_points = seq (-2, 0, lengt H = 20...

Imported Sqlite Database not working in Android -

I am struggling with database import for a short while on my Android project, I'm new to Android. That's what Android supports Skylite, so my first question is, I have to remove the .sqlite extension and replace it with DD, for example since I found it on the net, I only saw .db extension files After doing this, I put my existing database file in my property folder and use a class to manage my database. This tutorial I am doing: In the tutorial, it says that I have to designate all the ID columns in _id, is it mandatory? The extension may be anything (better .db). _ _ Field is not mandatory. I have the strength of my DB without any DD> All (in fact) I call the ID field, whatever I want. I need a special method for this, the _id field is required, then I use duplicate using the rowID As _id move rowID is a special "hidden" field that actually treats such as it was the _id field.

sql - Oracle 10g Full table scan(parallel access) 100x times faster than index access by rowid -

The product had a query that was running for several hours (5-6) hours. I looked into its execution plan, and found that it was ignoring parallel signs on a large table. Reason - This index was using table access by ROWID. So when I added a / * + full (huge_free) * / signal before the parallel (huge_free) sign, the query began to run in parallel, and it was less Finished in less than 3 minutes. I could not understand, for this reason, the performance of the huge difference could be the benefit of parallel FTS: If you have more useless If CPUs are then parallel operation is naturally fast. Parallel operation in 10g direct I / O bypass buffer cache, which means "buffer is busy waiting" or there is no risk of any other dispute for buffer cache. Make sure that there are the above benefits, but then the following losses are still there: Parallel actions still need to be I / O, and Whatever it is for us to access in the table, it will be as much as the whole ta...

c# - RadioButtonList Choosing specific index -

I'm having trouble writing an I statement with the selected index of the radion button list. Below I have my code. If (radio button list selected value = 1) {//}} I have a radio boot list with three separate indexes I can say something like this if selectedvalue = index [1]? Try it To set the index: radio button list. Selected index = index; To set the value: Radio Button List. Selected Values ​​= Val; To check the selected index, code if (radio button.list.selected index = = Index) {} if (radio button list. Select value == well) {}

c++ - Algorithm to find geohashes which satisfy query condition -

I have an application where I have to query the frahash by specifying boundary rectangles. Since geohashes map from 2D to 1D, there is a method by which I get prefix of all the physiotherapy which meet the query status (rectangular bounding). I tried Google but I did not get any algorithms. It would be great if there is a library that works efficiently in C / C ++ for me. Even if there is no library, then I can work with an algorithmic solution. The prefix will be the rectangle of the geocode Is consistent with the latitude and the odd bits correspond to the longitude. As we move from left to right, we refine the specified interval of Bhurash. Consider a hypothetical land with longitude related bits 110 . It tells us that we have the upper half ( 90 to 135 , 0 ) are interested in the top digit score ( 90 of the top half ( 0 to 180 ) Code> to 180 , second 1 before all the text 1 ( -180 to 180 ). So by specifying a long string, you can refine the int...

How to make a html box appear on page using JavaScript/JQuery? -

How can I open a square of html with an ID using JS / JQuery? HTML I want to trigger with JS / JQuery & lt; Section class = "modal - show" id = "show" tabindex = "- 1" role = "dialog" aria-labelelledby = "label-show" aria-hidden = "true" & gt; & Lt; Div class = "modal-inner" & gt; & Lt; Header & gt; & Lt; H2 id = "label-show" & gt; A Model & lt; / H2 & gt; & Lt; / Header & gt; & Lt; Div class = "modal-content" & gt; & Lt; P & gt; Content & lt; / P & gt; & Lt; Div id = "badgeselect" & gt; & Lt; / Div & gt; & Lt; Footer & gt; & Lt; P & gt; Footer & lt; / P & gt; & Lt; / Footer & gt; & Lt; / Div & gt; & Lt; / Section & gt; I have tried to use I $ ('#show'). Dialog ('open'); The only other idea that does not work is that the...

Running Mongodb on OSX Mavericks -

I have set up Mongodebi on OSX using homebrew. When I will: Mongo Mongo starts but does not seem capable of connecting to test database. What's happening: Mongo DB shell version: 2.6.3 Connect with: test Mongo no one else gets . Thanks, Anthony Did you start mongod process? There is only one customer to connect to the mango database. Checkout Bravel Info Mongo for several ways to run / run the database

logo lang - Return length of label, in pixels -

How do I return the length of a string in pixels, which courtesy command command languereview does not work properly because it does not return to pixels. I am working on the language of the language The problem is resolved axis Axis / html>

how to sort and append the list of words to an empty list in python -

I am trying to write a python code that reads a bunch of lines from the text file, and then lines the words Then divides into each word, checks to see if the word is already in the list, if it does not exist, then it adds to it and finally changes the list and finally print the final list is that i Has written so far Fh: line = line for row phname = raw_input ("file name:") fh = open (fname) new = list () word for the word rstrip () = line.split (): If not new in w: final = new.append (w) result = final.sort () print result but I'm getting the error below. AttributeError: ' NoneType 'object has no attribute' sort ', which is on line 12 Do not know why? Any help? Thanks Upendra fname = raw_input ("enter file name : ") With FH: # FH as the use: # to automatically close the file using # = = [] new = [x.rstrip (). Split for x in FH) # Strip and words divided into subtitles for eleven: In new words: # For every word in every novelis...

php - Regular expressions - pick up consecutive words that start with a capital letter -

I must select the words that start continuously capitalized in a text (using PHP preg_match () )>). Then in this lesson - "this is some lesson" it should choose the word "some", but in this lesson - "this is another piece of text" it should be chosen "another piece" that " . I currently have this expression - ([AZ] [az] +) + , but it only chooses the word for each capital letter. - [0] = & gt; "another piece" as , but I currently [0] = & gt; "Other", [1] = & gt; Piece ", [2] = & gt;" off " ) How do I update it? Is it that I need it? You can use it: if (preg_match ('~ [AZ] [az] * (? & Gt; [AZ] [az] *) * ~', $ text, $ m)) {echo $ m [0];} (? & Gt; [AZ] [az] *) * optional displays other words. More flexible Note: If you need to deal with accent words, you can call it (? & Gt; \ s + [AZ] [az] *) * \ P {LL} and \ p {Lu} character class: ...

java - Waiting for a few seconds after highlighting an element using Webdriver -

I'm trying to highlight an element. I want to stay up to 5-6 seconds but I I'm not able to. The code for highlighting is working fine but it only appears for a flash I tried to use it with thread.sleep () , but could not get it. Can I define the conditional wait of such a high by using explicit wait or any other method. The code is here highlighted for the element: import java.util.Set; Import java.util.concurrent.TimeUnit; Import org.openqa.selenium *; Import org.openqa.selenium.firefox.FirefoxDriver; Public class highlighting {public web driver driver; Private string base URL; Public static zero main (string [] args) {Highlightimage ozz = new highlighted element; Obj.func (); // TODO auto generated method stub} Public Null Func () {Driver = New FirefoxDriver (); . Driver (domain) (maximize window) () .; Driver.manage () time limit (). Vested VAT (30, time unit SECONDS); Baseurl = "http://www.creativebloq.com/netmag/get-started-django-7132932"; Driver.g...

uitableview - IOS prepareForSegue using custom tableview cell -

I have created a .xib with my custom cell that I am using on my table view controller in my storyboard . In the storyboard, I added the current tableview with a pushview with another tableview. (When a user clicks on a single cell, then it has a new view). The problem is, I do not know how to link the "How to link with my custom cell"? I am loading my custom cell like this: Fixed NSString * simpleTableIdentifier = @ "cellCustom"; CellCustomView * cell = (cellCustomView *) [tableview dequeueReusableCellWithIdentifier: simpleTableIdentifier]; If (cell == blue) {NSArray * nib = [[NSBundle mainBundle] loadNibNamed: @ "cellCustom" owner: self choice: zero]; Cell = [nib object at index: 0]; } And when I try to apply the method: - (void) Prepare ForSegue: (UIStoryboardSegue *) to Sender: ( ID) sender {NSLog (@ "test"); } I have nothing, because in my opinion, I have not found anything from my custom cell and my storyboard segment, ...

Google Static Maps rejecting my request, but its enabled -

Image
I have gone for hours at this time, many people have the same problem but no one answers it. I am trying to embed a static map in my website. & lt; Iframe width = "600" height = "450" ​​frameborder = "0" style = "border: 0" src = "https://www.google.com/maps/embed/v1/place?q=Phoenix% 2C% 20Arizona% 2C% 20United% 20States & key = key "& gt; & Lt; / Iframe & gt; I am getting this error: But I have the Fixed Maps API enabled in the console

python - Why runtime in C is so random? -

I have this code in Python: time import time from a = 0 C Xrange (10 ** 3) for x = time (): print x print time () - c is the time of the Rune which I expected. 0.508999824524 0.263000011444 0.25200009346 0.25200009346 Since the program is cached on the kernel, the timing of the python is halfway? I think? But it's getting random at C. #include & lt; Stdio.h & gt; # Include & lt; Time.h> Int main () {int a = 0; Clock_t Tik = clock (); For (a = 0; a & lt; 1000; a ++) {printf ("% d", one); } Clock_t tac = clock (); Printf ("% f", (double) (tick-tick) / 1000000); } The price given by the clock, one of the amount of CPU time consumed by The guess is the process. This is not the time when you make that call, but it receives certain variables from the scheduler. Use clock_gettime (CLOCK_MONOTONIC, ...) for an accurate figure.

ios - How to use UIImagePickerController 's CameraOverlayView property in Simulator environment -

I was working on creating a custom camera overlay and installing it for UIImagePickerController's CameraOverlayView property. But since I have not been enrolled in Apple's developer program, I can not really use and test the application package on the actual device. I have my code debug and it appears that simulators you can not really choose and can not set ImagePicker.sourceType property UIImagePickerControllerSourceTypeCamera . Because the camera's functionality is not available on the simulator. Am I right in my thinking? Or am I missing something and the camera overlayview is a way to set up the property and test on the simulator? Here is an example of my code: - (IBAction) Le Picture: (ID) sender {UIImagePickerController * imagePicker = [[UIImagePickerController alloc] init]; // Check supported on possible or simulator, otherwise, // a photo library if ([UIImagePickerController take isSourceTypeAvailable: UIImagePickerControllerSourceTypeCa...

html - Toggling classes using jQuery -

मेरे पास एक पॉपअप तत्व है: & lt; div id = "contactme" वर्ग = "बंद" & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0);" onclick = "toggle_contactme" & gt; बंद & lt; / a & gt; & Lt; / div & gt; & Lt; a href = "जावास्क्रिप्ट: शून्य (0);" onclick = "toggle_contactme" & gt; ओपन & lt; / a & gt; मैंने दो वर्गों .open और .closed प्रत्येक बना दिया है सीएसएस के साथ: । बंद {दृश्यता: छुपा; }। Open {दृश्यता: दृश्यमान; } jQuery का उपयोग करके मुझे पॉपअप को खोलने और बंद करने में त्रुटियां मिलीं हैं, और मुझे यकीन है कि यह सीएसएस या सिर्फ गलत jQuery है। यहाँ है फ़ंक्शन टॉगल_ संपर्क () {if ($ ("# contactme") हैक्लास ("बंद")) {$ ("# contactme" ) .removeClass ( "बंद") addClass ( "खुला")। } और अगर ($ ("# संपर्क")। हैक्लास ("खुली")) {$ ("# संपर्क")। निकालेंक्लस ("खुली")। ऐडक्लस ("बंद...

css - Disable scrolling of behind layers on touch devices -

I am creating a side navigation that pops out and it works fine, but the problem occurs when Translate3d is used when chrome is scrolling using an iPhone or emulation mode, behind it & lt; Body & gt; will scroll, it seems that my finger presses through the layer On the desktop browser on the mobile width it really works properly. Navigation appears, scrolling is off in the navigation pane and background elements are not scrollable. I think this could be due to translate3d and how does it z -index ? But this is a poorly educated guess. Here I am working with: . Side-nav - fixed {position: fixed; Width: 230px; Include @media-query (palm) {width: 100%! Important; Status: Sure! Important; Top: 125px; Correct: 0; Bottom: 0; Left: 0; Z-index: 5555; Background color: #fff; Overflow-y: scroll up; -MMS-overflow-style: none; -Widk-overflow-scrolling: touch; Include @conversion (translation 3D (-100%, 0, 0)); Include @ Single-Infection (change easily with 1s); @ Extension...

target - Why is xcodebuild not building dependencies when testing? -

Image
When I run xcodebuild , it crashes It seems that this test target Is not compiling the dependency, which is the main app, the test target is called NiknikTests , while the goal of the app is called WTATest3 . LD Build / Uninstalled Product / NiknikTests.xctest / NiknikTests General i386 CD "/Users/ethen/.jenkins/workspace/Build Niknik" Export IPHONEOS_DEPLOYMENT_TARGET = 7.1 Export Path = "/ Applications / Xcode .app / content / developer / platform / iPhoneSimulator.platform / developer / usr / bin: / applications / Xcode.app/Contents/Developer/usr/bin:/Users/ethen/Desktop/sbt/bin:/usr/bin: / Bin: / usr / sbin: / sbin: / usr / local / bin "/ application / xcode .app / content / developer / toolchains / xcodedefault.xctoolchain / usr / bin / jagged -arch i386 -bundle -isysroot / applications / Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1. SDK L / Users / Ethen / .jenkins / Workbench / Build \ Niknik / Bu...