Posts

Showing posts from March, 2015

class - Haskell monoid foldable rose tree -

I need to create an alliance frequency for the data structure of the rose tree: Data rose a = a: & gt; [Daily A] Deriving (eq, show) with the following monoides and rosary-related classes / instances: Example factor everyday where fmap f ( A: & gt; BS) = (FA): & gt; (Map (FMAP F) BS) Class Monoid A where Mempati :: A (<> :: A -> A - & gt; An example monoid [a] where mempty = [] ( Whatever I tried: Example Foldable Rose where fold (A:> B) = a & Gt; (FoldMapMap b) Although this is not working properly, I get an error to check the system: *** Fail! Exception: 'Prelude. Delayed ': []: & gt; [] But I'm not sure why this does not work, can someone help me? Thanks in advance! Best Regards, Skyfather Your implementation of fold was right, there is no reason to change it. The problem is that it is not enough to define fold Foldable < / p> square foldable where the source Data structu

ms access - Sql query to find total percentage -

का चयन करें tblItems.ItemType, Count (tblItems.ItemType) से कुल TblItems WHERE (((tblItems.Pool) 188 और 218 के बीच)) ग्रुप द्वारा टीबीआईटीम्स। इटम टाईप; यह मेरी वर्तमान क्वेरी है और यह आइटम एक पंक्ति में प्रिंट करता है और कुल बार नामित दूसरी पंक्ति में दिखाई देता है। मैं प्रतिशत के साथ एक और पंक्ति बनाने में सक्षम होना चाहता हूं यह कुल वस्तुओं का है मैंने गिनती के बाद जोड़ने की कोशिश की (कुल / कुल (कुल)) के रूप में pct_total लेकिन यह काम नहीं करता है मुझे मिले त्रुटि "अभिव्यक्ति (योग) में उपकुंजीएं नहीं उपयोग की जा सकतीं (योग) (कुल))" यहां एक विधि है: चुनें i.ItemType, गणना (i.ItemType) कुल, गणना (*) * 1.0 / (tblItems से चुनें संख्या (*) जहां 188 और 218 के बीच पूल) के रूप में अनुपात से I

internet explorer 9 - FontAwesome and IE9 -

The following code looks fine in Firefox but does not want to display IE 9 font. Can i try something & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Link href = "http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel = "stylesheet" & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; I class = "fa-camera-retro" & gt; & Lt; / I & gt; fa-camera-retro & lt; / Body & gt; & Lt; / Html & gt; I use Internet Explorer 11, the font looks fine, so you can You can update your IE browser alternatively, if you need a picture from the font, you can use them as "background-image" as some kind of: & Lt; One style = "background-image: url (your image-to-font .jpg)" & gt; & Lt; / A & gt; or & lt; Span style = "background-image: url (your image-to-font .jpg)" & gt; & Lt; / Time &am

javascript - How do I add a click event for buttons when the page loads? -

I want to add click event for all buttons after loading on page, I tried to 'click' it 'Onload' but it was not working so I should do something wrong. AddClickEvent is a function that adds different click events for the button so that they do different things depending on the button you click. So, how can I work it properly? Edit : This may be possibly unclear, but if I want an applied adclick event when it loads on the page, otherwise it will repeat the buttons for the desired effect. var allButtons = document.getElementsByTagName ('button'); For (i = 0; i & lt; allButtons.length; i ++) {allButtons [i] .addEventListener ('click', addClickEvent); } AllButtons [0] .removeEventListener ('click', addClickEvent); // This is the first button Load document on the event! document.addEventListener ("load", function () {var allButtons = document.getElementsByTagName ('button'); for (i = 0; I Update Ok you ca

javascript - How to put dynamic value in Doughnutchart Using chartjs? -

I'm starting at the chart, I need a dynamic price update using the Form Table Submit button. (chartjs) I chart. Min.js & lt; I am using form & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; P & gt; & Lt; Label & gt; mobilizations & lt; / Labels & gt; & Lt; Input type = 'text' id = "donut-1" /> & Lt; / P & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; P & gt; & Lt; Label & gt; Blue print & lt; / Label & gt; & Lt; Input type = 'text' id = "donut-2" /> & Lt; / P & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; P & gt; & Lt; Label & gt; Realization & lt; / Labels & gt; & Lt; Input type = 'text' id = "donut -3" /> & Lt; / P & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; P & gt; & Lt; Label & gt; Final preparation & lt; / Labels & gt

iphone - iOS 8: Does "Allow full access" allows the developer to access keystrokes from other keyboards? -

This "Allow Full Access" setting is widely discussed, but I get a clear answer Can not manage for However, these so-called "keystrokes" are not obvious; otherwise, to allow full entry grants, "ability to send other input events for keystrokes and server input". IMHO Are they only keystrokes typed in the keyboard app or all keystrokes typed from any keyboard? Let's say I have two keyboards and KB, with full access to both. For both KA and KB, the container app can logically use their respective keystrokes and can do whatever they want to do with them. But can you use Keystrokes typed in KA? Thank you! [edit] 14.10.0 9] The answer clears the connection between the host application and their extension. But to specify "keystrokes" without any (?) To mention whether these keystrokes are limited to keyboard extensions, where they were typed. Although it is clear, what's upsetting me that I can not get any clear statement, espe

scala - Override field with parameterless method -

Image
I am currently learning Scala and I am reading Martin Ordesky's book (from the cover). In Chapter 10 I found this: < P> Excellent I understand both and in this way. So I tried an example: class father {def x = 1 // method} increases the child's dad in the class (overlays well x = 1; // field} However, if you try to override an attribute with a method: class father father {val x = 1; // field} class I get a compiler error: The method x should be a static, irreversible value override (override def x = 1 // method) Def X = 1 This does not work if x is in dad var : Method x can not override a floating variable override def x = 1 so we have two cases (and I have two questions): < Ul> Trying to override an unqualified field: In this order of guarantee, x will not be overridden by a method whose value varies more Until the time? Is there any other reason? A The variable region is trying to override: Why can not override an unq

php - Laravel populating the current class from its ID -

I am looking at creating a solution using the famous in Larval 4 such as $ message_id = 123; $ Message = new message (); If (! $ Message-> loadFromId ($ message_id)) {message 'Failed to get message'; } And {return $ message-> Get ('body'); } However I can not decide how to do this. I know that Larval Gas gives an example of return class to a 'search' method but it is not what I need. I want to be able to load the current class and want to return a boolean. I think there is a load method in Larval, for which relationship is required. I think I can make a new method like 'LoadFrame ID', with a series of best ways I wanted. but I'm not sure. I think I will drag a 'relation' (whatever) from the database and will use it with the load method. Can anyone help me with this? This is the method for finding what you want: $ Message_id = 123; $ Message = message: search ($ message_id); If (! $ Message) {return 'failed to r

asp.net mvc - Microsoft.Owin.Security.IAuthenticationManager doesn't redirect to login page -

Image
मैं अपने आवेदन में Microsoft.Owin.Security का उपयोग कर रहा हूं (ASP.NET MVC v 5.2 .NET 4.5 पर)। लेकिन केवल ओविन का कुछ और हिस्सा नहीं है जब कोई उपयोगकर्ता सुरक्षित URL पर पहुंच चाहता है, तो स्थानीय में, अनुरोध लॉगिन पृष्ठ पर रीडायरेक्ट हो जाता है। लेकिन जब मैं सर्वर पर ऐप प्रकाशित करता हूं, तो मुझे रीडायरेक्ट करने की बजाय यह विंडो मिलती है: मेरे पास global.asax :: Application_Start विधि में यह रेखा भी है: एंटीफ़ॉर्गरी कॉन्फ़िग। अनिकक्लाइम टाईपआईडेंटिफ़ायर = दावे टाइप NameIdentifier; और web.config में ये कॉन्फ़िगरेशन: & lt; system.web & gt; & lt; प्रमाणीकरण मोड = "कोई नहीं" / & gt; & LT; httpModules & gt; & Lt; नाम निकालें = "प्रपत्र अटार्नीकरण मॉड्यूल" / & gt; & lt; नाम = "रोल मैनेजर" / & gt; निकालें & Lt; / httpModules & gt; & LT; /system.web> & LT; system.webServer & gt; & Lt; मान्यकरण मान्य एकीकृत एकीकृत कॉन्फ़िगरेशन = "गलत" / & gt; & Lt; मॉड्य

php - Graphdb like model approach on mongodb and scaling -

I am doing a project with php and mongodb is a requirement where the user feeds as any social network system Should be shown. To do this, there is a unique ID for placing a Mongo document in each object (users, pages, etc.), each document is said to be similar to the graph DB in the form of a node. All the nodes are in the "nodes" collection in my mug db, the relationship is stored with connection flow (direction) and refers to id (for nodes) in the collection "rels" when If I do the query, I'll load the total and related nodes on the "relay" collection. My question is how will this impact a model on scaling things? Because the documents on the "relay" collection will be the outstanding amount. Maybe 10000's is very new for scaling in Mongo. Is my view wrong? Thank you. You do not need a sledgehammer to run nails through a wall MongoDB is suitable for these scenarios Not in the case of your use where you have nodes and the

How to put/get multiple entities at once in Google cloud Datastore using java -

In this, I did not know how to put or retrieve many entities at one go. Further, by using GULL, I was unable to execute such select * questions, from where (key '1', 'key2', 'key3') __ key __ Can someone help me, how do I insert / retrieve many entities once in Java ?? Thanks, Cloud Datastore, a LookupRequest and CommitRequest allow multiple keys and institutions respectively to specify, for example: LookupRequest request = LookupRequest.newBuilder () .addKey (key1). AddKey (key2) .build (); or: CommitRequest request = CommitRequest.newBuilder () .setMode (CommitRequest.Mode.NON_TRANSACTIONAL) .setMutation (Mutation.newBuilder () .addInsert (Unit 1) .addInsert (entity2)) .build (); These pages are slight variations on the examples given at: Cloud Datastore Jikyuel current IN or does not support writing.

jquery - simple quote escape issue with pdo-php-javascript (ajax) -

Here's my problem: I have a PHP script (one AJAX query from my database with PDO ): ... some code $ myString = $ pdoObject ['field']; ... some code is a single quote in the string: ' Example: this is strange Later in this php script, I have put the string in a long string variable that I send back to my AJAX query: $ wholeString = " ; Td & gt; & lt; span title = '$ MyString' & gt; Some text & lt; / span & gt; & lt; / td & gt; & lt; / tr & gt; "; Then I send it back: json_encode ($ wholeString); In my AJAX query, I just put the result in a jquery field: ... some code success: function (response) {$ ("# myField" ). Html (feedback); } ... Some code always talks tight on the quote: & lt; Tr & gt; & Lt; Td> & Lt; Span title = 'this' & gt; Some text & lt; / Span & gt; & Lt; / Td> & Lt; / Tr & gt; If I try to use htmlentit

.net - CMD Commands won't run in C# -

I am trying to run the following: string command = @ " C: \ user \ some \ documents \ generated_files \ r ++ + "+ folder"; System.Diagnostics.Process.Start ("CMD.exe", "/ K Path C: \\ Program Files \ \ R3.1.1 \\ bin;% path% "); System.Diagnostics.Process.Start (" CMD.exe "," / K "+ command); when I execute it, then nothing happens, does anyone know why? If I try, System.Diagno Stics.Process.Start ("CMD.exe", "/ K MD test"); This works fine: s E: Some additional information , The first command is setting the path, so that the router can be called by typing the router. Besides, these two commands work when I do them in normal CMD interface. Prepare a batch file and execute it using (StreamWriter sw = new StreamWriter ("runcript. cmd ", incorrect)) {sw.WriteLine (@" PATH C: \ Program Fi les \ R \ R-3.1 1 \ bin;% Path% "); Sw.WriteLine (@" RuPut C: \ Users \ Any \ D

java - Sending JSON object from activity to Fragment -

Hey people I'm still looking for an answer for hours. Could you please help. It's really important. What I am trying to do, is to get Jason's object in an acetate in the login activity and then send this piece to a piece where I will parse it. The login activity is an acetcus where I try to send Jasonson (which I get from () as a rutin): @ Override protected voice downline background (zero ... parameter) {string JSON = faucet; {JSON = New String (check post ()); Bundle bundle = new bundle (); Bundle.putstring ("jestring", json); Timetable fragobj = new timetable (); fragobj.setArguments (bundle); } Hold (IOException e) {e.printStackTrace (); }} And here's my piece (Timetable class) where I try to get JSON in onCreatView string jsonString = getArguments ( ). GetString "jString"); JSONObject jsonObject = new JSONObject (jsonString); My problem with everyone is that when I try to get jsonString with getArguments, I always get a Nul

c# - turn on IncludeExceptionDetailInFaults -

I am using the asmx webservice which works in some cases and receives an exception: < Blockquote> System.ServiceModel.FaultException: The server was unable to process the request due to internal error. For more information about the error, either to send the exception information to the customer, or to start tracing according to the Microsoft.NET Framework 3.0 SDK document, IncludeExceptionDetailInFaults (either by Save BeaverAttet or configuration behavior) on the server Turn on And server trace logs are inspected. Let me know the web. Adding to the config is to include adding Exclusivity Detectives but I found an invalid child: & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; ... & lt; /system.serviceModel> & Lt; / Configuration & gt; Any suggestions please & lt; Configuration & gt; & Lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Transaction

How do I verify that a JMS queue exists using Java? -

How can I check if there is a queue on the JMS server using the Java API? I still do not want to send or receive any data in the queue, just verify that the queue exists. Also, the queue may be empty. Here is my code sample. I have removed the error handling for simplicity. Connection connection = zero; Session session = null; Connection = Factory. Secure connection (); Session = connection.create session (false, session. AUTO_ACKNOWLEDGE); // I was hoping that this next line would throw an exception if the queue is not in line Queue line = session .createQueue (queueName); My JMS server is Tibo EMS. I am hoping for a solution that works on version 5-7. Solution I followed the recommendation in the accepted answer but instead created a browser. The following line threw an exception as desired: QueueBrowser browser = session.createBrowser (queue); A queue object that you just created to a consumer or creator: Previous> session.createConsumer (queue);

javascript - Adding a new element or updating an existing element in an array -

I have a bill array that includes items that the user chooses to take in it example , Item: 'milk', cost: 1.99, quantity: 1} What do I want to do, update quantity 2 if second milk is added to the basket and do not add another milk item. This time code Is: i i . Quality ++; } // If this new item bill can not be added, animal ({items: new entom, cost: cost, quantity: 1}); } break set a flag out of the loop If found: var found = false; (I.e.. } If (! Found) {Bill Push ({items: new entom, cost: cost, quantity: 1});}

