Posts

Showing posts from February, 2012

How does android handle the +-sign in a phonenumber -

I'm trying to call a calling card through code and intend to send the desired Uri to: accessnumber + pause + phonenumber + # Phononumber comes from the address list, but I handle + (as in the exit code) because it is in instances 011, Is in Europe 00. And I think I can not send it only in intent. Is there any way to handle this? The problem is that calling card plus for example 00 or as a 011. string uri = "tel:" + Uri.encode (phone number) {intentCol = new intent (intent.ACTION_CALL) Try it; IntentCall.setData (Uri.parse (URI)); StartActivity (intentCall); } Hold (ActionlineFound Exception E) {} To use Android compatible telephone URI For RFC 3966 specifies that '+' is used for international dialing, therefore Android should recognize the character '+' and behave properly with it.

javascript - Jquery ui autocomplete php retrieve names -

I am trying to use the jquery UI auto-complete widget to retrieve names in a php file (NameSearch .php) This result is not recovering properly. Is there something wrong with jazzery? Should the ID return the result to the input with the 'tag'? I'm getting the '$ _GET [' word ']' variable in the PHP file, which I think is sent from the complete request to the php file? This is the Jquery code I have: & lt; Script & gt; $ ("# Tag") Autocomplete ({source: "nameSearch.php", Minlang: 2}); & Lt; / Script & gt; php & lt ;? Php $ namePart = $ _ GET ['word']; $ Names = array (); // Make connections $ con = mysqli_connect ('localhost', 'root', 'admin', 'moviedatabase'); // Query Database $ result = mysqli_query ($ con, "name like selector name, name like '%'. $ NamePart."% '"); $ Arr =' '; while ($ line = mysqli_fetch_array ($ result }}...

In Rust (0.5 and/or trunk), how do I create a mutable vector of mutable objects? -

I have the following code (as a cut-down example): Square item {attribute: ~ mute [~ str]; } Class item list {items: ~ mute [items]; } Fn read_item (rdr: reader) - & gt; ~ Mut item {} fn load_item_list (rdr: reader) - & gt; ~ Mut itemList {} When trying to implement these functions, I "unsolved name item list" and conflict indicator / Variable type (between and; ~ mut vs ~ mut>, etc.) Does anyone give me a cut-down example that is allocated now Does and returns empty things? From there, I should be able to fill the data. I'm not sure what's the problem you're hitting but here are some hints. , I recommend that going into the coronal trunk - the code you are using - indicates an old old version of the class sentence. On the trunk, mut is no longer a valid modifier for the type of ownership type, which means ~ mut T can not be written, nor can it be written in the struct {Mut field: T} . Instead, the transferability of owner...

Write data to USB HID using Javascript, HTML5, or any cross platform language (supports Android) -

I have written a UI in HTML5 and Javascript I chose this implementation so that I am both between Android Chrome and Windows 8 RT Only share the code. Now, my next goal is to write data to a USB HID, the device I'm communicating with is considered to be a hidden. I am referring to this part, if a USB RAW is a way of writing on the HID device instead of the device. I have done a lot of research on this matter. But, HTML5 5 glasses are changing so often that I miss something. Anyway, can suggest a language or implementation that I can use to access the common code to access USB devices on Android, Windows 8 RT? If there is no way to share between the two, then how about the suggestion for getting USB communication on Android? Below is my research conclusion: Silverlight: In terms of UNSUPPORTED web plugin, on Windows 8 RT or Android Not supported Flash: Possible options are supported in both operating systems, though they have removed support for Android with t...

javascript - JQuery variable value in quotes -

इस सवाल का पहले से ही एक उत्तर है: 21 उत्तर मुझे एक समस्या है जो चर Jquery में उद्धरण चिह्नों में मूल्य: उदाहरण के लिए: मेरे पास चर रंग में एक HTML रंग कोड है, जिसमें मान # FFFF00 है। मैं वैरिएबल वैल्यू को प्रदर्शित करना चाहता हूं जैसे: "# एफएफएफएफ 200"। मैंने ऐसा कुछ करने की कोशिश की लेकिन यह काम नहीं करती: context.strokeStyle = "\" रंग\""; बस सीधे चर का उपयोग करें। संदर्भ .strokeStyle = color; और यदि आप इसमें उद्धरण जोड़ना चाहते हैं: context.strokeStyle = "& amp; quot;" + रंग + "& amp; quot;";

django - Add a field to Page Admin to include icon for menu item -

I have allowed the use of icons in my HTML templates, small square PNG or font-awesome: template top-menu In HTML, I should be able to use the following: {{child.menu_icon_font_awesome}} # # "{child.menu_icon_image}}" instead of "icon-search" Instead of / icons / search.png How does anyone get these variables in the child menu nodes in the menu? In addition, how can I get administrators to work in admin.py (very few important)? My menu_icons app looks like this: import from django.db import model from django.utils.translation import # models.py ugettext_lazy form _ to cms.models. Pagemodel import django.core.files.storage Import FileSystemStorage Class OverwriteStorage page (FileSystemStorage): "" "If present, the file with the same name is deleted." Def_save (self, name, content): if self.exists (name): self.delete (name) return super (overwritestorage, self) ._ save (name, content) def get_available_name (auto, name): return...

ruby on rails - Selecting active option in jQuery Mobile -

The mobile page for my app is the header with the menu menu select the jQuery Mobile dropdown. & lt; Span data-role = "fieldcontain" id = "category-dropdown" & gt; & Lt; Select name = "selection-country-2" id = "selection-country-2" data-mini = "true" & gt; & Lt; Option value = "& lt;% = root_path%>" & Gt; Home & lt; / Options & gt; & Lt; Option value = "& lt;% = newest_path%>" & Gt; New & lt; / Options & gt; & Lt; Option value = "& lt;% = group_path (group.fund (1))% & gt;" & Gt; Group 1 & lt; / Options & gt; & Lt; Option value = "& lt;% = group_path (group.fund (2))%>" & Gt; Group 2 & lt; / Options & gt; & Lt; Option value = "& lt;% = group_path (group.fund (3))% & gt;" & Gt; Group 3 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Sp...

