Posts

Showing posts from May, 2015

Javascript Regex check if URL contains one word AND does NOT contain another -

How can a URL check if there is a specific word in it, but also see if there are no words in it? If I try to try and display an example then it would be better: Do something if the ' pan ' is in the URL, then the word ' Panini 'url has: if (/pan/.test(self.location.href) & amp; (/ panini /.test(self.location.href) = = Null) {...} The first part above works fine, but with the other part, will there be no work in it, does anyone have any ideas? returns a boole, so just ! Use operator: if (/pan/.test(self.location.href) & amp; (/ Panini / .test (self.location.href)) { ...} It can be simplified to use (should be fast): if (self.location.href. IndexOf ("pan") & gt; -1 & amp; amp; amp; & amp; amp; self.location .href.indexOf ("panini") == -1) {...} Additionally, you can use a regex test term limit for one word, \ b : / \ bpan \ b / .test (self .locati On.href) // "Pan" will match "Pan ...

html - Styling the arrow of a element? -

Image
How would you style only the arrow color of an element? The "background color" attribute changes the color of both text and arrow. I just want the arrow color. Example of a selected element with an arrow with a green background on Thanks! The default selection you can not do is a form element provided by browser and / or OS . What do you have to do - it's something similar for you:

c# - What are best practices for using SmtpClient, SendAsync and Dispose under .NET 4.0 -

How do I manage SmtpClient now, it is disposable, but a bit confused, especially if I call using SendAsync I am doing Potentially I should not send a dispatch unless SendAsync is complete. But I should call it anytime (for example, using "experiment") scenario is a WCF service that periodically sends emails when calls are made. Most calculations are faster, but sending e-mail can take a second or even more time, so async is better. Should I create a new SMTP client every time I send mail? Can I make one for the whole WCF? help! Update If any difference happens, each email is always customized for the user. The WCF is hosted on Azure and Gmail is used as a mailer. You always IDisposable on the possibility as soon as possible in the case of asynchronous calls , This message is on the callback after it has been sent. var message = new mailmessage ("from", "to", "subject", "body")) Var client = new smtpClient ("hos...

php - help with mysql AES_ENCRYPT -

I have created a query but throwing errors is my query here: $ query = "Include encryption_test values ​​(values) (AES_NCRPP ('pass', 'password')); I have successfully connected to the server and chose the database. Here is the mysql_error () : There is an error in your SQL syntax; anyone can do it) I am not looking at anything? Thank you for your help and ask if you have any questions. value is a MySQL reserved word you need to avoid such a backtick Enter: $ query = "Encryption_estests` (` value ') Enter values ​​(AES_NCRPT (' pass', 'password')) "; Although my personal preference is to write a question like this, I find it very easy to read: Enter encryption_test SET `values `= AES_ENCRYPT ('pass', 'password')

attr - Change image source on thumbnail click with jQuery -

I am creating something like a gallery when a large image related to the click on the thumbnail should be loaded. The way I try to do it is the following: This is an image tag like this: The thumbnail is as follows: & lt; Img src = 'gallery / thumb / [image name]' alt = '' = '[image name]' onclick = 'changePicture ()' /> The name of the thumbnail image and the name of the bigger image are the same and the custom "on" attribute has the same image name, the Change Picture () function is as follows: Function Changespace () {var at = $ (this) .attr ('at'); // Thumbnail Vari's get value of "A" attribute on newpath = 'gallery /' +; $ ("#Billitimum"). Att ('src,' Newpath); // Change the "src" attribute of the bigger image} However this function does not work. It seems that I can not get the custom attribute value of "this" Does anyone help me to und...

linux - Putting a find command as an alias -

I am trying to create an alias for the following command which changes the permissions of all the files in the current file to 644 continuously , And the second which converts all directories to 755. alias fixpermissions = 'cd ~ / public_html / wp-content / themes / presstheme; Find-type f -exec chmod 644 {} \; Find-type d -exec chmod 755 {} \; However, when I run it, I get: Find: path must be before expression These commands work themselves well in Shell Thank you !! You need an extra semi-colon to set your nickname: alias fixpermissions = 'cd ~ / public_html / wp-content / themes / presstheme; Find-type f -exec chmod 644 {} \; ; Find-type d -exec chmod 755 {} \; ; CD ' You may benefit from using sub-shell; You do not need the last cd (which takes you home, not back where it came from): alias fixpermissions = '(cd ~ / public_html / Wp-content / themes / presstheme; find -fype f -exec chmod 644 {} \ ;; find. -type d -exec chmod 755 {} \;)...

java - Extracting characters and integer from a string -

I have this string P = "V755D888B154" and I want to share it with this form 888 b 154 How can I do this? You can use the example: string numbers or letters , but you can view it manually.

jquery - sildeup,slidedown on hover with dropdownlist -

I have a UL tag in which the asp: dropdownlist (inside a div) when The user is more than li, the slide is down with the drop down list and when the user closes the li, the div slideshow is there. The problem occurs when I try to select a value from the dropdown list, so there is no option to select a value from this dropdown list. Why does this happen? (I'm still on li.hover!) What are my options? This is an HTML example: & lt; Ul & gt; & Lt; Li id = "l2" & gt; & Lt; Img src = 4.gif / & gt; & Lt; Div id = "popup6" class = "popup_block" & gt; & Lt; Asp: dropdown list id = "dd" runat = server & gt; & Lt; ASP: ListItem & gt; 1 & lt; / ASP: ListItem & gt; & Lt; ASP: ListItem & gt; 2 & lt; / ASP: ListItem & gt; & Lt; ASP: ListItem & gt; 3 & lt; / ASP: ListItem & gt; & Lt; ASP: ListItem & gt; 4 & lt; / ASP: ListItem & gt; & L...

c# 4.0 - C# and the CSV file -

I have formatted this data using c #, streamreader and author and created this CSV file. Here is sample data: a ------ BC --- D ---------- E ----------- - F ------ G ------ H ------- I New, C, A323, 08/24/2011 / 08 / 24/2011, 100.00,100.00, X 123456,276135 New, C, A 125, 08/24/2011,08 / 24/2011, 200.00.0000.00, X 123456,276135 New, C, A772, 08/24 / 2011,08 / 24/2011, 50.00,100.00, X 123456,276135 New, T, A122, 08/24 / 2011,08 / 24/2011, 5.00,100.00, X 225511,276136 New, T, A124, 08/24 / 2011,08 / 24/2011, 10.00,100.00, X 225511,276136 New, T, A133, 08/24/2011,08 / 24/2011, 500.00,100.00, x 444556,276137 I want the following output: New, C, A 123, 08/24 / 2011,08 / 24/2011, 100.00, 100.00, X 123456,276135 New, C, A 125, 08/24/2011,08 / 24/2011, 200.00.0000.00, X 123456,276135 New, C, A7 127, 08/24 / 2011,08 / 24/2011, 50.00, 100.00, X 123456,276135 New, C, A 1001, 08/24 / 2011,08 / 24/2011, 350.00.0000.00, X 123456,276135 New, T, A122, 08/24/2011 / 24/2011, 5.00, 100.00, X 225511...

c - Efficient way to browse header definitions -

As an example: On my system (Ubuntu 10.04), the Socadar structure is defined in /bits/sockaddr.h Goes struct sockaddr {_SOCKADDR_COMMON (sa_); /*...*/ four signatures [14]; /*...*/}; And similarly for sockaddr_in, first field name with sin_. However, in all the examples I see field sin _ structure_name. Sin_family I typedef (I ) Was meant to track, afterwards the headers were included, but failed (I got sa_family_t and so on). As a more general question: Say, there is a searchable online source where you can search only in a macro or typed head header file - either for a particular Ubuntu distribution, or 'typical' More commonly for Linux installation? Or, of course, a clever way from within the shell of Ubuntu; Or some other idea to be more efficient to do this. This link is: Done ... I'll get you the reference for the Linux kernel api browser later (be able to find it online anywhere). For the actual source code, which you can possibly make ...

css - Automatically adding padding to images when they are floated -

मेरे पास एक सीएमएस है जो उपयोगकर्ता को फ्लोट: सही; या फ्लोट : बाएं; छवियों को वे अपने समृद्ध पाठ संपादक में डालते हैं मुझे नहीं चाहिए कि मैन्युअल रूप से पैडिंग डालने के लिए, इसलिए मैं इसे डिफ़ॉल्ट रूप से शामिल करने का एक तरीका ढूँढ़ने की कोशिश कर रहा था। मुझे पता है कि यह एक कक्षा के साथ कैसे करना है, लेकिन मैं उत्सुक हूँ अगर सीएसएस में या जेक्यूएफ़ में कुछ निर्दिष्ट करने का कोई तरीका है, उदाहरण के लिए, जब कोई छवि float: left संपत्ति होती है, तो उसे पैडिंग भी मिलता है: 0 10px 10px "पाठ"> यदि आप सीएसएस का उपयोग कर रहे हैं, तो उपयोगकर्ता को एक ऐसे क्लास को नियुक्त करने की आवश्यकता होती है जिसमें दोनों गुण होते हैं, या फिर दोनों गुण (फ्लोट और मार्जिन) इनपुट करते हैं। आप jQuery का उपयोग कर सकते हैं हालांकि, और यह गतिशील रूप से करते हैं। $ ("तत्व")। सीएसएस ("फ्लोट") या तो बायां या वापस लौटाएगा , यदि तत्व वास्तव में शुरू होता है। आप इसे (if) कथन में डाल सकते हैं और तदनुसार मार्जिन लागू कर सकते हैं। बेशक, आप यह सुनिश्चित करना चा...

vim plugin for coloring macros -

Is there a way to highlight variables / macros defined in VIM? Is there any plugin that does this, for example. # MonitoringWatch conversion_monitoring (monitoring); In the above example, is there a way to highlight MONITORING_ON ? (I'm using VIM on windows when CTGS is enabled.) thanks This plugin is worth mentioning, that additional update of the automatic tag file supports the dynamic syntax highlighting tag events.

ajax - Avoiding Django's QueryDict List limitations -

I try to save the data from a web page to a digogenic view in a database as a serialized json I am doing If possible, I would like to avoid the Django Query Debt Object and just read the request with Simpson, Flaton and save the database. What is the best way to send data so that Sandjesan can adjust it? var languages ​​= {}; Languages ​​['English'] = ['Symbol', 'James']; Languages ​​['Spanish'] = ['Amy', 'John']; $ .ajax ({type: 'post', url: '/ savings /', data: languages, datatype: 'jason'}); . if request.is_ajax () and request.method == 'POST': For the key to request. POST: Print Key Values ​​= Request .POST.getlist (Key) Print BeViewist It is possible that it is possible to avoid making Dijene QueryDict, but you can ignore it (from): def view_example (requested): data = simplejson.loads (request.raw_post_data)

java - Does HTTP Forward request preserve the referer in the header? -

I have a Java HTTP Survey which uses forward command from requestDispatcher so that the user is somewhere else Can be sent to What is the HTTP Referer header protected from the original request on the advance? (I believe it with redirect). I feel that it is protected because I think the client has never known about the future. Yes, it does, a forward-only option to handle requests to someone else in the same server And requests and feedback items are usually unchanged (unless you make any filters by changing these objects).

javascript - regex match all characters after open bracket [ -

मैं एक regex / (? & Lt; = \ [] का उपयोग कर रहा हूं। *] / I एक [ के बाद प्रत्येक वर्ण को मैच के लिए। एक उपयोगकर्ता कुछ तरह से टाइप करेगा: हैलो यह है [मुझे क्या चाहिए मुझे यह चाहिए कि यह मैच मुझे क्या चाहिए । यह एक regex परीक्षक पर काम करने लगता है:। जब मैं इसे अपने कोड में उपयोग करता हूँ तो यह बिल्कुल काम नहीं करता है क्या ऐसा इसलिए है क्योंकि मैं सही regex स्वाद का उपयोग नहीं कर रहा हूँ? यहां मेरा स्निपेट है: var स्थान = document.getElementById ('locationField')। Value = (commandLineInput.match (/ (? & Lt; = \ [) (। *) / I) ); मैं बस "स्थान" चर को [ ।] जावास्क्रिप्ट का समर्थन नहीं करता है। बीटीडब्ल्यू आप i ध्वज का उपयोग क्यों कर रहे हैं? आपके regex में कोई भी पत्र नहीं है। कैसे के बारे में: var str = "हैलो यह [मुझे क्या चाहिए"; Var want = str.match (/ \ [(। +) $ /) [1]; इसके बजाय?

android - Launching webview class from status bar notification -

When I click on my status bar notification it loads my webview, but it reloads it every time Is there any way to load the saved state? Thanks, what do I have here: Public Zero Start on @Orride (Intent Intent, Intended) {String Ns = Reference. NOTIFICATION_ SERVICE; Notification Manager Manager Information Manager = (Notification Manager) getSystemService (ns); Int icon = R.drawable.notification_icon; Charasata ticker text = "now playing ..."; Long time = System.currentTimeMillis (); Notification Notification = New Notification (icon, ticker text, when); Reference references = getApplicationContext (); Chorascience content = "music promotion"; Characteristic contentText = "Playing Now ..."; Influence notification = new intent (this, main menu square); Pending Content ContentIntent = PendingEntert.Get Activity (This, 0, Notification Intent, 0); Notification.setLatestEventInfo (context, contentTitle, contentText, contentIntent); MNotificationManager.no...

dataframe - Replace all NA with FALSE in selected columns in R -

I have a question, but my dataset is slightly larger: 50 columns with 1 column as UID and other columns To move either TRUE or NA , I want to change all NA to FALSE , but I do not Wants to use clear loop. Can plyr do the trick? Thank you. UPDATE # 1 Thanks for the quick response, but if my dataset is as below: df How can I do this, to process only X1 and X2 ? If you want to substitute for a subset of variables, you still have is .na (*) & lt; - moves as follows: df [c ("x1", "x2")] [is.na (df [c ("x1", "x2" ) The IMO makes the logic easy to use the temporary variable: vars.to.replace & lt; - c ("X1", "x2") df2 & lt; - df [Vars.to.replace] df2 [is.na (df2)]

utf 8 - How to display/echo html as text in php with utf-8 text in it? -

I am trying to display the html / html code text as it is in php I used the htmlentitied () function Tried, but it transforms the entire text into HTML entities In my problematic situation, I have the following HTML text: $ HTML = ' & Lt; / Tr & gt; & Lt; / Tags & gt; & Lt; / Table & gt; & Lt; Br / & gt; Early brown fox jumps on the lazy dog; Div & gt; Æ ???? Æ ?? · Ç ???? Æ £ ?? job ?? ²ç ???? Ç ?? E · ?? È¿? ? Æ ???? Ç ???? & Lt; / Div & gt; & Lt; Br> & Lt; Div & gt; Æ ?? Æ ?? ° ã ?? § ?? ¥ one ¥? A ?? ®e ???? à ???? job ?? Èè ?? ²ã ?? ®ã ?? à ??? One ???? A ?? One ?? £ a ?? ³ã ???? & Lt; / Div & gt; & Lt; Br> & Lt; Div & gt; ʲ ?? I ?? ¼ ¥ ¸ e ° ?? ¥ ¼ í ?? Μí ?? '˹ ë ¥ ¸ e ° ?? I ???? "??" â ?? Ì í í ???? & lt; / div> gt; ² ³ ?? ²® ²² ²²²² ²²²²²² ??²²²²²²??a=²²²²??²²?a=²²??a²²àn ??? Eclair ??? ²² ?? AK? AK²²? A² ?? A².a. ²²²²²²²²²²²²??²=?< / div> ê² ?? i ?...

Making a Custom Menu in Android -

I'm working on creating a game for Android, artwork with a friend Wants to do, as he made an image to use as a menu. My question is that there is no menu item in OnCreateOptionsMenu () on menuewen () by pressing the menu button, and then close the menu with my SurfaceView class? Or just, how can I do my own menu that is activated by pressing the menu button? You probably use the function and detects and what you want. Your code should be something like this: Public Boolean override at @KeyDown (intccode, key event event) {if (keycode == KeyEvent.KEYCODE_MENU) {// Do your own menus come true here; } return false; }

jquery - How do I stop a window.setInterval in javascript? -

I have a javascript function called every 2000ms, I want to stop it, so I can tell the user other things on the page Without it it can be called again. Is this possible? This function is called every 2,000 mms: window.setInterval (function getScreen (sid) {if (window.XMLHttpRequest) {// code for IE7 +, Firefox, Chrome, Opera , Safari Xmlhttp = new XMLHttpRequest ();} else {// code for IE6, IE5 xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");} xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & amp; ; Xmlhttp.status == 200) {document.getElementById ("Refresh"). InnerHTML = xmlhttp.responseText;}} xmlhttp.open ("Post", "getScreen.php? Sid =" + & lt ;? php echo $ Sid;? & Gt ;, true); xmlhttp.send ();}, 2000); There is no built-in "stop" function in it, but you can stop it, And then start a new interval with the same function. First of all, you need to capture the returned ID by calling setInterva...

customization - How to create and configure the custom UserDetailsByNameServiceWrapper in Spring security 3.0.5? -

I am using Spring Security 3.0.5 in my web application based on Spring MVC. We need to check the four parameters for authentication i.e. username, password, company and organization. For this, I've written my own custom authentication token, which shows these four areas. I also have a custom user description service. The normal user default service has loadUserByU name (username), but in my case I need this method to accept all four parameters. For this, I have decided to implement the custom implementation of UserDetailsByNameServiceWrapper which calls call loadserByUsername (username). In my custom implementation, I will just pass the full authentication object instead of the username. How do I plug my custom user distinbsigname service into the Spring Protection XML file? Please help instead of 'create your own' instead of UserDetailsByNameServiceWrapper AuthenticationUserDetailsService This class can be injected with the following spring security c...

winapi - Is there a resize event for screen in Windows -

I have a simple app that is connected to a docking station, when I change the normal position. The problem is I do not know how to detect (and disconnected) when the second monitor is connected so that I can set the state only after connecting. That's why I'm looking for the screen. Revision of incident or similarity. I am working on Windows 7, so I will settle for the same solution for Windows 7, however, if possible I would like a more universal solution. Another thing - it's a VS. 2008 C ++ should be a compatible solution ;-), but I have access to full VS at work, so the requirement of MFC will also be manageable.

layout - Android custom dialog linearlayout size same as dialogs bg image -

मैं एक कस्टम संवाद बना रहा हूँ जैसा कि: डायलॉग myDialog = new dialog (context, R.style.Theme_Levels); myDialog.setContentView (R.layout.levelselector); myDialog.show (); शैली का उपयोग किया गया: & lt; शैली का नाम = "थीम। लेवल" मूल = "@ एंड्रॉइड: शैली / थीम। डायलॉग" & gt; & Lt; आइटम का नाम = "android: windowFrame" & gt; @ null & lt; / item & gt; & Lt; आइटम का नाम = "android: windowIs फ़्लोटिंग" & gt; सत्य & lt; / item & gt; & Lt; आइटम का नाम = "android: windowBackground" & gt; @ ड्रॉएबल / डीएलजीबीजी & lt; / item & gt; & Lt; आइटम का नाम = "android: windowContentOverlay" & gt; @ null & lt; / item & gt; & Lt; आइटम का नाम = "android: windowSoftInputMode" & gt; राज्य अनिर्दिष्ट है; समायोजन करें & lt; / आइटम & gt; & Lt; आइटम का नाम = "android: windowNoTitle" & gt; सच & lt; / item & gt; & Lt; आइटम...

iphone - What are the Microsoft SharePoint Authentication modes supported in iOS -

I am developing an application that can communicate with someone's Microsoft SharePoint sites. I am new to this approach. I have noticed that both SOAP and REST APIs are available to get content details from the site. When I am trying to authenticate the program, it gives "PasswordNetMatching" and I am not able to authenticate. Does anyone know how we can effectively authenticate with SharePoint from iOS. Besides, I came to know that there are different authentication modes in SharePoint, Forms, Windows and Office 365 which are supported by iOS. If anyone knows, please help ASAP. Thanks in advance. Read this: Make sure you read the articles written by Chris Johnson. SeedNot, you are too much to use form authentication at the SharePoint end.

android - how to set dynamically created Radio buttons into a RadioGroup? -

मेरे पास रेडियो बटन हैं जो गतिशील रूप से बनाए गए हैं। LinearLayout linLayRoot = (LinearLayout) dialogView .findViewById (R.id.dialog_layout_root); रेडियो समूह आरआरजीपी = नया रेडियो समूह (यह); linLayRoot.addView (radGp); के लिए (स्ट्रिंग डायर: डीआरेअरे) {LinearLayout linLayNew = नया LinearLayout (यह); linLayNew.setGravity (0x10); रेडियोबुटन radBut = नया रेडियोबटन (यह); /// & lt; - यह बटन काम नहीं करता! radBut.setText ( ""); टेक्स्टव्यू टीवी = नया टेक्स्टव्यू (यह); tv.setText (dir); टीवी .सेटपैडिंग (10, 0, 20, 0); ImageView ivs = नया ImageView (यह); linLayNew.addView (radBut); linLayNew.addView (टीवी); linLayNew.addView (IVS); radGp.addView (linLayNew); } रेडियोबटन radBut1 = नया रेडियोबटन (यह); /// & lt; - यह बटन काम करता है! radBut1.setId (11); radBut1.setText ( "A1"); radGp.addView (radBut1); रेडियोबुटन radBut2 = नया रेडियोबटन (यह); /// & lt; - यह बटन काम करता है! radBut2.setId (12); radBut2.setText ( "बी 2"); radGp.addView (radBut2); Ra...

for loop - PHP - Break after return? -

Do I need to use a break here or will it stop stopping and should be back only once? Returned incorrectly to { ($ I = 0; $ i & lt; 5; $ i ++); // break; } Thanks! This will run only once, stop planting and exit the function / method. It can be argued that this is a bad style return later, which is bad for debugging and maintenance, it is very easy to ignore. Using break may be cleaner: ($ i = 0; $ i

linq group & sum query -

My single unit is a framework object that represents a telephone call. How can I group the dialed numbers? {Number = xxx, durationSum = yyy} by period and project I am a linq novice and can not get it properly. I think you want something like this: var Query = db in call Call group calls by call. Select the number in the new {number = g.Key, avadhisham = g. SUM (c => d. Duration)};

database - finding records in a table where there is at least one record in a linked table with a date field of no longer than 3 moths from now() -

We have a project database in MSACCESS with the following tables: An ID and project descriptions with table projects. Comments with table, an id, a date and a comment text field. Comments are linked to projects with a lot of relationships (a project can have many comments) What I want is a query that is less than 3 months old Selects all projects with at least one comment with date. I tried to enter an internal entry and found the filter properly, but I thought I could filter doubles with specific or specific, but the MSAC cess would not accept the syntax. This is an easy task that will be easy to do in any programming environment, but I can not get it in a single question ... [Update]: I have A little extra question: Records can be shown with at least one comment, and we do not want to show new projects (with any comments yet) I date ("M", -3, DATE ()) and Between DATE ()) a "or count (on select project) Where to try to add comments (comment.commentdate...

c# 4.0 - ASP.net MVC Routing question -

मेरे एएसपी.Net MVC ऐप में मेरे पास निम्न नियंत्रक हैं ExController ExController में इस विधि है जो स्ट्रिंग मापदंडों को लेती है: पब्लिक एक्शन रिजल्ट इंडेक्स (स्ट्रिंग आईडी) {.... पैरामीटर के साथ, पृष्ठ सफलतापूर्वक खोलता है: mysite.com/Ex/Index/my-string-value लेकिन मैं इसे पैरामीटर्स लेना चाहता हूं: mysite.com/Ex/my-string-value यहां मेरी रूटिंग प्रविष्टियाँ हैं: routes.IgnoreRoute (" {} संसाधन .axd / {* pathInfo} "); मार्गों। MapRoute ("डिफ़ॉल्ट", // रूट नाम "{नियंत्रक} / {action} / {id}", // यूआरएल पैरामीटर के साथ नया {नियंत्रक = "होम", एक्शन = "इंडेक्स", id = UrlParameter.Optional } / / पैरामीटर चूक); मार्गों। MapRoute ("पोस्ट", "{नियंत्रक} / {action} / {postId}", नया {नियंत्रक = "पूर्व", कार्रवाई = "सूचकांक", पोस्टआईडी = ""}); मुझे mysite.com/Ex/Index/GetParameter के बजाय mysite.com/Ex/GetParameter टाइप करके ExController को पैरामीटर प्राप्त करने के लिए क्या ...

Increments of a date using Oracle SQL -

We send mailouts using SQL each evening. Especially we want to send a reminder every 3 days, but I do not know at all how to do this, or even if it is possible? Here is my code: from the SELECT * table WHERE condition = 'pending' and (date_created = sysdate - 3 or date_created = sysdate - 6 or date_created = sysdate - 9) Something in that effect, but it is a good way of coding and it is also more effective than I will not need to go to hundreds! ^ _ ^ thanks Try Oracle MOD: from the table * Position = 'pending' and 'm.o. (sysdate-date_created, 3) = 0

DOS batch command -

I wonder if anyone can help me in the DOS batch command script, the script will run two applications, that is, app1.exe , And app2.exe. First app 1.x will run and ap 1.Ax run after APA will run AP 2.x will run. (Please app1.exe must run before app 2.exe starts) Please. Use "call" call call app1.exe App2.exe

Show individual lines of text sequentially from the textView in android -

I'm making an infection for a text view in Android. The current text view has been switched on and the next text view is shown with a bounce animation. I am currently getting full text view, but I need to see the line after the text, how does this happen in MS PowerPoint, like many bullet points are second after another. Can anyone explain how this can be done? Regards, Vasudev Use vertical linear rhythm in which each row of text Use AnimationFactory in which there is a function inFromLeft that you can animate them in the SetVisibility (View.VISIBLE) .

php session problem -

I think this code should be "first" echo in the first experiment and after refreshing it should be timestamp echo, But it will show first if (isset ($ _ session ['test session']) {echo ($ _SESSION ['TestSession']);} Else {resonant "before"; $ _SESSION ['Test session'] = time ();} have you kept session_start (); at the top of your page?

Why is java.util.Observable not an abstract class? -

I have just seen that java.util.Observable is a solid square. Since inspection is to be expanded, so it seems strange to me. Is there any reason to apply it like this? I found that which is called This is a visible square, so the section receiving it should be determined in advance, as Java is only a single succession Allows But it does not really convince me, in fact, if there was insightful essence, then the user would be compelled to determine the class from it. As the first approach, it may think that the user is allowed to use the structure instead It is a heritage, which is very convenient If your class has already been from another class , and you can not even inherit from the observation class. But if we look at the source code of the observation, then we see that there is an internal flag the private boolean changed = false; Each time the notification oscillator is implemented: notify the public zodiac (object arg) {object [] arrLocal; Synchronize ...

AES decryption error in java -

I am working on AES algorithms and I get this exception: javax .crypto BadPaddingException: It com.sun.crypto.provider.SunJCE_f.b Given the com.sun.crypto.provider.SunJCE_f.b last block right on com.sun.crypto (DashoA13 * ..) not padded (DashoA13 * ..) .provider.AESCipher.engineDoFinal (DashoA13 * ..) javax.crypto.Cipher.doFinal (DashoA13 * on org.enterprisepower.io.MyEncryptTools.decrypt ..) (MyEncryptTools.java:41) org.enterprisepower.io but but. IOUtils.copyStream org.enterprisepower.net.portforward.Processor $ Copier.run (Processor.java:99) to (IOUtils.java:132) (unknown source java.lang.Thread.run) encrypt messages in myClient program exception decryption and cipherMessage recieve MYSERVER program.After server is cipherMessage send throws exception above, but the customer I can decrypt the same cipherMessage are part.I. (I check it with the bytes printing on both sides ...) This is my code again: // This is both client and server public byte [] The decrypt method fo...

google chrome - Why does drawing an animated gif on canvas only update after reselecting the tab? -

I would like to display animated GIFs on the canvas with some of the changes implemented. To check things, I am currently trying to display only Animated GIF on Canvas so that it is routinely routed to GIF regularly and lt; Img & gt; is the same as displaying in the tag. P> I am using Chrome and webkitRequestAnimationFrame . On each request frame, I draw a picture. When the gif frame changes, it should be visible on the canvas. It only works partially: Just viewing the canvas does not update it Selecting the tab (i.e. to make another selection and selecting the canvas tab) Updates it to a new frame, but after that it freezes it again. This is a Bella I have installed. How can an animated GIIF attract me on the canvas actually animating with it ? the answer is no longer valid It looks like the behavior described here (a img tag refers to an animated GIF one canvas result, which is written in different frames of GIF, if img is a part of the DOM or is ...

c# - "potentially dangerous Request.Form value" -

I'm getting the error A potentially dangerous request. The form value was detected by the client When I apply my application (error does not occur when I run through a local host). This happens when submitting a form, because one of the fields is HTML. I've added the model around the [AllowHtml] property to a model that matches the offensive field, but it does not seem to work. For the obvious reasons, Do not want to use [ValidateInput (false)], and at any rate that does not seem to work. Is there any other configuration what should I do? I have read that & lt; HttpRuntime requestValidationMode = "2.0" /> The web config file can fix it, but I do not want to add it again because I still need secure verification for other parts of my app. Any thoughts? [AllowHtml] need to be added & Lt; HttpRuntime requestValidationMode = "2.0" /> (Setting this value does not mean that you can not get secure verification, it's j...

c# - How to raise event when new event has been written? -

How do I raise my own events in C #, when the "new audit event" management section in the computer event log ... ). Take a look at this code-project sample:

php - Where to set module specific global variables and how -

I am creating some big applications using Kohana 3.1. Like the definitions, I am trying to set the module-wide variable with some key = key => Values. To give an example, if it was a user module, then I could get the available profiles like $ profile = array ('user' = & gt; array (' ('Desc' = & gt; 'normal user', 'access' =>,' 1 '),' zonohoe '=> array (' desc '= & gt;' user is not logged ',' access' = ' > 0)); and use $ profiles on all your modules, but not outside. Should I set it in init.php? If so, then how? Use protected assets in your module class. protected profile = array (); Somewhere in the module: $ this-> Profile = Array ('user' = & gt; array ('desc' = & gt; general user ',' access '= & gt;' 1 '),' jonhhooya '= & gt; array (' desc '=' & Gt; 'user not logged', ...

iphone - How to select an annotaion and pass an id to specific detail page? -

I added bpid as a string in myannotation class custom and the rest is: - (Zero) MapView: (MKMapView *) mapView AnnotationView: (MKAnnotationView *) View CalloutAutomatic Control: (UIControl *) Control {DLog (@ "calloutAccessoryControlTapped"); Open the page in /// Detail, but do not look for Bee MyNnnotation * myAnnot = (MyNnotation *) BeepsDetail * objCont = [[BeepsDetail alloc] initWithNibName: @ "Bipsditter" bundle: zero]; ObjCont.mId = myAnnot.beepid; ObjCont.modalTransitionStyle = UimodalTransitionStyleFlipHorizontal; [Self current model view controller: objCont animated: yes]; // [Paramodic Set Value: [MOBJECTMDIC ObjectForcae: @biped]] for: @ "Bipid"]; [ObjCont release]; line NSMutableDictionary * dic = [ PlaceName ObjectIntextX: MKNotationview Encryption]; returns an error because MKAnnotationView is class and there is no annotation method in the class View MKAnnotationView was selected since view.notation will be use...

android - EditText: show input window, retrieve text, and change its height -

Image
In my project, I have a list of the products available in the table-layout. I need two things. When a user clicks on EditText , the numeric keypad should be displayed below. After entering the user numeric value, how can we get edit text box value? I have EditText such as: EditText txtQty = new EditText (this); TxtQty.setTextSize (2, 12); TxtQty.setHeight (4); TxtQty.setWidth (6); TxtQty.setId (i); TxtQty.setInputType (InputType.TYPE_NUMBER_FLAG_DECIMAL); TxtQty.setText ("0.00"); Tr.addView (txtQty); How can we reduce EditText box height? I did, but he did not make much change Please give me an idea ... Thank you in advance You can use 2 events to get it. First of all, the test has been shaken if you edit, every time you want to get text from the editing text. The second is the OnDownLastner, you can check whether the key is equal to entering or not. GetText () ToString () is used to obtain the text of the editing text, here is a code snipp...

.net - WCF WebService Replication -

I would like to repeat the web-service given for simulation purposes. The main idea is that the new The service applies the same interface as the existing one (which I do not control in any way) but with different actual method implementations Again, I would like to be able to redirect the request to a real address or in a test situation without simulating one without changing the configuration. Is this possible in WCF? In the case of actually copying service, if the existing service is exposed, then metadata, i.e., the WSDL , You can essentially recreate the service as follows: Browse wsdl and save all xsd wsdl references and all them on disk With those files, to run the wsdl.exe utility, make it to wsdl and xsd and use the / si option to create a service interface. The output will be an interface file (c # file) Visit Visual Studio and create a new project of "WCF Service Application" Initial Service Rename 1 (and interface) files and sections to your new s...

php - Preserving the alpha channel when quantizing image in ImageMagick? -

I am currently trying to measure an image using ImageMagic in PHP, which works fine, alpha channel Is not preserved. If I repeat through each pixel and calculate the number of pixels with 0 alpha values ​​before quantization, then this is correct, but after the quantization, almost all the images have alpha value of 0. Is there a way to preserve this data through the qualification process? While using command-line imagemagic tools, a way to ignore alpha channels: convert alpha_greatient - transparent + exception-color 15 alpha_colars_15qt.png whether the option "transparent" What does PHP look like?

Java Object Reference and Java Methods -

I am unable to understand how it works public Zero addToRule ( Rule r) {If (GetRuleList (.) Contains (R)) {getRuleList (). AddElement (r); }} If I run this code: obj.addToRule (r); Println (. GetRuleList () included (R)); It prints true how can it be? btw ruleList is a vector member of the main category and this is not a stable variable (does not seem to be so but sharing anyway). import java.util.Vector; Public Class RuleEngine {Private Vector Rule List = New Vector (); Public vector getRuleList () {return rule list; } Public Zero AddToRule (Rule R) {If (GetRuleList (.!) (R)) getRuleList (). AddElement (R); } Public static zero major (string algos []) {RuleEngine re = new RuleEngine (); Rules R = New Rule ("Rule 1"); Re.addToRule (r); Println (.re.getRuleList () includes (R)); }} Class rules {public string name = ""; Public rule (string name) {this.name = name; }} Okay people have told me that this works because of passage in the context o...

java - Android slow AES decryption -

referee: I'm preparing an Android app for which a big package of AES decryption Required (~ 50MB) and Android Inbuilt Ace decryption mechanism (approximately 5 minutes) is really slow when applied. Based on the above positions, I tried to use NDK and to use native libraries (openssl) for this app However, openssl for Android actually has a large number of files and I Do not know which files .so use to create files. I am quite uncomfortable using the NDK and native code in the Android app and any suggestions / sample code on how to use the openssl library for AES decryption would be really useful. Try a recharge bouncy castle that does not collide with anybody released with Android. There is an old on the Android system (even if you have a release of Android that includes it). This should only be your requirement

simulink - Matlab: How to see a simulations results -

Image
I'm going to find out how to make a simulation in order to use 'workspace' and 'workspace' blocks The .mdl file is doing a little exercise as you see in the picture below. I get something in the workspace from Simulal, a variable is called 'simout', but I do not know how to enter this variable. Can anyone tell me how to see the results of my simulation? I enter the name of the variable 'simout', but I could not find anything, only this message: simout = time: [] signal: [1x1 struct] blockName: 'Fromworkspace / to Workspace ' Thanks a lot! data is in simout.signals.values ​​ and the time is in simout.time .

iphone - UIButton under UIView should NOT be clickable -

I have a view with some UIButtons on it. I add another - semi transparent - to see above all, displaying some information to the user (in fact, this is a self-model modal-alert). But under the semi-transparent view the buttons react on the tap. However, this should not be done. How can I stop the button with the tap? setting, semi transpier VINOTOff now.User interaction disabled = yes; This problem should be solved but, if the problem persists, then try, semi-transpiration will not takeoff all. Exclusive = Yes;

java - How do I resolve duplicate property errors in this j2ee schema? -

I inherited a J2 EEE app written for deployment on Weblog 10 and primarily for this application Developer developer does not get this error when he opens the project in Eclipse. I have the following very simple weblogic.xml file: Eclipse causes a single XML validation problem for this file, which is actually a number of the same errors, the parent text of the XML problem is: The errors below were found when validating "j2ee_1_4.xsd" file through the file "Weblogic.xml". In most cases these errors can be detected by verifying "j2ee_1_4.xsd" directly. Although it is possible that errors will only be available when j2ee_1_4.xsd is valid in the context of weblogic.xm And an example of hair errors they all read like this: sch-props.correct.2: with the same name in the schema There can not be two global components; This schema contains two versions of 'http://java.sun.com/xml/ns/j2ee,descriptionGroup'. There is a line number aft...

c++ - Inertia must be positive definite -

I am writing a game in C ++ using the Open Dynamics Engine. When I run it, I get these errors: ODE MESSAGE 2: Inertia must be positive in DMSak (file). / .. / ......... / / / ID / SRC Mass.cpp line 53 Ode message 2: Inertia must be positive in the DIMAS check () file .. / .. / ..... .. / / / / RSC / MSCPPP Line 53 ODE Internal Error 1: Logic "DMassCheck (mass)" dBodySetMass () failed [../../../../../ ode / src / ode. Cpp] I have this code: zero physics :: addObject (dBodyID * body, dMass * massPtr, dreal mass) {* body = dBodyCreate (world) ; DMassSetSphereTotal (massPtr, 2.0f, 1.0f); DBodySetMass (* body, massPtr); DBodySetPosition (* body, 0.0, 0.0, 0.0); } I call it physics-> gt; Calling by addObject (& orb.body, & orb.mass, 1.0); MassPat structure contains an inertia tensor Tensor (only one matrix in this context) should be positive, we can say all this until you tell us where you got your massptr .

ANDROID: I need to create a static menu at the top of the view (like Create, Edit) -

I have a menu about it, to exit. But I have to make another stable menu for options. Such as: create, edit list and when I press the menu button (exit, about) . If you can help, then it will be right. Thanks, have a nice day. Please see the post, and do not do anything with what you want in a second post, This is a nifty way to decorate your UI by adding quick action. The first post shows you how to create "actionbars" for Android.

ruby - How to get a reference to a 'dynamic' object call? -

Good, my question is not very clear, but what I want to do is: Average = [1, 2, 3]. Inject (0) {| Sum, el | Sum + el} / this.size The above code will not work on this due to the ridiculous call, but what I want to achieve is a reference to the array In which I am injected (in this case [1, 2, 3]), I did it with this while looking at my ignorance in Ruby, but can you please tell me How to do that? Is it possible to do without a variable reference at all? Thanks in advance! In Ruby there is not that the closest thing is itself. Here are some examples to help you #example 1 is not a required number of self array numbers = [1, 2, 3] numbers. (+) To_f / numbers.size # Example 2 which gives access to self and gives self # So why the total variable is needed = = [1, 2, 3]. Tap {| A. Total = a.reduce (: +). To_f / a.size} #Instant_Aval hack that reaches itself, and the latter block is an expression # can return the average without an additional variable [1, 2, 3] .ins...

jquery - Problem using $.when() with post actions -

जब ()। तो निम्न स्थिति में पैटर्न: $। जब (SetServerValue ("true")) .then (function () {console.log ('नया मान सेट कर दिया गया'); performSomeOperation ();}) .fail (function () {alert ('server value not set!') ;}); Var setServerValue = function (newValue) {वापसी $ .post ('http: // myURL', {key: newValue}); }; यहां समस्या यह है कि 'फिर' या 'असफल' आपरेशनों को कभी भी $ .post () ऑपरेशन का उपयोग नहीं किया जाता है। मैंने सफलतापूर्वक $ .get () कार्यों के साथ इस दृष्टिकोण का उपयोग किया है, और अगर मैं एपीआई दस्तावेज़ों को सही ढंग से समझता हूं (जाहिरा तौर पर नहीं), तो यह $ .post संचालन के लिए भी काम कर सकता है। क्या कोई मेरी सहायता कर सकता है इस? धन्यवाद! समस्या यह है कि setServerValue को फ़ंक्शन के रूप में परिभाषित नहीं किया जाता है जब आप उसे कॉल करते हैं $ से ऊपर setServerValue की अपनी परिभाषा को स्थानांतरित करें। जब कॉल करें। कार्य उदाहरण:

Scrolling tabs in Android Froyo -

7 tiles have been copied halfway and have also brought a copy of the action bar component from Honeycomb and they have just one very attractive tab bar. I know that ActionBarSherlock is a very good job of copying a beautiful action bar, but I was hoping half that someone was aware of the solution designed for the tab bar. It should be simple enough to make a copy (just some text labels that scroll sideways with scenes), but my time is short and experience is limited. Does anyone know about a good component or demo about it? You have to be included in your project. The widget you are looking for is VisiblePower : A visual set that manages the layout for hair ideas, which the user can swipe in between . Pager Adapter: An adapter that populates the ViewPager with visible visuals on each page. Android Dev

java - Spring form errors from property file -

I am using the Spring Form tag library and I want my message error messages to be taken from some messages. Properties file, I jsp: & lt; Form: form method = "post" action = "" commandName = "client" & gt; & Lt; Form: Input path = "name" /> & Lt; Form: Errors Path = "Name" & gt; & Lt; Input class = "button" type = "submit" value = '& lt; Fmt: message key = "login.submit" /> & gt; & Lt; / Form: Form & gt; The value of the Submit button is loaded from some message / source file (& lt; fmt: message key = "login.submit" />), and I want my error message to be loaded from there, I have tried the following, but it does not work: & lt; Fmt: message key = '& lt; Form: errors path = "name" & gt; '/ & Gt; This simply gives returns ?????? You can do this as you are trying to do nest JSP tags ( Alth...

validation - nyroModal v2: How to validate form opened in iframe? -

I am trying to figure out how to open a form opened by nyroModal. The page is opening as a button click below: $ (function () {$ ('.btnedit'). Click (function () {$ .nmManual ('form_page.php);});}); On the form that opens, I have some fields which are mandatory and cancellation and amp; submit button. & lt; A class = "neeromodelclos button" href = "#" id = "btn_submit"> Submit & lt; / A & gt; When clicking on the Submit button, I want to make sure that the mandatory field is valued. If not, an error message should be displayed & amp; The modal window should not be closed. I am trying to use jquery verification plugin but without success Regardless of valid scripts, the modal window is always switched off. I have not got much information about form validation in a model window. Is not this a favorite approach? Thanks in advance. I am not able to help you about jquery validation plugin in a modal wi...

iphone - Accessing self.view from a static library -

So I'm building a static library for iOS, basically I want people to make some calls like this : [MyStaticLibrary showview] And to add a subview to my static library in their current view Generally I can do something like this: CGRact mainframe = [[USScreen main screen] border]; UIView * mView = [[UIView alloc] initWithFrame: Mainframe]; // Add some stuff to view [self.view addSubview: mView]; But the xcode is complaining, and correctly, that I can not see myself from the stable library because I am currently using NSObject in my stable library. Is there no way for me to reach "self.view" from my static library, so can I add a view to the application screen? 1) You can set your show view method to showViewInParentView: and give the caller the view you need. 2) You can use the [[UIApplication sharedApplication] keyWindow] addSubview: mView] to directly add to the window, make sure it is at the top. I recommend # 2 over # 2.

base64 - Is Content-Transfer-Encoding an HTTP header? -

I am writing a web service that provides a base 64-encoded PDF file, so my plan Feedback: Content Type: Application / PDF Content-Transfer-Encoding: Base64 My question is: What is the Content-Transfer-Encoding Is a valid HTTP header? I think it may only be for MIME if not, so how should my HTTP response be represented to represent this fact that I am returning a Base 64-encoded PDF? Thank you. Edit: It seems that HTTP does not support this header. From: Note: While the definition of content- MD5 is exactly the same, for RIM 1864 in RFC 1864 for MIMIT unit-bodies, there are several ways in the content-MD5 to the HTT institution-bodies MIMIT is different for unit-bodies from its application. One is that HTTP does not use content-transfer-encoding, contrary to mime , and uses transfer encoding and content-encoding. Should I set my header? Thank you. Edit Many code samples found in the comments of this PHP context manual page assume that it is actually is A...

localization - SharePoint 2010 localisation of links in Webtemplate -

मैंने एक वेबटैप्लेट (http://msdn.microsoft.com/en-us/library/ms434313.aspx) को बनाया है SharePoint और onet.xml में शीर्ष नेविगेशन के लिए स्थानीय नेविगेशन पट्टी के बाद जोड़ा गया: & navbar नाम = "$ संसाधन: ओएसआरवकोर, एसएसएपी प्रशासनटॉपबारबिटिटल;" आईडी = "1002" & gt; & Lt; NavBarLink नाम = "$ संसाधन: osrvcore, HelpText;" यूआरएल = "डिफ़ॉल्ट.aspx" / & gt; & Lt; / NavBar & gt; फिर मैंने टेम्पलेट के आधार पर एक वेब साइट बनाई और बहुभाषी को चालू कर दिया। समस्या यह है कि नेविगेशन बार हमेशा एक भाषा में रहता है और वेबसाइट की वर्तमान भाषा को कभी भी स्थानीयकृत नहीं किया जाता है। अगर मैं साइटमैटप्लेट में एक ही XML फ़ाइल का उपयोग करता हूं तो सब कुछ ठीक से काम करता है। अगर मैं नेविगेशन नोड्स प्रोग्राम को जोड़ता हूं तो सबकुछ भी ठीक काम करता है। क्या किसी को पहले से ही इस समस्या थी? मैं नोड्स प्रोग्राम को जोड़ना से बचाना चाहता हूं क्योंकि स्थानीयकरण पूरे onet.xml फ़ाइल में जाता है। उत्तर: हमने माइक्रोसॉफ्ट का समर्थन मामला बना लिया...

Calling typeof operator in jQuery Template data tags? -

Is it possible to call typeof (x) within a data rendering template tag? $ {typeof (x)} workaround i typeof operator works as a custom template function and it works fine, but I want to avoid the extra level of additional redirection if I can. // javascript $ calling ("# reflectTemplate"). Tmpl (data, {getType: function (itemToCheck)} {return typeof (itemToCheck);}}) .Andendo ("result"); & Lt ;! - Template tag - & gt; $ {$ Item.getType (prop)} what you want to be a string One or both of these should work in most browsers: $ {string (prop ())} $ {typeof (prop) + '}}

Jquery onclick event to change to onload -

I am using the following code that works when I click on link 1, what do I want to do I should automatically fire the pageload event on the talk, how to do it? & lt; Head & gt; & Lt; Title & gt; JQuery Test Page & lt; / Title & gt; & Lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Function load communication (element selector, source url) {$ ("+ + element selector +" ".log (" http://abc.com/ "+ sourceUrl +" ");} & lt; / script & gt; & Lt; / head & gt; body & gt; & lt; a href = "javascript: loadContent ('# content', 'displayimages.php');" & gt; link 1 & lt; / a & Gt; & lt; div id = "content" & gt; content will be loaded here & lt; / div & gt; & lt; / body & gt; & lt; / ht...

ios - How can I configure Xcode so GDB prints SIGABRT error information? -

I am using Xcode for one year and when my iOS app receives any, then it is GDB window information has stopped like SIGABRT or EXEC_BAD_ACCESS etc. now when I generate any kind to run applications and I SIGABRT: thread 1: Shows signs Received: "SIGABRT" However, in the debug output window where the error details and Stack trace I will not normally get any output. Debugging really makes it harder -. I have to set random breakpoints until I move through the program and the line that is due to SIGABRT to find and fix the problem can be very difficult without any debugging information. When I enter the "information signal" in the gdb window. SIGABRT Yes Yes Yes Abortion There is any information for the setting, which I think is correct I can use the same way to get noticed is to set up a break point: (gdb) FB - [NSException increase] (gdb) FB objc_exception_throw ( gdb) FB malloc_error_break and then when sigabrt I would use (gdb) set $ excep...

php - Add properties to object using array keys -

Is it possible to build such a way? Say I have such an array: $ names = array ('name1', 'name2', 'name3'); $ Value = array ('value1', 'value2', 'value3'); And then I want to do the following: foreach ($ name as $ field) {$ this-> $ Field = $ values ​​[counter counter]; $ Counter ++; } So that afterwards, I can use the said object like this: $ var1 = $ object-> Name1; $ Var2 = $ object- & gt; Name 2; // output "value1" echo $ var1; // output "value 2" echo $ var2; I am an object that is a dynamically designated field. Is it possible with oo PHP? Yes, you $ object = (object) array_combine ($ Name, $ value); As suggested by @Sam, works better

php - catching nested button clicks -

I have php code on a page that generates a series of buttons, such as: (in a loop) echo " Then I have a junkie that catches those clicks, and also creates a button: $ ('input: button'). Click (function () {$ (This) .next ("span") attachment ('You clicked this button!'); $ (This) .next ("span"). Attachment ('& lt; input type = \ "Button \" event = '+ EventID +' id = \ "submitbutton \" value = \ "send \" /> '); $ (' # submitbutton ') (function () {}} My purpose is to capture all the button clicks on the page correctly. (Any order on which they are not clicked, the PHP generated buttons can be used in the same way Should behave, the secondary button is a different one Should behave in a manner) In the code given above, it works correctly in advance, lets you click on the button and create a secondary button for each. But once When you click on a secondary button, it star...

xml serialization - Tweak output from XmlSerializer in C# -

I am thinking that there is a way to change the XmlSerializer in C # that is to convert it to a property of an object Does output to. For example, if I have something like this: public square michael {public string prop1 {get}} public UIT prop 2 {get;} public MyClass2 class2 {get;} public MyClass3 class3 {Get; }} Public class MyClass2 {public string prop3 {get;}} public class MyClass3 {// I want to serialize a lot of properties} Now in my code, I have something like this: Private Zero Serializestaff (list & lt; MyClass & gt; list, string path) {XmlSerializer serialize = new XML CERTILIZER (typef (list & lt; MyClass & Gt;); Text writer author = new streamer (route); Serialize.Serialize (author, list); Writer.Close (); } What do I want to do is to work in serialization as normal, but with some other stuff with prop3 has been replaced Example: & lt; MyClass & gt; & Lt; Prop1 & gt; Whatever & lt; / Prop1 & gt; & Lt; Prop2 ...

javascript - First jQuery plugin, am I on the right track? -

So I think it should be very simple ... its just a custom checkbox plugin that takes from div and checks them CSS changes in I really need to do this, basically swaps CSS and triggers events. I just need to do these tasks (init, check, uncheck, toggle, disabled). In any way that I've done so far, but the toggle method and IM on the last part in general .... } {$ (This) .addClass ('cb-unchecked'); $ (this) .click (// to call the toggle method, but uncertain syntax);}, check: function () {return.Each (function ('Cb-check') Trigger ('check', this);})}, uncheck: (function) () {$ (This) .removeClass ('cb- disabled cb- uncheck') Return Adultus ('CB-Czech'). Trigger ('uncheck', this);});}, toggle: function ()) {Return this. Every (function () {var t = $ (this); if (t.hasClass ('cb-checked')) should call {// check function, but I do not know how ...} Else if ( T.hasClass ('cb-unchecked')) {// call uncheck function, but I d...

iphone - Scroll view - How to keep the objects in the view -

I have a scroll view that has many textfields and then some UISwitches and UIButtons followed by more textfield . I found the textFieldDidBeginEditing event and that view is used to view textfield . But I have not found anything similar to other items like UISwitch and UIButton . Is there something that does that? Below is the code that I use for textfields - (zero) textFieldDidBeginEditing: (UITextField *) textField {[auto-scrollwitocent offscreen: textField]; } - (zero) scrollview cursoroffscreen: (UIView *) theView {CGFloat viewCenterY = theView.center.y; CGRT applicationframe = [[USScreen main screen] applicationframe]; CGFlot availableHight = applicationFrameSizeHight - _KeyboardHigh; // Remove the area covered by keyboard CGFloat y = viewCenterY - Available Hits / 2.0; If (y & lt; 0) {y = 0; } ScrollView.contentSize = CGSizeMake (applicationFrame.size.width, applicationFrame.size.height + _keyboardHeight); [ScrollView Set Content Offset: CGPointMake (...