ios - console.log not showing in Parse Logs page -

In the cloud code below I want to get feedback of all the functions, but after calling the code to my customer Pars Logs page: I can only see: I2014-10-08T15: 28: 32.930Z] v249: User DGU 143 Eusjo for Exho DEGU 143 Apso accept Rail Cloud Work with: Input: {"Meeting ID": "Bust GNHOir"} Result: Meeting Approved Here's my cloud code: pars.cloud.define ("sweatmitting", function (request, response) {var UserAcceptingTheMeeting = request.user; var meetingId = request.params.meetingId; var changed objects = []; var Query formatting = new parse.queryvueu ("meeting object"); queryForMeeting.equalTo ("objectId", meeting ID); queryForMeeting.first ({success: work} {var userCreatorOfMeeting = meeting.get ("user"); user accept Karnametting. In Creation ("Approved Meetings", 1); Replaced Objects. Push (User Accepts Ymeteting); Meeting.ed ("Participants Object ID", User Approved Themitting.ID); Length (=

fiddler - Command to kill connection with specific URL or with Specific HTTP status -

मुझे कमांड लाइन उपयोगिता की जानकारी है जिसे ExecAction.exe < कोड> मैं इस तरह से कमांड लाइन के माध्यम से सत्र को बचाने में सक्षम हूं - ExecAction.exe डंप क्या कोई तरीका है विशिष्ट कनेक्शन को मारने के लिए? या विशिष्ट HTTP परिणाम के साथ सभी कनेक्शन को मार डालें उदाहरण- चलो कहें कि सभी कनेक्शन वाले स्ट्रिंग "google.com" को बंद करें HTTP स्थिति कोड 304 के साथ सभी कनेक्शन को मार डालो। मैंने निम्नलिखित की कोशिश की लेकिन काम नहीं करता - ExecAction.exe बीपीएस 304 धन्यवाद। आपने कहा है कि सर्वर को प्रत्युत्तर देने के बाद आपका लक्ष्य कनेक्शन बंद करना है ग्राहक। ऐसा करने के लिए सबसे आसान तरीका नियम & gt; नियम कस्टमाइज़ करें OnBeforeResponse पर स्क्रॉल करें और कोड जोड़ें: यदि (oSession.HostnameIs ("google")) {oSession.oResponse ["Connection"] = "close"; } इससे प्रतिक्रिया वापस करने के बाद फइल्डर को कनेक्शन बंद कर दिया जाएगा।

