Posts

Showing posts from January, 2013

- Where Developers Learn, Share, & Build Careers

I am adding a new email address to a database when I check to see that the user If using , then (! ($ ($ $ Stmt = $ dbConnection- & gt; ('SELECT' email_addr 'FROM'). TABLE_NAME. 'WHERE' email_addr` = When I try to run (if (($ ($! ($! ($! ($! ($! ($! ($!) And 'INSERT INTO'. 'TABLE_NAME' ('Email_addr`, `date_subscribed`,` act_code`, `subscribe_ip`) value (?,?,') ')))) Error me unknown column' Email_addr is found in '' field list ''. I tried a lot and thought maybe adding the backix would solve the problem, but it did not happen. If you want more code, please let me know. Solution: There was a typo in constant. Thanks for everyone to ask to run the query, so I searched for the problem. Unknown column 'email_addr' in the 'Field List' This error indicates that you have a column name Those who are present are not present. Review your table to make sure it's the correct c...

c++ - When to use "::" and when to use "." -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब एक सवाल के लिए क्षमा याचना मान लीजिए कि यह बहुत ही बुनियादी है। मुझे ऑनलाइन ऑपरेटर :: और सी ++ में मेरे पास सी # और जावा के साथ कुछ साल का अनुभव है, और उपयोग करने की अवधारणा से परिचित हूं। सदस्य पहुंच के लिए ऑपरेटर। क्या कोई ये समझा सकता है कि इनका उपयोग कब किया जाएगा और अंतर क्या है? आपके समय के लिए धन्यवाद अंतर पहला है स्कोप रेज़ोल्यूशन ऑपरेटर और दूसरा सदस्य का उपयोग सिंटैक्स है। तो, :: (स्कोप रिज़ॉल्यूशन) का उपयोग किसी नेस्टेड क्लास की तरह एक नेमस्पेस में कुछ और तक पहुंचने के लिए या एक स्थिर फ़ंक्शन तक पहुंचने के लिए किया जा सकता है। । अवधि ऑपरेटर केवल उस क्लास इंस्टेंस के किसी भी दृश्य सदस्य तक पहुंच जाएगा जो आप इसे प्रयोग कर रहे हैं। कुछ उदाहरण: class A {सार्वजनिक: कक्षा B {}; स्थिर शून्य foo () {} शून्य बार () {}}; // नेस्टेड क्लास का उदाहरण बनायें B. ए :: बी आईबी; // ए के उदाहरण सामान्य कार्य पर कॉल करें। ए ए; एक बार(); // क्लास पर स्थैतिक फ़ंक्शन को कॉल करें (कक्षा के उदाहरण के बजाय) एक :: foo (); ...

c# - ADO.NET entity data model generate from database and skip columns -

I want to create an EDM from my database file (.mdf), but I do not want to work with all the columns. How do I leave these columns with .edmx? You can not choose specific column of time generation. But, if you only want to work with a subset of the column, then the EDM produces the entire table; Then in the surface of the designer you can select the columns you do not need and press remove to remove them from the model. A note is that if there are some obstacles in your database, such as non-blank columns are not a default value, if you try to add or update entities without those pillars in your model If an exception will be thrown.

sql - Can a UDF return a list that can be used with an "IN" keyword? -

