Posts

Showing posts from July, 2015

angularjs - How to use Laravel 4 localization methods in Angular app? -

क्या आपके लिए Laravel trans () या Lang :: का उपयोग करने का कोई तरीका है Laravel दृश्य जो एकाधिक नियंत्रकों के साथ एक कोणीय दृश्य प्रदर्शित करता है। & lt; div ng- दृश्य & gt; & lt; / div & gt; मेरे ऐप के लिए मेरे सभी टेम्पलेट्स में public_html फ़ोल्डर है। एक Laravel ऐप के डिफ़ॉल्ट संरचना के साथ आप app / lang निर्देशिका तक पहुंच नहीं सकते हैं। हालांकि, आप एक गड़बड़ी कार्य या एक Laravel कमांड लिख सकते हैं, जो कि आप सभी भाषा फाइलों को संसाधित करते हैं और परिणामों को आपके सार्वजनिक निर्देशिका में कॉपी करते हैं ताकि इसे आपके ऐगल एप्लिकेशन के लिए सार्वजनिक रूप से उपलब्ध कराया जा सके।

java - Extracting the Charset Code of the Contents Area of Incoming Emails -

I am creating an email client program with javamail. When an email is received, I want to send the sender's character code I have successfully acquired all the header parts of the email and I have them in the database I can save. Is there a way to remove only one pigment code that is attached to the content area of ​​the incoming email (i.e. alphabet = "iso-2022-jp") i am using regular expressions in java, but There is a different method to achieve this. The pattern below is what I wrote but is unable to remove the code: > Pattern.compile If you are interested in regex, then you Pattern.compile ("text / (?: | | | Html); \\ S * charset \\ s * = \\ s * \ "([^ \"] +) \ ""); This should store the encoding portion in group 1 so that you This pattern can be used like Matcher m = pattern.matcher (yourData); if (m.find ()) System.out.println (m.gr) Oup (1)); Other System.out.println ("no encoding notifications");

node.js - What is the difference between cookies maxAge and expiry -

I'm on nodes, Express App I'm using cookies for some of my app's features. I need to have cookies in a month. For this purpose, I get the cookie maximum of the time in order to get a month's time of day * hours; Every day * minutes * seconds * semester * 1000 is set 30 * 24 * 60 * 60 * 1000 = 2592000000 . Even though the browser of my cookies is near 10 hours in the end. What am I missing, my calculation is wrong? Or am I using the wrong attribute ( maximum edge )? In addition, The maximum ad should be set in milliseconds (I was wrong, as I have referred to the client part). Would you like to set the coolie are doing? res.cookie ('rememberme', '1', {maxAge: 900000, httpOnly: true})

PHP remote file download with custom name set -

