Posts

Showing posts from August, 2015

asp.net mvc 3 - Strategies for Organizing Dependencies/IOC Containers in an MVC3 .Net app with Castle Windsor -

So I'm new to using Castle Windsor and I became rather how ugly your controllers me your project the IOC, which has been found to work I'm most people is less than half the problems now announced a ton of dependency in your controller constructors I know that I'm down. Are there any good specimens to manage them, so I'm not copying / pasting it in every new controller and / or section of the site I created? public Home Controller (Aiookelaijeshn service location service, // ugly events service, media server service Uttrsewa, Aitivitr Fds service Twitter service, Aiafsbuksewayrsewaisewaisej, Aistitingssewa Setingssewayr, Aiiakstainetdeta service Bahreedeta service, Aiyuesaars service Ugrsewa, Aiaianstent message service instant messaging service, the Aisiaelanders Karenjr Received, Iloggr logger) {// These are some things} to link I hope this makes sense. I can add more information for clarification. It looks like your administrator or try to do too much o...

php - Assign changed variable to the same variable is safe? -

Is this a good practice and do I have any possibility of furrow if I entrusted the changing value of my own variable? For example $ myVar = 1; $ MyVar = $ myVar + 33 9 5 9 2; $ MyVar = rtrim ($ myVar, 2); $ MyVar = explosion (",", $ myVar); I know this will work but what is safe to do this in PHP? This violates the practice of using good variable names If the variable actually represents the same thing then I consider reassigning it. As it does not represent the same thing in this matter, I consider it a "bad" or "code odor". (However, "work safely" otherwise) Happy coding.

getClass() of a Generic Method Parameter in a Java -

निम्नलिखित जावा विधि को संकलित करने में विफल रहता है: & lt; T संख्या बढ़ाता है & gt; शून्य foo (टी टी) {क्लास & lt ;? T & gt; क्लास = टी.गेटक्लास (); } त्रुटि प्राप्त हुई है: प्रकार बेमेल: कक्षा & lt; कैप्चर # 3-से परिवर्तित नहीं किया जा सकता है? संख्या & gt; से कक्षा & lt ;? को बढ़ाता है टी & gt; बढ़ाता है क्या कोई समझा सकता है क्यों class & lt ;? T & gt; विस्तारित है, लेकिन कक्षा & lt ;? संख्या बढ़ती है; ठीक है? का कहना है: वास्तविक परिणाम प्रकार वर्ग & lt ;? है एक्स | एक्स | & gt; जहां | X | यह अभिव्यक्ति के स्थिर प्रकार का विलोपन है जिस पर getclass कहा जाता है। उदाहरण के लिए, इस कोड के टुकड़े में कोई कलाकार की आवश्यकता नहीं है: संख्या n = 0; क्लास के लिए & lt ;? संख्या & gt; फैली C = n.getClass (); क्योंकि T वर्ग 'प्रकार का विस्तार नहीं होता है से T इसके बजाय, यह संख्या से फैली हुई है, ठीक उसी तरह जैसा कि आपने खुद को & lt; T में विस्तारित किया है & gt; इतना ही आसान। ...

memcached - Django cache performance -

We are now using Redis for in-memory cache for our Django application (we used the first memcatch The difference in performance is no big, and we're using Redis because the disc dump feature). The problem is that Django cache's performance in my view - terrible, we have a view with 102 cache hits (no miss), and it has 81 ms (only the cash part, which is with the DJBugBug toolbar Is measured). In my opinion - this is a very long time, I know, asking for a question for DB can be 10x more (or 100x) time, but that is also not good with cash performance of that fact. We are running radis (and the first memacatch) on different hosts, connected to the local network with other servers. Is there a way to maximize cache performance in Django? Instead of displaying problem cache, there is a possibility of the number of items to be received for each page 102 Cash calls mean long time lost due to network latency. With full control of the code, you may be able to fix it with m...

c# - Confused over DLL entry points (entry point not found exception) -

I'm learning how to use DLL in C #. I have a very simple DLL to do my basic test. // using the MainForm.cs system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; Using System.Windows.Forms; Using System.Runtime.InteropServices; Namespace DLL_Test {public partial class} Form 1: Form {{DllImport ("TestDLL.dll", EntryPoint = "? @ @ YGHHH Add @, Accurate Spelling = True, Calling Communication = Calling Conference. STCL}] Add public static extern int ( Int a, int b); public form 1 () {initialization ();} private zeros button 1_Click (object sender, eventArgs e) {int num; try {num = add (2, 3); RichTextBox1.AppendText (num. ToString () + "\ n");} Hold (DllNotFoundException Pre) {Message Box.Show (ex.ToString ());} Hold (EntryPointNotFoundException Pre) {Message Box.Show (ex.ToString ())}} }} more DLL code: // TestDLL.cpp __declspec (dllexport) Add int __std...

c# - determine if a field is returned from a datareader -

I'm dynamically selecting a table to select and a field that is not present on all tables. Inside the reader, how can I see if this area is present in the collection or not? I am using it, but it only determines whether it is zero ... No, whether it exists or not: if (myReader .GetValue (myReader.GetOrdinal ("prepay")! = DB.NLL.value) myModel.PrePay = myReader.GetBoolean (myReader.GetOrdinal ("prepay"); Take a look at (MyReader is a SqlDataReader to handle).

javascript - jquery length of characters in a collection -

Is there a way to get the length of the characters in the jQuery collection? For example, you match a bunch of divs and you want to calculate the character of only matched divs Yes ... you can do this, var count = 0; $ ("Selector") .each (function () {count + = $ (this) .text (). Length;}); Warning (count); See here

wpf - Binding doesn't get updated -

I have a text box to a class in which I attach the dependency property of a point to the point and its set segment. Canvas.Top and canvas. To clarify property assets, whenever the source property changes, then the set section of property is called correct? Because when my source updates the canvas and canvas properties of the text box, the update is not found. Any help would be appreciated. Public static read-only dependency property status property = dependency property Registration ("Status", Type (Point), Typef (Text Box), New FrameworkPromatematetta (New Point (0, 0))); Public Point Status {Get Return Point (Gateville) (StateProperty); } Set {Set Value (Progress, Value); Canvas SetLeft (this, value.X - this .with / 2); Canvas SetTop (this, value.Wi - it.FontSize); }} this.TextBoxShape.SetBinding (TextboxShape.PositionProperty, CreateConnectorBinding (this)); Where CreateConnectorBinding gives the mid-point of the oval based on the Canvas.Top and Canvas.Left...

iphone - How can I save pdf's to my app resources folder, and access them in run-time? -

I have an app that I'm designing that will allow many PDFs to be viewed. Many different languages ​​are available, and so if I want to include them all in the app, then it will be like 100+ MB size which will not fly anymore. So I am thinking that I will keep the PDF on my server, and access them with a direct download link like this: http://mysite.com /pdfs/thepdf.pdf which I want will return the correct PDF. So I am wondering how can I go about reaching these resources because I download them on the fly? Do I need to save PDFs in the App Resources folder? And then when a tableview row is selected for pdf, I check whether the PDF is in the resource folder (How do I do this?), And if not, then drag it down from the server and load it into my view? I think what I need to do, that's fine, just to do this is not very clear on the code. Any code can be posted to the Resource Folders (if I really need to do), and how could possibly check whether some resources are in...

Jquery Ajax with ruby on rails (show loading message on a div) -

I need to show till a message is loaded until the data is back and updates to my div. is. . I can update the data at full .. & gt; Click (function () {$ $ .ajax ({url: '/ calendar / showcal / & lt;% = @ space.id% & gt;', type: 'gET', datatype: 'script', data : {Month: '9'}, complete: function (data) {}});});}); & lt;% end% & gt; You can use first send callback to start loading ... statement or any other animation And can reject it at the full callback function. & lt;% = javascript_tag%> Click (function () {$ .ajax ({url: '/ calendar / showcal / & lt;% = @ space.id% & gt;', type: '' GET '', data type: 'script', data : {Month: '9'}, ** first: function () {}, ** complete: function (data) {}});});}); & Lt;% end% & gt;