I Spiarsi with the SQL snippet: - you more than Panlpyaut role To view the transaction type, the case statement is the case when it exists (select role-id from aspnet_UsersInRoles ur where ur.RoleID = 'DEDCD456-A25A-43C5-8125-A1D1223B19EC' and ur.UserID = s.aspnet_UserID) then (select IsNull (sum (amount), 0) from TransactionsLog payment Where payouts.StaffID = in s.ID and payouts.TransactionType (48, 49, 3, 16, 292, 293) and (payouts.OrderDate & gt; = dbo .Date (@date) and payouts.OrderDate & lt; = dbo.EndOfDay (@date)) and @shift = case @shift (0, 4, 4, 3), and then in the payouts.StaffID = s.ID and payouts.TransactionType (48, 49, 3) from the TransactionsLog payment. And (payouts.OrderDate & gt; = dbo.Date (@date) and payouts.OrderDate & lt; = dbo.EndOfDay (@date)) and @shift = case @shift when 0 then 0 als dbo.GetShiftByDate (payouts. OrderDate) END And it works fine. However, the total going to mix, 7 years before the database was originally struc...

java - Calls to next() on abstract class that implements Iterator returns Object instead of E -

मेरे पास निम्न परिभाषा वाला एक वर्ग है: सार्वजनिक सार वर्ग ए & lt; T & gt; इटरेटर & lt; B & gt; {} अगले कॉल करने के लिए निम्नलिखित कॉल (बी) की बजाय एक ऑब्जेक्ट लौटाएगी: ए एक = नया कुछ somethingExtendsA (); बी बी = a.next (); मैंने थोड़ी देर के लिए खोज की है और यह समझने में सक्षम नहीं हैं कि यह अगली () कॉल क्यों संकलन करने में विफल रहता है। क्या कोई मेरे लिए इस व्यवहार का वर्णन करने में सक्षम है? संपादित किए जाने वाले मूल को टेंप्लेट किया जा सकता है, जैसा कि इससे कोई फर्क पड़ता है। अतिरिक्त स्पष्टीकरण के लिए संपादित करें: यह एक संकलन-समय का मुद्दा है, न कि एक रनटाइम मुद्दा SomethingThatExtendsA () के कार्यान्वयन; संकलित समय में इस मामले में अप्रासंगिक होना चाहिए। इसलिए हमारे पास यह कोड है: सार्वजनिक सार वर्ग ए & lt; T & gt; इटरेटर & lt; B & gt; {} [...] ए ए = नया सोथएटेंडेस ए (); a.next (); ए एक सामान्य प्रकार है, लेकिन आपने a एक कच्चे प्रकार के साथ परिभाषित किया है। = के दाहिने हाथ की ओर ध्यान न दें, हम केवल स्थिर प्र...

C# reflection GetValue from a field in generic base class -

The problem is that we can not get the gateway of a field (non-generic) which remains only in the base class, in which The common type is please see the code snippet below. Calling f.GetValue (a) will throw exceptions with the message: Can not be used on fields with late-bound operational types, What kind of type Containsensen generic parameters are true. class program {static zero main (string [] args) {type abstractGenericType = typeof (ClassB ;) FieldInfo [] fieldInfos = abstractGenericType.GetFields (BindingFlags.Public | BindingFlags.Instance); Class AA = New Class ("Hello"); Foreach (fees in fieldInfo field) {f.GetValue (a); // Invalid Operation conviction}}} Internal class ClassB Our design requires that we get FieldInfo first before any instance of real objects. Therefore we can not use type type A = abstractGenericType.MakeGenericType (typeof (string)); FieldInfo [] fieldInfos = typeA.GetFields (); thanks I think it comes to this problem Norm...

- Where Developers Learn, Share, & Build Careers

Whenever I try and dismiss the semi-modal view, I am left with a crash app . I think I have dismissed the set-up modal scene properly but it does not work. MJDetailViewController * detailViewController =: Here it looks like in the demo application using XIB files [[MJDetailViewController alloc] initWithNibName: @ "MJDetailViewController" bundle: zero]; [Auto current popup view controller: type the viewer animation in detail: MJPopupViewAnimationSlideBottomBottom]; Here's what I am trying to replace with: [self presentPopupViewController: [self.storyboard instantiateViewCOntrollerWithIdentifier: @ "example"] animationType : MJPopupViewAnimationSlideBottomBottom]; [self.storyboard instantiateViewControllerWithIdentifier: NSString] does not appear to take place instWithNib (or whatever that function) fix To Any ideas why? I have done something similar. I just want to delete all the init methods in MJDetailViewController and it is also ...

c# - MSChart changing my value -

मेरे पास एक एमएस चार्ट है I मेरा कोड निम्न है: चार्ट। श्रृंखला [चार्ट प्रकार]। पॉइंट्स। डेटाविंड (xValues, xCaption, yValues, yCaption); Chart.ChartAreas [0] .AxisX.LabelStyle.Format = "CustomAxisXFormat"; Chart.FormatNumber + = नए इवेंटहैंडलर & lt; FormatNumberEventArgs & gt; (चार्ट_फ़ॉर्मेटनंबर); तब निजी शून्य चार्ट_फ़ॉर्मेटनंबर (ऑब्जेक्ट प्रेषक, FormatNumberEventArgs ई) {if (e.ElementType == चार्ट एलेमेंटटाइप। एक्सिसलैबल्स & amp; amp; e.format == "CustomAxisXFormat") {e.LocalizedValue = string.Format ("{0: hh tt}", नई दिनांकटाइम (1, 1, 2, (इंट) ई। वैल्यू, 0, 0)। एडहोर (-1) ); }} xValues ​​ और yValues ​​ इनर के सरणियां हैं। मुझे जो समस्या है, अगर XValues ​​= int [] {1,2,3} , जब chart_formatNumber ईवेंट को संभालता है, मान ( e.value ) में बदल जाता है { 2,3,4} । तो उसे सही मान बनाने के लिए घटाव करना है। क्या कोई मुझे बता सकता है कि क्या चल रहा है और / या कैसे मेरे मूल्यों को बदलने से MSChart को रोकने के लिए ? ठीक ...

python twisted stdio example on windows doesn't work -

I started playing with python / twisted, but when I got from Windows to cmd.exe The test does not work. I am using Python 2.7 and Twisted 12.1.0 (Binary MSI Package). I hope this was a buffering problem, so I "dragon-u staden." Tried to run the script with, but nothing changed. Obviously, this script works on Linux and OS X. is there. There is also a fair amount of code associated with this ticket, and there is a large amount of diagnosis. In short, the Windows Command Line is a big mess. It is also not that it is a different interface than the POSIX standard command line; This is a completely different type of thing on Linux or OS X, the console is like a small, fake teletype that you send bytes and control codes. On Windows, the console is more like a small, fake computer running DOS, which you write for video storage. Still, feel free to help on that ticket! It could use some more interest!

zend framework - parsing dojo tundra dijits in ajax response -

ज़ेंड फ़्रेमवर्क में एक अजाक्स प्रतिक्रिया में मेरे डोजो तत्वों को पुनः पार्स करने में बड़ी समस्याएं हो रही हैं I मेरे पास एक सरल सत्यापन टेक्स्टबॉक्स और एक सबमिट बटन है I जब सूचकांक पृष्ठ पहली बार प्रस्तुत किया जाता है, तो सभी डोजो / दिइजिट टंड्रा शैलियों / विशेषताओं आदि को सही ढंग से पार्स किया जाता है। हालांकि, जब मेरे पास एक एजेक्स कॉल होता है जो डोजो फॉर्म को फिर से तैयार करता है और इसे इंडेक्स व्यू में वापस पोस्ट करता है। फॉर्म अगर ठीक वापस पोस्ट किया गया लेकिन टंड्रा स्टाइल अब काम नहीं कर रहे हैं। मैंने कई अलग-अलग चीजों की कोशिश की है लेकिन कई घंटे बिताए हैं कहीं नहीं। मैं किसी को भी अग्रिम धन्यवाद करता हूं जो सहायता करने का प्रयास करता है मैंने इस पोस्ट को स्पष्ट करने के लिए सबसे सरल उदाहरण जोड़ा है लेआउट.फ़ाइल & lt;? Php गूंज & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "यूटीएफ -8"? & gt; '; प्रतिध्वन करें $ this- & gt; doctype (); ? & Gt; & LT; html & gt; & Lt; शीर्ष & gt; & Lt; मेटा सामग्री = "पाठ / ht...

- Where Developers Learn, Share, & Build Careers

When I ran the following part of the code, I encountered an error: Error: Wrong argument in #cartesian Number (X)> ;;;; Function Definition (define (eps-func p) (let * ((P (forged-> Cartesian)) (x (vector 3-XP)) (y (vector 3-yp ) (Vector 3-jpp) (if (> sin (* 2 pi xyz) 0) (dielectric (epilene 12)) (dielectric (epicylon 1))))) ;;;; Function call (set! Default-content (content-function (content-flick eps-funk))) I do not know that Where is it wrong? The above code is only part of a control file. Some background information is similar to the following: (lacquer-> Cartesian x) Where x is a vector 3 3-Vector with the given components. (vector3-xv) (vector3-yv) (vector3-zv) Relevant components of Vector V Content-Function [Function] The Function of an Argument, Position Vector 3 Maybe you should invite them to (JALK-> Cartesian)) with the parameter? Or does this function give lambda?

- Where Developers Learn, Share, & Build Careers

As part of my installer, I need to call a DBMS system and close it, and later After starting it. If DBMS is hanging for some reason, then my installer is hanging forever. I call Exec in the command that will start or stop the database, my question is: What is the definition of ewWaitUntilIdle? If my command never comes back to start / stop the database, then what unnecessary condition does it take? This is the exact code from sources of Inno: process handle process Brick (Procedural: Thandal; Constant Wait: Texsevite; Constant Messaging Process: Tiprooceture; var Result Code: Integer); Wait if wait = ewWaitUntilIdle then repeat ProcessMessagesProc; Until WaitForInputIdle (Prosecutor, 50) & lt; & Gt; WAIT_TIMEOUT; End; Wait if wait = ewWaitUntilTerminated {Wait until the process is finished, but still process any incoming message. } Repeat {execute any pending message first, because MsgWaitForMultipleObjects (called below) only gives * new * message when it arrives...

Is it a good idea to store an Object in Amazon Dynamo as Json? -

After looking at Amazon Dynamo DDB, I was trying to figure out how I would store my complex objects I will make in my code and want to stay persisted I understand how I store these objects in relational databases such as MySQL, but how do I store them in DynamoBib? I can think in a way .... I turned them into Jason and to represent Jason in Dynamo DDB, to get them out of Dynamo DBB, again I used to present my object presentation in my code to Jason Will take back from Here's an example: For this type of object: A car is an engine that has many parts, each part has a serial number, a life span and a replacement value. . Now I can change the car to JSON which will look something like this: {"engine": {"parts": [{"serial number": "1234", "Vistaspan ": 10," replacement value ": 100}, {" serial number ":" 5678 "," life span ": 1," replacement value ": 200}]}} I like the ke...

java - How to modify values of JsonObject / JsonArray directly? -

Once I have provided a JSON string in the GSOn, then the JsonObject class provides (assuming I Do not want to parse any meaningful data objects, but want to use Jason OBaze strictly), how can I modify the field / value of a key directly? I do not want an API that can help me Strangely, to continue adding the answer property back, I was expecting a setter method for half: system System.out.println ( "Before:" + obj.get ("DebugLogId")); // Original "02352" obj.addProperty ("DebugLogId", "YYY"); System.out.println ("After:" + obj.get ("DebugLogId")); // now "YYY"

- Where Developers Learn, Share, & Build Careers

I have created a new whoami command for which a fake username is required and / Path by adding it to .profile is designed in a way that is written in the written form which is called whoami before the actual yonamite The main reason for doing this is that I have a Hadoop cluster I'm using remotely to access and copy the files under the duplicate usernames I received. When I call whoami in the shell and even call $ PATH, then all this works well, before all of my Shrimated shows the way to humami. But for some reasons, when Hadop is called, then it does not take the created 'Jomi' > Most users do not use whoami to define a user's username or group. For example, to get more detailed information about you or id [username] (like id root ), enter id You can also use groups with groups to get more detailed information about other users, in addition to various programming languages ​​like C to determine user identity Are your ways Ase that get...

- Where Developers Learn, Share, & Build Careers

I am working on a function that I can use to get canvas coordinates. The part of the canvas works well until it disappears on the screen. When I shrink the window, and scroll down to the bottom right corner, the scene starts from the canvas. How can I decide to get the right coordinates? This is my code: function getMousePosition (event) {var mx = new number (); Var MY = new number (); If (event.x! = Undefined & event.y! = Undefined) {mx = event.x; MY = event.y; } Else {// Firefox method to get the status MX = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; My = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; } MX - = canvas.offet left; MY - = canvas.offetoptop; Warning ("X:" + MX + "y:" + MY); } This is the function that I get Canvas coordinates are used: function getCanvasPos (el) {var canvas = document. GetElementById (el); Var _x = canvas.offsetLeft; Var _y = canvas.offsetTop;...

java - Get JNI Signature for methods of nested classes -

Let's say that I have a class called scope in which nested class is variable, how exactly do i javap -s to get JNI signatures of classes inside? I have tried to do javap-classpath & lt; Classpath & gt; -s scope $ variable , but it does not seem to work, it seems that I get the same information as I typed "scope" instead of "scope $ variable" is. Thank you for any help If you have javap , then $ will be interpreted by the shell and not by javap . So this music will be a simple solution to escape: javap-classpath & lt; Classpath & gt; -s 'Scope $ Variable' Exclamation of the shell (I believe in a child) will try to replace it with the contents of the $ Variable part Environment variable variable I think there is no such variable and no further (as in "empty string") has been replaced. Therefore, javap looks only javap-classpath & lt; Classpath & gt; If you are running commands from Wind...

java - Outputting null -

I am having a problem in which the output of the list (n + 1) returns empty output rather than returning . Is there something I see? Public Stable ListEnginement Millitem (Listmill Head, Int N) {if (n == 0) {return head; } And if (head == zero) {return tap; } And {return getItem (head.getNext (), n + 1); }} This code does not understand. If the head is not empty, then it will call getItem (head.getNext (), n + 1) , but in the end, head will be null (and n will never go to) and so it will return you null maybe you mean return getItem (head .getNext (), n-1) .

indexing - SQLite: Extract Terms and Doc Count of terms from full text index -

I have a table that is a full text index. How do I remove a list Example Friend 2 firefighter 4 found 45 Fast 3 P> etc .... After index table is the solution to create a ftsaux table : Make VIRTUAL TABLE MYTABLE_terms using fts4aux (cool);

ruby on rails - How to use RSpec to test if the category of an item is a valid category in the category table? -

I have an item model in which each item should have a range that is a valid category. In my item.rb, I have is_on: category and in my category.rb, I have related_to: Item Is that correct? And how do I verify that my item is a valid category using RSPC? Please help and thank you! ) I will have two tests: let's (: valid_category) { Stub_model (category ,: valid? = & Gt; true)} (let's invalid: category) {stub_model (category (not valid; = & gt; false)} two (params) except the {{}}} class # valid parameter {Item.new should specify (params.merge (: category = & gt; valid_category)) new (params.merge (: category = & gt; invalid_category)). Should_not be_valid}

iphone - How can I get UIViewController to properly refresh / update its view? -

I have a UIViewController label that has its own text set with an external server. Add to viewDidLoad : [self.view addSubview: label]; Server updates the text after a few minutes, and in the app I press a button which activates it: [self.view setNeedsDisplay ]; But the text of the label is not updated until the app is re-compiled How about label.text = @" new title "; ?

Selenium webdriver script fails to execute sendkey() in IE 8 when running it from jenkins -

I have a Selenium grid setup with hubs running on the CI (Jenkins) server whenever I build my project from Jenkins And then fails to execute it: WebElement inputElement = driver.findElement (By.xpath ("// a [contains (@href, \" / case / add ") ] ")); InputElement.sendKeys (Keys.ENTER); Or rather Selenium thinks that it did and it runs on the next order i.e. selenium.select ("id = lifeoffice", "label = amp";); Nodes are virtual machines that each run a different browser and this problem occurs when the script is being executed on IE 8 browser. When I run the script right from my IDE. I used the click (); Try using and ((javascript exclaimer) driver). ExecuteScript ("argument [0] .fireEvent ('onclick');", inputElement); And I have the same problem ... This would be strange, but sendkeys Try taking a look at the page immediately after the order. If the element just outside or just inside viewport, to touch...

uml - Does every class in the design model have to be present in the domain model? -

I have a doubt about the design model. Should every class in the design model be present in the domain model? Object modeling is best done as an iterative process, so whatever (simple) design you feel that starts with. Build your current requirements and build on it as you will learn more about your domain.

java - Implementing an interface in C++ -

How can I do this in C ++ Interface activator {zero action peer ); } JButton.addActionListener (New Executioner) {Zero ActionPerfed () {Something}}); So far I know this, class ActionListener {Public: Virtual ~ ActionListener () {} Virtual Zero Action Methodology () = 0; } What can I do next ... Any such keywords will also help to implement this kind of implementation. C ++ is not really an unknown class as you find in Java The general thing is simply declaring a subclass The interface is obtained from the class. The closest you find in an example of an unknown class of Java: Category: Public ActionList {Public: Virtual Zero Action Perf. () {// Something}} Listener; Thing.addActionListener (listener);

- Where Developers Learn, Share, & Build Careers

What can I tell when Ajax hates if CIS profiler is enabled because it is in view Injects html at the end of the method. Which corrupts with success: callback $ Ajax () . Instead of defining my idea, $ this-> Output-> Enabled_profileor (wrong); On all the methods used for AJAX calls, I can use the following code in a hook or core controller which extends the CI_Controller .. or elsewhere, not to make sure where it is placed Go. & lt ;? Php if ($ this-> Input-> is_ajax_request ()) {$ this- & gt; Output->; Enable_profiler (wrong); } Question: I can add the following code, which can be disabled by the CI to the profiler if it is enabled only for AJAX requests Areas will be effective globally. If the course is a better solution, let me know but Google does not tell anything. Please expand the main controller and construct a particular post for the variable name in the constructor's check in the array and Disable profiler. Expands clas...

sql server - Perfomance Issuses on Tables With NonClustered Index -

We have a table with nearly 100,000 records that are often used in our applications. We had an identity column and had a package index on it and used to do everything well, but for some reasons we had to use a unique identity column as the primary key. So we add a non-cluster based index to it and remove the package indicator on the id column. But now, there are lots of performance degradation in our time from our customers, is it because the table no longer has a package index? This means that you had to leave the package index, two concepts are different. You have a unique identifier, Can be implemented by non-indexed indices and different package indexes of elections (such as old id columns). But the real question is, when you add a unique identifier, PK how did you change your application? Have you modified the application code to get the record through this new PK (Unique Identifier)? Have you included everyone in the context of the new PK? Have you modified all for...

c++ - Regarding 1 tick in windows and posix -

I see the code in the window in C ++. It is mentioned that 1 tick is equal to 100 nanosecond Is it typical for windows? Or is this a common standard, if this is the standard name? Is this the same on other OS? To ask the above questions, I have to write a platform independent code, if this is Windows specific, then I need to add #ifdef WIN32 to this part of the code. This is Microsoft specific: Tick the smallest unit of time That is equal to 100 nanoseconds. A tick can be negative or positive. In the Linux system you can use a high granularity timer to get the accuracy of 100 nanoseconds, but you have to handle them differently.

android - Broadcast receiver for GPS state? -

Is there a way to be notified when the GPS is turned on / off? When I saw the device stops again, getLastKnownLocation (provider) is zero. So I want to save the location when the GPS stops in a database. Register for a Broadcast Receiver Listen to the intention of LocationManager, it will be broadcast when the GPS provider (and Other providers) are enabled / disabled

- Where Developers Learn, Share, & Build Careers

I have a "weird" issue with the C function fwrite . I have a Unsigned int is the indicator and I want to write it in a binary file, so I used the fwrite but the file is written inverted byte. For example, looking at FE 45 78 D4 4C E9 EA F1 etc., looking at unsigned int (4 bytes in my case), I see the file content As D4 78 45EFF1EAE94C etc. How can I fix this? A bit more information: When I say that bytes are written in the wrong order, I mean that every program I use to read the file Byte seeing the wrong sequence, error reading an error ... understand me Not only does the Fillit function use a different way to represent data ... More information: I tried fwrite (myuipointer, 4, size, file) ); Fwrite (myuipointer, 1, size * 4, file); The same result I also tried to use an unsigned four indicator which points to my data and writes it, no success ... "Post-text" itemprop = "text"> This is because your computer uses Little Endian ...

asp.net mvc - Creating a Basic MVC Project with Unit Tests in Visual Studio 2010 -

Image
I wanted to use MVC 2 web application in Visual Studio 2010 as the language of C #. For this, I referenced the link: and I made it. When I ran an application by pressing F5, I found an error in my browser. I have attached the error information below please help me solve it . MVC is different from regular ASP.NET. In MVC you can tell your application to http-address , Which type of system is used for fire? Methods are called " Actions " in the MVC language. And Classes are called " Controller " (Rafi speaking), if you want the scene before showing, you should "index" your method to "Home Controller" Would have to tell. You do this by entering the address: "Localhost / Home / Index " Please read more here:

- Where Developers Learn, Share, & Build Careers

मेरे पास एक खेल सारणी है: बनाओ टेबल खेल_पीस (x पूर्णांक, y पूर्णांक , प्रकार पूर्णांक); प्रत्येक (एक्स, वाई) में केवल 1 टुकड़ा हो सकता है। ग्रिड का प्रतिनिधित्व करना (संख्याएं प्रकार होती हैं): 1235 1134 9678 कनेक्ट होने से मेरा मतलब है कि उन्हें सीधे एक ऊर्ध्वाधर में मूल के बगल में होना चाहिए या क्षैतिज फैशन की तरह: सीसी = जुड़ा हुआ सीओसी हे = मूल सी मैं यह जांचना चाहूंगा कि क्या 3 टुकड़े बिना ग्रिड पर कहीं भी जुड़ा हुआ है डेटाबेस के पूरे ग्रिड को पाने के लिए और अजगर में ऐसा करने पर, अगर सभ्य समाधान हो सुझाव: Xophmeister के उत्तर पर मेरी टिप्पणियों को स्पष्ट करने के लिए, इस तरह: बैल चुनें, ओम से खेल_पॉईस ओ जॉइन गेम_पीस पी ऑन पी। टाइप = ओ.प्रइप और ((बैल = पीएक्स और पीए आईएनएस (ओय -1, ओ.ए.आई. 1)) या (ओआई = पीए और पीएक्स इन ( बैल -1, ओ.एक्स + 1))) ग्रुप बाय बैल, ओय होविंग COUNT (*) & gt; 1 और यहां यह आपके परीक्षण डेटा पर काम कर रहा है: संपादित करें: चूंकि आप केवल जानना चाहते हैं if हालत मौजूद है, यह करने का सबसे अच्छा तरीका है अंत में LIMIT 1 ...

matplotlib - How can I fit my plots from measured data? -

How can I fit my plots? So far, I got the following code, which plots a variety of graphs of an array (data from one experiment) because it is placed in a loop: import matplotlib plt plt.figure (6) .title ("APD" + str (detector) + "_Correlations_log_graph") plt.savefig (datafler + "/ apd" + arr (detector) + "_Correlations_log_graph.png") Works with a logarithmic plot so far, but I am thinking that Iting process can work properly. Finally I have a formula or / and a graph that best describes the data I measured. If anyone can help me then I will be happy! You can use curve_fit from scipy.optimize # - * - Coding: UTF-8 - * - Import as NP import. Import scrip_ptmit from multiplybipop plot curve_fit def func (x, a): return np.exp (a * x) x, y, z = np.loadtxt ("fit3.dat", unpac = tru) pop, pcov = Curve_fit (func, x, y) y_fit = np.exp (popt [0]] * x) plt.plot (x, y, 'o') plt.errorbar (x, y, yerr = z) plt.plo...

asp.net mvc - Multi tenancy app to deploy on azure at a later stage -

I am currently developing an MVC app using ASP.NET. My ultimate goal is to deploy Sass to Ezur. But would it be possible to do this at a later stage or should I include it in my development? Use the Azure certification, etc. I will require multi tenancy because of the app. Just wanted to know the thoughts of people on this? Cheers If you can provide more information, then it would be better. Do you want to know that at this time you ignore Azur, how much effort do you need to make if you decide to deploy the application in Azure? In general, this will not make much effort, unless you want to use the esur services, such as storage, ACS etc. Deploying ASP.NET applications on the Azil Web site is posted on a remote IIS. You will need to create an additional cloud service project to deploy into a web role. Normally posted on virtual machines, no modification is required in the project, but you need to set up all the environments Also, please note that there are still som...

image - How to save ID2D1Bitmap to PNG file -

text "itemprop =" text "> I encountered a problem when trying to save the PNG file to ID2D1Bitmap (that was created from ID2D1HwndRenderTarget). Output image is empty with just white color. The HRESULT function returns from the call (Andrew) -2323238894. Thanks for any help Here is my code: HRESULT CImageUtil :: SaveBitmapToFile (PCWSTR uri, ID2D1Bitmap * pBitmap, ID2D1RenderTarget * PRenderTarget) {HRESULT hr = S_OK; ID2D1Factory * pD2DFactory = NULL; IWCBitmap * PidBalbitmap = Faucet; ID2D1RenderTarget * pRT = NULL; IWIC Bitmap Encoder * PAncoder = Faucet; IWICBITMFFrame encode * PFRAMEAcode = faucet; IWICStream * pStream = NULL; If (SUCCEEDED (hour)) {hours = D2D1CreativeFactory (D2D1_FACTORY_TYPE_SINGLE_THREADED, & amp; pD2DFactory); } // // IWICBitmap and RT / UINT sc_bitmapWidth = pBitmap- & gt; GetSize () Width; UINT sc_bitmapHeight = pBitmap- & gt; GetSize () Height; If (SUCCEEDED (hour)) {hours = m_pWICFactory-> CreateBitmap (sc_bitm...

grep in perl without array -

If I have a variable: I sent it to the full text file $ var = file Suppose the "I" word is in the 17th row (space is not available, but the only example given) and I want to find after a pattern of the word 'I N (such as 10) the word' I ' If the pattern 'words' exist in those lines or not, how can I do that without regular expressions of the array Switch to Example: $ var = "I'm good at Pearl \ n But I would like to know about this \ N details grep command"; I want to find special patterns in special lines (line 2 to 3 only). How can I do this without using the array? There is a legitimate case to not use arrays - When the file is larger than prohibited. Instead of having to beat around the bush to find Perl idiom is a very specific need, I Upastratin write: sub n_lines_apart {my ($ file, $ N, $ first_pattern, $ second_pattern) = @_; My $ FH, '& lt;', Open $ file or $ !! My $ lines_apart; While (& lt; ...

- Where Developers Learn, Share, & Build Careers

I also want to display their pictures in the user's search results. Not only avatar photo but also 3 photos photos are in extra table user_photos If I get a single line per user then the answer will be clear - internally but I will get multersonage for each user. The first method I can use may include: Add user INNER from photos SELECT * photos.user_id = users.user_id In this case I need some additional php code to merge results with the same user_id. Something like this: foreach ($ result as result of $) {if (isset ($ user [$ result ['user_id']] ['age'])) $ $ [$ Results ['user_id']] ['photo'] [] = $ result ['photo']; to continue; } $ User [$ result ['user_id']] ['age'] = $ result ['age']; $ User [$ result ['user_id']] ['photo'] [] = $ result ['photo']; I first need a first level loop for users to see and then $$$ [$ result [user_id ']] [' photo '] array for each user....

Plugin execution not covered by lifecycle configuration maven error -

Image
I have imported an existing Maven project but I'm getting some errors in pom.xml: The execution of the plugin is not covered by the lifecycle configuration: org.apache.maven.plugins: maven-compiler-plugin: 2.3.2: compilation (execution: default-compilation, step: compile) pom.xml / Org.squashtest.csp .tools.unittest line 50 Maven project lifecycle mapping problem creation but I do not understand that, here pom.xml Is: & lt ;? XML version = "1.0"? & Gt; & Lt; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org / 2001 / XMLSchema-Example" xsi: schema location = "http: / /maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Parents & gt; & Lt; ArtifactId & gt; Squashtest-csp tool & lt; / ArtifactId> & Lt; Group & gt; Org.squashtest.tm & lt; / Group ...

iphone - Display searchResultsTableView when UISearchBar is activated initially -

मैं वर्तमान में एक searchDisplayController का उपयोग करने के लिए UISearchBar का उपयोग कर रहा हूं अपने iPhone ऐप में स्वत: पूर्ण कार्यक्षमता को लागू करें। हालांकि, जब उपयोगकर्ता पहले UISearchBar दबाएंगे, तो खोज नियंत्रक एक मंद UIView को प्रदर्शित करेगा खोज पट्टी। इसके बजाय, मैं शुरू में दिखाए जाने वाले वास्तविक searchResultsTableview (पिछले प्रश्नों, स्वत: पूर्ण सुझावों आदि सहित) चाहता हूं। किस विधि को ओवरराइड करना है / काम करने के लिए इसे प्राप्त करने के लिए लागू? धन्यवाद! मैंने कभी भी UISearchBarController (या UITableViewController) का प्रयोग करने में बिंदु नहीं देखा है क्योंकि वे ऐसा करते हैं इसके साथ बहुत सारी गतिविधियां मैं बस UISearchBar आउटलेट को बनाऊँगा और अपने इंटरफेस में घोषित करूंगा, इस तरह से आप अपने कस्टम तरीके को अंदर डाल सकते हैं। इसलिए यहां आप हर खोज के साथ एक खोज सरणी तैयार कर सकते थे, इसलिए जब खोज बार दबाया जाता है (जैसे एक प्रतिनिधि विधि कुछ है (UISearchBar *) ने किया था;);) आप अपनी कस्टम सूची प्रदर्शित करेंगे, और जब वे एक को दबाते हैं, तो sear...

PHP array_count_values returning an empty array -

Maybe I'm seeing something very obvious but this code does not work: & Lt; Pre & gt; & Lt ;? Php print_r (($ progress)); ? & Gt; & Lt ;? Php print_r (array_count_values ​​($ progress)); ? & Gt; & Lt; / Pre & gt; Outlook is: array ([0] => 1 [1] => 1 [2] = & gt; 1 [3] => 1 [4] => 1 [5] => 1 [6] => 1) Array () What's here That's wrong? Why is empty_count_values ​​returning an empty array? array_count_values ​​ works with only / Code> and integer values ​​my guess: you're accumulating booleans inside $ progress . You can put them at int before adding them to $ progress .

iphone - Strange BAD_EXC_ACCESS when declaring a string -

OK, what I'm doing is setting NSString in a value with this code: NSString * stringURL = [NSString stringWithFormat: @ "http://api.themoviedb.org/3/movie/%@/trailers?api_key=1523229ded5824dab8bb7840782db266", search ID]; This is a string that I am changing from the TMDB database to the URL for querying. This line of code gives me a BAD_EXC_ACCESS and it is blowing my mind because the use of this type of NSString has been used thousands of times without problems. One more thing is that this line is being executed correctly after another query call. The odd thing is that the call string creates the same URL, even then it works fine. Any help would be appreciated ... using% i An NSInteger is required to log in, not% @

- Where Developers Learn, Share, & Build Careers

coming back to this Google Maps support on iOS 6. This is a serious and constructive issue that should be addressed to many app developers, who have already released their applications on iOS 5 and linked to legal compliance with Google's Terms of Service Has happened. The fact is: Applications using the Google Maps API web services are prohibited from using the service in any application that does not display any Google Maps related to display of information on Google Maps. An application is available for download by some developers on the App Store, users have downloaded it and are using it. When users update their phones with iOS 6, Apple Maps will appear in place of Google Maps, which suddenly breaks Google license rules. This application becomes Google's "real" license stand point, thousands of users will use an app that has become illegal and I can not think technically in order to stop it. How can we deal with this matter? Can Google bear enoug...

extjs - how to do carousel image pinch in pinch out(zoom in zoom out) in sencha touch -

I have a carousel in my application, this application is done using Sinicha Touch 2. According to my requirement, I have to do pinch (zoom out zoom out) in the carousel image . Can I get it in Sincha Touch 2? If so, how do I search, but I did not get the information about this carousel in zoom out. Can anyone tell me how to do this? Currently there is no pin-zoom built-in functionality in the Touch Touch 2, but you can use these events: Pinch start , Pinch and Pinchand to Ext.dom.Element We say you have an image inside A container: var c = Ext.create ( 'Ext.Container', {...}); You can add listeners to pinpoint incidents: c.element.on ('pint-start', function (e ) {// ... },this); C.element.on ('pinch', function (e) {// ...}, this); C.element.on ('pinchend', function () {// ...}, this); I have been able to do some work, but it is not good yet - Hope it helps

database design - List of unique values for a property in Google App Engine -

I am currently rewriting a python GAE app in Java, and ask about my unit design . I have entities like the following, so that I ask the datastore and can easily return a unique list of designers: class designer name: string If the designer gets rid of the class then the code will be very easy to wrap a string, but I get the list of gene designers to SELECT DISTINCT Designer Can not Do from Gene Is, or is there any other way? GAE does not support complex queries like SQL (Datastore-Billet) The model of (DB) structure will be designed as you explained earlier. p>

javascript - An update on the status of filesystem access for JS -

With the newly implemented and / or proposed HTML5 API, is there a reply to change all? I think my question requires freedom, so this is: whether it is present or in the near future, it is possible that any pure, plug-in HTML file In some things like Tidelichiki, which is a place from a place on a thumb drive and opened in different instances of different browsers, but it still will write back itself and the changes made from within the UI Will you continue? To use thumb drives for IE Tidleviki, do you always have to resort to persistence for temporary and / or Java / Flash applets? "post-text" itemprop = "text"> No To access the file system, the HTML5 API depends on the file to be chosen with a file input. Out of the file (but linked to its URI), the local storage store data in the sandbox is not portable between the HTML5 API and the browser / system.

asp.net mvc 3 - MVC3 Testing ModelState excluding property errors in a view -

I did a search on Google and Stack Overflow but could not find the answer. I have the following in my opinion @if (! Html.ViewData.ModelState.IsValid) {@ Html.ValidationSummary (true) I am only interested in model errors but when the errors are found, the test will come true. How do I just test model errors? I may need to clarify here, I & lt; Br / & gt; Want to test to stop is a property error but there is no model error. If you go to source of validation source, you can IEnumerable & lt; ModelState & gt; ModelStates = null; If (Leave Property Emaarors) {ModelState MS; HtmlHelper.ViewData.ModelState.TryGetValue (htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix, MS Out); If (MS! = Faucet) {Model States = New ModelState [] {MS}; }} And {Model States = htmlHelper.ViewData.ModelState.Values; } So I think you can make a method like that public static bool modelStatus modelerrars (this HtmlHelper htmlHelper) {ModelState ms; HtmlHelper.ViewData.M...

- Where Developers Learn, Share, & Build Careers

I am developing a universal application in which I am using UITableView I made it dynamically and I wrote the code below in didSelectRowAtIndexPath . But this is not going to the next page. Please tell me how to do this. First view controller * fst = [[first view controller alloc] init]; [Self. Navigation controller Push ViewController: animated fst: yes]; You have to specify the zero file here. First View Controller * fst = [[First View Controller Alok] initWithNibName: @ "abc.xib"]; [Self. Navigation controller Push ViewController: animated fst: yes];

Setting the Text property of a DropDownList ComboBox to an invalid value doesn't raise exception? -

I'm looking at ways to solve a problem with the Winforms application, which uses the combo box control special As a form, the combo box (style = dropdown list) is bound to a data source and, because the user navigates through any other data, the "text" property of the combo box property is set - And the user can choose some other value. Trouble starts when I have not specified the "text" attribute in the list of available items. It seems that nothing happens, take the following simple examples: Public Partial Sections Form 1: Form {Public Form 1 () {Initial Group (); MyComboBox1.DropDownStyle = ComboBoxStyle.DropDownList; //myComboBox1.Items.AddRange (new [] ("one", "two", "three"}; list & lt; keyValuePair & lt; int32, string & gt; & gt; value = new list & lt; KeyvaluePair & lt; Int32, string & gt; & gt; (); Values.Add (New Key Val Peer & lt; Int32, String & gt; (1, "one")...

- Where Developers Learn, Share, & Build Careers

I am using dotnet zip library to programmatically zip my files. As a result zip file is then uploaded to the server using SFTP. My question is, is there a way on which files should be unzipped on the server. I am not sure about the job, which works to cancel the work. Edit: For each of these documents, there are 100 documents in the zip (usually PDF) and 100 metadata files. The metadata file ends with the .metadata. With such extensions, the file triggers a job on the server to see the document specified by metadata. After removing all other normal files, I can remove .metadata files from these zip. A common approach to this type of thing is often to remove it at a temporary location, then Luggage pick up at the pickup location later In this way, you should not have any problems with the files or order of half-written, and failing to fail if you do not leave the half-data set to the consumer needed.

- Where Developers Learn, Share, & Build Careers

I'm trying to make a simple player after the guidance in Android, using it I can play with the track Ubuntu Spitative but I can not work on Android. So far I'm able to query for track from Spreadchap but when I tried to add playback capabilities using ALSA, there was a nightmare. What have I tried to use openAl and still a very easy way to run streaming audio in Jni stuck? My & amp; At the end of the on_search_complete callback, I call a function 'play' which looks like this: zero play (sp_session * session, sp_track * track) {if (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, Explanation "," attempt to play the track ... "); Sp_error error = sp_session_player_load (session, track); If (error! = SP_ERROR_OK) {if (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, "explanation", "error:% s \ n", sp_error_message (error)); Exit (1); } If (DEBUG_MODE) __android_log_print (ANDROID_LOG_INFO, "explanation", "p...

caching - Refreshing Facebook share cache for an entire domain? -

The OG tag at the domain was broken for some time and the FB cached poor data for some pages. Now everything is fine, but FB's cash goes for quite some time. I know that I can expire the cache for one page and repay using this tool: I like every page on my site But to do this. Either way, all pages have been liked by FB, which are liked / shared with my site? Sorry, just use the debugger for each page on your domain if you get a limited price by the debugger So for a graph API, a rescrape = true is the ultimate one.

Xcode Deployment Target Settings -

If I want my app to be compatible with older OS versions, back in Snow Leopard, Are these proper deployment target settings in XCode? P> If you can use the "Deployment Target", then what is the purpose of "OS X Deployment Target"? You probably will work, but to be safe, Target should set the deployment goal for both 10.6 If you want your app to be compatible with Snow Leopard. If your project has only one goal, then the OS X Deployment Target setting is not all helpful. Establishing the OS X Deployment Target can help with projects with many goals. You can set a base deployment goal for the project with the OS X Deployment Target setting, and to change the deployment goal for a goal, Setting.

Are HTML encoded special characters required to end in a semicolon? -

is considered the right encoding for & amp; # 8212; , although the semi-colon is left to it still displays properly in my bowers (Chrome and Firefox). In addition, I am using several email clients to test character encoding. It has been learned that almost all the semicolons are ignored when displaying special characters with the exception of Gmail (IE, Chrome and Firefox). So my question: are the HTML special encodings encoded to end in semicolon? It seems like Gmail is playing by the rules, while everyone ignores the required semi-colon. From SGML based HTML to version 4.01, it is possible to eliminate the last ; See . Note. In SGML, the last ""; In some cases after the reference of a character (for example, just on a line segment or just before a tag). In other circumstances, it can not be eliminated (e.g., in the middle of a word). We ""; In all cases, the character must be present in order to avoid problems with the user's agents. Ho...

RCpp : how to reload recompiled C++ code without restarting R -

मैं Rcpp.package.skeleton () द्वारा उत्पन्न rcpp_hello_world उदाहरण के साथ प्रयोग कर रहा हूं। मैंने rcpp_hello_world.cpp में एक छोटा परिवर्तन किया, मैं पैकेज को पुनः कंपाइल करना और संशोधित कोड के साथ कार्य को चलाने के लिए चाहूंगा। हालांकि, इसके बावजूद rm () के साथ नामस्थान को साफ़ करने का, detach () के साथ पुस्तकालय को अलग करना, r emove.packages () के साथ पैकेज को हटा रहा है - library () के साथ पुस्तकालय को फिर से जोड़ने से install.packages (.., repos = NULL, प्रकार = 'स्रोत') के साथ पैकेज को फिर से स्थापित करना और पुन: स्थापित करना, अभी भी। सीपीपी कोड का पुराना संस्करण चलाता है। यदि मैं आर छोड़ देता हूं और आर को पुनः आरंभ करता हूं, तो पुस्तकालय () संशोधित। सीपीपी कोड लोड करेगा और इसे इच्छित उद्देश्य को चलाएगा, लेकिन मुझे हर बार आर को पुनरारंभ करना नहीं चाहिए सी ++ कोड में परिवर्तन करें (यदि संभव हो तो)। मैं आर को छोड़कर बिना सी + + कॉल को ठीक से रीफ्रेश करने के लिए R कैसे प्राप्त करूं? सत्र को पुनः आरंभ करने / पैकेज को पुनः लोड करने के लिए आम त...

How to Pass ActiveRecord Objects as Parameters to Helper Methods in Rails -

For many support methods, such as redirect_to, link_to, and url_, instead of a hash, an ActiveRecord object It can take control and specifies the action I have seen that the parameters have passed different documents in different ways. It is sometimes passed as a symbol, sometimes in the form of an example variable, and sometimes as a local variable I am confused about how to alter the various parameters styles to return the URL. I know that at the following conventions, a controller and action should be made to create the URL, but it is uncertain that when the railroad requires a specific parameter style for the construction of that URL. Please help me understand the usage cases to pass the ActiveRecord object as an icon, an instance variable, or a local variable. Do the methods have different requirements depending on the call? Or is there a difference in the URL creation? Here are some examples: From API docs: link_to "profile", @profile redirect_to post ...

- Where Developers Learn, Share, & Build Careers

What do I need to remove a widget completely (purge it, delete it, etc ...), but It's a gridlate, so even when calling removeWidget , it still keeps an indicator, so the dragon does not want to remove the object. Here is the (hidden) code: def addRow (auto, line): self.entries.insert (line, QtGui.QLineEdit ()) self.gridlayout.addWidget (self.entries [ Line], line, 0) ... def remRow (self, line): self.gridlayout.removeWidget (self.entries [row]) del (self.entries [row]) ... (in other functions) foo Deletes the widget from the gridlate, but it does not completely delete it, so it actually gets packaged under the (?) Layout, and the widget is apparently larger than the layout (not sure though , As i Can not see the end.) Then, is there any way to completely remove any program from within a QGridLayout? Thank you in advance! Contains the widgets for containers again even if you remove it from the layout, the container widget Still have parents, so that the widget can ...

java - Vaadin: table container has object members -

I am expanding BeanItemContainer and it will be used as a container for a table in Waddin I'm using Public Square Mycantine Beanite Container & lt; MyClass & gt; Serializable {...} implies a MyClass object that has a structure as shown below: public Class MyClass {Private Int ID; Private Innerclass Data; ...} and there is a structure in the innerclass: public class innerclass {private int PROA; Private string probe; ...} I have id and data. I want to display the propane column but I am not sure how in vaidyine solution addNestedContainerProperty to use property See for details.

deployment - How can we deploy a console application to several hundred amazon EC2 instances efficiently? -

I'm currently deploying a small # console application for 200 Amazon EC2 examples. Whenever the code is updated, what I am doing now eliminates all the examples, compiles the code and copies the executable file, copies the last AMI image, and then again creates 200 examples from the new AMI images. Could. I think this is really very inefficient and I want to find a better way of doing it. How can I apply these EC2 instances quickly? You can check to use the platform - A-A-Service Solution Allow the application to deposit the pajes and allow it to start machines and set their code on them. A Pass will allow you to update additional features such as monitoring, cross-cloud support and apps on the fly. Many PS sellers have been mentioned here: Disclaimer: I work for an open source, PASS.

- Where Developers Learn, Share, & Build Careers

I'm trying to re-apply a method, but I am confused because at some point the compiler thinks Is that the list [list []] instead of list [list [any]] . This is my job: def anag (wrd: list [character]): list [list [four]] = if (wrd.isEmpty) list (wrd) and wrd.map (l List: [list [character]] = if (wrd.isEmpty) list: = [Gt; l: anag (wrd.tail)) / found: list [list [any]] def anag (wrd: list [character] function anacvert return list [list [four]] you're combining it with four There are four predictions for a list of lists: The second example is OK: l: anag (Wrd.tail) Because the list of wrd.tail type [color] EDIT: How to solve it? Since this is likely to work on Coriseraa, it will leave you. You will have to overturn all the partial solutions returned from Anag (see for assessment) for the whole word and again partial solution. You can also get all permutations of a list with a method permutation from the SlaLa Library: wrd.permutations.toList

- Where Developers Learn, Share, & Build Careers

I currently have a DLL which helps me with some tasks, and I want my DLL main thread . Do I send classes to some way (in a variable, there is a type name for a class), I would also like to include DLL in the file where the class is defined (.h file). So basically, how can I modify a variable from any other thread (in this case, the main thread)? Edit: The variable that I want to change is as follows: Group The group is a template class and UMesh is another class. Do I somehow send a DLL to a class (a type of typed name in a type) in a variable? Yes, should I include DL files, where the class is defined (.h file). No, you can not rely on your library some application types. Why would this library be useful for other applications? Your library will accept only this type of object known in this library. Then, you have been typed in your application: template & lt; Class T & gt; Class group; And you want some libraries to accept this type of object. ...

Rails session value being deleted when deleting a line_item -

This one is confused with me. I'm still a newbie with tracks so it can be easy. Status: I can add items to the cart, no problem Everything works fine The current_cart method resolves each request for the same cart. But as soon as I remove a line item from the cart, it works, the line item is removed, but "variable [session_ cart]" becomes zero, and there is a new car When the current card is called next time, it was made. I am using Devise so I am not sure whether to do something with it, or perhaps the line item removal method The question is, is there anybody It helps to understand why the session variable is being cleared after removing the line_item? I have a train application, with the sprinting web development with the following railing. First of all, the code for the application controller has been retrieved to retrieve the current cart: private def current_cart Checkout :: Cart.find (session [: cart_id]) Rescue ActiveRecord :: RecordNotFound C...