Posts

Showing posts from April, 2014

php - how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file? -

How can I reference the document route from within a root file? i.e.: I currently php_value auto_prepend_file C: /wamp/www/hf_latest_desktop/prepend.php I would like php_value auto_prepend_file ** AUTO_DOC_ROOT ** prepend.php Where '** AUTO_DOC_ROOT **' root path You can not do Apache configuration file does not support it.

reporting - Finding drop off rate from membership table in SQL Server 2005 -

We have a scene that stores the history of membership plans organized by our members and we charge a half-price direct debit Proposals are running for some time. We are asked to inform that whether people are allowing direct debit (at full cost) to renew, but I am not any SQL expert! view in effect memberRef, historyRef, validFrom, validTo, MembershipType, PaymentType, totalAmount here identifies the memberRef person (int) historyRef this line (int) validFrom and validTo start and plan (date) are identified MembershipType is the type of plan (integer) PaymentType is direct debit or credit card (a string - DD or EFT) totalAmount plan (decimal ) If I'm thinking of a cursor vs A layman is a query, I can use to calculate the number of policies which are at half the price and there is another direct debit policy that has been done since then. If we can catch that person either on the first half price or if there is a gap where the subscription ended before ...

css - IE 7 & 8 overflow:hidden problem -

I am working on a project's CSS. And face some overflow problems with IE it's testite: You can scroll the list using the buttons at the bottom of the list. Some works fine in Firefox, Safari and all other common browsers but in IE I can not hide it overflow: to work and it starts to drive me crazy This list is always It shows in its full length, think about what I try now, can someone give me a clue? This is the container's CSS in the list: div # listing {width: 204px; Height: 364px; Hidden flurry; } And the objects inside are: div # listing ul li (status: relative; Padding: 5px; Margins: 0 7px; Height: 54px; Background image: -Mo-linear-shield (top, # f5f5f5, #ddd); Background image: -WebKit-gradient (linear, left top, left lower, color-stop (0, # F5F5F5), color-stop (1, # DDD)); Limit: 1px solid #ddd; -WebKit-boundary-radius: 5px; -max-boundary-radius: 5px; Boundary-radius: 5px; -Moz-Box-Shadow: 0x8px #ddd; -WebKit box-shadow: 0x8px #ddd; Box-Shadow: ...

authentication - Silverlight Design Question -

I am going to develop an application for work, and I am trying to decide that Silverlight Business App Whether or not to use Asp or Net Web App My manager has worried about display and download time, if I created the entire application as Silverlight app, with authentication. I have been playing with some tutorials in the past few weeks trying to get a perspective on my situation and have come up with a design question which is more experienced than me. Is it possible to use an ASP.Net application and embed the Silverlight application in only one of those pages, which will be used within a folder, which is configured with role authority has gone? And if so, it would be possible to obtain the user credentials of the client Silverlight app without passing them through intpram. I understand that I can set up authentication to "use cookies", so I was thinking that I can get a cookie on the client and hopefully if the user is certified then its Confirming property will be ...

ruby - Sinatra can't serve JavaScript files without help? Is this correct? -

OK, so I do not have a problem saying this copy, but I have to make sure that I am doing it right Because it does a lot of extra work in the long run. I am working with Sinatra and using HAML templates. I want to include a javascript file from my HAML file. My directory structure looks like this: Media / js / init.js (I want to include the file) Model / View Layout Layout .h route init.rb bootstrap.rb (included in init.rb) When I try to include the file (without any extra route or anything) I can not find a page error, however, if I add this code, then this is true Works: get '/ media / js /: name' start sending send_file ('media / js /' + params [: name]) Rescue "nothing for me "End of End" I have no problem doing this to serve my media / stable files, but I want to make sure that it is necessary, I would like to This is possible to avoid. edit I had included the following code in my bootstrap.rb file, but it ...

iphone - Stack trace bug aggregation software -

I develop mobile applications for various platforms, especially the iPhone and Android. Each of these applications is a method of "phone home" with fatal accident stack marks. Up to now, we are inspecting them manually as necessary. What I see is a piece of software that can accurately "aggregate" or "collage" all of these stacks to the report. Output format does not really matter, I'm sure we can pipe it into our bug tracker. So if we get 1000 stack marks which represent the same bug, then it will make a ticket, even though their stacks should be slightly different. It would be better if there was a package that was capable of handling stack trails with different platforms (IFix / Android / etc), but if I do not want to recommend it for specific platforms. Thank you I will go ahead and answer it, It is unlikely that anyone is wandering. The one we are ending is rolling out our own solution. In fact, we take the last line of the st...

php - Tell me there's a better way to turn these checkboxes into JSON -

I am working on a form that allows people to choose their preferred methods of communication. Among other things, there are 9 checkboxes in this form (3 sets of 3) that I am trying to store JSON in my database. Here are the relevant parts of the form ... & lt; H1 style = "padding-top: 25px;" & Gt; Communication Preferences & lt; / H1> & Lt; Hr / & gt; & Lt; Div class = "ondard contact prefix" style = "width: 28%" & gt; & Lt; H4 & gt; Preferred method & lt; / H4 & gt; & Lt; P & gt; From time to time, you may need to contact us regarding our service, which mode of contact would you like? & Lt; / P & gt; & Lt; P & gt; & Lt; Input type = "checkbox" name = "favorite []" value = "p" style = "display: inline;" / & Gt; Phone Email & lt; Br / & gt; & Lt; Input type = "checkbox" name = "favorite []" value = ...

java - How to log ip address on JBoss -

I want to log the client's IP address which is calling my WS. How can I do that? Edit: If possible, I would like to use log4J configuration on JBOSS. Add your conversion pattern parameters to the log4j configuration xml. % X {Remote adder} and in your code you can log the IP address as follows: MDC.put ("RemoteAddress", request.getRemoteAddr ())

php - variable printing inside javascript -