I have this script which makes me a remote file on my server The problem is, If I want to rename the file, I have to manually FTP the server and change the name of the file. Is there any way to name the file before downloading? & lt ;? Php if ($ _ POST) {// url $ url = $ _POST ['url']; // Add time to the current filename $ name = basename ($ url); List ($ txt, $ ext) = explosion (".", $ Name); $ Name = $ txt.time (); $ Name = $ name "." $ Ext // Here is the actual code for getting the file from the URL and to save it to the upload folder, get the file from the URL using // file_get_contents and file_put_contents $ upload = file_put_contents ("uploads / $ name", file_get_contents ( $ Url)); // Check the success ($ Upload) echo "success: & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt; Anybody can help, I will be very happy. I have to manually rename the file, this is the problem, can I specify

jquery - How to use the binding context for knockout js for partial pages in asp.net mvc -

I am new to knockoutjs using custom assumptions to make assumptions for my text box Want to But knockout js viewloadel is not defined. In my process I have a page named MyProfile MyProfile will have two tabs in the page and each tab will have a partial page. I have defined partial pages in this way. @ MyApplication.Services.ViewModels @model MyProfileViewModel & lt; Div class = "new-tabs" & gt; & Lt; Ul class = "nav nav-tabs" & gt; & Lt; Li class = "active" & gt; & Lt; span id = "# personalalsettings" & gt; Contact information & lt; / Span & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; Span href = "#settings" & gt; Settings & lt; / Span & gt; & Lt; / li & gt; & Lt; / Ul & gt; & Lt; Div id = "user" & gt; & Lt; Div class = "row" & gt; @ {Html.RenderPartial ("~ / visual / user / _UserDetails.cshtml&

c# - Decompress Zlib data -

I am currently trying to compress some bytes with. code in Zlib . I have read from paragraph 3 pages 1-12, it indicates that byte by Zlib in the .mat file is compressed. So, my question is, there are some APIs or libraries in C # that can uncompress the bytes. If I got a group of bytes, then 6236 20e6 0062 1606 0860 85f2 1981 980b 4cb3 30e4 25e6 a60 a 40f 9 2545 99 9 3 9 f1 An SByte array, how could I dismiss them? I even tested some libraries online so they can do whatever they want, rather than some bytes, the whole file is uncompressed .... I I am quite new about this honor. Any help is appreciated. You can use InflaterInputStream from .mat file has a 0x88 length header, so you have to leave it. I have taken a sample file from here. byte [] data = file. Read AllBytes ("c.mat"). Skip (0x88) .oir (); Byte [] Disintegrated Data = New Byte [10000]; Int decompressedLength = 0; (Using the InflatterInputStream inflater = New InflaterInputStream (

php - file_get_html() not working? -

I am trying to get page title and meta description data, to provide the URL of the target page, but file_get_html () always returns the wrong value any suggestions? By the way I've enabled the PHP extension php_openssl & lt ;? Includes php ("inc / simple_html_dom.inc.php"); $ Content = file_get_html ("https://www.facebook.com"); If ($ content = FALSE) / / always leaves the condition, then the condition {foreach ($ contents- & gt; $ as element ('title')) {$ title = $ element-> Plain text; } foreach ($ contents-> find ('meta [description]')) as $ element {$ meta_description = $ element-> Plain text; } $ Output = array ('title' = & gt; $ title, 'meta' => $ meta_description); Echo json_encode ($ output); } Else {echo "Content could not be loaded"; }? & Gt; Update: Then file_get_html () works just fine but Facebook Update has any idea about dealing with browser messaging? & lt; p

arrays - PHP Recursive function: Get all files and directories within a directory and its sub-directories -

मैंने एक php function लिखा है, जिसके माध्यम से मुझे सभी और निर्देशिका फाइल में किसी विशेष निर्देशिका । 1) नीचे मेरी निर्देशिका संरचना है - / पृष्ठ (पूर्ण पथ - /home/ubuntu/projects/xyz.com/code/ciapp/views/pages) | | --file1.php | --file2.php | --file3.php | --फोल्डर 1 | --फ़ाइल 4.php | --file5.php | --फोल्डर 2 | --file6.php | --फोल्डर 3 | - -file7.php | --file8.php 2) मुझे क्या चाहिए सरणी का फ़ाइलें और निर्देशिका < / code> - सरणी ([फ़ाइलें] = & gt; सरणी ([0] = & gt; / होम / यूट्यूब / प्रोजेक्ट / एक्सआईज़ / कोड / सीएपी / दृश्य /pages/file1.php [1] = & gt; / होम / यूट्यूब / प्रोजेक्ट / एक्सआईज़ / कोड / सीआईपीएपी / दृश्य / पृष्ठ / फ़ाइल 2. एफ़पीपी [2] = & gt; / होम / यूट्यूब / प्रोजेक्ट / एक्सज़। Com /code/ciapp/views/pages/file3.php [3] = & gt; /home/ubuntu/projects/xyz.com/code/ciapp/views/pages/folder1/file4.php [4] = & gt; / घर /ubuntu/projects/xyz.com/code/ciapp/views/pages/folder1/file5.php [5] = & gt; / होम / यूट्यूब

javascript - Finding the first sentence with jQuery -

I'm trying to find the first sentence of a textarea. Right now, I can find the full stop before and can convert it to an array with .split () , but what happens if they use exclamation marks, question marks, etc. ? I have the following: var l = $ ('p'); $ ('Texture') keyboard (function () {var t = $ ('textarea'). Val (); var t = t.split ('.'); L.text (t [0]);}) ; Is there any way to make it more fully, so it is divided into any form: . , . , ! , ? , enter / linebreak Any help would be great, Yes there is a way. Do this: var t = t.split (/ [\ ?! \. \ n \ r \] /); I am using regex , in which I am using the character square to define how to split.

sql - Saving 400 counters into table(s)? -

Every 15 minutes we read 250 xml files, each XML file is an element each element (xml File) is composed of 5 sub-elements and each sub-element has 400 counter. All those counters will be used for formulas and aggregations. What is the most effective way to store this data in tables, in this case the T-SQL table? The data can look like this is an XML file, so there are 249 more: [element 1] - [element 1-1] - [ Counter 1]: 54 - [counter 2]: 12 - [counter 3]: 6 - ... - [counter 400]: 9 - [element 1-2] - [counter 1]: 43 - [counter 2]: 65 - [Counter 3]: 98 - ... - [Counter 400]: 12 - [Element 1-3] - [Counter 1]: 43 - [Counter 2]: 23 - [Counter 3]: 64 - .. - [Counter 400]: 1 - [Element 1-4] - [Counter 1]: 4 - [Counter 2]: 2 - [Counter 3]: 8 - ... - [Counter 400]: 12 - [Element 1-5] - [Counter 1]: 43 - [Counter 2]: 98 - [Counter 3]: 2 - ... - [Counter 400]: 12 The maximum number of columns in the table is 1024 (see), so you can not add 2,000 columns to a table . It basical

java - Getting no output for BASE64Encoder() -

I have tried to test every stage of my program, I get the output, but when I work BASE64Encoder () I am not completely visible even on the BASE64Encoder () line, stuck eclipse, I want to help you get rid of this problem, the code below is given < pre> FindMeaning Private Zero (HttpServletResponse resp, String Plane) NoSuchAlgorithmException, InvalidKeySpecException, NoSuchP addingException, InvalidKeyException, InvalidAlgorithmParameterException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException, IOException {string text = plain throws; String key = "ezine 8547"; KeySpec keySpec = new PBEKeySpec (key.toCharArray (), salt, iterationCount); // SecretKey key working = SecretKeyFactory.getInstance ("PBEWithMD5AndDES") generateSecret (keySpec). // Working // Cipher Algorithm ParameterPP Parachip = Create parameter = new PBPMATOR SPC (salt, currency number); ecipher = Cipher.getInstance (key1.getAlgorithm ()); // ecipher.init (Cipher

java - smartgwt - DynamicForm relative column width -

Image
If I am creating a dynamic form shown below the dynamiform formiits, then 2 rows are placed. I expected that they would be in a row, the place should be distributed in the form of crossing: 20 pixels for the first column, 250 for the second and the rest for the third. Last DynamicForm df = new DynamicForm (); Form form [] fi = new form entity [3]; // Filling up the list with a checkbox etam, a text itam and a selectItem df.setColWidths ("20", "250", "*"); df.setNumCols (3); Df.setFields (Internet); The result looks like this: I have all the form images in a row. Actually the title of the form item also takes a column. If you want to show the title too, it will double the number of columns. See for more information. As you comment: // Fill the list with a checkbox etam, a text itam and a sitemap? Try this: last DynamicForm df = new DynamicForm (); // format [] fi = new form [3]; // a checkbox etam, a text itam and a select

php - foreach over object array not working properly -

I am using charts, JS by DWX (click to find documentation link) I also use Laravel Framework I want to generate some JQuery on the server side to output the graph I want $ json_micromarket_participants passing a the object's range (database query Rows from) that are json_encoded in my controller Each object has Home_name and Average_Occupancy property. For some reasons my project loop does not work, i get the following error: foreach () Invalid argument for my question is two times: 1. Why does not this work? 2. Will this code work in any way to generate names and values ​​in jquery? Code: @section ('content') & lt; Script type = "text / javascript" & gt; Var chart datasource = {{$ json_micromarket_participants}}; $ {Function () {$ ("# chartContainer") dxChart ({Data Source: ChartDataSource, commonSeriesSettings: {argumentField: 'Home_name'}, series: [@foreach ($ json_micromarket_participants as $ micromarket_pa

python - How to find similarities in matrix? -

I have a huge matrix (10 * 10k) I want to know whether similarities can be found between the lines. Example of the matrix: 4 * 5 col1 col2 col3 col4 0 1 2 3 4 5 2 3 2 3 0 0.1 1 0 0 0 1 0 I want to know that there is no statistical theory to determine the similarities between the data. Line 1 is like 100% Line 3 line 2 like 50% line 3 But how can I deal with each other with numbers? Near line 4 and line 5 - Near-equal value How can we find the way to calculate the probability of equality? Is there a function on Python, zero, science-learned that is calculated? Import numpy mat = numpy.random.random (30, 30)) def find_similarities (line, target_line): equality measures parity function . Or calculating between each line will solve your problem. By optimizing this idea according to your needs, you can also benefit from the Heming distance or the Jackcard index. You can do this in the O (n) time and O (1) space Can calculate the similarities of

osx - How to reassign Home and End keys using Windows keyboard on Mac? -

I'm new to Mac and found that the only convenient keyboard for me is numeric pad (windows without MS is the full keyboard). Gaming keyboard). Is it possible to treat the home and closing keys properly in Windows? KeyRemap4MacBook worked fine for me One needs to choose "for PC users", then use PC style home / end, then reload XML

iOS Core Data encryption -

I encrypt the core-data field using the 'secercar' class provided in one of Apple's documents I am here. SecKeyWrapper class is non-ARC I'm wondering if this is still the best way to encrypt key data areas or is there a new / better solution available? Thanks To keep data in constant core data by default Uses NSFileProtection For apps built for iOS 5.0 or later, stores data by default in encrypted format on the store disk. The default security level prevents data access unless the user first unlocks the device. While configuring your frequent stores, you can change the security level by assigning a custom value to the key of the NSPCistent store fileproduction process. For additional information about new data protection in iOS 5.0, see "Data Protection Impressions" If you want to modify the default file security behavior, to store your core data, change the value for a different value in the dictionary of your store options. Example: NSD

ios - Posting Uilocalnotification dynamically after some validation of code before triggerring the notification -

I want to set up a UILocal notification in my app, I will set the fired in notification for 6 hours. Application, But before the notification starts, I have to validate my position, if this condition meets, then I should not post the information, otherwise I will have to post the information. How can I handle this situation? Post ULocationNotification set for 6 hours in advance. Use the userInfo dictionary to mark the notification (ex: @ {@ "valid": @NO} ). Check for your application: didReiveiveLocalNotification: handler, valid flag. If this is not valid, do so. If this verification passes, then post the notification again in a future millisecond. If there is a valid notification, show it. Original idea: Post notification for a non-valid status set for 6 hours later. Receive notifications, check if it is valid. If not valid, valid and repost in the valid status immediately. If it is valid, show the information as usual. All notificatio

opencv - search for known logotype(s) in an image -

I would love to write a program that will take a scanned invoice (original A4 paper, scanned as JPEG file Has been in a PDF), ~ 4000 pixels wide) and look for the logo. If a logotype is found, the invoice file (PDF) will be tagged with the tag tagged with the logo found in the invoice. I hope 20 or so logotype look and about 2500 invoices, yes, a pain to manually). My thoughts are to draw towards OpenCV because I know that the sequel has been used behind the curtain. I only want to see the people in some areas, that is, the people only need to move the top left corner of each invoice , Logo b, top right etc. Except JPG for monochrome from high contrast, I think that will help even more? To use keypoints (corners, blobs, etc.), "20 or so logos" is a good number and it's a descriptor (SIFT, Surf, throw etc.) to find the nearest-neighbor-route. 1 train Create a training set of people (take it from your documents) Calculate the set of key points and this detai

java - How to play sounds with JavaFX -

I just started working with JavaFX. I know how its basics work. I "sound.m.pe." Tried to use media and intermediate sections to play a sound called. I am programming in eclipse, and I have a sound file in the src folder, "folder (like the default package)" is my code here: Import javafx.scene.media. *; Import javafx.application.Application; Import javafx.scene.Scene; Import javafx.scene.layout.StackPane; Import javafx.stage.Stage; Public class man application {public static expands zero main (string [] args) {launch (args); } @ Override Public Voic Rate (Stage Primary Stage) {Primary Stage .Cetital ("Hello World!"); String ssound = "sound.mp3"; Media sound = new media (ssound); Media Player Mediaplayer = new media player (sound); mediaPlayer.play (); Stackpan root = new stackpan (); primaryStage.setScene (new view (root, 800, 450)); PrimaryStage.show (); }} Please tell me what I am doing. Here's the error message from the console:

objective c - Restkit equivalent of `[NSMutableURLRequest HTTPShouldHandleCookies]` -

I have two pieces of software with a different approach: NSMutableURLRequest Using 1. In I have the following line: request HTTPSHoldHandleKooks = no; Since "approach 1. " works fine, now I am looking for the approach of using the rest of the circuit. [NSHTTPCookieStorage sharedHTTPCookieStorage] like: NSHTTPCookieStorage * cookieStorage = [NSHTTPCookieStorage] when I all get cookies Delete same behavior sharedHTTPCookieStorage ]; For (cookie cookies cookieStorage.cookies) {{cookies remove cookies cookies: cookies}; } However, this removes all cookies system-wide , so I'm signed out of affected websites in my browser. I now with HTTPShouldHandleCookies a way to get the equivalent of is exploring Update : I am using RestKit as: [Manager putObject: myObject path: path parameter: zero breakthrough: zero]; NSHTTPCookieStorage , you are in front of each cookie can ask to delete it ( domain / name using ) are the ways you can o

