Posts

Showing posts from August, 2015

regex - Perl: Can I use capture groups in variables used in text replace regular expressions? -

Just for fun, I'm very new to Perl and I'm trying to write a simple text processing tool, But I 'm going to read the rules of the tool stuck in a simple thing, from a simple text file (not to the script, and perhaps it is important), to process a text file, there is an array of patterns / patterns in pairs (Like each for each process Yum line ). Here is the sub to apply the changes: My ($ text, @ rule) = @_; My @ lines = partition (/ \ n /, $ text); Forex Currency (@Rules) {My $ pattern = $ _- & gt; {"Pattern"}; My $ substituted = $ _- & gt; {"Substituted"}; $ Rows = map {$ _ = ~ S / $ pattern / $ substituted / g; } @ Lines; } Join the return ("\ n", @lines); For example, if there is a rule like pattern = [aeiou] + replace = * , then the text foo bar to F ** B * r . That's what i want Although I do not know why I can not use the capture group to change the text content, pattern = ([FF]) + in me Oh times I...

c# - DataGridView DateTime Picker Cells Automatic Value Adding -

I would like to set one of my columns in my DataGridView in such a way that when users edit any cell in this column Does, a datetime picker appears. I copied the required classes to do so by MSDN Post. When I fill my DataGrid view with data, I do this by using the following code: MySqlDataAdapter daClients = New MySqlDataAdapter (sql, cnManageMembers); DaClients.Fill (dtClients); Binding source bsClients = new binding resource (); BsClients.DataSource = dtClients; DgvClients.DataSource = bsClients; BnClients.BindingSource = bsClients; This filling method uses a binding source to fill the datagrid view, and it automatically takes care of things like adding the required columns and cells, though I can get them in their column One needs to change the cells. What code can I apply to this so that I need to add every cell manually and value it. Instead (taken from MSDN Post): DataTable dtClients = new datatable); Calendar column column = new calendar column (); This.dataGridView...

ios - Get HTML body text only, no tags -