मुझे जावास्क्रिप्ट के भीतर चर मुद्रण के साथ समस्या है। चर html स्ट्रिंग प्रिंटिंग काम नहीं कर रहा है: document.write (html स्ट्रिंग) & lt; php $ html स्ट्रिंग = htmlspecialchars (file_get_contents ('http://google.com')) ;? & gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; & lt; / title & gt; & Lt; मेटा http-equiv = "सामग्री-प्रकार" सामग्री = "पाठ / html; वर्णसेट = यूटीएफ -8" & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; Var html स्ट्रिंग = "& lt;? Php echo $ html स्ट्रिंग;? & Gt;"; document.write (htmlString); & Lt; / स्क्रिप्ट & gt; & Lt; / body & gt; & Lt; / html & gt; संपादित करें: वेबपृष्ठ स्रोत परिणाम: - html के अंदर सभी google.com प्राप्त करें पृष्ठ पर मुद्रित नहीं किए गए var स्ट्रिंग स्ट्रिंग (मैं htmlString की सारी सामग्री को कटौती क्योंकि इसकी ब...

hashtable - Salting: Is it reasonable to use the user name? -

Instead of storing a random string with names, I use the username as a tool for the salt password I am doing My justification is that the purpose of salt is being prevented from rainbow tables, is it actually less secure than the second set of data in it? For example, hash (md5 (johnny_381@example.com), p4ss \ / \ / 0rD) Vs hash (md5 (some_UUID_value), p4ss \ / \ / 0rD) Is there any real reason that I am not just with the username Can I be unable to make things easier? The only thing as a result of my web search was that the salt should be a password like like but it should end without any argument, where I'm under this assumption, it's just like one To stop the Can and Power Cracker to run it without a one million years range. Thinking about the processing limitations of reality, I do not believe that if people know that this is a great deal, then they still do not know the password, and they have gone into the super computer borders, for each person's ...

ruby on rails - Is there a shortcut for sending AJAX commands? -

So, my app uses a ton of AJAX, and I have to do a lot of things: answer_to Format | Format.js render: update | Page | #actual code end end end Is there a shortcut? This controller-built rendering of content is generally considered bad practice because of the MVC architecture of the railways Separation of concerns is broken. This is especially because if so many codes are updated and it happens in many controllers it is getting very difficult to break and maintain quickly. The shortest route (code-wise) to render, for example, to take advantage of the default view name in its actions like this: def make @ model = Model New (...) response_to do | Format | End of end of format.js All that is required to render with a view called "code> create.js.erb . The advantage of using ideas is that, through partly, you can keep the code dry and easy to maintain.

c# - How can I get the client side date and currency formats? -

I want to display the amount of dates and currency in my chosen formats. How can I remove it from the client machine thanks Alternatively, is there any other way of formatting date / currency correctly ? Thanks A browser exposes its location: > ** ** can be retrieved by using thread.CurrentThread.CurrentUICulture ** Read more about this and Culture can overwrite (if you select another language from the menu) To format date time and read the string Set up culture, if you set it for long, then see, resource files will belong to those previously selected culture. To set the initial level in the culture, you can create a base sheet (which is inherited in the frontline) {} using System.Globalization; Using System.Threading; Using System.Web.Mvc; Namesphere NerdDinner.Views {public class NerdDinnerViewPage & lt; T & gt; : View Page & lt; T & gt; Where t: class {safe override zero initializeCulture () {base.InitializeCulture ()); Thread.conten...

How do I use Entity Framework 4.0 Inserting event to add items on insert -

मेरा मानना ​​है कि मेरे पास 2 टेबल हैं usersTable userid नहीं guid Null उपयोगकर्ता नाम nvarchar ... और अधिक फ़ील्ड अनुच्छेदटाले लेखविराम int नहीं रिक्त अनुच्छेद ntext उपयोगकर्ता नाम की गलती नल उपयोगकर्ता नाम nvarchar नल नहीं ... अधिक फ़ील्ड एक आलेख जोड़ने के लिए, एक उपयोगकर्ता लॉगिन हो चुका है। इसलिए मैं अपना यूजर आईडी और यूज़रनेम प्राप्त करने के लिए ऐसा करता हूँ 'वर्तमान उपयोगकर्ता में मंद उपयोगकर्ता के रूप में लॉगिन हो गया है सदस्यत्व सदस्य = सदस्यता। गेटयूसर ( ) 'उपयोगकर्ता के यूज़रआईड मान पर वर्तमान में लॉग ऑन किए जाने का निर्धारण करें, वर्तमान में यूजर के रूप में गइज = सीटीपी (वर्तमान उपयोगकर्ता। प्रदाता उपयोगकर्ता, गुड) मुझे क्या चाहिए, जब एक आलेख अनुच्छेद तालिका में डाला जाता है लॉग इन उपयोगकर्ता, मैं लेख तालिका में उपयोगकर्ता नाम और userid जोड़ना चाहते हैं। मैं Entity FrameWork 4.0 का उपयोग कर रहा हूँ और VB में प्रोग्रामिंग धन्यवाद ISEID आप अपने ऑब्जेक्ट में SaveChanges विधि को ओवरराइड कर सकते हैं संदर्भ और उसके बाद उन संस्थाओं क...

xcode - How to exit an iPhone app if the terms are rejected? -

When the user selects "Reject" on my Terms and Conditions page, I am able to display a warning, But I did not completely find out how to get out of the application, is there any way to do this? Apple discourages app from leaving itself - it gives an impression to the user that the app crashes And based on the fact that I have never seen the app performance terms and conditions stupid when it starts, I thought this is a definite way to reject your app from any store. When you are submitting an app, iTunes Connect allows you to provide custom license text; I only recommend using that.

objective c - Binding a selector to the target of a NSButtonCell -

I am using the following code to add a target binding to the NSButtonCell control: [Code] [Datacell Bind: @ "Target" object: EventsDesire with PayPath: @ "Selection Self." Option: [NSDiction Dictionary with Object Ends: @ "BeckettTicket:", nsseter nanbanking option, zero]]; eventDatesArray is connected to an NSArrayController by the interface builder. I have established that it has been done correctly using the following functional code: [dataCell bind: @ "title" toObject: eventDatesArray withKeyPath: @ "selection.dateTime" option : Zero]; The "selection .self" map for a specific NSManagedObject which is a method sale: (NSNumber *) maxTickets. Incidentally, I am also setting the compulsory argument: [Datacel tie: @ "logic" toObject: eventsArray withKeyPath: @ "selection.venueCapacity" option: zero]; Event is another NSArrayController. Where have I gone wrong with the target binding? ...

android - How to read the SD Card ID number? -

How can I programmatically read the CID register of the SD card, which has a serial number and other information? Can I do this via Android Java or native code? Thank you in advance, Eric To get SID and CID here If the sample code is then try {{file input = new file ("/ sys / class / mmc_host / mmc1") (Exceranlostorage available); String cid_directory = null; Int i = 0; File [] sid = input.listFiles (); (I = 0; i & lt; sid.length; i ++) {if (sid [i] .toString () includes ("mmc1:")) {cid_directory = sid [i] .toString (); String cid = (string) sid [i] .toString (). All sequence (cid_directory.length () - 4, cid_directory.length ()); Log D. (Tag, "MMC's SID =" + SID); break; }} BufferedReader CID = New BufferedReader (New FileReader (cid_directory + "/ cid")); String sd_cid = CID.readLine (); Log D. (Tag, "MMC's CID =" + sd_cid); } Hold (exception e) {log. ("CID_APP", "SD-card syed can not be read...

linux - Gnome-terminal - How to Copy selection to clipboard automatically? -

I want to behave in a GNOME-terminal such that when the end user selects a field on the terminal mouse or mouse Key), it automatically gets copied to the clipboard, is it possible for all? If so, then how? This is possible. Install sudo apt-Parcellite Then check "Use primary" and "Synchronize clipboard" in settings This works.

Adding jQuery modal dialog in an accordion -

I have just started using jQuery in the past few weeks and really enjoying it - a great thing is! At the moment I have a problem. Here is the basic structure of my page: & lt; Body & gt; & Lt; Div id = "accordionContainer" & gt; & Lt; Div class = "accordionSectionHeader" & gt; Some top labels ... & lt; / Div & gt; & Lt; Div class = "accordionSectionContent" & gt; Some content ... & lt; A href = "#" & gt; Popup dialog & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "dialog" & gt; Here are some dialog content ... & lt; / Div & gt; & Lt; / Body & gt; This is a very simple layout - when you click on "popup dialog", the dialog is located on the top of the link link from the div show. So far, so good. Now I have a problem - I have set the dialog mode option to "right", but I can still click below the...

SQLite DB in iPhone -

Can you please tell me how to make SQLite DB in the iPhone and the purpose of CRUD operation is to program the database on the database Do the work. How to program this ?? I know how to make DB and table through the command line, but how to program it ?? Help me .. Thank you. Add libsqlite3.dyllib library to your project. Click on the Framework Group, select Add-> Existing Frameworks ... and scroll down to select and add libsqlite3.dyllib. # Import in your source file Open or create a database file with the path in NSString file error = sqlite3_open ([file cStringUsingEncoding: NSUTF8StringEncoding], & database) ; If (error! = SQLITE_OK) {NSLog (@ "error result sqlite3_open ():% d", error); Sqlite3_close (database); } Execute orders : four * errors, age = zero; Int error = sqlite3_exec (database, [aQuery cStringUsingEncoding: NSUTF8StringEncoding], zero, zero, and error messages); If (error! = SQLITE_OK) NSLog (@ "error ...

regex - Regexp to normalise (pad with zeroes) IP addresses -

I have a copy of a log file that I want to see / edit. I do not want to use the textpad to remove stuff and I can enter a regular expression as a search term and in the target field for the captured groups \ 1. \ 2. \ 3 . \ 4 . Change all IP addresses I want [0-9] {1,3} \. [0- 9] {1,3} \. [0- 9] {start each row from 1, 3} \. [0- 9] {1,3} to [0-9] {3} \. [0- 9] {3} \. [0- 9] {3} \. [0- 9] {3} How to do with padded leading zero that at the same time? Example input: 10.2.123.4 110.12.23.40 123.123.123.123 1.2.3.4 Example output 010.002.123.004 110.012.023.040 123.123.123.123 001.002.003.004 See your answer for what works Thanks for your input Not at all, a liner you want, but at least it brings it down into two of your existing Lines instead of 8 After the same formatting used in your answer: ^ ([0-9] {1,3}). ([0- 9] {1,3}). ([0- 9] {1,3}). ([0- 9] {1,3}) - & gt; 00 \ 1.00 \ 2.00 \ 3.00 \ 4 ^ 0 * ([0- 9] {3}). 0 * ([0- 9] {3}). 0 * ([0- 9] ...

iphone - how to display 20 images names in imageview -

I am developing an application that includes 20 images displayed in the grid using custom image picture And what I want to display them using the image view 1) How can I get back to image grid from image view 2) How can I show the name of each individual image in the image view Please give some help and code Suggestion - Thank you If I'm right then you want to create a wallpaper application, in an image List all the images and put them in a single view and press the buttons in the background of all image names (if you are using 20 images then you put 20 buttons on the scrollview) and write actions for all the buttons In the next scene, you only change the images on the image view.

c# - "pin to desktop" in Win 7, XP compatible -

I can do to get immunity) against the pin "effect (ie" Show Desktop "command on the" Desktop 7 Using the FindWindow + Setter approach, or any other way that will work in XP too? I know that I could make a gadget, but I would like backwards compatibility with XP, where I code is fine: IntPtr hWnd = FindWindow (NULL, "Untitled - Notepad "); IntPtr hDesktop = FindWindow ("ProgMan", "Program Manager"); Setpants (hwnd, hdktop); In my WPF app, I was able to solve it by using a timer, it is working. XP and Win 7 both in Public Manvindo () {InitializeComponent (); // There is some timer for every 1 second dispatcher detector. Shadowcoptimer = new dispatch timer (); DetectShowDesktopTimer.Tick + = new event handler (detectShowDesktopTimer_Tick); DetectShowDesktopTimer.Interval = new timezone (0, 0, 1); DetectShowDesktopTimer.Start (); } # Delaimport ( "user32.dll")] of immunizing #region support private static extern IntP...

c++ - Create va_list dynamically -

This summary is not available. Please click here to view the post.

Force application to close on Windows CE using C++ -

How do I apply an application, say myapp.exe , Windows CE on C Using a ++ to stop using a different application? The scenario is that I have a previous installation of some software that does not behave correctly when upgrading to a newer version. So I have to kill a process (with the updator) before continuing to update. Terminator process? () BOOL Terminator Process (Handle H process, Deedouux Uexitcode); You will need the handle in this process, which you can easily use ToolHelx2 API. To calculate all the processes on the system, you can get an example of their use.

linux - mmap regions allocating from reserved stack space? -

हमारे उत्पाद में हम एक malloc कार्यान्वयन का उपयोग करते हैं जो विशेष रूप से स्मृति आवंटन के लिए mmap पर निर्भर करता है हम आबंका आईएनजी के उचित उपयोग भी करते हैं। हमें सिर्फ एक ऐसी समस्या का सामना करना पड़ा जहां पर एमएएमएपी उन क्षेत्रों को आवंटित करेगा जहां अंतरिक्ष को ढेर करने के लिए चाहिए आरक्षित होना चाहिए (इस प्रकार हमारे बुरे ऑलोको में से एक मॉलोकैड क्षेत्र में फैलता है)। हमारी प्रक्रिया की सीमा 'आवंटन हमारे वीएम पता स्थान है, भौतिक स्मृति नहीं है प्रक्रिया चलने के बाद हमने / proc / * / maps फ़ाइल को देखा है और देखा कि malloc किसी भी उपलब्ध पता स्थान का उपयोग करता है। यह अंततः स्टैक्स रैलीमिट-सेट रेंज के भीतर पते को आवंटित करने के लिए रिसॉर्ट करता है और अंततः एक बड़ा आलोक इसमें फैला हुआ है। हमने इसके आसपास alloca स्टार्टअप पर हमारी संपूर्ण स्टैक सीमा, लेकिन यह प्लेटफार्मों में स्थिर साबित नहीं हुआ है (यह मेरे 2.4 डेविल्स बॉक्स पर alloca d मेमोरी तक पहुंचने की कोशिश कर रहा है, जबकि यह 2.6 पर काम करता है उत्पादन मशीन)। क्या वास्तव में पता स्थान को आरक्षित क...

Custom extension in rails routes -

I want to prepare tracks for jeep files, for example from the following rest route: How to Do I need to map routes.rb to allow routes for my controller instead of root files (instead of searching for / public files) for zip files? If you have map.resources in the config / routes .RB So I think you already have the routes you want. How do I feel that you want to add custom mime type to controller like this: Mime :: Type.register_alias "application / zip" ,: zip Then Do not Answer Format | Format.zip is also available in {...} end request.format

c# - How to use short namespaces with XElements in .Net? -

I am parsing an XML (RDF in particular) document, originally typed something firmly on the net Mapping the objects. I'm actually using long syntax to select something like the namespace: ontology.Elements ("{http://www.w3.org/1999/02/22- Rdf-syntax- ontology.Elements ("rdf: property") what i really want to do> I know that there was a namespace manager with the old XML framework that you can nominate names of URI names, but it is not certain how to do this with XElements ideas. Make a namespace differently as a XNamespace : XNamespace Rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; ... ontoloy.Elements (rdf + "property"); I manage actually LINQ as XML names, individually.

jquery search and filter elements in a superfish menu -

I'm using the superfish jquery plugin and its okay. But I have got a menu with 'many' voices (at least 300) and I am thinking that there is a way to filter the voice of the menu depending on the inserting some text field and the user who users are writing. Such () ... but it looks a lot ugly! Regards, Segolas My code search within a large HTML table, which includes fields related to email, and add and remove elements in the menu based on the type of user in the input text field. Javascript code: $ (function () {$ ('# msg index'). Superfish (); $ ("# menu filtertextfilled"). Key (function () {$ ("# msgInexex li: (":" "$ +" ("# MenuFilterTextField"). Val () ("# menuFilter ')" empty (); var id; var mail subject, $ (". +"') "). Each (function () {id = $ (this) .attr ('id'); mailsubject = $ ($ (this) child (".mail" subject)). Html (); $ ("#msgindex") A...

c# - Using reflection to get all classes of certain base type in dll -

"itemprop =" text "> after I have a dll that contains a number of sections that all inherit from a CommandBase class. I am trying to use the reflection in all these sections (command, commandb, command c, etc.) in C # so that I can call a specific method on each one. Even I have so far: // Get the assemblies in the directory string folder = path.combin (http consort. Current server.mappath ("~ /") , "Bin"); Var file = directory. Gatefile (folder, "* .dll"); // Each assembly load foreach (string file in file) {var assembly = assembly.loadfile (file); If (if type.IsClass || type.IsNotPublic!) Is continued (assembly.FullName == "MyCommandProject") {foreach (type in the assembly.GetTypes), if (type is the commandbase) {var command = Activator Crete Instance (Type) commandbase; }}}} I have 2 issues I The type of expression given is never provided by CommandBase 2 issue is that I do not understand how to get an exampl...

Memory Issues with PHP (5) -

Is calling unset () free from memory related to that object? There are some cases where I feel myself dealing with large associative arrays and want to remove them whenever they are done (freeing memory to make new ones). Yes it does." Check yourself by using: echo memory_get_usage (). "& Lt; br / & gt;"; Not set ($ array ['key']); Not set ($ array ['key2']); Not set ($ array ['key3']); Echo memory_get_usage (); Quoted from the link later: PHP stores garbage on three primary junctions: when you leave it Li> when you leave the function When the script ends Position 1 occurs when you use unset () , mysql_free_result (), or other resource-deleting functions Clearly clear after your variables, position 2 clearly clear the resources Is - no one gives variable which left scope, that is no longer applicable, your clean. Finally, position 3 vests all script-related resources.

Silverlight canvas scrollbars -

I read that a canvas will not work inside the scrollover because the canvas does not report its size. I am experimenting with different containers (borders, grid, canvas and scroll-reliefs) and can actually do with general description how scrollers behave within nested containers like if I have a container hierarchy UserControl> Grid1> Canvas1> ScrollViewer> Grid2> Canvas2 should appear scrollbars all around Grid2, when Canvas2 extends with Canvas1? (Or actually more than UserControl) If not, then how should I adjust my container so that I will add the weight of the euittelment to canvas 2 and show scrollbar as needed. (My userstrand width and height is set to 100%) If you explicitly have a ScrollViewer The problem is that the problem is that if you do not give height and width for any control, then it will try that it is the area available on the basis of her parents' container. An ScrollViewer however infinite is available area. Take a grid for example...

xsd - how to make include element in my own XML schema? -

I have written my own XML schema and a large XML file, which is an example of that schema. Now I want to define the element in my xsd so that the xml file can be made from several small units. How do I do that? For example, in my file I have & lt; Item & gt; 2 & lt; / Item & gt; & lt; Items & gt; 3 & lt; / Item & gt; & lt; Src = 'foo.xml' & gt; And the content in foo.xml is: & lt; Item & gt; 4 & lt; / Item & gt; & lt; Item & gt; 5 & ​​lt; / Item & gt; & lt; Items & gt; 6 & lt; / Item & gt; and together they set the required values ​​to proceed :) XML is just a data representation and structure format. If you need "Add" -type functionality, then you have to implement it that you can use XML to act on that If you are trying to complete (by editing your original question) a bit more Drb is provided so that we can assist you.

scope of objects stored in the registry-class php -

I have a registry where I store my request, verifier, database and router objects. Therefore, for the recognition of my forms, I use a method in class MyForm where the input field is checked. When user input is incorrect, then Registry :: getInstance () -> validator-> setErrors ($ errors) is called so that the errors are stored in the registry and available anywhere in the code. This is the reason why I call Registry :: getInstance () -> validator-> getErrors () in MyView.php isValid () gets here in the registry: getInstance () -> validator-> setErrors ($ errors) to look clearly with var_dump (Registry :: getInstance ()), validator object The tap is when it's called in MyView.php. So it is still the same thing but why mistakes have gone? And where recognition in MyForm.php is false, can I capture text in MyView.php? EDIT: This is Registry class registry {Private static $ _instance = null; Private $ _cache = array (); Public stable work getInstan...

simple command prompt one line into exe -

I have a Perl script running from the command prompt: 3 times a day, the problem is now I need to run it every two hours I'm not going to go missing an episode, so I need some help, this is the command: Pearl C: / test / script / adyp Do anyone know How can this be done on a line command in an executable (.exe) file then I can run the task scheduler Can I use it? If there is another way of doing this every day with the task scheduler, I can do it even after two hours every day. Thank you for your time. Do not you just create a batch file that runs the script, and that batch file every two Set to run in hours? I know from a quick test that at least I can schedule a batch file to run from the task scheduler on Windows XP.

html - Looking for a third party photo gallery -

Does anyone know easy to install photo galleries, I'm assuming that it must be flash. I want to apply it to my site. I'm looking for a thumbnail, and when you click on the thumbnail, it spreads and you can navigate through other photos. Or something like that The people I have found, I must submit my mysql DB password and login. Not so comfortable with that in advance thanks! If you are comfortable with html then there may be a good place to start.

javascript - How to simulate the clicking of a hyperlink? -

I have 2 links a1 and a2, and a2 is hidden when the user clicks on a1, then i am on a2 I want to emulate clicking. How can this be done with jQuery? It depends on what it means by "simulating the clicks of A2" . Assuming that the a1 and a2 are id attributes, if you think that you want to trigger the jQuery handler on that element, You can do so: $ ("# a1"). Click (function () {$ ("# a2"). Trigger ('click');}); If you do not bubble the event or trigger without triggering default behavior, then do this: $ ("# a1 "). Function () {$ ("# a2"). Trigger handler ('click');}); But if you really want to move to Affiliate href , then you will need it: $ (" # A1 "). Click (function () {window.location = $ ("# a2"). Attr ('href');}); or $ ("# a1"). Click (function () {window.location = document.getElementById ('a2'). Href;});

xml - XSL show attribute name -

तो, उस का उपयोग करके & lt; xsl: प्रत्येक चयन = "./ @ * "& gt; [& Lt; xsl: मान-की / & gt; & lt; xsl: मान का चयन करें = "।" / & Gt;] & lt; / xsl: for-each & gt; मैं विशेषता मानों पर पुनरावृति कर सकता हूं I लेकिन मैं विशेषता नाम भी देखना चाहता हूं। मैं एक तालिका देखना चाहता हूं: attr1 - val1 attr2 - val2 attr3 - val3 ... मदद के लिए धन्यवाद! आप ऐसा कर सकते हैं या: & lt; xsl: प्रत्येक चयन = "./@*"> [& Lt; xsl: मान का चयन करें = "नाम ()" / & gt; & lt; xsl: मान का चयन करें = "।" / & Gt;] & lt; / xsl: for-each & gt;

xaml - Cannot find the image by providing the relative path in Silverlight -

I am working on a Silverlight application and I have a hard way to set the relative path of an image in my application there is time. / P> This is a short picture of my project directory: MyProjectL Image L. Mountain 1 JPG L Sprite Object L Mountain Factor c. El GameScreen XML Basically, I paint a rectangle by using GameScreen.xaml using an image brush. & lt; Rectangle name = "rec_bg" horizontal alignment = "left" workspaceElement = "top" width = "800" height = "600" & gt; & Lt; Rectangle.Fill & gt; & Lt; ImageBrush x: name = "ib_bg" image = "./ images / mountain1.jpg" & gt; & Lt; / ImageBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; This xaml code works, that image can be found in the image folder without problems. I want to change the image dynamically, and in this class I have a mountainfacracker. Cs, I have a method with this code: ...

.net - How is JIT compiled code injected in memory and executed? -

"एक विशिष्ट विंडोज़ x86 या AMD64 आर्किटेक्चर पर विचार करें, मेमोरी को एक्जीक्यूटेबल सेक्शन में विभाजित किया जाता है जिसे लिखित नहीं किया जा सकता है डेटा अनुभाग जिन्हें लिखा जा सकता है, लेकिन निष्पादित नहीं किया जा सकता है (डीईपी सोचें)। " " जीआईटी ने इन-मेमोरी के तरीकों को संकलित किया है, (आमतौर पर) डिस्क में कुछ भी संग्रहीत नहीं करता है, इसके बजाए इसे अगले दिशा में कहां स्थानांतरित किया जाता है सूचक यह तक पहुंच सकता है, वर्तमान अनुदेश सूचक को बदलता है (जेआईटी की ओर इशारा करते हुए) नए जनरेट किए गए कोड को इंगित करने के लिए और उसके बाद उसे निष्पादित करता है। " ये दो पैराग्राफ़, थोड़ी अधिक सरलीकृत , मैं मूल रूप से जेआईटी और विंडोज मेमोरी मॉडल को समझता हूं। मुझे यह भी पता है कि जब मैं कुछ निष्पादन योग्य कोड को हाथ में हाथ से कॉपी करने की कोशिश करता हूं और इसे निष्पादित करने की कोशिश करता हूं, तो मैं आमतौर पर ऐसा करने में असमर्थ रहूंगा (जब तक कि डीएलएल इंजेक्शन न हो)। जेआईटी-डिजाइनरों ने इस बाधा को कैसे दूर किया? क्या वे एक अंगूठी -0 चालक का उपयोग करते हैं या ...

.htaccess fix for a pretty permalink in PHP? -

Maybe I'm going wrong about this, but there are some pages in my house CMS that I want to change Currently, their page URLs pay attention to the use of beautiful permalinks: I want to convert them to: I have a column DB for permalinks, that when the article is created, automatically converts the title into a permalink The. How do I write the rewrite rule to complete it? Is this the best way to accomplish this? If there is nothing in the query string then you can come to QSA : Rewrite rules / (. +) Article /? Permalink = $ 1 [QSA, L, B]

objective c - digits after decimal point -

How to get points after float number from decimal point in Objective Object int decimals = (number - ((int) number)); Whereas (decimal> 0.0) {reportNextNumber ((int) (decimal * 10)); Decimal = (number - (int) number)); }

Entity framework linq query Include() multiple children entities -

It may actually be an element question, but asking a question involves the organization of several children to spread three levels. What is a good way to do (or more)? I have 4 tables: company , employee , Employee_Car and Employee_Country The company has 1: Relationships with the employee. The employee's 1: m relationship is with both employee employee and employee. If I want to write a query that returns data from all 4 tables, I am currently writing: company company = context. Companies Include in ("Employee Employee_Car"). Include ("employee employee jobs"). First and last (C => CID == Company ID); There should be a more elegant way! It generates long-winded and horrible SQLs I am using EF4 with VS 2010 Replace NameOfContext with the name of your object context. Public static class extensions {public static IQueryable & lt; Company & gt; Full Companions (this name is called theOfontext) {Return Reference. Compan...

java - Need Help And Ideas In Solving A Collection Problem -

I have already posted a question. This question is about the same project, but unrelated. I am developing an application for Lego NXT Mindstorm Robot. I have a GUI running on two robots and PCs. In Lejos NXJ you can only use one input reader. This means that you can not connect the PC directly to two robots and allow two robots to connect directly to each other. So that's what I did. I have connected the PC directly to two robots and when I want to contact two robots directly, I send my message through a GUI. There is a lot of communication between the GUIs and robots. Well, between the robots, I write the data in the output stream at any time due to this reason. It seems that some data overwrite by others Is done and the system is not working properly. I have been advised to write a class that holds a collection (queue) object so that whenever the robot wants to send something, it adds it to the collection (queue) and from that class which catches the collection object T...

ruby - Net::SSH sudo command hangs after entering password -

I am trying to write a small library from Thor to help in preparing new projects and sites quickly I am I've written a small method: def ssh (cmd) net :: SSH.start (server_ip, user, port = & port; port) session. Session | Session.exec cmd end end Please help me run quick commands on a remote server when needed The problem is that when I am under pseudo If a command is required to run, then the script seems to be hanging for me, for example when it is executed ... ssh ("sudo cp # {file_from_path} # {file_to_path} ") script for me a password [sudo] password for user: but then completelyAfter typing it from hhangs Know that this is hanging at all, and what can I do to run the sudo command on a remote server under Net :: SSH (or some optional)? * Note: Prior to the suggestion, I had started writing basically until I came to Thor, by this library as a recipe under Capstrano, and thought it was There will be a good chance of trying out. I do not ...

c++ - Access a value from a separate function -

कक्षा अंतिम सूची {स्थान सूची [20]; इंट मैक्ससिज़; पूर्णांक आकार; सार्वजनिक: फ़ाइनललिस्ट () {MaxSize = 20; } शून्य रनयूट (); शून्य दिखाएँ (); शून्य मतलब (); शून्य मेनू (); }; शून्य FinalList :: मतलब () {int K; डबल कुल; डबल औसत; के लिए (कश्मीर = 0; के & lt; आकार; के ++) कुल + = सूची [के]। मूल्य; औसत = कुल / आकार; Cout & lt; & lt; "औसत:" & lt; & lt; औसत & lt; & lt; endl; } शून्य FinalList :: दिखाएँ () {int Count; के लिए (गणना = 0; गणना & lt; आकार; गणना ++) सूची [गणना]। प्रदर्शन (); Cout & lt; & lt; "औसत:" & lt; & lt; औसत & lt; & lt; endl; } मैं माध्य () में सरणी से औसत मूल्य की गणना कर सकता हूँ। लेकिन मैं बाद में इस मान को शो () ? में कैसे पहुंच सकता हूं या तो इसे किसी आवृत्ति चर में संग्रहीत कर सकते हैं (जैसे कि आप MaxSize के साथ कर रहे हैं) या मीन () को प्रिंट करने के बजाय औसत मूल्य वापस कर सकते हैं। यदि आप औसत () वापस औसत बनाते हैं, तो आप इसे अपने दिखाएँ () फ़ंक्शन में इस तरह कॉल कर सक...

What is your favorite PHP programming trick? -

What is your preferred PHP programming age? I like myself function cached function ($ foo) {constant $ result = array} / div> If the result of the function does not change during the course of your application, you can get a more quick call in the cached function. A well-designed application will not be needed but without much effort, it is very useful to squeeze a lot of performance from the old or bad engineer system. I worked on the project where it reduced the time for the average HTTP request, about fifty% Because the app was constantly calling the same function without the need for a "fresh" result. Just keep in mind: this trick can give you out-to-date data! so be careful.

hadoop - generating bigram combinations from grouped data in pig -

मेरे इनपुट डेटा को userid, itemid प्रारूप में दिया गया है: कच्चे: {userid: bytearray , मदरहित: बायटैरेई} कच्चा डंप; (ए, 1) (ए, 2) (ए, 4) (ए, 5) (बी, 2) (बी, 3) (बी, 5) (सी, 1) (सी, 5) जीआरपीडी = ग्रुप कच्चा BY यूज़र आईडी; डंप जीआरपीडी; (ए, (ए, 1), (ए, 2), (ए, 4), (ए, 5)}) (बी, {(बी 2), (बी, 3), (बी, 5) }) (सी, {(सी, 1), (सी, 5)}) मैं प्रत्येक समूह के अंदर सभी संयोजनों (ऑर्डर के लिए जरूरी नहीं) उत्पन्न करना चाहता हूं । मैं आखिरकार अपने समूह में आइटम्स पर जॅक कार्ड समानता प्रदर्शन करने का इरादा रखता हूं। आदर्श रूप से मेरे बड़ेअम उत्पन्न होंगे और फिर मैं इस तरह दिखने के लिए आउटपुट को फ़्लैट करता हूं: (ए, (1,2)) (ए, (1,3)) (ए, (1,4)) (ए, (2,3)) (ए, (2,4)) (ए, (3 , 4)) (बी, (1,2)) (बी, (2,3)) (बी, (3,5)) (सी, (1,5)) पत्र एबीसी, जो यूजरआड का प्रतिनिधित्व करते हैं, वास्तव में आउटपुट के लिए जरूरी नहीं हैं, मैं सिर्फ उन्हें स्पष्ट उद्देश्यों के लिए दिखा रहा हूँ वहां से, मैं जैककार्ड की गणना के लिए प्रत्येक बड़ेराम की घटनाओं की संख्या की गणना करता। मुझे यह जानना अच्छा लगेगा कि ...