ruby on rails - form not processing as JS -

Then I have the following rail forms, and there are answers to this same governing action: JS, but rail it processed as HTML Does. Not really sure how to proceed. Any ideas? form_tag url_ (controller: 'post', verb: 'add_tag'), id: 'enter_tag', remote: true, style: 'display: none:' text_field_tag: tags UPDATE: 'Delete the display': None 'fixes this (I was in the form feed) Why is this? Chris, are you using Rail 3.1? If so, (I'm still at 3.0.10, I'm sure) the jQuery UIs library is automatically included. If that is the case, then it should use an / datatype request, but I believe that this is an xhr request to the railroad and it should be automatically sent to the JS reply. A quick solution could be changing url_for to url_for (controller: post, verb: 'add_tag', format: 'js') but I believe it should also take the JS answer without it. I do not like this approach because I do not believe that it wi...

Parse a Comma Delimited File using JAVA -

मुझे यह फ़ाइल पढ़ना है: - http: //www.somehost कॉम / उत्पाद /, ए 0, डी 1, एल 0, टी 0 http://www.somehost.com/news/rel, ए 1, डी 0, एल 1, टी 0 http://istor.somehost.com, ए 0, डी 1, एल 0, टी 0 मेरे पास यूआरएल की एक सूची है और मैं उन यूआरएल की तुलना यूआरएल के साथ करना चाहता हूं जो इस फ़ाइल में मौजूद हैं। और मान लीजिए कि जिस युलएल को मैं तुलना करना चाहता था, उस यूआरएल से शुरू होती है जो इन फाइलों में होती है .. फिर यह उस यूआरएल लाइन में आगे बढ़ेगा और यह ए और डी की जांच करेगा। यदि ए 0 है तो हम उस यूआरएल को क्रॉल नहीं करेंगे और इसके विपरीत और यदि ए 1 है तो हम आगे बढ़ेंगे और देखेंगे कि एल 0 या 1 का मतलब है अगर एल 1 है, तो हम लिंक को केवल और इसके विपरीत निकाल देंगे और टी के साथ ही 0 या 1 होगा, हम केवल तभी पाठ निकाल देंगे टी 0 है। कोई भी सुझाव मैं यह कैसे कर सकता हूँ .. ?? मैंने उपयोग किया है और यह बहुत आसान है के रूप में अच्छी तरह से देखें हालांकि (ग्रीष्मकाल के बारे में बताते हुए), यदि आपका डेटा अधिक जटिल नहीं है, तो ठीक काम करना चाहिए। अपने डेटा को पार्स करने के बाद आप जान ...

c++builder - C++ Builder .exe program in other computers -

I am working in the program for the university using C ++ Builder 6. This program works perfectly in my computer, but it does not work in any other computer. I already have the packages-> gt; & Gt; Built with RUNTIME package, and LINKER-> > With these options disabled, you can apply your application to any computer Will be able to run: If you are using a component in which another resource needs to be installed, for example if you are using SQL, So it will go, but obviously it will not use the SQL function, if you have any SQL Sans Money is not installed; If the Windows version can not run it. For example, you can not run it on Windows CE, Windows 3.1 ... except that you compile to run these different versions. Just to customize your .EXE file, simply enter Project & gt; Press the release button on Options & gt; Compiler , so the debug data will not be stored on it.

iphone - Why does this cause a crash? -