Image
I have no knowledge of background or web development / designing and I currently work on an email client application on the iPhone I am using UIWebView for reading / writing e-mail. I download emails as an object and let me bring topic, date, address and body from this object, but there is an HTML string with email body tag. My Goal: to view the email body as a normal string without tag, such as the iPhone Mail app, or the Gmail app. This is a good example: Thanks! Use UITextView with NSAttributedString Or label whatever you want NSString * oldHTMLstring = @ "& lt; b> testing . & Lt; Br> & lt; i & gt; HTML & lt; / i & gt ;, & lt; br & gt; & lt; u & gt; Body text. & Lt; / u & gt; "; NSAttributedString * newHTMLstring = [[NSAttributedString alloc] initWithData: [Old HTMLstring DataSetting Encoding: NSUTF8StringEncoding] Option: @ {NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharact...

javascript - jQuery keyup working incorrectly -

I am trying to increase an integer variable every time the Enter key is pressed, this variable then returns the value from an array is used to. $ (document) .keyup (function (e) {if (e.keyCode == 13) {console.log (+ ($) ($ "'), $ (' # ('Background', "# 4b84e5")} and if (outside [currSteps]. (Outrage [currsteps]% 2 == 0) {$ ('body'). ] == 1) {$ ('body'). CSS ("background", "# 9d622"}} and {$ ('body'). CSS ("background", "# d16323")}}}) ; The problem occurs when I actually press Enter on the first press, it works properly, and increases the variable currSteps and the next in the array Displays the value. However, when I After pressing Enter, it returns it back to the original value of currStep , as long as the entry is placed below, it will display the default value Now, yes , This event is for funnel , so it is understood that things will work oddly on the keydown however ......

json - How to handle big object sent on socket java? -

I am trying to implement a client-server in Java and I created a connection between sockets Send JSON objects as strings on currents If I have a large object then there is no way to handle it So I do not have to re-group it because TCP Size of packet size (Do not know that the single object as the customer Is completely transferred or not) Note: I am using G-son to convert objects into a Jasonan object. This is a way of handling, so I do not have to recreate it because the limit size of the TCP packet Just do not have the data to take care of TCP packets size (Do not know when a Bjekt not yet been completely moved me as a client right now) Yes, you can. You reach the closing '}', as is the mention of @tefenck Your question has been set on false assumptions.

dart - pass Polymer data binding through a Javascript function -

I am using polymers and darts to create a list of point coordinates. It provides a list of digits in html. However, I want to convert points from one coordinate system to another by using the Javascript function. In HTML darts-polymers: & lt; Repeat template = "{{grid_points}}" & gt; & Lt; Core-item & gt; {{P}} & lt; / Core-item & gt; & Lt; / Template & gt; I found a library in Javascript: grid_to_godetic (x, y); Grid_points is a list of numbers. How can I pass PX and PE through JS function and how do I get results given at the place of P in HTML Template? You can use it for: & lt; Repeat template = "{{grid_points}}" & gt; & Lt; Core-item & gt; {{P | Grid_to_godetic}} & lt; / Core-item & gt; & Lt; / Template & gt; ... & lt; Script & gt; Polymer ('your element', {grid_to_godetic: function (point)} {return point.x + point.y;}}); & Lt; / Script & gt; The...

openshift - App not coming up: SEVERE: Error listenerStart -

I am using Tomcat 7 Jabos EWS 2.0 for my web application. My build and deployment are ok but the app is giving 404 error after checking Jbossews logs, I see EVERE: Error Listener Start Is giving up. The app is running fine on my locality, I went to stack overflow through threads, but I did not get much help. Any ideas are really appreciated log: ==> App-root / logs / jbossews.log & lt; == 26 July 2014 8:53:01 pm org.apache.catalina.startup.Catalina addClusterRuleSet information: Cluster rule set [java.lang.ClassNotFoundException: not found due to org. Apache.catalina.ha.ClusterRuleSet]. Cluster configuration is disabled July 26, 2014 8:53:01 pm org.apache.catalina.startup.Catalina addClusterRuleSet information: Cluster rule set not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet] . Cluster configuration is disabled July 26, 2014 8:53:01 pm org.apache.catalina.startup.Catalina addClusterRuleSet information: Cluster rule set not...

c# - HttpUtility.HtmlDecode() fails for some characters -

यह कोड देखें: नामस्थान TestHtmlDecode {Microsoft.VisualStudio.TestTools.UnitTesting के माध्यम से; System.Web का उपयोग कर; [टेस्ट क्लास] सार्वजनिक वर्ग TestHtmlDecode {निजी स्ट्रिंग कन्वर्ट (स्ट्रिंग इनपुट) {वापसी HttpUtility.HtmlDecode (इनपुट); } [TestMethod] सार्वजनिक शून्य TestLeftBrace () {Assert.AreEqual ("{", कन्वर्ट ("& lbrace;")); } [टेस्टमिनेशन] सार्वजनिक शून्य टेस्टग्रेसरटैन () {असाइन करें। एरेक्वॉल ("& gt;", कन्वर्ट ("& amp; जी;")); }}} TestGreaterThan पास करता है, लेकिन TestLeftBrace विफल ( कनवर्ट रिटर्न & lbrace ; )। ऐसा क्यों है? ऐसा लगता है कि यहां दो चीजें हैं। & lbrace एक है (और नहीं [() यह & lbrace की तरह नहीं दिखता है ज्ञात वस्तुओं की सूची में शामिल है स्रोत कोड यहाँ है जो यहां मिले संस्थाओं की सूची को संदर्भित करता है

python - Where and how to download and install PyROC -

I'm new to learning the machine and trying to plot ROC to determine the sensitivity and uniqueness of your logistics regression I am here. I think there are built-in modules in Python with PyroC to facilitate this process. However, I have seen everywhere on the web, but I can not seem to know that I can download a package with PORC. (PIROP will not work until this package / module is downloaded). Can you please talk to me that in my program can I download the necessary package for using the PyROC function? Thanks! I think you have to download it from here: I do not see a Pip installable version.

regex - Removing duplicate characters from pairs -

Image
I have a document in Notepad ++, where combinations of characters can be doubled in each line and I want them to be Should be single. For example: ((AA11bb 88 ccc)) - & gt; (A1B8CC) This is removing a duplicate character for each pair (2) characters. Hope you can help. Use capturing group and backference. Find: (.) \ 1 Replace with: \ 1

ios - How to get reference to UIPopoverController when using adaptive segue? -

In my iOS 7 app, I came to know whether a SEGU was a popup by this check readyForSegue But now when I am using the adaptive segment, As long as there is no longer present in the investigation above are returning the truth. The reason for this is that segue is no longer UIStoryboardPopoverSegue , instead it's a UIStoryboardPopoverPresentationSegue . However, no one can add the word presentation because it is not defined. What is the proper way to find out when the Exgeive is poppo from Segue , as opposed to a full-screen model presentation? And, How can you get the reference of popover for iOS 8 ? The following is the one who is doing it for iOS 7 but again because it is not a UIStoryboardPopoverSegue , it will cause an accident. UIPopoverController * popover = ((UIStoryboardPopoverSegue *) segue) .popoverController; Popover.popoverContentSize = CGSizeMake (380, 1000); There was really no need for iOS 8 in terms of popover. You submitted popover present...

java - fill form programmatically in Android Webview - JavaScript -

I am trying to fill the form automatically from my school's website. I have seen some ways with javascript Here is my code: @Override protected Zero onCreate (bundled savedInstanceState) {super.onCreate (savedInstanceState); SetContentView (R.layout.navegador_siiau_layout); Navegador_siiau = (webview) Find VVBiID (R.DDWWI_NEVEVER_SIU); Navegador_siiau.getSettings () setJavaScriptEnabled (true). Navegador_siiau.loadUrl ("http://siiauescolar.siiau.udg.mx/wus/gupprincipal.inicio"); Document.getElementsByName ('p_codigo_c'); String pwd = "FENMAA"; View.loadUrl ("JavaScript navegador_siiau.setWebViewClient (the new WebViewClient () {Public Zero (for viewing WebView, string URL) {string user =" 207,512,134 "onPageFinished.value = '" + user + "'; document.getElementsByName (' P_clave_c '). Value =' "+ pwd +" '; ");}}); } The result is an empty page, whose final string I try to put in th...

c++ - If i have a structure x , then does the statement struct x e={"tiger"} means? -

वहाँ एक संरचना x हो तो उसके ऑब्जेक्ट की घोषणा struct xe = {"tiger"} कोई अर्थ रखता है। void main () {struct x {char नाम [20]; इंट उम्र; फ़्लोट सैल; }; Struct x ई = {"बाघ"}; अदालत के & lt; & lt; e.age & lt; & lt; e.sal; getch (); } एक छोटा सा प्रोग्राम है और यह 00 के रूप में आउटपुट का उत्पादन करता है। मेरा प्रश्न संरचना दिए गए एक्स के ऑब्जेक्ट ई की घोषणा के संबंध में है! 0 हो जाते हैं।) यह सी और सी ++ के सभी संस्करणों में सत्य है।

Concatenate 'A' with SQL query -

How do I use SQL queries with a field, and if '90' and '99' in the field, its result Will A join? The final output will look like this. 91 A92A 93A 94A 95A I tried the following. SELECT tblgrade.fld1stGrade, 'A' tblgrade WHERE tblgrade.fld1stGrade '90' and '99' If your implementation is in the SQL server, then follow the following. SELECT tblgrade.fld1stGrade + 'A' to tblgrade where CAST (tblgrade.fld1stGrade int) & gt; = 90 and Cast (as tblgrade.fld1stGrade int) & lt; = 99; MySQL implementation is used for the following. Select tblgrade from tblgrade.fld1stGrade & gt; Select = 90 and tblgrade to concat (tblgrade.fld1stGrade, 'A') .fld1stGrade & lt; = 99; For comparison of multiple categories in MySQL, use something like the following. Select when tblgrade.fld1stGrade & gt; = 90 and tblgrade.fld1stGrade & lt; = 99 then Context (tblgrade.fld1stGrade, 'A') when tblg...

javascript - Wrapper for JQuery's ajax function. Callback fired, but no params -

I'm very new to JavaScript, so the question can be dummy. I receive a lot of posts and post requests in my code, so I decided to write the javascript function to call java's AJAX function request url url * @ The ultimate success callback function is triggered when the request successfully triggers * @complete failed callback function triggered unsuccessful request * / function getRequest (url, success callback, failed callback) {$ .ajax ({url: url} , Timeout : 3000, Datatype: "JSN"). Success: functions (data, textstats, jxaxhr) {successful callback (data, textstats, jxxhr);}, error: unsuccessful callback (jqaxhar, textstatus, errorstroke)}); } I call it like this: url = "/ api / info"; Success on the Festival (data, textstats, jqXHR) {$ ("# results") Html ("hostname is" + datahostname); } Function onfell (jqXHR, textstats, error thrown) {$ ("# results"). Html ("Shutdown"); } // fire request getRequest (url...

html - PHP Fatal error: Call to a member function hasAttribute() on a non-object -

Trying to get the rating I get an error on line 18 error message says "PHP Fatal Error: Call a member function atitudit () on a non-object " I've included all the PHP codes that I'm using to get ratings. public function getSiteAdvisor ($ domain) {try {$ callback_url = "http://www.siteadvisor.com/sites/" $ domain; $ Curl_response = $ this- & gt; Curl- & gt; Get ($ callback_url); If ($ curl_response-> header ['status-code'] == "200") {libxml_use_internal_errors (TRUE); $ This- & gt; Dom_doc-> LoadHTML ($ curl_response); Libxml_use_internal_errors (FALSE); $ Xpath = new DOMXPath ($ this- & gt; dom_doc); $ Tmp = $ xpath- & gt; Query ('/ html / body // div [@ id = "site bill"] // img') - & gt; Item (0); If ($ tmp-> hasitivity ('src')) {$ tmp = $ tmp- & gt; GetAttribute ('src'); If (stripes ($ tmp, "green")! == incorrect) {$ siteadvisor_rating = 1; } Otherwi...

ios - NSMutableDictionary setValue:forKey failing sometimes -

I am using NSMutableDictionary to add 3 keys / values. The value is bool in a form of NSNumber. Then I have a table view that loads the data, if the cell is pressed, then the value changes from either to NO or vice versa. It seems that when the cell is pressed the value changes properly, except for the last key / value in the dictionary NSMutableDictionary * modsDict; NSString * test = @ "test"; NSString * test1 = @ "test1"; NSString * test2 = @ "test2"; - (zero) tableview: (UITableView *) table view was SelectionRowAtIndexPath: (NSIndexPath *) indexPath {UITableViewCell * cell = [tableView cellForRowAtIndexPath: indexPath]; [Deselect tableview inevitably pyth: indexpath animated: yes]; NSString * key = [NSString stringWithFormat: @ "% @", [[modsDict allKeys] objectAtIndex: indexPath.row]]; If (cell.accessoryType == UITableViewCellAccessoryNone) {// Enable Cell.Setty Type = UITableViewCellAccessoryCheckmark; [ModsDict Set Value: [NSNumbe...

c - Fastest and most efficient way to find the maximum no. that can be obtained by performing bitwise and on 2 DISTINCT elements of array -

Looking at an array of non-negative integers, what is the fastest and most effective way to find the maximum number of arrays Can be obtained by performing bitwise on 2 different elements and (ie, and operator) performance? This is my code so far: for max = 0 (i = 0; i & lt; n; i ++) {for (j = i + 1; j & lt; n; j ++) {temp = a [i] & amp; A [ja]; If (temporary> maximum) maximum = temporary}} This is definitely the simplest way. I'm looking for a more efficient solution. There is probably something that TRAI (actually a binary tree) is used to get maximum XOR elements of the array. Details for the maximum XOR solution can be found at I hope I have the question right. Here's my solution: You have an array of integers, they say they are not integers with integers because we are working with bitware operation. Let's think of them zero in binary representation and as a string of those people, and then put them on top of each other. We now hav...

windows - Replicate text from AutoIt form to Notepad -

I am using this autot code to send text to Notepad on the press of a button: #include & lt; ButtonConstants.au3 & gt; # Include & lt; EditConstants.au3 & gt; # Include & lt; GUIConstantsEx.au3 & gt; # Include & lt; WindowsConstants.au3 & gt; $ Form = GUICreate ("Replicate text for Notepad", 615, 50, 190, 122) $ input = GUICtrlCreateInput ("placeholder text", 0, 0, 609, 21) $ button = GUICtrlCreateButton ("Send to Notepad GUISetState (@SW_SHOW) while $ 1 $ nMsg = GUIGetMsg () switch $ nMsg Case $ GUI_EVENT_CLOSE Exit Case $ button example (GUICtrlRead ($ input)) EndSwitch go Function Example ($ text) Run ("Notepad .exe") Local $ hWnd = WinWait ("[Class: Notepad]", "", 10) ControlSend ($ hWnd, "", "Edit1", $ text) EndFunc This is doing great work but now I am as soon as I He will press, I would like to send keystroke. Is there something like okay in autight? Therefore, eve...

loops - Program for this Alphabet pattern in c++ -

Is there any other way to do this program with less loops? It is not very efficient #include & lt; Iostream & gt; using namespace std; Int main () {int i, j, n, s; Cout & lt; & Lt; "Enter the value of n"; CIN & gt; & Gt; N; For (i = 1; i & lt; = n; i ++) {for (s = 1; s & lt; = n-i; s ++) {cout & lt; & Lt; ""; } Four f = 97; Int k = 1; For (j = 1; j & lt; = (i * 2-1); j ++) {if (k% 2! = 0) {cout & lt; & Lt; Ch; Ch ++; } And {cout & lt; & Lt; ""; } K ++; } Cout & lt; & Lt; Endl; }} Output: Enter the value of n6 aababcabcdabcdeabcdef Try the following code - Add # & lt; Stdio.h & gt; Main () {int i, j, k, num; Printf ("Enter the number of characters \ n"); Scanf ("% d", and number); For (i = 0; i Sample input and output - sathish @ Ubuntu: ~ / c / basics $ ./a.out Number of characters 4 Enter the abac

r - Distributing from frequency table to original data? -

मेरे पास एक data_aa नीचे है ID x.cal Tx.cal 1 0 0 2 0 0 3 0 0 4 0 0 5 1 1 6 10 1 7 10 1 8 11 1 9 11 1 उपरोक्त data_aa के साथ, मैंने एक आवृत्ति सारणी बनाया नीचे और एक परिणाम_ए चर मिला। x.cal tx.cal आवृत्ति परिणाम_ए 0 0 3223 0.05268579 1 1 35 0.05048418 1 10 2 0.89475308 1 11 1 0.98251303 1 12 1 1.06831347 1 13 1 1.15179768 मैं result_A मान को अपने मूल डेटा data_aa में जोड़ना चाहता हूं। मैं आवर्ती डेटा से मूल डेटा_एए में परिणाम_ए कैसे पुनर्वितरित करूं? मैं आवृत्ति तालिका से प्रत्येक व्यक्ति (आईडी) को result_A मान जोड़ना चाहता हूं। मेरे नीचे की वांछित तालिका आईडी x.cal tx.cal परिणाम_ए 1 0 0 0.05268579 2 0 0 0.05268579 3 0 0.05268579 4 0 0 0.05268579 5 1 1 0.05048418 6 10 1 0.89475308 7 10 1 0.89475308 8 11 1 0.98251303 9 11 1 0.98251303 गठबंधन के लिए दाऊद के दृष्टिकोण का उपयोग करें डेटाफ्रेम, फिर आप चाहते प्रारूप प्राप्त करने के लिए परिणामी को साफ करें। df & lt; - मर्ज करें (डेटा_आ, freq_aa, by = c ("x.cal", "tx.cal") , All.x = T) परिण...

haskell - How do you intall GHC 7.8.3 on OS X 10.8.5 -

I am trying to install GHC 7.8.3 on Mac OS and it is driving me crazy. What should I do? I downloaded the binary installation. First of all I have to do sudo make instead of installed Is this normal? Then it stops with the following error message: / usr / bin / gcc -E -m64 -undef -traditional -wno-invalid-pp -token -Wno- Unicode - Wno-Trigraphs -P -DINSTALLING -DLIB_DIR = '' / usr / local / lib / GHC-7.8.3 " '-DINCLUDE _DIR =' '/ usr / local / lib / GHC-7.8. 3 / include " '-DPAPI_INCLUDE_DIR =" "-DPAPI_LIB_DIR =" "-DFFI_INCLUDE_DIR = -DFFI_LIB_DIR =' -DFFI_LIB =" Cffi " '-xc -Iincludes -Iinc ludes / district -Iincludes / Jile- derivedconstants / header -Iincludes / district - ghcconstant S / header RTS / package.conf.in -o RTS / district / package.conf.install.raw CC1: error: unrecognized command line option "-Wno- invalid-pp-token" CC1: error: invalid In order to make the command-line op...

Android NDK/JNI: loadLibrary failure with dependant shared libarires -

In my project, I need to load three different shared libraries, in which the third (main one) depends on the first two . The first two names for simplicity are A & A. Library A and B are large libraries which do not interact with JNI at all and only lock the existing libraries in Android. I have set up this kind of Android radio in my third library. There is no such system by setting MK: $ $ (CLEAR_VARS) LOCAL_PATH Include: $$ (MY_LOCAL_PATH) LOCAL_MODULE: = C LOCAL_SRC_FILES: = & lt; Source files & gt; LOCAL_C_INCLUDES: $ $ (MY_LOCAL_PATH) / libA / LOCAL_C_INCLUDES + = $ (MY_LOCAL_PATH) / libB / LOCAL_SHARED_LIBRARIES: = A LOCAL_SHARED_LIBRARIES + = B LOCAL_LDLIBS + = - $ $ (BUILD_SHARED_LIBRARY) When I loaded this library via Java: Fixed {System.loadLibrary ("C"); } Too much success. This system works on my device as well as all my beta testers get dissatisfied link entry in their stack trace: java.lang. ExceptionInitializerError at & ...

objective c - Splash screen is landscape although the whole game is in the portrait mode. SpriteBuilder + cocos2d -

When I run the SpriteBilder Cocos 2D project in the exode simulator, the splash screen resizes the entire game and in portrait mode, as I have set it in the SpriteBuilder project settings mode. The picture is set in the Plist file, and when I changed the default portrait image with my own and deleted default landscape images, it only shows my image splash image in landscape mode, how to fix it? I believe your image files are named according to them. Try clearing your project and removing the app from the simulator / device I've found that sometimes the simulator / device likes to encode the file to cache.

Android Resize Image and save device storage -

I am doing a project. I need your help because I do not have much information about image resizing. I want to do 240px * 180px as the size of the pictures taken for I use code like below and thanks for everyone interested in the topic. Thank you all! Public zero lephoto (see view) {intent = new intent ("android.media.action.IMAGE_CAPTURE"); File photo = new file (environment. Gatestile store directory ("," Pic.jpg "); Intent.putExtra (MediaStore.EXTRA_OUTPUT, Uri.fromFile (photo)); ImageUri = Uri.framefile (photo); StartActivityForResult (intent, TAKE_PICTURE); } Secure zero activation (int requestcode, integer result code, intent data) {super.onActivityResult (requestCode, resultCode, data); Switch (requestcode) {case 1: if (resultCode == activity. RESULT_OK) {Ure selected image = image URI; GetContentResolver () Inform (selected image, blank); ImageView imageView = (ImageView) findViewById (R.id.imageView1); ContentResolver cr = getContentResolver ()...

windows phone 8 - Nokia HERE map plot multiple locations c# -

I am developing a Windows Phone 8 app in C # and XAML. I have to plot several places using map SDK here. I have latitude, underline and title attributes. http://here.com/map=29.1491875,75.7216527,17/title=Fancy%20Stationers http://here.com/map = 29.1491875,75.7216527,17/title = Fancy % 20Stationers http://here.com/map=28.5415839,77.2550147,17/title=Future%20Forward http://here.com/map=28.651879,77.187967,17/title = Hotline% 20 Communication http: // here .com / map = 28.831140,77.074928,17 / title = Jindal% 20Agencies http://here.com/map=28.7,77.14,17/title=Ace%20Communicationhttp: // here.com/map=28.6904, 76.9409,17 / title = Cell% 20Solutions http://here.com/map=28.54,77.27,17/title=Communication%20Solution http://here.com/map=29.17, 77.21,17 / title = Dexter http : //here.com/map=28.65,77.09,17/title=Hotline%20Communications http://here.com/map=28.47,77.04,17/title=Instant%20Solutions Is there any way to do this? Links in the links then try the code below foreach (...

php - put string in variable using <? ?> -

I think it is sometimes easier to use php tags instead of echo, for example & lt;? If () echo "img src = '' onclick = 'warning (\" hello \ ")' / & gt;"; ? & Gt; Instead I like the code We got rid of backslashing. But about the string I want something like this: You should use: & lt;? Php $ str = & lt; IMGTAG; copy $ str; ? & Gt; Enjoy your code.

javascript - Jquery validation not validate multi select box in form -

My page has two selected boxes (dropdpwn). I agree with my form using the jQuery validation plugin But this plugin is not valid, two selection boxes. $ ('Form'). Validate (function: {first name: {minlangha: 3, max length: 15, required: true}, last name: {minlength: 3, maxlength: 15, required: true}}, highlight: function (element) { AddClass ('is-error');}, unhighlight: function (element) {$ (element) .closest ('form-group'). RemoveClass (' Error: '; error'; error: element: 'span', error class: 'help-block', error placement: function (error, element) {if (element.parent ('input-group'). Length) { Error.insertAfter (element.parent ());} and {error.insertAfter (element);}}}); HTML: & lt; Form & gt; & Lt; Div class = "form-group" & gt; & Lt; = "Firstname" for label class = "control-label" & gt; Num: & lt; / Label & gt; & Lt; Div class = "input-gro...

c# - wkhtmmltopdf has been deprecated -

I want to convert wkhtmltoPDF to HTML using C # to C #. But when I click on the following message, it looks like this: This file has been deprecated. Another file might be better, would you like to continue? What does this mean? When using Google to view the library, can you download a better WHTTPDF XE? Official site. In which you can download a new version.

Count duplicate Integer pairs in an arrayList in java -

"itemprop =" text "> I run into one of the steps I find in duplicates in the list called (PairList) and have an algorithm, Their calculations and pairs, which are smaller than a particular parameter, finish (minSupp). This is to add the pair to my code PairList. ( i.ic. } {For (J. J. I, J. & LT; size.get (sequence.getId ()); J ++} {// first item get first = sequence.gate items (). Obtain (i); // gets the second item int second = sequence .getItemsets (). Get (j); // Generate Pattern as Pair Couple Pattern = New Couple (First, Second); Serial number = sequence .getId (); // Generate triples with sequence id and pair triples triples = triples (sequence id, i, j); If (! PairList.contains (pattern)) {// say that this pairList.add (pattern) does not exist; } Now pairs have added something like this in the list: (3, 28) (3, 58) (3, 61) (3, 28) (5, 21) (3, 28) (5, 21) For example, I want to know how many times (3, 28) are in this list. And for (minSupp = 2) I wan...

python - Creating new numpy array from existing array efficiently -

I have an existing NMP array (UIT8) that looks like this: (Value 8-bit, I only include the last 3) [[00000AAA, 00000BBB, 00000CCC], [00000FFF, 00000EEE, 00000DDD], [00000GGG, 00000HHH, 00000III], [00000LLL, 00000KKK, interested in 00000JJJ]] and finally I want the data in this form: [01AAABBB, 01CCCDDD 01EEEFFF, 01GGGHHH, 01IIIJJJ, 01KKKLLL ] In addition, every second line is reversed. Currently, I have a long and curved code that can be found in the original list row-per-line and cell-by-cell Itemprop =" text "> Here trustees have an approach using built-in commands and vector-style indexing, so it should be very compact (and fast) ): updated with comment with suggestions every other row unsnaked_array = NP# Reverse direction. Array (inp_array) unsnaked_array [1 :: 2] = inp_array [1 :: 2, :: - 1] # change a long array unsnaked_array = unsnaked_array.ravel () unsnaked_array & amp; = 0x7 # extra security :) # yoga bits required for every ...

ios - Integration Objective C Protocols with Swift -

I'm new to fast and I need some help to integrate a component AP PictureView (written in Objective-C). Link to the component: But I have no success, because there is a protocol: AKPickerViewDelegate that do not work in swift: @ Square AKPickerView; @protocol AKPickerViewDelegate & lt; NSObject & gt; @optional - (NSString *) pickerView: (AKPickerView *) PickView title forItem: (NSInteger) item; - (NSUIENTER) Number of items input list: (Acquisitionview *) Procedure; - (Zero) PickView: (Ekpereviewview *) PickViews selected: Item (NSInteger) item; In SWIFT I wrote this code: View category Controller: UIViewController, AKPickerViewDelegate {var pickerView: AKPickerView = AKPickerView () var Title: NSArray = ["Jeniro", "Faviriro", "Marso And I have implemented this method: Function number of items inappropriateview 'S PictureView!) - & gt; Int {return self.titles.count} func pickerView (pickerView: AKPickerView, titleForItem ite...

ip - Raw tcp send and recv -

I am making an application using raw sockets and need your advice: The application is one. What kind of TCP / IP stack tester should I do that I have an application that connects to remote server and transmits some data to ID. Says - I can not open chairs with my application - I have TCP / IP buffer with all the headers. For testing, I want to create 2 raw sockets - 1 buffers to send and receive IPs. I get this code to get: int saddr_size, data_size; Structured Socrator Saddar; Unsigned four * buffer = (unsigned char *) molk (65536); // It's big! Printf ("start ... \ n"); // Create a raw socket that will smell sock_raw = socket (AF_INET, SOCK_RAW, IPPROTO_TCP); If (sock_raw And as I can see that it works - it all gets TCP / IP packets. I tried this for the sender static constant unsigned four pkt6 [60] = {0x32, 0x04, 0x34, 0x, 0xf3, 0xab, 0x01, 0x02, / * 2.4 ..... * / 0x03, 0x04, 0x05, 0x06, 0x08, 0x00, 0x45, 0x00, / * ...... E. * / 0x00, 0x2e, 0x00, ...

WPF ItemsControl scrollbar -

कैनवास पर एक आइटम का संग्रह प्रदर्शित करने के लिए ItemsControl का उपयोग करना। समस्या यह है कि मैं अपनी स्क्रीन पर सभी मदों ( scrollbars का उपयोग करने की आवश्यकता नहीं देख सकता है), मैंने इसे बाहर की जाँच की है और यह कोशिश की है लेकिन यह मेरे लिए काम नहीं करता है, स्क्रॉलबार दिखाया गया है लेकिन अक्षम है मेरा एक्सएएमएल: & lt; ग्रिड & gt; & LT; DockPanel & gt; & LT; ScrollViewer & gt; & Lt; आइटमोंकंट्रोल आइटम्सस्सोर्स = {बाईंडिंग MyCollection} & gt; & LT; ItemsControl.ItemsPanel & gt; & LT; ItemsPanelTemplate & gt; & Lt; कैनवास / & gt; & Lt; / ItemsPanelTemplate & gt; & LT; /ItemsControl.ItemsPanel> & LT; ItemsControl.ItemTemplate & gt; & LT; DataTemplate & gt; .... & lt; / DataTemplate & gt; & LT; /ItemsControl.ItemTemplate> & Lt; / ItemsControl & gt; & Lt; / ScrollViewer & gt; & Lt; / DockPanel & gt; & Lt; / ग्रिड & gt; डिफ़ॉल्ट रूप से ...

incorporate asynchronous javascript post requests into php class file -

I inherited a website with an obscure PHP framework called syndrome for which I did not find any documents But problem I'm trying to solve for a good PHP developer. I am trying to create AJAX requests from javascript in a php file to execute a special function. Ajax request is simply: loadNewImage = function () {$ .ajax ({url: '/app/library/Controller/Reel.php', data: {action: 'test'} , Type: 'post', success: function (warning) {warning (output);}}); } The existing PHP file is structured in such a way: & lt ;? Php square controller_ area protects BaseController_Web {protected function defaultAction () {parent :: getPage ($ This-> template, 'home'); $ Homepage = Homepage :: getInstance () - & gt; GetHomepage (); $ This- & gt; Template-> Title = 'home'; $ This- & gt; Template-> Image = $ homepage ['asset_image']; $ This- & gt; Template-> Center = array ('reel'); $ This- & gt; Se...

ruby on rails - Apipie interferes with proper error codes -

I can not find this little bit in the API's docs. Let me make this special AP ready, and I thought I would document it with APP, all fine and dandy, and the ultimate verification is good, but I feel that the response to failure in verification I can not seem to throw the right HTTP code in For example, I have this post / user method, which obviously makes the user in my database good, right? Well, this is something wrong, and it's ok, but if, say, I throw the standards that it does not pass the validity of the apipie, chops apipies and throws a good old-fashioned error, if something is wrong, 422 responds with a fixed unit failure / error: post '/users.json' ,: user = & gt; D Apipie :: ParamInvalid: Invalid parameter 'Email' value "": Regular expression / [a-zA-Z0-9 will match - -] + \ @ [a-zA-Z0-9 \ -.] + \. [Az] {2,} /. # ./spec/requests/usersapi_spec.rb:66:in `In Block (Level 3) & lt; Top (required) & gt; ' Let me assume ...

c# - Uneven grid with for loop(s) -

Then my problem is: I have an RPG inventory that is a grid (7x4), loop For two through: [update method] index = 0; For (int x = 0; x * Itemlist is a list of only BaseIT class. Similarly, I want to draw this code grid: XXXXXXXXXXXXXXXXXXXXXXXXXXX but instead it does this: XXXXXXXXXXXXXXXXXXXXX It is cut off from the line of the end which is no greater than or equal to 7. Now when I use an item (using an item to remove it from the list), it adds the next hidden object to the end, the third row. I appreciate any help thanks, EDIT: Thanks for the help Nico, this code looks like now: If (item number list.Count> 6) {for (int index = 0; index and lieutenant; item list; ++ index) {item list [index] .grid location = new point (index% 7 , (Int) (index / 7)); Catalog [index] Update Value (Screen Locking, Madsiz, Loci); }} And if (item list.lt; 7) {for (index index = 0; index and lieutenant; item list; ++ index) {item list [index] .grid location = new point (i...

vb.net - Link numbers with an equation/algorithm -

I am creating an Anagram Solver in Visual Basic which gives you all possible combinations when you put a string. I need to know how many combinations are given based on the number of characters in the string and the number of different characters. EG sample string: ABC, ACB, BAC, BCA, taxi, ABC, CAB I need the equation (using numbers and numbers of different characters) so that it can be linked in a string that contains different characters I am trying to use trial and error And the figure has ended, but I can not get enough of my head around it. I have so far: ((letters -1) ^ (different letters - 1)) + (letters-1) which Works for one to calculate some different letters, but for all now. Please help I inspire you to answer, but I I will try to explain the way. Suppose you have 10 different characters, you have 10 options for the first, 9 for the second, 8 for the third, etc. Finally, 10 * 9 * 8 * 7 * 6 ... * 2 * 1 = 10! Possibilities However, sometimes you wi...

python - Is there a single function for matching and replacing? -

I am surprised that there is a simple option (like a function call) to match and replace the following example: & gt; & Gt; & Gt; Import re & gt; & Gt; & Gt; & Gt; & Gt; & Gt; Line = 'file: /// window-D / academic% 20discipline / study% 20 objects / regions / formal% 20systems / math' & gt; & Gt; & Gt; & Gt; & Gt; & Gt; Match = re-match Match (r '^ file: // (. * $$', line)> gt;> gt; match and match.group (1): ... substitution = re.sub ('% 20 ', R' ', match.group (1)) ...>> Thank you .- "ItemProp =" Text "> I am dodging the question and suggesting that you use something else for it: gt; line = 'file: /// window-D / academic % 20discipline / study% 20 objects / regions / formal% 20systems / math '> gt;> import urllib >> gt; & gt; Urllib.unquote (line)' file: /// windows- D / academic discipline / study items / regions / fo...

c# - How do you define a model for a User-to-User relationship in entity framework -

You can use EF in general ApplicationUser user {get; Set; } To define the property in relation to users but I am confused how to make it between two users for a property, if it makes sense? Basically I want to define a model for relationships between users. E.g. UserA and UserB have the following relationships: bool friends {get; Set; } Bool blocked {get; Set; } I am also thinking that this is ideal for "blocked" property because I want both of them to be able to block each other and unblock them. Like UserA Block UserB then decides to unblock it, and therefore the blocked property is changed from right to wrong. But if UserB has blocked UserA too, then the property remains true. Edit 28/07 Public Class ApplicationUser: IdentityUser {... Public Virtual Ilkonac & lt; UserRelationships & gt; Relationship {get; Set; }} Public class UserRelationships {public int UserRelationshipsId {get; Set; } Public UserRelationships () {this.Friends = false; this...

Cloud9 IDE Not Loading Jquery -

I have tried several ways to import the JQR in my project but I have never tried it to work in Cloud9 Can not receive My code works on other IDEs and text editors, but not on Cloud9. If any body has more information about me than this please help please this is my project: It seems that you have participated in a bug on cloud9, please email support@c9.io and we will work with you to decide this.

php - Metadata extraction from PNG images -

How to remove metadata from an image? I have used the exev2 library but it gives only limited data compared to this website. Is there some more advanced library? I have already tried the Hyacro-Metadata Python Library. In addition to this, how does Windows remove the description of the image (which we see from the properties)? . With the start of all PNG with an IHDR block and ending with an IEND block since PNG is such a very flexible standard, it can be enhanced by creating new types of blocks - thus animated animated PNG work All browsers can see the first frame, but browsers, which understand the type of blocks used in APNG, can see the animation. There are several places that live text data in a PNG image, and even the metadata can remain. You have mentioned "description tag" which can only remain in text blocks, so that I am focusing on that. There are three different types of text blocks in PNG standard: text (Latin-1 encoded, uncompressed), zTXt (co...

Get multiple fields out of JSON [Python] -

I have some JSON files that are described below with the structure: {" Paragraph ": [" Fake anti-virus software that infects a PC with malicious code, there are increasing risks according to a Google study. "," This analysis of 13 months to 240m web pages shows that fake anti-virus programs 15% malicious software. "," Scammers, by believing them Deceive them into downloading programs that are infected with their PC virus. ",]," Description ":" Google has found ... "," title ":" Google Alert Anti-Virus Software on Fake Warning "} , I need to drag all the title fields into several instances (which are in the same JSON file) and store them in a new list. How can I do Python? If you can do this on the paragraph field as well, I have more than one entry then it would be great. The module used to parse its Jason file in the structure of nested dicks and lists Please. Use to remove your details, ...

delphi - How to set different cookies for different instances of Chromium embedded browser -

I am working on an app that requires multiple embedded instances and each instance is different Requires login on the same external site with authentication details. I am using CEF (Chromium embedded framework) in Delphi, I have a folder on which I store cookies for different instances of my browsers, so I have this code The first unit has process TForm2.Button1Click (Sender: Tubect); Start form 33: = Tform3.Create (zero); Form33.Show; End; When Form 33 was created Process TForm3.FormCreate (Sender: Tubect); Various Cookie Managers: ICFQKY Manager; Folder: string; Start at random; Chromium1.SetBrowserID (Random (1244)); Folder: = Randomtext (5); If DirectoryExists (folder) = False then MkDir (folder); Cookie Manager: = Tcefkkimenager Global; Path: = ExtractFilePath (Application.ExeName) + folder; Cookie Manager. Setup Path (path, true); End; The problem is that when I open two or more instances of Form 33, then every browser can not have one for every browser 33 A spe...

jquery - Dynamic select list from link -

Does anyone help me write jquery code, which will prepare a selection list of data from the link: pre> select name = "field_attr_id_1_like "& Gt; Option value =" 210 Amber "> 210 Amber Option gt; option value =" attribute 1 "> attribute 1 gt; option value =" in "& gt; In & lt; / option & gt; & lt; / select & gt; Try it: for (var i = 0; i Update: In my example, select "ID" Instead of "name" attribute but if you select "selection" Instead of using the selector if you want to sum: $ ( 'select [name = "field_attr_id_1_like"]') .andend ( '& lt; Option value = "'+ My Jason [I]. Value +'" & gt; 'Marriage [I] .Label +' & lt; / Options & gt; ');

html - CSS / jQuery Multilevel List -

I am trying to create a multilevel list which should initially look like the following: Level_1 Then when I click on any of the "Level_1" text (say the top one), "Level_2" should be displayed, like: Level_1 Level_1 Level_2 Level_1 Then when I click on "Level 2" (one below says), "Level 3" below "level 2" Should be visible, which has been clicked, such as: level_1 level_2 level_ 2 level_3 level_3 level_3 level_1 Then when I click again on the second "level_2", it should be Level_1 Level_2 Level_2 Level_1 I have something so far (I suspect that it does not work as jQuery, the function activates twice when clicking on "Level_2", a Bar for "Level_1" ("Level 2" is embedded within "Level_2") and once for "Level 2"): jQuery: & lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> & ...

mysql - Joining 5 tables in SQL in a PHP function -

मैं एक सेट में वापस जाने का प्रयास कर रहा हूं: lessonID एस userID और schoolID से संबंधित स्टार्टटाइम और एंडटाइम से जुड़ा है। यह एक कैलेंडर पर प्रदर्शित किया जाना है। मैं केवल उन पाठों को प्रदर्शित करना चाहता हूं जो उस उपयोगकर्ता के साथ जुड़े हुए हैं, जो उस कैलेंडर के दौरान देखे जाने वाले समय सीमा के भीतर एक चयनित विद्यालय के लिए देख रहे हैं। यह डेटा सिर्फ तालिका संरचना और डेटा दिखाने के लिए डमी डेटा है प्रकार। पाठ तालिका: कम्यूनआईडी कक्ष एफके प्रारंभ समय समाप्ति समय 1 2 2014-08-01 13:00:00 2014-08-01 14:00:00 2 3 2014-08-01 13:00:00 2014-08-01 14:00:00 कमरे सारणी: कमरेआईडी स्कूल एफके 1 1 2 1 3 2 4 2 स्कूल टेबल: स्कूल आईडी 1 2 उपयोगकर्ता तालिका: प्रयोक्ता आईडी 1 2 3 पाठ / शिक्षक जंक्शन तालिका: कम्यून एफके शिक्षक एफके 1 1 2 2 3 मैंने क्या करने की कोशिश की है: फ़ंक्शन find_lessons_by_school_id_and_teacher_id_ranged_feed ($ school_id, $ teacher_id, $ start, $ end) {वैश्विक $ कनेक्शन; $ School_id = mysqli_real_escape_string ($ कनेक्शन, ...

Update nested hash MongoDB - Ruby -

I am trying to update a hash with a simple value in a mongodibi doctor but it is an array of values Stores. What do I have: {'id': ... 'stream': {"1406481985 (a timestamp)": 35603}} What do I need: {'id': ... 'stream': {"1406481985 "What I Get: .. 'Stream': {"1406481985": 35603, "1406481990": [15000]}} How did I get there? Update view = 15000 time = time.on coll.find_and_modify ({query: {id = & gt; id},: {'$ push' => gt; ; {"Stream. # {Time}" =>, thoughts}},}} I have already tried and I 'I do not know what I do? Daniel niPers is correct - I should also use $ set Are you using a id instead of '_id` perhaps a typo? Edit: Note that generally the dynamic key values ​​are not recommended because they are hard for index and query, within an array there is a stream of the hashes. Consider the structure: {'_id': ... 'st...

c++ - order of evaluation of operands -

अभिव्यक्ति में a + b , यह a है मूल्यांकन b से पहले किया गया है, या अनिर्दिष्ट मूल्यांकन का क्रम है? मुझे लगता है कि यह बाद वाला है, लेकिन मानक में एक निश्चित जवाब खोजने के लिए मुझे संघर्ष करना है। चूंकि मुझे नहीं पता कि सी सी से अलग है या नहीं, या अगर मूल्यांकन क्रम के नियम सी + +11, मैं प्रश्न को तीनों के रूप में टैग करने वाला हूँ। सी ++ में, उपयोगकर्ता के लिए परिभाषित प्रकार a + b फ़ंक्शन कॉल है, और मानक कहते हैं: §5.2.2.8 - [...] फ़ंक्शन के मूल्यांकन का क्रम बहसें अनिर्दिष्ट हैं [...] सामान्य ऑपरेटरों के लिए, मानक कहते हैं: §5.4 - जहां नोट किया गया, सिवाय व्यक्तिगत ऑपरेटरों के ऑपरेंडों के मूल्यांकन और व्यक्तिगत अभिव्यक्तियों के उप-प्रत्यारोप, और जिस क्रम में दुष्प्रभाव होते हैं, वह अनिर्दिष्ट है [...] ये सी ++ 11 के लिए नहीं बदले गए हैं हालांकि, दूसरे शब्दों में शब्दों के परिवर्तन में यह कहना है कि ऑर्डर "अनिर्दिष्ट" के बजाय " अविवाहित " है, लेकिन यह अनिवार्य रूप से समान है। मेरे पास एक प्रति नहीं है सी मानक का, लेकिन मैं ...