javascript - toggle class content on click from nav -

I have a simple page with 15 elements in the NAV bar (only 4 in the JSFDial example to keep the code). I have a JavaScript that transfers the border-down display when clicking on NAV bar elements, but I would like to change the content of that box on the basis of which click the name object is. This is it. Ive tried getElementByID, but somehow I cant seem to change the class under my # tab-content div ... I have a javascript loop that changes the content of each section element This "tab-on" ; & Lt; a href = "# section1" onclick = "display (section 1) class =" icon icon-dash "& gt; & lt; span & gt; dashboard & lt; / span & gt; & lt; / a & gt; & Lt; / li> and I want to show it to show for id = section2 and to show the hide class for section 2: < / P> 1 & Lt; / p & gt; & lt; / section & gt; section & lt; section id = "section2" class = "hide&quo

asp.net - VB.Net Outlook email creation works locally, fails on server -

When I run my project on my local machine, it generates Outlook email as expected, but if I do all my This error message fails when our development server runs the code: [exception: can not create ActiveX component.] Microsoft.VisualBasic.Interaction.CreateObject (String ProgId, String ServerName) +509721 etc ... I know this is Outlook which failed because if I comment on the sendmail () function, then The rest of the page works fine (this does not just make email). Outlook is installed with local machine windows 7, server is 2008R2, no office is installed, I have other pages which can write in excel files, but they are using crystallersport to handle it, so I'm sure Not that the server requires Outlook DLL, or need to be something else. Aspx page with a VB.Net code. My Email Looks Like: OMail2 = OApp2 as a slow OApp2 object, as an OMail2 object, signature 2 string OApp2 = CreateObject ("Outlook.Application"). Create a new ArrayList (2) dim iCounter such as alA

