Posts

Showing posts from March, 2014

sorting - sort by actual values in a dictionary python -

मुझे सॉर्टिंग डिक्शनरी में परेशानी हो रही है sorted_x = sorted (x.iteritems (), key = operator.itemgetter (1)) लेकिन मुझे सॉर्ट करने के लिए नीचे कोड का उपयोग कर रहा हूं समस्या यह है कि वास्तविक मानों से ऐसा नहीं किया जाता है .. asdl 1 testin 42345 अल्फा 49 रेफ़री: I एस्सारएल अल्फ़ा 49 टेस्टिन 42345 आप जिस व्यवहार का अनुभव कर रहे हैं वह तुलनात्मक चर के प्रकार के कारण है इसे हल करने के लिए, इसे पूर्णांक पर डालें। orted (x.iteritems (), कुंजी = लैम्ब्डा x: int (x [1])) < / कोड> अंतिम परिणाम होगा: [('asdl', '1'), ('अल्फा', '49'), ('testin ',' 42345 ')]

How can Spring boot/Application.java pick up Mongo AbstractMongoConfiguration in another package? -

मैं अपने वर्ग को संकुल में व्यवस्थित रखना चाहता हूं। निम्न उदाहरण का प्रयोग करना: मेरे पास "my.main.package" में अनुप्रयोग.जावा है I अपने नीचे AbstractMongoConfiguration के स्वयं के कार्यान्वयन को परिभाषित करता है: आयात org.springframework.context.annotation.Bean; आयात org.springframework.context.annotation.configuration; आयात संगठन। स्रोत:। आयात com.mongodb.Mongo; आयात करें com.mongodb.MongoClient; @ कॉन्फ़िगरेशन सार्वजनिक वर्ग मायमोंगो कॉन्फिफ एब्सटमॉंगो कॉन्फिगरेशन का विस्तार करता है {@ ओवरराइड @ बेयॉन सार्वजनिक मोंगो मोंगो ()) अपवाद फेंकता {नई मॉगोक्लेन्ट लौटें ("रिमोटहोस्ट: 27018"); } @ ओवरराइड संरक्षित स्ट्रिंग getDatabaseName () {वापसी "mydb"; }} अगर मैं एक ही पैकेज में अपने application.java के रूप में कक्षा डालता हूं, तो यह काम करता है। अगर मैं मायमोंगो कॉन्फिफ को अपने स्वयं के पैकेज में डाल दिया है I.e "my.config.package.settings", तो चल रहा है Application.java "MyMongoConfig" का उपयोग किए बिना डिफ़ॉल्ट MongoDB कन

Display a JSON field with AngularJS from Golang REST service -

