Posts

Showing posts from April, 2015

.net - Deserialization of key value pair in XML to c# object -

I have XML as shown below. & lt; Device-array & gt; & Lt; Device & gt; & Lt; ID & gt; 8 & lt; / Id & gt; & Lt; Properties & gt; & Lt; PropKeyValuePair & gt; ... & lt; / PropKeyValuePair & gt; & Lt; PropKeyValuePair & gt; ... & lt; / PropKeyValuePair & gt; & Lt; / Properties & gt; & Lt; / Tools & gt; & Lt; Device & gt; ... & lt; / Tools & gt; & Lt; Device & gt; ... & lt; / Tools & gt; & Lt; / Device-array & gt; I plan to distribute it to the C # object so that it can be done faster. I just need an id area but I think there is an array required for class (properties) but how can I represent important value verb? [serialable] Public class SLV jioojone {[XML ("ID")] public string id {get; Set; } // Important value pairs entries here? } requires suggetions You can use LINQ in XML instead of Deserialization and just get what you need: ...

mysql - How to return the most recent record of a GROUP BY statement -

I have a table (call_history) that has several records against a single ID in another ID (call_detail) Trying to return which will give me a line for each ID, but the most recent entry For example, group all the rows against a single ID, but return only the most recent row to the updated_at field (which is a date field). My query so far ... select MAX (cd.id) id, cd.first_name, cd as .summary, cd.due_at, ch. Body, ch.updated_at cd.id = ch.ticket_id as CH, call_detail from call_detail as cd.status = 'Open' and (now () () ( ... what i want like returns, but this gives me the oldest entry for the update_t field. Update My table structure is as follows: Call_Detail id | Summary | Details | Due_at | First_name | Last_name 1 Call 1. Some text | 20/02/2014 17:00:00 | Joe Blogs 2 | Call 2 Some text | 18/02/2014 15:00:00 | Fred | Durst 3 | Call 3 Some text | 02/03/2014 01:00:00 | Joe Blogs call_history id | Ticket_id | Body | Updated_at | First_name | Last...

mysql - Deleting my data in my table but not in database -

I have a query I wanted to delete my data in my browser table, but I do not want to permanently delete it , I should just hide it. My problem is that I do not know what kind of inquiry I would need. Here is my delete query. My table feild id name and flag are I want to do this when the flag is 1, it shows the table and if it is 0, then it will be hidden when the delete button is pressed. function delete () {$ id = $ this- & gt; Input-> Find ('id'); $ SSQL = "Delete from table where id =?"; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id)); } You can simply update the flag, and in your selected query only select Flag = 1 Try it out, $ sSQL = "update tableclick set` flag '= 0 where id =?";; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id));

html - Stretch div to div which has fixed width -

Image
I have 2 divs inline, one of them has a fixed width. I want the div to fill in second place when the window is adjusted. To clarify the situation, take a look at the picture below: After the resize window, I need to get the next layout: How can you do this? You can take advantage of display: table-cell .

javascript - How to manage server user session within client side single page app -

I am roaming with different client side technologies, like AngularJS, EmberJS, even using JQuery directly In addition to how to use ReactJS, besides my goal client and java jersey 2 jacks-rs back and api, make a single page app using jsn. I have two stops now. I know some information..I am deploying my app as a war file in Jetty. The end of my back is Java based. I'm just using jquery in the client side as My main hurdle is how to handle logging and session management, with using a comfortable API and AJAX, I am working with the installation of a cookie. My concern is with just one page app, it's just an index page, and if the user closes the browser, it opens again on the pointer page, while the cookie / session is still good, the user is logged in Should see, not out (not logged in) page, how can I handle it, whether it is a jsp page, some templatelabour library etc index.html, etc. With JSP, I can include some written code (against my best decision). In the old days ...

c# - multiple attendance by face detection -

I have to add more than one presence to the database using face recognition. I tried a lot but was still not able to do this because my single presence is added to a single cell, but I have to add every presence to each cell. Can anyone help me by using the loop? {conn.open (); SqlCommand cmd = New SqlCommand ("InsertAttendance", conn); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add ("@AddressId", SqlDbType.BigInt). Valu = textAttendanceID.Text; Cmd.Parameters.Add ("Student Roll", SqlDbType.VarChar) .Value = textname.Text; Cmd.Parameters.Add ("Date", SqlDbType.DateTime). Value = DateTime Picture 1 value; Cmd.Parameters.Add ("Status", SqlDbType.VarChar) .Value = textStatus.Text; Cmd.ExecuteNonQuery (); Cmd.Dispose (); Conn.Close (); MessageBox.Show ("The presence was successfully inserted ..."); } You need to review. This article is shown in easy mode to pass data tables to SQL Server and ins...

Remove only one newline from the end of string in vb.net -

मेरे पास नीचे की तरह एक स्ट्रिंग है test1 test2 test3 newline newline newline यहां मैं पिछली न्यूलाइन को निकालने के लिए केवल s = s.TrimEnd (ControlChars.Cr, ControlChars.Lf) का उपयोग कर रहा हूं, लेकिन यह सभी तीनों न्यूलाइन को निकाल रहा है। मैं स्ट्रिंग से केवल एक ही अंतिम पंक्ति को निकालना चाहता हूं पहले से धन्यवाद ... आप इस तरह की कोशिश कर सकते हैं: यदि (s.EndsWith (Environment.NewLine)) {s = s.Remove (s.LastIndexOf (Environment.NewLine)) }

How to add checkbox only in a particular column in RadGridView in c# -

Image
I want to add the checkbox column as the second column of RadBridView. radGridView1.DataSource = Adapter.Show columnname (Master Tab 1. Header Grid.ContentV.Kel [0]. Value.tostring ()); RadGridView1.Columns.Add (New GridViewCheckBoxColumn ()); This code displays the checkbox before and after the data columns. You must use the insert method. The first parameter is the zero-based index of the column, and the other is the column. Example: radGridView1.DataSource = Adapter .showColumnNames (masterTab1.HeaderGrid.CurrentRow.Cells [0] .Value.ToString ()); RadGridView1.Column.Insert (1, New GridViewCheckBoxColumn ());

