Posts

java ee - Application context path at JAX-RS 2.0 resource instance construction -

क्या JAX-RS 2.0 रिसोर्स क्लास इन्सस्ट्रेशन निर्माण समय पर जावा EE 7 एप्लिकेशन के लिए संदर्भ पथ प्राप्त करना संभव है (और संभवतः स्थैतिक कक्षा प्रारंभिक समय पर भी), या क्या यह केवल संसाधन वर्ग के समापन बिंदुओं के अनुरोध के दौरान ही उपलब्ध है? संदर्भ पथ से मेरा मतलब है कि स्ट्रिंग जो कॉल द्वारा HttpServletRequest # getContextPath () जावा EE 7 अनुप्रयोग के अंदर। मैं सोचता हूं कि आपके पास एक नियोजित अनुप्रयोग के लिए एकाधिक संदर्भ पथ उपनाम हो सकते हैं। यदि हां, तो संदर्भ पथ केवल अनुरोध समय पर ही उपलब्ध हो सकता है। मुझे उस संदर्भ पथ के बारे में परवाह नहीं है, जो अनुरोध के लिए URL में वास्तव में उपयोग किया गया था। एक कैनोनिकल या डिफॉल्ट संदर्भ पथ, जो कक्षा में समापन बिंदुओं के लिए काम करेगा, मेरे लिए काफी अच्छा है। इस तरह के एक संदर्भ पथ को प्राप्त करने के लिए तकनीक को जैक्स-आरएस 2.0 विशिष्ट नहीं होना चाहिए। यह कुछ अन्य जावा ईई 7 युक्ति से आ सकता है, जब तक कि यह जेएक्स-आरएस 2.0 संसाधन वर्ग निर्माण समय (या अधिक मोटे तौर पर, स्थिर क्लास प्रारंभिक समय पर) में काम करता है। अपडेट: ...

java - How to continue looping through DataInputStream? -

I am reading a binary file and I have to parse this file in the header. Set up a DataInputStream and I need to keep looping through the file till the end. I'm new in Java so I'm not sure how I will achieve this from my own C # experience. At the moment I have the following code: while (is.position! = Is.length) {if (card == employee) {System.out.print (card); } And if (card == student) {System.out.print (card); } And if (card == admin) {System.out.print (card); } Else {System.out.print ("wrong"); }} is the input stream I have created, the only error I have is in the first line, where the loop of time starts under the condition and it It says that they can not be solved or there is no field. Given this, it is the location field of DataInputStream Perhaps you can use one of the other ways to check whether or not available, but this is not clear from your code sample what you are trying to do. There are currently many issues like I card , empl...

android - Select H264 Profile when encoding with MediaCodec and MTK Codec -

We have an Android app that encodes the video in H.264, all the previously tried Android devices, this baseline The profile I encode is what I need. Codec Omx at Lenovo Yoga 10. MTK Video. Encoder.avc is This encodes the video as a high profile, which gives the problem for the receiving device. I'm not using MediaCodec to see a way to use profiles. Is there any way to do this? The codec claims to support the baseline profile but there is no way to use it. Is there any codec specific parameter for this? Whatever you can try is the key profile in your MediaFormat , with the value of 1 ( OMX_VIDEO_AVCProfileBaseline ). If you do this, you probably have to add the key level along with your resolution to the value of a level (with the value of the OMX AVC level constant). I 'I'm not sure if this codec really honors the requested value, but it may be worth a try. Look for the setupAVCEncoderParameters function for an example on the setup process It app...

javascript - CKEditor android formatters work incorrectly -

I have a CK editor for my AP v. 4.3.1 I tested it on the Android tablet - everything worked fine, but when I tried to enter text in the Android mobile phone through CK Editor, there was a problem when I tried the format button (bold, superScript, Etc.), they will not work, but when I press the space button and then press the Format button, they work normally. (Android v 4.4.4, Chrome v.37) Has anyone encountered the same problem? In the future, if you need to report a bug to CKAditator, it is better to do so. We did some tests and your conclusions are correct: can you add an additional information for the ticket, whether you are using stock Android 4.4.4 or eg CyanogenMod?

c# - Save taken snapshot -

I have done everything, how is everything inside, everything is fine except for one I can not save the snapshot. If I'm fine with debug everything ... will follow .. what's wrong? public class FFMPEG {process ffmpeg; Public zero exec (string input, string parametry, string output) {ffmpeg = new process (); Ffmpeg.StartInfo.Arguments = "-i" + Input + (parametri! = Null? "" + Parametri: "") + "" + Output; Ffmpeg.StartInfo.FileName = HttpContext.Current.Server.MapPath ("~ / ffmpeg.exe"); Ffmpeg.StartInfo.UseShellExecute = false; Ffmpeg.StartInfo.RedirectStandardOutput = True; Ffmpeg.StartInfo.RedirectStandardError = True; Ffmpeg.StartInfo.CreateNoWindow = True; Ffmpeg.start (); Ffmpeg.WaitForExit (); Ffmpeg.Close (); } Public Zero GetThumbnail (string video, string jpg, string valikana) {if (velicina == null) velicina = "640x480"; Exec (video, "-SS 00:00:06" + velicina, jpg); }} FFMPEG f = new FFMPEG (); ...

excel - Apply macro filter across Multiple worksheet in a workbook and and save the filtered value as another workbook containing those multiple sheet -

I have a workbook that has 23 working papers, allowing me to filter the data from 23 work sheets to the macro auto filter And those data will be saved as work book along with the filtered data in those 23 worksheets. sub-switch_filter (), as integer, as integer, integer As, integer as i am full As a result, as a whole, as well as an integer, as in as integers, fractions, s1, variant j = Worksheets. Number s = input box ("enter switch id") s1 = s & amp; ; "*" If the S & lt; & Gt; For VbNullString again with K = 1 to 20 if (k & lt; & gt; 1) and (k & lt;> 4) and (k & lt;> 7) then with worksheets (k). UsedRange.AutoFilter field: = 3, Criterion 1: = s1 LastRow =. Call (.Rows.Count, "A"). End (xlUp). LastRow range for I = 3 (cell (i, 1), cells (i, 36)). Select the selection .copy workbook. Open filename: = "C: \ user \ takyar \ documents \ salesmaster-new.xlsx" worksheet (k). Select Erow = ActiveSheet.Cells (row...

javascript - Mixing html5 with non-async tags -

After some interesting conversation on Async, I could not find any information about what happened if you followed the regular script tag, followed with an async. I tried to do a quick test and what do I expect to do this: if I have placed a non-async tag for the first time, it always seems to load it later async Responsible tag Here I am testing that code: test.html: & lt ;; Doctype html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Trial & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script src = "https://code.jquery.com/jquery-2.1.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "test.js" async & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt; test.js: warning (window .jquery); In every case it seems that jQuery loading. Maybe I'm missing something in my tests, is that right? Can I have depende...