सर्वर पर, मेरे पास निम्न साधारण गो विश्राम है: func GetFoo ( w; http: ResponseWriter, r * http.Request) {res1D: = & amp; Response1 {पेज: 101, फल: [] स्ट्रिंग {"सेब", "आड़ू", "नाशपाती"}}} res1B, _: = json मार्शल (रेस 1 डी) डब्ल्यू। हेडर ()। सेट ("कंटेंट-टाइप", "टेक्स्ट / जेसन; वर्णसेट = यूटीएफ -8") w.Write (res1B)} प्रकार रिस्पांस 1 स्ट्रेट {पेज इंट फॉल्स [स्ट्रिंग} मेरी index.html पर, मेरा AngularJS कोड है: & lt; div ng-controller = "secondCtrl" & gt; {{allFoo}} & lt; div ng-repeat = "सभी फू में फू" & gt; {{Foo}} & lt; / div & gt; और मेरे AngularJS नियंत्रक: फ़ंक्शन secondctrl ($ scope, restangular) {var foos = restangular.all (' बाकी / कम महत्वपूर्ण चीज़ें '); foos.getList ()। तब (फ़ंक्शन (foo) {$ scope.allFoos = foo;}); }; जब {{allFoos}} के लिए index.html प्रदान किया जाता है, तो मैं देखता हूं: {"0": 101, "1": [" सेब "," आ

move - Batch, moving files located in a subdirectory -

I would like to place all the files on the other side in subdirectories, which have specific file extensions. What do I have here: CD: Media \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' / code> Is there something wrong with my 'move' syntax? How can I get it? Yes, there is something wrong that you can use wildcards only on the last element of the specified path. And you are using the wildcard in the previous element (mm4 files) and in the previous element (folder where .mp4 files are located). This is not allowed. You have to calculate the folders and then for each, the file must be moved to that target folder. Mkdir cinema / i "% ~ nxa" == "Movies" move to movie / DVD% A ("*") for PushD D: \ Media \ Unsorted if not present / To include previous commands in a batch file, percentage marks should be doubled, i.e. each "code", for example, u "% ~ FA" * .mp4 "

go - Proper way of using derived map type index in golang -

This could be the starting question. Code like type MYMAP map [int] int func (o * MYMAP) dosth () {// it will fail to compile o [1] = 2} How to use the underlying type MYMAP in the form of a map ? The problem is not that it is a nickname, it is an indicator for a map . Go will not automatically be used by the Dictation Pointer for the map or the slice method, by changing the way with the o [1] = 2 to (* O) [1] = 2 will work however you should consider why you are using an indicator on the map (effectively). There are good reasons for doing this, but generally you do not need an indicator on the map because maps are "reference types", which means that you do not need an indicator on them so that they are mutually mutating Can change Program

java - Adding a dylib to the search path on OSX -

I have a project in which I need to convert the PDF file to png using ghost4j. I face the problem What I'm doing is that when I run my Java code, I throws this error: Unable to load library 'GS': dlopen (libgs.dylib, 9): image I did not get the error I mistake this error and found that I installed ghost script and file libgs. There is a need to make some changes in dylib . I have installed a ghost lip using the Mac port but I do not know whether this file is located on libgs.dylib my file system. I know what needs to be done next to help. -PS I am using Mac OS X 10.9.2 as my development environment. From: LD_LIBRARY_PATH Setting help: $ port installed ghost wrapped $ port content ghostscript | Grep libgs /opt/local/lib/libgs.9.10.dylib/opt/local/lib/libgs.9.dylib/opt/local/lib/libgs.dylib $ export LD_LIBRARY_PATH = / opt / local / lib The content of the port is detected. To make the changes permanent, you will need to permanently add it to

enterprise architect - Why does `svn update` unlock files and what is status B -

मैं एंटरप्राइज़ आर्किटेक्ट का उपयोग करता हूं जो कि svn lock का इस्तेमाल किया गया था ताकि वांछित भंडार के अंदर मॉडल फाइलों को लॉक किया जा सके। उदाहरण के लिए: & gt; SVN स्थिति कश्मीर दस्तावेज़ \ यूएमएल \ EAB \ B2ACB6CFF398.xml कश्मीर दस्तावेज़ \ यूएमएल \ EAB \ BE1936A1AE75.xml कश्मीर दस्तावेज़ \ यूएमएल \ पूर्वी वायु कमान \ C3B74A5737E1.xml मैंने सीख लिया है कि svn commit पर जब तक आप - रखने-ताले विकल्प का उपयोग नहीं करते तब तक आप ताले हटा देते हैं उपखंड 1.8 के बाद से मैंने देखा कि svn update अब भी अनलॉक किया गया है: & gt; svn update Aktualisiere »। एक«: यूबी दस्तावेज़ \ यूएमएल \ EAB \ BE1936A1AE75.xml यूबी दस्तावेज़ \ यूएमएल \ EAB \ B2ACB6CFF398.xml यूबी दस्तावेज़ \ यूएमएल \ पूर्वी वायु कमान \ C3B74A5737E1.xml होल externen Verweis नच Â »Homeserver \ लाइब्रेरी \ src \ परीक्षण \ संसाधन \ config-Currentâ«: Externer Verweis aktualisiert zu Revision 22020. संशोधन 22020. & gt; svn status ध्यान दें कि svn status के बाद कुछ भी नहीं है ताला चला गया! लेकिन s

c++ - Cmake produces file extensions in static library archives -

I have recently switched to autotools to cement, since the limiter cross platform is better for development and what I saw When I build a stable library of my C ++ code, all the files inside .cpp.o is a suffix ar income tax PA8 / libgenericTZR.a genericTZR.cpp.o I have seen other libraries made by other tools and they do not do it, I'm not sure this is the realm And there is a bad thing, but how can I create static libraries without cpp file extension? This is my CMake file add_executable (PA8 ISP_Charges.cpp genericTZR.cpp genericTZR.h) set (LIBSRC genericTZR.c genericTZR.h) add_library (genericTZR shared $ {LIBSRC}) add_library (genericTZR shared $$ TARGET_OBJECTS: myObjects & gt;) install add_library (Generic TZR-static static $ {LIBSRC}) set_target_properties (Generic TZR-Static Properties OUTPUT_NAME $ install (TARGETS PA8 DESTINATION BIN) TARGETS GENICTZR GENERICTZR-STATIC DESTINATION lib) Installed (files "$ {PROJECT_BINARY_DIR} /PA8/genericTZR.h"

php - Joomla 3.2.3 error when quickstart installing -

I am creating a Joomla quickstart pack using Joomla 3.2.3. But when I'm trying to install it, I found this error: Error displaying error page: Application Instant Error: JLIB_APPLICATION_ERROR_APPLICATION_LOAD " < p> But I did the same with the Joomla version 2.5.6 and it is working. error Message " Error displaying page: Application instant error: " Comes when Joomla Connect to database Unable to create, just make sure that your mysql service is running and the credentials in the configuration.php file are correct to connect to your installed database.

angular ngmodel - How to get the name of model passed into the function in AngularJS? -

I have a scenario where I need to know the value and name of the model passed in the ceremony < P> I tried the following $ scope.rad = 'fff'; app.directive ('kmRadio', function () {return {restrict: 'e', ​​compiled: function (element, ethers) {var model = {l: '}}; model.l = attrs.km model; var str1 = "n in"; var str2 = attrs.kmOption; var repeat = str1.concat (str2); var htmlText = ' gt; & lt; div ng-switch on = "format" & gt; '+' & Lt; div ng "+ +" & lt; div class = "floatLeft"> '+ +' + attrs.title + '+' & lt; / div & gt; '+' & lt ; Ul & gt; '+' & lt; li class = "rowlight" ng-repeat = "'+ repeat +'" & gt; & amp; nbsp; {{n}} & lt; input type = "radio" Ng-model = "'++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++

how to show google ad in flash cs6? -

I used this code and ANE file in the library path but did not show the ad. Please help me. (old link>) I take the ANE file above the link import flash.display.Sprite; Import so.cuo.platform.admob.Admob; Import so.cuo.platform.admob.AdmobPosition; Function SimpleDemo () {var admob: Admob = Admob.getInstance (); Trace (admob.supportDevice) if (admob.supportDevice) {admob.setKeys ("k9c0d6c840db6180439d2e7add2bf014"); Admob.showBanner (Admob.BANNER, AdmobPosition.BOTTOM_CENTER); } Else {txt.text = "Device is not supported"}} SimpleDemo () 1. Change Adobe ID with your own Adobe ID 2. Simple SimpleDemo () New SimpleDemo () 3.config xxx-app.xml

Html import menu -

इस सवाल का पहले से ही एक उत्तर है: < / P> 9 जवाब हाय, मैं नया हूँ Html और मैं एक मेनू के साथ एक साइट बनाने की कोशिश कर रहा हूँ साइट के पास अधिक पृष्ठ हैं इसलिए मुझे मेनू को सभी पृष्ठों पर प्रतिलिपित करना होगा। मैं आपसे क्या पूछ रहा हूं, मेनू को आयात करने का कोई अन्य तरीका नहीं है (उदाहरण के लिए इसे मेनू के पृष्ठ से आयात करने के लिए) ताकि मुझे इसे कॉपी-पेस्ट करने के लिए मजबूर नहीं किया जाएगा? एक menu.html पृष्ठ बनाएं और इस पेज में सभी मेनू आइटम शामिल करें और फिर & lt ;! - # include file = "menu.html" - & gt; यह आपके लिए काम करेगा। दोनों फाइल को एक ही निर्देशिका में रखें।

jquery - javascript not executed unless reloading page using turbolinks and rails 4 -

Image
I followed it, but I think I can not load "saved token". I think the problem is that when click on the 'edit' link (made by scaffold), this does not trigger the preload function, you have problems in Rails 4 How to fix View page < pre> .form-inputs = f.input: name = F.input: content = f.text_field: user_tokens, data: {load: @ article.users} my Coffeescript $ (document) .ready - & gt; $ ('# Article_user_tokens') TokenInput '/users.json', subject: 'facebook', prePopulate: $ ('# article_user_tokens'). Data ('load') requirement css and js file * = token-input-focus // requires jquery.tokeninput I fix the bug with this solution ready page: load but I do not understand why this works Is $ (document). "Ready Page: Load", - & gt; $ ('# Article_user_tokens') TokenInput '/users.json', subject: 'facebook', prePopulate: $ ('# article_user_tokens'). Da

How to retrieve blob image from mysql database in jsp -

जबकि (rsimg.next ()) { ब्लॉब फोटो = rsimg.getBlob ("थंबनेल") ; } इसके बाद मुझे ब्राउज़र में छवि दिखाने के लिए क्या करना होगा। धन्यवाद ऐड्वान्स !! इस कोड को अपने सर्वलेट फ़ाइल में आज़माएं, क्योंकि यह jsp import java.sql के बजाय त्रुटियों की पहचान करना और पहचानना आसान होगा। । *; Import java.io * *; सार्वजनिक वर्ग पुनर्प्राप्ति छवि {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {try {class.forName ("आपके ड्राइवर का नाम"); कनेक्शन con = DriverManager.getConnection ("URL", "USERNAME", "पासवर्ड"); तैयार किए गए स्थान PS = con.prepareStatement ("TBL_NAME से * चुनें '); परिणामसेट rs = ps.executeQuery (); यदि (rsnext ()) {// अब 1 पंक्ति बूँद बी = आर.एस.टी.ब्लॉब (2); // 2 का मतलब दूसरा कॉलम डेटा बाइट बर्र [] = बी.गेटबाइट्स (1, (इंट) बी। लैंप ()); // 1 का अर्थ है पहली छवि FileOutputStream fout = नया FileOutputStream ("d: \\ IMG_NAME.jpg"); fout.write (बर्र); fout.close (); } // if of system.out.println (&quo

django flag for mobile request? -

I have to be a flag variable to test the mobile page in the digengo. We currently need it to use the flag on both Dragon View, Django templates, Javascript, handler templates. Something like this might be done, like something like {% if_testing_mobile%}. {% Endif%} We only provide some pages for mobile and PC To distribute separately. (Most pages are covered by bootstrap fluid) How can we set a variable to switch / switch on mobile? Try it, import mobile_detect_mobile def my_mobile_view (Requested): is_mobile = if request.mobile: is_mobile = true #with some mobile render (request, 'page html', {'is_mobile': is_mobile}) Page.html: {% if_mobile%} presents mobile CSS {% else%} then PC CSS {% endif%}

java - Vert.x 2 & IntelliJ automatic redeploy issues -

We have some problems setting up Vert.x with IntelliJ to automatically reload sections during development. Have been there. We have used the "best practice" approach, as described in their documents (using Maven), but can not get automatic redistribution to work. Steps to reproduce: mvn archetype: generating -Dfilter = io.vertx: Create your project using Exelute mvn idea: idea to create intelliJ project . Open .ipr file in IntelliJ Change the project settings to Preferences - & gt; Be sure to set up on Compiler - & gt; Automatically create project Make sure "auto-redeploy": set right in in the resource folder in mod.json Create the first project: CMD + Fn + F9 ( CMD + F9 if you use the media key as function keys Run the vertx: runMod from the Maven panel (or from the command line) The application starts at this point (and when target / mods folder make this module Sector appears to). However, saving in the PingVert

sql - indexing large MySQL table -

I've lost a bit of indexing a large table I used to use different filters to query this For example in a table: id is required. Key_1 | Key_2 | ... | Key_n There may be one filter for one or more keys, adding each (I am using the Zend Framework to create a query using the prepared statement): $ select- & gt; Where ($ this-> _db-> quoteInto ('key_n =?', $ Filter- & gt; key_N)); If I correctly understand the speed of the query, then I should list some columns. Therefore, he inspired some questions: < Li> What does it mean to add indexes to all the columns that will be used to filter the data? If I index a lot of columns, how will it affect the speed with which the data is written in the table? Is it possible to add index to the combination of columns? There are some answers in the post in link @ bodi0 but I will add the following: Should all the indexes add to the columns used to filter the data? Generally, an index speeds u

Store and Retrieve a number from memory in 8086 assembly language -

I am starting a total for the 8086 assembly language, I want to try some simple stuff first to write a program To enter a number, say x , store it in memory and then load it into a register later, and display it? I did something like this: . Smallen the model. Data NL2DB 0 AH, 0H, 'Enter a number:', '$' .CODE Main Process MOV C, 100D LEA DX, NL2; MOV AH, 09H; INT 21H MOV AH, 0H; Read in Buffer MOV [SI]; 0h; Store in memory MOV BX, [si]; MOV BX to load from memory, 09H; Display it INT 21H EXIT main ENDP main What's the mistake? Please help me! Thanks! There are two mistakes in the code above $ should be in the quote otherwise the error may occur. After input, give us the value of mov al in dl , on the screen To print the value made.

save - How to have lots of data in android app -

I want to write an Android application that contains a lot of data. For example, I have approximately 30 categories, each category There are about 50 items and each item has 10 text pages and 5-8 images. I want my app to work offline and do not require an internet connection. What is the best and safest way to do this? You must use the SQLite database The best way to keep a large amount of data in order to keep the database structured is to keep all your text in the data table. You can put images in pictures in the form of blob or insert images in the property folder and the database image Can store the path. Simply create a synchronized database with all the necessary data on your PC and then attach it to your Android app. You can find many information easily to work with Android in SQLite.

javascript - jquery-ajax : getting server xml -

मैं webservice से XML प्रतिक्रिया प्राप्त करने की कोशिश कर रहा हूं: function xmlparser () { $। एजेक्स ({प्रकार: 'जीईटी', यूआरएल: यूआरएल, डाटाटीइप: 'एप्लीकेशन / एक्सएमएल', सफलता: फ़ंक्शन (एक्सएमएल) {परिणाम = $ (एक्सएमएल) .फंड ("पोस्ट")। पाठ (); टेक्स्ट = परिणाम; वापसी पाठ;}, त्रुटि: कार्य (xml) {चेतावनी (xml); चेतावनी (xml.status + '+ + xml.statusText); वापस लौटा;}}); } लेकिन मुझे हमेशा एक त्रुटि फ़ंक्शन मिल रहा है ([ऑब्जेक्ट ऑब्जेक्ट], 200 ओके) XML: & lt ; पोस्ट & gt; & lt; post & gt; एडॉल्फ: अधिक खनिज प्राप्त करें | & Lt; / पोस्ट & gt; & lt; / पदों & gt; कृपया इस समस्या को हल करने में मेरी मदद करें प्रयुक्त डेटा टाइप xml के लिए मान्य नहीं है, डेटा प्रकार बदलें: 'application / xml', से dataType: 'xml' , और कोशिश करें

How to pass a tuple of slice objects to C via the python-C api -

I have 2D matrix class in C that I am using in Python. I want to be able to call a matrix class by passing a tulip of slice object, e.g. A [1: 2,1: 2]. So far what do I have to do is look like the relevant code for the following __getitem __ method int __getitem __ (PyObject * slice) {// piece of objects Receive Tupal PyObject * slice1; // Announce the first slice object PyObject * slice2; // Announce the second slice object slice1 = PyTuple_GetItem (slices, 0); // Get the piece before the Tuol Slice 2 = PyTuple_GetItem (Slice, 1); // Get second piece from Tuol / start and stop the first slice (currently the following three lines do not work) Py_ssize_t start, stop, move, length; PySlice_GetIndicesEx (slice1, length, & amp; begin, & amp; stop, & amp; step); Return PESliciceHack (Slice 2); } This code checks whether slice2 is actually a piece object using the PySlice_Check method. If I comment on PySlice_GetIndicesEx (slice 1, length, and start, end stop, and

api - Google_Client()->authenticate($code) error invalid_grant php -

First of all, please forgive me of my English, very bad ... my question is, what should be the criteria of the law? ($ Code) "Google_Client of the class" I wrote the email address of the client ID for web applications; Next I wrote the client ID, and always returned the error 'invalid_grant' this error is [Error] [Client 127.0.0.1] [Error] [Client 127.0.0.1] PHP Fatal Error: Error 'Google_Auth_Exception' with error 'OAuth2 Access Token; error in fetching message:' invalid_grant '' / var / www ' /Repartos/Google/Auth/OAuth2.php:124 Stop Trace: \ n # 0 /var/www/Repartos/Google/Client.php(136): Google_Auth_OAuth2- & gt; Certify ('4991232 88166 @ d ... ') \ n # 1 /var/www/Repartos/index.php(36): Google_Client- & gt; Certify (' 499123288166 @D ... ') \ n # 2 {main} \ This is my code Enter your code here set asset token ($ _ session ['slave_acco']); } else {// patent total al $$ client- & gt; SetAc

web services - PHP: certificate chain for SOAP request -

मेरे पास नमूना SOAP अनुरोध संदेश नीचे की तरह है, & lt; soapenv: लिफाफा xmlns: Soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: v = "http://incometaxindiaefiling.gov.in/ws/ds/common/v_1_0" & gt; & LT; soapenv: हैडर / & gt; & LT; soapenv: शरीर & gt; & LT; वी: DITWSAuthInfoEle & gt; & LT; वी: userID & gt; xxxxxxxxxx & lt; / वी: userID & gt; & LT; वी: पासवर्ड & gt; xxxxxxxxxx & lt; / वी: पासवर्ड & gt; & LT; वी: certChain & gt; xxxxxxxxxx & lt; / वी: certChain & gt; & LT; वी: हस्ताक्षर & gt; xxxxxxxxxx & lt; / वी: हस्ताक्षर & gt; & Lt; / वी: DITWSAuthInfoEle & gt; & Lt; / soapenv: शरीर & gt; & Lt; / soapenv: लिफाफा & gt; मुझे प्रमाणीकरण विवरण और xyz.pfx फ़ाइल मिली। इस फाइल का उपयोग करके मुझे एक्सएमएल हस्ताक्षर का प्रतिनिधित्व मिला है और एसओएपी अनुरोध से जोड़ा गया है। यहां मेरा प्रश्न है कि मैं प्रमाण पत्र (प्रमाणपत्र श्रृंखला) कैसे

html - Input and button inline -

Is there a multi-browser approach to inline input and buttons? See . Appears below the input button. Ordinary margins do not help: & lt; Div & gt; & Lt; Input type = "text" style = "margin-top: -50px;" / & Gt; & Lt; Button style = "height: 25px; width: 20px" /> & Lt; / Div & gt; I found this error when using the jQueryUI calendar: the calendar button has been automatically inserted after the calendar tag. So I do not want to change markup with more divs. : input, Button {vertical-align: center; } vertical-align / P> cell box.

Version of WebKit in JavaFX 8 WebView -

जावा एफएक्स 8 में वेबकिट का संस्करण क्या है? आप WebView के इंजन के द्वारा WebView में उपयोग किए जा रहे वेबकिट का मूल संस्करण निर्धारित कर सकते हैं। web.getEngine ()। GetUserAgent () यह Java 8u5 के लिए 537.44 का एक वेबकिट संस्करण दिखाता है यह जावाफिक्स के साथ काम करने के लिए किसी भी डाउनस्ट्रीम संशोधनों से पहले JavaFX कार्यान्वयन में उपयोग किए जाने वाले वेबकिट का अपस्ट्रीम संस्करण है। जावा 8 के नए संस्करण जारी किए जाते हैं , प्रत्येक संस्करण में उपयोग किया जाने वाला वेबकिट का संस्करण बदल जाएगा, लेकिन आपको हमेशा यह निर्धारित करने में सक्षम होना चाहिए कि उपयोगकर्ता एजेंट स्ट्रिंग की क्वेरी के द्वारा क्या उपयोग किया जाता है। नमूना कोड आउटपुट (मेरी मशीन पर) नमूना कोड आयात करें javafx.application.Application ; आयात javafx.application.Platform; आयात javafx.scene.web.WebView; आयात javafx.stage.Stage; सार्वजनिक वर्ग WebViewVersion आवेदन को बढ़ाता है {@ ओवरराइड सार्वजनिक शून्य प्रारंभ (स्टेज स्टेज) {WebView web = new WebView (); System.out.println ("जावा सं

PHP get current local time based on GMT offset -

एक फ़ंक्शन date_default_timezone_set () php में है जो "यूके / लंदन" जैसे टाइमज़ोन स्ट्रिंग स्वीकार करता है । लेकिन दुर्भाग्य से मेरे पास केवल जीएमटी ऑफसेट का ऑफसेट उपयोगकर्ता है मान लें कि मैं जीएमटी +5 पर हूं और मैं वर्तमान समय जीएमटी +5 के आधार पर प्राप्त करना चाहता हूं। $ current_date = date मैं ("वाईएमडीएच: एस," जीएमटी +5 "); कृपया मदद आप केवल अभी के लिए जीएमटी ऑफ़सेट का उपयोग कर सकते हैं, यानी यूजर ने आपको अपने जीएमटी को आधा साल पहले ऑफसेट बताया था और अब आप जानना चाहते हैं कि यह समय क्या है अपने स्थान.यह मूल रूप से कुछ घंटों की दूरी के भीतर कुछ भी हो सकता है। यहां तक ​​कि अगर आपको ऑफसेट कुछ सेकेंड पहले मिलता है, तो यह तब हो सकता है जब आप गणना करते हैं यह कहने के बाद, आप स्वरूपित समय से ऑफसेट घंटे जोड़ / घटाना चाहते हैं, जो वास्तव में आप ही कर सकते हैं। $ ऑफसेट = 5; $ घंटे = (जीएमडीएट ('एच') + ऑफसेट ऑफसेट)% 24; $ घटना गूंज। Gmdate (': i: s वाई एम डी'); यह सिर्फ एक उदाहरण है, आपको इसकी आवश्यकता होगी मिनी

javascript - How can I give background color to the text content inside a div in my html page. -

I do not need to give the background color to the whole div. I just need a background color where there is a text content. Please help me I helped you googled "CSS Text Highlight" & lt; p class = "intro" & gt; Highlighting the text on the web page can immediately bring important information in the attention of readers, for example, "& lt; span style =" background-color: # FFFF00 "& gt; highlighting this text in yellow And possibly before your eyes were caught. & Lt; / span & gt; "& lt; / P & gt; Please see:

javascript - How to copy the value of datagrid column easyui -

& lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; वर tbIndex = अपरिभाषित वर tbData = अपरिभाषित $ ( '# महानिदेशक') datagrid ({onClickRow:। समारोह (rowIndex, rowData) {tbIndex = rowIndex tbData = rowData}, onClickCell: समारोह (rowIndex, क्षेत्र, मूल्य) {अगर (क्षेत्र == 'प्रकार' || क्षेत्र == 'नाम' || क्षेत्र == 'कार्ड' || क्षेत्र == 'पैसा') {var टी = $ ( '# महानिदेशक')। datagrid ( 'selectRow', rowIndex) console.log ($ (टी) .html ()) ZeroClipboard.config ({moviePath: "{{यूआरएल :: करने के लिए ( '/')}} / images / ZeroClipboard.swf"}) // नकल सामग्री () वर ग्राहक = नए ZeroClipboard ($ ( '# महानिदेशक') datagrid ( 'selectRow', rowIndex)।); client.on ( 'लोड', समारोह (ग्राहक) {// चेतावनी ( "फिल्म भरी हुई है"); client.on ( 'datarequested', समारोह (ग्राहक) {client.setText (this.innerHTML);}); client.on ( 'पूर्ण', समारोह (ग्राहक, args) {चेतावनी ( &

ios - Cache UIImage using uitableview from url -

With a custom cell containing two UImages, a uitableview hava Images of logo are taken from the online website, so images need to be cached. The image is still loading so far: ns URL * imageURL = [ns url URLWithString: [arra1 objectAtIndex: indexPath.row / 2]]; NSDTA * ImageData = [NSDTATA DATAVITY content of the: imageURL]; NS URL * imageURL2 = [NSUr URL YouthString: [Array2 ObjectAntindex: IndexPath.ro / 2]]; NSDTa * ImageData2 = [NSData Datatyh content of the ur image image2]; Cell.ima1.image = [UIImage imageWithData: imageData]; Cell.ima2.image2 = [UIImage imageWithData: imageData2]; What I learned from searching is that dataWithContentsOfURL does not have asynchronous, and scrolling will take a lot of time. I tried many ways but I can not seem to have the right one. This is my first UIImazing caching for the first time, I appreciate the detailed explanation with the implementation so that I can learn differently from getting a job. Thank you very much I use this lib

javascript - having issue to calculate each div top and left position in masonry grid -

Image
I have created a grid gallery where each division has different width and height I want to make this gallery like masonry < / P> This is my JavaScript snippet of code here function posit () {$ (". Sli"). CSS ({"status": "relative"}); Var k = 0; Total = $ (". Sli1"). Length; $ (This) .css ({"position"} ($ ("sli1") each (function () {// alert (k ++); // var selectpos = selectedItems.position (): "absolute"}) ; Var c = $ (this) .position (); console.log ((k) + ':' + c.left); var d = $ (this) .autterwidth (); $ (this) .css ({ "Left": (c.left)}; $ (this). Css ({"top": (c.top)}}}}} k ++;}; $ (document) .ready (function ) {posit ();}); Can anyone help in calculating the same top and left position in each division so that I can mason? Please note : - I do not want to use any plugins Thankx in advance. UPDATED Here is the screenshot. How do I get my output < / Div>

java - Remote Desktop App with RMI -

I am trying to create a desktop app with RMI (Java) for the school. This is a simple chat app and I have found so many examples about how to create a chat app with RIM. "The problem" is that I have to make this app a mistake, so if my server does not work because my professor has a peer-to-peer connection between a client, so I have to make two types of connections : Client / server and peer-to-peer I have two questions: 1) If the server does not work, what is the best way to save data in the local client side to reach them? 2) Can I make a peer-to-peer connection with sockets or is there another way to do this? Thank you very much. 1. You should detect a remote exception error or server when try {} hold (pre-remote access) {// Some colleagues - in their client's code who attempts to connect to the server and when accessing STUB on RMI Second, you need a central server space that peer-to-peer data exchange is possible. At least when you want to conne

ios - Image not displayed perfectly on table cell -

Image
I use auto layout and building app for iOS 7. I am using a custom UITableViewCell . I want to display the UIImageView from the inside with contentView with some margins. So I have taken a UIView , from which there are limitations for contentView UIImageView which I want to show this UIView , With all the edges touching its supervision. Now, issue UIImage (green background) that is set to UIImageView is not completely displayed completely I mean that It is displayed but below 1px is not displayed. I have set the picture in the storyboard and it looks right as shown below. But when I run the app I'm shown it below. It is clearly visible in the storyboard, but when I run the app, focus on the black line below. Please note that the storyboard The cell height is 95pts. Image height is 77pts, apart from this, when I scroll up and down the cell, I think this lower line is visible while scrolling, but at the time the top rows are not visible properly Are ther

indexing - R-Tree and Quadtree Comparison -

I want to compare R-tree and quatttree for geospatial data. While there literature is available, I struggle to find documents that cover the actual basic comparison. So I decided to ask this question. In my opinion, R-tree has the advantage of being balanced and there are no empty leaves of the tree. In the form of a loss, the basic process of inserting or removing can result in whole index restructuring. . Quatratie is opposite, it is not balanced and empty straps, but it does not need to be restricted. In this way, as a visitor, I would say that the R-tree needs less memory and it is faster to search because of its low altitude. Quatttree is better when there are several update-operations, but the resulting tree may be unbalanced. Is this point right in your opinion? Are there any good documents that cover this topic? Auf Wiedersehen, Andre "restructuring the whole index" No. R-tree restructuring is limited to a single path, not the "complete" ind

.htaccess - Helicon ReWrite rule for static pages -

हेलिकॉन पुन: लिखना cond / नियम मैं इसे एक स्थिर पृष्ठ पुनर्निर्देशित करने के लिए उपयोग करने की आवश्यकता क्या है: / Page.asp?pg=ovens < P> यह आपके लिए काम करना चाहिए: रीवरइटइन्गइन ऑन रीराइटकंड% {THE_REQUEST} ^ (प्राप्त करें | पोस्ट) \ / पृष्ठ \ .asp \? Pg = ovens \ HTTP RewriteRule ^ http: // Www.rdo.co.uk/products.asp?id=134&rs=1&sel_supplier=28 [आर, एल] यह पेज के बाद पैरामीटर की जांच करेगा < / कोड> और यदि यह ओवन है तो वह इसे आपके द्वारा निर्दिष्ट पृष्ठ पर रीडायरेक्ट करेगा, यदि ऐसा नहीं है, तो यह इसे छोड़ देगा।

php - CakePHP: How to login using only barcode? -

I started learning KPHHP about the month before, so I am quite new to this and I want to ask a question: < p> How do I use barcode only? My plan is to log in with regular barcode for regular users only and they will have their regular username and password for admin login. I have searched many pages but I have not found any solution for this. for example QR-code: The login function is used in the administrator: if ($ this-> request-> is ('get')) {$ user = $ this-> ; User- & gt; Search ('first', array ('conditions' => gt; array ('user.name' => = this- & gt; request- & gt; query ['username'], 'user password' = & Gt; $ this- & gt; Request- & gt; query ['password'] / do not forget the hash password if I ($ user! = Null) {$ this-> AUTH- & gt; Login ( $ User); $ this- & gt; redirect ('/ admin / index');}}

Initializing list with data returned by datetime.strptime() in Python -

मेरे पास अजगर मॉड्यूल है: आयात समय समय सारणी = [[".US", " ('% H:% M:% S', '22:00')], [".पीएल" , Datetime.strptime ('% H:% M:% S', '09:00'), datetime.strptime ('% H:% M:% S', '16:50')], [".CZ ", Datetime.strptime ('% H:% M:% S', '09:00'), datetime.strptime ('% H:% M:% S', '16:20')], ["। ("% H:% M:% S ',' 17:30 ')], [" डीटीई ",'% एच:% एम:% एस ',' 09:00 ' ('% H:% M:% S', '17:30')], [ ".IT", datetime.strptime ('% H:% M:% S', '09:00'), datetime.strptime ('% H:% M:% S', '17:30')], ["पीटी", datetime.strptime ('% H:% M:% S', '09:00'), datetime.strptime ('% H:% M:% S', '17:30')] , ["। यूके", datetime.strptime ('% H:% M:% S', '09:00'), datetime.strptime ('% H:% M:% S', '17:30') ], [".

php - MySQL query or regexp find only pattern D, E, F -

My google-fu is failing me, if someone points me in the right direction that great for concept or words Will happen. / P> I am trying to get the rows from a mysql database say that I have a variable equal to 'def' I example column, Example column, / pre> D, DEF, ED, EDF, FED /p> What you need is a user-defined function to see if the wire is match. Here is one: Prepare the Delimiter // Function Permit (Needle varchar (255), Haystack varchar (255)) Returns declare bool needles, position first_occurance int; Set needles_position = length (needle); While needles_position & gt; Set first_occurance = instr (haystack, substring (needle, needles-path, 1)); If first_occurance = 0 then false return; end if; Set greenstack = (choose contact (white (1, first_accurrence1), substrings (hastacks, first_corement + 1)); Set need_position = needles_position - 1; While the end; Back true; End // Now you'll get what you want: choose example_column from

Magento: www.mysite.com/?SID="number" is appearing in one of the google urls -

I was searching on all my URLs using the site: www.mysite.com to check whether all these There are redirects properly, but I found one of the URLs in Google search: www.mysite.com/?SID="long number ". How to delete this URL from Google Thank you in advance It is possible to remove URL parameters in Google webmastertools. On the dashboard, under the crawl, click URL parameters. Next to the parameter you want, click Edit. (If the parameter is not listed, click Add parameter. Note that this tool is case sensitive, so be sure to type your parameters properly as shown in your URL.) If the parameter does not affect the content displayed to the user, select No ... Change this parameter in the list ..., and then click Save. If the parameter affects the content's performance, then yes: compress changes, reader, or page content, and then choose how you want Google to crawl URLs with this parameter. -

c# - Error establishing connection to SQL Server -

For the first time, I have started making a local database in Visual Studio and I have a hard time trying to do this work. I tested in a modified connection and it works and it also gets the string of connections: string ConnectionString = @ "data Source = D: \ bratulescu mihai \ WindowsFormsApplication1 \ WindowsFormsApplication1 \ NodeBDatabase.sdf "; SqlConn = New SqlConnection (connection string); sqlConn.Open (); But when it tries to open () it can not connect. I do not know a lot about this whole server thing, I've just made DB and this is a dataset. If you are using sql , then I think that If you are reverting the sdf file, you should add a reference to System.Data.SqlServerCe and try: System Using Data.SqlServerCe; .... sqlConn = new SqlCeConnection (connection string); sqlConn.Open ();

ruby - Simulate read-only database with Rspec / Rails -

I am currently running a unit test of my RAR application. One of my controllers should return an HTTP status 500 when it can not write a new entity to the database. I want to test this behavior and just read it to read my database temporarily. Does anybody know that it is possible to do this? I tried the technique outlined in "", but this approach does not work for me (because the administrator reads before writing the database). I think you are checking the controller, if you can only duplicate the model requests Are there. So, what should be the exception Model.create throw? Try doing something like this: Model.stub (: create) .and_raise (ActiveRecord :: ReadOnlyRecord)

scala - Akka - How to handle termination -

I am using the redis-react-nb library with my Akka app. Unfortunately, when a connection to a library is lost, a connection will close itself to context stop self This means that my application is thus Receives an end notification: Received DIF: Actor. Receive = {case ended (actor RF) => ...} So I'm wondering what to do here. Ideally I want to start all the children's artists again so that they can start with all the new redesign connections - basically resetting the actor system to its initial state. Am I missing some concept? Or is there any way of restarting all the children without an exception to an actor? Self! Restart all or something similar? Another way to see this is that actors are talking about you, Radis Depends on the actor, can not continue his work without it. In that case it would be better to increase it as a failure of her parents and to restart it. If you do not handle terminated messages, then a DeathPact accusation will be thrown

vb.net - Add an Html Control in multiple parents in asp.net -

I am creating a new unordered list as follows: htmlUL Using the new HtmlGenericControl in the form of a ("UL") end use Before closing the 'experiment' section, the list must be added to the original control: Using htmlUL New HTGL Control ("UL") 'some code here parent 1. Control Adding (htmlUl) ending Unless I add my parents to my control, everything works fine: Using the New HTML Engineer Control ("UL") as the HTMUL 'Some code here parent 1. ControlAdd (HTMLUL) Parent 2 ControlsAud (HTLML) '& lt; --- Only the last parents have been added to the collection. Use of End This behavior is expected because every control is unique but I want this list to be more than one parent, Father needs to be added (to avoid conflict, no static id is included in it) ASP.NET does not support landscape such as too much control used in many places Control Item . Here I believe that there is a problem in identifying the control

jsf - model validation of table using extval -

The values ​​in the table in my page are in the editor. Something like this: & lt; H: DataTable var = "actor" value = "# {bean.actors}" & gt; & Lt; H: column & gt; & Lt; H: input value = "# {actor. Name}" /> & Lt; H: column & gt; & Lt; / H: datatable & gt; I want all the actor bean in the list. Actors are valid, when users click on the savings button So I put the following annotation inside my bean @BeanValidation (usergroup = default.clash, model validation = @ModelValidation (isActive = true)) Private list & lt; Actor & gt; the actors; inside my actor object @NotNull is the personal string name; @AssertTrue Public Boolean is invalid () So non-annotation is valid for all actors, but AssewtTrue is not valid. GetActors} Another strange thing is that if I go to the ground level Walid is not working, but I do not have time to check it.

javascript - jQuery - Enable/Disable a button following checkboxes state -

I am using ASP.NET MVC4 to develop a web app. I have a page that has a submit button that should only be enabled, if one of my two checkboxes is (enabled) the thing is, I try to add the "or" operator to the following script I am, but it does not give me what I want. So, this is my script: And this is the part that I want to improve: $ (document) .ready (function () (The_terms = $ ("# the-terms"); the_terms2 = $ ("# the-terms2"); the_terms.click (function () {if ($ (this) .is (":" checked Att $ ("disabled", "disabled");}}});} Code> And I can not find any way to tell my document "Okay, if any of these check boxes (or both) are checked, then we press the button If not, then allow it Do not give ". Any ideas people? can be done with it Is: $ ('.' Checkbox '). Change (function () {$ (' # submitBtn '). Note: This check box The class name is found in the checkbox , so it

search - filter words for searching in mysql -

I want to search in mysql in 4 format: (for example: expensive book) 1- All words 2- Exact word or phrase 3- Any word 4- Any word < Select the text from the code> item where "%." Select the text. '%'; Can anyone help me filter out words in the 'Where' section? Try it: 1) Lessons like WHERE '%%' and lesson '% mahjong Text like '%' and 'book%' 2) 'expensive book%' like '%' 3) Text like '%' or '% text' expensive '%' or '% book%' as text ' 4) where text is not like'% ' And the text '% expensive%' and do not like the text '% book%' Note that this is not quite effective and can take some time on the big table, especially 4) .

Displaying Console and Debugger at same time in IntelliJ -

Image
There is a debugger and console on different tabs in the default layout, I think I can pop the console as a floating window I can add it as a tab in the "Variables" or "Watches" pane in the Debugger tab. I have a layout which displays the information of the console and debugger at the same time (such as a partition pane, or a separate panel on the "debugger" tab because it is useful for viewing the console while moving through the debugger. Any suggestions on how this can be accomplished? I am using Intel 13.1. Whatever you can do, drag one of the window windows (either debugger or console) Drag and drop across the entire window, as if you want, there will be a purple highlights box, such as my debugger / console window. on the same window

java - updating Apache Lucene indexed files -

I am using Apache Lusen Library to create a search functionality for my website. The website is acquiring all its content from SharePoint RSSFeeds, so every time I go through the RSSFeed URL and read the content. To make search functionality faster, I've created a scheduled task to index every one hour: & lt; Bean id = "rssIndexerService" class = "com.lloydsbanking.webmi.service.RSSIndexService" / & gt; & Lt; Functions: Scheduled Tasks & gt; & Lt; Task scheduled ref = "RSSINX service service" method = "index urls" cron = "0 * * * mon-fry" /> & Lt; / Functions: Scheduled Tasks & gt; The problem is that if I make a new content, the search does not display new content, while the server is running and after the scaled work was called, if I I delete the entry, it does not show the entries entered from the still index files. Here is the indexing code: @ Service public category RSSIndexerService

java - jasper.jar has no source attachment TagFileProcessor.class when using a JSP tag -

I have a problem loading JSP tags in my JSP pages. I like Taglibs: And include my tag in this type of page: & lt; Tags: company-icons company id = "$ {company.id}" /> When I try to go to the page with this tag line, I get the following: jar file / appointments / sin-tomat -7.0 .53 / lib / jasper.jar does not have any source attachments. You can attach the source to the source given below by clicking on the attachment: If I add jasper.jar then I get the following: < Code> source tag for the tag is not included in the source filefile processor Class I like Jasper The gz file is unzipped and there is a tagfileprocessor. Class file but no .java that should be fine. It has been working fine for several months and suddenly stopped working with any explanation. Any ideas? At the top of my tabs, I need to: & Lt;% @ Tag language = "Java" page encoding = "US-ASCII"%> While I had: & lt;% @ tag l

angularjs - Import entities from local storage when using ASP.NET WebApi OData not loading extra metadata -

When I try to save the imported organizations from the local stores, the exception is thrown here. var extra metadata = aspect. Additional metadata; Var uri = Additional Matte Dy. || ExtraMetadata.id; If (Cor.StartStarsWith (Yuri, BUSURI)) {Uri = PassPrint + Yuri. Substring (BUSURI LAMPER); } Request.request Yuri = Yuri; If (extraMetadata.etag) {request.headers ["if-match"] = extraMetadata.etag; } But if I get data from the Odata service it is saving correctly. I am missing something while importing data from local storage. I tried to solve, but he did not help me. This is a bug that we are tracking (# 2574). I was hoping that we would fix it for v.1.4.12 but it seems that he has to wait for a cycle. There is no good solution. You can try to remember yourself additional metadata (in some sidebands storage) and you can re-attach it when you import again. I do not have fun Sorry I know.

asp.net - How to protect password in Excel while downloading? -

How to protect passwords in Excel when downloading excel file this.Response.AddHeader (" Content-displacement "," attachment; file name = report with history. Xls "); This.Response.ContentType = "app / vnd.ms-excel"; Byte [] buffer = System.Text.Encoding.UTF8.GetBytes (sb.ToString ()); Finally I got the code: Secure zero page_load (object) Sender, EventErgues e) {DataSetToExcel (GetDataSet (), False); } Private Static Dataset GetDataSet () {DataSet ds = new DataSet (); System.Data.DataTableDT = New System.Data.DataTable ("Table"); Dt.Columns.Add ("name", Type.GetType ("System.String")); Dt.Columns.Add ("Address", Type.GetType ("System.String")); Dt.Columns.Add ("Phone", Type.GetType ("System.String")); Datarov Dr. = DT. NRO (); Dr. ["name"] = "Balaji Selvarjan"; Dr. ["address"] = "Reddysur"; Dr. ["phone"] = "000 -0,000"

html - css insert an image from another website? -

I want to add a background texture image to a web page and I have used the following rule to insert an image: < / P> Background image: url ('http://s19.postimg.org/r5f8g6uzj/container_pattern.jpg') Repeat; The image I want to add is:; Although it is not working and while compiling a low file it gives an error with this rule, what is wrong or how can it be done? postproc = text "> Try this: style =" height: 300px; Width: 200px; Background-image: url (http://s19.postimg.org/r5f8g6uzj/container_patternJpg); Background-Repeat: Repeat; " 1) Specify the height and the width. 2) There is no space between url and '(' 3) '/ P> 4) Single Background-Repetition Properties

ios - how to integrate AdMob in iPhone application -

After I want to apply AdMob functionality to the current project. I have some problems to implement this technique, can you please help me on this? I am integrating AdMob into my iOS application for the first time. . "To add _OBJC_CLASS _ $ _ CTTelephonyNetworkInfo", refers: ObjC- class ref libGoogleAdMobAds.a (GADDevice when AdMob SDK undefined symbols application architecture i386, the following errors It appears that during this process .o) "_OBJC_CLASS _ $ _KStoreProductViewController", referenced from: libjava-class-ref in libGoogleAdMobAds.a (GADOpener.o) "_SKStoreProductParameterITunesItemIdentifier", referenced from: - [GADOpener openInAppStore: fallbackURLString (inlove ) Lib libAdMobAds.a (GADOpener.o) ld: Symbol (s) Architecture not found for playing i386: Error: Link Out of order exit code 1 (access to view failed invocation with the -v) follow you can import the following frameworks - AdSupport, AudioToolbox, AVFoundation,

How to get elements info from a PowerPoint slide with the JavaScript API? -

I'm playing with a new JavaScript API, which I think is amazing news I'm playing with the Excel API I am no longer a problem. The thing is that I have a purpose with the PowerPoint API that I can not reach yet: How to remove all the information from a slide. I used but I found that only Office.CoressionType.SlideRange can be used for PowerPoint, and it only JS, title and index . I'm seeing a way to remove object data from a specific slide, by exporting this file and then accessing the XML file, mapping it to JSON and giving it to us By sending it to the API so that we can consume that data later on. This option has a large development cost (sending the entire file). Then the last question is as follows: Which is the best way to get JSON data from all the objects placed on a unique slide from PowerPoint? Thanks in advance! Sorry for letting me know that I do not believe you have it in PowerPoint Office.js By now, one of the Downsides to Office.js

sql server - Get Value from column depending on another column value in SQL -

मेरे पास ऐसा तालिका है आईडी कोड पाठ 100 1 संक्षिप्त विवरण 100 100 2 कोड फ़ील्ड में मान के आधार पर अब text फ़ील्ड से डेटा प्राप्त करना चाहते हैं I अगर कोड 1 इसका संक्षिप्त विवरण है और यदि कोड है 2 इसका लंबा विवरण मेरे इच्छा उत्पादन इस तरह है आईडी shortdescription longdescription 100 संक्षिप्त विवरण 100 लंबे descr 100 101 संक्षिप्त विवरण 101 अशक्त इस प्रयास करें: का चयन करें आईडी, मैक्स (मामला है जब कोड = 1 फिर पाठ अंत) shortdescription के रूप में, मैक्स (मामला है जब कोड = 2 तब आईडी के आधार पर TableName ग्रुप से longdescription के रूप में पाठ अंत) में परिणाम यह प्रश्न के रूप में एक ही है:। का चयन करें आईडी, मैक्स (shortdescription) shortdescription के रूप में, मैक्स से longdescription के रूप में (longdescription) (आईडी, मामला का चयन करते हैं कोड = 1 तब shortdescription, मामले के रूप में पाठ अंत कब कोड = 2 फिर पाठ अंत TableName से longdescription के रूप में) आईडी के आधार पर टी ग्रुप NB: इस क्वेरी के काम को समझने के लिए, पहले आंतरिक क्वेरी को निष्

java - Broadcast Receiver for power button (screen state) doesn't work -

I use this code to start an activity when the power button is pressed 2 or more times but it Does not work. My code for Code: MyReceiver.java is here: Import android.content.BroadcastReceiver; Import android.content.Context; Import android.content.Intent; Import android.util.log; Import android.widget.Toast; Public Class Mayrecewer Expands Broadcast Receiver {Private Static Int Count Poweroff = 0; Public MyReceiver () {} public void on reverse (reference references, intentions) {if (intent.getAction (.) Equals (Intent.ACTION_SCREEN_OFF)) {log. ("In receipt", "in law: ACTION_SCREEN_OFF"); CountPowerOff ++; } And if (intent.getAction (.) Equals (Intent.ACTION_SCREEN_ON)) {Log.e ("in receipt", "in law: ACTION_SCREEN_ON"); } And if (intent.getAction (.) Equals (Intent.ACTION_USER_PRESENT)) {Log.e ("in receipt", "in law: ACTION_USER_PRESENT"); If (countPowerOff> = 2) {countPowerOff = 0; Toast. Make text (context, "

c# - JSON Deserializing string starting with double quotes is not returning correct result -

serialing and then deserializing string "/" abc "is giving wrong result. Is unsuccessful: Serialize and dasherize public zero test correctly (Handsets) {var data = "\" abc "; Var Results = JsonSerializer.SerializeToString (Data); Var deserializedData = JsonSerializer.DeserializeFromString & lt; String & gt; (result); Responsibility That is (deserializedData, is.EqualTo (data)); }

Using C/C++ for heavy calculations in Python (Also MySQL) -

I am implementing an algorithm in my Python Web application, and it involves involving some (potential) large clustering and matrix calculations. I have seen that Python could use C / C ++ libraries, and thought that it might be a good idea to use it to speed things up. First of all: Do not have any reason while doing this, or should I keep in mind anything? Second: I have some reluctance to connect with MySQL (where I will get data calculation). Use the ecosystem. For matrix, using numpy and scipy can provide almost the same functionality, such as tools like Matlab. If you learn to write idiomatic code with these modules, then the internal end of the module can be in C or Fortran implementation, which results in the overall performance of C-like overall performance with Python expression. You may also be interested in numexpr, which can move forward and in some cases parallel to sample / sippy expressions. If you need to type the intense inner end in Python, you may be ab

How can we get the xml data in c#? -

I want to get data from this XML document. How do I get it? & lt; Group NAME = "Suspense A / c" RESERVEDNAME = "" & gt; & Lt; PARENT type = "string" & gt; & Amp; 4; Primary & lt; / PARENT & gt; & Lt; LANGUAGENAME.LIST & gt; & Lt; NAME.LIST TYPE = "string" & gt; & Lt; NAME & gt; Suspense A / c & lt; / NAME & gt; & Lt; /NAME.LIST> & Lt; /LANGUAGENAME.LIST> & Lt; / Group & gt; I need these values ​​ Group name ( mystery A / C ) Parent ( primary ) Thank you in advance. I'm a fan of XML. Shiyangan XML Surgery Directoryalization method then something like this will list & lt; Suff & gt; Variable = new list & lt; Content & gt; (); XmlSerializer xml = New XmlSerializer (variable.GetType ()); {Variable = (list & lt; content & gt;) xml.Deserialize (reader) using XmlReader Reader = New XmlReader.Create ("Path"

javascript - Show an individual part of a string as output -

This is my javascript code. I have the li tag in javascript I just want to get the price using How can I do this? Javascript var s = " First LI I want to show as first and second link as output. Thank you. With the help of jQuery this is not easy: <<>> gt ; Var str = '& lt; Div & gt; First & amp; Lt; / Li & gt; & Lt; Li & gt; Second LIT & lt; / Li & gt; & Lt; / Div & gt; ', first = $ (' li: eq (0) ', str) .text (), // "first LI" second = $ (' li: eq (1) ', str) .text (); // "get another" console.log (first, second);

sublimetext2 - linting error for angularjs HTML template -

I am trying to use the elegant linter-HTML-TDE on the following angular template: & lt; Div class = "empty-panel" ng-show = "feed! = Null & amp; feed length == 0 and ADA loading_done" & gt; & Lt; I class = "icon-time" & gt; & Lt; / I & gt; & Lt; Br> & Lt; Span & gt; Nothing changes & lt; / Span & gt; & Lt; / Div & gt; linter gives me this error for "& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp;; માં the donut feature as " unsecured & Which should be written as & amp;; " How do I potentially flag it as a subline-HTML-problem? There is no real error, it is recognized as HTML and not as javascript. It is telling you that instead of ' & Amp; & amp; nbsp; Instead of putting an HTML character & amp; amp; , if you do not want to change your character & amp; & amp; For;; you can edit u

SQL Server Select from multiple tables in array -

SQL सर्वर 2808 के बारे में सरल प्रश्न। देखें 1: Sys.tables से नाम चुनें जहां 'ab%' परिणाम जैसे नाम चुनें: नाम ---- ab01 ab02 abxyz आदि ... अब मैं उन तालिकाओं से पूछना चाहता हूं। दृश्य 1 से चुनें * बेशक मुझे ab01, ab02 , अक्सिज़ मैं चाहता हूं कि सामग्री पर प्रश्न पूछना ab01, ab02, abxyz से चुनें * सभी के सर्वश्रेष्ठ view1 क्वेरी पर संघ का उपयोग करने के लिए यूनियन व्यू 1 कुछ ऐसा होगा चुनें * ab01 से संघ चयन * ab02 से .... कोई भी विचार? ग्रीटिंग्स कर्सर का उपयोग करें एक अस्थायी तालिका बनाएँ। कर्सर के माध्यम से लूप और परिणाम अस्थायी तालिका में जोड़ें। अस्थायी तालिका से सभी का चयन करें

windows - Powershell script for creating local users and write details to XML file -

I have created a small script to create an environment for Windows local users and their FTP access. The script is working well, apart from it, it should write the details in the XML file. The script creates only one user at a time stores the name of the user in the variable named $ accountName , the full name in $ fullname , $ password generated password works in the home directory $ directoryPath and the variable $ date creates the date code of creation, but it is always accompanied by the details of the last-created user Adds the file to an XML file. To specify the XML file - Host - First yellow "Write a description to XML ..." # # Create a Template XML to keep the data $ template @ @ '& lt; FtpUsers & gt; & Lt; Account & gt; & Lt; Account's & gt; & Lt; / Account & gt; & Lt; FULLNAME & gt; & Lt; / FULLNAME & gt; & Lt; Password & gt; & Lt; / Password & gt; & Lt; DirectoryPath & gt