These two methods are pressed into these two methods (they are almost identical) - (zero) move on the imagery {int number = [numberofimage intview]; Num--; NumberOfImage = [[NSString stringWithFormat: @ "% i", number] maintained]; // Load the image [self load image]; } - (zero) moveOngeelGelar {int number = [numberofimimage intview]; Number ++; NumberOfImage = [NSString stringWithFormat: @ "% i", number]; // Load the image [self load image]; } If I hit one of these two times (or once each, basically if they are called twice) I get an EXC_BAD_ACCESS. If I retain the following: numberOfImage = [[NSString stringWithFormat: @ "% i", num] Maintenance] This is ok though. Can anyone explain why this is? I did an NSZombie on the devices and checked it back on this string with theformat call. thank you in advanced! + stringWithFormat: 'new', 'light' So you expect that you want to maintain the return value if you want new NSSTing that ...

linux - how to monitor a processes memory usage over time - ubuntu -

I want to see the process given in Unix over time, how the time memory increases (this is a long lasting Work) I think I can ps -aux | Grep PID Run it from the cron every 5 minutes, but it seems that there should be a better way. Can I use Sir to do this? I use it: $ ps -o rss $ (Pgrep executablename) Put the clock in a loop at a time or use the clock to keep track of time with the tail. You can also tee it in a file and Gnuplot can plot it for you and refresh every few seconds.

multithreading - Android: How to determine on which threads are my methods are running? -

I would like to ensure that my methods are running on threads, for which I wanted to run, threads in my logs I want to add name or id to check whether my methods are running in UIthread, thread1, thread2 .... threadx. Problem: To determine what I have to do, the name of the thread or ID is not certain about this, if you have a better viewpoint Please share to us how to differentiate UI threads from other additional running threads. I want to know the method of calling above to get the name or id already, the thread name () or thread.id (). Any guidance is appreciated. Use In fact, you really need an example in docs: Import java.util.concurrent.atomic.AtomicInteger; Public category UniqueThreadIdGenerator {Personal Static Ultimate AtomicInteger uniqueId = New AtomicInteger (0); Private stable last throcalal & lt; Integer & gt; Exclusive New = New Thread Local & lt; Integer & gt; () {@ Override protected integer initial value () {unique iod and return (...

iphone - Adjust particle file (.plist) in real time -

I have a cocos 2 project on which I am working and I am wondering if I have a variable in my There is no way to adjust the particle system in real time. Adjusting the plist file ie x gravity to correlate at the speed of the player etc. I'm using particle designer to start files. Any suggestions or directions will be highly appreciated. After starting the file's particle, just modify it in your properties such as you Can do any other particle. Open the particle header file (probably CCParticle.h, perhaps to see what properties it has and which you can modify.)

eclipse - Maven project to java project -

I am new to Maven. I downloaded a Maven project from SVN. I thought it was a Java project in SVN only. Was not as it was. The result is, when I press Ctrl + space , there is no option but an error message that is not in the project build path. And there is no path option too. Project is a kind of development, so I can not make it again as a new Maven project. So, I downloaded this project and used the classpath for the project. Added project files. Now I've got the Buildpath option. But this is not a complete Java project yet none of you can please tell me what to do to create a complete Java project ... Read it and it again Thank you for taking the time to run ... Looks like you're editing in Eclipse In that case, the command line "mvn eclipse: eclipse" will get you set up everything.

How to get detailed error message when QTWebKit fails to load a page? -

QtWebKit कॉल QWebPage :: loadFinished (false) जब कोई वेब पेज लोड करने में विफल - लेकिन देता है यह पता चला है कि विफलताओं के बारे में और अधिक विवरण प्राप्त करने के कुछ तरीके हैं: onResourceRequested लागू करें और onResourceReceived पेज पर कॉलबैक: पेज। OnResourceRequested = function (संसाधन) {लॉग (संसाधन अनुरोध: '+ resource.url); } पेज। OnResourceReceived = function (संसाधन) {लॉग ('प्राप्त संसाधन:' + resource.status + '' + resource.statusText + '' + संसाधन कंटेंट टाइप करें + '' + resource.url); } यदि आप अभी भी अधिक विस्तार की तलाश कर रहे हैं, तो आपको फ़ैंटमजेएस इंटरनल को पैच करना होगा। QTWebKit के त्रुटिएक्स्टेंशन को कार्यान्वित करने के लिए अपने कस्टमपेज ऑब्जेक्ट (WebPage.cpp में) को अपडेट करें। यहां कोड है जो आप ऐसा जोड़ सकते हैं: संरक्षित: bool समर्थन एक्सटेंशन (एक्सटेंशन एक्सटेंशन) const {if (extension == QWebPage :: ErrorPageExtension) {true; } विवरण झूठा है; } Bool एक्सटेंशन (एक्सटेंशन एक्सटेंशन, कॉन्स्ट एक्सटेंशन विकल...

ios - How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory? -

Do I want to delete old (replaceable) data and DerivedData content potential candidate . Since this name is DerivedData , I believe that this information is that, if unavailable, will be generated during a construction phase and if present, it is used during the same phase. It seems logical that I can remove any old project data without fear and if I should build that old project, it will take longer than usual time for the first time, all these derived data again Sector must prepare. Am I wrong here? All intermediate build notifications, debug and release-built in Derived Data folder Goals, as well as the index of your project. When you have strange index problems (code completion is not working properly, constantly re-indexing, or even just a slow project), useful to delete derived data is. The archives folder (a brother of the derived data) contains an archived form, by removing the entire folder, this information knows about all projects . This is your goal,...

Qt cross-platform development? -

I have a little question about running Qt build apps on different operating systems. As a normal user, do I have to install QT Framework to run Qt Apps? I mean I have created a QT App using Windows, then I've built a build for Linux. Do I have to install QT Framework on Linux PC InDER to run that app? Or the App Installer is a way to package all the necessary libraries. Best Relationship You need to deliver dynamic libers with your application As mentioned here: Since the QT system is not a library, it has to be redistributed with your application; To redistribute run-time of the libraries used by the minimum application. Using stable linking, however, has been compiled into Qt run-time executable.

Input sanitization for database interaction in zend framework -

In such commands in the Zend Framework $ mapperObject-> FetchAll ($ where, $ order, $ count, offset offset); Should anyone keep in mind what is in the variable or will the ZF pay attention to the SFG injection? Assuming this is the standard Zend_Db_Table-> FetchAll is using , you are actually secured with SQL injection unless you have your parameters like: $ where = $ select- & gt; Where ('id =?', $ Id) use safe methods to make; // or .. $ where = $ select- & gt; Where ('id =: id'); and not $ where = $ select- & gt; Where ('id = $ id');

Rufus-scheduler variable for time zone - ruby on rails -

I am running a rail application that uses a roof-scheduler to send daily e-mail to all users of noon However, it currently sends it out in the afternoon for the application's time zone "Taipei" I am capturing the user timezone on signup, but in order to enter a variable in an RUFUS-scheduler function Unable to scheduler.cron ('0 15 * * * * @ Time_zone') What is the account. all. What to do Account | Do CODE account.users.each User | DELIVER EMAIL CODE end expiry I do not know if I have to define the @time_zone variable so that the rufus can read it properly. Thanks in advance! Scheduler does not need to care about timezone, it is better thinking in UTC What you want to do is run your work every hour and only search for accounts where it is currently midnight, then your code looks more than this: Scheduler Cron ('0 * * * *') tees = timezone is now part of this account. Where (: timezone => tz). What to do Account | Do CODE account.u...

c++ - Segmentation fault and run time error -

संभव डुप्लिकेट: यह कोड का एक टुकड़ा है ... void main () {char * p = "नमस्कार"; * पी = 'एच'; // विभाजन दोष । } मैं इस तथ्य को समझता हूं कि एक विभाजन गलती है और यह मुझे एक रन टाइम त्रुटि भी देता है। लेकिन मुझे आश्चर्य है, यह एक समय चूक क्यों है ?? प्रोग्राम को निष्पादित करने से पहले कंपाइलर मुझे क्यों नहीं बता सकता? क्यों नहीं यह एक जटिल समय त्रुटि दिखाती है? पुनश्च: मैं विज़ुअल सी ++ 2005 एक्सप्रेस का उपयोग करता हूं .. स्ट्रिंग लीटरल्स वास्तव में प्रकार चार कॉन्स्ट * हैं। हालांकि, पुराने सी कोड के साथ संगतता के लिए जो सही नहीं है, सी ++ उन्हें char * को असाइन करने की अनुमति देता है। इसका अर्थ यह नहीं है कि आपको वास्तव में उन्हें संशोधित करने की अनुमति है।

indexing - Multilingual Search using lucene -

I am searching a multilingual and I will use Lucene as a tool to do this. I already have translated content, each document will have 3 or 4 languages. For indexing and searching, there can be 4 strategies for each strategy, for each document / content: Individual index / directory for each language Is indexed in Each language is indexed in separate documents, but in the same index. Each language is indexed in different fields but in the same document. All languages ​​are indexed in the document in the same area But I have not tested all the cases so far, did anyone tell me that someone Is there a better way to multilingual search? Thank you! In short, it depends on your needs, but I go with option 3 or 1 . 1) Perhaps the best would be the way, if there is no overlap / shared field between languages. 3) If there are many fields, ed is to be shared in languages, because it saves disk space and allows a large portion of the index to fit the file system cach...

Php sort multi dimensional array by key -

I'm trying to do the same thing as a boy in the thread but My KSOST ($ array) number 1 returns What am i doing There is a look at: bool ksort (array & amp; $ array [, int $ sort_flags = SORT_REGULAR]) You can see, ksort returns a boolean value, and Works directly on the given array (note the reference mark & amp; ). So what you're probably doing, assigning the return value of ksort , such as: $ array = ksort ($ array); Instead of , simply: ksort ($ array);

.net - Best place to learn C++ for a C# programmer -

After the first release of .NET, I am now developing using C #. I have never spent on C or C ++ and thought that to get some more awareness it would be a good idea whether anyone has any recommendations for sites, which can provide a good learning / tutorial, Is that the C ++ experience for enterprise in C ++? Thanks Warning: C ++ is not C and only C ++ is concerned with. If you are already AC # Developer I think that you should work in three different directions: 1) Copy the semantics, memory management and CONST keywords, These are the main differences between C # and C ++, introduce yourself to the copy constructor, the director and the assignment operator. Learn how to use RAII idioms I will also suggest a master of effective C + week. This is a great resource. The more effective C ++ is a good lesson on the difference between the pointer and the context. 2) You have to familiarize yourself with the standard library, in my opinion this is a very good book 3...

gps - Get latitude and longitude based on zip using Geocoder class in Android -

People getOrderFrameLocationName (..) in the GeoCoder class returns "Details of the location supplied by a user" and if I If I call with the "London" string or "Statue of Liberty", then it gives the address and I can alert the coordinates I received for the map, but Ii needs latitude and longitude depending on the zip code. If I call the method with the string "33040" (key zip in the key area) - Geocoder gives some other addresses (of course!), Because it can not associate this string with zip. I've made a few tricks: if the user enters the decimal value then adding the "USA" prefix and giving it the exact location of the string "usa 33040" and the other 70%. In 100% of cases, how to find a location from a zip? Thanks! Have you tried the string like "33040, United States"? This format definitely works in Google Maps, so it can work on Android, even though the Android Geodrador is not as good as Google ...

web crawler - How to write a java code for crawling sites with apache nutch 1.3 api? -

I want to write a program with java and nutch 1.3 api on which I searched the web but no sampling Is the code I can do? Thank you Well you do not need to write that Java code ... just dance and install Do you go However you should install the Nach 1.2 which is itself contained. With Nutch1.3 you need to install yourself and you need to install; User Solar for WebSite

how to allow manual or automated choice in powershell? -

I am writing a script where I want users to enter the manual server or they can give a list to the server C: \ temp \ server.txt. The only problem is that I do not know how I do this - that is, I know that I can give a signal to the user to enter below - but I would like them to have a button option or For some things - maybe they can type in a manual server or path and then tell the statistics of PowerShell which is Any idea how do I go to this? Read-Host "Do you want to enter a list of manual computers or computers?" Thanks, promptfront Look at the method. There are many resources on the internet, like @ by the bait. First you have to show a prompt for the choice (where you call PromptForChoice ) and then process the user request (see the switch on the above page). Actually there may be some sample code: $ option = [management. Automation.Host Change description []] (`(new object management .automation.host .special description" & amp; ...

c# byte array xml serialization -

मुझे एक बाइट सरणी मिली सार्वजनिक बाइट [] मान; मैं इसे डेटा के साथ भरता हूं नया बाइट [64]; मैं इसे सीरियल कर देता हूं और मुझे निम्नलिखित XML भाग मिलता है: & lt; values ​​& gt; AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA == & lt; / मान & gt; मैंने निम्न समाधान यहां SO में पाया: [XmlElement ("मान", डेटाटाइप = "हेक्सबरी")] सार्वजनिक बाइट [] मान; अब मुझे "ए" के बजाय "0" के साथ ही ऊपर के समान एक्सएमएल मिलता है। जब मैं सीरियल बना देता हूं एक Int16 / Int32 / sbyte सरणी मुझे XML में ऐसा कुछ मिलता है: & lt; मान & gt; 0 & lt; / values ​​& gt; & LT; मूल्यों & gt; 0 & lt; / मूल्यों & gt; & LT; मूल्यों & gt; 0 & lt; / मूल्यों & gt; एक लंबवत व्यवस्था में। अब मेरा प्रश्न: क्या ऊर्ध्वाधर व्यवस्था में भी बाइट सरणी प्राप्त करना संभव है ? की तरह: & lt; मूल्यों & gt; 00 ...

javascript - How do I make a Time Slider to display site Archive in WordPress? -

I'm thinking something similar (slider widget is a fourth way through webpage). Is there such a plugin available in WordPress? I do not know whether a WordPress plugin is available. But Mi is a jQuery plugin available. Or can you make it your own? I think it should not be difficult if you know how to work with javascript; JQuery

iphone - Keep getting sigabrt error with core data -

I am currently learning about core data and working on a simplified version of Apple's Core Data Tutorial I am here. The code below addEvent method: Event * event = (Event *) [NSEntityDescription insertNewObjectForEntityForName: @ "event" Manage Objects Contact: Manage Objektkoret]; [Event Set Creation Date: [Date of NSDT]]; NSError * error; If (! [ManagedObjectContext save: & amp; error]) {// Error handling} [EventAurray.com object: Event on index: 0]; NSIndexPath * indexPath = [NSIndexPath IndexForFor: 0 in particular: 0]; [Self Telebl V Insert Roshniaetindakspathः [Ansaararaararedvibetः Indekspath] Vithrav animation: Uaitiblwuarvinanimeshnfed]; [Self.tableView scrollToRowAtIndexPath: [NSIndexPath indexPathForRow: 0 Menviseshta: 0] Prskrolpojisn: UITableViewScrollPositionTop animated: YES]; When this method starts, I get a sygbert error. However, I have found that if I include the embedded code of apple, then the error is no longer and I Why can not I do...

performance - Database indices that cover only one value -

itemprop = "text"> I have a large table (millions of records) in which some hundreds of thousands of numbers boolean fields (instead of 0 = 1) I only care about those records which are true (value = 1). Is there a way to create an index that 'indexes' these records? What kind of index should I use? Select Count (*) from records where boolean_field = 1 environment: Oracle 10G (but also If your "false" value is zero instead of zero, you can get the result you want Otherwise, you can create a function-based pointer like this: index IDX (case boolean_field when 1 again 1 end) on create records; This will only be an index of 1s But for Oracle, your questions should be used in your questions: Choose from the record where the case boolean_field when 1 then 1 end = 1;

php - Mysql query to get parent details in a single query -

I have a table where I store categories with my parent ID. Without a PHP recursion, in order to get the details of parents and ID4, what I want to do is table structure is id | Category name | Parent 1 Web 2 2 Software 0 3 PHP 1 4 array 3 Joining yourself Should be sufficient here, in relation to the line of your parents relating to the main claims of your target table, parents , is to be included in the table against themselves. Tablename parent on me.parentid = parent.id where i.id = 4

azure - App Fabric Cache Monitor -

There are limitations for the number of transactions per hour with app fabric cache, is there any way to monitor it? For the first test, to know how much cash we need, and primarily we do not kill the border and the site goes down because we can not access the cash anymore. Yes, you can use the Azure App Manager as described in this blog post: There are some open source tools available on the codeplex as well: I usually stick to blue devices provided.

javascript - can window.onPopState() event handler know direction of navigation? (forward,backward) -

I use Ajax Navigation with the PuestState () method and an Oppstate () handler. When going to the main page for the first time, I display a default content (without Ajax). When a person goes away from the default page and then "goes back", then an empty position is given when they should return to the default page thus, Live on the page (though handler can easily use AJAX to get back the initial content). The only way to decide what is the pushstate initial content, with my initial page load with information about this method, the "back" button works great! But if someone was going to www.stackoverflow.com, the stackflow goes "back" and then goes "forward" to my site, shows initial content, but again again Loads from "Popped" state because the state is not empty. So can I tell in the onPopState () handler, whether the user is going backward or forward?

google analytics - Could someone explain what the following JavaScript is doing? -

यह किसी वेबसाइट के स्क्रिप्ट टैग के अंदर था। Var _gaq = _gaq || []; _gaq.push (['_ setAccount', 'UA-18 914337-1']); _gaq.push ([ '_ trackPageview']); (फ़ंक्शन () {var ga = document.createElement ('script'); ga.type = 'text / javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol? 'Https: // ssl': 'http: // www') + '.google-analytics.com / ga.js'; var s = document.getElementsByTagName ('स्क्रिप्ट') [0]; s.parentNode.insertBefore (जीए, एस);}) (); मैं जावास्क्रिप्ट या jQuery के साथ बहुत परिचित नहीं हूँ। मैंने इसे एक वेबसाइट पर देखा और मैं सोच रहा हूं कि यह क्या करता है ... कोड पोस्ट गूगल के विश्लेषणात्मक ट्रैकिंग कोड है यह jQuery नहीं है, यह शुद्ध जावास्क्रिप्ट है Google का यह अच्छा काम है कि उनका ट्रैकिंग कोड क्या करता है। Google डॉक्स संसाधन से उद्धरण Google के डॉक्स: सामान्य तौर पर, Google Analytics ट्रैकिंग कोड (जीएटीसी) वेब पेज डेटा को निम्न प्रकार...

c# - Static Methods Memory Consumption -

मेरे पास निम्न विधियों के साथ निम्नलिखित वर्ग हैं: सार्वजनिक वर्ग फ़ू {सार्वजनिक स्ट्रिंग एक {get; set;} सार्वजनिक स्थिर Foo New (string a) {Foo newFoo = new Foo (); NewFoo.A = ए; नई वापसी करें; }} सार्वजनिक वर्ग बार {सार्वजनिक शून्य someMethod () {... Foo anotherFoo = Foo.New ("a"); ....}} यदि बार क्लास उप कोड के उपयोग की प्रक्रिया के दौरान फू बनाता है, तो फ़ू कभी भी गुंजाइश के बाहर जाएंगे और कचरा एकत्रित करेगा या फिर फू (क्योंकि यह स्थैतिक विधि) चर newFoo के लिए एक संदर्भ जारी रखने के लिए और इसलिए अन्य Foo कभी नहीं होगा बाहर से गुंजाइश? स्थिर तरीकों की उपस्थिति जीसी के लिए किसी ऑब्जेक्ट की पात्रता को प्रभावित नहीं करती है, केवल उस ऑब्जेक्ट के संदर्भ में आपके मामले में anotherFoo एकमात्र संदर्भ होगा। स्टैक्ड बंद करते समय विधि निष्पादन स्टैक से गैर स्थैतिक तरीकों के समान रखा जाएगा। anotherFoo पीछे अंतर्निहित ऑब्जेक्ट जीसी के लिए योग्य हो जाएगा जब SomeMethod रिटर्न (अच्छी तरह से) , कंपाइलर अधिक आक्रामक है और इसे जीसी-सक्षम बना सकते हैं जब anoth...

c++ - how do traits classes work? -

I'm reading Scott Meyer '' The symptom is talking about classes, I came to understand that the compilation time I need them to determine the type of object, but I did not understand what these classes really do. (Technically speaking) Perhaps you are expecting some kind of magic which makes the type properties Work should be disappointed, in that situation, there is no magic. Type Properties are Manually defined for each type For example, consider iterator_traits , which can be used for typefuffs (e.g. value_type ). By using them, you can iterator_traits & lt; Vector & lt; Int & gt; :: Iterator & gt; :: value_type x; Iterator_traits & lt; Int * & gt; :: value_type y; // `x` and 'y` are type int but for this to work, actually in an obvious definition somewhere & lt; Iterator & gt; is in the header, which reads something such as this: template & lt; Typename T & gt; Straight iterator_traits & lt; T *...

c# - Multiple parameters with Command binding -

I have a text block using Command Binding and Prism Library. This XAML part is: and the model behind it is: Public SearchView Model () {var eventAggregator = ServiceLocator.Current.GetInstance & lt; IEventAggregator & gt; (); FindCommand = New DelegateCommand (() => eventAggregator.GetEvent & lt; SSNChangedEvent & gt; Publish (SSN), () => String.IsNullOhWhiteSpace (Kennitala)); } Common Delayed Command Search Commands {Receive; Set; } Private string SSN; Public string SSN {return {ssn; } Set {if (SSN == value) returns; Ssn = value; RaisePropertyChanged ((= = SSN); FindCommand.RaiseCanExecuteChanged (); }} and this gridview model that listens to trigger this event and fire functions with SSN as a function Public category GridViewModel: NotificationObject {public GridViewModel () {var eventAggregator = ServiceLocator.Current.GetInstance & lt; IEventAggregator & gt; (); EventAggregator.GetEvent & LT; SSNChangedEvent & gt; () GetD...

c++ - Error in overloading operator * -

I have a small problem with overloading of an operator. I have a square of atmospheric data name, in which I define operator *. In the heading I define this method in class: //! Operator * (Scalar) Atmospheric Data Operator * (Constant and QRMult) Const. And definition. In the CPP file, the following is: Atmospheric Atmospheric Data :: Operator * (const qreal & amp; qrMult) const {Atmospheric data xResult; XResult.m_qr temperature = it- & gt; M_qr temperature * QRMult; XResult.m_qrpressure = it- & gt; M_qrpressure * qrMult; XResult.m_qrDensity = it- & gt; M_qrDensity * qrMult; XResult.m_qrAbsoluteHumidity = this- & gt; M_crabsolutamality * qrMult; XResult.m_qrVisibility = it- & gt; M_qrVisibility * qrMult; XResult.m_qrPrecipitationIndex = it- & gt; M_qrPrecipitationIndex * qrMult; XResult.m_xWind.qrNS = this- & gt; M_xWind.qrNS * qrMult; XResult.m_xWind.qrEW = THIS- & gt; M_xWind.qrEW * qrMult; XResult.m_xWind.qrVert = it- & gt; M_...

Recursive jQuery Templates with custom functions causing stack overflow? -

I am creating a jQuery template system which essentially calls the same template as most examples of "recursive" templates There are only templates that are called other templates, even those that are also called templates. In this case, I want to call the same template with a sub-section of the original $ data (AKA $ item.data ), while custom templates Function passed in the original tmpl call option. // Original template call $ ("# someTemplate"). Tmpl (data, {someFunction1: function {itemToCheck} {returns item talker, PE;}, some function 2: function (moodcock) {return item tokak p1 + "," + itemtoocac .2;}}) .andendo (" result"); & Lt ;! - In-template secondary call - & gt; It seems that going through $ item {{tmpl ($ data.sub, $ item), "#someTemplate"}} As the option parameter for the recursive call results in the data parameter is ignored, perhaps because $ item.data is the original object and it only ad...

Confusing Powershell behavior -

A w / Remote confused execute a powershell command I I have a test server (Win 2k8-R2-SP1) Which is called the server, with which Parschell Remoting is enabled correctly. From my Dev Machine (Win 2k8-R2-SP1), the remote execution powershell is correctly enabled in command but when I run a different server from a different server called Serverb (Win 2k8-R2) to execute the same command If I try, I get the following error [ServerA] Connecting to a remote server failed message with the following error: The client can not connect to the destination specified in the request. Verify that the service is running at the destination and accepting the request. Consult the logs and documentation for the WS-management service that runs on the destination, the most common IIS or WinRM if the destination is WinRM service, run the following command at the destination to analyze and configure the WinRM service: "winrm quickconfig" for, about_Remote_Troubleshooting help topics + Series I...

sql server - Stored Procedure Return Value to Fail SQL Job -

I have a stored procedure that is the first step in the SQL job. SP2 compares the dates of tables, if they are equal then SQL can continue the job, but if I do not need to return the price from SP, SQL is due to trigger the job in the failure of the job . What is the best way to do this? Is it with a Writer statement or can just return a value like -99? There is such a clear question, but I've never thought about it before. You can use a try / hold and raiserror, whatever you want Can write error. Usually, I only use an IF statement which returns and then moves forward with the rest code. I think it's a matter of preference / requirement, though Either work will be completed.

css - How do I ensure that visitors on my website see redesigned pages instead of old cached pages and graphics? -

I recently changed the new graphics to my website, new CSS, buttons, etc. When the current user returns to my site, I want to make sure that they serve new pages and style sheets and the browsers do not try to load old stylesheets etc. Previously my headers looked like this - I have a header file public page - and the header file for the pages inside the site (after the user is logged on) & lt; Meta http-equiv = "expires" content = "Mon, December 04, 1999 21: 28:02 GMT" & gt; & Lt; Meta http-equiv = "pragma" content = "no-cache" & gt; & Lt; Meta http-equiv = "Finished" content = "- 1" & gt; & Lt; Meta http-equiv = "cache-control" content = "no-cache, no-store, need-modify" & gt; I am thinking that there is a possibility that the pages inside the site will be presented as fresh because there is no cache in cache control. But will my visitors still see the c...

c# - Why does the button size increases as the listbox size gets populated with data? -

I am a newbie for c # I have created a Windows program with buttons and listbox pops the list box log Because the script runs the application. However, as the listbox pops up with the log, the buttons and labels increase, which makes the stack panels very ugly? Any help / advice will be appreciated. Below is my xaml code. & lt; Grid & gt; & Lt; Border borderbrush = "black" borderline = "2" margin = "0,11,0,5" cornerreadia = "5" background = "white" & gt; & Lt; StackPanel Orientation = "Horizontal" margin = "7,10,7,2" & gt; & Lt; StackPanel Orientation = "Vertical" & gt; & Lt; Text block text = "city" margin = "5" horizontal alignment = "center" & gt; & Lt; / Textblocks & gt; & Lt; Combo box name = "city" selected value = "Chicago" electoral method = "name" & gt; & Lt; ComboBox.Ite...

android - How to hide public methods within inheritable class -

I want to hide some methods from the user in the inherited square. For example: Expands public square test textview {public trial (reference reference) {super.onCreate (reference); } / * Hide this method / / Override protected zero set text (four recurring text) {super. Text (text); }} And then I do not want to see this method within the test class. How can I do this? Sorry for my english It looks like a design problem because it hides a base class As a little dirty, assigning sub-classes should still be able to call base class methods. You can, however, do one of the 2 things. Mark excluded as the method Note: Typically used people are asked not to use method B / C, it will be removed soon , But still works at the present, but it will not work at all here (approximately) ... And unsupported operation throw the exception in the method so that you / others are caught it quickly, called it goes. / * * @Deprecated Do not call this method * / @depracted @ override...

matlab - Blockproc-like function for cell array output -

I like it work smoothly with large (huge) images, however, as far as I understand, It is limited to working with the function, which is the output matrix of the same size as the input they take, so I was wondering if the blockproc , but output a cell array for the function, we can either assume that Output array from the recording function is of the same dimensions as the input matrix, or it only produces a cell element, in this case the total output from the total processing will be a cell array with code. And with reference to the N , the tile has been referenced. I believe that I can build it using myself, but I was wondering if there are any other bilitans or libraries (maybe third parties?) Which I use for it I can, and even completely avoid changing the wheel completely. blockproc (eg # 1) Tiles, etc.) Below is a solution that satisfies the first thing Your criteria image blocks different from image Use IM2COL function to organize t...

button click event in datagridview -

I have a button cell in DataGrid witch. When that button is clicked, another data grid view should be visible. Click button for each button column, new datagrid view should have data differences. I do not know how to implement button click events that are different for each line. Please help me with sample code. You clicked a button-clicked event for button cells in DataGridViewButtonColumn Can not apply. Instead, you use the CellClicked event from DataGridView and determine whether the event has been removed for a cell in your DataGridViewButtonColumn . Private Zero DataGrid View1_CellClick (Object Sender, DataGridViewCellEventArgs e) {// Do not ignore clicks that are not Ignore the event's DataGridViewCellEventArgs.RowIndex property usage Please. In our (E. column index == Datagram view1.Column ["MyButtonColumn"]. Index and E.R. Indx; = 0) {Console.WriteLine ("clicked on the line {0}", E .ro index); }} This is a more complete example of M...

testing - Android JUNIT Get Keyboard View -

I'm trying to test a keyboard app through JUNनेट. The memo app The JUnit app for the memo app P> How do I obtain keyboard references or views from the JUIIT application? FindViewById () does not work from JUnit scope, and it seems that InputMethodManager does not support such functionality. No insights are welcome, thanks! (Sorry for noob Q!) Assuming you check your keyboard's user interface I would like to say the following: Normally the Unit Testing user interface is unusual because you actually have to automatically run the application to click on a button There is another tool like Selenium for test websites (Graphical) user interface testing Unfortunately no GUI Testing Framework me for Android, but I'm sure there is one. In general, try entering a small business logic code in the code related to the user interface, so that you can do unit testing business logic separately, in a nutshell, test a graphical user interface with a unit test ...

graph - Java - generate class diagram by myself -

I am working on a small project in Java described below: Input: List of objects Graph (Nodes with different types of edges: Inheritance, Internal category, Friend class, etc.) Output: Class diagram, as Planner as possible. My problem is: I have some algorithm for some third-party software that will do this for me or at least select nodes and edges as my graph is to maintain Planner as much as possible. EDIT: I think I have not been written clearly which I want ... I do not want to generate a class diagram based on the Java project with my project, + Parsing the file and I get from the list described in the above input. Then I want to call some functions in that list and want to get my idea. I was trying to use the jigraph or gigraphy but unfortunately I did not get the functionality of any graph-principle according to my needs. Regards, Daniel If you use Eclipse IDE, You can use the EUML 2 free plugin. Look at

html - IE8 Browser JavaScript issue -

Can anyone tell me why IE8 does not have the following functions but in Safari 5.1? & lt; A onclick = "javascript: submit ();" & Gt; & Lt; Img src = "picture / next page" width = "20" height = "20" & gt; & Lt; / A & gt; Javascript is enabled in both IE8 and Safari 5.1. Try leaving javascript: 'onclick' only Once I see this syntax, Then it happens when it happens in href. The contents of Onclick are treated as javascript by default. E.g., javascript: submit (); is not a valid JavaScript.

javascript Highcharts object as a C# class -

I am working with JavaScript HiCart and I have created a basic 'Chart Builder' app. One of my goals is that the users create and modify many options because they like and save them in DB. The main problem I am trying to change is the highchart object in the C # class. I'm making it slowly (or manually) with the part I need, as I need them, but ultimately it will take a lot of time to change the whole thing. Ideally, I want the entire High Chart option to make the Object Server Side and send it only in the 100% full High Chart Is there any easy way to do this? Even the HighTrites reference page is: And this is what I have done so far. Public category hicharts {title of the public title {received; Set; } Public Plot Options Option Plot Options [Receive; Set; }} Public class title {public string text {get; Set; }} Public Sector Schemes [Public Series Series (Received; Set; }} Public class series {public string stacking {get; Set; } Public string bordercolor {get; ...

c# - Url Routing Rule is conflicting -

I am implementing URL routing in my ASP.NET application, some of my rules are disputed. Below are some of my rules which are conflicting: rootable.rout.ed. ("query", new route ("question / {subjectname} / {pages}", new rootwolation {{" ("~~~ / questionitemap / subject.aspx")); ("Question topic", "New Topic"), New RootValueation {{"PageO", @ "^ [0-9] * $"}} Route ("question / {subject}" / {subject name} / {pages} ", new root assignment {{" pages ", tap}}, new rootvolution {{" pages ", @" ^ [0-9] * $ "} }, New event lift handler ("~ / question ("Query / {grade name}", new event lift handler ("~ / questionitemap / grade.aspx")); route tabs RouteAd. ("QuestionSubsGrid", new route ("question / {gradename} / {subject}}", new event lift handler ("~ / questionitemap / grade.aspx")); New route ("question / {gra...

iphone - XML Parsing issue with special characters -

I have the administrative file & amp; Expressâ ???? But it is appearing in the form of "express" so I am unable to show anything that is before and ???? You'll find '& amp; See the following links in XML parsing ... Check the XML you are receiving now. If you are not getting the letters with the escape sequence, you have to handle it in your code ..... If you need more details then type here .....

animated gif - GIF specification unsigned definition -

In the GIF specification, here: This 'bytes' I accept naturally, unsigned characters. If this is the case, then it says that when it says 'unsigned'? Uncredited ... what? The exact definition is important because it tells me how many bytes they read. Thank you for your time. "unsigned" in the specification refers to a 16-bit integer, at least the significant byte with. It should be kept in mind that, in C, there is a synonym for unsigned from itself unsigned int , and at that time the GIF specification was written, It was possibly fair to believe that int beats on most machines, so it is not completely unfair that they should not define the conditions they were using.

python - modifying the contents of the sqlilte database -

मेरे पास निम्न सॉल्लिटे 3 डाटाबेस है: नाम: नमूनाफल तालिका: मुख्य फ़ील्ड: id , नाम का विवरण और लिंग नमूना तत्व हैं: "1" "जॉन" "फैट-हेड" "एम" मेरे पास लगभग 2000 पंक्तियाँ हैं, और प्रत्येक फ़ील्ड मानों से उद्धरणों को हटाना चाहते हैं, ताकि मेरा डीबी तत्व इस तरह दिखें: 1 John Fat-Head M ऐसा करने का एक कुशल तरीका क्या होगा? धन्यवाद। मुझे यकीन नहीं है कि यह एक सौ प्रतिशत होगा, या बहुत ही कुशल होगा लेकिन यह प्रयास करें: import sqlite3 db = sqlite3.connect ('sampledb') c = Db.cursor () new_set = [] c.execute ('मुख्य से चुनें *) temp_value = [] पंक्ति में सी के लिए: पंक्ति में आइटम के लिए: temp_value.append (वस्तु [1: -1]) new_set.append (Temp_value) temp_value = [] # इसे वापस डेटाबेस में रखें आशा है कि यह एक दिशानिर्देश के लिए पर्याप्त है!

iphone - Facebook sdk for ios read fan page wall -

I want to read my fan page wall from my iPhone application, how can I do it? Now I have this code for the Pars Graph API: - (IBAction) parsing: (ID) sender {[facebook requestWithGraphPath: @ "PAGE_ID / feed" And DeAlit: Self]; } - (zero) request: (FBCext *) Requested Response Response: (NSRRSpons *) Response {NSLog (@ "Received Response"); } - (Zero) Request: (FBCAEE * *) was requested: (ID) Results {if ([Results is Kindof Class: [NSARRA class]]) {Results = [Results Objectiveindex: 0]; } // NSArray * data = [result objectForKey: @ "data"]; NSArray * from * [resultForKey: @ "from"]; If the (NSDictionary * name) {NSString * myName = [name objectForKey: @ "name"] ([labels2 settext: manneme]]; NSLog (@ " Log in: "My name);} but do not work because they do not parse: The Jason file that I want to parse is: {"data": "105744066144184_231235146928408", "to": {"name": "Alber...

Rails server command not working (other commands, as well) -

I am in the first part of building a Rail app and I can not get the command Rail Server To work, or in fact any other railway order. Whenever I try the Rail Order, I get this help screen: $ rails server usage: new APP_PATH rail [option] option: -r, [--ruby = PATH] ] Path # of your choice Ruby Binary # Default: /home/sgallagher/.rvm/rubies/ruby-1.9.2-p290/bin/ ruby ​​-b, [[builder = builder] # path to the app builder (A file system path or url may be) -M, [-Template = TEMPLATE] # path to an application template (can be a file system path or URL) [- Skip-Gamfile] #Jefffile Do not create [- skip-bundle] # bundle do not install - g, [- -cip-git] # skip guit ignores and keeps and so on (this is the same for me "Rail New" gives the command number what I put into it ...) Any ideas on what may be missing in my system or why are not these orders responding? Thanks P.S. Another strange thing is that when I made this app, initially, I used the command: rail new fi...

java - gson and json deserializing -

यह जेएसन एन्कोडिंग मेरे php echos है: {"detail1": {" कुंजी 1 ":" मान 1 "," कुंजी 2 ":" मान 2 "," key3 ":" value3 "}," detail2 ": [" elementone "," elementtwo "," elementthree "]," detail3 ": [" element1 " , "Element2", "element3"]} मैं आवेदन में जीन कमांड का उपयोग कर रहा हूं: जीएसन जीएसएन = नया जीएसन (); ParseActivity.parsedata = gson.fromJson (परिणाम, नया टाइपटोकन & lt; हैशमैप & lt; स्ट्रिंग, ऑब्जेक्ट & gt; & gt; () {}। GetType ()); लेकिन जीएसएन jsonparseexception दे रहा है और पार्स करने में सक्षम नहीं है, parsedata एक ही प्रकार के एक स्थिर वैरिएबल है। किसी भी मदद के लिए धन्यवाद आपको लौटा हुआ प्रकार में और अधिक स्पष्ट होना चाहिए। फ़ील्ड detail1 एक मानचित्र & lt; स्ट्रिंग, स्ट्रिंग & gt; और अन्य फ़ील्ड हैं सूची & lt; स्ट्रिंग & gt; आपको उन क्षेत्रों के साथ एक आवरण क्लास (जबाबीय...

python - Pisa (XHTML -> PDF) in Django will not display images in PDF -

To start, I have seen other threads on it, and I have tried to do almost everything but it Try to fix. .. When Pisa is used to present an HTML page for PDF, then it is clearly remembered in the pictures given in HTML. To say this, when the page is sung on HTML, everything is bound only, but when I switch the output to PDF using Pisa, the images disappear. The most common thing I found is how to create a link callback function like this: def fetch_resources (uri, rel): path = os.path.join (settings .MEDIA_ROOT, uri.replace (settings.MEDIA_URL, "")) return path def my_view (request, variable1): html = render_to_string ('template_goes_here.html', dict, context_instance = RequestContext (request)) Results = stringio () pdf = Pisa.pisaDocument (StringIO (html.encode ("UTF-8"), dest = result, link_callback = fetch_resources) if not pdf.err: return HttpResponse (result.getvalue (), mimetype = 'application / pdf') HttpResponse Returns ('Pisa H...

combining Date and Time fields to DateTime, SQL Server 2008 -

इस सवाल का पहले से ही एक उत्तर है: 11 उत्तर ठीक है - मैंने पूछा है कुछ लोगों को और ऐसा करने का एक आसान तरीका हो सकता है .... घोषित करें @ तिथि की तारीख घोषित करें @ समय का समय घोषित करें @डेटाट टाइमटाइम का चयन करें @ दिनांक = कन्वर्ट (दिनांक, गेटडाट ()) @ टाइम = कनवर्ट का चयन करें (समय, गेटडाइट ()) @ डेट का चयन करें, @ टाइम, @ डेट + @ टाइम (+ ऑपरेटर विफल रहता है!) क्या मुझे सचमुच करना है: 1) एक स्ट्रिंग में परिवर्तित करें, फिर datetime फ़ील्ड में कनवर्ट करें? 2) तिथि जोड़ें और दिनांक का उपयोग करें, पहले मिनटों को जोड़ने के लिए घंटे पहले, फिर सेकंड ..... @ डेट + कास्ट (@ टाइमटाइम के रूप में टाइम) SQL सर्वर 2012 में और मैं मानता हूं कि SQL सर्वर 2014 आपको दिनांक और समय परिवर्तक दोनों को डाट टाइम में डालने की ज़रूरत है। डास्ट (तिथि दिनांक के रूप में डेट) + कास्ट (@टाटाइम टाइम टाइम)

ruby on rails - Open source alternative to Google Earth -

I need to create a website that needs to do the following: Geographic When a road is selected, show a set of points of interest on that road Show a set of selected roads on the map / Ol> The obstacles are: Ruby on the rail Everything in the stack should be open source I have a What is the need to see it necessary Work tasks? At a glance or OpenstreetMap will only allow you to load maps in a visualizer (this is a collaborative geodatabank Seems like), and at least Openstreetmap's younger brother / visualizer / tool for the OpenLeary version. I've heard Mapfish is a plugin for rail integration, but I do not know what it is. Best wishes to learn the API of your choice!

Mysql - Trying to get just one result back in a union -

What I'm trying to do is query the database that all sites selected for my site are all based on the channel Find channels. Therefore there is a table in DB for all channels, a second table in which all the channel contents are kept, the content that is assigned on the basis of that language. So say I have a listing with features like available in English and Spanish in a channel, so that the same channel from both the main channel table, there are two entries will not be recorded, then channel_local table Channel Table ID but Having the English version of the channel and the Spanish version of the second channel. How can I query the main channel list and I can get the language version of the channel based on the chosen went current language for the site Canl_lokl Table I, but if you do not get any results site of a query in the default language Found all the default within? I thought a union would work, but it would be both an English and a Spanish version. Query: SELECT * ...