php - mysql get non existing results -

Using php and mysql, I have a table "subdomain" that contains subdomains for my application, Based on a category. Subdomain-id, cat_id, subdomain There are subdomains in some categories and others do not have it. Those who do not have a subdomain, I want to be a subdomain 'www'. Now there are some values ​​in my subdomain table, for example: Now, I have an array of cat_id, for example $ aCatIds = array (1, 1, 2, 2, 2) 5,6,8); I want something like this at the end of the mysql query: array (0 = & gt; (cat_id = "1", subdomain = "www"), 1 = & Gt; (cat_id = "5", subdomain = "www"), 2 = & gt; (cat_ id = "6", subdomain = "sale"), 3 => Is it possible only with a mysql query? I use php and tried things like this: $ stmt = "sub - Select the cat_id, ifnull ('www', subdomain) in the form of subdomain from domains where in cat_id ("Implode (',', $ aCatIds)....

android - getCurrentPosition() equivalent for Audio recorder -

Contains the content page in the Android Media Player, which tells me how long the media has been played (in the other). But why is not the media recorder equal? How do I know how many times have passed while reloading the audio? How can I find out how long it has been to reload an audio? SystemClock.elapsedTime () . / html>

NHibernate - how to query against subclass properties while returning the super class? -

NHibernate का उपयोग करना; एक संपत्ति का प्रस्ताव 1 अंत में क्लास क्लास बी इनहेरिट्स क्लास ए प्रॉपर्टी प्रॉप 2 एंड क्लास क्लास सी इनहेरिट्स क्लास ए प्रॉपर्टी प्रॉप 3 एंड क्लास मैं निम्न प्रकार से एक क्वेरी कैसे दिखाऊंगा: से A जहां प्रॉप 1 = 'फू' और (यदि ए है बी) तो बी .प्रॉप 2 = 'बार' या (अगर ए सी है) तो सीपीआर 3 = 'बार') क्या यह संभव है कि Nhibernate.Linq का उपयोग करना संभव है? एचकेएल या मापदंड एपीआई के बारे में क्या? चूंकि एचक्यूएल और आईसीआरटीरिया डोमेन-क्वेरी टूल्स हैं इसलिए मुझे इस तरह की कार्यक्षमता की अपेक्षा करना कठिन लगता है। एपीएआईके एकमात्र करीबी चीज आईसीआरटीरिया के अभिव्यक्ति का उपयोग कर रही है। एससीएल () जहां आप सुपरक्लास पूछते हैं लेकिन शुद्ध वर्ग वाले उप-वर्ग विशिष्ट टुकड़े को इंजेक्ट करते हैं। वहाँ, अभिव्यक्ति की तरह होगा crit.Add (अभिव्यक्ति। SQL (@ "((alias}। DiscrimCol =: subClassADiscrimVal और {alias} .Col2 =: barVal) या ({ उपनाम} .डिस्क्रमॉल =: उप-क्लास बीडीस्क्रीमवाल और {उपनाम} .कॉल 3 =: बारवील)) ", नया ...

css - What jQuery selector can I use to match these HTML elements (requires ":contains()")? -

I am trying to find a jQuery selector which will only match the element that is directly contained in "PDT" Example (short for short): & lt; Div & gt; & Lt; P & gt; & Lt; Strong & gt; (07-27) 21:28 PDT San Francisco & lt; / Strong> - San Francisco observers have ended more than a decade ... & lt; / P & gt; & Lt; P & gt; 10-1 votes, supervisor Chris Daily dissatisfaction only & lt; / P & gt; & Lt; / Div & gt; and & lt; Div & gt; & Lt; P & gt; (07-28) 08:59 PDT Washington - & lt; / P & gt; & Lt; P & gt; Order of American factories of large ticket manufactured goods fell ... In the first case, this & lt; Strong> , and in the second case, the first & lt; P & gt; . I am looking for the same selector who will match both, or many selectors, who will not be able to find any false positives. By my analysis, I know the following things about those elements t...

java - Most efficient way to count rows of a query -

I am using hibernate to retrieve the number of rows for a specific query. Suppose I have a table called 'person' with different columns. One of those columns is 'name'. If I want to get the number of people named 'Andrew', which of these methods would be the most efficient? Assuming there is a performance difference between some of them / all Is this a better way to use Hibernate / SQL? (1) Select all the columns query query = session.createQuery ("from person where name =: name"); Query.setParameter ("name", name); List results = query.list (); Int count = result.size (); (2) Just select a column named query query = session .createQuery ("name of person named name where name =: name") ; Query.setParameter ("name", name); List results = query.list (); Int count = result.size (); (3) Use of calculation in query query query = session .createQuery ("Select number from person (*) where name =: Name...

Javascript regex help -

Does anyone know how I can make the next flash and format: DD / MM / yay in this reggae mandatory? // Checks a string to see if this is the valid date format // D (D) D / (M) M / (YY) YY and correct / Returns the wrong function isValidDate (s) {// format D (D) / M (M) / (YY) YY var dateFormat = / ^ \ d {1,4} [\. | \ / || -] \ d {1,2} [\. | \ / || -] \ d {1,4} $ / / If (dateFormat.test (s)) {// date values ​​s = s.replace (/ 0 * (\ d *) / gi, "$ 1") removes any leading zeros; Var dateArray = s.split (/ [\. | \ / | -] /); // True Month Price Dated [1] = DateRay [1] -1; // If the value of the right year is (dateiera [2]. Length Try dd / mm / yyyy for compulsory: var dateFormat = / ^ \ d {2} \ / \ d {2} \ / \ d {4} $ / / It was not visible, but I think that's what you wanted.

Any word on reified generics in Java? -

I know this question is likely to provoke more discussion than concrete replies (which I know is not that good) is. But with the recent acquisition of Oracle, I was wondering if there is a word that Java (some day) could be pure genric? I've heard that Oracle encourages Java a bit, and I can think better. There is a good article on the revision of generic, that you should read in relation to Java, in fact it There are some types of losses that may happen with the onset of such changes. When you think about it, it is very cruel for the past compatibility, if you are wondering where it came from be grateful that it is Java's thing No longer will they have to slip with things like them and their identities (not that they were bad.)

drupal - How to hide Date of birth field in overriden form? -

Changes to my hook form, this is the date of birth: [birthday] = & Gt; Array ([# type] = & gt; field [[title #]] & gt; birthday [# weight] => 1 [profile_barthamata] => hey ([# type] => date [# Title] = & gt; Birthday [#default_value] = & gt; [#description] = & gt; The contents of this area are kept private and will not be shown publicly. [#required] = & gt; 1 )) I have tried: unset ($ form ['birthday'] ['profile_birthdate']); Not set ($ form ['birthdate']); And that does not work as I still get the "Please valid date of birth" message. I do not want to hide the field and no message The phrasing of the error message ('... a Valid date ... ') indicates that this form has been released from the formation function. Based on how it is written, it can still try to validate the field, even if you have successfully deleted it from the form. If so, you will need to override the verification f...

post - How do I submit a value by url in php -

मैंने इसे अपने php साइट & lt; a href =? Command = value & gt; यहां क्लिक करें & lt; / a & gt; और यह मान प्राप्त करने के लिए: अगर (isset ($ _ POST ['command'])) {$ command = strip_tags ($ _ GET [ 'कमांड']); काम करने के लिए प्रतीत नहीं होता है .. पी एस Url के पास यह मान भी है: ? Lang = en_US उपयोग करें $ _ POST के बजाय कोड> $ _ प्राप्त करें । href विशेषता के मूल्य के आस-पास दोहरे उद्धरण भी डालते हैं।

Converting an array to a formula in R -

I have an array with a date. I want to plot a loss curve with it. However, the input for the lat is a formula. Is the array a good way to define the value from the index which I can give to the loot function? itemprop = "text"> See help page for code (Loos) - There are some examples of specifying threads in it. Basically, you have to put your data into a data.frame object with the given variable name, then the formula will be y ~ x , where x and y are the names of the variables you want on x- and y-axis, respectively. I have the function lowess () , which is a fast, simple option in which there are fewer adjustable parameters than less () Only good. Below are the differences between the two functions. Below is a simple example for both huses () and bothess () > ## An example data set Make x & lt; - Sort (rpi (10010) + turnarah (100,02) y & lt; - x ^ 2 + rnorm (1007) DF & Lt; - data.frame (x = x, y = y) plot (x, y) ## least fit a...

templates - Question about compile time code generation -

After i is something like a zero doSomething (int x) {.. .}} Zero fun () {#ifdef XXXX_1_YYYY doSomeThing (XXXX_1_YYYY); #endif // XXXX_1_YYYY #ifdef XXXX_2_YYYY doSomeThing (XXXX_2_YYYY); #endif // XXXX_2_YYYY #ifdef XXXX_3_YYYY doSomeThing (XXXX_3_YYYY); #endif // XXXX_3_YYYY #ifdef XXXX_4_YYYY doSomeThing (XXXX_4_YYYY); #endif // XXXX_4_YYYY .... until XXXX_20_YYYY} Is there any way I can reduce this typing up to 20 using some macro extension technology or any other solution? The macro definition can be something like this #define XXXX_1_YYYY 10 #define XXXX_2_YYYY 20 #define XXXX_3_YYYY 30 #define XXXX_4_YYYY 40 ... #define XXXX_20_YYYY 200 Each #ifdef is not mutually exclusive Code is in C ++ A trivial answer is probably, but if they are all mutually exclusive, using #elif will save you a lot of #endifs. It is difficult to know how to avoid this without knowing about a good way that you are actually trying to do. Are all those functions in the same file, ...

c# - Sending a key on window changed event -

I have a window condition change event in the WPF when the event starts to fire, I want to send an escape key. Can anyone help me do this? I recommend you If you actually Send a look at KeyEventArgs: RaiseEvent (new KeyEventArgs ; The first argument calls your own keyboard, and the second argument says that it will be sent to your activist, which is expected that your WPF window will be;) Extend the event with the code behind any WPF control you can However It is better to present just a custom event, and call the methods that you can escape Expect the event key. Hope this helps

c# - Add editing to MVVM in a hierarchical data structure -

This question is a follow-up to one, and it is more about confirmation than the open question. The example of my visual model is a personal example of the model, _modelInst . During modeling, there is a unique use of visual modal on model data (hence the model does not need to implement INOTifyPropertyChanged.) / strong> Example Simple Price Field Back _modelInst.fieldname; _modelInst.fieldname = value; It is easy to implement ... Create and manage a view model example on parental data structure Example for more complex object types like Streets : Creating a new view model for that type. Music knows her parents and her field name. Display in a ContentControl + DataTemplate Receive / Setting: Through Parental Methods with Field Name as Parameters Overwrite Entire Original Object Only a field is changed while doing This means that a new interface implemented by parents for each of these structures ( _modelInst With update routines work...

bash trickery using --init-file -

I have a bash-script (let's call it / usr / bin / bosh ) After that-bang line: #! / Bin / bash --init-file It defines two functions, and generally interactive in an environment where the user can control a bunch of that stuff that I love. It works very well now for the interesting part, I want to be able to use in-middle-level to write new scripts clearly, without users havnig for this script. Is this possible? I tried to write a script (let's call it / usr / bin / foo and use it-bang line # which I thought would be written again to execute the command / usr / bin / bosh / Usr / bin / foo which will result in the change but it does not work, / usr / bin / foo is executed, but / usr / bin / bosh before How can I make the init file a source even though the script is not interactive? Or will it have to write a cover script for this? I thought of having a script like this #! / Bin / bash / usr / bin / bosh "$ 1" but it will not c...

iphone - How can I sort an NSArray containing NSDictionaries? -

मेरे पास एक NSArray जिसमें NSDictionary ऑब्जेक्ट हैं इनमें से प्रत्येक NSDictionary ऑब्जेक्ट में एक ORDER कुंजी है। मैं इस कोड के आधार पर इस कोड को कैसे सॉर्ट कर सकता हूँ? इनमें से NSDictionaries ? यहाँ एक उदाहरण है कल्पना कीजिए कि आपके पास डिक्शनरीरीज की एक सरणी है। एक्का डिक्शनिरीरी में 2 कुंजी "नाम" और। "जन्म की तारीख"। आप इस तरह से "नाम" के द्वारा अपने सरणी को सॉर्ट कर सकते हैं: // // नाम के आधार पर सरे सरणी NSSortDescriptor * सॉर्टर = [[NSSortDescriptor alloc] initWithKey: @ "name" आरोही: हाँ ]; [MyArray सॉर्ट यूज़िंग डिस्क्रिप्टर: [एनएसएआरआरएआरएरेविज़ः सॉर्टर]]; [सॉर्टर रिलीज़]; ध्यान दें कि myArray एक NSMutableArray है।

Android: Retrieve logcat before crash (reboot) on a real device -

I am developing an application and during my testing on a real device, I found out that it will crash and The phone will be due to reboot (I'm worried ...) Is there any way to recover the locksack before I boot from the phone because the lockset gets reset when the phone boots. Thanks in advance. Use, which is a great Liberation for sending crash reports, a Google form incl. stack trace. I use it in my app and work well. Please tell me if you have any problem in implementing it, it's easy to setup.