java - Parsing XML into Android Application -

I'm trying to parse my Android application. I read a lot of questions about parsing XML on StaxHowFourFlow, yet I'm not sure how to handle for loop in my case. If anybody loved me to give a good example of working for this case of XML, I would be very grateful. For example I found on STACKOVERFLOW try {DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance (); DocumentBuilder db = dbf.newDocumentBuilder (); Document Doctor = db.parse (* / insert my URL / *); Doc.getDocumentElement () Normal () .; Node list nodlist = doc.getElementsByTagName (* / what's my case here? / *); Item = new text view [nodlist.gateLong ()]; For (int i = 0; i & lt; nodeList.getLength (); i ++) {node node = node list. Item (i); Item [i] = new text view (this); Element fstElmnt = (element) node; Nodelist item list = fstElmnt.getElementsByTagName (* / what's my case here? / *); Element Item Element = (Element) itemList.item (0); ItemList = itemElement.getChildNodes (); Ite

java - Why is method not working as I thought it would? -

I am trying to create a hangman game. I have everything work like I want with the exception of a method so far. This method is called processGuess and takes a string letter and two string arrays as parameters. The first array is an array called spaceArray and contains underscores which match the length of the word being guessed (example: hello output [_, _, _, _, _ ] ). The second array is called the wordpress and includes the word that the user is guessing The way I work my way, it is as follows: < / P> Create an array that stores all inferred characters ( guessArray ) Create a counter that tracks the number of estimates (< Code> estimator quality ) Repeat through the word for each loop for the loop and this From Mr. compare characters user guessed. a if word is in the word, then add the letter spaceArray to wordArray to the correct indicator of spaceArray Compare A If equals, say something, they live in X number of estimates - b is not equal t

Recall javascript array index value -

I am implementing a way to track clicks in a tabbed content section. When I click any tab, the parameter is passing as click = tab 4. It should be clicked = tab (value of 0-3). It seems that this is returning the length of the array? How can I create an Event Listener function, keep the index value of the array. Example: When I click on Tab 1, the "i" variable should be 0 in the event listener. Here is my code. It works apart from one part, and I do not know why it may be. function clicktrack () {var tab = ['tab1', 'tab2', 'tab3', 'tab4']; For (i = 0; i

.htaccess - Apache rewrite - catch and send to subdirectory -

I do not seem to be doing anything Final, snatch-down Iteration I am using: RewriteEngine On RewriteRule ^ / (. *) /wiki/index.php/$1 [QSA, L] / Does not route, but does everything else / route, but nothing code> / rule, the URIs in the APA 2+, which are in the directory based context (eg .htaccess), through the rules For any thing, if the leading slash is removed, then ^ / (. *) $ will not match anything: Rewight Engines On rewrite code% {REQUEST_URI}! ^ / Wiki / RewriteRule ^ (. *) /wiki/index.php/$1 [QSA, L]

sql - MySQL ORDER BY, GROUP BY within a JOIN -

I've have been looking for a while and have not found an example that works hope you know the obvious mistake can do! Timestamp, i_currency.Code Code conversion as i_convert choose from (Timestamp Conversion Order Select i_convert by DESC time mark) include i_convert.CurrencyID = i_currency i_currency By Ho Code I am not sure whether to be jointly added, should it be in parentheses, outside or both? I've tried all three with no luck, continue to: You have an error ... ... near (Select timestamp conversion orders from i_convert does not mean the original query. It uses the GROUP BY But the column is that neither the grouping column nor the total of the group works. Trying to select which time-mark and the conversion for any result line Are? I think the objective is to select the most recent conversion for each currency. That will cause more visible thus: latest.Timestamp timestamp, as i_currency.Code code, i_convert.CurrencyID = i_currency.CurrencyID jO

sql - Create table from nth result set of stored procedure -

I have a stored procedure that gives 4 result sets. There are many columns in the result set What is the best way to create a table from each result set? The data type and schema in the table should be similar to that of the result set. I know that I can do this to create a table from selection: select the table TABLE_NAME * from the users So there is a way to select from a stored process execution set ?? Text after "itemprop =" text "> Although it was mostly included in chat, there may still be an answer for those people Who are thinking about the same thing. The only way to set more than one result set, and in the context of T-SQL, is through SQLCLR, using C #, VB.Net, or any other Net Language SqlDataReader which will use the result set differently. The SQLCLR proc is just your existing T exec SQL pr and either sets a single result (assuming an input is the one which must be specified as a result to return to the set) spit out Can or do a

sql - How to get all days in month? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 3 जवाब सभी दिन प्राप्त करने में संभव महीने में ओरेकल एसक्यूएल / पीएलएसक्यूएल के रूप में? ब्लैक-ब्लै-ब्लै ड्यूएल से चयन करें परिणाम: 1 rec: 01.01.2012 2 रिक: 02.01.2012 3 रिक: 03.01.2012 ... 4 रिक: 31.01.2012 ? यह वही है जिसे आप ढूंढ रहे हैं; to_date चुनें ('01 .01.2012 ',' dd.mm.yyyy ') + स्तर- 1 से दोहरी स्तर से & lt; = TO_CHAR (LAST_DAY (to_date ('01 .01.2012 ',' dd.mm.yyyy ')),' डीडी ')

Python GUI for running shell scripts on the file user selects -

I need to create a GUI in Python where GUI has a browse button and I need to run a specific shell script on them Browse files what can someone help me on this ??? import wx, os a = wx.App () d = wx.FileDialog ( None, "Choose a script", wildcard = "* .py") d.ShowModal () os.system (d.GetPath ()) 4 The actual lines of code. You can easily ...

javascript - Toggling an off-canvas menu with addClass() -

I am currently building a Yii application where I want to create my own off canvas navigation. It fades the fade, but I want to slide it from the left with the 0.5. How can I change it with jQuery? Do I need something like addClass () ? Here's my HTML: & lt; Div id = "menu" & gt; & Lt; Button id = "toggle-menu" & gt; Toggle & lt; / Button & gt; & Lt; Ul class = "navigation" & gt; & Lt; Li class = "nav-item" & gt; & Lt ;? Php $ this- & gt; The widget ('zii.widgets.Cenu', array ('item' = & gt; array (array ('label' = & gt; 'array (' lunch / part '),' visible '=' home ' 'Url' = & gt; array ('lunch / house')), array ('label' = & gt; 'inscribe', 'url' = & gt; array ('/ site / login'), ' Visible 'and' username '-' = & gt; Yii :: app () -> user-

javascript - How to change image of other buttons on onClick event? -

I am again with a problem I have four buttons, when I click on a button Clicking, this button converts image from old image to new image right now the image changes, but if I press the button 2 button button 2 changes, but the image of the button is the same image as new i Here's the code I want to return to the old image: & lt; Input type = "image" id = "start" src = "buttonred.png" width = "50px" height = "50px" onClick = "this.src = 'buttonblue.png'" /> & Lt; Input type = "image" id = "stop" src = "buttonred.png" width = "50px" height = "50px" onClick = "this.src = 'buttonblue.png'" /> & Lt; Input type = "image" id = "slow" img src = "buttonred.png" width = "50px" height = "50px" onClick = "this.src = 'buttonblue.png'" /> & Lt; Input type = &quo

c++ - Error in accessing derived class function from base class pointer -

I am unable to use the class function derived from base class pointer. This is my code #include & lt; Iostream & gt; Class base {public: zero funny} (cout Fun (); Error static_cast & lt; der * & gt; (pb) - & gt; Fun () returns; // Error here ((* * pb *) -> Funny () OK Return 0;} Do I know if you have many derivatives from base classes There are classes and assume that you do not need to create many derived class objects, you create a base class pointer, accessing the class function derived from the base class pointers here is a subject of interest, I have also heard that < strong> base class pointer is a generic pointer , so it can contain an derived class object, so why can not we do it directly der d1; Punjab = & amp; d1; Punjab & gt; Fun (); Derivative class fun () should be called. But why does it give a compile time error? your base class funny () function virtualize Try it: Namespace using CSS; # Include &

class - PHP OOP: Missing argument from construct -

var_dump has received the following notification and warning after properly passing it; This means that var_dump ($ params) works, but then these errors occur. I found that due to the creation of the Model_index class using the public function __ composition ($ params = '') , these errors would be the cause of the omissions , But I'm not sure why they are, or why it helps. WARNING: Models_index :: __ construct () argument for missing 1 argument : Unchangeable variable: parameter models_inx class in line 7 class router {public function __construct ( ) {$ Cont = New Controller ('Passing Pass'); }} New router; Class Control Core_Controller {Public Function __Conversion ($ params) {$ Model = $ this- & gt; Model ("model_index", $ params); }} Class core_controller {secure model model ($ model, $ params) {$ model = new model_ index ($ params); Return the new $ model; }} Class Models_index Core_Model {public function increases __ construct

Configuring env-entry values in WebSphere Liberty? -

In the entire profile, you can change the values ​​for an app-defined envideo in an app's web.exm file while deploying During and after Is there a feature in WebSpot Liberty Profile? Sample env-entry: & lt; env-entry & gt; & Lt; Details & gt; Some configured strings & lt; / Description & gt; & Lt; Env- Login Name & gt; MyConfigString & lt; / env- Login Name & gt; & Lt; env entry type & gt; Java.lang.String & lt; / Env entry type & gt; & Lt; env-entry-value & gt; Dev-value should be replaced in production during deployment & lt; / Env-entry-value & gt; & Lt; / env entry & gt; This env-entry is injected with an @resource (name = "MyConfigString") annotation. (which runs on Liberty) describes how to use jndiEntry elements in server.xml I tried this on Liberty 8.5.5.3 but it is not working and still web Injects the default value from .xml. Has anyone found a working method for conf

javascript - Google Dart Core Pages Clear Children -

Whenever a page changes, then I am trying to clear the elements of children on a page. However, with the current method of doing so, nothing changes on the page, the same qualities are there. Right now, I've dynamically generated inputs depending on which different data is based, depending on which tab is selected and displays the appropriate core page (). Each time there is a way to reset the original-page so that different inputs appear properly for each tab? Children Clear () can not be the best way Please tell me that you need more information. @observable int Page ChangeCount = 1; Zero page changed (old value, new value) {var pages = document.query selector ('core-page'); PageChangeCount ++; If (page == 0) {if (change page% 2! = 0) {pages.children.clear (); } Display (true); } And if (page == 1) {if (page changer% 2 == 0) {pages.children.clear (); } Display (false); }} I have actually found all the elements through: pages.children.removeWhere (Element E

How to count unique elements in an array without using any other data structures JAVA -

I have an array of integers, I count unique elements and their occurrences without using any other data structures I'm allowed to use arrays only. when they were separated , Then reset the counting variable.

Kafka to Tableau connectivity -

Can you help connecting kebabs with cocoa? I am trying to show real time graph analysis with the help of austerity. Alternatively, is it possible to connect Kobe to a specific port where data is being sent by Kafka? Thank you, now Kafka does not send data to any port you The consumer has to write, which can meet the needs of data anywhere. In your case, you will need to write to the consumer where coco can be read.

How do you load or even autowire a .json file from the classpath using annotations in java? -

How do you load or load a .json file from classpath using Spring Annotations in Java? // Something like this in my controller in STS: @value ("file: /resources/json/myJsonfile.json") resource jsonTemplateFile; create an abstract class: public abstract Class Resourceloadingstst {@Royal Public TestName TestName = New Testname (); Protected strings loadersource (string filename) throws IOException {end URL resource = getClass (). GetResource (fileName); If (resource == empty) {new illegal employment exception ("no resource file is named;" + + + filename + "& gt; can be loaded from classpath."); } Returns Resources. Casting (Resources, Chart. UTF_8); } / ** * A JSON loads the resource whose name is currently being played * from the trial, the name of the derived renamed is "[test-name-name] .Jason". * For example, if this method is * & lt; Code & gt; testSomeBehavior & lt; / code & gt; Called a test method, the res

gsp - Grails inside a who creates rows change class of a -

I have to look at my grails, and I get an array of items using an API rest, that I Put in a table, and I have tr class = "alt" & gt; I want to make a pair line with I want the first time for another, and so on. I was thinking of doing this or making a tag, but in reality, it does not know if something useful is useful that can be used for similar matters, which I want to change in the code & lt; Table ID = "Customer" & gt; & Lt; TR & gt; & Lt; Th & gt; Photos & lt; / Th & gt; & Lt; Th & gt; Nombre & lt; / Th & gt; & Lt; Th & gt; Vendedor & lt; / Th & gt; & Lt; Th & gt; Precio & lt; / Th & gt; & Lt; Th & gt; Estado & lt; / Th & gt; & Lt; Th & gt; Ciudad & lt; / Th & gt; & Lt; / TR & gt; & Lt; G: in each = "$ {results}" & gt; ** & lt; Tr & gt; ** & lt; Td> & Lt; img src = "$ {it.thumbnail}"

awk command to run a C++ code and input several times -

Say, I have a code, which I compile: $ gcc code / pre> Now if I need to run this code 200 times for example and the name of input files is: 0c.txt, 1c .txt, ....., 199c.txt etc and I want to use the same value every time the mass (like mass = 6), how do I write an "awk" command for this? thanks for your help. You do not specify your outputfile name I think 0cout, 1c.out, ... < / P> I also believe that the F.outout program largely reads extensively with stdin instead. #! / Usr / bin / gawk -f BEGIN {mass = 6 for (i = 0; i & lt; 200; i ++) {cmd = sprintf (". / F.out% dc.txt% dc.out", I, i) print mass. & Amp; (CMD)}} with the output of each line from the shutdown (CMD, "to") ((CMD and exit)> gt;) {/ ef.out} Pre> ref You want to write in: for $ i (seq 0 199) ; Do echo 6 ./f.out $ {i} c.txt $ {i} c. Out

ios - Improving Sprite Kit application -

I am now finishing my first app developed in Xcode. Now I want to improve the lube of my app. Sometimes my app is free for a short while indeed, if you used to play it for the first time, then you would not have paid attention, but this is a nightmare for me. Maybe my voice is being caused by that problem (I'm running them on different threads, but anyway), or some other .. My app's What is the best way to test? Are there special programs to do this? You can do the first thing in Xcode: Product - & gt; Plan - & gt; Edit plan - & gt; Build configuration - & gt; Release If you eg You can also use to test your app's behavior.

perl - Parsing HTML-attributes like strings -

key1 = "value1 value2" key2 = "va3" एचटीएमएल गुणों की तरह तार हैं Key4 होआ पाने के लिए इस तरह की स्ट्रिंग की आवश्यकता है: $ parse = {key1 '= & gt; ['Value1', 'value2'], कुंजी 2 = & gt; ['val3'], # या key2 = & gt; 'val3' कोई फर्क नहीं पड़ता .. key4 = & gt; Undef;}; फ़ंक्शन स्वयं बनाना, जैसे: #! / Usr / bin / env perl का प्रयोग 5.014; सख्त उपयोग; चेतावनियों का उपयोग करें; डेटा का उपयोग करें: Dumper; जबकि (& lt; डेटा & gt;) {my $ parsed; chomp; अगले अगर m / \ ए \ s * # /; जबकि ($ 4) {my @ $ ($ 4) {my @ $} = (* / =) * (\ s * = \ s * (["']) (। *?) (\ 3))? / g) {my $ k = $ 1; V = split (/ \ s + /, $ 4); $ parseed- & gt; {$ k} = \ @v;} अन्य {$ parseed- & gt; {$ k} = अंडफ;}} कहते हैं Dumper $ parse;} __DATA__ Key1 = "value1 value2" key2 key3 = "val3" key1 = 'value1' मान 2 '' key8 key3 = 'val3' key1 = 'मान 1 i \' m 'key2 ke

