Posts

Showing posts from August, 2015

javascript - Undefined variable: window in my script? -

मेरे पास यह त्रुटि है: PHP नोटिस ???? फ़ंक्शन इनवियपोर्ट ($ el) { का हिस्सा मेरा कोड: & lt;? Php $ lazyload = & lt; & lt; & lt; जेएस $ (फ़ंक्शन () {var $ window = $ (window), images = [], imagesToBeLoaded = 0, i, src; फ़ंक्शन थ्रोटल (फ़ंक, प्रतीक्षा) {var टाइमआउट; रिटर्न फ़ंक्शन () {var context = this, विजिट ($ एएल) {} शीर्ष पर = $ Window.scrollTop (), बायां = $ window.scrollLeft (), नीचे = शीर्ष + $ window.height (), दाएं = बायां + $ विंडो.विड्थ (), ऑफ़सेट = $ el.offset (), यह Top = offset .top, thisLeft = offset.left, thisBottom = thisTop + $ el.outerHeight (), यह राइट = इस लिफ्ट + $ el.outerWidth (); ... JS; $ this- & gt; रजिस्टरज ($ lazyload, देखें :: POS_READY यह त्रुटि क्यों है? " & lt;? Php $ lazyload = & lt; & lt; & Lt; 'जेएस' ... जेएस; (देखें)

json - aggregate and sum daily data to month in python -

I have a two-dimensional list in Python, which contains era seconds and related values ​​for the day. There is a need to collect a Jason array of months and the sum of all related daily values. Python inventory looks like this: array = [[1230768000000, 23], [1244073599000, 5], [1269206974000, 8], [1291908086000, 23] ... I need jsonify in a Jason array that looks like this: [{key: '2009-01', Value: 28}, {key: '2009-02', value: 324} ...] I have tried the following code but it really does not really want me to be desired. [D, v] in array: truncated = int (str (d) [: - 3]) year_month = datetime.utcfromtimestamp (truncated) .date for month_aggregate = defaultdict (list). (). Isoformat () [: - 3] month_one [year_m]] .append (v)> gt; & Gt; {'2011-08': [55 9, 601, 545, 578], '2011-09': [572, 491, 595], ...} Tips very much appreciated Try this: array = [[1230768000000, 23] ], [1244073599000, 5], [12 9 9 74000, 8], [12 9, 908...

What is the most appropriate way to save a Map from Class to an Handler object in Java? -

I have an incoming row of requests and want to be able to register different types of handler objects (interface request handles) What is the most appropriate (most efficient and fast) way to store this map (Identify by their class)? To clear: I find the best way to store the relationship between class and handler. I used the map & lt; Class, request handler & gt; Use and make sure to match it with individual types of methods. Private Last Maps & lt; Class, request handler & gt; Handlrank = new Hashmop & lt; & Gt; (); Public & lt; T requests increase & gt; Zero sethandler (class tClass, request handler & lt; T & gt; handler) {handler map. Input (T-class, handler); } Public & lt; T requests increase & gt; RequestHandler & LT; T & gt; GetHandler (class gt; tClass) {return (request handler & lt; T & gt;) handler Map.get (tClass); }

DBAccount as a @property in iOS Dropbox Datastore API -

I am looking at the sample work app which uses the Dropbox Datastore API: inside Work Controller. M is a account property: @property (nonatomic, readonly) DBAccount * account; In other areas of the class, this account, as referred to as self.account , and I have found that it is a private method: - (DBAccount *) account {return self.accountManager.linkedAccount; } ... but I am unsure about how it relates to the readonly property. Where is the account to begin? If it is inside the above method, then I can not see anywhere that this method is called. Thank you. account is a property, so whenever you access it, Then the -account method is called. (If this is not readable , then a consistent method -setout which at any time specifies a value for the property ). Here the "Properties" section covers this bit here:.

Using ServiceStack AutoQuery feature causes Autogeneration of WSDL failed error -

जब मैं ServiceStack में AutoQuery सुविधा को सक्षम करता हूं तो मुझे WSDL का Autogeneration विफल त्रुटि। निम्न अपवाद दिखाया गया है: सिस्टम.रंटाईम। सेरिअलाइज़ेशन.अवैधडेटा कॉन्ट्रैक्ट एक्सपैशन: 'सर्विस स्टैक .क्यूरीआरपीएसपॉइंट` 1 [टी] स्कीमा प्रकार के रूप में निर्यात नहीं किया जा सकता क्योंकि यह एक खुले सामान्य प्रकार है आप केवल एक सामान्य प्रकार का निर्यात कर सकते हैं यदि इसके सामान्य पैरामीटर प्रकार वास्तविक प्रकार होते हैं System.Runtime.Serialization.DataContractSet.EnsureTypeNotGeneric (प्रकार प्रकार) पर System.Runtime.Serialization.XsdDataContractExporter.Export (ICollection` 1 प्रकारों) ServiceStack.XsdUtils.GetXmlSchemaSet (ICollection` 1 ऑपरेशन प्रकार) ServiceStack.Metadata.XsdGenerator.ToString पर () सर्विस स्टैक। मेटाडाटा में। एसडीएल मैटडेटाहैंडलरबेस। गेटवेस्डल टेम्पलेट (सर्विस स्टेशन। मेटाडाटा। एसडीएल मैटडाडाहाण्डलरबास.एक्सेक्यूटेस (आईआरइवेईट एचपीआरईक, आईआरएसपीएसेंस एचपीआरएस) में एक्सएसएम मेटाडेट्स टेम्पलेट (एक्सएसडीमैटडेटा ऑपरेशन, स्ट्रिंग बेसउरी, बूलियन ऑप्टिमा...

google cloud messaging - PushSharp "Notification send timed out" issue -

I am trying to use Pushshahar to send information to my mobile devices using Google Gcm. Based on this, I have downloaded my sample code from Github, I have written my sample code. Below is my sample code. var googleKey = CustomConfigurationManager.GetValueFromSection ("appSettings", "GoogleServerAccessKey"); AndroidPushBroker.RegisterGcmService (New PushSharp.Android.GcmPushChannelSettings (googleKey)); GCMNotification androidNotifcation = new GcmNotification (). WithDryRun () .Json ("{\" Warning \ ": \" Hello World! \ ", \" Badge \ ": 7, \" Sound \ ": \" sound.caf \ "}); AndroidPushBroker.QueueNotification (androidNotifcation); The problem is that I have used WithDryRun () and when adding the request it shows "Zedson data" with "dry_run": true, but still I get an error due to the failure due to the notification: "Send notification Time is over. " Anyone can tell me what I...

python - Strip all matching characters from string -

निम्न में से किसी भी स्ट्रिंग को दिया गया है: 'test' 'test =' 'test == '' test === ' मैं उस पर एक फ़ंक्शन चलाने चाहूंगा जो कि अंत से किसी भी / सभी' = 'वर्णों को निकाल देगा। अब, मैं दो सेकंड में ऐसा कुछ लिख सकता हूं, वास्तव में, यहां एक जाता है, और मैं एक दर्जन वैकल्पिक दृष्टिकोण इमेजिंग कर सकता हूं: def सफाई (): p = passwd () जबकि सच : New_p = p.rstrip ('=') अगर लैन (new_p) == लेन (पी): रिटर्न new_p p = new_p लेकिन मैं सोच रहा था कि ऐसा कुछ भी पायथन मानक पुस्तकालय के हिस्से के रूप में पहले से ही मौजूद है? str.rstrip ( ) पहले से सभी मिलान करने वाले पात्रों को निकालता है: & gt; & gt; & gt; 'परीक्षण ===='। Rstrip ('=') 'परीक्षण' लूप की कोई आवश्यकता नहीं है।

java - ActionBean is always null on page load -

I am using strips to create a small Java application. I am able to post back to my ActionBeans, but $ (verb == empty) on page load is always correct, to reduce potential issues, I'm using Hello Hello World program I am here. My Action: Package Stripbook. Action; Import java.util.Date; Import java.util.Random; Import net.sourceforge.stripes.action.ActionBean; Import net.sourceforge.stripes.action.ActionBeanContext; Import net.sourceforge.stripes.action.DefaultHandler; Import net.sourceforge.stripes.action.ForwardResolution; Import net.sourceforge.stripes.action.Resolution; Public class Hello implementation of ActionBean ActionBean {/ * (1) * / Private ActionBean Contact CTX; Public actionben contact getContext () {return CTX; } Public Zero Setcontext (Action Bean Contex CTX) {this.ctx = ctx; } Private Dead Date; / * (2) * / Public Debt Mill () {Date of Return; } @ Default handler public resolution current date () {/ * (3) * / date = new date (); Return to the new Forward ...

python - Installing pymatbridge -

I am using canopy distribution and when I try to install Peamatbridge using 'PIP installation permitbridge' I get an error saying this Pymatbridge does not work on win32 I've got a 64-bit version of the canopy, so I do not understand the meaning. Downloading / unpacking setup.py (path: C) to run pymatbridge Package: egg_info (most recent last call) for Peamatbridge traceback: The file "& lt; string & gt; ", Line 17, & lt; Module & gt; File "C: \ user \ user \ apeda \ local \ anthith \ canopy \ user \ build \ pimetbridge \ setup \ py", line 25, in & lt; Module & gt; ValueError ("Pymatbridge does not work on win32") ValueError: pymatbridge does not work on win32 Full output from command python setup.py egg_info: Traceback (most recent call final): File "& lt; string & gt; ; ", In line 17, in & lt; Module & gt; File "C: \ user \ user \ apeda \ local \ anthith \ canopy \ user \ build \ p...

jquery - how to set the child number in a table -

I can call children manually like this $ (" Tr & gt; td: nth-child (1) tr: nth-child (n + 3) "). AddClass ("ClassName"); How to pass this value, I var index = 5 in JavaScript; $ ("Tr> td: nth-child (1) tr: nth-child (" + + "" "). AddClass (" ClassName "); It does not work as it is. My scenario is that we have to find the indicator of a specific column and cross that index value. $ ("tr & gt; td: nth-child (1)) Tr For the sake of completeness, I also like the @Windered method: There is no string formatting bug like this: pre> $ ("tr & gt; td: nth-child (1) tr"). Eq (zero badge index) )

redis - How flush all keys on one namespace only? -

I want to know how can we just delete all keys for a particular name space? FLUSHALL Delete all keys, this is a problem when using more than one app with the same app. On the related topic, you should really use shared databases with caution - all forms of confusion Along with the fact that it can come along with the fact that it is not compatible with the upcoming Radis Cluster (v3 which is in Beta, expected release EOI). You may want to see this benchmark post about more background on the subject.

rebol2 - Retrieving function arguments programatically in Rebol -

यह खोल स्तर पर काम करता है: & gt; & gt; A: "हैलो" == "हैलो" & gt; & gt; लेकिन एक फ़ंक्शन के भीतर: f: func [arg1] [v1] : मिल 'arg1? V1 v2: मिलना-शब्द-शब्द "arg1"? V2] & gt; & gt; च "अलविदा" वी 1 मूल्य का एक स्ट्रिंग है: "अलविदा" ** स्क्रिप्ट त्रुटि: arg1 का कोई मान नहीं है ** कहां: f ** पास: v2: टू-लिट-शब्द "arg1" प्राप्त करें मैं "मिल" का उपयोग कर तर्क मान कैसे प्राप्त करूं? शुरुआत के लिए, आप इसका उल्लेख करेंगे कि जब आप v1 और v2 का उपयोग FUNC में करते हैं, तो आप उन्हें सम्मिलित संदर्भ में लिख रहे हैं। तो वे "वैश्विक चर" की तरह काम करेंगे दबाने के लिए कि आप अपने FUNC-spec func [arg1 / local v1 v2] में डाल दिया था। (ध्यान दें: Rebol3 फ़ंक्शन है जो स्थानीय लोगों के लिए स्वचालित रूप से स्कैन करता है और आपके लिए अंतर्निहित FUNC को बनाता है। लेकिन फ़ंक्शन का मतलब रीबोल 2 में कुछ और है, जो कि FUNCT के रूप में उपलब्ध है।) इसके अलावा: जब आप प्राप्त करें लि...

python - Celery multi with queues set up not receiving tasks from django -

I am running my workers with the following command: Celery- One map Multi-start 4-D debug -Q1: 3 qi1, qi2-q: 4 qi3 When I run the workers start very well active inspection of celery result = series ( Task1 .s (** kwargs) .set (queue = 'queue1'), task2.s (** kwargs) .set (queue = 'queue2')) () i results The result of shift as a result Get all the work IDs to be done and record them in the database for further investigation. When I release task = asyncResult (task.id) task.status I get 'pending' for each job, I Starting with the series. Celery logs are not receiving any functions. However, when I issue a yes celery item > I get a message that asyncrasult on my works actually removed from 1 queue. Has been removed from the station, which is shown as 'Pending' and the functions are never started. I use rabbitmq-server as the default configuration for my celestial config and it is really weird But in the other en...

php - How do you JOIN in SQL when you need the result of the query as a parameter? -

I am currently doing a query and then another query is running within that time when I know that Poor Practice I know that I need to be connected in some way, but to be a part of the external question I need the result of internal question and I am not sure how to do it. $ department = $ db- & gt; Prepare ("Select * FROM Dosage"); $ Departments- & gt; Executed (); While ($ line = $ section-> get (PDF :: FETCH_ASSOC)) {$ department_id = $ row ['department_id']; $ Total_problems = $ db- & gt; Prepare ("Select COUNT (*)` from the problems where the department = $ department_id "); $ Total_problems- & gt; Executed (); $ Depart_problems = $ total_problems- & gt; Fetch column (0); } I have tried to connect a lot but I can not find my head properly around it. You are searching for a group query and a left External Participant : SELECT d.department_id, DDPPIDAD by DPPATADG Group in departments related to counts (PDEPMENT_I...

vb.net - How to browse an image using OpenFileDialog and save it in images folder - Silverlight OOB - VB -

I am developing a Silverlight OOB application using VB, and I need to implement the method where the user Select an image. PNG) is from an OpenFileDialog file and it saves this image in the image folder in the project, because it is not possible to exclude an image from the project, so I have to save it in the image folder, but I do not know how to do it , Someone helps me !!! Even what I have done so far: dim = open new OpenFile DLOG of.philter = "image files (* .png) | * .png" ofd in the form of Open Philadelphology .FilterIndex = 1 if ODD ShowDialog () then dimmed as imgd string = of.file.DirectoryName & amp; "\" & Amp; Bitmapimage = new bitmap image (new yuri (imgd)) as the .im.img .am if You do not need to copy files. Just load by URI instead of FileStream when running outside the browser in the outside browser settings of your code . String = "C: \ Users \ Public \ Picture \ Sample Pictures \ Penguin.JPG" as Bit Bitmap...

mysqli - About PHP prepared statement -

I am working for an easy function to execute a prepared statement. Now I get a problem: expand mysqli_extend class \ mysqli {function pquery () {$ input = func_get_args (); If ($ stmt = parent :: ready ($ input [0])) {$ input = array_slice ($ input, 1); $ Index = count ($ input); If ($ index) {// non-0 == true, 0 == wrong $ typed star = ''; While ($ ele = current ($ input)) {$ type = gettype ($ ele); Switch ($ type) {case "integer": $ typestr = 'I'; break; Case "double": $ typestr = 'D'; break; Case "string": $ typestr. = 'S'; break; Default: $ typestr = 'B'; break; } Next ($ input); } Array_unshift ($ input, $ typewriter); // Console to check out the output content ($ ele = current ($ input)) {echo key ($ input) ":". $ Ele "\ T"; Next ($ input); } Call_user_func_array (array ($ stmt, 'bind_Param'), $ input); } $ Stmt- & gt; carry about (); } Back true; }} And the command to ...

c++ - auto keyword with & -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब मेरे पास कोड का यह टुकड़ा है : प्राइवेसी_क्लू & lt; जोड़ी और लेफ्टिनेंट; int, int & gt ;, वेक्टर & lt; जोड़ी & lt; int, int & gt; & gt ;, तुलना & gt; एच; ऑटो में & amp; P = H.top (); प्रिंट (p.first); मुझे समझ में नहीं आया कि इसके पास और के बाद स्वतः है। यह & amp; का उपयोग किए बिना, क्या कोड अभी भी सही है? & amp; का उपयोग करते समय क्या कोई अंतर है या नहीं? क्योंकि मुझे लगता है कि ऑटो स्वतः सही प्रकार का अनुमान लगाएगा। और बाद स्वतः जैसी चीज़ अन्य घोषणाओं में करती है वैरिएबल p एक संदर्भ होगा। & amp; बिना किसी प्रतिलिपि के द्वारा शुरू किया गया एक वस्तु होगी। या तो सही हो सकता है, लेकिन यह संभव है कि या तो मूल या प्रतिलिपि (या स्थानांतरित मूल्य, std :: move () ) के साथ अधिक उपयुक्त है।

javascript - Find a polygon by attribute Google map engine -

Image
I have created a map through Google Maps Engine (no light / supportive). And then a couple uploaded to me as a data source. I have successfully published the map and access links are available now, either for embedding, km list, or for asset ID. So I have presented the map within my app that looks like this: So it's really great, each polygon has a set of features, such as OBJETIDDI, and so on. What do I want to ask, can I create some kind of text area in which I can write the value for a feature (at least OBJECTID_1 - that is a type of polygon / area ID) and then submit trigger a click event on that polygon (such as shown in a photo), or in that area Zoom. I am not very familiar with technology, but given API access, would it be possible through the web service / anything? In fact, how to get a polygon defined polygon, this is the OBJET IDE! As this is a programming forum, I will try and give you programming answers. If you want to use Maps Engine produ...

python - Enums in C: What assumptions can be made about the value of the underlying variable? -

I am writing some Pyro code which calls a C DLL call through the python ctypes module Does. In the question, DLL defines some return value in header files in enum s: // // Device Status // Enum {FT_OK, FT_INVALID_HANDLE, FT_DEVICE_NOT_FOUND, FT_DEVICE_NOT_OPENED, FT_IO_ERROR, FT_INSUFFICIENT_RESOURCES, FT_INVALID_PARAMETER, & lt; Continuous --- Erosion & gt; }; I am interfering with Python, so I do not have the original energy. Can I assume that the content of the value starts with the value of 0 , and for each item can be increased by 1? It is very easy to implement, but it seems that I rely on the details of the implementation of the compiler. I have digged something about the difference of enum , but I did not find much information about how they work internally. C / C # / The only document of how to use them. I know that if there were constant definitions for different variables in enum , then I could trust it, but in this case, I can interface with t...

c# - Deleting rows in a datagrid -

Image
I have recently moved from WinForms to WPF and it seems that it is more complicated to deal with datagrids. . . Data grid x; & lt :: name = "When I run the application manually in the datagrid from the user interface to the datagrid I have done the XAML code following the DataGridAdd" HorizontalAlignment = "Left" margin = "591,360,0,0" VerticalAlignment = "top" height = "118" width = "202" AutoGenerateColumns = "false" ScrollViewer.CanContentScroll = "false" VerticalScrollBarVisibility = "Disabled" grid. Column = "1" canuser diameter = "true" & gt; & Lt; DataGrid.Columns & gt; & Lt; DataGridTextColumn = Binding "{Binding Varenr}" ClipboardContentBinding = "{x: Nulled}" Header = "Vare Nr .:" width = "100" /> & Lt; DataGridTextColumn binding = "{binding antal}" clipboard contentbinding = "...

ios - Swift: Make launch image appear slightly longer? -

इस सवाल का पहले से ही एक उत्तर है: 18 उत्तर इसलिए जब मैं अपना लम्बे समय तक छवि को लॉन्च करने के लिए उपयोगकर्ता को परेशान या भ्रामक लग सकता है, जब मैं एक्सकोड सिम्युलेटर लॉन्च करता हूं, लांच इमेज केवल 0.5 सेकेंड तक रहता है - 1 सेकंड। मैं चाहता हूं कि वह 1 और दूसरे की तरह रहें मैं यह कैसे कर सकता हूँ? आप अपने दृश्य नियंत्रक के दृश्य में एक UIImageView जोड़ सकते हैं, फिर एक NSTimer या performSelector: withObject: afterDelay: इसे हटाने के लिए एक विधि कॉल करने के लिए कॉल करें।

datetime - Format date-time as seasons in R? -

It is possible to format POSIXlt date-time objects as months: In R, format (session time (), format = '% Y-% m') There is no way to do the same thing with the weather, or the 3 month group (DJF , MAM), JJA, son)? These divisions are really common in climatological and ecological sciences, and it would be nice to have a great way to format them quickly with months. Clearly the DJF gets more than 2 years, but for purposes or for this question, which does not really matter - only push them continuously in any given year (or, ideally, in specifying it) Will be able to enter that year). I am using the output as an index for by () , so the output format does not make any difference, just every year / season is unique Edit: Example Data: Date & lt; - Sys.Date () + seq (1,380, = 35) Date & lt; - Structure (c (16277, 16,312, 16347, 16, 382, ​​16417, 16,452, 16,487, 16,522, 16,557, 16,592, 16,627), class = "date") # dates [1] "2014-07-26" ...

xml - Possible to change element name upon transformation -

मेरे पास यह इनपुट XML है: & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & LT; दस्तावेज़ & gt; & LT; फ़ाइल & gt; & LT; ईद & gt; 123 & lt; / आईडी & gt; & LT; निर्मित & gt; 21/12/2013 और lt; / निर्मित & gt; & Lt; / फ़ाइल & gt; & LT; कर्मचारी & gt; & LT; व्यक्तिगत & gt; & Lt; नाम & gt; जुआन डेला क्रूज़ & lt; / नाम & gt; & LT; उम्र & gt; 27 & lt; / उम्र & gt; & LT; पता & gt; & LT; Street1 & gt; Street1 & lt; / Street1 & gt; & LT; Street2 & gt; Street2 & lt; / Street2 & gt; & LT; PostalCode & gt; 123456 & lt; / PostalCode & gt; & Lt; / पता & gt; & Lt; / व्यक्तिगत & gt; & LT; रोजगार & gt; & LT; DateHired & gt; 21/12/2013 और lt; / DateHired & gt; & LT; स्थिति & gt; क्लर्क & lt; / स्थिति & gt; & LT; EmploymentType & gt; संविदात्मक & lt; ...

ios8 - How do I add a swift class to my framework header? -

In Xcode 6 (Beta 6 6A 267N), I added a framework (selecting Swift as a language) And in the framework header this is the comment: // In this header, you should import all the public headers of your structure using statements like #import I SO has found that you have your header file name Must have to add "-swift", although I was not able to work it. I have also added $ (SRCROOT) in my header search path. It seems that you are trying to create your swift library? In which case, you do not need to create an external interface described here: With Swift you can mark your public interface by dividing sections and methods by public . The header with the -Swift suffix is ​​one and that you use to pull the Objective-C code so that it can be used in your swift application.

javascript - Select2 AJAX with JSON -

I am trying to populate my input with select2 using the provided JSON Here "JSON": {"airport": [{"id": "1", "code": "AMQ", "city": "ambon", "country": "Indonesia"} "", "" "," 2 "," code ":" BJW "," city ":" barwa "," country ":" indonesia "}}} and HTML code: input class = "" type = 'hidden' value = "192" data-init-text = 'departure city' name = 'Input' id = 'departure-airport' style = "width: 300px" /> and JS code: $ ( Document) .ready (function () {$ ('# departure-airport'). Select2 ({min Interface length: 1, Ajax: {url: "http: // localhost: 4000 / Api / airports.json ", data type: 'jason', results: function (data) {return {result: data}}}}})}}; in console There is no error, but do ...

java - Android ,Day difference between two month -

इस सवाल का पहले से ही एक उत्तर है: 6 जवाब मैं कोड लिखने का प्रयास कर रहा हूं दो दिनों के बीच दिन का अंतर जानने के लिए यह काम तब होगा जब महीने का 31 दिन होता है, लेकिन जब महीने में 30 दिन होते हैं तो परिणाम 1 दिन कम होता है, यह मामला 2 9 दिनों के साथ, 28 दिनों का महीना कम होता है और यह 2,3 दिन होता है I आशा है कि मुझे पता है कि क्यों कोड: सार्वजनिक पूर्ण तारीखआगेबाद (कैलेंडर समाप्ति) {// वर्तमान तिथि प्राप्त करने के लिए GregorianCalendar currentDate = new GregorianCalendar (); CurrentDate = (ग्रेगोरीयन कैलेंडर) समाप्ति तिथि; // सीएएल.एडीडी वर्ष में 1 महीने का दिन है 1 नहीं 1 वर्तमान डेट.एड (कैलेंडर.MONTH, 1); // COMPAISSON currentDate.set (कैलेंडर.DAY_OF_MONTH, 1) के लिए सबसे पहले में पहली तारीख को सेट करने के लिए; // स्टार्ट की तारीख को सेट करने के लिए 1/1/2013 ग्रेगोरियन कैलंडर प्रारंभआती = नया ग्रेगोरियन कैलेंडार (2013, 1, 1); // स्टार्ट की तारीख और सीयूटीएएफ के बीच अंतर को खोजने के लिए लंबे समय से अंतर = (((currentDate.getTimeInMillis () - startDate.getTimeInMillis...

c - Linking so file within android ndk -

I am trying to use openssl inside an Android NDK. I have used openssl source code, which is capable of creating libssl.so and libcrypto.so files. Currently I am stuck in connecting those 2 files with my Jenny interface C file. Below are my Android .mk file, called my JNI interface of file "security.c" LOCAL_PATH: = $ # Prebuilt include libssl (call my-directory ) $ (CLEAR_VARS) LOCAL_MODULE: = ssl LOCAL_SRC_FILES: $ $ (PREBUILT_SHARED_LIBRARY) $ prebuilt libcrypto Include $ (CLEAR_VARS) LOCAL_MODULE: = Crypto LOCAL_SRC_FILES: $ libprebuilt / libcrypto.so $ (PREBUILT_SHARED_LIBRARY) $ (CLEAR_VARS) included LOCAL_MODULE = Security LOCAL_SRC_FILES: = security.c LOCAL_SHARED_LIBRARIES = SSL crypto include $ (BUILD_SHARED_LIBRARY) in and this is my security. c file # Include & lt; Math.h> # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Time.h> # Include & lt; Jni.h & gt; #include "Openssl / ...

Killing a process using sh and bash -

I have to kill a process by using the same command in sh and bash (in a script). Normally I will do the following: SCRIPT = $ (basename $ 0) #So script kills itself killall-9 $ SCRIPT # own only Though it does not appear to be used in SAH Any suggestions on any solution that will work in either. Is there a simpler or more correct way to get a script completely out of place? I have repeatedly revisited this question many times and have never been officially found in the right way. Let the script kill itself, point it to $$ which Presents Shell's process ID. kill "$$" "$$" Avoid SIGKILL ( 9 ) when not necessary only Use it on applications that do not respond significantly. The default signal sent is SIGTERM (15), and there are other signals that can also end the process which can be safer than the SIGKILL. One of these is Siguquit, Sigabert, and SIGHUP.

jquery delay image animate -

I am from Argentina and I have a question, hope you can help me. I am creating a slider and I have a problem with the following code. var tmpImg = new image (); TmpImg.src = 'http: //mlm-s1-p.mlstatic.com/reloj-movado-movimien-de-cuarzo-con-caja-dorada-y-tapa-acero-4269-MLM4903532600_082013-F.jpg'; TmpImg.onload = function () {var alto = tmpImg.height; Var Largo = TMPIMG Wide; $ ("#photo") Animate ({width: Largo, height: alto,}, {duration: 500, phase: function () {$ ('# photo'). CSS ({condition: 'full', left: ($ (window). () - $ ('# photo') External Wide ()) / 2, top: ($ (window) .hit () - $ ('# photo'). External head ())}};} }); . ("# Photo") $ enclosed (tmpImg); }; Only interest in this thing is that the photo loads when the animation is over. $ ("#photos"). Attached (tmpImg); Sorry for English and thank you very much. You have to preload your photo before it's shown. Example with jQuery:...

sql - MySQL SELECT LIKE space encoding issue? -

I've spent several hours trying to solve this problem, but I can not solve it. A column contains values ​​like values, and the value contains some spaces. one? Å æ æ æ? An å ¨ ¨ å å å å å æ ?? Μäº ?? Æ ???? Ç®¡ I want all values ​​"one" ???? Åña ¼ æ ???? One? - One? Line Ç ?? Μäº ?? Æ ???? 管 "but spaces can be ASCII encoding ( '\ x0a'), or UTF8 encoding ( '\ xa0'), when I will thus execute SQL string, any back. select * from `icbase_icattrvalue` like Jhan` value` 'a ???? å | ä¼ æ ???? Å ?? ¨ - a ???? Ç ?? Μäº ?? Æ ??? ? 管 ' I like SQL try: select * from `icbase_icattrvalue` where REPLACE (` value`,' \ xa0 ',' like space ') (' a '????' 'an æ? Å ?? ¨ ¨ ¨ μ μ μ μ μ æ æ æ æ ç μ μ μ μ', '\ xa0', ' ') Range 0 30 or select * icbase_ica The ttrvalue` where REPLACE ( `value`, using UTF8 four (160 CONVERT ()), '') such as REPLACE ( 'a ???? å | ä¼ æ ???? Å ?? ¨...

php - Yii Session Variable -

I am working with session variables in the YII framework. I created session variables in Site Controller As Public Function Authentication () {$ user = UserSignupForm :: model () - & Gt; FindByAttributes (array ('emailid' => = this- & gt; username)); If ($ user === empty) $ this- & gt; ErrorCode = self :: ERROR_USERNAME_INVALID; And if ($ user- & gt; password! == ($ this- & gt; password)) $ this- & gt; ErrorCode = self :: ERROR_PASSWORD_INVALID; Else {$ connection = Yii :: app () - & gt; Db; $ Sql ​​= "Choose roles from the ralinom, where the role has been played (to play a role from Uire's where the user-in-the-user select from user iFO, where e-mail id = 'user-> e-mail id');"; $ Command = $ connection- & gt; CreateCommand ($ sql); $ Roles = $ command- & gt; Query still (); // $ this- & gt; Setstate ('roles', $ roles ['0'] ['theft']); // $ this- & gt; Setstate ('user...

node.js - Connect to socket.io(nodejs) via PHP -

I needed to connect to the websocket via PHP, send data and disconnect immediately. There is no need to wait for the response from the socket I used but did not work after updating the library. Please tell me how to join the websocket via PHP? I also had to face this problem. We requested a webcourse to many structures. I wrote a library for you, you can use it. You need a simple socket, connect to the nodes, type in this message format. 42 ["message", "your message"] 'symbolic hibi 10 (or hb 13) and send to websocket

html5 - File upload styling css -

Image
I have used the Season for uploading my file I It has successfully implemented but I want to show the "Which image will I choose" . Like the screenshot below. Is it by CSS Received only ??? Is it possible ?? Please help. Please try the CSS below. .btn-primary {color: #ffffff; Text-shadow: 0-1 pixel RGBA (0, 0, 0, 0.25); Background color: # 006 DCC; Background image: -Mo-linear-shield (top, # 0088 cc, # 0044 cc); Background image: -WebKit-gradient (linear, 0, 0, 100%, from (# 0088 cc), from (# 0044 cc)); Background-image: -webkit-linear-shield (top, # 0088 cc, # 0044 cc); Background image: -o linear shield (top, # 0088 cc, # 0044 cc); Background image: Linear-gradient (bottom, # 0088 cc, # 0044 cc); Double-repeat: repeat-x; Filters: Presumed: DXimage Transform. Microsoft.gradient (startColorstr = '# ff0088cc', endocrostustrate = '#ff 0044cc', gradient type = 0); Border color: # 0044cc # 0044cc # 002a80; Border color: RGBA (0, 0, 0, 0.1) RG...

how to use mouse event to get out loop in opencv using setmousecallback -

OpenCV's setmousecallback () to break the loop (for webcam video frames) as soon as the user presses intxor, int yCor, int flag, blank * user input) {point 3_ & lt; Int & gt; * Mouse input = (Point 3_ & lt; int & gt; *) User Input; Mouse inputs-> X = xCor; Mouse inputs-> Y = yCor; MouseInputs- & gt; Z = event; } // for for loop (;;) {Camera & gt; & Gt; Frame; Imshow ("average frame", here is the 'code'; setmusickelback ("average frame", blmozole, and mouse input); if (mouseInputs.z == EVENT_RBUTTONDOWN) {cout & lt; & lt; "user selected ROI Highest Director " // mouse callback function zero getMouseLoc (int event, int XCor, int yCor, int flag, empty * user input) {point3_ * mouse input = (point 3_ & Lt; int & gt; *) User Input; MouseInputs-> gt = x = xCor; MouseInputs-> Y = yCor; MouseInputs-> gt = event;} // It should not be inside loop, one The bar is sufficient: Point3_ m...

jce - Using bouncycastle in Websphere liberty profile -

Our application uses Bonsikastl I'm trying to now deploy my app on websphere independence profile and bottom error getting [err] java.io.IOException: manufacturing error Mac: java.lang.SecurityException: JCE can not be certified provider BC [Err] org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineLoad ([err] .loadPrivateKeyByIssuer Unknown Source) [err on java.security.KeyStore.load on] (KeyStore.java:1214) on com.manh.jwt.JwtKeyManager (JwtKeyManager.java:213) so instead of Web-INF / lib having bouncycastle jar dir, I created a shared lib and as a the library added privateLibraryRef I still get the same error in my web application Here is my server.xml for your reference . & Lt ;. Server Details = "New Server" & gt; & Lt ;! - Enable features - & gt; & Lt; FeatureManager & gt; & Lt; Feature & gt; Jsp-2.2 & lt; / Feature & gt; & Lt; Feature & gt; Servlet-3.0 & lt; / Feature & gt; & Lt; / Feature...

javascript - Drop down list inside a pop up window (comes up when button is pressed) -

Currently I'm trying to create a button that creates a popup box which in turn has a drop down list, However, I have to figure out how to insert a drop down list inside the pop up window. Can someone help me? I currently have a pop-up window, but I want to convert this form to a drop down list. Refer to & lt; P & gt; Do you have any contracts or a conflict? & Lt; / P & gt; & Lt; Button onclick = "myfunction ()" & gt; Try it & lt; / Button & gt; & Lt; P id = "demo" & gt; & Lt; / P & gt; & Lt; Script & gt; Function myFunction () {var person = prompt ("Please enter your name", ""); } & Lt; / Script & gt; You are using hint The default for Input is> Browser . If you want popup with the dropdown you choose, you will have to create custom popup it is used.

c++ - Update textbox value from another cpp -

I have to get text box value from another CPP file. We say that a .cpp has the following code snippet that actually creates a text box. CreateWindow (TEXT ("edit"), text ("test"), WS_CHILD | WS_VISIBLE | WS_BORDER, 100, 20, 140, 20, HWD, Nouvel, Nouel, Null); I have to get the output or textbox value that we have created in a CPPP, but from the second CPP file to the other CPP. How do I do this? First of all, you have to do two things to make that editable useable. (1) Pass a unique ID as the HMEU parameter of the CreateWindow call. Control IDs are commonly declared in resource.h. You need to use that ID to search for messages from the edit control. (2) Save the HWD created by HTMLML in a global variable (HWWD Edited) Now one can set or read text using cpp hwd edit. Make the following declaration in a declaration External HWND HWAdit; In both CPP files, add #include "one.h" can now set or read text using second.cpp hwndEdit, in the...

java - how to add rating bar in Linear Layout Dynamically in Android? -

I have tried to add a rating bar to a dynamically linear layout after some text fields. But I'm getting the NullPointerException line = lL.addView (rating); Someone can help me please how to do it. Thanks in advance. Here's my XML file. & lt; ScrollView android: id = "@ + id / scrollField" Android: layout_width = "fill_parent" Android: layout_height = "wrap_content" Android: layout_above = "@ + id / btnDELETE" Android: layout_below = "@ + id / textTitle" Android: Layout_marginTop = "10dp" & gt; & Lt; LinearLayout android: id = "@ + id / linearLayoutRatingDetails" Android: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" android: orientation = "vertical" & gt; & Lt; TextView android: id = "@ + id / tv_EmployeeName" Android: layout_width = "wrap_content" Android: layout_height = "40dp" Android: Layout_m...

java - How can I access variable resolving of eclipse run configurations for an eclipse plugin? -

I want to be able to expand the Sysdeo Tomcat plugin such that you can specify in run configuration for Java applications Are, e.g. $ {workspace_loc} . I have tried to use it, but there is no content in the resulting array: resourcesPlugin.getWorkspace (). GetPathVariableManager () getPathVariableNames () .; Using this does not give me the desired variables: JavaCore.getClasspathVariableNames (); Next I search for the code that is actually substituting the variable in the string. Use IStringVariableManager to access variables such as $ {workspace_loc} . You get from the manager: IStringVariableManager manager = VariablesPlugin.getDefault (). GetStringVariableManager (); To process variables in string usage: string newString = manager.performStringSubstitution (string); You can also use the org.eclipse.core.variables.dynamicVariables and org.eclipse.core.variables.valueVariables extensions Points to add new variables

c# - Scale Checkbox without scaling content -

Image
I want to double the size of a checkbox. I have used the ScaleTransform but the problem is that it scales the content (text in the right side of the checkbox in my case): & lt; Checkbox vertical alignment = "center" content = "test" & gt; & Lt; CheckBox.LayoutTransform & gt; & Lt; ScaleTransform ScaleX = "2" ScaleY = "2" /> & Lt; /CheckBox.LayoutTransform> & Lt; / Check box & gt; I Just leave content blank and type the details in a different TextBlock , but then, when I click on the text, the checkbox Absolutely not Toggled Can I completely do it without changing the control template? Something that can work for you: (Clearly you For better support, a converter should be used to change the scale transforms and translate transforms on the basis of databasing). & lt; Checkbox vertical alignment = "center" & gt; & Lt; CheckBox.Content & gt; & Lt; Text...

ios - Back button text too long on navigation bar -

I am working on my first iOS application. I'm using the navigation controller and I'm running into a small problem. The point is that the text of the back button is too long. Because the text is too long the title is not always centered. I thought about removing the back button, but then I loose the latch to return the feature. What is the best way to handle this? You can call it every ViewController where you want the back button. self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: @ "" style: UIBarButtonItemStylePlain target: zero operation: zero];

android - MediaRecorder.prepare() exception - No such file or directory -

I am trying to record the audio, when a debug appears on , a wild exception appears .prepare () This is my record () method. Private Zero Grabar (see V) {mediaRecorder = New MediaRecorder (); Date Today = Calendar. Gate Instance (). GetTime (); String nombrefichero = String.valueOf (today.getDate ()) + "+" + string.valuef (today .getMonth () + 1) + "-" + string.valuef (today.get (++) +1900 ) + "_" + String.valuef (today's guesthors ()) + "." + String.valueOf (Today GetMinutes ()) + "." + String.valueOf (today .getSeconds ()) + ".3gp"; MediaRecorder.setOutputFile (VarGlobales.Ruta + "/" + VarGlobales.Trabajo + "/ audio /" + nombrefichero); // VarGlobales.Ruta - & gt; Environment.getExternalStorageDirectory () getAbsolutePath () .; // VarGlobales.Trabajo - & gt; 001 Media Records Audiocoras (Media Records. AudioSOS.mic); MediaRecorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_G...

namespaces - Clojure - how to let the library users choose which printing function to use, to display data structures? -

I am writing a small debugging library and I want to let users choose how to display data structures. I was imagining that users may need it like this: (ns some-user-namespace (: [requires clojure.pprint] [my.library: With-args {print- Is this possible, and if not, how can I solve this problem It is not possible to do this in such a way that if you actually offer such an installation, you can call the user The configuration function can be provided: (ns some namespace (requires: [my.library]) ! This is an idiomatic method of pointing out that it is creating some side effect. In your library it can appear: (ns my.library) (defconfig (atom {: printer println})) (defn print-with [New-printer] (swap! Config assoc: printer new-printer)) (my-lib -print [foo] defin ((:: printer @ config) foo)) edit : a solution For those who do not require global, unstable state, you can use dynamic binding. Lib: (ns my.library) (def ^: dynamic * printer * println) (my-lib...

windows runtime - WinRT 8.1 Settings Charm using Caliburn.Micro: how to remove a command from settings? -

I have encountered the problem of deleting the command from the settings command. The problem is that the user has to sign out command only then You should see when it is logged into the app but not on the login screen. For now, I have not found any suitable method for removing or declaring an order. Add all except the complete list of commands and the sign out command. Caliburn.Micro is used to manage settings with commands. Private WinRTContainer _container; ........ Private Zero RegistrationsTatings Commands (Bull Sign Signin) {#if WINDOWS_APP var settings = _container.RegisterSettingsService (); If (! Signinine's) {settings.RegisterCommand (New Component: Action Settings Commands ("Settings", () => ({}}); Settings.RegisterCommand (New Component Action Settings Command ("Contact us about a problem", () => ({}}); Settings.RegisterCommand (New Component Action Setting Commands ("Help Information", () => ({}}); Settings.RegisterComm...

mysql - Connection pool issue: Connection has already been closed -

I am using Grails 2.4.2, Tomcat 7 and MySQL 5.6.17 and I'm having trouble in connection pool is. After a while my application randomly reports the following errors. 2014-07-24 08: 24: 35,012 [http-bio-127.0.0.1-50000-exec-9] Error organization org.hibernate .engine.jdbc.spi.SqlExceptionHelper - Connection Already stopped. and 2014-07-25 10:55:55 12,018 [http-bio-127.0.0.1-50000-exec-6] Error organization codehaus .groovy.grails.web.errors.GrailsExceptionResolver - SQLException occurred while processing the request has been [gET] / controller / database connection already closed .. stacktrace is as follows: java.sql.SQLException: connection already Closed. On grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter grails.plugin.cache.web.filter.AbstractFilter.doFilter (AbstractFilter.java:63) (PageFragmentCachingFilter.java:189) on grails.plugin.springsecurity.web Grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter on .filter.Gr...

getting error while trying to batch upload photos on fan page via Facebook javascript SDK -

I am trying to upload a batch via the Facebook Javascript API. I had read the API document. () I request batch through the following javascript function: function batch uploads photopage () {var pageId = '111222333'; Var pageexacton = 'xxxxyyzzzzzzz'; FB.API ('/', 'Post', 'Batch': [{'Law': 'Post', 'Relative_Archic': PageID + '/ Photo', 'AccessToken': Page Asset Token, 'Message': ' Test Upload Photo 1 ... 'New Date (),' url ':' https://hn85599112.files.wordpress.com/2014/07/girl-photo.jpeg '}, {' Method ':' Post ' , 'Relative_url': PageID + '/ photo', 'AccessToken': PageNetSetToken, 'Message': 'Test Upload Photo 2 ...' + New Date (), 'url': 'http: //www.paopaoche. Net / up / 2012-5 / 20125523231510353173.jpg '}]}, function (feedback) {log (feedback);}); } but it always answers an error message:...

How to convert Unicode Escape Sequence to Unicode String in Haskell -

I have "3619 \ 3657 \ 3634 \ 3609 \ 3648 \ 3592 \ 3657 \ 3648 \ 3621 \ 3657 \ 3591 " which I want to decode it. I tried searching the Unicode library without success. prelude & gt; PutStrLn "\ 3619 \ 3657 \ 3634 \ 3609 \ 3648 \ 3592 \ 3657 \ 3648 \ 3621 \ 3657 \ 3591"> a £ ¹ ?? ¸ ² ¸ ¸¸¸¸ ?? A ?? Ah ?? Note: You do not actually have the string "\ 3619 \ 3657 \ 3634 \ 3609 \ 3648 \ 3592 \ 3657 \ 3648 \ 3621 \ 3657 \ 3591" - Instead, you have the UTF-32 string Is responsive ?? Responsible ?? A.K. ?? ¸ à ¥ ๠?? Ah ?? , for which "\ 3619 \ 3657 ..." is an ASCII-compliant literal By default, show example to display GHCI results , Which does not do much to show things can be used as the Haskell code for words In the case of Unicode, it is conservative because this is the reason Prelude & gt; "¸ £ ¹ ?? ¸² ¸ ¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸¸ ?? ¸¸¸ ?? ¤ ?? ¤ ?? ¥ ๠?? ภ??" "3619 \ 3657 \ 3634 \ 3609 \; On the ...

javascript - How to add onChange function for all HTML form fields -

My HTML page has 10 text fields. There are currently no on-change events available for all ten areas. & lt; Input type = "text" name = "text1" value = "1" & gt; & Lt; Input type = "text" name = "text2" value = "2" & gt; & Lt; Input type = "text" name = "text3" value = "3" & gt; & Lt; Input type = "text" name = "text4" value = "" & gt; & Lt; Input type = "text" name = "text5" value = "" & gt; & Lt; Input type = "text" name = "text6" value = "" & gt; ... Now, I want to add change function to all the fields, type the field input . How do I add Change or Change in my JS section? In the on-change function, I will call the AJAX function which will be valid if the Field Hacking Keywords then my question is: How to add change function to My field sh...

asp.net - Best way to run scheduled tasks -

Today we have created a console application to run scheduled tasks of our ASP.NET website. But I think this approach is a small problem and it is difficult to maintain. Update: Examples of tasks: Send Removing old objects from database Receive stats from Google AdWords and fill out a table in the database. Website for all my work (which needs to be set) Is placed inside and a special page is called. I then wrote a simple Windows service that tells this page so fast that it gives a value after running the page, if I know there is more work to do, then I run the page again, otherwise I I run in a little while It has worked really well for me and keeps all my work logic with web code. Before writing ordinary Windows services, I used to call Windows Scheduler every x minute. Another convenient way to run it is to use a monitoring service such as Point your http check to the page that runs your service code. After results of the results on the page, pingadam can be us...

python - index error while running a loop over list contents -

मेरे पास ऐसा एक सूची है: my_array = ["*", "device "", "" "," डीएसए "," "," "," एडी "," = "," 10 "," पीडीएफ "," = "," 6 "], "=", "1", "pqa", "=", "2", "dga", "=", "12"], ["*"] क्या मैं यह करना चाहता हूं: परिभाषित करें ('डिवाइस', 'एक्सवायज़') परिभाषित करें ('एडी', '10') परिभाषित करें ('पीडीएफ', '6') परिभाषित करें ('डीएसए जिस तरह से मैंने संपर्क किया है वह है: ('' 1 ' i = 0 जबकि i & lt; (My_array): यदि my_array [i] [0] == "*": प्रिंट ("', my_array [i] [1],"' "," '", my_array [i] [3:], "'") एलिफ my_array [i] [0] == "+": प्रिंट ("'", मेरी_अरे [i] [1], "'", "'", मेरी_अरे [i] [3],...

java - ${status.value} does not work -

I have enabled spring MVC annotations running in my project, then the spring tag does not work in advance: & lt; Spring: Tie Path = "List" & gt; & Lt; Form: Select Path = "mMaxFrequency" & gt; & Lt; Form: option item = "$ {status.value}" /> & Lt; / Form: Selection & gt; & Lt; / Spring: Tie & gt; During a JSP page presentation, I got the following exception: Reason by: javax.servlet.jsp.JspException: Type [Java. Lang.String] is not valid for item items My Controller: @RequestMapping (method = RequestMethod.GET) Public string show (@ModelAttribute ("Form") entry form, map & lt; string, object & gt; model throws IOException {AccessSettings settings = getAccessSettings (); Form.setAlertSettings (settings.getAlertSettings ()); Form.setMaxFrequency (settings.getMaxFrequency ()); Return "page"; } Public class AccessForm {public list & lt; Long & gt; Any ideas are wron...

Rails 4 : Routes match, id not found -

I am currently writing my first app with Rail 4, after the tutorial. After finishing almost the user part (controller, scene and model), I wanted to match the profile / profile like "user # show" with one path, I did this: Ressources: user 'profile' = & gt; The problem is in my controller: def show = user = user.fund (params [: id]) and I have read the guide and I thought that Paramams were passed but it does not seem like this. It would be a stupid mistake, but I do not know. Thank you! You must specify the ID placeholder in the URL like this: 'Profile /: id' = & gt; You can now call URL such as "profile / 12" . And parameter [: id] Check the docs on routing here