php - Write data from file to database with updating old data -

I have a file with 500-5000 lines that I want to save in my database. The difficulty here is that I need to update the old data too - not just inserting. So I tried different ways: Line Using simple array buffer, write 100 lines simultaneously Load data INFILE (very fast but overwrite / ignore all) I had difficulty writing 500 lines in the database using the first method I needed the whole process ~ 25-30sec which is a long way both the other Dian fast (only 1-2 seconds) but overwrite the old data that is required to update me. This update includes a simple increase of counters and a new timestamp. So the first approach's query looks like this: INSTERT 'latest' (`hash`,` first_tree`, 'last_tree`, `count_trays`,` sender`) value (: hash, : First,: last, 1, sender) Key update of duplicate `count_tries` =` count_tries` + 1, `last_try` = = last2 but I do not know the possibility of joining 100 Having, too (which I tried to do in my second view)

c# - Too much spacing between StackPanel items in Windows Store app -

Image
I want to arrange some horizontal textboxes without any margins. I can see that my text block is as small as it should be, but for some reason many locations are added around it. I think this list has nothing to do with the book or its style, but I do not know. I have a lower layout Is: & lt; Listview width = "auto" selectionmode = "none" background = "# 654321" item source = "{binding}" & gt; & Lt; ListView.ItemsPanel & gt; & Lt; ItemsPanelTemplate & gt; & Lt; StackPanel Orientation = "Horizontal" /> & Lt; / ItemsPanelTemplate & gt; & Lt; /ListView.ItemsPanel> & Lt; ListView.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Border background = "black" & gt; & Lt; Text block text = "{binding}" margin = "0,0,0,0" /> & Lt; / Border & gt; & Lt; / DataTemplate & gt; & Lt; /ListView.ItemTemplate> &

python - Importing rlcompleter causes terminal resize to fail? -

निम्नलिखित कोड पर विचार करें। आयात कर्ल आयात करें rlcompleter def main (stdscr): जबकि 1: c = stdscr.get_wch () curses.wrapper (मुख्य) जब मैं इसे चलाता हूं और अपने टर्मिनल का आकार बदलता हूं, प्रोग्राम get_wch पर विफल रहता है, कह रहा है ट्रेसबैक (सबसे हाल ही में कॉल अंतिम): फ़ाइल "foo.py", पंक्ति 8, & lt; मॉड्यूल & gt; Curps.wrapper (मुख्य) फ़ाइल "/usr/lib/python3.3/curses/__init__.py", लाइन 94, आवरण वापसी func में (stdscr, * args, ** kwds) फ़ाइल "foo.py", पंक्ति 6 , मुख्य सी = stdscr.get_wch () _curses.error: कोई इनपुट हालांकि, जब मैं लाइन import rlcompleter , एक KEY_RESIZE < / कोड> सही ढंग से वापस आ गया है और सबकुछ ठीक काम करता है। क्या हो रहा है ?? मैंने इसे बाहर करने की कोशिश की है, और आप शिकार का शिकार हैं, जो कि एक पायथन समस्या के मुकाबले ज्यादा एक रेडलाइन + शाप समस्या है। संक्षेप में, पर्यावरण चर लाइनों और कॉलम्स के आधार पर व्यवहार को शाप देते हैं यदि आप जोड़ते हैं तो आयात करें os.unsetenv ('LINES

.net - Is there any simpler way to check if string entered math to "digitsPX" or "digits%"? -

I need to parse the html values ​​for the top, left, width and height. The user wants to, but can input anything, but I need to refuse to enter the wrong values ​​like "px 100" and etc. I need to make sure that the string he inserted is something like this: 100px 100% -100px -100% Where 100 Any number Might be possible. I tried to code it, but there should be a lot of inquiry, so I think there may be a better solution.) // Check if in test_str Signs other than the personal string include IStringContainsSymbolsOtherThan (string test_str, list & lt; char & gt; symbols) {if (string.IsNullOrEmpty (test_str)) return null; For (int i = 0; i & lt; test_str.Length; i ++) if (! Symbol (test_str [i])) test_str [i] return. Toasting (); Return tap; } / / The error in saying what is wrong with the entered value (what is not needed) should return the private string GetExceptionMsgFromIntegerValidating (string wall) {if (string.IsNullOrthly (val)) "Price can

php - Symfony2 form variable not viewing in an included template -

In some of a dosage, I am trying to render a form in a template, which is a template The template has been included in. In my Controller: Public function searchInvSumAction (Request $ request) {$ form = $ this- & gt; CreateFormbuilder () - & gt; Add ('fromdate', 'date', array ('label' = 'gtc:' ',' widget '= & gt;' single_text ')) - & gt; Add ('todate', 'date', array ('label' = & gt; 'to:', 'widget' = & gt; 'single_text')) - & gt; Add ('generated', 'submit') - & gt; GetForm (); $ $ --- ($ CIRBundle: Reports: index.html.twig, Return Array ('invsum' & gt; $ form- & gt; createView ());} index.html.twig template: // code ........ Input type = "radio" name = "tab" id Labels for & lt; div id = "tab-content3" class = "Tab 3" & gt; & lt; label = "tab3" clas

tkinter - python 3.2.5 grid sticky/weight not working -

Below is a simple example of the problem: it has a grid layout in which I have a button in the line 0 A text widget is placed in the widget and row 1 . I want the text widget in the line 1 for text widget, keeping the NW (not row 0 extension) keeping the text above the widget and expanding it with the form for. The problem is that the horizontal column (the column is spread correctly, but the text is not the widget line), if I get rid of the button, the text widget spreads correctly. Also, whatever I have originally kept, it is more involved and the best used grid is. So basically the pack is not a solution to use. Any help would be appreciated. ###################################### Tanker Import * From class app (frame): def __init __ (self, parent): frame .__ init __ (self, parent) self.parent = parents themselves Integuei () ############################################# ################# # Initiate GUI Widgets InitGui (Self): self.parent.title ("Test Grid")

c# - Best algorithm for age? -

I was wondering what would be the best way to search through the collection of these formats: < pre> public class person {date of birth date} set date}} is my date of birth, i.e. 10/10/1943, now suppose I have one such The way that takes two parameters in this way: public IEnumerable & lt; Person & gt; SearchByAgeRange (Int AgeMin, Int AgeMax) {// Best algorithm goes here} There is a question of obtaining a collection of people to get people whose age passed as parameters Is between the maximum and the minimum integer? Try it out: Public IEnumerable & lt; Person & gt; SearchByAgeRange (Int AgeMin, Int AgeMax) {// If the maximum age you are looking for, for example 80, you should look for the date that is equal to or equal to the current datename / mine 80 years. This is the date of the Minadet. DateTimeDate = Date Time.Now AddThis Year (-JJX); // If the minimum age is looking for you 40 for instace, then you should find the dates that are 40

c++ - Deleting an array works on CodeBlocks but not on Visual -

I am creating a square and at some point I make a delete call. This works in codeboxes and it is not in Visual Studio 2013. I have in my class: private: bool sign; // 0 if positive, 1 if negative inte numbered; Int vectorSize; Int * number; Then I have this function: zero XXLint :: edit (const char * s) {// size this-> size = strlen (S); // Start Sign In (S [0] == '-') {This-> Icon = 1; S ++; } And if (S [0] == '+') +++; else this-> Sign = 0; Delete [] number; // Debugger here gives me an error // get vector size-> vector seas = it-> Number size / 4; // Allowed Memory - gt; Number = new int [it-> Vector]]; // Store the string in the number vector. Int place = it-> Vector shapes; Int current = it- & gt; Number size-1; While {location} {int aux = 0; For (Inti = 3; I> => & amp;;; & amp; ;; -; i--) If (current - i> gt; 0) aux = aux * 10 + s [ Current - i] - '0'; Present - = 4; This- & gt; Number [place -]

linux - Bash Script: Test vs. if issues -

I am trying to write a simple script to check the current good level of a process. Works without any problems: test "$ (ps axl | grep '[m] y_process' | awk '{print $ 6}')" ! = '-10' & amp; Amp; (Echo test) However, I do more than just a simple echo and I hope that if it breaks into a statement. Being said, using the exact test, it fails every time. Here's the code: if ["$ (ps axl | grep '[m] y_process' | awk '{print $ 6}')"! = '-10']; Then the "test" echo # # other stuff is going here As a result, I'm sure there is something wrong with my syntax - I also compare these and the good levels (eg, -10) Have tried to use double quotes. Thanks in advance for help. Edit to edit: When I just try to run: ps axl | grep '[m] y_process' | From a script awk '{print $ 6}' , it returns an empty string instead of the process, so I compressed it down ... < p> 2 wa

html - CSS linear gradient from center -

I am thinking that doing something like this with CSS gradients is possible: In this example the center orange will be grayed in all directions. The black rectangle represents a div. I could not find this school at 3 schools, although there were many other gradient-related capabilities in it. Not really what radial grade is that? Background: # eded2f; / * Old browser * / background: -moz-radial-gradient (center, oval cover, # eded2f 0%, # 474919 100%); / * FF 3.6 + * / Background: - WebCat-Gradient (radial, center center, 0px, center center, 100%, color-stop (0%, # eded2f), color-stop (100%, # 474919)) ; / * Chrome, Safari 4 + * / Background: -WebKit-radial-gradient (center, oval cover, # eded2f 0%, # 474919 100%); / * Chrome10 +, Safari 5.1 + * / Background: -O-radial-gradient (center, oval cover, # eded2f 0%, # 474919 100%); / * Opera 12+ * / Background: -MS-radial-gradient (center, oval cover, # eded2f 0%, # 474919 100%); / * IE10 + * / Background: radial-gradient

jquery - X-editable Datepicker + Bootstrap 3? -

I'm looking at x-editable which looks great but I'm not sure it is updating now ( November 2013 Last Update). This apparently sinking snot support date picker option I'm thinking that anyone knows the option of X-editable or a fork whose work date is a date picker. "post-text" itemprop = "text"> You can use it for date picker, it's really cool and you can have TIME picker if you wish. And is working in all browsers including IE

javascript - Storing Checked Radio buttons values in Jquery Array -

मेरे पास एचटीएमएल में n number के साथ एक ही सेक्स रेडियो बटन के साथ <0> <0> कोड की <0> कोड & lt; td & gt; मैं एक सरणी में लिंग के मूल्य (या तो 1 या 0 ) को संग्रहित करना चाहता हूं। यहां 3-rows के लिए नमूना कोड है। HTML कोड: & lt; तालिका & gt; & LT; टीआर & gt; & lt; टीडी & gt; पुरुष & lt; इनपुट प्रकार = "रेडियो" नाम = "लिंग" मान = "0" / & gt; महिला & lt; इनपुट प्रकार = "रेडियो" नाम = "लिंग" मान = "1" / & gt; & Lt; / टीडी & gt; & lt; / टीआर & gt; & LT; टीआर & gt; & lt; टीडी & gt; पुरुष & lt; इनपुट प्रकार = "रेडियो" नाम = "लिंग 1" मान = "0" / & gt; महिला & lt; इनपुट प्रकार = "रेडियो" नाम = "लिंग 1" मान = "1" / & gt; & Lt; / टीडी & gt; & lt; / टीआर & gt; & LT; टीआर & gt; & lt; टीडी & gt; पुरुष & lt; इनपुट

c# - Action faster than method call? -

Some time ago I came to know about a method that the action is faster than the pure method call. I do not remember where it is, but had to move in the moment, did some tests and found that it tells the truth in some cases. Someone today says that what I was doing was wrong, so anyone can get a reason, in these tests, the work of the parameters is faster than pure methods? I must say that this is only faster in x64 machines, slow in x86. class program {static zero main (string [] args) {test t = new test (); T.doTest (); Console.ReadKey (); }} Class test {stopwatch w; int a = 0; Public zero doTest () {action doSum = () = & gt; {A = A + 1; }; & Lt; Integer & gt; DoSumValue = (plus) = & gt; {A = A + add; }; w = new stopwatch (); Console WrightLine ("------- with params -------"); {A = 0; for intented = 0; round and lieutenant; 10; round ++) W.Reset (); w.Start (); For (Intubsee = 0; Books & lt; 500000000; buc ++) Sum (1); w.Stop (); Console.light lin

javascript - Canvas signature on scroll changes mouse draw location -

I am trying to use canvas so that someone with a mouse can write their signature until I see the screen By stretching or scrolling, everything works until it pulls the line at a different place than the mouse. code: function onMouseUp (event) {'strict experiment'; Mouse pressed = false; } Ceremony onMouseMove (event) {'strict experiment'; If (mouse button) {event.preventDefault (); Mousex = event. Client X - can.offsetLeft - mleft; MouseY = event.clientY - can.offsetTop - mtop; Ctx.lineTo (mousex, mousse); ctx.stroke (); }} Function onMouseDown (event) {'use strict'; MousePressed = True; Mousex = event. Client X - can.offsetLeft - mleft; MouseY = event.clientY - can.offsetTop - mtop; Ctx.beginPath (); Ctx.moveTo (mousex, mousse); } Can.addEventListener ('mousemove', onMouseMove, incorrect); Can.addEventListener ('mousedown', onMouseDown, False); Can.addEventListener ('mouseup', onMouseUp, Incorrect); looks like HTML: & lt

ruby on rails - Use time condition with Active Record -

I am trying to make a request with the condition of time I want something like this: model. Where {updated_at & gt; Definitely this last code is not working. I have not found any solution to this problem till now. Do anyone have any ideas to solve this problem? Finally, I did it like this: models . Where {updated_at & lt; Date time Now - 10.minutes}

registry - How to detect Excel version programmatically -

मेरे इंस्टॉलर में, मैंने रजिस्ट्री कुंजी (HKEY_CLASSES_ROOT \ Excel.Application \ CurVer) को एक्सेल का संस्करण प्राप्त करने के लिए जाँच लिया। यह 1 दिन से काम किया है। हालांकि, हाल ही में हम एक क्लाइंट के पीसी पर खोजते हैं ऐसा कोई ऐसी चीज नहीं है और मेरा इंस्टॉलर विफल हो जाता है। तो मुझे आश्चर्य है कि एक्सेल का संस्करण पाने के लिए कोई अन्य रजिस्ट्री कुंजी है? या ग्राहक के एक्सेल में कोई समस्या है? धन्यवाद संपादित करें ग्राहक का कार्यालय 2010 (32 बिट), विंडोज 7 (64 बिट) है। उप dural () MsgBox application.Version End Sub एक्सेल 2007 के लिए मेरी मशीन की उपज 12.0 में कौन सी है

save the current data of the arraylist when closing the app and retrieve it upon returning android -

I'm new to Android, and I have an array list that stores data from user input and I Then want to save when the user closes the app and retrieves it when the user re-opens the app then my code is string getInput = inputText.getText (). toString (); If (getInput) getInput.equals ("")) {toast. Make text (getBaseContext), "item may have been added previously or not, empty", toast. LNNGH_LOG). Show (); } And {addArray.add (getInput); Toast. Make text (getBaseContext), "item added", toast.lNGTH_LONG). Show (); ArrayAdapter & LT; String & gt; Adapters = new arreptopter & lt; String & gt; (Main activity. This, Android R. outout. Simple_LiLink_Item_multiplay_choice, adare); Find show = (LISTviewView) VVBIID (RID. Show.setAdapter (adapter); ((EditText) FindUBID (RID.Edit Input)) Settext (""); You can use PreferenceManager; Here is an example: The app is opened while saving passwords and receiving it Public class SavedP

Strange string behavior in Ruby -

इस सवाल का पहले से ही एक उत्तर है: < / P> 4 जवाब इसलिए मैं आसपास खेल रहा था रूबी, और देखा कि "a" "b" रिटर्न "ab" । यदि यह बहुत अजीब और बेकार है, तो मैं सोच रहा था कि इसे क्या कहा जाता है और अगर इसका उद्देश्य है मैं किसी भी जवाब की सराहना करता हूँ धन्यवाद! इसे कहा जाता है और यह कई भाषाओं में सामान्य है। अधिक विशेष रूप से, आसन्न स्ट्रिंग लीटरल्स जिन्हें किसी भी अन्य ऑपरेटरों द्वारा अलग नहीं किया जाता है, उन्हें स्वचालित रूप से एक साथ जोड़ दिया जाता है। एमएसडीएन: (सी) यह कुछ ही नाम के लिए सी, सी ++, पायथन, और रूबी में मौजूद है। / ली> लेक्सिकल विश्लेषण: (पायथन) (रूबी) लिटरल्स - (रूबी) इसका उदाहरण इस्तेमाल किया जा सकता है कई झूठ पर एक लंबी स्ट्रिंग को तोड़ने के लिए, प्रत्येक टुकड़ा टिप्पणी करने की क्षमता भी जोड़ने के लिए कुछ दिन मैंने अजगर में लिखा था: hdr = struct.Struct ('& lt;' '8s' # 0x00 मैजिक वैल्यू 'I' # 0x08 ऑफसेट 'I' # 0x0C लंबाई 'एच '# 0x10 प्रकार' एच '#

Loops in Excel VBA -- How do I iterate a function through a range? -

So I know that Excel has an NPV function, but I'm trying to create myself because I myself I am trying to teach VBA. I have the data placed in a table and then I want to do it again through a horizontal cells (via G5 via I5). The way I am trying to structure the loop, it is enthusiastically for the number of cash flow and setting that number as the last date. In this way the macro can be used for problems with different periods. My code is not working and I'm not sure why anyone can see and help me? Please generally use words like I started with VBA yesterday. Sub NPV () as DIM Y integer, invest in double form, tax double, grille in double form, Double WCP, Double like Dr., I form integer In the form of the double y = range ("C4") inv = range ("C5") = = Range ("C6") = Range ("E4") wc = range ("E5" ) dr = range ("5, 5 + i") v = v / (1 + dr) ^ i total = y = range for i = 1 for totals = 0 as a total ("E6&quo

delphi - Why `as` operator might throw nasty EAccessViolation instead of normal EIntfCastError? -

I have created a highly experimental and unstable IDE add-in, which causes extremely bad A / V on the IDE shutdown. (Recently breaks feature projects, Gran!) I finally narrowed it down to the specific killer: destructor TMyAddIn.Destroy; Get started {$ IFDEF DEBUG} {The bug is here, A / V causes IOTAMessage services (BorlandIDEServices) when it's closed. AddTitleMessage ('Bye'); {$ ENDIF} {...} {Finishing up stuff} {...} inherited; End; A / V exception <0> has read at 0x00000008 . I have added more security to the problematic statement: If specified (BorlandIDEServices) then {passes} if supported (BorlandIDEServices, IotAMessage services) then { Failed} (BorlandIDEServices as IotAmessageServices). AddTitleMessage ('Bye'); ... and found that (1) pointer still does not work zero (2) QueryInterface (3) The desired interface no longer exists, given that everything looks normal, I hope friendly EIntfCastError . But why have I got an A / V ins

javascript - $_SERVER['HTTP_REFERER'] not working -

मेरे पास वर्तमान में एक जावास्क्रिप्ट फ़ाइल है ... $ ( दस्तावेज़) .ready (function () {$ .ajax ({cache: false, प्रकार: 'GET', url: './memberfunctions/getRef.php', डेटा: {}, पहलेसेन्ड: फ़ंक्शन () {}, सफलता : समारोह (डेटा) {// सफल अनुरोध; डेटा console.log (डेटा) के साथ कुछ करें;}, त्रुटि: कार्य () {// असफल अनुरोध; उपयोगकर्ता चेतावनी को प्रतिक्रिया दें ("क्या हुआ था");} });}); getRef.php है & lt;? php $ httpReferer = isset ($ _ SERVER ['HTTP_REFERER'])? $ _SERVER ['HTTP_REFERER']: शून्य; प्रतिध्वनि $ httpReferer; ? & Gt; अगर मैं पेस्टबिन पर जाता हूं, तो टाइप करें और mysite.com पर क्लिक करें, मैं mysite.com पर जाता हूं और कंसोल mysite.com कहते हैं। जाहिर है मैं कंसोल को pastebin.com / ###### कहने के लिए चाहता हूं मुझे पता है कि HTTP_REFERER असुरक्षित, कमजोर, गरीब, अविश्वसनीय है यह एक छोटे से गैर-महत्वपूर्ण उद्देश्य की सेवा करता है। अपने AJAX अनुरोध के लिए, संदर्भकर्ता pastebin.com नहीं है । आपके माता-पिता के पृष्ठ को

algorithm - Triary-Heap-Ordered Tree -

I have a laboratory where I ordered a triangular heap of code given for binary piled-ordered trees Edited trees need to be edited. (This is all in Java) My idea for this is ... With the binary tree, you simplify the comparison of left and right children. For a trilogy tree, it seems that you should compare the middle child with the left child, then in the middle of the child in the right child ... is this right? Now important question .. I did not remember the algorithm tree for a triangular heap order ... I believe for a binary tree, its parents = "Child - 1/2" So it will not be triary just ...? parent = "child - 1/3" <div class = "post-binary tree is not very clear in this When it is either released or you can use at least and equal to the Ternary Search Tree. </ P> </ div> </ HTML><br /><br />

Php exception result in white page -

इस सवाल का पहले से ही एक उत्तर है: < / p> 15 उत्तर मैं उत्पाद सर्वर पर काम कर रहा हूँ। जब कोई अपवाद होता है, तो कुछ भी नहीं दिखता है लेकिन एक सफेद स्क्रीन है मुझे उम्मीद थी कि यह त्रुटि कहां मुद्रित होगी। क्या आपने त्रुटि रिपोर्टिंग कोशिश करके: ini_set ('error_reporting', E_ALL); error_reporting (E_ALL);

java - Serializing a list throwing IO exception -

I need some help .. I am playing it forever and I do not know what I remember And I'm sure it's something small but I can not wrap my head around it. I have a binary search tree in which students are objects, and I am trying to convert paste to a list, then sort the list and when the program goes again, that list Deserialize and add each object back to the tree I am using, I do not know why, but my IOXation is holding on. This is where I am writing: to save private zeros () {JOptionPane.showMessageDialog (blank, "Saving the file ..." ); System.out.println ("Saving record:"); ToListVisitor & LT; Students & gt; ListVisit = New ToListVisitor & lt; & Gt; (); Tree.inOderTraversal (listVisit); System.out.println ("The list includes:" + listVisit.getList ()); Try (object overputstream output = new object overputstream (new file output stream (file)) {output.writeObject (listVisit.getList ()); // Is this line something? } Hold (F

javascript - Avoid dynamically injecting the same script multiple times when using chrome.tabs.executeScript(...) -

I'm building a Google Chrome extension In the original setup, I have a browser action button that works in the active tab in jQuery and Injects the second bit of JavaScript, when it is clicked to do it This is my first chrome extension, but it seems that the user will take a second action on the script again Will be injected from This is a problem because the main pages are working with all AJAX, so there is a lot of change in the content of the page but the actual page URL has never changed. Is this a legitimate concern, or am I thinking this is an easy way to stop script by injection multiple times and in a script? Should I perhaps specify them as content scripts? This is absolutely legitimate concern. The easiest way to use a system like the #ifndef is to include guards in C. Once the content script is executed, a flag is set, and check whether it is defined before doing anything, by executing all the scripts in the same detail, JS execution reference and ther

php - Is there a typo in this str_replace code? / Am I reading it correctly? -

Here is the line of code from a PHP file, in particular it is from zstore.php, which is part of a file Forms of "Zzele Store Builder" ToolsSet set by Jezele.com gives to anyone like me, who have products for sale at Zaza and have massages that give data a good " Storefront "which I can set in my way to the Zayzle.com Rather than being confined by the CMS structure of C, they want to keep the monkey (Uhmi ... like users) from creating too much delusional. Therefore ... here code: $ keyword = str_replace ("", ",", str_replace (",", "", $ keyword)); Two questions: Do I understand what it does and Is there an extra single or double in the string? Need quote? I think the line of code is saying: Take a string of characters in the user input (dance divis) and specify it in the designated variable $ keyword Then run the following function on that character string = str_replace ("", ",&q

mysql - Subquery or INNER JOIN? -

I have 3 tables that represent emails like attachments, accordingly, there are zero, one or more attachments in the email . Three tables email , attachments and files . Email - Each email is mentioned in an email and has a message id attachment - each line There can be a message ID and a file ID with multiple lines with the same message ID. files - Each file is referenced in a file and it has fileID and file size (size) in it I get a result in mysql I am trying to list the email ID and the total size of all the files and no success. I files using SUM (size) and a INNER JOIN I can get a total size, but I do not have an e-mail ID and a list of total file size Can writing. Should it use multiple INNER JOIN S? INNER JOIN and a subquery? And then a group B ? Subquery and then a IN even one direction would be really useful. Manipulation in PHP seems ridiculously expensive. Many thanks! <div class = "post & join the attachment to the enn

How to add custom aspect to folder in Alfresco 4.2? -

I have kept the information required for a custom aspects ... but I do not understand how to do it Add a folder so that when a user uploads a document, then the meta-data of that document is required to be entered. My custom aspect is not visible in the customized dialogue managed by the repository or the rule for a rule is making new. When creating rules I select the 'Set property' option, but then I can only set one asset at a time and only with the data defined in the rule. I've added my aspect as 'web-client-config-custom.xml': & lt; Config evaluator = "string-compare" status = "action wizards" & gt; & Lt; Aspects & gt; & Lt; Aspect names = "custom: myspace" /> & Lt; / Facets & gt; & Lt; / Config & gt; & Lt ;! - Displays properties in the description details page - & gt; & Lt; config evaluator = "aspect-name" condition = "custom: myspect" & gt; &

How to play two videos at the same time with gstreamer? -

I want to play two videos with gstreamer at the same time.But I do not know about it. I use Plenin 2 pipeline, as xvimagesink sync element. Now I want to play this pipeline two videos. Any solutions? You can not do this with Playboy 2, you can either use multiple playben 2 Or create your own pipeline with multiple eudicodes and can link to multiple sinks. In addition, gstreamer 0.10 is obsolete please go to the latest 1.0 version (currently 1.2.4)

javascript - Model parameter takes no effect in {{render}} helper -

The second parameter should be a model, but in my example there is no effect: Template: < / P> & lt; Script type = "text / x-handlebars" data-template-name = "guestbook" & gt; {{#each}} & lt; div class = "visitor-lee" & gt; & Lt; div class = "user-name" & gt; {{Name}} & lt; / Div & gt; & Lt; Div class = "clear" & gt; & Lt; / Div & gt; & Lt; / Div & gt; {{/ Every}} & lt; / Script & gt; & Lt ;! - End with x-handle bars - & gt; Javascript: window.WorkBench = Ember.Application.create ({}); Workbank. Application Editor = DS Fixtures adapter.andend (); WorkBench.Guestlist = DS.Model.extend ({name: DS.attr ("string")}); WorkBench.Guestlist.FIXTURES = [{id: 1, name: 'aa'}, {id: 2, name: 'BBB'}, {id: 3, name: 'ccc'}]; WorkBench.GuestlistController = Ember.ArrayController.extend ({}); html & lt; Div id = "co

javascript - Angular.js Yeoman app.js file not running custom function -

I have an angular .js installation from a male generator for Express.js, I was under the impression that when the node .js server (with grunting service) starts, if ap js file is used to run the function i. However, my function left in my app / script / app.js.Run API () ; Is not running. Why is it like this? I app. How can I run a function in JS? There is no error on the output when the server starts: a @demo ~ / node_stoff $ cat app / script / app.js 'strict use'; Var rest = Requirement ('. / Memory.js'); Rest.runApi (); Var myappApp = angular The module ('myappApp', ['ngCookies', 'duScroll', 'ngRoute']) config (function ($ route provider) {$ routeProvider.when ('/ home', {templateUrl: 'views / $ RouteProvider.when (' / First ', {templateUrl:' views / first.html ', controller:' first controller '}); $ routeProvider.otherwise ({redirectTo: / home.html', controller: 'home controller'

Cannot install library(xlsx) in R and look for an alternative -

I use R Version 3.0.3. I was not able to install the library (xlsx) Error Message: Loading Required Package: rJava Error: .onload Loading 'name' () for Loading for 'rJava', Description: Call: Indel (X Logical (local), as.logical (now), ...) Error: Shared Object 'C: / Program Files / R / R-3.0.3 / Library / RJSA / Libs / x64 / rJava.dll' Unable to load: load library failure: specified module not found I then tried to install rjava by myself error message Error: Library ("RJVA", lib.loc = "C: / Program Files / R / R-3.0.3 / library") Error: .onload failed to 'Jaza' Load Namespace (), Description: Call: Indel (X, Agal. Logical (local), as Logical (now), ...) Error: Share Object 'C: / Program Files / R / R-3.0 3 / Library / RJVA / LIBS / X64 / RJVA DLL ': Load Libraries Failure: The specified module was not found. Is there another way to load the excel file? Thank you, This problem is usually caused by x86

algorithm - iterative deepening depth first search higer time complexity than depth first search? -

It seems that dynamic search should have a higher asymmetric complexity compared to BFS, as the depth increases the number of times It should start searching for it from the beginning But the wiki says, why? If the tree is not balanced and the answer is closer to the root than the deep leaves, then the answer is deeply Will be obtained which is less than the maximum depth of the tree, whereas prior to the quest the depth of the tree can be found to the maximum depth before it gets the correct answer. Since the number of nodes in the tree can be almost faster with depth, it can be a good deal - with a maximum depth of 10, finding roughly 1024/2 = 512 nodes 1 + 2 + 4 + ... 256 = 511 nodes, therefore, is more extreme than pure profit - and this example completely searches for depths and up to 8 searches. (And in some cases arbitrarily wrong answers can be large depth).

actionscript 3 - show last 100 lines textArea AS3 Flash -

I have a very busy chat app and Textaria is ready to clean itself after a certain text, but What do I want to show the last 100 lines of text in Textaria and remove the rest. The use of Flash CC The text comes from the Red5 server like this: < Rescue message (user name: string, message: string) on ​​code> function: zero {if (myTextArea.length> 21400) {myTextArea.htmlText = ""; } // To add text to text. MyTextArea.htmlText + = "& font color = '# ff0000' & gt; + + User Name +": "+ Message" & lt; / Font & gt; ";} So, the last 100 lines have any idea to keep the chat? Thanks!: -) I store all the messages I receive in just one message: different messages: array = []; Username: string, msg: string): zero {messages.push ({username: username, msg: msg}) displayMessages (); // look lower.} And drew past 0-100 objects for performance Press: function display message (): zero {myTextArea.htmlText = &

Linux + Apache to detect the Connection Counts of each Vhosts? -

With RHEL and Apache (httpd), here's a way: Find out V.host (domain) How much incoming connection is receiving? Because in these few days, I get incoming connections on the server: PS aux | Grep httpd -c 734 This means that I have 734 incoming connections that are currently being managed by Apache but there is a problem (To say) 10 Vhosts Which domain is getting high load? Any faster solution please Say that you have a file like /etc/apache2/sites-enabled/000-example.com You can look like lines: & lt; VirtualHost *: 80 & gt; ServerName www.example.com ServerAlias ​​example.com DocumentRoot /www/example.com Next down, if you want, you can change lines to create logfiles for each virtual host error log $ $ {APACHE_LOG_DIR} /error.log custom log $ {APACHE_LOG_DIR} /access.log composite lot: Error log $ $ {APACHE_LOG_DIR} /example_com.error.log Custom log $ {APACHE_LOG_DIR} /example_com.access.log composite Otherwise, You do not