ruby on rails - Automatically Setting a Devise User as a Stripe Customer -

My strategy is: Sign up user Automatically associate that user with the Stripe ID I have tried to implement it: I have created a user controller and it is registered with the registration controller Received: devise_for: user,: controllers => {: Registration = & gt; 'User'} After a user has saved I have created a callback: after_save: set_stripe_customer_id private def set_stripe_customer_id end < / Pre> Now, I think it needs to be here: current_user.update_attribute (: stripe_id = & gt; .... Docs show code like Stripe :: Customer.create (: description = & gt; "Customer for test@example.com" ,: card = & gt; "tok_1046el4BfU4hLNTvxYcIz4rE" ) The thing is, I do not necessarily want my client to put their card immediately. However, this is not a big deal, I am fine to wait for the real point of purchase to wait for the need to register. My question is is that the easiest, minimum minimum code, do I au

hex - How do you clear a specific bit in a register without changing the other bits in ONE instruction? -

For example, suppose the value of Register 4 (R4) is 0001110010101111. How can you change bit 5 (0001110010 & gt; <0 Strong> 1 & lt; 01111) 0 (even if it was already 0) without any hex directive To change or change the other bit of ? 0001110010 1 01111 - & gt; 0001110010 0 01111 because you are and The immediate value for AND is 5 bits and it uses the sign extension, if you are one of the four less important bits, then you can only clean a bit. Otherwise, you will need other instructions to load the mask in a register. I'll give an example of both. In the case of the 5th bits, the number that will keep the bit mask 0b1111111111011111 . In decimal, this is # 65503 or # - 33 . Since it is too big to fit in instant instruction, so you will not be able to do it in single instruction. You have to declare it in the data segment of your program and load the mask in a register. After that, you can do AND with R4 . ; Suppose R4 = 00011100101011

python - how to use python2.7 pip instead of default pip -

I have just installed Python 2.7 and 2.7 PIP in the site package. When I receive the version with: pip -V it shows: pip / 1.35 / usr / lib / python2.6 / site-packages (python 2.6) How can I use version 2.7: < pre> / usr / local / lib / python2.7 / site-packages < p> A binary "pip2.7" should be named "installed in some place included in your $ PATH variable. You which is pip2.7 It should print something like '/usr/local/bin/pip2.7' in your standout. If it does not print anything, then it is not installed. In that case, by turning it on $ wget https://bootstrap.pypa.io/get-pip.py $ sudo Python2.7 get -pip.py Now, you should have all the sets, and which is pip2.7 should return the correct output.

c - File locking between threads and processes -

I have a program that produces many processes or threads, each of which writes a line on the file, but Obviously, want to mix T line, so I need specific access to the file. More specifically, in the first case, I have a process that processes the processes of many children (C1, C2, C3, C4, ...), and I, F, C2 , C3, C4, ... want to block entry ... when C1 is writing. In the second case, I have the same process that spawns multiple threads (T1, T2, T3, T4, ...) and, again, I have F, T2, I want to block access to T3, T4, ... when T1 is typing. Imagining a function like a herd () takes care of the first part, but what about thread matter? And what about the Windows platform? You want to use a locking mechanism. Between threads, a Mute X is the simplest file entry protected by Mute X, so no two threads can try to write the file at the same time. For the processes, you can use a process-sharing mute x. On windows, you have one.

python - Open / Edit / Save record in Django Form -

Currently I have a Django form where I can add a new customer to the database. I currently have a table showing all the customers present in this database. Now I would like to click on the customer's name in the Customer table so that the existing customer can open and have the option to edit and save the record. Below are my current code sections, if more important, please ask. My navbar.html & lt; Li & gt; & Lt; A href = '%} "with customer'%} 'customer with {% url} New customer & lt; / A & gt; & Lt; / li & gt; my urls.py url (r '^ customeradd / $', 'customer.views.customeradd', name = 'customeradd'), My views.py def customer application (request): form = CustomerAddForm (request.POST or none) if request.method == 'POST ': If form.is_valid (): save_it = form.save (commit = false) save_it.save () messages.success (request,' customer has successfully added ') HttpResponseRirec