javascript - Knockout checkedValue binding not working when array is made up of objects -

With a page on my site, I'm having a strange problem. I send model data to the page on ASP.NET I am using MVC. I am showing a list of checkboxes based on the objects in a JavaScript array. When the page loads, it displays the item correctly, but does not select those people in the selected items. Looks like HTML here & lt ;! - - Aggram: Item - & gt; & Lt; P & gt; & Lt; Input type = "checkbox" data-bind = "check value: $ data, checked: $ root.selectedItems" /> & Lt; Span data-bind = "text: name" & gt; & Lt; / Span & gt; & Lt; / P & gt; & Lt ;! - / ko - & gt; Looks like javascript here var item = function (id, name) {this.Id = id; This.Name = name; }; Var model = {items = ko.observableArray ([]), selected items = co.obsbian array ([])}; @forcha (server in server server) {@: model.items.push (new item ('@ serverItem.Id', '@ serverItem.Name')); } @Worch (Selected Search...

javascript - Including node.js and karma for developing angular js app -

In Angular JS, when developing a sample app to learn angular, really need to install nodes. Js and karma is? What do they do Please help me on this No, until you node. Do not install JS and Karma are not mandatory to run the unit tests. You can import the angular.js file directly into your page and start coding. :)

php - Codeigniter form helper dropdown -

I want to add an ID and NAME to my drop down (so that I can get the value using jQuery. But it seems that CI will not allow. Is there any other way? $ device = array ('name' = & gt; 'device', 'id' = & gt; Device '); $ =' monitor '= & gt;' Chair ',' keyboard '= & gt;' keyboard ',' mouse '= & gt;' mouse ',' table '= & gt;' table ' 'UPS' => 'UPS',); Echo form_dropdown ($ device, $ device_opts); Try echo form_dropdown ("Device ", $ Device_opts," "," id = 'device' ");

java how can i loop the string until it reaches its length(strings) -

string = "hello"; Int length = 10; // Length is variable I do not know how this loop 10 times this string "Hello" shows the string index bound exception depending on your character Requried Output: Hellohelloh string result = ""; For (int i = 0; i

generate delay in stm32 use timer -

I'm trying to generate 1us delay using stm32, I know that I need a timer. I've got some code on the timer, but I do not know how to configure the setting to make it 1us because the setting depends on the epi 1 clock frequency or below is my code: Zero TIM5_Init_Query (zero) {TIM_TimeBaseInitTypeDef Tim5; TIM_DeInit (TIM5); RCC_APB1PeriphClockCmd (RCC_APB1Periph_TIM5, enabled); Tim5.TIM_Period = 1; Tim5.TIM_Prescaler = 80-1; Tim5.TIM_ClockDivision = 1; Tim5.TIM_CounterMode = TIM_CounterMode_Down; TIM_TimeBaseInit (TIM5, & amp; Tim5); } Zero us Dele (U32 NTEM) {u16 counter = ntem & amp; 0xffff; TIM_Cmd (TIM5, enabled); TIM_SetCounter (TIM5, counter); While (counter> 1) {counter = TIM_GetCounter (TIM5); } TIMCMD (TM5, Disable); } My question is, how to set TIM_precaler, TIM_Period, and Tim5. What is the relationship between the IMMLL link division, those values ​​and my delay? How to check the frequency of APB 1 clock in my code? You can get the APB clock...

MongoDB Padding Clarification -

Looking through the use of MongoDB, a question came up on the following question: "You After adding them, you can update the documents in a collection, however, these updates may not cause the document to rise. If the update operation causes the document to proceed from its original size If updated, the update operation will fail. " It seems reasonable, if not completely explained for reasons and it leads me to think, "If I do not want to grow the document, but possibly add more information (ie: pushing for $ array), So what would be wrong with pading the document in my required size? " Then my base will be fair (for me anyway), till it is correct till reading this piece. Warning Do not manually padded documents in a cached collection. Applying manual padding to the document in an overlapping collection can break the replica. In addition, padding is not preserved if you sync again the Mongodaby example. And then it raises my question, "Why...

jquery - How to develop stack overflow like notification system -

Image
There is a good notification system in the stack on the site when we post any question and paste on that page and medieval time In any of the answers or give a comment or edit my question or any other question, a notification message comes in which we click and load the data. Image 1) Thus can be developed by signal R 2) We can write the JQuery function which will run every section in the background and suppress the server to check whether any answer question Whether or not to check for any existing question change, or to check any comments or not, etc. If any activity is received then the page And the message request for requesting the user to load shown. But I do not know how the stack overflow has developed this notification system? Therefore, I am looking for the best guidance for developing such information system for any site. thanks edit public class ChatHub: Hub {Send Public Zero (String Name, String Message) {Client. all. Message (name, message); }} Code ...

Spring: @ModelAttribute VS @RequestBody -

