Posts

Showing posts from April, 2015

android - How can i know if the lat and lng is in the specified range? -

Hello, using the condition of my user, it developed the Android app, to convert it to latitude and LNG, mine The user will also set a range (10km for this example), my user will do a search in my app, and I will search the web server in the places near my web server, the web server will return me the list of places , The question is. How do I know if latitude and LNG are in the specified range? Ex: User Status -14.84598758 / -17.54817477 Status 1 -14.4451524 / -16.54654254 // Is it within 10 km range? Poistion 2 -14.8444477 / -17.54141587 // Also? Google Maps API v3 - Android here Find the differences between the two Let us use it to calculate both the x values ​​and the two values ​​of both points, and the length of the hippotinus. This will give you a radius for a cycle which is the most common type of gifens. A more efficient "square" area can be computed into database queries simply by comparing categories of X and Y, and can potentially be indexed for ...

ios - Using swift and spriteKit how can I rotate SKSpriteNode around the point outside of node? -

How can I rotate the node in a spreadsheet near an arbitrary point? I already create an answer "SKNode and position your position in the center of rotation. The node should rotate as a child around the center of the center node. The desired offset (i.e. radius , X + 100), position the position of the hair node in the center of the rotation of the center node to rotate the hair node around the center point. The Cocos 2D works only for the BTD " But I do not really understand how to write it in code :( I am starting very soon and it seems very difficult. Can anyone help me with code? I did it after a few hours of use. var : SsprintNode = Ssprintnode (Image Named: "Fish") Fish. Chart Point = CP point (X: CGFloat (-0.5), Y: CGflat (-0.2)) Fish .ZPosition = CGflow (Y + 0.5) Fish. Bollyz = CP point (X: CGFLOT (X), Y: CGF Loat (-60-96 * (y-3)) UP = SACAction. ROTEngel (CGFLOT (3.14), Duration: NSTEEnterval (1) fish. Rain Action (Jump)

asp.net - Javascript code is not working second time -

I am newbie in javascript I have two text boxes & asp: textbox id = "Txtbox1" class = "txt" runat = "server" /> & Lt; Asp: textbox id = "txtbox2" class = "txt" runat = "server" /> I am using JavaScript validation here so that the user could not enter zero value. I'm using this code on my Javascript code OK button. & lt; Asp: button id = "btn_add" runat = "server" OnClientClick = "validate ();" OnClick = "btn_add_Click" text = "submit" /> The problem is now that when the user leaves the text box blank and clicks on the button, the error message is displayed and then the user corrects it on the mistakes and then on the button Click if the button is not working. Nothing happens EDIT: My Javascript code & lt; Script type = "text / javascript" & gt; Validate the function () {var error = 0, value, A, Q, I; Value = docume...

If Functions with multiple conditions in excel 2010 -

I'm having difficulty with this function / array. {= if (ROWS (A9:! A $ 9) & lt; = A $ 1, index (tracker C: C, small (IF (tracker $ C $ 3: $ C) $ 9965 = one $ 2, tracker $ R $ 3: $ R $ 9965 = $ 3, ROW (tracker! $ C $ 3: $ C $ 9965)), ROWS (A9: A $ 9)), " ")} (And yes, I have made it change + Ctrl + Array with Actually, I need to add another condition for this. I have tried many different ways, but no one seems to like my syntax What a special thing this is doing If T is looking for a betting column, I need to add another line to another line before the indicated cell display. What you see above is an act that works, but with only one condition. Whatever I have to do, it takes another condition before doing it that what it does now is just that much. Any help? Of Idea? Even how a presentation has been made together and why I love learning that give it to me! :) Try it out: {= IF (and ( ROWS (A9: A $ 9) & lt; = A $ 1, "second condition...

c++ - Visual Studio 2010 debugger points to wrong line -

Debugger in Visual Studio 2010 recently pointed to the wrong lines and / or skipping lines, I do not know why this is it. This is a CUDA project and only occurs in CUDA files, I have noticed the following: It is always in the same part of the program. These rows are always the same, i.e. not random. Add additional code hereafter criminals lines change that line. This only occurs in .cu -files. Running the code in .cpp -file does not recreate the problem. Whatever I have tried: Clean and reconstruct the solution. Install SP1 for MSVC 10 and make all possible updates through Windows updates Use No to optimize in debug mode C / C ++ and CUDA C / C ++ Delete all created files manually and then rebuild from the Solutions folder. Folder C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files Solution to the use of source files only Retrieving. Disabling my extensions. I have been able to reduce this code which can reproduce ...

excel - VBA Reading From a UCS-2 Little Endian Encoded Text File -

I have a whole bunch of text files that are exported from Photoshop, importing me into an Excel document Will happen. I wrote a macro to work and it worked fine for my test document, but when I tried to load some real files created by Photoshop Excel then insert all the data in a separate column except the first line Started. My code that reads the text file: Open the currentDocPath for input as input stream to stream # stream, find the current row column = Split (current, vbTab) value = column content (n) next en line = row + 1 loop off stream p> text files I'm reading this way, only more With data: "data" "Blah 2" The problem looks very trivial, but when I load it in Excel, it looks like the top, it looks like it looks like this: Now I'm not sure why this is happening, it looks like the first line in the first line is: ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, "name" "data" "info" "blah" info2 blah2 There...

c - unistd.h constants linux x86_64 -

अगर मैं 64 बिट लिनक्स पर एक साधारण प्रोग्राम में printf __ एनआर_एक्सिट , मान 60 & lt; asm / unistd_64.h & gt; में हालांकि, यह कोड (नोस्टडिब्ब के साथ संकलित किया गया है) segfaults: void _start () {asm ("movl $ 60,% eax;" xorl% ebx,% ebx; "" int $ 0x80 "); } लेकिन, यह अपेक्षित रूप से चलाता है: void _start () {asm ("movl $ 1,% eax;" "xorl% ebx,% ईबीएक्स; "" इंट $ 0 एक्स 80 "); } जहां __ एनआर_एक्सिट को 32 बिट संस्करण में & lt; unistd.h & gt; स्पष्ट रूप से 1 सही स्थिरांक है 32 बिट syscall मानों का उपयोग क्यों किया जा रहा है? $ uname -a लिनक्स गैलोइस 3.14.6-1-एआरएच # 1 एसएमपी प्रीपेप्ट सूर्य जून 8 10:08:38 सीईटी 2014 x86_64 जीएनयू / लिनक्स x86-64 सिस्टम पर कॉलिंग सम्मेलन अलग है। लिनक्स ने सिस्टम वी एबीआई को अपनाया, जिसमें उसका कॉलिंग सम्मेलन भी शामिल है। सिस्टम कोड को % rax में जमा किया जाता है, और तर्क % rdi % rsi , % rdx , % r10 , % r8 , और % r9 उस क्रम में, और syscall निर्देश का...

opengl es - Libgdx GLSL vertex world position? -

I'm trying a simple light shader that supports the point and directional light. Directional lights were completed, but I am struggling with point lights. How can I get the status of the top world to calculate the light direction? I am using Libgdx and a Phantom Baitter, and also an orthographic camera. For now, I am now (dirty) hack which is going to hand over the situation of the current phantom to the crumbler (center position), and it is going through its work. For what I have read in GLSL, I can get the ModelView matrix and multiply it with the current top position (I think this will be the "A_position" attribute) but I was unable to do this ... Vertex shader: attribute vec4 a_position; Attribute vec2 a_texCoord0; Uniform Mat 4 U_prose trance; Vec3 status changes; Zero Main () {vTexCoord = a_texCoord0; Position = a_position.xyz; Gl_Position = u_projTranance * a_position; } Fragment shader: Miscellaneous vec2 vTexCoord; Vec3 status changes; Uniform Sampl...

Python: Printing in the same exact spot using \r not working? -

I am trying to print the same place: for the category I (10): Print ("OK \"), However, it prints 10 OKs in different lines: OK ... I tried to put \ r in front of the string in this case, I get a blank line, then 10 oaks: [Empty] ok ok ... I also tried the following import System (s) for class (10): sys.stdout.write ('ok \ r') sys.stdout.flush () But the exact thing I found was in Python 2 I'm on Python, what am I doing wrong? I also tried it in idle, and the result of 'okokokokokokok' occurs when \ r occurs in the end, and 'okay okay okay okay okay okay okay okay' the result is coming out. Edit: I'm on Windows 7 Any help is highly appreciated! Try the following code, it works on Ubuntu, I've included a time. So call so that you can see what's actually going on: Import time to limit (10): print (str (I), end = '\ r') time.sleep (.4)

c++ - umenu.cpp undefined reference error -

इस सवाल का पहले से ही एक उत्तर है: 27 जवाब मैं संकलन करने की कोशिश कर रहा हूँ एक बॉट, और मुझे इसके साथ कुछ दिनों के लिए परेशानी थी डिबगिंग के कुछ घंटों के बाद ही मुझे इस त्रुटि से बचा है: libui.a (libui_a-uMenu.o): फ़ंक्शन में `uMenuItemString :: Event (SDL_Event & amp;) [क्लोन .part। 51] ': uMenu.cpp :(। पाठ + 0x447c): `get_scrap (int, int *, char **)' uMenu.cpp :(। पाठ + 0x47ac) के लिए अपरिभाषित संदर्भ:` init_scrap () 'के लिए अनिर्धारित संदर्भ इकट्ठा 2: त्रुटि: एलडी ने 1 बाहर निकलने की स्थिति बना ली है [3]: *** [आर्मैगेट्रोनैड_मैन] त्रुटि 1 बनाओ [3]: डायरेक्टरी `/home/noah/0.4-bot/src 'को बनाते हुए [2]: [ सब-रिकर्सिव] त्रुटि 1 बनाने [2]: निर्देशिका `/home/noah/0.4-bot/src 'को बनाने [1]: *** [सभी पुनरावर्ती] त्रुटि 1 बनाने [1]: निर्देशिका` / घर छोड़कर /noah/0.4- bot 'make: *** [सभी] त्रुटि 2 फ़ंक्शन get_scrap () और init_scrap () आपके लिंक में गायब हैं वे अन्य स्रोत कोड या लाइब्रेरी में हो सकते हैं।

javascript - Remove table TR while maintaining addClass -

OK, I have a table TR which is removed when you press a button I use animate.css And I would like to add a class once my AJAX request is made. This line slides out, but then I need to delete the line My javascript is as follows: $ ("delete"). Click (function () {var tr = $ (this) .closest ('tr'); var id = $ (this) .closest ('tr'). ('. Id') .html (); var datestring = 'Id =' + id; $ .ajax ({type: "POST", search) Url: "/ admin / deleteEvent /", data: data string, success: function () {$ (tr) .addClass ('animated BounceOutLeft '); $ (tr) .remove ();}})}}; The part I focus on is: success: function () {$ (tr). AddClass ('animated bounceaut left'); $ (TR) .remove (); } Now, the table row now disappears, it seems to exclude part of the join square to slide this line. How can I remove the add class at the same time? I do not think there is a callback, which you know when the ending of the closin...

swift - Missing argument for parameter 'options' in call -

I'm trying to compile the following code: Referee = CMSampleBufferGetImageBuffer (sample buffer) image = CIMAge (CVMAzfuffer: ref) As close as I can tell, CIMAge is a beginner that only takes a CVMF buffer There is another initializer, which also has an option parameter if I try and provide it, Programmed I get an error that I have called a option except argument, blurgh) Any ideas how to fix? It's easy! It turned out that the problem was that I was passing the appropriate type in the context. line ref = CMSampleBufferGetImageBuffer (sampleBuffer) actually rif to unsanhed & lt; & Gt; Structure declares the value, which means that the API is not kept, it shows how the ARC should be interpreted / unrelated, the origin of the ITA is considered to be a loose canon . So what I had to do was clearly tell the compiler to give me an inappropriate version, and then the code works great. Ref: CVImageBufferRef = CMSampleBufferGetImageBuffer (sampl...

java - Failed to Unregister DataSource JMX MBean While Shutting Down a Spring Boot Application -

I have an application using a simple spring boot org.apache.commons.dbcp2.BasicDataSource data source beans . The data source is automatically exposed as a MBean by Spring Boot Bean Announcement: @in Public Data Source Data Source () {Basic data source data source = new basic data source (); DataSource.setUrl (dbUrl); DataSource.setDriverClassName (jdbcDriver); DataSource.setUsername (dbUserName); DataSource.setPassword (dbPassword); Return data source; } Everything works fine though, I see an error while closing the application. This error occurs when the running jar runs. Gradle use Spring plugin (Gradle bootRun), so it is not shown javax.management.InstanceNotFoundException :. Org.apache.commons.dbcp2: Name = Data Source, BasicDataSource at .jmx.interceptor.DefaultMBeanServerInterceptor.getMBean (DefaultMBeanServerInterceptor.java:1095) at com.sun com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean (DefaultMBeanServerInterceptor. Java: 427...

recursion - Why is this linked list returning null? Java -

It is my code that the integer is placed in a linked list until user enters 1. It's fine, but in the end it's nothing printing. I do not know why the integer in the list is not being properly stored. read public static node (scanner scan) {int i = scan.nextInt (); Node n = new node (); If (i == -1) {return n; } And {n.data = i; N = n.next; Read (scan); Return n; }} Private static zero printlist (node ​​head) {if (head == empty) {} else {System.out.print (head.data + ""); Printlist (head.next); ...}} public static zero main (string [] args) {scanner scan = new scanner (System.in); Node head = read (scan); Printlist (head); } According to the request I added the main and print methods. I have also noticed that I am creating a new node in my recursive reading method. How do I declare nodes in the way of reading while not creating additional nodes? n = n.next Is n.next at this point? Why are you setting this to your new node? My guess is that your p...

vb.net - RichTextbox text into array per 255 char -

I want to divide 255 letters in RichTextBox into arrays in vb 2010 Example There are 300 characters in rich textbox: array [0] = '1 - 255 character array [1] =' 256 - 300 char I new to VB and I can not find any decent link or site Thanks in advance for the help. There are several ways to do this privately, I have a string list (string K) This is easy to find and you can easily convert it to an array. 'If you want only one collection list (string), then list (string) = splitStringIntoList (RichTextBox.text, 255)' as the result or if you only have a string array Dim resultArray want string () = SplitStringIntoList (RichTextBox.text, 255) .OARRA public function splitStringIntoList (as string, as valve lens integer) as list (in the form of a string) slow splitlist Do the new list (as a string) while instring.Length & gt; 0 if instring.Length & lt; Len then 'the remaining string is too low, so at least lane len = instring.Length end if splitlis...

reduce image size using imagemagick for batch of images -

I need to change the batch of .jpg images using image magnicle. I use a single file I am able to convert convert - strip - interiorless plane - gushy-stig 0.05 -quality 65% ​​1.jpg results .jpg It needs to be converted for a batch of i. I tried to do this but it is not working mogrify-path \ images-rep -strip -interlace plane -Guicide-stigma 0.05 -quality 66% * .jpg Use this command to convert images of your batch under a folder mogrify-path imagepath - strip - value 50% * .jpg

jquery - getting data from json file -

I have a json file named "json.json" in the directory. I want to get items from that file and display them in UL, which I have coded hard till now When I try to get that file it is not working Does anyone help me retire and add those items to ul in JSO file thanks in advance & Lt ;; Doctype html & gt; & Lt; Html lang = "en" & gt; & Lt; Top & gt; & Lt; Title & gt; Example & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "// code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css"> & Lt; Script type = "text / javascript" src = "js / jquery.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" src = "js / jquery_ui.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" href = "/ resources / demos / style.css" & gt; & Lt; Link rel = "stylesheet" href = ...

css - Bootstrap datepicker : text not legible; How to change background color? -

Image
मैं एक मणि से bootstrap-datepicker3 का उपयोग करता हूं, उसका लेकिन मैं एक काले बूटस्ट्रैप थीम का उपयोग करें और मुझे पता नहीं है कि Datepicker विंडो के पृष्ठभूमि रंग को अलग कैसे करें या परिवर्तित करें ... ऐसा लगता है कि मुख्य बूटस्ट्रैप थीम का पृष्ठभूमि रंग लेता है। & lt ; Div वर्ग = "फॉर्म-समूह" & gt; & Lt; div वर्ग = "कर्नल-एलजी -10" & gt; & Lt; span class = "इनपुट-समूह-योजक" & gt; तिथियां & lt; / span & gt; & Lt; div वर्ग = "इनपुट-समूह" id = "datepicker" & gt; & Lt; input class = "form-control" type = "text" name = "date_start" डेटा-व्यवहार = 'datepicker' & gt; & Lt; span class = "इनपुट-समूह-योजक" & gt; एक & lt; / span & gt; & Lt; इनपुट वर्ग = "फॉर्म-कंट्रोल" प्रकार = "टेक्स्ट" नाम = "दिनांक_एंड" डेटा-व्यवहार = 'डेटिकॉकर' & gt; & Lt; / div & gt; & Lt; / div ...

How to change the text of a "label for" using javascript/jquery? -

& lt; लेबल = "id_about" & gt; प्रोफाइल & lt; / label & gt; मैं इसे जावास्क्रिप्ट या jQuery का उपयोग कैसे कर सकता हूं? मैं केवल इस उदाहरण को बदलना चाहता हूं, जैसे कि प्रोफ़ाइल बदलने के लिए, जैसे कुछ के बारे में मुझे पता है कि मेरी वेबसाइट से सभी "प्रोफ़ाइल" शब्द को कैसे बदलना है लेकिन मैं केवल इस विशिष्ट विशिष्ट उदाहरण को बदलना चाहता हूं। आप एट्रिब्यूट्स का उपयोग कर खोज सकते हैं: $ ("लेबल = के लिए id_about]")। Html ("यहाँ नया पाठ"); // या .text ("यहाँ नया पाठ") याद रखें कि jQuery आपको पृष्ठ पर तत्वों को खोजने के लिए पूरी शक्ति का उपयोग करने देता है (यह भी अपनी कुछ जोड़ता है, लेकिन इसमें सामान्य तौर पर आधिकारिक लोगों के साथ छड़ी करने की कोशिश करें।) जो भी jQuery का उपयोग नहीं करता है, आप अभी भी सीएसएस चयनकर्ताओं (और IE8) पर querySelector (पहले मेलिंग तत्व ढूंढें, या शून्य यदि कोई मेल नहीं खाता है) या क्वेरी सेलेक्टोर सभी (मेलोडिंग तत्वों का NodeList प्राप्त करें, जो खाली हो सकता है ): docum...

Android xml ,2 button use minheight in a LinearLayout and 2 button is not in a line -

Image
मुझे आशा है कि दो बटन गठबंधन कर रहे हैं, लेकिन यह ऊपर की तस्वीर की तरह है। और जब मैं minheight निकालता है यह काम करता है, इसलिए किसी को भी पता नहीं क्यों minheight सही बटन नीचे थोड़ा कारण। आप उपयोग कर रहे हैं सभी विचारों के लिए गलत गुण इस तरह से प्रयास करें, आशा करते हैं कि यह आपकी समस्या को हल करने में आपकी सहायता करेगा। & lt; LinearLayout एंड्रॉइड: layout_width = "match_parent" एंड्रॉइड: layout_height = "wrap_content" & gt; & Lt; बटन एंड्रॉइड: layout_height = "wrap_content" android: layout_width = "0dp" एंड्रॉइड: लेआउट_वेट = "1" एंड्रॉइड: minHeight = "40dp" / & gt; & Lt; बटन एंड्रॉइड: layout_height = "wrap_content" android: layout_width = "0dp" एंड्रॉइड: लेआउट_वेट = "1" एंड्रॉइड: minHeight = "40dp" / & gt; & Lt; / LinearLayout & gt;

c# - How to open new window in asp.net and disable the old one? -

I have an asp.net Web page with a link button. When I click on the button, In a new window to open a new web page. While the new page is open, the old should not be active. When I close the new page, I have to return a value to the old page. Can you tell me how can I do this? Thank you very much in advance! For the purpose you want to use a model popup , the basic form From a popup that will focus and the user can not return to that page until the popup is closed. You can pass variables in a normal way.

dropzone.js - dropzone - change the thumbnail size -

I want to upload a file and width to fit in a given div and I want to set the height, depending on the file size. Example: div size: width: 600px, height: 300px img size: width: 1200px, height: 400px with thumb width 600 and height 300 ( thumbnail withth and thumbnailHight options) on In the case of success, I want to get the image and width of the diode at 600px, but I want to change the height to 200 (so that the image does not get distorted) My The problem is now that the image How to fix the source (data) in a width of still 300px Any ideas? Thanks! Change the size change: , resize: function (file) {var info; // Clip Arekcitr (image, srcX, srcY, srcWidth, srcHeight, trgX, trgY, trgWidth, trgHeight) takes an image, it is rectangular (srcX, srcY, srcWidth, srcHeight), this dimension (trgWidth, TrgHeight), and coordinates (trgX, trgY) on draws // it on canvas. Info = {srcX: 0, srcY: 0, srcWidth: file.width, srcHighight: file.height, trgX: 0, trgY: 0...

.net - PropertyInfo getValue works so slow -

संपदा जानकारी info = currentobject.getType.getproperty (propertychain) currentobject = info.getvalue (currentobject) जब मैं एक स्ट्रिंग getValue के बजाय यह बहुत तेजी से काम करता है डाल दिया। लेकिन अगर यह एक वस्तु देता है यह इतनी धीमी गति से हो जाता है? क्यों होता है, एक संभव समाधान / इस के लिए समाधान नहीं है?

c++ - Difference between std::string and std::u16string (or u32string) -

I have mentioned the following terms before asking here: But they do not question me, see the simple code below: # include & lt; Iostream & gt; #include & lt; string & gt; using namespace std; Int main () {char16_t x [] = {'a', 'b', 'c', 0}; U16string arr = x; Cout & lt; & Lt; "Arr.length =" & lt; & Lt; Arr.length () & lt; & Lt; Endl; For (auto i: arr) COAT & lt; & Lt; I & lt; & Lt; "\ N"; } Output is: arr.length = 3 // a + b + c 97 98 99 Given that, std :: u16string contains char16_t and should not be char output: arr.length = 2 // ab + c (\ 0) & lt; Combinations 'A' and 'B' & gt; 99 Please forgive me for a novice question. My requirement is to be clear about the concept of the new C ++ 11 string. Edit : From the north of Jonathan, I have found a way to escape. My point in my question is that char16_t To get started, so tha...

javascript - Overlay div doesn't prevent the next event that fired in a specific time window -

In my application, I add a loaderDiv to avoid all userevents on the page. The loader is displayed if the user forces a clickevent (like a green container onclick), the event is removed after the loader divis disappears. JS: function append overlay () {var maskediv = $ ('& lt) ; Div id = "overlay" class = "loadmask" onclick: "return false;" & Gt; Div class = "removeDiv" onclick = "sleep (3000)" & gt; & Lt; Span & gt; Click to remove overlay after 3 seconds & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Div & gt; '); $ ('Body') attached (maskDiv). } Function removeDiv () {$ ("# overlay"). Remove (); } Function sleep (milliseconds) {var start = new date () GetTime (); For (var i = 0; i & lt; 1e7; i ++) {if ((new date). GetTime () - start) & gt; Milliseconds {break; }} RemoveDiv (); } How can I solve this problem? Resolve this problem setT...

jquery - How to know that a data is among a select element option value? -

एक फ़ील्ड का मान है, & lt; input type = "hidden" id = "x" मान = "4" & gt; , और एक चुनें तत्व: & lt; id = "produit" name = "produit []" बहु = "एकाधिक" आकार = "10" आवश्यक & gt; & Lt;? Php के लिए ($ i = 0; $ i & lt; $ डेटा ['उपयोगकर्ता'] ['प्रोडक्ट्स'] ['cnt']; $ i ++) {? & Gt; & Lt; विकल्प मान = "& lt;? Php ईको $ डेटा ['उपयोगकर्ता'] ['प्रोडक्ट्स'] [$ i] ['कोड']? & Gt;" & gt; & lt;? Php $ डेटा ['उपयोगकर्ता'] [ 'produits'] [$ i] [ 'lib']; ? & Gt; & lt; / विकल्प & gt; & Lt;? Php}? & Gt; & Lt; / चयन & gt; यह कैसे पता चलेगा कि क्षेत्र का मान चयन के विकल्प मानों में से एक है? इनपुट फ़ील्ड मान प्राप्त करें और इसे चुनें विकल्प मान के साथ उपयोग करें, जैसे: var xval = $ ("# x")। Val (); // छिपी हुई इनपुट फ़ील्ड मान // का चयन करें विकल्प जिसका ...

java - Why am I getting NullPointerException when running this code? -

Why I'm having a NullPointerException while running this code, I've seen what it is and still not okay Understanding this; help please? Import java.util.Scanner; Public class test {public static zero main (string [] args) {scanner sc = new scanner (System.in); Println (); String user = sc.nextLine (); Four [] pass = system.console (). ReadPassword (); Println (passed); Char c = sc.next () Fourat (0); Println (c); Char d = sc.findInLine ("a"). Chart (0); Println (d); Char b = sc.next (). Fourat (0); Println (b); Println (user); }} When running the code, using the variable char b is running fine up to the last two rows, the error output output is as follows: Try the following: import java.util.Scanner; Public class test {public static zero main (string [] args) {scanner sc = new scanner (System.in); Println (); String user = sc.nextLine (); Four [] pass = system.console (). ReadPassword (); Println (passed); Char c = sc.next () Fourat (0); Println (...

how to show all the products on home page of magento by defalult -

I am working on Magnoy, in which I have made some products in category, I have shown this code Added on the homepage {{block type = "list / product_list" category_id = "8" template = "catalog / product / list.phtml"}} But it shows the category in the home page that contains the products and I want to show all my products by default on the home page. Please help me Try it out {{block Type = "catalog / product_list" name = "home.catalog.product.list" alias = "products_homepage" template = "catalog / product / list.file"}} Paste this code into the home page in the cm / page of the admin panel, without the content of the WYSIWYG editor.

apache - Install php 5.3.28 error 2356 -

Image
I have installed Apache \ C: \ Apache \ and conf: \ Apache \ conf \ When I try to install PHP 5.3.28 on the Windows 8.1 with Apache 2.2.x web server module, then I have 'Error 2356' and php can not be installed !!! Any thoughts? Thanks for your help ... MSI is available for both PHP pages 5.2 and 5.3 scroll down from the store page and You will get the version PHP 5.3.27

How to correctly request a geoserver WFS via POST? -

I have an example that includes our data, through this request GET fixes all rights and the expected results gives. But unfortunately it does not work with the post. Geoserver / wfs? Service = wfs and version = 1.1.0 and request = GetCapabilities I test it with wget, so the command looks like this: Wget -o wfs' http: // myserver: 8080 / geoserver / wfs? Service = wfs and version = 1.1.0 and request = GetCapabilities' Now I try the capabilities - Request with POST. I create a file with the following content request (designated request): & amp; Lt; GetCapabilities Service = "WFS" xmlns = "http://www.opengis.net/wfs" xmlns: Xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: //www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1./wfs.xsd "/> I run it against Geoserver with the following wget: wget -O wfs --post-file = request 'http: // myserver : 8080 / geographic /...

Play and stop Vimeo video placed in Bootstrap modal -

I am a Vimeo iframe when I model trigger video Bootstrap video and when a model closes the play-off Then I have to start playing. Currently, I may have to start playing by opening the modal with the IFrame with a feature feature and it can be loaded with jQuery by triggering this model, this is the code snippet; jQuery ("# ​​videogumb"). Click (function () {jQuery ('# mymodal .modal-body iframe'). Attr ('src', '-source-code');}); It works fine and I start it when the modal opens, but when I turn off the music, the music plays in the background. The second method works fine, but only when it's set to autoplay is set to autoplay and I have this snippet to turn off the modal without setting it to autoplay; jQuery ("Modal-backdrop, #m modal. Close, #mymodal .btn"). Attr ("# myModal iframe"). Attr ("# myModal iframe"). Attr ("src"));}); When I turn off the modal, this video stops. I should be com...

c# - .NET ImageList becomes corrupt occasionally -

Image
With a Winforms .NET application, we get an issue where an image list gets corrupted from time to time. Corrupt from I mean that the count of number of images will be wrong and / or the images may have been replaced by system images (like dialog box mouse). For example, the screenshot below shows the imageInfoCollection showing the correct number, but the count indicates the wrong number. Image list on that form Which is opened frequently during the user's use. The use of a tab control on the image list form. This problem occurs only occasionally, anywhere between 5 and 20 times the form is opened. ImageList is designed by the designer to load the code, and uses images from resources: this.imageListCallTakingScreen.ImageStream = ((System.Windows .Forms.ImageListStreamer) (resources.GetObject ("imageListCallTakingScreen.ImageStream"))); This.imageListCallTakingScreen.TransparentColor = System.Drawing.Color.Transparent; This.imageListCallTakingScreen.I...

How to convert Unchecked Exception into Checked Exception and Vice Versa in Java -

In Java, convert uncheck exception to checked exceptions How to do and Vice President in Java You can not change. Instead you have to wrap a new exception of the required type to uncheck to convert: throw the new runtime exception (check Exception); Or to check: throw a new exception (uncheck exception); (You can choose more meaningful / specific exception types)

finite automata - Turing Machine support -

Image
मेरे पास एक भाषा है: (एक्सएफ * एक्स | एफ) * वर्णमाला के ऊपर: {X, F} मैं उस भाषा को पहचानने के लिए एक ट्यूरिंग मशीन कैसे प्राप्त कर सकता हूं? कोई मार्गदर्शन या सलाह बहुत सराहना होगी यह तुच्छ है: digraph _ {_ [आकार = कोई नहीं, लेबल = ""] 1 [आकृति = डबलसीआर्कल] 2 [आकृति = वृत्त] _ - & gt; 1 1 - & gt; 1 [लेबल = "एफ"] 1 - & gt; 2 [लेबल = "एक्स"] 2 - & gt; 2 [लेबल = "एफ"] 2 - & gt; 1 [लेबल = "X"]}

ASP.NET Web API multiple RoutePrefix -

OpenSource has several path-prefixes why there is not permission to have multiple router profiles () in ASP.NET Web API 2.0. [Rootfix ("API / V1 / {ABC" / unit "]] [RootPrint (" API / V1 / {abc} / {xyz?} / Unit ")] Public class MyApiController: ApiController {[root (" ") ] Public IHttpResult Get () {OK OK ("Hello World"); }} You can add a route to the verb method, as well as routerpixes [RoutePrefix ("API / V1 / {ABC} / Entity")) Public category MyApiController: ApiController {[root ("") "" " Example: ] [Route ("~ / api / v1 / {abc} / {xyz?} / Unit")] Get Public IHttpResult () {OK OK ("Hello World");}} Note the line: [Route ("~ / API / V1 / {ABC} / {xyz?} / Unit")]

ios - How to get CGAffineTransform from two CGSizes? -

मान लीजिए, मेरे पास दो CGSize नाम हैं जो ए और बी। कहां B = CGSizeApplyAffineTransform (ए, CGAffineTransformMakeScale (x, y)); अब अगर मुझे ए और बी पता है तो एक्स और वाई की गणना कैसे करें? एक आकार को दूसरे में बदलने के लिए स्केल कारक वर्तमान आयाम के साथ लक्ष्य आयाम को विभाजित करना है। इसका अर्थ यह है कि x = B.width / A.width ऊँचाई के लिए। हालांकि यह सवाल से स्पष्ट नहीं है कि अगर यह वही है जो आप चाहते थे, तो समाधान भी हो सकता है हो x = y = 42 ।

returning multiple rows from mysql in php -

I am trying to write a PHP-script that will obtain multiple rows from MySQL and give them JSONObject Will return in the form if I try to get only 1 row, but if I try to get more than one at a time, the return string is empty. $ i = mysql_query ("Select * from database where id = '$ V1'", $ Conn.); $ Temp = 2; While ($ line = mysql_fetch_assoc ($ i)) {$ r [$ temp] = $ line; // $ temp = $ temp +1; } If I write code this way so he'd know what I hope makes it, but if I remove the loop // second line would then no Will someone return to explain how to solve it and what should I do? You are using an obsolete mysql_ * library. You are prone to SQL injection The fool your code and no if you really want to stick it in, please do not: while ($ Row = mysql_fetch_assoc ($ i) )) {$ R [] = $ line; Echo json_encode ($ r); And finally, using an example PDO: $ database = 'your_database'; $ User = 'your_db_user'; $ Pass = 'your...

Google Analytics Goals not working -

I have set goals in Google Analytic two days ago Hello, I Set goals in analytic but I can not report any reports on my Google Analytical Admin. Below your settings. Looks like just below the URL, / goto / 2324/323 and I've set 'regular Expression for this, expression * / goto / + [0-9] + / [0-9] + / I think Is that my goal setup is not working, what did I do wrong here? Your Regex relies on what you are doing, needing to be modified in many ways If you are trying to match "/ goto / {one or more digits} / {one or more digits}", then your regex will be: \ / Goto \ / [0-9] + \ / [0-9] + (Note that the forward slash needs to be removed, and also your appointment "+" Quantifier is not being used properly. "+" Its Meaning that you want to match the last one or more characters.) If you specify "Replace / 3" (exactly 4 digits) "exactly 3 digits}", then you specify your Regex like this May be: \ / go...

r - How to update a frequency table based on a third variable? -

I have a data frame that shows different class views of three years (2006,2007,2008) Number of Incident: df looks like this: count Y.2006 Y.2007 Y.2008 1 150 AAA 2 33 ABB 3 35 ABA 4 26 DCC 5 15 DCC 6 65DCD I calculate the sequence of 2006-2007: df $ Y.2006_2007 & lt; -paste (df $ Y.2006, df $ Y.2007) Result: Count Y.2006 Y.2007 Y.2008 Y. 2006_2007 1 150 aha 2 33 abbab 3 35 abaab 4 26 dccdc 5 15 dccdc 6 65 dcddc I want the number of incident for Y.2006_2007 for different classes of 2008 Therefore I do: Table (df $ Y.2006_2007, df $ Y 2008) results in abcdaa 1 0 0 AB 1 1 0 DC 0 0 2 1 Now, I would like the initial data frame (DF) to keep in mind the number of event of class sequences ) I would like to update these results on the basis of counting variables: abcdaa 150 0 0 AB 35 33 0 DC 0 0 41 65 I do not know how to get this result any idea? You can use xtabs so that the base R: xtabs (formula = calculation ~ Y.2006_2007 + Y.2008,...

Hadoop Installation and Set up -

I am trying to install and install a house cluster environment on my own in CentOS. The tasktracker is not running, it disappears after executing start-all.sh Does anyone help me to set up a hood single node / multnode cluster? Can you try it and tell me if you have the time when installing Huup There is no problem pre-requisites 1. Make sure the host file changes (master, slave) a ???? No loopback, no local host. 2. Be sure to run the SSDD 3. Make sure that the Sudo Ars is a ???? Not Passed Authentication 4. Ensure that Selenques is disabled (not allowed) for user, policies and references 5. Be sure to reboot - Pings Masters and Slaves. 6. Ensure that JDK 7 is established in Master and Slaves. 7. Ensure that the firewall is off or allows ports mentioned by IPTable port 8. Ensure IPv6 is disabled or exported HADOOP_OPTS = - Dijawa. East. IPv4 Stack = True Hedge_Anvs Master SHH for uninterrupted slaves in slaves - password less access ssh - kegen-r rsa $ ss-copy-id -i ~ / .s...

Regex to remove an file path suffix -

I am trying, and failed, to find a reggae that will change all of the following. Is it possible to do this with a single expression instead of many people for each level in the file path?: - / folder_UK = & gt; / Folder - / folder_uk / = & gt; / Folder / - / folder_uk / folder2 / = & gt; / Folder / folder2 / - / folderx / folder_uk = & gt; / Folderx / folder - / folderx / folder_uk / = & gt; / FolderX / folder / - / folderx / folder_uk / folder2 / = & gt; / Folder / folder / folder 2 / Essentially, I want to strip any "_UK /" s and leave the '_UK' without the previous slash . Thanks in advance. Just replace _UK with empty string. Regex: _UK Repeat string: empty string

angularjs - angular service available at configuration phase -

I want to move some repetitive arguments into the reuse service, which is assigned to a configuration step Should be available in . And possibly there can be access to $ xxxProvider dependency injection Is such a thing possible? Can this be done with the factory / provider / service / continuous? To be specific, when I define my routes with the ui-router , I found that the paths for the CRUD are all the same, except for the names of the resources I want to move this argument to configure a CRUD route to make root definitions more dry. To reach your service provider in the config block, it should work just fine: app.service ('myService', function (/ * dependencies / /) {// service content. Return this;}); App.config (function ($ rendered) {$ provide.decorator ('myService', function ($ representative) {// $ representative refers to 'myService'. // You can modify its behavior and here No. Representative;});}); The crystal is not clear on what I...

jquery - Stellar.js for parallax scrolling is deleyed -

I am using the plugin stellar.js to create a parrallax effect ... Especially I want to have a simple background scrolling slower than the rest of the site like www.OmarHabash.com. I think everything is set up properly ... the first three spotlight devices are scrolling slow, but slowly it looks up ... it's not going to do this This is init I use $ (window). Theellar (); And it is one of the three divs that I am using the script. & lt; Div class = "home-100-2" data-stellar-background-proportion = "1.1" style = "background: url ('& lt ;? php the_field (' sl-image-2 ')? & Gt;') Fixed;" & Gt; If you look at the site, you will see the problem Has some CSS transition style that is applicable to.-100-1, .home-100-2. ,. Home -100-3 Try removing them: .home-100-1, .home-100-2, .home-100-3 {height: 320px; Background: # 000; Border bottom: 10px solid # 000; Width: 100%; / * Transition: all .6s; * / / *...

php - create one-to-many relationship with campaigns module in sugarcrm -

How do I create multiple relationships with my custom module? And add campaign sub-panel to the module Campaign warders $ wordpress ["campaign"] ["fields"] ["cost"] = array ('name' = & Gt; Cost ',' Type '= & gt; Link', 'Relationship' = & gt; Campaign 'Cache', 'Module' = & gt; 'Cost', 'Bin_Name' = & gt; , 'Source' = & gt; 'non-db', 'vname' = & gt; 'lbl_auccs',); $ '[' Campaign '] [' campaign_costs'] = array ('lhs_module' = & gt; 'campaign', 'lhs_table' = & gt; 'campaign', 'lhs_key' = & gt; Id '' rhs_module '' & gt; 'cost', 'rhs_table' => cots ',' rhs_key '= & gt;' campaign_id ',' relationship_type '=> one-by-many'); layout_default property $ layout_addes ["campaign...

Using Case results in where clause - i would like to use the results of TorL - SQL Server -

DECLARE @TodayDayOfWeek INT DECLARE @EndOfPrevWeek दिनांक समय DECLARE @StartOfPrevWeek दिनांक समय समाप्ति @EndOfThisWeek दिनांक समय DECLARE @StartOfThisWeek दिनांकटाइम - Delcared पैरामीटर सेट @TodayDayOfWeek = DatePart (DW, GetDate ()) सेट @EndOfPrevWeek = DATEADD (दिन, - @ TodayDayOfWeek, GetDate () ) सेट @StartOfPrevWeek = DATEADD (दिन, - (@ TodayDayOfWeek + 6), GetDate ()) सेट @StartOfThisWeek = DATEADD (दिन, - @ TodayDayOfWeek, GetDate ()) + 1 सेट @EndOfThisWeek = DATEADD (दिन, - @ TodayDayOfWeek , GetDate ()) + 7 - इस हफ्ते या अंतिम सप्ताह के लिए उपयोग करने के लिए पैरामीटर दिनांक सेट करें st.SALESID, st.SALESNAME का चयन करें , St.CUSTACCOUNT, st.CUSTOMERREF, सेंट। सलेस्टाटस, डास्ट (SL.LINENUM के रूप में दशमलव (18,0)), SL.ITEMID, कास्ट (SL.SALESQTY के रूप में दशमलव (18,0)), कास्ट (sl.LINEAMOUNT दशमलव (18,2)) के रूप में, जब ST.OfPrevWeek और @EndOfPrevWeek के बीच ST.CREATEDDATETIME तब 'एल' जब st.CREATEDDATETIME b etween @StartOfThisWeek और @EndOfThisWeek तो ...

Get VirtualBox server booting status -

I have a database server that started with Virtualbox VM. I can start my development only after database VM boots. How can I check if the database server has been booted successfully or not? I know about VBoxManage showvminfo command but it also shows the state as 'running', when VM is still going to boot. Is there a way to check the booting status? I do not doubt, even the warrant project to determine whether a large The machine is ready to use a persistent SSH connection with the timeout.

workflow - Which git commands can delete your stashes? -

I usually work with the git hiding place "What am I doing" Is a safe place where temporary code is to be stored. But I'm surprised that git commands which can damage / hide my hiding place, and I should be careful about it drop the git hide & lt; Stash & gt; git hiding pop clear git hiding An example I've found is that the git reflog timed out - explore = 30.days refs / stash . But it will usually be executed on purpose. git pull / fetch? But what's the gate reset? But I am interested in those cases where you may have unexpected losses of your skeps while performing other operations than working on stash. Anything else? OK, maybe possibly safe as (unpublished) commits itself In fact, if you see that when you make a hiding, then what are the objects made, you will see that the stash is actually a comma. The only difference is that they are transported differently. Like So, Comets, while some still point to ...

Is it possible to delete all scope variable of a controller? AngularJS -

I am new to AngularJS and I do not know that it is possible to delete all the scope variables of the controller. I'm the ng-ng-repeater controller, this way. & lt; Div ng-controller = "main" & gt; & Lt; Div ng-repeat = "ng-controller =" test "in the" x list "& gt; & Lt; Input type = "text" ng-model = "text" & gt; & Lt; Span ng-click = "Remove ($ index)" & gt; X & lt; / Span & gt; & Lt; Div & gt; & Lt; / Div & gt; JS myapp.controller ('main', function ($ scope) {$ scope.list = [1] , 2,3,4]}) myapp.controller ('test', function ($ scope) {$ scope.text = "untitiled"}) I want to remove clicked I'm scared.Someone has helped me or please give me a better suggestion. Thanks The question is not very clear, but it seems that you want to delete the item after click . Since you are working in the remove index, you can divide i...

c# - Open a form in new thread -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मेरे पास एक सिस्टम ट्रे अनुप्रयोग है जो कुछ कार्य करना है जैसे कि स्क्रीन पर स्नैपशॉट लेना, फाइल कॉपी करना, संदेश इत्यादि के लिए संदेश इत्यादि आदि। संदेश को बंद करने के लिए, मुझे कुछ परेशानी का सामना करना पड़ रहा है क्योंकि पॉपअप संदेश अन्य कार्यों लंबित रहता है जब तक कि संदेश बंद नहीं हो जाता। कृपया अधिक जानकारी के लिए देखें। असल में मैं मौजूदा फॉर्म से एक नया फॉर्म खोलना चाहता हूं। पुराने फार्म पर लंबित कार्य को करने के लिए मैं नए फॉर्म को बंद करना नहीं चाहता हूं। क्या यह धागा का उपयोग किया जा सकता है? यह कैसे किया जा सकता है? मैं इसे थ्रेडींग का उपयोग कर संभालना चाहता हूं। मैंने form.show का उपयोग करने की कोशिश की, जो कि मेरे प्रश्न का सरल उत्तर है, लेकिन जब से मैं टाइमर का उपयोग कर रहा हूँ। Show () बस फार्म हमेशा के लिए लोड हो रहा है। इसलिए धागा के लिए कोई भी संदर्भ उपयोगी होगा। आपको एक फॉर्म खोलने के लिए multithreading की आवश्यकता नहीं है और नए फार्म खुला है, जबकि पुराने फार्म acces करने में सक्षम। बस myform.Showdi...

android - Service stops on clearing data from settings -

In my app I run a service in which I keep records of incoming and outgoing calls Text file (saved on internal storage) using the Broadcast Receiver but when I press the Clear Data Button (Settings => apps => MyApp = & gt; Clear Data) The service also stops when I used the log.d () onDestroy () method but when I clear data Bata I is not logged in logcat. I read the same problem, but I did not find any solution. So I went through I'm really confused. Data associated with the app will no longer be released on clearing. To avoid this, you need to sign your app as a system app. Clear the data kills the app, and always happens. "Stop force" has gone through various iterations of the meaning, it was used only to kill all the processes and services, and clearing the data was also done like a force stop. There were also ancient iterations of the platform, which was not well known as the time to disable the button, perhaps that is why you make it ...

file - Find if zip folder is present in c# -

Need Quick Help Assume that a ZIP folder named by name test (d: \ test.zip) Is . I need to check whether zipped folder (i.e. test ) d -directory is present or what is there, it does not make any difference here 'and' code 'test Transfer to .zip in other directories I tried to use the Directory.GetDirectories () method, but it will work only for folders. You have a file and method to check the file File .Exists (path) can be used. To move a file (Source, destination) . Example: var zipFile = "d: \\ test.zip"; Var destination = "d: \\ some \ \ other \\ directory"; If (file.exists (zipfile)) {File.Move (zipfile, path.comben (destination, path.gETFileName (zipfile))); } See more for more information.

how to get welcome message in magento from outside php code i.e., from seperate php file -

& lt; php require_once ('app / mage.php'); // Magento उमास्क के लिए पथ (0); दाना :: एप्लिकेशन (); गूंज Mage :: app () - & gt; getWelcome ()? & Gt; ऊपर का कोड मैं उपयोग करने का प्रयास कर रहा हूं। मुझे स्वागत संदेश प्राप्त करने और क्लाइंट साइड में इसका उपयोग करने की आवश्यकता है। & lt; php require_once ('app / mage.php'); umask (0); दाना :: एप्लिकेशन (); गूंज दाना :: getStoreConfig ('डिजाइन / हैडर / स्वागत'); ? & Gt;

OpenGL iOS 2d 4 inch display -

I am trying to work 4 inch display correctly in the 2D OpenGL iOS app. It works fine with a 3.5 inch display and all iPad displays, but chops off 88 pixels down in 4-inch display. I have tried different versions of the launch images and have not launched at all. I also got the main window Xib and no.xib have tried different forms. The example of OpenGL in Xcode 5 works well for 3D apps, but I had big problems with it 2D. The code I am using is based on the old GLSprash sample. It appears that the frame appears only when creating buffer. The following backingHeight is always thanks to 568 when it should be back as 480 pixels - (bool) createFramebuffer {glGenFramebuffersOES (1, & amp; viewFramebuffer); Glenzer BoforsOoS (1, & Videorbender); GlobindFevelopbroerOS (GL_FramMeFOAOS, ViewFramebuffer); GlobindorbuffarOS (GLINRBFFOOEES, seeRenderbuffer); [Reference renderbuffer storage: GL_RENDERBUFFER_OES from DRAWWABLE: (id & lt; EAGLDrawable & gt;) self Layer]; Glo...

javascript - specifying jquery as angularjs's dependency generates error in requirejs -

Angle inside the angle of the config () function I am trying to use Element (jQuery cover) and try. However, in the main.js file, as soon as I add angle under the dez, it generates $ injector: modular error (where is the first comment) The script tag is placed first in my html File & lt; Script src = "js / vendor / require.min.js" data-main = "js / self / main.js" & gt; & Lt; / Script & gt; main.js file need.config ({baseUrl: "js / vendor /", path: {"jquery": "jquery-2.1 .1.min "," angular ":" angular.1.2.9.min "}, shim: {" angular ": {deps: [" jquery "], // as soon as I add it, it generates a $ Injector: Modular error export: "angular"}}}); ("Angular"), function (angular) {angular.} Module ("app", []) // ng-ap = "app" prefix & lt; Body & gt; Is defined in Controller ("Acctral", Function ($ scope) {// ng-contr...

c# - 'Catel.IoC.IServiceLocator' does not contain a definition for 'Instance' -

I am quite new to .NET development and Catel but working on a project to learn it. Currently the original developer is not present, so I will try my luck instead. It tries a lot to undo / re-implement Catel's Memento Pattern support, but I am having trouble doing this Example of Memento service when I do this in my ViewModel: Code> var mementoService = ServiceLocator.Instance.ResolveType & lt; IMementoService & gt; (); I get: There is no definition for 'instance' in 'Catel.IoC.IServiceLocator' and any extension method 'instant' to accept the first argument of 'Catel.IoC.IServiceLocator' type. Can not be done (are you remembering use director or an assembly reference?) I have seen that whenever I do this in my model, I do not have this problem I find it strange that I get an example of service Not needing methods where I try to get it. I do not know what I'm doing wrong. NuGet Package Manager Console tells me that I have Ca...

sql server - Export using Bcp -

I am using data using BCP to combine column data with column headers and the use of the union I am using the variable and the set, it is for 0 for the title and then for the column data to hold the header at the top for 1, but it seems that on some occasions the data When the middle header does not have a number. Use the following format for your query: select ( Choose 0 from [type], 'Header 1' as '1', 'Header 2' as the call 2, ... select Union 1 as the [type], Col1, Col2, ..., YourTable ) Z by order Z [Type]

php - Zend framework 2 - How to make a language switcher -

I am developing a Zend Framework 2 application and now I want to implement a language switcher where the guest / registered user The language they want, the thing that I can not understand, is done in the Zend Framework 2 (using no URL), after selecting once, guest's favorite language in storage I want to keep it, and the registrar For the average user, I can retrieve favorite cookie / database and it can re-use with storage. But how should I start this and how? Thank you in advance. Set up your locale in your global .config .php : 'Locale' = & gt; Array ('default' = & gt; 'en_US', 'available' => array ('de_DE' => gt; 'Deutsch', 'nl_NL' = & gt; 'Dutch', 'en_US' = & gt; ; 'English' 'Fr_FR' = & gt; 'French',),), Then you can add a method to your Application \ Module.php The default that sets jand \ translator \ translator : class module {pu...