angularjs - How to manipulate DOM element after Angular digest cycle? -

I am trying to create a simple system information service in Kangaroo which basically showed up at the top of my window Gives notification to give in a certain position until the user contacts with it. The problem I am facing is my $ scope app.directive ('skSystemUpdate', function (SystemUpdate) {Return {replace: true, restricted: 'A ', Template:' I have a service that is Sys named temUpdate , which is used to set a scope variable based on parameters (i.e. SystemUpdate.create ('this is something ) and then $ RootScope.showSystemUpdate flip right on flip. My direction is $ watch ing for this change and when the flag is set to true then I get the scope variable from the SystemUpdate service Is done and implementing the updated scope.message variable takes care of the rest of the cooner to the DOM. My problem is that I can not understand how to focus my notification after the DOM is running. Update I still can not find a solution wi

html - Reload Page on after some php code -

I am displaying a log file from my Raspberry P (door lock / door opened). I have the possibility to delete this logfile with a button. and click on the same button to reload the page and display the empty logfile. I have the code: & lt; Form method = "get" action = "test.php" & gt; & Lt; Input type = "submit" value "test" name = "test1" & gt; & Lt; / Form & gt; & Lt ;? Php if (isset ($ _GET ['test1'])) {unlink ('test.txt'); Touch ('test.txt'); }? & Gt; This code reloads the page but does not display the empty log file (but it deletes the logfile and creates a new blank one). What do I want now that the page should be reloaded after the PHP code, so the empty logfile is displayed immediately. I do not know at all what can I do? Any signals? & lt ;? Php if (isset $ _GET ['test1'])) {unlink ('test.txt'); Touch ('text.txt'); Header (&q

javascript - Content Filter Is Jumping When Button Is Clicked -

A similar question was asked (adequate information was not given), hence no actual solution was presented. I am using MixItUp to filter the content within a framework, click on which button to click. I saw that a strange movement occurs when a button is clicked. I uploaded the files here for upload After the animation was set to fire, Just jump a bit, if you are talking about this, take a look at the scroll bar. When there are not enough elements on the page, the scroll bar disappears and everything is again center, which is probably what you are seeing. You can prevent it from permanently enabled or disabled the scroll bar with CSS overflow-y: scroll; Or something like that.

javascript - Canvas - Rotating Paths -

I want to know how to rotate a line in the canvas, say I have a canvas set-up. ctx.beginPath (); Ctx.strokeStyle = "# 000000"; Ctx.moveTo (p1.x, p1.y); Ctx.lineTo (P2X, P2i); ctx.stroke (); Ctx.closePath (); "post-text" itemprop = "text"> p 1 & amp; P2: Around the middle point of that section is the idea: context.save using context context Rotate the specified radian angle using .rotate This is a difficult part ... since the canvas has already been rotated and the canvas is now the midpoint of the line, so you should have line length of line zero / 2 and lineTo for moveTo Lines length / 2: context.moveTo (-length / 2,0); and context.lineTo (Length / 2.0); p> snippet "data-lang =" js "data-delete =" false "> var canvas = document.getElementById ( "canvas"); var ctx = canvas.getContext ( "2-D"); var cw = canvas.width; var ch = canvas. Height; var

c# - Population of TableView Data in Xamarin -

I have successfully received the data from the URL and it is specified in my customer dictionary and I have my output to each customer object though Since I'm quite new on this forum, I could not be able to populate the data on tableview cells. I've attached my code. Private IEnumerable & lt; IDictionary & lt; String, Object & gt; & Gt; Customers; Public MyDataServices () {InitializeComponent (); Startup data service (); GetDataFromOdataService (); Foreign currency (different customers in customers) {System.Diagnostics.Debug.WriteLine ((string) customers ["contact name"]); // Populate data on the table view) padding = new thickness (10, 20, 10, 10); Content = New StackLayout () {children = {TableView}}; Considering customer examples contactName and ContactPosition fields, these basic details make TextCell s with those details and adds them to the table view. // Create a TableSection section to keep the cells cells = new tablechets

sql - Update table A when row inserted in table B with multi select column -

I have 2 tables like this: Visitor Id | Name | Visit_from | From Image Visitor_log ID | Name | Visit_prom | From The requester When I insert a record in Visitor_log , the dates are updated in the table of viewers. When 1 visitor is requested I have to do this. The problem is that the Visitor_log.Visitor field is a multi-select field, so the code works only for one visitor: subline_detailed (rsold, rsnew) ew_execute ("UPDATE [visitor] set [to visit] = (go to '' and & amp; rsnew (" & "); , [to] = ('& amp; amp; rsnew ("to") and "') where [visitor]. [visitor] name] = ('& amp; rsnew (" visitor ") and"'); " ) where the clause is created: WHERE [visitor]. [Visitor] M] = (Visitor A) But when multiple visitors are selected, it happens: WHERE [visitor] [visitor] Name] = (Visitor A, Visitor B, Visitor C) There is no Visitor Visitor A, Visitor B, Visitor C Therefore the SQL qu

aix unix 6.1 - 'find' command not executing via cronjob; but ok from shell -

Do not get more than 1 minute old files inside my home directory and update your timestamp * * * * * * / Usr / bin / find / home / me / \ (! -name. -prune \) \ (-type f -mmin +1 -name "*" \) -exec / usr / bin / touch {} \: It runs like the charm of the shell, but not as a cronboze. I have tried this amendment: * * * * * / Usr / bin / find / home / me / \ (! -name. -prune \ ) \ (-type f -mmin +1 -name "*" \) -exec / usr / bin / touch {} \\; and this one: * * * * * / usr / bin / find / home / me / \ (! -name. -prune \ ) \ (-type f -mmin +1 -name "*" \) -exec / usr / bin / touch - {} \; There is still no happiness. Avoid a cover - a script to call this search command. Any idea and signal chronology work is appreciated. Thank You. You should receive mail messages with errors. I found this: sh: 0403-057 1 syntax error on line: `('Not expected. So I \ \ this work Maybe I do not know what the search command is doing.

c# - Microsoft.CSharp.RuntimeBinder.RuntimeBinderException Error -

I am stuck on this error for about one day and I do not understand why I am getting it. / P> Error: One type of exception was 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' in System.Core.dll but was not handled in user code Additional information: The best overloaded method for 'System. Web.Helpers.WebGrid.Bind.bind Controller: var data = Broad in Milan brand DB From DB Division in Division DB. In Supplier where the brand from the supplier. Brendad == division. Division id where the product is. SPLDID == Supplier. Select SuperDider new modelglid {BrandID = brand.brandID, BrandName = brand.brandName, DivisionName = division.DivisionName, CompanyName = supplier.CompanyName, ContactName = supplier.ContactName, Country = Supplier. Country}). ToList (); See Return (data); View: WebGrid grid = new webgrid (model); Grid .bind (model, puncticount: vubag quount, autoront and page: incorrect); Grid: "Grid" column ("brand name", &

Spring+Hibernate: How to handle Multiply (Unlimited) Data Sources and Session Factories dynamically? -

Our application can have multiplied databases. The same application can be different types of database (Oracle and MS SQL) for example Database structures are slightly different but only one set of POJOs is used in hibernation. The list Audi database can be set only when the application actually starts (so it can not be stored as a certain XML) The user will choose a DB during the login process is required. The selected DB is deposited in the HTTP session. So I want to use auto-wing sping for auto-wired session factory for the DAO in Web Controllers depending on the current user. Liked: @Regository @transial @ Controller Public Essentials UserGroupDAO {@Autowired @Qualifier ("sessionFactory") Private session session Factory; Public listing & lt; Users & gt; GetListOfUsers () {session session = session Factory.current session (); Return session.Createreitia (user.class) .list (); }} @Controller Public Class Web Controller {@Autowired @Qualifier ("UserGr