Please correct me if I am wrong Data binding both can be used . The question is when the @Model Attribute is used? @RequestMapping (value = "/ owner / {OwnerId} / pet / {petId} / edit", method = RequestMethod.POST) Public String Process Submit (@ModelAttribute Pet pet) { } Additionally, when using @RequestBody? @RequestMapping (value = "/ user / saved contact", method = RequestMethod.POST public string save communication (@RequestBody contact contact) {} According to my understanding both do the same purpose. Thanks! Simple The way to my understanding, the @ Model Attribute will take a query string, so all the data is being passed through the URL via the URL. @ RequestBody , all data complete JSON Will be passed to the server through Odi.

ios - Textfieldshouldreturn auto scroll screen -

I use the code below It seems that I have 5 eTextFolds for some reason now when I click the next time If the scene was actually scrolled down, I could see the text file that I was writing data from the keyboard. I thought it was the default. I added a lot of code to the uiview and added the link button to another view. Either way my Uiviv has lost its "auto-scroll-after-the-next-the-pressed" mechanism in the middle of that process, I tried to remove my button and there was a problem in a few hours but the problem was not found. Not sure I should post the whole class. - (BOOL) textFieldShouldReturn: (UITextField *) textField; {[Textfield Resigns First Responder}; If (textField == self. Fastdown) {[self .secondOne be first responder]; } And if (textField == itself .secondOne) {[become self.thirdOne FirstResponder]; } And if (textField == itself. Third-on) {[self. Forthone First Responder]; } And if (textField == self.forethone) {[self.phththon first responder]; } no ...

android - Missing file in res>layout -

I'm currently using Eclipse to create Android apps, but according to the tutorial, the named main.xml is res & Gt; Layout to design my app; Although my layout is empty I posted about the same problem with additional information, but it was deleted . However, I've got a solution so that you can get the layout folder with empty activity. Instead of using the ADT package, download the Eclipse and SDK separately, follow the description but first. Click Download for other platform links. You will also need the location of your Java JR bin folder. I hope that helps, li

android - How to confine a ViewPager into a fragment rather than occupy the entire screen? -

The layout I'm working on is a classical two-pane master-detail layout. The menu in the left pane, pressing a menu item in the Dampen, shows the pieces being displayed. One of the menu items initiates the visual pager swiping structure. This ViewPager structure includes a ScreenSlideActivity and a ScreenSlidePageFragment classes. As the first class, standard, ViewPager object puts an indicator with the same type of methods like getItem and getFragment to the adiitter (screensailide pager adapters). Everything works fine, except that the ViewPager is on the whole screen, compared to the right panel. Q: How can I get a ViewPager to see itself in the right panel instead of capturing the entire screen? LinearLayout xmlns: android = "http://schemas.android.com/ apk / res / android" xmlns: tool = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = Android: layout_marginLeft = "16dp...

javascript - Adding to script bundle from partial view in .NET MVC 5 -

We are creating a Net MVC websolution using the provided widget as HTML.Partials () . We have been the main page view scripts would like to be able to partially view to linking their dependence tags, both CSS files as well as JavaScript files Part I tried with this code. But the JS-file is not provided in the layout section of my page. What is wrong? @ {var bundle = system. Web. Optimization. Bundleable.bundle.getRigestered bundle (). Where (b = & gt; b.path == "~ / bundle / jacquery") .First (); Bundle.Include ("~ / script / addtojquerybundletest.js"); } It appears to be specific for my jquery bundle , I've added a widgetspace bundle, where you can add scripts to render in the main layout. The bundle also manages to add the same file multiple times (which can happen if the same widget exists multiple times on the same page) and renderes it only once. My solution was added below, which was well documented with searches till now. In BundleCon...

javascript - pop up message while clicking the insert record button -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं यह करने के लिए काफी नया हूँ PHP और MYSQL दुनिया, तो अगर मैं गूंगा जा रहा हूँ तो अग्रिम में माफी और कृपया मेरे साथ सहन करें मेरे पास एक फॉर्म है, और डेटा को एसक्यूएल तालिका में जमा करने से पहले मैं एक पॉप अप संदेश देना चाहता हूं, "क्या आप डेटा को सम्मिलित करना चाहते हैं?" आप इसे PHP में नहीं कर सकते जावास्क्रिप्ट का प्रयोग करें: var insert = confirm ("क्या आप में डेटा डालेंगे ....?")

Unpack a ruby .gem without 'gem unpack' available? -

I have to compel the old Rubygum version at work I what .gem file without a gem unpack is a way to open upgrade. Thank you. Gems files are just uncompressed tar archives You can use them by using the tar command Can unpack: $ ls fruit -0.2.0 .Gem $ tar xf fruity-0.2.0.gem $ ls data. Tar .gz freight -0.2.0.gem metadata Gz file data.tar.gz is a gzip compressed tar archive containing gem files, you open it using tar Can: $ mkdir gem; CD gem $ tar xzf ../data.tar.gz $ ls fruity.gemspec Gemfile.lock LICENSE.txt README.rdoc version Gemfile lib Rakefile spec

objective c - FileTransfering in iOS with XMPPFramework and XMPPSiFileTransfer -

मैं आईओएस एक्सएमपीएफफ्रेमवर्क (एक्सएमपीपीएसआईफ़ाइल ट्रांस्फर) का उपयोग कर फ़ाइल ट्रांसफर कार्यक्षमता को लागू करने के साथ फंस गया हूं। मैंने अलग-अलग तरीकों से कोशिश की है और आखिरकार मैं एक फ़ाइल स्थानांतरण अनुरोध भेजा और प्राप्तकर्ता को अनुरोध मिला। लेकिन यहां तक ​​कि अगर वे कुछ भी स्वीकार नहीं करते हैं, तो ट्रांपरफ़ोर्ड होने लगता है। मैंने स्पार्क / विंडोज मशीन और iMessage / Mac में प्राप्तकर्ताओं को अनुरोध भेजा है XMPPSiFileTransfer वर्ग ही में, मैं इस प्रकार डेवलपर टिप्पणी पाया " यह दूसरी तरह के आसपास जब हम सर्जक हैं हम बुला initiateFileTransferTo द्वारा अनुरोध भेज दिया गया है:। WithData और उसके बाद की सी नाम स्थान के साथ बुद्धि परिणाम के लिए प्रतीक्षा, एक डिस्को भेजें # जानकारी प्रतिक्रिया, एक सॉक्स 5 सॉकेट खोलें और फिर दूसरी तरफ के लिए प्रतीक्षा करें, स्थानांतरण शुरू करें। " जब मैं विधि आरंभ कर फोन करके एक अनुरोध भेजता हूंफ़ाइल ट्रांसेफ़र करने के लिए, SiFileTranfer उत्पन्न करता है निम्न XML: & lt; बुद्धि प्रकार = "सेट" id = "8FF7E518-E518-4A9...

How do I make gdb frontends show the current instruction arrow in assembly source code window? -

I'm coding some x86 codecs on Linux (Arch 64), using nasm to collect and link To make ld, this is a 32-bit executable as follows: Password: PasswordContact.O LD-O password dictionary. O-melf_i386 wordcount.o: wordcount.asm nasm -f elf -g -F stabs wordcount.asm When I open the executable under GDB (version 7.7) the source symbols are loaded properly, and I have different frames I can set breakpoints through the source window in (I have tried Good under MACS (24.3.1), DDD (3.3.12) and KDBG (2.5.4), but when through code Go ahead, do not show the current line with an arrow or triangle symbol As it happens, through the C source code. I have seen the answers to similar questions, and I understand that through my disassembly window my current instruction I can get or get the main GDB window to isolate the next line, but I would really like to get the current line arrow signal or work in the source window, so that the code's mother During the single-phase Yam I should not wor...

c# 4.0 - Linq OrderBy but ignore first word if "the" -

I have the following Linux expression to place an order, but I was wondering how to change it so that it Name, but ignore the first word if it is "the" case studio. Orderbie (a => a.Name) simple way (if there is more than one position between always short-case and words): case studio Programmed. Orterby (A => A.Names Started ("The")? A .name.Substring (4): a.Name) You can make the method with good Check descriptive names and this argument as well as tap and compare here: Private string RemoveDefiniteArticle (string) {if (String.IsNullOrEmpty (s)); If (S. Start ("The", String Compression, Content Ignore Case) Returns. Asbestring (4). TrimStart (); Return s; } and use it CaseStudies.OrderBy (a => RemoveDefiniteArticle (a.Name))

Symfony CMF BlockBundle default admin can't change parent -

In the Symfony CMF, with the default admin sections for BlockBundle (1.0. *), I am unable to modify "parent", Filed in disabled parents (both adding and editing), but always show "/ cm / content". I just want to use admin classes and be able to set up a block parent (especially to set some container blocks with content). Why is this disabled? Do I need some common routes to make blocks work? If I tried to make my own administration class, then I'm not sure what to do because the administrator class "parent" adds the field in the same way. I suspect that you have a JavaScript problem with your installation. Installation ended successfully, and are you accessing the site via app_dev.fp or should you run all the composer commands listed in the setup? You must have a tree of documents along with paths in that area. Install Sandbox Demo:

java - Can Gson produce XML? -

Is it possible to use the library to produce XML? I know that XML is Gson. Is there a library that lets you go to the other side? My motivation is that I have a complex application that needs to be sorted for both JSON and XML and I ideally want to use a serialization library. I do not know whether the library can serial both on JSON and XML . But from the same model object, you can do this, eg As the XML -serializer and JSON -serializer and, if your application is quite complex for modular, then you should include the serialization layer.

visual studio 2012 - TFS 2010 - Annotate Class Files -

within a class / page for TFS 2010 anatet It can be shown how different pieces of code have been changed, as well as who changed them, date and change sets. So my question is, which is expected to be relatively straight forward, this is: Is it a date range, job item ID, or user filtering? Or will it require a separate report to provide this functionality? I am mainly interested in the ability to do this in Visual Studio 2012 and do not report so much because it will help in our release process in development. Annotate shows that each row of code is written (or last changed) Therefore limiting it to a date range will change the way the works work basically. VS / TFS does not provide any capability to customize how annotated works. You can always create your own Visual Studio Add-In that provides this functionality.

java - How to implement progress bar in javafx with time elapsed and estimated time remaining values? -

How to implement a progress bar in javafx with the remaining time remaining time in the bar? If possible, please provide any sample program. This is an example of how to use in the Oracle document:

java - How to limit generic class parameter to certain classes -

मेरे सामान्य वर्ग में मुझे टाइप पैरामीटर को Integer OR स्ट्रिंग क्या इसको हासिल करने के लिए कोई रास्ता है? प्रकार को सीमित करने के लिए मैं टी कुछ क्लास का उपयोग नहीं कर सकता , क्योंकि सामान्य पैरेंट केवल ऑब्जेक्ट है ... अपडेट सार्वजनिक सार वर्ग MyClass & lt; T & gt; {निजी टी मूल्य; सार्वजनिक टी getValue () {वापसी मूल्य; }} मुझे मान प्रकार को एक स्ट्रिंग या एक पूर्णांक होना चाहिए और I इसे प्राप्त करने के लिए एक ही विधि का उपयोग करने की आवश्यकता है ( getIntValue () + getStringValue () ) मदद नहीं लगता है ... अगर मैं आप था, तो मैं अधिभार दो विधियों: सार्वजनिक के साथ शून्य (पूर्णांक परम) {..} सार्वजनिक शून्य के साथ स्ट्रिंग (स्ट्रिंग परम) {..} ध्यान दें कि टी स्ट्रिंग को बढ़ाता है , क्योंकि दोनों स्ट्रिंग और पूर्णांक है अंतिम और subclassed नहीं किया जा सकता है ।

android - ListFragment doesn't refresh -

INTRODUCTION I have found an app in which an acitivity is where I am Make the element and then I save these elements on a ListFragment. All this works well, but the problem comes when I try to remove an element from the list. In short, the list paragraph does not refresh when I delete an element if I go back to main activity and then I re-enter the listframement, then the element I have removed Does not appear, but at this time I will remove an element to refresh this list. That is to say that I am a little confused because first, it was doing right, but I do not know what I touched, now it does not come. Code This is the relevant code snippet of ListFragment: Public Class Extends MyPlacesListFragment ListFragment {/ / ... Last Category PlacescursorAdapter ResourceCursorAdapter {// ... Expands Override Public Zero at @Create (Bundle Saved InstantState) {Super.New (Saved Instantstate); GetAdapter (); } Public Zero getAdapter () {cursor C = getActivity (). GetContentR...

sql - Sqlite database with single row -

I want to create a SQLite database table with one line and several columns. The entire line will be updated every time. I can create tables in sqlite but it is not working for the first time to update the entire line. The update entire line first works only after the INSERT command. Instead of making the INSERT command the first time, can it be prepared that it is possible to execute the UPDATE command as a host? I am taking the following steps: $ sqlite3 test.db sqlite & gt; Table company (ID primary primary key not blank, name text, age int); SQLite & gt; Update company set id = 1, name = 'test', age = 30; SQLite & gt; Choose from company *; SQLite & gt; Here the statement is returning nothing. Is there any restriction on SQL to start using the UPDATE command? You ignore how SQL works that you do not update anything and hope After that there is a magical presence of an appearance. You must first include one.

Graph Representation of data using PHP and JavaScript -

Hello there I need to represent the data in the graph form (chart form). I am using a jQuery plugin for this. The problem I have is that when I'm using a PHP array that does not work for me The code I'm using is here. & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; JSChart & lt; / Title & gt; & Lt; Script type = "text / javascript" src = "../../../ source / jscrt.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "graph" & gt; Loading graph ... & lt; / Div & gt; & Lt ;? Php $ phpArray = array ("Peter" =>, "35", "Ben" =>, "37", "joe" =>, "43"); $ Aa = json_encode ($ phpArray); ? & Gt; & Lt; Script type = "text / javascript" & gt; Var myData = & lt ;? Php echo $ aa; ? & Gt ;; Alert (MyData); Var color = ['# AFT202', ...

asp.net mvc - Thoughts on custom pager -

I get a list of items that I should be present on the page. I am getting the total amount of all the items and when I get the item, the result is based on how much I want and what page I want, so if I have a page size of 10 and I want page 3 I'll use GetItems 3, 10) To get the item 20-30 in the list. The results are presented in a simple table. Now I want to add a pager tool and this is where I was stuck. If they are doing one, then I think I could use onclick = "this.form.submit (); submit and get a new set of data but how can I submit a simple one-link form To do this, not just. Set;;} Public CustomPager Public Class CustomPager {int PAGECOUNT}: The way I expect it to work I have made this class so far (integer PAGECOUNT) {PAGECOUNT = PAGECOUNT;} public string CreateH TML () {string html markup = ""; string linkMarkup = "& lt; An id = \ "page \" name = \ "page \" onclick = \ "this.form .submit (); \" & gt; {0} ...

javascript - Invalid Date for a new Date("YYYY-MM-DDThh:mm:ss"); instanciation -

I am working with Titanium which is a framework for mobile development based on JavaScript. The 'YYYY-MM-DD HH: mm: ss' format (NightsArray [i] [3] returns a string representing the 'date and time' string in an array present in its cells. Is: 2014-02-20 23: 00:00) as shown later in the console. Several controllers have been shown for the date () object with this multiple parameters: var today = new date (); Var Birthday = New Date ("December 17, 1995 03:24:00"); Var Birthday = New Date ("1995-12-17T03: 24: 00"); Var Birthday = New Date (1995, 11, 17); Var Birthday = New Date (1995, 11, 17, 3, 24, 0); So, as you can see the closest constructor of the string of my array, it is 3th: var birthdays = new date ("1995- 12-17 tet. 3: 24: 00 "); In the following code I will try to format my string in the form "YYYY-MM-DDThh: mm: ss" with some strings and the resulting string (a concatenation) will be generated on the da...

javascript - Simple object "construction" (without prototypal inheritance) -

I wrote a function object only as a logic, and naturally I need an object that A specific object specification (what kind of properties it is, etc.). Rather than passing it as an object, instead of doing all the testing inside the function, I had to write the "constructor" function which you pass is a literal object, and that object specification will be applied All works, and provides the default value if necessary. This function will not be called from new because it has no prototype legacy required. The special property ( _isAPoint ) may be included in the return item to "prove" that the object was properly created (a replacement for instanceof ). I do not remember seeing this kind of approach before. At first glance, it is a clear way to create proper logic objects, while avoiding the entire system of prototype heritage. What do you think? Is this an identity pattern? Can you tell me about possible flaws and improvements? Simple example: var...

modify the local Appcache in the client side using javascript? -

Is it possible to modify the native app cache in the client side using javascript? Every time I need to update app cache to see the client or add a new item. For example, edit is my app cache file: cache MANIFEST # 2014-02-13 v13.0.0 CACHE: #html http: // cdnjs. Cloudflare.com /ajax/libs/jquery/2.1.0/jquery.js animation.js test.css The question is how to update the manifest and add a new line to it To add a new file to store without server side interference: CACHE MANIFEST # 2014-02-13 v13.0.0 CACHE: #HTML http: // Cdnjs.cloudflare Com / ajax / libs / jquery / 2.1.0 / jquery.js animation.js test.css http://download.support.xerox.com/pub/docs/FlowPort2/user Docs / any-os / en /fp_dc_setup_guide.pdf What do you want to do, The main warning is that every time you update your cache, it will change a whole lot rather than the new files you add. The code is very simple to force the browser to read the new Apkach file: function update cache () {var applek = window.ap...

Is it possible to run Python's scikit-learn algorithms over Hadoop? -

I know that it is possible to use Python language on Hadoop. But is it possible that ScienceKat If there is no answer, is there a machine learning librarian for Python and Hadoop? Thank you for your help. short answer: yes . Because you can run almost everything on Hadop. Long answer: It depends to answer this question: Do you divide your dataset into split Can you? In addition, you can find the presentation useful (starting with 'Hadoop 73' RD slide).

osx - How do I package a node web-kit app for publishing in mac app store? -

I have searched a little but can not find an existing device for it. How to follow the steps to distribute this app for the package node Web-Kit project and Mac App Store for Mac OSX. Thanks in advance. You should monitor the node-webkit generator for the vagina: $ npm install -g yo $ npm install -g generator- node-webkit $ yo node-webkit This allows you to test and test your app for Windows, Mac and Linux To give a folder with a tool. Enter your code in the app folder and turn on hours dist-mac , sign up for a developer account Apple And once you are done, grab your app from the dist folder and submit it to Apple. One submission process for iOS can be different, but you can find all the information on Mac Dev Center. Good luck!

ios - Getting error code 1084 -

The error code in my code is 1084, help me to do this work is my code Multitouch .inputmode = multitouch input mode. TOCH_POINT; MovieClip_1.addEventListener (TouchEvent.TOUCH_TAP, fl_TapHandler); Function fl_TapHandler (Event: TouchEvent): for zero ** {(var i: int = root.numChildren-1; i> = 0;)} ** {root.gotoAndPlay (10, "View2"); MovieClip_1.alpha * = 0.5; } Note: The part is bold, where I get the error code 1084 Some things you can remember here like { are crisp hugs left for the loop and you may have to delail - somewhere else at some place This will be an eternal time. function fl_TapHandler (Event: TouchEvent): zero {for (var i: int = root.numChildren-1; i> = 0; i -) {// {and i- - here / unavailable} root.goto and play (10, "view 2"); MovieClip_1.alpha * = 0.5; } not sure root.goto and play (10, "view 2"); and movieclip_1.alpha * = 0.5; Two lines related to Fl_TapHandler or global call.

parent child - Basics of Inheritance -

Consider a parent class with some variables a, b, c if I get a child's class from this basic class If I do, will the kid's classes A, B, C be detected? If yes, then the value of A, B and C will also be in this child category? OOP languages ​​have different levels of access, which determine the visibility of fields ("variables") from the outside. Most OOP-languages ​​inside the classroom have at least three of the following: private , protected and public . If your base is a class variable private , the derivative classes can not see them, if they are protected (but not non-derived classes) and if they are public Everyone can see them - both derivative and non-related classes. Of course, the methods in the base class can reach the private variable always in the base class - even if the newly added methods in the derived category can not see them. Here is an example in C ++ (there is a similar syntax in other OOP languages). class base {private: int ...

html - need to create popup looking with CSS properties -

I need to create a popup that looks with CSS properties for the div. I need to show in that popup "post-text" itemprop = "text"; Html & gt; & Lt; Top & gt; & Lt; Title & gt; LIGHTBOX EXAMPLE & lt; / Title & gt; & Lt; Style & gt; .black_overlay {display: none; Status: Completed; Top: 0%; Left: 0%; Width: 100%; Height: 100%; Background color: black; Z-index: 1001; -Moopness: 0.8; Opacity: .80; Filters: alpha (opacity = 80); }. White_content {display: none; Status: Completed; Top: 25%; Left: 25%; Width: 50%; Height: 50%; Padding: 16px; Limit: 16px solid orange; Background color: white; Z-index: 1002; Overflow: Auto; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; This main content is to display the lightbox & lt; A href = "javascript: void (0)" onclick = "document.getElementById ('light'). Style.display = 'block'; document.getElementBy...

ios - Cordova getDirectory returns errorcode -

I'm trying to access the file system in Cordova iOS app, but it always returns error code 3 (ABORT_ERR) When I use the getDirectory method. I am using the following code: window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, failed); Function file system civet (file system) {console.log (fileSystem.name); DataDir = fileSystem.root.getDirectory ("Ozzy", {made: true}, getDir, unsuccessful); } Getdir function (dir) {console.log ("successful link directory", dir); } Unsuccessful (error) {console.log ("error", error.code); } returns fileSystem.name ("continuous") to me, but this directory never gets, it always returns error.code = 3, which That is ABORT_ERR according to the PhoneGap documentation. Is anyone before this behavior? Your problem is that you try to create two directories, for example: directory1 / directory2 > In the iOS, you should make one first, and then another. In the iPad, the d...

jquery - Auto scroll text effect -

I was thinking that nobody knows what kind of 'hello treble' is used on the text? It seems that an auto scrollbox text is animated with a loop with jquery or something like that, but I'm not sure how to do this. If anyone has a solution, then it will be highly appreciated! Thank you! They have just used jquery.bxslider .js You can read its documents here:

linux device driver - how to use get_user to copy data from user space to kernel space -

I want to copy an integer variable from the user space to the kernel location. Can anyone give me a simple example of how to do this? I came to know that we can use get_user but I do not know how. check Pages > copy_to_user and copy_from_user pages Write a normal kernel module, read / write with operations, and register and four tools for them, something like / dev / sample . An application write / read , but fd opened by this application. Now you need to implement the mechanism to move this data to the kernel space and read what you have returned. - In the type you enter a copy_from_user whether this check buffer is valid or not. - In reading you do a copy_to_user . Make sure that the status of the error is taken care of, and open call implementation should be kept in mind that how many opens are there, if you want to have many open implementations, And when this count decreases, the N app calls a off to FD . Do you follow it?

c++ - which one is faster using erase or resize in a vector? -

निम्न कोड में जो एक अधिक कुशल कॉलिंग आकार बदलता है या मिटाना है? vector & lt; पूर्णांक & gt; एक (5000); // .... वेक्टर & lt; int & gt; :: इटरेटर यह = निकालें (a.begin (), a.end (), 8) a.resize (std :: दूरी (a.begin (), यह)); // या a.ase (यह, a.end ()); मुझे लगता है कि यह डुप्लिकेट तत्वों की संख्या पर निर्भर करता है? "मुझे लगता है कि यह डुप्लिकेट तत्वों की संख्या पर निर्भर करता है?" नहीं। int के लिए कोई डिस्ट्रक्टर नहीं है, इसलिए 1 डुप्लिकेट या 1000 कोई फर्क नहीं पड़ता। या तो सभी कार्यों को करने की ज़रूरत है इन-उपयोग तत्वों के नए सिरे के आंतरिक रिकॉर्ड को सेट किया गया है। नतीजतन, को हटायें () का प्रदर्शन महँगी बात है, resize / मिटाना नहीं है। (और यहां तक ​​कि अगर कोई नाशक था, तो वे समान संख्या में तत्वों को बुलाते हैं, इसे लगभग एक ही समय लेते हुए)। आप लगभग किसी भी अनुभवी मानक पुस्तकालय के कार्यान्वयन पर विश्वास नहीं कर सकते बेवकूफ कुछ और आवश्यक से अधिक समय तक लेते हैं, इसलिए अंतर्दृष्टि दी जाती है कि व्यवहार बराबर हैं - प्रति जे्रोक...

c# - How do i change a combobox arrow color, in windows 8 store app -

मेरे पास एक विंडोज स्टोर एप प्रोजेक्ट में यह कंबलबॉक्स है & lt; ComboBox Grid.Row = "2" एक्स: नाम = "ContactoSelect" चौड़ाई = "200" ऊंचाई = "50" मार्जिन = "114,10,27,510" SelectedIndex = "0" पृष्ठभूमि = "व्हाइट" SelectionChanged = "ContactoSelect_SelectionChanged" & gt; & Lt; x: स्ट्रिंग & gt; आइटम 1 & lt; / x: स्ट्रिंग & gt; & Lt; x: स्ट्रिंग & gt; आइटम 2 & lt; / x: स्ट्रिंग & gt; & Lt; x: स्ट्रिंग & gt; आइटम 3 & lt; / x: स्ट्रिंग & gt; & Lt; / ComboBox & gt; मैं तीर का रंग बदलना चाहता हूं, जो कि डिफ़ॉल्ट रूप से काला है मैं इसे कैसे कर सकता हूं? डिज़ाइन दृश्य से नियंत्रण पर राइट क्लिक करें संपादित करें विकल्प शैली & gt; एक कॉपी संपादित करें एक शैली (नाम अपने एक्स के अनुसार बदलता रहता: नाम) ComboBoxStyle1 रूप Page.Resources अंदर XAML में नियंत्रण के लिए बनाया जाएगा आप & lt मिलेगा; TextBlock x: नाम = "DropDow...

node.js - Disappearing value in Mongoose model custom function when testing with Jasmine-Node -

I am trying to test my custom method on my monogage model, but the values ​​I set in the test model I disappeared and the test failed. The test should look like this: get it ('friend id', function) (var conversations = new conversation ({'user': [new object id ('0'), New Object ID ('1')]}); Hopefully (Conversation.GetFreendandID ('0')) Excel (New Object ID ('1');}); My model's announcement includes: var mongoose = is required ('magos'); Var ObjectID = Mongoose Sema Type.object id; Var Conversation Schema = New Mongoose Sema ({'user': [{'type': object id, 'referee': 'user'}]}); Conversation style.education.filmid = function (user id) // return it [0] === New object ID (user-facing) //? this. Jores [1]: This Joes [0]; }; Module Exports = Mongoise.model ('Conversation', Conversation Schema); When I run the test, I get: expected [] similar {path: '1', example: ...

jquery - Ajax geolocation how to show error if person refuses to give location -

If someone accepts requests to show their location then it works but if I try and find out That the user did not find me anything if the person refused then I want to post, so I have a record. This is code, it does not show any error, if I refuse to give my position, I think the error: function () will work ?? function getCoordPosition () {if (navigator.clocation) {navigator.geolocation.getCurrentPosition (function () {$ .ajax ({type: "POST", url: "{{path ( 'Login_log_location')}}, data: {latitude: position.coords.latitude, longitude: position.coords.longitude}, success: work () {$ ("# divputinarea"). Html ('& lt; form method = Post action = "path ('login_log_yourerea')}} button> class =" btn btn-big btn-primary "> find your nearest match & lt; / button & gt; ');}, error: work Html ('error found');}}}}})}} description is false;} There is also a error function in which the Position...

bundling and minification - dart, reflection and source maps? -

I have a proxy object that can be used to relocate noSuchMethod to relocate invocations to other objects , But the proxy object is present in a minified / obscure environment, and the objects are included in the inconclusions in a non-minified / obfuscated state, so when the name of the method to be renamed goes to the non-minimal environment So the name does not match Class I is MyFile.dart.js.map file, what is a simple algorithm to parse it and get by using the name of the source map of the original charge back the name Minified? Or is there a library better than that already in dart? You can use the name of a symbol to get real. In the case of noSuchMethod : noSuchMethod (invite invocation) {string member = mirrors .getName (invocation.memberName); }

loops - Subset vector based on table of logical values R -

I am trying to reduce a vector based on several inputs. File.list file names will be a vector that I want to subscribe, and species will be the species names that I want to search within the files. file.list & lt; - c ("blah_cod", "blah_had", "blah_ggu", "blah_cod") species & lt; - c ("cod", "was") a & lt; ([,,,,,,,,,,,,,,,,,,,,,,, 1]] file.list [a [, 2]] with code I am currently able to achieve what I want, but I should be able to automate it, the number of columns will depend on the number of inputs of the species by the user. I tried this like this: (i (1: ncol (a))) {b & lt; -file.list [a [, i]]} I along these lines Have tried too many combinations, but either I only know Or any idea to get a piece of information errors.? grep in fact, rather than logical values ​​can be used for return mail: # [[]] [# 1] "blah_cod" "blah_cod" # # [[/> lapply (species , Grep,...

angularjs - Angular JS shows HTML within the tag -

मैं ng-bind-html-unsafe विशेषता का उपयोग करके टेम्पलेट के अंदर HTML सम्मिलित करने का प्रयास कर रहा हूं। लेकिन किसी कारण से यह काम नहीं कर रहा है। मेरा कोड: & lt; tr class = "सफेद दो-बटन" एनजी-दोहराने = "(कुंजी, मान) में सिफारिशें | ओजोएस्फ़ाइलफ़िल्टर: ओजोसकोर | प्रासंगिकतासॉइलफिल्टर: प्रासंगिकता स्कोर | आदेशबी: विधेय: रिवर्स "& gt; & LT; टीडी & gt; & Lt; div ng-bind-html-unsafe = "value.button" & gt; & lt; / div & gt; & Lt; / टीडी & gt; & Lt; / टीआर & gt; मैं HTML को देख नहीं पा रहा हूं अगर मैं ng-bind-html-unsafe = "value.button" से ng-bind-html-unsafe = "{{value.button}}" बदलता हूं, तब यह HTML को दिखाता है लेकिन विशेषता के भीतर, ऐसा कुछ: & lt; div ng-bind-html-unsafe = "& amp; एक वर्ग = & amp; quot; action_hrefs पूर्ण चौड़ाई bgcolor10 बैंगनी फ्लैट-बटन फ्लैट-सफेद बटन बीटीएन & amp; quot; डेटा-मूल्य = & amp; quot; 947 & amp; quot; href = ...

javascript - Checking dynamic Checkboxes on Change -

I have a dynamic table that can be filled with checkboxes that can not be checked or not. I've written a jquery script that changes the BG color of the table cell whenever any checkbox is modified; However, this is a very small cart and it does not always change BG color instantly. Any suggestions? checks var $ ('' [Id = = approvalcd] ') Change (function () {if ($ (this) .is (": checked")! = Check) {check = $ (this) .prop ("checked"); $ ('.provisionROW' + $ ( This) .prop ('id'). ('Approvalcd') [1]. CSS ('background color', color);} and {$ ('.provisionROW' $ (This) .prop ('id' ). Partition ('approvalcd') [1]) CSS ('background color', 'inherit');}}); HTML: & lt; Td class = 'approvalROW'. $ Counter. ' & Gt; & lt; Input ID = 'acceptance CD'. $ Counter. '' Name = 'Acceptance CD' $ Counter. '' Type = 'checkbo...

delphi - Why is the captured parameter reset in this anonymous method? -

The following article is based on this article: When the reward handler code is inside an anonymous process (when a line is changed in the grid) has been removed, the first 'if' report indicates that the DBGR is not zero, but the second report is zero. Any ideas about what's going on here? You can get the full source code from (You may have to change the filename property of TClientDataSet to point to that document where you unzipped the project.) Unit Head; Interface access to Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, Vcl.DBGrids, Datasnap.DBClient Does, Vcl.Grids; Type AfterScrollEventHandler = Reference Process (Sender: TDataSet); TForm3 = Class (TForm) DBGradrid: TDBGrid; CDDetset: TClientDataSet; DsDataSet: TDataSource; Process formulas (sender: toobject); Private {Private Announcement} public {public declaration} end; Modification process methodofoodetate (...

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

I can not find anything in the source about using coupons after subscribing to a user's plan. Is it possible to use a coupon to credit a user's membership after initial subscription? If not, what is the best option? Specifically, I want to give a user 100% coupon for that month, when they take 5 [site specific actions]. This is possible, but may not be the best idea. Coupons are currently applied to the stripe, then apply again at the customer level and each client can have a single coupon. So if you are already offering discounts to the coupon, then the customer who is currently in the present will also give up. It also means that if you are using a recently-added multiple subscription capacity, then all of the user's subscription will be ready for the month. Coupons can be set to "Once", only once (as the only name) can be used by any customer, so if this credit can earn more than once, You will have to maintain a 100% discount coupon continuousl...

subset - Boolean operators and which() function in R -

I have a data frame, and I want to subscribe by selecting all the rows that correspond to a condition on the factor Year : subset_df '1982')),] My problem is that Returns the whole dataframe, df from the above line. Forgive me if this is very basic or simple, but I do not know where the fault is. I suspect that || is something I do not understand, or my second theory is that arr.ind = T plays a role either, or The nature of () function is slightly more complex because I think it is. If someone has any insights, I would appreciate it very much. Thanks for your time. PS: Yes, it works as expected and gives the right subset; That is, there is no flaw in my dataframe: test_df & lt; - df [(which (df $ year As it is equivalent to 1982 Note that you can read from the helpfile (see ? "|" ): for |, & amp; And for a logical or raw vector xor ... and ... for ||, & amp; Amp; And ITRU, a length-a logical vector. So you have ...

Google Apps Engine Backend - Javax.persistence missing - Android Studio -

I am trying to migrate to Android studio and my app engine code uses the unit framework listed below. P> Import javax.preistence.Entity; Import javax.preistence.Id; @ Entity Public Class App Version {@Id Private String Application Name; Private IT mini version required; Public string getApplicationName () {return application name; } Public int milnavian necessity () {return minVersionRequired; } Public Zero SetApplicationName (String Application Name) {this.applicationName = applicationName; } Public Zero Setin version required (int minVersionRequired) {this.minVersionRequired = minVersionRequired; Do not work to create a backend in Android Studio (0.5.6), I can not import javax.preistence. * From this I came to know that I have a firmness. There is a need to create an Xml file (it was automatically created in Eclipse) I can not understand where the file structure should go in the structure. I think it should be in the Meta-INF folder, but I do not know how to grade it (or if i...

multithreading - Traverse a graph in parallel -

I'm amending a test (still) and I have a question (posted below), which I've stumped I think, in a nutshell, the question is asking "Think about any_old_process which does some work to cross a graph and find objects, which involves more work." My question is, what data structure can be parallel to achieve the goals set in question? The role of a garbage collector (GC) is to recover the unused memory. To trace collectors by crossing graphs of motivated motions inspired by aggregation relationships, all living things must be identified. In summary, there is a work schedule for working in GC; it repeatedly (A) receives a function (for example an object is inspected), (B) works (like mark the object Unless it is not already marked), and (C) generates further tasks (for example, the children of an unmarked work adds to the task list) it is desirable to parallel the operation. In a single-threaded environment, the task list is usually a single LIFO stack. What do y...