Posts

Showing posts from March, 2015

C++ memory layout of static vs function static vs member function static -

Considering 3 different stable arrays in the CPP file: Fixed four array 0 [ Is it clearly defined that 3 arrays will be compatible with one another relative memory, and in what order? (Or it depends on the compiler / platform) Array is always moderate in memory, but it Not defined where they will end up relative to each other.

jquery - How to get nth-child number of a element -

I do not need the .index () value. For example. When I have a list: & lt; Ul & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "alpha" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "alpha" & gt; & Lt; / li & gt; & Lt; Li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "alpha" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; li class = "beta" & gt; & Lt; / li & gt; & Lt; / Ul & gt; I need to get the order number of each class, and the index count is to ignore the second class in the list, so I need something that s...

javascript - Jquery Jqui Modal Window: opening same modal multiple times -

I am working on a JavaScript function which opens a jquery modal window and populates the model for an Ajax call. It makes me add the 'left' and 'right' divi id - clicking on one and changing the contents of the modal window (scrolling through the photo slideshow). Everything works great except for one task: if I switch the modal and then turn it off, because of opening this second time, the reason for these 'left / right' buttons to calculate each click twice (Once click on 'right', but move two images up). If I close the window and open it again, the count again increases by 1 (3 changes for 1 click) The only solution to decide is to reload the page when the modal window is closed - but is anyone aware of a better solution? Actually, I want to 'reset' the modal window, but I do not want to delete it - I want to be able to open / close the model several times and this right / left button works. function getNextImage (direction) {if ...

ios - How show the Path inside a UIImageView? -

I use this command to get an image path in the iOS library: UIImage * viewImage = your UIIMAGE // --- was created from my reference reference: ALAssetsLibrary * library = [[Elsace Library Alloc] init]; // Image to be saved in the camera roll [Library Written Images Photo Photo Album: [Visitor CGImage] Orientation: (Elastic Orientation) [Visual Image Orientation] Period: ^ (NS URL * Asset URL, NSER * Error) {if (error) {NSLog (@ "error"); } Other {nslog (@ "url% @", assetURL); }}]; I get this code in the subject: I get some exams and the console log gives me a mail message: url Property-Library: //asset/asset.JPG? Id = 408C8B00-23DC-4DCF-9837-C294720940F9 and ext = JPG Now I want to select it and put it inside a UIImageView, I try this: imageView.image = @ "Property-Library: //asset/asset.JPG? Id = 408C8B00-23DC-4DCF-9837-C294720940F9 & ext = JPG"; But does not work, can someone help me? you imageNamed: or imageWithCont...

php - adding two times(time() + seconds) -

I want to add X seconds to the present time So it should be Current_time () + $ x and dd-mm-YYYY hh: mm: ss is formatted as to ? Better (and less), my method (suggested by): $ currentDate = date ('DMYH: I:' ', (time ()); $ Transfered date = date ('D-M-YH: I: S', (time (+ 5922725)); My answer: You get the mktime () function and date () Function Example: $ currentTime = mktime (date ("H"), date ("I"), to get you this work to be colleague Date ("s"), date ("m"), date ("d") + 1, date ("y")); $ ShiftedTime = mktime (date ("h"), date ("i"), date ("s"), + 5922725, date ("m"), date ("d") + 1, date (" )); // Change with Note that the mktime () function returns the UNIX timestamp as a result, so you convert the actual timelines to the actual date Date: ("M"), Date ("I"), Date ("S"), Date...

multithreading - How to pass values and get response from a Runnable Thread in Android with exit function? -

I have implemented a login form in Android, it was advised that I get data from the webservice for logon authentication Runnable threads should be used, as suggested by using runnable threads for the Android network function. I did the same, but there is a function that would be asked to execute the thread, if the login has been certified, then I should give the value to the thread eg. 1 and on that basis I will perform some functions to perform the next task. I have seen many solutions like applying a class and passing parameters, but none of them work for my requirement. I am writing down the steps to understand my problem further. 1- I want to pass two parameters for runline thread login accent function. 2- I want to get the return value from the thread function, in my main thread. 3- After the end of my child's thread, I want to call some other function of my original thread (main thread), because I want to do the next thing in it, like opening the profile screen. I h...

actionscript 3 - AS3 - Finding an objects x and y position relative to the stage -

I am new to action script 3 and I have a character that you can control, the stage scroll right platform But he can fire the missiles. The problem I am facing is the missile created through these co-orders: bullet.x = hero.mc.x; bullet.y = hero.mc.y On the screen until it's okay, it has been properly scrolled. I agree because these tablets are not using Canvas X, Y and using phase X, Y, so I am thinking about how to know X and Y of your hero in relation to the canvas. Can be born! Thank you, and if you need more information then let me know, I'm new to all this. Thank you You can do this with you. Your solution would be: bulletPos = bullet.parent.localToGlobal (new point (bullet.x, bullet.y)); Be careful, however, because these are the last resort, generally, you will have all the elements using the same 'layer', so the comparison is easy and fast.

Open Android Native Player from Fragment -

I am trying to open in a video segment with an audio player, but send me this error No activity found to handle the intent Here is the code @ Override public view creatives (LayoutInflettter Inflator, View Group Container, Bundle Saved InstantState) {See Routview = Inflator. Float (R. Layout Color, Container, False); ImageButton MBTN = (ImageButton) Routview.FindvibIID (RID.btn1); mBtn.setOnClickListener (New View.OnClickListener) Click on {@Override Public Zero (see V) {Ury Video = Uri.pars ("android.resource: //" + getActivity (). getPackageName () + "/" + R.raw.video_1); intent = new intent (android.content.Intent.ACTION_VIEW, video); getActivity (). StartActivity;}}); Return root view; How it is used: Public class video player enhances activity activity {@ Override Creates Protected Zero (Bundle Saved InstantState) {super.onCreate (savedInstanceState); SetContentView (R.layout.activity_video_player); FrameLayout Container = Find (VRBID) VVBII...

jquery - submit to multiple urls -

I have an html form with 2 fields: name and email form values ​​of 2 different urls from submit submit button Must have to submit. I have tried using jquery, serialize and post, but I'm not clear how to accomplish this. I can not use PHP in this example & lt ;; Doctype & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script type = "text / javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "" method = "post" name = "myform" id = "myform" & gt; & Lt; Input type = "text" value = "name" /> & Lt; Input type = "email" value = "email" /> & Lt; Input type = "button" id = "submit" value = "submit" /> & Lt; / Form & gt; & Lt; Script type = "text /...

python - How can I set up Debian x86_64 so a Django project sees django.contrib.staticfiles? -

I have a new Debian VPS, and I'm trying to design a project that is django.contrib Not seeing staticfiles. *. There has not been such a change since doing a "PEP installed diego-static file". What is the best way to do such a good job that such Django projects will run? - Edit - I tried to uninstall Django and then install it from PIP and one virtualenen. As a result, another error has occurred, which failed to import execute_manager. The terminal output was: proceed (y / n)? Y has successfully canceled the Gunkorn Root @ PS306627: / Home / CGS / Progmatometer # Exit (pragmatometerenvironment) cjsh @ ps306627: ~ / pragmatometer $ pip Uninstaller Django Uninstalling Django: / home / cjsh / pragmatometerenvironment / bin / django-admin py / home / cjsh / pragmatometerenvironment / lib / python2.6 / site-package / Django-1.6.3-py2.6.egg-info /home/cjsh/pragmatometerenvironment/lib/python2.6/site-packages/django Forward Increase (y / n)? Y successfully uninstall ...

c++ - Append missing extension to result of QFileDialog -

By using QFileDialog , I prompt the user for a file name and add an extension I am missing. One suggestion was to add an extension manually after the fact that the problem with this approach is that the user can not be warned that they are overwriting the file (for example, test.txt exists, the user enters test and is not indicated that they are actually overwriting test.txt ) I have read all the documents on QFileDialog and I E has not been successful. I tried setDefaultSuffix , but the result of fileDialog.getSaveFileName () was not expanded. Can someone provide an example of how to do it successfully? Unfortunately, it seems that when you are using the "native" file dialog, this functionality Not available . However, it works as if you expect that you use the QT file dialog. Here's how you can use the QT file dialog: QFileDialog saveDialog; SaveDialog.setAcceptMode (QFileDialog :: AcceptSave); SaveDialog.setDefaultSuffix ("txt");...

C++ - Confusion over particular example of class instantiation from Professor -

मेरे प्रोफेसर ने निम्नलिखित कोड दिया था: Main.cpp #include "state.h" #include & lt; स्ट्रिंग & gt; # शामिल करें & lt; iostream & gt; नेमस्पेस एसटीडी का उपयोग करना; Int main (int argc, char const * argv []) {const int success = 0; स्ट्रिंग का नाम; राज्य एक्स; राज्य y = "s2"; // यह राज्य z = y को संकलित नहीं करता है; राज्य * पी = नया राज्य (z); X = * p; p- & gt; set_name ( "S3"); हटाएं पी; x.get_name (नाम); Std :: cout & lt; & lt; "राज्य का नाम x है" & lt; & lt; नाम & lt; & lt; std :: endl; Std :: cout & lt; & lt; "राज्यों की कुल संख्या है" & lt; & lt; राज्य :: कुल_संख्या_ओफ़_स्टेट () & lt; & lt; std :: endl; वापसी की सफलता; } राज्य.h #ifndef STATE_H #define STATE_H #include & lt; स्ट्रिंग & gt; नेमस्पेस एसटीडी का उपयोग करना; वर्ग राज्य {निजी: स्ट्रिंग * नाम; // स्ट्र सूचक सूचक प्रयोजनों के लिए प्रयोग किया जाता है स्थिर इंट नंबर_फ_स्टेट; सार्वजनिक: ...

c# - Entity Framework Self referencing 1 to 1 optional relationship -

So I have a table called contact and it can be of different types. And I want to have one-one, one-many or one-zero / one relationship in the table in itself. Is this possible? And if so, how? For example, a contact may have a husband or wife, which is just another contact in the database. The contact can also be a type of organization, in this case there may be many relationships from one contact with other contacts. This is what I am doing in the domain class. Public Relations (Public Relations) {Public Intinnate {Receive; Set;} ... public life spouses {receive; Set;} public virtual contact life partner {receives; Set;} public in OrgId {get; Set;} Public Virtual Contact Organization {get; Set;} Private Icicle & Lt; Contacts & gt; _individuals; Public virtual iconenging & lt; Contacts & gt; Set Individuals {{Returns _ Indies;} {_individuals = value; }} ...}} I need to know how to properly map in embedded editing () in context. Any help would be apprecia...

javascript - Adding an element to an object in a for loop -

I want to populate an object with long encoding of a string. Using the array would be simple, but I'm not sure what to do for an object. function addto (string) {var string = string.split ("") .sort (); Var cnt = 1; Var obj = {}; For (i = 0; i Now clearly I can not use a method here (push). But I can not set the object name to the string that I like: obj.string [i] = cnt; Hope that was what I initially had to do. Is there a proper way to do that my output will be given (for example): {"a": 1, "b": 2, "c": 3} For each letter in the string, you type obj For once the counter is a push in the right direction here. var obj = {}; (I = 0; i & lt; string.length; i ++) {// If the character has not been seen yet, set your counter of 0. [ORG [string] [I]] = OBJ [string [i]] || 0; // Count that character once obj [string [i]] ++; } Note that from this direction, you do not need to sort the array in advance. Here is ...

apache - Passing JSON error responses via HTTPD -

The team I work with is making an API interface for their application so that the data is exposed on that website Can be done, they are sending requests and responses in the JSON format but are currently binding on these issues. They requested that the required data is missing with the 422 error code. 422 Unrecognized Unit (WebADV; RFC 4918) - The request was made well but due to semantic errors, the compliance could not be done. The request is processed and the valid JSON response object is returned to the application server, but the HTTPD server is currently blocking the response and putting a generic error document for the 422 error Used to be. To see if there is any way: Disable error document interference and JSON response from application server transparently through Apache server Back Use the error document handler, but inject the response body in the return message - that is, error document $ 422 $ {RESPONSE_BODY} Any other suggestions would be welcom...

full text search - Sql Server ContainsTable return zero result when try to select top records -

We have implemented containsTable in SQL Server. The problem occurs when we run the query as the following: Select the DATAFILENAME from INNER TableName Insert (table name, BOOLEANTEXT, '("xxxx")) DATAFILENAME = KEY_TBL at KEY_TBL [KEY] and CASETYPE such as '% xxxx%' This will return approximately 1200 records. But I just want to select the top 1000, here is the query as the following Join TableName Inside CONTAINSTABLE (TableName, select DATAFILENAME from BOOLEANTEXT, DATAFILENAME = KEY_TBL at KEY_TBL as '("xxxx", * 1000 *)') [KEY] and Likes CASETYPE '% xxxx%' ** This query will return zero records. I've rebuilt the full text index, have changed the auto tracking but still still see zero results. If I am missing some point, please advise in advance You have two questions: Choose DATAFILENAME (key) and CASETYPE like '% xxxx%' and: Like [Key] and '% xxxx%' CASETYPE: Choose DATAFIL...

Can you help me with multiple errors in C? -

I'm quite new to C and I'm having difficulty in some different concepts, including pointers, arrays, and reading Files My program has started here, I am sure that these are some errors, can you show me what I am doing wrong? The program is supposed to read the letters from congress.txt and read them as capital letters without spaces, I also tried to do a little test which will print the letter for me so that I can see that the characters in the array store Are right. I have heard that I should not take the exam! = Eof before here, but my teacher has used it and I do not want to copy some things which I do not understand. This is Congress.txt: Congress will not make any law regarding the establishment of religion, or will restrict free exercise; Or suppress the speech, or freedom of the press; Or the right to collect people peacefully, and to petition the government for redressal of grievances. # include & lt; Stdio.h & gt; Int Processfile (Int * Store); Int c...

css - Jquery click event hides div -

I'm trying to refresh the date of a div and I'm not sure if clicking on refresh Why the divas disappear. How can I refresh the date when I click on the div? Jquery code var monthId = (new date) .getMonth (); Var dayNo = (new date) .getDate (); Var monthName = GetMonthFullName (Month ID); Var hours = new date (). GetHours (); Var min = new date (). GetMinutes (); Var seconds = new date (). GetSeconds (); Var order date = month name + "" + day + + "," + hours + ":" + minute + ":" + sec; Festival, "July", "June", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November December"] ; Return month [month number -1]} $ ('# time-time'). Text (order date); $ ('#Refresh Details'). Click (function () {$ ('# datetime'). Text (order date); $ ("# detailsRefres...

ios - UITableView with Custom Cell and Separator. Alpha value changes on scroll -

मेरे पास UITableView एक कस्टम सेल के साथ है। कुछ कस्टम कक्ष एक छवि के साथ लोड किए जा रहे हैं और मैं उन कोशिकाओं के लिए एक कस्टम विभाजक जोड़ रहा हूं जिनके पास छवि है स्क्रॉलिंग पर समस्या उत्पन्न होती है जब भी मैं स्क्रॉल करता हूँ, UIView अस्पष्टता परिवर्तन यहाँ मेरा कोड है: - (UITableViewCell *) तालिकादृश्य: (UITableView *) तालिका दृश्य सेलफ़ोरोअटइंडपैथ: (NSIndexPath *) अनुक्रमणिकापैथ {स्थिर NSString * CellIdentifier = @ "सेल "; कस्टमसेल * सेल = [टेबलव्यू डेक्यूवर पुन: प्रयोज्य सेल विथआईडेंटिफायर: सेलआईडेंटिफायर]; अगर (सेल == नीला) {NSArray * topLevelObjects = [[NSBundle मुख्य बंडल] loadNibNamed: @ "कस्टमसेल" स्वामी: स्वयं विकल्प: शून्य]; सेल = [शीर्षलेवल ऑब्जेक्ट ऑब्जेक्टऐट इंडेक्स: 0]; } यदि (सेल & amp; amp; (NSNull *) imageString! = [NSNull नल]) {UIView * separatorLineView; = [[UIView alloc] initWithFrame: CGRectMake (0, -1, 320, 5)]; विभाजक लाइनव्यू। बैकग्राउंड रंग = [UIColor blackColor]; विभाजक लाइनेव्यू.लिफा = 0.2; [Cell.contentView addSubv...

linux - Mysql Trigger - How to trigger on particular row only -

I have an imaginary table, the result is: Products | Price Applet 1 Orange 2 I'm trying to create a trigger that will be executed before the update, which will add only 2 for the price if the new value was for apple this trigger What do you look like Example execute someone fruit set value = 2 where product = 'apple'; The new value for apples will be 4. I tried to trigger down but surely 2 SEG set value = new.value + 2 ed Use some code like this in your trigger: if new.product = 'Apple 'Then set new.value = new.value + 2; end if;

caching - How banning in Varnish works? -

I do not understand how it works in varnish. Period of difference between purity and restriction and thinking seems to be that purifies the cache invalid and the next request goes back to the backend and is cached again Ban, banned a URL such that it invalidates the cache and not just the next, but all incoming requests go back to the backend. Please clarify. Additionally, each object in the cache always prohibits the algo indicates an entry on the restriction list, this is the entry that they last checked against it. Had done it. Whenever the varnish receives something from the cache, it checks that the object pointer in the ban list indicates at the top of the list. If it does not point to the top of the list, then it will check the object against all the new entries on the ban list, and if the object does not match them, then update the indicator of the restriction list. If anyone gets this ... it will be very helpful. Restrictions and purifying are both ways ...

github - Window:Reload not updating package -

I'm new to the Atom and am trying to fix a bug on one of the packages (terminals). After what I've read ... After changing the value, I need to run [window: reload] command and then run the package again. Then I should see my changes However, this is not working for me, as a simple test, I have changed this line of code: getTitle: - & gt; 'Terminal' to getTitle: - & gt; 'Show this title' Then I started the [window: reload] command and then with the [terminal] command. However, once the terminal is loaded, the title is still shown as 'Terminal'. Am I losing a step? Or did I tell their documentation wrong? If you are interested in any advice / tips eager as to why this is not working ~ / .atom / reload can also be run with ctrl + alt + r

How do I create a form with UI similar to the default windows 7 picture folder view in a C# winform application? -

Image
I am developing a Winform application where I need a form where the thumbnail of the images is given below I was able to develop the above requirement with the help of a picture box placed in UserControl and programmatically added to my form. Now, I need a feature where multiple images can be selected together and then deleted, unfortunately, I find it very difficult. Is there any easier way to resolve this or any readymade control? I was able to create this UI by using the available ImageListView control from the following article. ImageListView One to display a list of image files. NET 2.0 has control. This standard list looks and runs similar to view control. The image thumbnail is loaded asynchronous with a different background thread. The latest control source code is available on .

ios - Can There Be 2 Cell Identifiers In 1 Class? -

I'm just thinking that two different cell identifiers in a tableview controller class? E.g. This is my first cell identifier code ... Fixed NSString * CellIdentifier = @ "TableCell"; Tableclass * Cell = [Table View Due Rewase Eligible Cell Wuth Identifier: Cell Identifier for IndexPath: IndexPath]; I am trying to create another cell identifier , but whenever I call a code , I have a code Is duplicate, even when I change the name of the cell identifier. Any help would be great! Yes! You can create 2 cell identifiers in a class. But different custom cell xib and various identifiers. Fixed NSString * CellIdentifier1 = @ "CellID1"; Custom Cell 1 * Cell 1 = [Table Decuar Reuse Eligible Cell with Identifier: Cell Identifier 1 IndexPath: IndexPath]; Fixed NSString * cell identifier 2 = @ "cell ID2"; Custom Seale 2 * Cell 2 = [Table Decuar Reuse Eligible Cell with Identifier: Cell Identifier 2 IndexPath: IndexPath]; // When the cell is ...

user interface - Handle GUI window changes -

I am doing automation script for the installation wizard using AutoIt. I'm trying to handle the window in any way. Can anyone explain how this GUI works? When I click on the next button it looks like components is changing GUI. Is this the case? Or a new window has been created and old is destroyed? I've found that the process ID is the same for all windows. I'm sure there is no way to know which "state" is in GUI or in what phase? Anyway all windows have the same title. Thanks / Enders This will be the program on which you are automating Depends on its basis. The easiest way is to see what changes will happen in the GUI between the steps, if the potential candidate is giving instructions for that label, or a button on which the text is changing (like the button "ends ", You can finally find your address). Most installer programs are group windows for each step to control. These are generally implemented as communication resource...

angularjs - ng-view not getting updated when there is ng-grid inside it -

Please take a look at the following plunker This is a simple app with ng-grid. I need to navigate to the Edit page when the Edit button is clicked. What happens is that instead of going to the edited page column in the grid, get confused. Can anyone explain why this is happening and how can I improve it? There is a problem with the NG-Grid version you are using, I've changed it to the latest version and it worked. & lt; Script type = "text / javascript" src = "// cdnjs .cloudflare.com / ajax / libs / ng grid / 2.0.8 / ng-grid.debug.js" & gt; & Lt; / Script & gt; Example:

monitor webpage with applescript -

So I'm trying to see a webpage, and when an input form is displayed, I have to input my name . I do not repeat "Peter" right. Show the application "Google Chrome" textToType came with this, but clearly if Javascript is executed "document.getElementById ('Account_UserName') then execute Javascript" document.getElementById ('Account_UserName ') Concentrate ();. "Keystroke textToType keystroke return end-end repeat end states that the text after" I tested this page Is used for: ; doctype html & gt; & lt; html lang = "en" & gt; & gt; head & gt; & lt; meta pigment = "Utf-8"> my & lt; / title> gt; & lt; style & gt; body of the test page {margin: 10em; padding: 2em; boundary: solid .2em green ;} H1 {text-align: center;} & lt; / style & gt; & lt; / head & gt; & lt; body & gt; & lt; h1 & gt; test page & lt; / h1 & gt...

google maps api 3 - Calculate Distance Between Two Postcodes in php -

$ url = "http://maps.googleapis.com/maps/api/distancematrix/json?origins = 144216 और गंतव्य = 160017 और मोड = ड्राइविंग और भाषा = एन-एन & सेंसर = गलत "; $ डेटा = @ फ़ाइल_गेट_कंटेंट ($ url); $ परिणाम = json_decode ($ डेटा, सच); // print_r ($ परिणाम); // आउटपुट सरणी $ दूरी = सरणी (// इकाइयों "मीटर" = & gt; $ परिणाम ["पंक्तियाँ"] [0] ["तत्व"] [0] ["दूरी"] ["मूल्य"] कनवर्ट करता है, "किलोमीटर" = & gt; $ परिणाम ["पंक्तियाँ"] [0] ["तत्व"] [0] ["दूरी"] ["मूल्य"] / 1000, "गज" = & gt; $ परिणाम ["पंक्तियाँ"] [0] ["तत्व"] [0] ["मूल्य"] ["मूल्य"] * 1.0 9 36133, "मील" => $ परिणाम ["पंक्तियाँ"] [0] ["तत्व"] [0] [" दूरी "] [" मूल्य "] * 0.000621371); print_r ($ दूरी); यह इस आउटपुट को दिखा रहा है: अर्रे ([मीटर] => 54 9 7 9 9 [किलोमीटर] = & gt; 5497.949 [यार्ड]...

javascript - nested ng-repeat with outer ng-repeat item affecting the inner ng-repeat logic -

मेरा कोड & lt; div ng-repeat = 'n [] में [] | सीमा: (my_works.items.length / 3) + 1 '& gt; & lt; div class = "table-row" शैली = "स्थिति: पूर्ण; बाएं: 13px; {{row_gap_style (n)}}" वर्ग = 'एनजी-स्कोप' & gt; & Lt; div class = "book_container" एनजी-दोहराने = 'my_works.items.slice में आइटम ($ इंडेक्स * 3, (इंडेक्स * 3 + 3)) शैली = "स्थिति: पूर्ण; शीर्ष: 0px; {{col_gap_style ($ सूचकांक)}} "& gt; & Lt; div id = "" title = "{{item.Story.title}}" class = "cover_container लाया गया {{चेक_प्रकाशित (आइटम)}}" rel = "& lt;? Php echo $ rel;; & gt;" & gt ; मुझे क्या करना है यदि बाहरी कोड में n 0 है, तो div.book_container ऐसा दिखेगा इसके बजाय: & lt; div class = "book_container" एनजी-शो = "एन == 0" एनजी-दोहराने = 'my_works.items.slice में आइटम ($ इंडेक्स * 2, ( $ अनुक्रमणिका * 2 + 2)) 'शैली =' स्थिति: निरपेक्ष; शीर...

php - Display SUM of each Column , jqGRID -

I am using jqGrid and displaying my data in the grid. I have 5 columns. I want to calculate the SAM and at the end of the column, probably want to display the amount in the footer !! [In the image below, TOTAL is displayed for the amount only, I want to display it for all the columns at the end of the column You can get it, LoadComplete - function in the Total column in the footer of the grid , you should enable footer and you should use the loadComplete function as below, footroot : Correct, load full: function () {var sumOfPrice = jQuery ("# ​​gridId"). JqGrid ('getCol', 'zodiac', false, 'yoga'); JQuery ("#GridID") JqGrid ('Footwriting Data', 'Set', {Date: 'Total:', Amount: sumOfPrice}); } For more information regrading loadComplete function, take a look.

ClassLoader name for java.lang.String coming as null -

इस सवाल का पहले से ही एक उत्तर है: 3 जवाब कक्षा परीक्षण { } पब्लिक क्लास न्यूक्लास {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) क्लासनोटफ़ाउंड एक्सपेशेंस फेंकता है {टेस्ट टी = नया टेस्ट (); स्ट्रिंग s = नया स्ट्रिंग ("abc"); पूर्णांक I = नया पूर्णांक (1000); Println (Class.forName ( "टेस्ट") getClassLoader ()।); Println (t.getClass () getClassLoader ()।); Println (NewClass.class.getClassLoader ()); Println (java.lang.String.class.getClassLoader ()); Println (java.lang.Integer.class.getClassLoader ()); }} आउटपुट: sun.misc.Launcher$AppClassLoader@546b97fd सूरज। मिस। लोनरचर ऐप्पक्लास लॉडर @ 546b97fd sun.misc.Launcher $ AppClassLoader @ 546b97fd नल रिक्त उपरोक्त कोड में स्ट्रिंग और पूर्णांक के लिए वर्ग लोडर क्यों है? जावाडाक से क्लास लोड करने के लिए वर्ग लोडर देता है। कुछ क्रियान्वयन बूटस्ट्रैप वर्ग लोडर के प्रतिनिधित्व के लिए रिक्त का उपयोग कर सकते हैं। इस पद्धति को ऐसे कार्यान्वयन में शून्य मिलेगा यदि यह क्लास बूटस्ट्रैप वर्ग लोडर...

angularjs - ANGULAR JS - Share data between pages - undefined -

I am currently trying to create an analytics application using Javascript and Angular JS. Although I'm having some problems. I have only two simple pages and one controller in each I tried to share data between these pages using a simple service. The first page is a charge of repeating through this data to analyze many CSV files and to create JavaScript Objects and display charging and tables. However, when I am moving beyond the "Analogor" page "Displays" pages and JS files have been refreshed, everything is flushed, the ADN is the data I entered inside my service. I lose ... I already have to look like some storage modules, but the data objects I'm building are large (CSV files are about 100 000 lines each ...) Do you have any ideas? Maybe I'm not using the right angular JS philosophy? Do not hesitate to write the code written to me. Thank you very early, OL> Local Systems - File System API - I am using 1 with great su...

javascript - Upload image onto canvas -

I have a canvas on which I can currently add text layers and images to Flickr, which I try to do It makes it possible to upload an image to the canvas with HTML input. I'm using it to upload images from Flickr: $ ("search form.image-search"). Submit (function () {$ (".. Search"). Remove (); $ .getJSON ("http://api.flickr.com/services/feeds/photos_public.gne?tags=" + $ (" .search input [name = q] "). Val () +" and tagmode = any and format = Jason and JasonSolac =? ", Function (data) {$. Each (data.itm, function (i, item) {Var img = $ ("& lt; img / & gt;"). Attr ("src", item.media.m); img.attr ("title", item .title); $ ("& lt; Li & gt; & lt; / li & gt; "). Attachments (IMG) .appendTo (" search ul "); if (i == 8) return;});}); return false;}) ; $ (".img search"). Live ("click", function () {jCollage.addLayer ($ (this) .context) .setTi...

objective c - I am not able to insert data into my sqlite db.. I don't have any error showing up but the values are not inserting into the db -

यहाँ मेरा कोड है जो मैंने लिखा है .. NSArray * path = NSSearchPathForDirectoriesInDomains ( NSDocumentDirectory, NSUserDomainMask, हाँ); NSString * docpath = [पथ वस्तुऐटइंडएक्स: 0]; Dbpathstring = [डॉकपैथ स्ट्रिंगबैपैंसेटिंग पाथ कम्पेनेंट: @ "यूजरटेबल डीबीबी"]; चार * त्रुटि, * त्रुटि 1; NSFileManager * फाइलमैनेजर = [NSFileManager defaultManager]; अगर (! [फाइलमैनेर फ़ाइलएक्सिस्ट्स एटपैथ: डीबीपीथस्ट्रिंग]) {कॉन्स्ट चार * डीबीपीथ = [डीबीपीथस्ट्रिंग यूटीएफ 8 स्ट्रिंग]; अगर (sqlite3_open (dbpath, & amp; userdb1) == SQLITE_OK) {स्थिरांक चार * sql_stat = "तालिका का निर्माण नहीं मौजूद है, तो USERTABLE (CARDNUMBER पूर्णांक, शेष पूर्णांक, दिनांक टेक्स्ट)"; Sqlite3_exec (userdb1, sql_stat, NULL, NULL, और त्रुटि); sqlite3_close (userdb1); }} अगर (sqlite3_open ([UTF8String dbpathstring], & amp; userdb1) == SQLITE_OK) {NSString * insertstmnt = [NSString stringWithFormat: @ "में USERTABLE (CARDNUMBER, संतुलन, DATE) मान प्रविष्ट करें ((\"% d \ ", \ ...

javascript - How to exclude validation for blank space -

To validate a textbox, I have the following regular expressions in my code: Validate a certain format of expression text However, I need a case where the user leaves the text box blank, it is also valid. This form does not match when submitting the form with an empty text box. I want to remove this case. How do i do this ^ [A -Za-J 0-9 -] + (\\. [A-Za-z0-9-] +) * (\ [A-Za -Z] {2,}) $ You can hardly have your full match conditional. ... ^ ([A-Za-z0-9 -] + (\\. [A-Za-z0-9 -] +) * (\ \ [A-Za - {2}} {0,1} $ The entire expression (except ^) and $ (...) {0,1} in the beginning and end anchors, the bracketed expression directs the Regex engine to match 0 or 1 time. Match results 0 times in an empty string pass validation.

c++ - Storing unicode UTF-8 string in std::string -

में चर्चा के जवाब में मैं एक UTF-8 स्ट्रिंग को std :: string चर Visual Studio 2010 पर्यावरण असाइन करने का प्रयास कर रहा / रही हूं std :: string msg = "निमंत्रण"> हालांकि, जब मैं स्ट्रिंग दृश्य डीबगर को देखता हूं, I केवल देखो "?????" मेरे पास फाइल यूनिकोड (हस्ताक्षर के साथ यूटीएफ -8) के रूप में सहेजी गई है और मैं वर्ण सेट "यूनिकोड वर्ण सेट का उपयोग कर रहा हूँ" "" "एक नेपाली भाषा है और इसमें 5 अक्षर हैं और इसमें 15 बाइट्स होंगे। लेकिन दृश्य स्टूडियो डिबगर msg का आकार 5 के रूप में दिखाता है मेरा प्रश्न यह है: मैं इसे उपयोग करने के लिए बस यूटीएफ -8 को स्टोर करने के लिए std :: string का उपयोग कैसे करूं यदि आप सी +11 11 का प्रयोग कर रहे थे तो यह आसान होगा: std :: string msg = u8 "मूवमेंट्स"; लेकिन जब से आप नहीं हैं, तो आप एस्केप अनुक्रम का उपयोग कर सकते हैं और आपके लिए एन्कोडिंग प्रबंधित करने के लिए स्रोत फ़ाइल के वर्णसेट पर भरोसा नहीं कर सकते, इस तरह आपका कोड अधिक पोर्टेबल है (अगर आप गलती से...

shell - Can't grep file correctly -

मेरे पास बहुत सरल सिंटैक्स वाला फ़ाइल है: cat / tmp / test ARCH = "" प्रेटकैंक-बी | Awk '/ ^ नाम: / {प्रिंट $ 2}' मैंने इसे grep करने का प्रयास किया: cat / tmp / test | Grep "prtconf -b | awk '/ ^ नाम: / {प्रिंट $ 2" ARCH = "" prtconf -b | Awk '/ ^ नाम: / {प्रिंट $ 2}' चलिए थोड़ी देर के लिए grep स्ट्रिंग बनाते हैं, अंत में जोड़ें}: cat / tmp / परीक्षण | Grep "prtconf -b | awk" / ^ नाम: / {प्रिंट $ 2 "} कुछ भी नहीं मिला जब मैं लाइन grep के अंत में जोड़ता हूं ओएस सोलारिस 10 यू 11 $ 2 कमांड-लाइन पैरामीटर को संदर्भित करता है, इसलिए यहां यह खाली अक्षर को एक पट्टी में स्थानांतरित करेगा तो आपको $ स्लैश से \ $ cat / tmp / test से बचने की आवश्यकता है I Grep "prtconf -b | awk" / ^ नाम: / {print \ $ 2} " को जोड़ने के बिना } आपकी पट्टी में यह काम कर रहा था क्योंकि यह मिलान था वास्तविक कोड के रूप में prtconf -b | awk '/ ^ नाम: / {प्रिंट अपने इनपुट के लिए लेकिन अगर आप अ...

c - Binary to Float -

I wanted to produce float variables from their binary representation, and I quickly came up with the following code: P> float bintoflot (unsigned int x) {float * f = (float *) & amp; X; Return * f; } The above function can be said as follows: float f = bintofloat (0x3f800000); I was hoping to get some feedback on this approach: is it the best way to use pointers, or what better or more concise method? Unfortunately, due to the use of my type, there was an inferiority; I apologize for it; For simplicity I chose to be with the underlying types but I know that it is naive, and believes that sizeof (int) == size (float) . Again, my primary question is that the use of indicators is a good way to obtain this translation from binary to a floating point? In your code, bentoflote () in the function castings and dereferencing Invalid: float * f = (float *) & amp; X; Return * f; This will call undefined behavior at runtime Do not convert the pointer...

unit testing - Http.Context with FakeApplication and illusive mock method -

In my tests, I am creating a fake application for the exam method: @ProfileZero before StartFakeApplication () {this.fakeApplication = FakeApplication (); Start (this.fakeApplication); } Application for killing public zeroes after @ {stop (this.fakeApplication); This.fakeApplication = null; } Uses some test functionality that checks whether the request is secure or not: is a public boolean () {Http.Request req = Controller. Request (); Return req.getHeader ("X-Forward-Prototo")! = Null & amp; Amp; . Req.getHeader ("X-Forward-Enhanced") includes ("https"); } fails to say: There is no HTTP reference available from here Very strange, because it's running on a fake app, why not discover it and make a fake request? oh okay, i found this: who introduced me with a funny perspective, so i was eager to go to the same way to code hp.content , problem Is that I can not find the mock method ... The thread in which it is using static...

objective c - Shinobi Charts iOS - Rotate Pie Chart by code -

शुभ दिन साथी स्टैकेववरफ्लोवायर। मैं चार्ट चार्ट के बाहर पाय चार्ट और ड्राइंग लेबल प्रदर्शित कर रहा हूं । कभी-कभी मुझे अजीब डेटा प्रदर्शित करना चाहिए, एक बिंदु को चार्ट का 90% तक ले जाता है, ताकि शेष को चार्ट के शेष 10% में "मैश अप" करना चाहिए। सब कुछ ठीक है, लेकिन लेबल्स (टुकड़ा नाम) भी "मैशिंग अप" हैं इसलिए मैंने उस तंत्र को कार्यान्वित किया है, जो उन लेबलों को "बाहर" करता है, जो एक-दूसरे के साथ टकराए नहीं। अब मेरे चार्ट के ऊपर एक "शब्द क्लाउड" है, क्योंकि सबसे बड़ी स्लाइस हमेशा नीचे का सामना करना पड़ रहा है, अन्य सभी स्लाइसें ऊपर का सामना करते हुए छोड़ देते हैं। यह मेरी समस्या है: मैं चार्ट को घुमाने चाहता हूं ताकि सबसे बड़ा मूल्य डेटा बिंदु बाईं ओर का सामना करना पड़ेगा (मुझे लेबल के लिए चार्ट के दाईं ओर छोड़कर)। तो मेरा सवाल है: मैं कैसे पाई को घुमा सकता हूं कोड के द्वारा अपने केंद्र के चारों ओर चार्ट? और संपूर्ण चार्ट दृश्य को घूर्णन करना एक विकल्प नहीं है क्योंकि लेबल क्षैतिज रहना चाहिए। इसलिए मैंने स्वयं का समाधान पाया: आप ...

elastic map reduce - bulk indexing in elasticsearch issue -

I'm trying to index a file using code below: but I'm thinking Why is this not happening: Does any body explain the reason for indexing? Public static zero main (string [] args throws IOException {string line; List L = New Arrestist (); FileReader file = new FileReader ("test.txt"); BufferedReader br = new BufferedReader (file); While ((line = br.readline ()) = null {l.add (line);} br.close (); println (l); client client = new transportclient (). AddTransportAddress (New InetSocketTransportAddress ("10.210. BulkRequestbuilder bulkRequest = client.prepareBulk (); // Create either client use #, or use requests directly to create index / delete requests Iterator = l.iterator (); while (( It hasNext ()) {string name = (string) it.next (); bulkRequest.add (client.prepareIndex ("cricket", "crick", "1") .setSource (jsonbuilder () .startObject () .field ("User", name) .field ("POS Date "(" Message ",...

How can I copy effective codes frm bootstrap css -

I have used Bootstrap 3 in my design Bootstrap CSS file contains many codes I do not use all. Now, I only want to put code related to those classes that I have used. How can I do this? You can customize your bootstrap file and only you can select the necessary componets:

.net - The type or namespace name could not be found, Beginner in C# -

Hello, I'm the first in C # and I'm trying an online example to use the Kinect for Windows device. I think the problem is in my context but I do not know what to do I think that. There is something like the Net framework, as the example seems to be based on old versions of the framework PS: I have given reference to "Direct Regions" Connection DLL and project references : Microsoft. Sisaarpi Microsoft.Kinect system System.ComponentModel.Composition System.ComponentModel.DataAnnotations System.Core System.Data System.Data.DataSetExtensions System.Deployment System.Drawing System.Runtime.DurableInstancing System.Runtime.Remoting System.Runtime.Serialization System.Windows . Error 1: form system. Type or namespace name 'runtime' line 20 could not be found e rror 2: type or name space name 'ImageFrameReadyEventArgs' could not be found 43 Error 2: type Or name name 'PlanarImage' could not be found on line 50 Here is the code...

reporting services - 64 bit version of SQL Server Report Builder -

Is the SQL Server Report Builder avaialble in 64 bit version? I downloaded and installed the SQL Server 2012 report builder (version 3) from the following URL, This Report Builder is 32bit executable. Is there a 64 bit version available? thanks light Report Builder 3 comes in 32 bit only

asp.net - how to search for a node in a xml file to see it exist -

I'm trying to get an XML file. Fields are always the same but occasionally are not included in it. How do I find "name" in vb? & lt; Products & gt; & Lt; Name & gt; & Lt; FirstName & gt; John & lt; / FirstName & gt; & Lt; Last name & gt; Do & lt; / LastName & gt; & Lt; / Name & gt; & Lt; Age & gt; 24 & lt; / Age & gt; & Lt; Date of birth & gt; 4/5/1990 & lt; / DOB & gt; & Lt; / Products & gt; I tried the code below and found a compilation, error BC30456: 'This includes' System.XML.Linq.XElement is not a member of If the doctor ("product") as an XDocument in the form of a slow doctor. This includes ("name") then the doctor root.Element ("product") element ("name"). Remove () End if The method of testing is available only to access it And then check that it is not nothing , like this: If the doctor Element (...

How can a PHP programmer identify orphaned PHP files or images for sure? -

If C / C ++ programmers want to organize a large C or C ++ project, then it may remove some code files (* * * *] .c, * .h, * .ccp, ...) thinks that it is likely to be orphaned. When it starts the compiler, and it runs without errors, then it was right. When the compiler throws errors, because the extracted files are required, the programmer has to ensure that a special code file is actually necessary for a large project. We have a large web project here, which was written in PHP that contains many PHP files and image files. The problem is that there is no compiler for large PHP based web projects. One person reads the article here 10 or 15 years ago. In this article, a solution to get the same result of the C / C ++ projector for a PHP project as a C / C ++ programmer reveals that it will use its compiler. He only remembered the fact that this solution exists, but he lost that article and he forgot the solution in detail. Does anyone know if such solutions exist? If so, what...

ios - add timestamp attribute to ingredients of iphonecoredatarecipes sample code -

I'm really sorry for such a simple question, but I tried several ways and could not find the solution . I just want to add a timestamp attribute to the content component. Whenever I change the recipes Xcdatamodel I get: Error NSError Domain: @ "NSCocoaErrorDomain" - Code: 134100 0x000000010c162890 I already tried the model version and : Option: @ {NSMigratePersistentStoresAutomaticallyOption: @ YES, NSInferMappingModelAutomaticallyOption: @YES} Code is provided by Apple as! Select your .xcdatamodeld file in Project Navigator. Under the menu option "Editor", select "Add Model Version". A new copy of your data model file will be created. In this new copy, let's call it 2 versions for simplicity, you need to add a feature to store time. In version 2 of the file .xcdatamodeld (and I note here - be careful to select new file and not old files) Add a attribute, type it "timestamp", "date" , And Save. ...

c# - Format and rewrite xml file -

मेरे पास यह XML फ़ाइल है। & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & Gt; & lt; test1 name = "all" & gt; & Lt; अनुभाग नाम = "हैडर" & gt; धारक नाम = "शीर्ष" & gt; शीर्ष & lt; / धारक & gt; & lt; धारक का नाम = "बैनर" & gt; बैनर & lt; / धारक & gt; & lt; / अनुभाग & gt; & Lt; / test1 & gt; मैं इस फ़ाइल को इस तरह से प्रबंधित करें (कम से कम लाइन ब्रेक) में प्रारूपित करना चाहता हूं: & lt;? xml संस्करण = "1.0" एन्कोडिंग = "utf-8" & gt; & lt; test1 name = "all" & gt; & lt; अनुभाग का नाम = "हैडर" & gt; & Lt; धारक का नाम = "शीर्ष" & gt; शीर्ष & lt; / धारक & gt; & Lt; धारक का नाम = "बैनर" & gt; बैनर & lt; / धारक & gt; & Lt; / अनुभाग & gt; & Lt; / test1 & gt; सी # XDocument xmlDoc = XDocument.Load ("file.xml...

php - Using DOMDocument, is it possible to get all elements that exists within a certain DOM? -

Assume that I have an HTML file with many different elements, suppose I do not already know that it What the HTML looks like Using PHP's DOMDocument, how can I recycle and modify the all elements? I see that the elementbet tagname gets and the elementbid is found. I want to iterate through all the elements. For example suppose that HTML looks like this (just one example, I really do not know the structure): $ html = ' I want to be able to do some simple DOM modifications (like JavaScript): $ dom = new DOMDocument (); $ Dom- & gt; loadHTML ($ HTML); // The code below clearly does not work, but shows how I want to get the foreach ($ dom-> GetAllElements $ element) {if (! $ Element- & gt; Hexellale ('Potatoes')) {$ element-> AddClass ('potatoes'); } And ($ element-> removeClass ('potato');}} $ Html = $ dom-> Save HTML (); Then in this example, The resultant HTML would look like: $ html = ' & gt; Lt; / ...

multithreading - How to config elasticsearch cluster on one server to get the best performace on search -

I'm new to the elasticsearch of about 300,000 items is an elastic search index of any other table with 60 million records For each, I need to do a complex query to this ES index. Right now, it is very slow (1000 questions will take 200 seconds). My server: 8 core 8 GB RAM SSD hardware I handle 100 concurrent search requests from Ruby I want to configure elasticsearch. (I want to search 1000 items in parallel) I'm trying with default config I think by default, Elastastens only requires 10 -20 concurrent search requests this small CPU and Therefore, I think I can improve it. I can run 100 threads from Ruby to find only 1000 items and it takes 200 seconds. If I increase 1000 threads from Ruby, ES returns the timeout error message. I ES_HEAP_SIZE = 2G index.filedata.cache.size: 1g Threadpool: Search: Type: A master node with fixed size Run: 200 QA_Size: 400 Share: 5 Replicas: 1 To carry 100 threads from Ruby still takes 1000 items to 200s. I have ...

Adding same classes to all html.textbox on asp.net mvc -

I have a project in ASP.NET MVC 4 that has recently been improved visually in the use of bootstrap . Although I am very pleased with it, I feel that I am not very satisfied. I have to add new {@class = "form-control input-sm"} all to my html .TextBox was a helpful call and I was wondering if this is a very beautiful way of doing it ... maybe overriding the default textbox assistant? Any insight into this will be highly appreciated. edit this is actually possible - To override the extension method. See for reference:. The views "ASP" are created in the name space; Therefore, to override the default extension methods in System.Web.Mvc.Html (i.e. Static Class Input Input) for your extension method, you must declare your override in the "ASP" namespace, therefore, in your MVC project such class InputExtensionOverride.cs define: using the system; Using System.Collections.Generic; Using System.Linq.Expressions; Using System.Web.Mvc; Na...