Android code after httpclient.execute(httpget) doesn't get run in try (using AsyncTask) -

I am trying to get data from a website and parsing it in my Android application. Unfortunately I do not get the part of parsing the data. The code has not run after the following line: HTTPRSpace response = httpclient.execute (httpget); The result is that message = 333. When I move it forward using the eclipse debugger, I can see that it runs that line. Then I can read the response variable (= 200), but the line after that is not executed. It does not reach 444 or other code in the ceremony. I have announced the Internet permission in the Android Manifest. Code: Import android.os.Bundle; Import android App Import android.view.Menu; Import org.apache.http.HttpResponse; Import org.apache.http.StatusLine; Import org.apache.http.client.HttpClient; Import org.apache.http.client.methods.HttpGet; Import org.apache.http.impl.client.DefaultHttpClient; Import Android.os.AsyncTask; Import android.widget.TextView; Public classroom increases main activity activity (text view message; @ ...

LSD - Line Segment Detector / Android? -

LSD is a linear-timeline segment detector giving sub-pixel precise results. This parameter is designed to work on a digital image without tuning. It controls the number of false notifications of its own: On average, a false alarm is allowed in the image. There is a small example in the package, Can I work on Android? And if I can, what is the proper way? #include & lt; Stdio.h & gt; #include "lsd.h" int main (zero) {image_double image; Ntuple_list out; Unsigned int x, y, i, j; Unsigned int x = 512; / * X image size * / unsigned int y = 512; / * Y image size * / / * Create a simple image: left half black, right half gray * / image = new_image _ double (x, y); (Y = y; y; y ++) Image- & gt; Data [x + y * image-> Xsize] = x & lt; For X / 2 (x = 0; x; l; x; x ++); 0.0: 64.0; / * Image (X, Y) * / IplImage * imgInTmp = cvLoadImage ("C: \ Documents and Settings \ Eslam Farag \ My Documents \ Visual Studio 2008 \ Projects \ line \ hand.JPEG", 0); ...

java - Android:socket communication -

I'm trying to create simple app with Android client and Java server to send messages to Android client server (Java) When I try to read the server response error: Socket Closed Line (If Received (Received Message = Received.readline ()) = Faucet) =)) Public Class Client Connector Task Async Task & lt; String, zero, integer & gt; {Private Socket Client; Private PrintWriter PrintRighters; Validate protected integer doInBackground (string ... strings) {// input parameters if (string.label = lt; = 0) {return 0; } // Connect to the server and try the message {client = new socket ("192.168.1.4", 7777); Printwriter = new printritter (client.getOutputStream (), true); // while (true) {InputStream istream = client.getInputStream (); Get BufferedReader = New BufferedReader (New InputStreamReader (istream)); String received message; While (true) {// printwriter.write (wire [0]); Printwriter.print (wire [0]); Printwriter.flush (); Printwriter.close (); If ((receiveMess...

installer - Increase Allowable File Path Length -

Is it possible to increase the file path / string length for NSIS? I am trying to use the function FILE with the path that is longer and I get the compilation error: File: Opening file failed " .. .. .. .. \ .12d \ 10.00 \ DPTI_Customization \\ DESIGN_12d10 \ DPTI_Design_User \ DPTI_D_Toolbars \ DPTI_D_Create_D_Boundaries_for_Tin.slx " Whether an increase in acceptable length is possible as if you were paying $ $ How can you increase the NSIS_MAX_STRAL NARS_MX_STREL NARIDLAD? It says that the cause of the error is that the file path is too long. Edit That code is: FILE / r ".. ... .. .. .. .. .. \ 12d \ .0000 \ DPI_Customization \ "# Folder DPTI_Customization There are several sub folders and files You can try to use the Unicode version of NSIS . Alternatively, I wonder if you can use multiple

java - Is it possible to create new buttons to a frame via action listener? -

This is my code and I would like to know if I can add my grid layout to a button every time I already exist In the example frame of the button. Public square board {public static zero main (string [] Args) {Jebton [] Button = New Payton [40]; Int i = 0; Jeffre Frame = New Gefram (); Frame.setLayout (New Grid Layout (20, 20, 15, 15)); While (i & lt; 40) {button [i] = new pocket ("button" + i); Button [i] .addActionListener (new action ()); Frame.add (button [i]); I ++; } Frame.Sets (700, 700); Frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Frame.setVisible (true); } Static class action implementation ActionListener {@Override Public Zero ActionPerfed (ActionEvent E) {}}} The solution is not simple. What you need to do is think about the problem. First of all, you have a bunch of static references, which are not really necessary and provide you some benefits. Now, after saying this. To do this you need some way to add the button to verb {/ code>. ...

asp.net mvc - How do I seed my MVC model with HttpPostedFileBase type? -

I searched high and low for this answer but nothing can be found ... is I silly ? protected override zero seed (MyContext reference) {context.Items.Add (new item {URL = "my-url-field", title = "my title for this item", image = "Some-image-file.jpg" // it is httppostedfilebase - how to seed it?}); } I think I have to migrate the httppostedfilebase object, but how do I do it? I think the HttpPostedFileBase is the wrong asset for your model. You probably want the image property as byte [] instead - this is the data that will be stored in the database. If you need a filename, you can ensure that a string property item ... image = file. Redballts ("some-image-file.jpg"), file name = "some-image-file.jpg" ...

google chrome extension - captureVisibleTab text rendering is blurry -

I get a lower quality text presentation than the Capture Visual tab compared to viewing on the screen. On what I've read, the VisualTab only captures its image with memory (see the Chromium issue 44758), so I'm pretty sure why I have a retina macbook but images are even worse on a regular screen I'm writing an extension for a web typography tool which is specially dependent on text rendering so that any alternative or optional approach Can be appreciated credit. Here is a screenshot of the BBC Home Page as I see: And the data URI is full of the following code: chrome.tabs.captureVisibleTab (empty, {format: "png"}, function (dataURI) {Console.log (dataURI);}); looks like this: (Open those two screenshots in the tab and look in between me and see what I mean. Change format to JPEG and try to make quality high

Mysql cross-database foreign key -

I am trying to create a cross-database foreign key when I run the following code of the same database CREATE TABLE `t1` (` id` integer (11) No NULL AUTO_INCREMENT, `int_id` varchar (128) utf8_unicode_ci NULL match, primary key (` ID`), unique key` int_id` ( `Int_id`)) engine = InnoDB default charge = utf8 COLLATE = utf8_unicode_ci; Table `t2` (` id` is not an integer (11) No NULL AUTO_INCREMENT, `ext_id` varchar (128) utf8_unicode_ci not match NULL, primary key (` id`), key `ext_id` (` ext_id`), constraint `t2_ibfk_1 Replace `` t1` (`int_id`) 'foreign key' (` ext_id`) engine CASCADE ON = engine = InnoDB default charset = UTF8 match = utf8_unicode_ci; However, when you make T1 on a database (D1) and then run the following code on a second database (D2), I get a normal error: # 1005 - Can not create the table 'userdata. T2 '(errno: 150) create table' T2` (`id 'int (11) tap etangement,` ext_id` varchar (128) utf8_unicode_ci null, primary Key Connection ...

Restrict External Access to Controller, but enable access from Model (CakePHP 2.X) -

In our application we are using controller and view to generate a PDF file which will be emailed to a user The controller is a visible file and it is sent back to the model. This is setup like this because in the second part of the application we use the same view file (which requires postal data) to display PDF on-page. My problem is that I need to be able to access controller functions with my model, although I want to stop anyone from executing the controller function (using the website directly). In the model: $ content = new content controller (); $ Message = $ content-> Generated PDF ($ view); In the administrator: Public function generated PDF ($ input_data) {// Set the original page and check results for creating the page: Foreach ($ Input_data $ key = & gt; $ value) {$ this- & gt; Set ($ key, $ value); } // Controller $ view = new View ($ this) to a new view class immediately; $ ViewData = $ view- & gt; Render ('pdf_file', 'pdf...

ruby - Can Diaspora* be used as the social part of a site? -

I am searching for social network development in Ruby and Diaspora. * I used to put my attention though this idea has a social network 'Many are hosted' and are not owned by anyone, I do not quite understand if I can use it to make a social part of the custom site. And is it not related to the custom site network and is using its code to support the site, or it will be integrated After all, can the design change? To fit this custom site. I tried to find information on their frequently asked questions and Gitob Docs, but nothing on these terms. Diaspora * is a standalone social network server application and it is designed as a module in another application has not been done. Although this license allows, it will be very difficult to modify it to become a part of a larger application. However, it is possible to use the Federation Protocol that * applies the Diaspora * and integrates your application to the entire Diaspora * network, without using any of the original...

Finding which button is pressed inside a table using jQuery -

I want to know which buttons are pressed inside a form ... The only thing is that these buttons Within the table, I tried many solutions posted in similar questions but they are not working. I have something like this: & lt; Form & gt; & Lt; Table & gt; & Lt; Tr & gt; & Lt; Td> & Lt; Button value = ID> Dosomething & lt; / Button & gt; & Lt; TD & gt; & Lt; / Tr & gt; & Lt; / Table & gt; & Lt; / Form & gt; I used the code here:. But does not it seem to work any thoughts? use a method $ (this) .attr ('Id')) In your event handler: $ ('input [type = submit]'). Click (save function () {// form data as data. Data warning ('I' + $ (this) .attr ('id')); $ (this) .Parent () .data ('submitbutton ', $ (This));}); Note that you do not have data-submitbutton in your bedel , So the .data ('submitbutton') will not return anything. The fact t...

xcode - How to support orientation in iOS 5 and 6 without having to modify every single view controller file? -

इस सवाल का पहले से ही एक उत्तर है: 6 जवाब मेरा iPad ऐप सेट है दोनों परिदृश्य ओरिएंटेशन (बाएं और दाएं) का समर्थन करें जब मैं 6.0 या 6.1 सिम्युलेटर में चला जाता हूं तो यह अपेक्षित रूप से व्यवहार करता है। लेकिन 5.1 में, यह चित्र (ऊपर या नीचे, मैं नहीं बता सकता है) पर बंद है और सिम्युलेटर घुमाए जाने पर फिर से नहीं किया जाता है। संपादित करें: इसे इसके डुप्लिकेट के रूप में चिह्नित किया गया है प्रश्न: मैं पूछने के लिए प्रश्न बदल रहा हूं, यह फ़ंक्शन जोड़ने के बिना कैसे किया जा सकता है: - (BOOL) चाहिएअयुरोटोटेटटोइंटरफेक्शनओरियेशन: (यूआईएनपरफेसऑरिएन्टेशन) इंटरफ़ेसओरिएन्टेशन {// रिटर्न हाँ, समर्थित ओरिएंटेशन रिटर्न UIInterfaceOrientationIsLandscape (इंटरफ़ेस ऑरिएन्टेशन); } हर दृश्य नियंत्रक के लिए? आपको ओवरराइड करने की आवश्यकता है इस तरह की विधि नीचे आईओएस 5.1 और प्रारंभिक संस्करणों में आपकी आवश्यकता के अनुसार ओरिएंटेशन का समर्थन करने के लिए है ... - (BOOL) चाहिएअथोरोटेटटोइंटरफेसओरिएन्टेशन: (यूआईएनटरफेसऑरिएन्टेशन) इंटरफ़ेसओरिएन्टेशन {वापसी यूआईएनपरफेसओरेंटेशनआईएसएल...

asp.net - Response.Redirect Ampersand Encoding -

Failed to escape "& creates characters in HTML markup. This is often done inadvertently when in a document URL, and W3C is considered an error on this. I am thinking, the method of ASP.NET is its url parameter? By reading your MSDN details, I can not honestly tell. URL Pass it the same way as it should appear in the address bar in the web browser for example, if you are trying to redirect, then pass that exact string as a response. Redirect.

javascript - jQuery Validation conditional dependency: ensure text input matches value if radio button checked -

I have some form elements that adhere to this type of format: & Lt; Input type = "radio" name = "test" value = "a" & gt; & Lt; Input type = "text" size = "3" name = "weight A" id = "A" & gt; & Lt; Br> & Lt; Input type = "radio" name = "test" value = "b" & gt; & Lt; Input type = "text" size = "3" name = "weight-B" id = "b" & gt; & Lt; Br> I am using jQuery validation plugin to perform client-side validation. What I would like to do with these areas, to ensure that the text input corresponding to the selected radio button is equal to 100. I have implemented it successfully on server-side using PHP, but would like to add a JS method to give immediate feedback. Before I submit the form, I already have a jmt range: rule in numeric range [1-100] Within two text areas included to limit user input. ...

table - Joomla 2.5 component -

Is it possible to create 2.5 components without using the TableHelloWorld class and these field types Accessories like from here Or is it mandatory? The system will work without it is quite good By the way, you really need to actually walk something like your component, a controller.fp file, and the name of the footage mentioned in this section is a base file: that allows you to run and load Some will get and if you choose, you can only query raw SQL queries in the database. It is being said, to help you in the structure, not to obstruct you. I have cut many corners over the years, and almost always regret it later, feel free to play around with skipping the pieces, but just remember that there are pieces which are important things of all kinds You might think that you do not need it now. (Compulsive input, table row hierarchy, and check-in / check-out functionality are just some of the things I remember that I'm glad I did not have to make myself.)

If I have a generic GPRS device and a GPRS server setup, do I need to pay for any gsm/gprs data provider? -

कृपया मेरी अज्ञानता को माफ़ कर दीजिए। मेरा एक ग्राहक जीपीआरएस के साथ एक जीपीएस डिवाइस चाहता है क्षमताओं को हर कुछ समय के लिए एक जीपीआरएस सर्वर पर अद्यतन भेजते हैं जो उसके पास है। चूंकि यह मेरी समझ है कि जीपीआरएस जीएसएम का उपयोग करता है, क्या कोई डाटा सर्विस के लिए कोई सदस्यता आवश्यक नहीं होगी? फिर, कृपया मेरी अज्ञानता को माफ कर दो। हां, उसे नेटवर्क ऑपरेटर के लिए एक सदस्यता की आवश्यकता होगी, और प्रत्येक मॉडेम के लिए एक सिम कार्ड होगा। आप सही हैं, जीपीआरएस जीएसएम नेटवर्क के लिए एक डाटा संवर्धन है।

Find Distinct elements from a List C# -

I have a class named product Public category product {get public string name { Set; } Public int ProductId {get; Set; }} I have a list of products, along with name , but different ProductId . I want to get a different product from the list at product.Name I if list var fullproductList = {Name: Product, Product ID: 1}, {Name: Product, Product ID: 2}, {Name: Product, Product ID: 3}; I would like any of the above product. I want to get it without looping like this: list & gt; Products & gt; Specific Products = New List & lt; Products & gt; (); Var distictproductName = fullSubjectList.Select (x => x.Name). Undoubtedly (). ToList (); Foreign objects (different items distictproductName) {different products.ed (fullproduct list. Where (x => x.Name == item). First and default ()); } Any suggestions? using separate with lambda: Full Subject List. Distinction (x = & gt; x.Name). Ollist ();

asp.net - Web deployment task failed -

Image
मैं इस त्रुटि प्राप्त कर रहा हूँ जब मैं परिनियोजन पैकेज बनाएँ क्लिक करें मैंने इस मुद्दे के संबंध में संबंधित पोस्ट का एक गुच्छा पढ़ा है, लेकिन मेरे मन T_T पर प्रश्नों का उत्तर देने में नहीं लगता। यह मेरी वेब पर मेरा कनेक्शन स्ट्रिंग है। कॉन्फ़िफ़ & lt; ConnectionStrings & gt; & Lt; add name = "ApplicationServices" connectionString = "डेटा स्रोत =। \ SQLEXPRESS; एकीकृत सुरक्षा = एसएसपीआई; AttachDBFilename = | DataDirectory | aspnetdb.mdf; यूजर इंस्टेंस = सच" प्रदाता नाम = "System.Data.SqlClient" / & gt; & Lt; नाम जोड़ें = "प्रोजेक्टपेलेन्टीटीज़" कनेक्शन स्ट्रिंग = "मेटाडेटा = रिज: //*/Models.ProjectPal.csdl | res: //*/Models.ProjectPal.ssdl | res: //*/Models.ProjectPal.msl; प्रदाता = System.Data.SqlClient; प्रदाता कनेक्शन स्ट्रिंग = '; डेटा स्रोत =। \ SQLEXPRESS; attachdbfilename = | डेटाडायरेक्टरी | \ ProjectPAL.mdf; एकीकृत सुरक्षा = सच; यूज़र इंस्टेंस = ट्रू; एकाधिक एक्टिव्ससेट्स = ट्रू; ऐप = एंटिटीफ्रेमवर...

iphone - How to add calender to our project,when click on some purspose date like festivals we show image relative to that festival,purpose of that date? -

I am doing a project, in which I want to implement the calendar, when the holiday on special date (or) in the calendar (Or) festival when we click on that date, in the next view, we want to show the details of the date and the date as per the date of that date. See this sample link according to your requirement and calendar library.

html - How to achieve same line heights in firefox and chrome? -

When using the same font, Chrome and Firefox give them different line heights, and sometimes you need them Browsers should be the same. .. While facing this problem now, I have to give both the font size and the height of the line in pixels, but this does not seem to be the best solution. Can different units be used? How do I render fonts to Chrome and Firefox? You can set the height of the line as a pure number, which is the definition of the element The font will be taken as relative to the size, eg line-height: 1.2 . You can optionally use the em unit, e.g. Line-height: 1.2 AM , but then the internal elements are received (unless the height of their own line is determined) Calculation value, not the relative number. This thing is if nested elements have different font sizes, and usually relative line height should be used.

perl - Passing command line argument to an application -

मैं एक पर्ल स्क्रिप्ट से एक अनुप्रयोग निष्पादित करना चाहूंगा। पर्ल स्क्रिप्ट अनुप्रयोग को कॉल करता है एक पैरामीटर के रूप में एक चर, जिसके मूल्य में कई रिक्त स्थान के साथ एक लंबी स्ट्रिंग है। अनुप्रयोग इन्हें अलग स्ट्रिंग के रूप में व्याख्या करता है, लेकिन मैं इसे सभी एक स्ट्रिंग के रूप में चाहता हूं। पर्ल स्क्रिप्ट में यह कोड है: $ command = "हैलो दुनिया में मैं आ रहा हूँ। आशा है यह काम" जब पर्ल स्क्रिप्ट की कोशिश करता है आवेदन को कॉल करें । / A.out $ command और applicaion के भीतर मैं argv [1] , मुझे केवल स्ट्रिंग नमस्कार मिलता है। argv [2] में world होता है लेकिन मुझे argv [1] को $ command में समाहित पूरी स्ट्रिंग को शामिल करना है । मैं इसे कैसे कर सकता हूं? exec का एक बहु तर्क फ़ॉर्म का प्रयोग करें exec "./a.out", $ command इस तरह से शेल शामिल नहीं होता

asp.net mvc - C# MVC 4 Json request -

I am posting a JSON object to a controller action: $ Data: "Jason", Data: {Name: "John Doe", Phone: "2323454543", Skill: {code: ". Php ", design:" Photoshop "}}}); How do I map this data to a key-value pair object? In PHP, these are invisibly mapped to an associative array. I would like to be able to use properties like this: SomeDynamicType data = ... // To generate some JSN Data String Code here Skills = data.skills.code; // code skills = "php" I am not interested in model binding because these values ​​do not conform to any model - they are arbitrary. your own Jason in the Axax call: Data: {json: JSON.stringify ({name: "John doo", phone: "2323454543", Skill: {code: "php", Design: " Photoshop "}}}} and access your desired assets in your controller: [http post] Public JSRSalt action (string jsn) { Dynamic Data = NewtonSoft.Jason.Jason Convert.DearariLiz Obj...

haskell - Shortening/Making a function more concise -

फ्लशपॉइंट :: [कार्ड] - & gt; पूर्णांक फ्लश पॉइंट्स सीएस @ (सी 1: एचडी) = यदि फ्लश पॉइंट्सकेल True (सूटकाउंट एचडी) & gt; flushPointsCalc झूठी (suitCount सीएस) तो flushPointsCalc यह सच है (suitCount एचडी) और flushPointsCalc झूठी (suitCount सीएस) चलो कहते हैं कि अगर मैं एक समारोह है इस तरह के ऊपर एक के रूप में करते हैं, मैं कैसे चारों ओर छोटा जाने हैं यह? मैं एक जहां hdFlush = flushPointsCalc यह सच है (suitCount HD) करने का सोच रहा था, लेकिन है कि मैं के बाद से HD ऊपर घोषित किया जाता है नहीं कर सकते हैं। मुझे लगता है कि हास्सेल में ऐसा करने का एक उचित तरीका होगा, यह समझकर आलसी कैसे हो रहा है, लेकिन मुझे यकीन नहीं है कि मुझे कहां से देखना है। यह वही है जो मानक अधिकतम फ़ंक्शन करता है: यह बड़ा चुनता है मूल्य। flushPoints सीएस @ (C1: HD) = अधिकतम (flushPointsCalc यह सच है (suitCount HD)) (flushPointsCalc झूठी (suitCount सीएस)) तुम सिर्फ पता है कि कैसे flshPointsCalc यह सच है (suitCound HD) , तो आप उन्हें वास्तव में एक जहां खंड: फ्लश पॉइंट :: [कार्ड] ...

objective c - Terminating app due to uncaught exception 'NSRangeException'. [__NSArrayM objectAtIndex:]: index 33 beyond bounds [0 .. 32]' -

I have it I'm ImportViewControllerkm I remove names from the XML server and load. Total number of elements is 33. - (zero) viewDidoadload {[Super Viewedload]; Self.title = @ "Import"; NSLog (@ "user id =% @", current user id); // Some code to send HTTP request ............. NSString * str = [[NSString alloc] initWithData: urlData encoding: NSUTF8StringEncoding]; NSLog (@ "str response:% @", str); NSURL * fileURL = [[Ansuarel light] Intvithstring [unstar Stringbaadingperent Skepas Upyoging Encoding Anstif 8 string encoding]]; NSDTA * XMLData = [[NSMUtableDataAloc] Invite content of URL: file URL]; GDATXML Document * DOC = [[Gdataxml document ALOOC] DirectWhatAdata: XMLData option: 0 error: Nile]; NSArray * name = [doctor nodes forexpath: @ "// contact / contact / name / first name" error: zero]; (Element in GDataXMLElement * names) {// NSLog (@ "name:% @", element.stringValue); [Option addObject: element.stringValue]; } [Opt...

express - Customize validation message in node.js -

I am new to node. Js and I had a problem in the required verification message in the node. I use a simplified CRUD operation with the compound JS app in my app "field id" field "id" field only accepts the integer value then I use the following code in model / user.js I agree. module.exports = function (compound, user) {var num = / ^ \ s * \ d + \ s * $ /; User.validatesFormatOf ('id', {with: num, message: "no number is"}); }; This works fine using the code above. But I also want to see if the field is empty or not. Then I change the code a little bit. The modified code looks like this: module.exports = function (compound, user) {var num = / ^ \ s * \ d + \ s * $ /; User.validatesFormatOf ('id', {with: num, message: {empty: "can not be empty", with: "no number is"}}); }; The verification message will appear when the field is empty, because "id can not be empty" but when I enter values ​​in the id...

r - multiplication of mixed dataframe with vector -

R initials here: What will be a simple answer for more than a day, after searching, your first question on Decide to post here: I want to multiply (or divide) the numerical column in the dataframe with a numerical vector. The dataframe contains not only numbers, but also strings. In my search I have learned about t (mydf) * myvec , sweep () , scale () , * () to apply the replacement work, but I'm having trouble locating a smart function that allows me to allow you to specify that Detafrem is multiplied without any columns. How to multiply / retrieve each row and a dataframe in the previous two columns of test.dat with the result that contains no result column and gt; (Yes, for numerics I could only add 1 'to myvec). But how do I deal with names? Thanks in advance! Reasonable Example: mydf & lt; -as.data.frame (rbind (c ( "chrX", 5624624, 5631869, "Nudt11", 2, "+", 1, 7245, 1.332, 9 651.3), C ( "Kroaks", 5,977,262, 6,...

Using a temperature sensor with the Arduino GBoard -

We are using a temperature sensor with A7 to A7 from the Arduino board pin, in fact any one of them pin The problem is that I can not get the stable and accurate value in the serial window in the Arduino software code below I am using: int pin = 0; // analog pin int thromb = 0, tmf = 0; // temperature variable ant samples [8]; // variable to make a better precision int maxi = -100, mini = 100; // To start the maximum / minimum temperature int i; Zero setup () {serial.begin (9600); // start serial communication} zero loop () {for (i = 0; i & lt; = 7; i ++) {// sample samples of [i] = (5.0 * analog read (pin) ) * 100.0) / 1024.0; Tempc = tempc + samples [i]; Delay (1000); } Tempc = tempc / 8.0; // better precision tempf = (tempc * 9) / 5 + 32; // if converted to Fahrenheit (tempc> Maxi) {maxi = tempc; } // set maximum temperature (tempc "); Serial.print (maxi, dec); Serial. Print ("max,"); Serial.print (mini, dec); Serial. Printline ("minimum"); Tem...

javascript - How to detect rendered new lines in text node -

O people First of all, I need to know a text node that when / where a text will wrap in the second row. I think textNode, iterate over the letter by letter, create a new TextNode compound of all the letters till the current step, after that I calculate the height of the text node, if the height of the current step is past If one is different from the other, wrapped the row. The problem is that I have a hard time understanding the height of the existing text. This is what I have done so far: You can see that getTextNodeHeight height is wrong and I do not know what is wrong. I got this function. How do any of you solve this problem? Or is there a better way for this problem? Set a coordinate somewhere in the middle of your text. Call offset the relative left side of this position at a fixed time interval measured by SetTimeout. Start an event listener on page load, which considers the left offset negative (meaning it is now for the rights of this situation), the even...

php - Preg match does not find the correct string -

I have a problem where I have a script that should search the XML file to match the string. This is my script: & lt ;? Php $ file = "klein.xml"; $ Lines = file ($ file); Forex currency ($ lines $ line_name = & gt; $ as line) {echo htmlentities ($ line); Echo "& lt; br & gt;"; } If (preg_match ("/ message /", htmlentities ($ line), $ milli)) {echo "got!"; The echo found $ [0]; Resonant "examination"; } Else {echo "did not get it!"; }? & Gt; And this is the XML file that is working with: & Lt; / Message header & gt; & Lt; / Product-data & gt; The problem is that when I work the prepay match 'product' correctly, but when I try to pre-pay with any other string it does 'work' ? Im curious solution, thanks in advance! Can you check this code, I noticed that if you have if Loop out foreach ; Therefore only the last line is executed. & lt ;? Php $ fi...

java - Is it possible to convert hidden jpanel into image in swing? -

I want to convert Genpell to an image file which is not currently active (i.e., this is hidden in the japel). Please guide me how to do this? Is anyone possible? Thank you in advance .. You It is also possible to change its properties, more

Jasper Reports - How can sub categories OR groups can be generated in a report? -

तालिका : | डॉकिड | TITLE | MAIN_CATEGORY | SUB_CATEGORY | ------------------------------------------------ | 1 | DOC1 | एम 1 | एस 1 | | 2 | DOC2 | एम 1 | एस 2 | | 3 | DOC3 | एम 2 | एस 2 | | 4 | DOC4 | एम 2 | एस 1 | आवश्यक रिपोर्ट प्रारूप दस्तावेज़ रिपोर्ट श्रेणी - एम 1 | डॉकिड | TITLE | SUB_CATEGORY | -------------------------------- | 1 | DOC1 | एस 1 | | 2 | DOC2 | एस 2 | श्रेणी - एम 2 | डॉकिड | TITLE | SUB_CATEGORY | -------------------------------- | 3 | DOC3 | एस 2 | | 4 | DOC4 | एस 1 | प्रश्न आवश्यक उत्पादन प्राप्त करने के लिए मुझे कौन से तत्व का उपयोग करना चाहिए? और कैसे ? किसी भी ट्यूटोरियल? आप "रिपोर्ट समूह जोड़ें" जोड़कर इसे प्राप्त कर सकते हैं। इसे प्राप्त करने के लिए चरण: - 1: - एक नई रिपोर्ट बनाएं। 2: - क्वेरी जोड़ें SELECT * से तालिका ऑर्डर द्वारा MAIN_CATEGORY 3: iReport में "रिपोर्ट इंस्पेक्टर" पर जाएं और "रिपोर्ट समूह जोड़ें" जोड़ें a: - समूह नाम- श्रेणी की रिपोर्ट करें (यह कुछ भी हो ...

Get Magento Attribute Set id in import script -

I am trying to modify a Magenza OSComments import script to work with products with features and configurations. This is a challenge to say the least. But I am making progress, I am currently trying to add specialty set names in Magenta, and after that, I am writing in my TMP table Where I need the Magenta Attribute Set ID, for the specialty set I created. My problem is that I do not get that ID. My current code: $ sql = "select from ezmage_variant_sets *"; $ Result = $ readConnection-> Get all ($ sql); Foreign Currency ($ $ as the $ result result) {If ($ line ['variant_imported'] = 'Y') {$ this-> CreateAttributeSet ($ line ['osc_variants_title'], - 1); // update tmp table $ sql = "update ezmage_variant_sets set variant_imported = 'y', mage_variant_id =". $ Variant- & gt; GetId () "Where osc_variants_id =". $ Line ['osc_variants_id']; $ WriteConnection-> Query ($ SQL); }} The problem is $...

android - Amazon IAP - PurchaseObserver callbacks not called (except onSdkAvailable) -

I added my button to use the buttonclicker sample as the button framework above the Amazon Store. I am trying to make a list of inventory of storeforts and therefore purchased within the onItemDataResponse callback but it is never called with onGetUserIdResponse but SDK tester is logging successful item data response broadcasts and UserID Response Broadcasts and logging the content of Amazon.sdktester.json. Note that onSdk is available is being called .... Does anyone else have this experience? And if so, how did you get it? Any help or advice would be great thanks Chris I had the same problem you described. (I was not getting a callback from the purchasing manager) In my manifest form I: & Lt; / Intent-Filter & gt; & Lt; / Receiver & gt; Removing Android: exported = "wrong" attribute resolved the problem for me Originally I added Android: exported = "wrong" attribute because this removes the warning "The exported receive...

php - mysql keeps removing the zero's at start and/or end -

I have a simple form where the user enters a number (the price of the product) Ends with (1.50). But MESQL retains the vacuum at 1.5 to 1.5 instead of 1.5. I use the field type double in the table and the php code is a simple form with 1 text box that gives the number to DB. DCOders should post comments as comments. If you need a DCIML to represent the price, you'll be back zero. And you should always format the output.

Datatables and jQuery "on" method -

I am trying to create a dynamic table, which is clicked as a row, and more More information should be displayed. I'm doing this based on a few codes written a year ago, where I used the jQuery Live method. As of now, this method is no longer present and I am switching to the method. Now, the problem is, while this code actually triggers the creation of the datator, the click event will not bind the line when I click on it, nothing happens. This is a responsible JavaScript code: & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ( "# Overview") DataTable ({aoColumnDefs :. [{SWidth: "20px", aTargets: [0]}], bLengthChange: false, oLanguage: {sProcessing: " Bitte Warten ... ", sLengthMenu:" _MENU_ Einträge anzeigen ", sZeroRecords:" Keine Einträge vorhanden ", sInfo:". _START_ bis _END_ von _TOTAL_ Einträgen ", sInfoEmpty:" 0 bis 0 von 0 Eintrà ¤gen ", ...

php - Auto generate row with Twitter Bootstrap in Wordpress -

Good morning, I found myself in a dilemma! I am creating a WordPress theme using Twitter Bootstrap and I am generating members for Wordpress "Posts" via the "Meeting Team" page. I can fit 3 entries in just 1 row ... IE & lt; Div class = "row" & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; Div class = "span 4" & gt; & Lt; / Div & gt; & Lt; / Div & gt; But 3 entries per line will now break the line, so I need to create a new line for every 3 entries. How can I do this? Here is my PHP code to output entries. & lt ;? Php query_posts ('category_name = members & orderby = date'); ? & Gt; & Lt; Div class = "line-fluid" & gt; & Lt; Ul square = "thumbnail" & gt; & Lt ;? Php if (have_posts ()): while (is_pause ()): the_post (); ? ...

audio - JavaScript, playing sound effect in onmouseover event -

I think that's a common question, but whatever tutorial and post I've seen, I've helped me so far is. Whenever a cursor is on a menu image, I still want a sound to play that is also a link. There is already an instruction in the on-homeup event for the image, but I have read that there may be many instructions in this event. Here's the code (sorry it looks messy) & lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" & gt; Var sonido = document.getElementById ("neonclip"); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Audio id = "neonclip" & gt; & Lt; Source src = "http://www.eleyte.net/portafolio/neon.mp3" type = "audio / mp3" /> & Lt; / Audio & gt; & Lt; Div style = "text-align: center; margin-top: 130px;" & Gt; & Lt; A href = "pagelink" & gt; & Lt; Img onmouseover = ...

c# - How to Handle String Literals in Resource (.resx) Files -

All, I've been learning a lot about the recent use of localization and resource files (.resx). For any particular code, I have for each WinForm. (For another object wire [column name, etc.] and a .resx (and consolidated localized version DE-DE.resx etc.) for a user message are displayed in the message box etc.). I have no problem with object strings, but occasionally, but for the message I have the following problem ... Take a few "string" messages (23 hits in 3 files) of 'message' . To create such a message where the message is at the beginning of a tab-space, I string.format ("\ t search \" {0} \ "({1} {2} files Hit code) \ n ", strSearchString, NTotalHits, nNumberOfFiles); The problem is now, when I enter the string "\ t search \" {0} \ "({1} contains hits {2}) \ n" In the / code> resource file, I get the following output at runtime \ tSearch \ "some string \" (23 hits in 3 files) \ n It is...

Eclipse RCP - prevent moving views to another folder (or just prevent moving) -

In Eclipse IDE, we can see that some views can not go to another folder, e.g. If the "package" can not be moved to the editor tab, how can I stop the view in another folder? I tried to stop seeing everyone, but I need to be able to close tabs, so layout.setFixed (true); is not a solution I have multiple views in my folder, and folder = layout.tritter (FOLDER_ID, IPageLayout.TOP, ratios, editor area ); Folder.add placeholder (see. Id + ": visualslondary id *"); String ID = see. Id; String Secondary Id = Integer Tothar (see .getCurrentId ()); Folder.addView (id + ":" + secondary id); See IViewLayout = layout.getWalllayout (ID + ":" + secondary ID); View.setMoveable (wrong); Does anyone else have any ideas here? Try defining it in .xml plugin Runable - Optional attribute that specifies the weather, the view must be playable. If absent then it will be dynamic. Example: & lt; View category = "org.eclipsercp...

java - Can you extend a textview to change the color of the margin? -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब क्या विस्तार करने का एक तरीका है टेक्स्टवेव के पहले की तुलना में एक अलग रंग के बाईं ओर मार्जिन का रंग बदलने के लिए एक पाठ दृश्य? इस लिंक की जांच करें, यह आपकी मदद कर सकता है

CAN diagnostics -

I have to develop a smartphone application that will communicate with a car diagnostics tool. Typically, the protocol used in clinical KWP2000, UDS and OBD is my question "How to chat with the car and how to work with these protocols?" You can also see the UDS: If your car has a bus bus then you probably will need it: Use the Can device to connect to the cans bus (configured respectively) TP CAN message Write your implementation using the UDS protocol on TP CAN messages. Regards, / P> Dimitri

c# - SQLBulk Copy With Related Entities (Entity Framework) -

Say I have entities below (Simplified simpler for brevity, but with key properties included) public class offense {[key] public intrite crimeID {receive; Set;} Public Virtual Ilkonak & lt; Hunting & gt; Public Virtual Crime Disability Details {Received; Set}} public class beatim {{key} public entity id {set; Set;} public string bitum category {set; Set;}} Public Square Criminal Dupit {[Key] Public Entity ID {get; Set}} public string descriptionTech {{get; Set}}} I have more than 600,000 records that are included in SQL Server 2008 Express R2, which takes a lot of time using the unit framework 4.4. Ideally I want to use SQLBulkCopy to batch these records, but since it does not support complex types (not least the box), So I'm trying to find some other potential solutions. If needed, I want to change my model. EDIT: What is the help in this example? Can be used for SQLBulkCopy. (We did not actually coded those classes, they were generated using xsd usa...

c++ - map filled with junk records -

I am using the map like this: Maps & lt; Int, cUser * & gt; M_mUsers; (I = m_mUsers.begin (); i! = M_mUsers.end (); i ++) {if for ... {if ((* *) .second-> GetUserID () == pUser- & gt; GetUASID ()) (* i) .second-> OnDeviceLogout (pUser); } ... Add to map: m_mUsers [sd] = pUser; Delete from map: i = m_mUsers.find (sd); M_mUsers.erase (i); When I run it, mostly it works as I expected but very rarely, a junk record is left in the map, so when I expect to be a blank map , Then I go into the junk record, and I'm crashing at i-> second-> GetUserID (). What am i doing wrong You i! = Not checking for M_mUsers.end () . This is wrong unless it is guaranteed that sd exists in your case. i = m_mUsers.find (sd); // You should check before deletion (i! = M_mUsers.end ()) {m_mUsers.erase (i); } This code should work properly, however, I recommend that you enter std :: shared_ptr or std :: unique_ptr mapped_type of the map for...

actionscript 3 - loading texts from XML into flash AS3? -

I have this XML that shows some data from mysql database. I need to draw some of them from XML data (i.e. name, value, etc.) and show them in the flash application. Now, I can drag images into them in the flash but I have trouble displaying the texts from XML in Flash. This is the structure of my XML: & lt; Data & gt; & Lt; ID & gt; 127 & lt; / Id & gt; & Lt; Name & gt; Example 1 & lt; / Name & gt; & Lt; Price & gt; 12 !! & Lt; / Pricing & gt; & Lt; Image & gt; Inventory_images / 127.jpg & lt; / Image & gt; & Lt; Date & gt; March 08, 2013 & lt; / Date & gt; & Lt; / Data & gt; and this code (Flash AS3) will display the image of the product in the flash. stop (); Import Flash.Display.Loader; Import flash.events.Event; Import flash.net.URLRequest; Var xmlLoader: URL loader; Var xml: XML; Var xml list: XMLList; Var uRequest = new URLRequest ("PATH-TO-MY-XML-FILE"); X...

html - Selenium click doesn't work but mouse does -

Can anyone explain / what I want to click on for an item in Selenium IDE, click Do target work by using mouseover , mouseUp and mouseOut I use them over the top For example: click the waitForElement mouseDown mouseOver mouseDown MouseOut This is working on something else for me , When click I also have not found any errors and do not know what to do. Any help is appreciated. Update: I clicked the find button in the Selenium IDE and highlighted the element with all 6 of the above commands, But whenever I run any command or case, I never click it. There are all kinds of implementations to click, some use javascript that listen to the mouse down event, click some mouse or click on the click or mouse click or the radius and click Applicable in the form of an appropriate element and then the JS starts getting started and you expect the click action, There is no correct event for which you launch Test them all, or execute them all, I use the following command and...

haskell - Defining TH Lift instances for algebraic data types -

Suppose I have an algebraic data type with several constructors, such as data Animal a = mouse a | Beaver one | Rabbit How do I create a lift example effectively? The easiest way to do this would be example (lift A) => Lift (animal A) where lift (mouse x) = [| Mouse X |] Lift (Beaver X) = [| Beaver X |] Lift (Rabbit X) = [| Rabbit x |] However this is very redundant. Of course I can not remove different animals directly, such as lifts x = [| X |] , although it has been guessed what I want to achieve. Is there a way to do this in TH that I do not have to rewrite the same line for every data constructor? This is the purpose of the th-lift package, which actually provides this functionality:

math - rank correlation algorithm -

My friends have a ranking list again, I get some more lists of those friends, but different rankings do list the original rankings Is there an algorithm to check the closest list? Thanks For example, if we define dist (R1, R2) => The amount above all of (in position I-R in R1 In the case of R2), you can put the status of each i in the ranking first pos [Peter] = 3 This means Peter shows as the third friend in your ranking pos .

runtime - Alertdialog does not work, it make exception in Android -

I try to execute the following code but it is causing problems without code works fine without a dialog box Pop up and want to ask the user to enable its locked WiFi. Override Protected Zero OnCreate (bundled savedInstanceState) {// TODO auto-created method stub super.onCreate (savedInstanceState); SetContentView (R.layout.welcome); Thread Timer = New Thread () {Public Running Zero () {try {sleep (2000); } Grip (Interrupted e) e.printStackTrace (); } Finally {showAlert (); }}}; Timer.start (); }} Public Zero Show Alert () {AlertDialog.Builder Warning DialogBuilder = New AlertDialog.Builder (this); // Set Headline DialogBuilder.setTitle ("Your Title"); // Set dialog message alertDialogBuilder .setMessage ("yes click to exit!") .setCancelable (wrong) .setPositiveButton ("Yes", New DialogInterface.OnClickListener {Public Zero onClick (DialogInterface Dialog, Integer ID) { // If this button is clicked, close to / current activity, Welcome.this.finish ()...