Posts

Showing posts from February, 2013

java - Google App Engine - hash password on server -

I recently started to learn about Google App Engine I have encountered a problem Google app How has the password hash on the engine? I am planning to pass the password to the datastore. I will store hash password and hash there? Any suggestions or ideas? Thx all! Since you are considering applying your own custom login, you are sure to You can use the popular hashing algorithms. You can use the MessageDigest classes for the same. Alternatively, there is also a third party library that you can use like

php - array_push with associative array results in a multidimentional array -

मेरे पास निम्न कार्य है जो कुछ सामान करता है और एक सरणी देता है: function do_work ($ सरणी) {$ result = array (); सरणी_पश ($ परिणाम, सरणी ("हहाहाह" = & gt; "लोहूओउल")); विदेशी मुद्रा ($ कुंजी के रूप में $ सरणी = & gt; $ val) {array_push ($ परिणाम, सरणी ($ key = & gt; $ val)); } वापसी का परिणाम; } मैं इसे मूल रूप से कॉल करता हूं और इसमें $ _ GET सरणी देता हूं। अंत में मैं जो उम्मीद करता हूं वह एक फ्लैट JSON ऑब्जेक्ट है I लेकिन इसके बजाय यह एक JSON सरणी देता है: मेरे कॉलिंग कोड में: $ array = do_work ($ _ GET); गूंज json_encode ($ सरणी); अगर मैं GET एआरएम् के बाद फ़ंक्शन देता हूं: हैंडलर.एफ़पी? एक्शन = रजिस्टर_न्यू_युजर और बिट = ऐसा होता है कोड> यह परिणाम होगा, लेकिन मैं इसे एक सरणी JSON नहीं चाहता हूँ: [["HAHAHAH": "looooooool"}, { "कार्रवाई": "register_new_user"}, {"बकवास": "होता है"}] array_push सरणी के अंत में सामग्री को धक्का देता है, और आप सरणी के अ...

Qt Form and main.cpp communication -

is a QT project with mainwindow (GUI application), how can I communicate with my main communication through my form For example Increase the variable (which is in my main) while the button is one click in my form I have created a project in C The console works well in the app, and now I can create another project, in which UI Form A Only with the code. And I want to communicate between the form and the main function You can use the QT signal / slot functionality You can. Example: // on mainwindow.cpp. Pasted as a title on Delcare onButton () ButtonClicked on title zero () {++ myVar; } Connect (myButton, Signal (click) ()), this, slot (onButtonClicked ()); .

python - Try statement inside loop not being executed after first pass when exception thrown -

I am grabbing a selenium with a URL that is sometimes crypt that the page does not load, so I try the Selenium again in the URL, like a user who click on a hung up link for the first time, so they click it again. My problem occurs when "driver.get" does not work first, it throws timeout excuses, goes back to the top of the loop, and then instead of "try" it through the loop Runs out and loops out of the loop. Can someone shed some light on this? Please and thank you. :) Some extra notes: I get only "timed out" prints, so it seems that the statement to be tried is being done only once. I have all five numbers printed from my iterator. for driver2.set_page_load_timeout (6) k (0, 5, +1): print k Try: Timeout expiration except driver2.get (url): with the above question Nothing is wrong "print out" The only fact is that I "driver .get () ", which apparently succeeded after every passing.

javascript - error: TypeError: Cannot call method 'replace' of undefined -

I am trying to change the substitution of each other using this code: var body = 'message:' + req.query.message.replace ('/ (?: \ R \ n | \ r | \ n) / g', ' However, in this way I get this error message on the line: Type error: the method is not replaced by the 'replace' I was not able to find the solution to use javascript to fix it. What I found is only related to jQuery. How to determine any great idea, please? It is saying that qqquery.message is undefined. You should know why it is undefined.

javascript - How do I include a .gitignore file as part of my npm module? -

I am creating a NPM module which will generate a specific project template for some software projects. As such, when a developer installs my NPM module and runs it, I would love the program to create files and folders in a certain way. A file that I would like to include in the project template .gitignore file because the software project is assuming that it will be tracked through git However, when I say "npm install" on my module , Then NPM converts all of my .gitignore files into .npmignore files. How can I ensure that my .gitignore files can not be tampered with by NPM when distributed to my module? "post-text" itemprop = "text"> It seems that this is a known problem. The answer given below seems like a recommended approach if the problem or If the link is ever destroyed: For us, I think a better solution is going to be a clear document, if the authors want to be used then their generators Name your files ## gitignore ##, which will be...

scala - How to return only if a condition is true? -

I still have scala and functional programming hanging. I am trying to implement an authentication method, but I want to return only if the password matches hash and I am not sure how to do it. Please forgive the code below, I still have my head functional. Hopefully, I have clarified what I want to do. I only want to return one result, if and only if passwords match the password provided, I want to do nothing to do this met. Def authentication (name: string, password: string): option [member] = {db. Connection with {inserted c = & gt; SQL ("Select from member, where less (username) = {member name}"). ('Username' -> name.low lowercase ()) .as (member.member single opt) if (BCRT.CCPA (password, member .member.password)) {member. I am using singleframe and I am playing PlayFramework and Anorm. But, I think this is more of a normal Scala question. as (member member .singleOpt) a Option [member] returns. You can filter a option like any a...

javascript - Trying to get average (mean) color of canvas vs slices thereof. getting inaccurate results -

I am trying to get the color of an image, so that the average color of different pieces of image is compared, To find that area, the most is different from the meaning. Based on the areas of this greatest interest, an image is a part of a project to automatically crop. I was getting strange results, so I created a demo page that compares it with a completely flat red image with slides. Each piece should have the same color (192,02525525) but, as you can see, they do not: (All data goes to the console) Demo Here's the average color function: var getAverageColor = function (canvas) {var reference = canvas.getContext ('2d'); Var imgdata = context.getImageData (0, 0, canvas.Wind, canvas.high); Var pixel = IMGD data; Var color = {red: 0, green: 0, blue: 0, alpha: 0}; // For each loop loop (var i = 0, n = pixel lang; i & lt; n; i + = 4) {color.red + = pixels [i] / 255; // red color green + = pixel [i + 1] / 255; // green color Blu + = pixels [i + 2] / 255; // blu...

Ruby: Concise way to conditionally join strings with newlines? -

मुझे एक description स्ट्रिंग को एक मौजूदा comments चर में जोड़ने की आवश्यकता है , जिसमें कोई स्ट्रिंग या शून्य शामिल है मैं एक नई लाइन के साथ किसी भी मौजूदा टिप्पणी से नए विवरण को अलग करना चाहता हूं, लेकिन केवल अगर मौजूदा टिप्पणी है मैं कुछ तरह से संक्षिप्त तरीके से आया हूं जो कि संक्षिप्त प्रकार के हैं, old_comments = comments + "\ n" बचाव "" new_comments = old_comments + description या new_comments = [टिप्पणियां, विवरण] .compact.join ("\ n") लेकिन मुझे आश्चर्य है कि वहाँ कम नहीं है एक-लाइनर में इसे निचोड़ने के लिए "मुश्किल" तरीका या वहाँ है? [* टिप्पणियाँ, वर्णन]। शामिल करें ($ /)

c# - DataAdapter Update issue -

The following coding does not update my table but after updating the rows variable value is 1. I can not understand what is the reason behind it. help please. SqlConnection connection1 = New SqlConnection (connectionString); Connection1.Open (); Var wktbl = new datatable (); Var CMD = New SQL Commands ("Select from Selection", Connection 1); Var da1 = new SqlDataAdapter (cmd); Var b = new SqlCommandBuilder (da1); Da1.Fill (wktbl); Wktbl.Rows [0] [2] = "5"; Da1.UpdateCommand = b.GetUpdateCommand (true); Int rows = da 1 Update (wktbl); check out. This shows an example below with an update with Data Adapter. The following examples demonstrate how to update the updates of modified rows to clearly call a DataAdapter UpdateCommand and update update method. Note that the parameter specified in the WHERE section of the UPDATE statement is set to use the original value of SourceColumn. This is important because the existing value can be modified and can not m...

java - Spring PropertySourcesPlaceholderConfigurer: local properties vs environment ones? -

I'm trying to use PropertySourcesPlaceholderConfigurer . However, I am confused with the concepts of "local property" and "environment property", as in Spring API Javadoc: The search priority of the local properties is based on the value of the local override property, which The default is the false meaning that local properties are finally being searched after all environmental property sources. For example, what is a local property? What is the property of the environment? How are they defined in the code? What is the logic behind the separation of both? Thank you very much. Environmental properties are properties from the environment :). The properties that you can get are System.getenv () System.getProperties () Spring registers both of them and lets them Provides C.setLocation (new classpath resource ("/ some.properties")); Remember you will use localoverride to determine the properties in your local pro...

Getting HASH ref error in Perl -

I am trying to understand why I get a hash ref error in one situation and not another. Error: string ("1") can not be used as a HASH referrer, while "hard reef" can be used in ./a.pl on line 351. & Lt; - Problem code: My $ count = 0; My% sort_total; Do my $ host (keys% ips_per_host) before (my key% {$ ips_per_host {$ host}}) {$ sort_total {$ count}} = $ ips_per_host {$ host} {$ ip}; $ Sort_total {$ count} {'host'} = $ host; & Lt; - $ sort_total {$ count} {'ip'} = $ ip; $ Count ++; }} Foreach $ count (sort {$ sort_total {$ a} cmp $ sort_total {$ b}} key% sort_total) {[...]} However, if I make another Hash and instead, there is no error. My $ count = 0; My% sort_total; My% sort_hosts; Do my $ host (keys% ips_per_host) before (my key% {$ ips_per_host {$ host}}) {$ sort_total {$ count}} = $ ips_per_host {$ host} {$ ip}; $ Sort_hosts {$ count} {'host'} = $ host; $ Sort_hosts {$ count} {'ip'} = $ ip; $ Count ++; }} Fo...

c# - ANTLR4 white space causing problems -

I am using coco for a while and I thought I would look at ANRLR 4. I am using the C # version of ANTLR4 I put together the beginning of a grammar and found that it does not work. After several experiments I found out that the problem is to have a small grammar below to show the problem that came down to a problem with white space: grammar AB; / * * Parser rule * / paras: now; Ab: IDENT (',' IDENT) *; / * * Lexter Rule * / IDENT: A_Z_ (A_Z_ | DIGIT) *; Piece A_Z_: [A-Z, A-Z, _]; Piece points: [0- 9]; WS: [\ t \ r \ n] + - & gt; Skip; A, b does not give any syntax error. A, b does not give any syntax error. A, B returns: Line: 1 External Output Except 'B' {, ','} A gives B: Line: 1 External output 'B' is expected {, ',' '} I probably miss something in my understanding of dealing with white space but I thought that the WS rule should clear all the spaces so that there is an input equal to A. Apart from the B input which works,...

html5 - Collapsible lists using HTML and CSS -

I have a compressed list using HALM and CSS. This list works well, but I need a little change. Every time I click an item in the list, it spreads. But as I click on the second item in the same list, the first extended element collapses, when the clicked extension is expanded. Please help me to implement the behavior that makes it possible to extend multiple list items at the same time. I just want to do this in HTML and CSS. I have implementation of CSS styles here: .row {vertical-align: top; Height: Auto! Important; } List {Display: None; } .show {display: none; }. Side: Target +. Show {display: inline; }. Side: Goal {display: none; }. Side: Goal ~ .list {display: inline; } @ Media Print {.hide, .show {display: none; }} and HTML markup: & lt; Div class = "row" & gt; & Lt; A href = "# hide1" class = "hide" id = "hide1" & gt; Expand & lt; / A & gt; & Lt; A href = "# show1" class = "sh...

php - My form won't work -

This form works well in choosing a season and one episode that comes with my php handling script: & lt; Form action = "view" method = "find" & gt; & Lt; Font color = "white"> Season: & lt; / Font & gt; & Lt; Select name = "s" & gt; & Lt; Option id = "s" value = "1" & gt; 1 & lt; / Options & gt; & Lt; / Select & gt; & Lt; Font color = "white" & gt; Episode: & lt; / Font & gt; & Lt; Select name = "e" & gt; & Lt; Option id = "e" value = "1" & gt; 1 & lt; / Options & gt; & Lt; Option id = "e" value = "2" & gt; 2 & lt; / Options & gt; & Lt; Option id = "e" value = "3" & gt; 3 & lt; / Options & gt; & Lt; Option id = "e" value = "4" & gt; 4 & lt; / Options & gt; & Lt; Option id = ...

PostgreSQL: One database to multiple user -

Image
I have a PostgreSQL version 9.3. I have created the database name db1 Now I need to share with other users who are connected with all LAN, to connect other applications from the same database. Server in SQL : We can do this by selecting the server name with the login name. Is this possible PostgreSQL? If so, how can this be? What is this? What is the process? You will need to modify pg_hba.conf to allow remote connections to the database. pg_hba Information about .conf can be found. After that, you can connect programming with a string, Add File -> Server ... to connect to a GUI application like. from pgAdmin (remote or locally), similar to your image. Select / strong> and enter the connection information in the dialog box. Here is an example of a window: Your client computers will also need the same with PostgreSQL drivers. If you are doing this in Windows, then you will probably use the ODBC. Postgresqua ODBC driver connection string ca...

unity3d - Colliders in unity behaving the way they, as I think, shouldn't -

I am now learning to work with unity and I saw an error. I am working with 2D and two boxes are together. One of them is: Size: x = 8, y = 0.3 center: x = 0, Y = 4.9 The other one is Size: x = 3, y = 0.6 center: x = 0, y = 3.95 With this information we can see that the difference between those two collars is 0.5, but with a circle of 0.25 radius a hard person can not go through that difference , It gets trapped. There is probably something I do not know about how hovering works and you put some light.

bash - Remove previous line to a match string? -

How can I remove the last line of a match pattern? or Contrast: sed -n '/ pattern / {g; 1! P;}; H ' You can return the file and then return the line after the matte pattern (Which is simple), and then return the result, here is the code: tail-r | SAD / Pattern / {n; D;} 'tail-r

floating point - Javascript precision while dividing -

Is there a way to determine that dividing one number from another will result in the whole number in javascript? As 18.4 / 0.002 gives us 9200 , but 18.4 / 0.1 gives us 183.99999999999997 . The problem is that any of them may be float numbers (like 0.1, 0.01, 1, 10, ...), which makes modules of standard functions impossible to try or subtract, and point point means precise issues That we sometimes get non-full-result results for those numbers that are complete, or do not allow the full number of results for those people.

php - Codeigniter user tracking for visitors -

I am working on the Codeigniter site and implement the User Tracking Functionality for Visitors Trying (not registered user) I want to track every page's redirects (IP address, from-page, to-page, time-stamp) and as I want to track only the temporary user, let me also To find out whether the account exists or not, access the database or not. My question is where do I have to write my code, so that the codiginator automatically checks before each redirect (keep in mind, that place should have the right to access the database or session). Checking in each control file will be very redundant code and I do not think the HTACS file can do this. - Thanks There are several ways to do this: To create a support file, say "code: trackuser_helper.php folder in helpers. Create a function for tracking this file ( trackUser () ). Next, type this file under config / autoload.php : / * | -------------------------------------------------- ----------------- | Automatic...

c# - Reflection and dynamic in-memory assemblies -

Tell us that I dynamically create a type using CSharpCodeProvider and does not choose to continue the results I am Generated assembly is present in memory only, we say that I create two types of two separate in-memory assemblies: Assembly 1: Public category DynamicTypeA {} Assembly 2: Public category DynamicTypeB {Public DynamicTypeA MyProperty {get; Set; }} As you can see that the second type is the first type of property. cold. Now I want to find the dynamic type-beb using reflection: foreach (Typing (DynamicTypeB) in PropertyInfo PI. GETProperties ()) {Console.WriteLine (pi.PropertyType.Name ); } It is found that PropertyInfo.PropertyType fails when the conference is not located on the disc !!! This is true for building member Infos and all other types of inquiries. As we all know, the NET API is using type input on the backend and when it has been checked, then it fails to stay inside of any type. -Momiri Assembly for example expression. The member takes I...

java - What is the purpose of using synchronized (Thread.currentThread())? -

Can anyone expand, because the code snippet below gives an exceptionally invalid monitorstate? Why can not I still find out when and when this exception occurs and what is the purpose of locking the existing execution thread instead of the object? void waitForSignal () {object obj = new object (); Synchronize (thread. Khrutrade ()) {obj.wait (); Obj.notify (); }} You are receiving the exception because you received the Obj before calling wait () , notify () or notify () methods These methods are designed to be designed So that one thread can be blocked until a specific situation is completed. Wait () Issues the lock on the method object, that means you must get the lock before releasing it. While notify () and notify all () to indicate another thread that is waiting to get the lock on the same object Are there. It's like a thread that is telling the other thread: "Friends, I do not need an object anymore, you can go ahead and use it, make sure th...

java - What is a NullPointerException, and how do I fix it? -

What are the null pointer exceptions ( java.lang.NullPointerException ) and what is the reason for them? Which method / tool can be used to determine the reason so that you stop the exception due to terminating the program prematurely? When you declare a reference variable (i.e. one object), then you can actually declare an object Make an indicator. Consider the following code where you declare a variable of the primitive type int : int x; X = 10; In this example, the variable x is a int and Java will start it in 0 for you. When you give it for 10 in the second row, your value is written in 10 memory place, which is indicated by x. However, when you try to declare a different type of reference type, take the following code: integer number; Num = new integer (10); declares a variable called the first line, but does not have a primitive value. Instead it has an indicator (because this type is the integer which is the reference type). Since you have not sai...

Android. set different fonts to each item of ListView -

I have a ListView. I want to set different fonts for each item in ListView. Who can help me with a candidate? I want something like Do something similar in the get-view of the list adapter Public Class MyAdapter ArrayAdapter and lt; JSONObject & gt; {Reference mContext; Private LayoutsInfoLtter; Public MyAdapter (reference references, list & lt; JSONObject & gt; list) {super (references, 0, list); This.mContext = context; Inflater = (layout infographic) mContext.getSystemService (Reference. LEOUT_INFLATER_SERVICE); } @ Override public view getView (integer status, seeviewview, ViewGroup parent) {Final Viewholder holder; Last typeface type 1 = typeface.getAssets (), "myFancyFont.ttf"); Final Typeface Type 2 = typeface.satset (getAssets (), "DroidSans.ttf"); If (convertView == empty) {convertView = inflater.inflate (R.layout.item_feed, guardian, incorrect); Holder = new viewholder (); Holder.TexView = (TextView) ConvertViewFindVBIID (RIDLabel_t...

r - Conditional string splitting -

My question is similar but, I need to divide by more than 2 columns I if the dataset column live cost ID gene_id location cost reed_cost cost How do I get it different from four columns col1 col2 col3 col3 col4 I tried to resolve the link, it could not be found correct. data & lt; - data.frame (v1 = c ("cost", "reed_cost", "# Your Data Library (Stringer) Wars" - str_split_fixed ($$ V1, "| _", max (str_count ($ d1 $ 1, "| _") (1), (x [x == ""], x [x! = ""]))) Names (Dat2) & lt; - paste0 ("cola", seq_len (dim (Dat2) [2]) # # col1 col2 col3 col4 # 1 Cost # 2 Reed cost # 3 Living cost # 4 Reed cost # 5 ID gene ID location

sql - making a mySQL database from form data -

I am trying to create a MySQL database using form data (using WYSIWYG wb9) it successfully .csv Updates the file with new data, but phpmyadmin does not get created SQL database update (which I want to create query searches) How do I add it to the data? Perhaps you will not give me a ONE.com account, but it states that this service is functional when you buy a domain. Or am I getting some PHP code to do this work? I am starting to score in the circle, so my question is here. Any advice is welcome. Maybe you are using the root as your hostname..I think What is this error? Check the link here

sql server - SQL Script to know join relationship between FACT & Dimension Table -

I have worked in the Data Warehouse project which uses MS-BI as its Technology Stack. There are dimensions and fact tables in the database but I want to know the columns between the dimensions and fact tables. Is there a SQL script that can be found in the column between the dimension and the fact table? Thank you between each fact table and dimension table in your data warehouse You can use the following query to get all the foreign keys. Choose from * sys.foreign_keys * to sys.foreign_key_columns

objective c - How do I determine the identity of a UITableView within a Storyboard -

Image
I have created a TableView inside the storyboard, I do not want to drag control between this and the files, as in the programmatic form From, it is easy to maintain. However, I do not know how I can determine what is the identity of the table view. Is there a way to give it a name, or somehow to determine this soap that I can dynamically change its behavior? In fact, all this storyboard. I do not know how to name anything. Use the tag under the View category: Every view is in this UIButton * button = (UIButton *) * You can use the view method UIView method to get the control you need [Self.view View Details: 1]

php - laravel selenium testing - Auth::login -

Using Laravel 4, I'm trying to run some Selenium tests but want to auto login users. $ this-> _user = User :: create ([...]); Authentication :: Login ($ this-> _user); ... or ... $ this-> App ['auth'] - & gt; Login ($ this-> _user); Neither work nor (even with $ this-> startSession () ) I have also tried to retrieve the session ID and $ this-> app ['session'] - & gt; SetId ($ id); With two leading calls, what is the correct way to modify the session in the browser? Edit: I think the problem generates a unique ID from ash: protector :: rewards If you want to fill in the admission form to use Selenium, you do not have to worry about unique session IDs. Selenium can log on to the website as a normal user. However, if you want to bypass the login page and log in directly to the website, then you will need to save the login authentication cookies and then use it in all your test scripts. It is in Python.

r - Why does the vector gets expanded in the loop -

I need to select Size 5 window from the 'data' variable and use it in the next process. (Please see the following code). However, the length of 'all_data' increases for each walk. What am i doing next_one & lt; -function {for (for in: length (data)) {sub_data & lt; -data [k-5: k]; Print (sub_data); }} I call the function as follows: dat = read.csv ("file name"); Attached (DAT); # Is the corresponding column called 'val' (value); Add brackets: (k-5 ): K Comparison 20-5: 20 # [1] 15 14 13 12 11 10 9 7 6 5 4 3 2 1 0 With (20-5): 20 # [1] 15 16 17 18 19 20 Help ("Syntax") to learn about the operator's priority.

solr4 - Solr ShingleFilterFactory in query analysis not worikng -

I have areas with definition given below, I do the perfect job in analysis, but when I query that way To try, the query analyzes behave differently. Data: thd_keyphrase: California, social media, privately held companies located in privately held companies queries: Q = thd_keyphrase: Find any social media In the analysis query process is done: | Any | Any social The social media and it is different from the debug query: "rawquerystring": "thd_keyphrase: search any social media", "Querystring": "thd_keyphrase: find any social **" thd_keyphrase: find text: any text: social text: media ", ** / Pre> or when I remove the default field text: "msg": "No field name is specified in the query and no default specified by 'DF' is absolute, & lt; FieldType name = "keyphrase" class = "solr.TextField" omitNorms = "false" termVectors = "false" multiValued =...

Uninstall R from Mac OSX 10.9.2 -

How do I install R from my MacBook Pro OSX 10.9.2? I have a later version (version for the Mavericks operating system.) Honestly Mark If you want to get rid of the R completely using the terminal, Then just run (if need be padded): rm -rf / library / framework / r.framework / applications / rapp / usr / bin / R / usr / bin / rupcript if correct, from that point:

Periodically obtaining/updating and comparing data in android? -

I am creating an Android application that provides local weather forecasts from weather APIs as well as Twitter updates on Aurora Borealis and both Correlates I was wondering what is the best way to update and compare my constant data, even if the user does not have an app on their device? Therefore, I essentially want to run my app in the background. Any help would be great! You can periodically repeat the task that is implemented in an IntentService. / P> Public Class MyService Intent Service {Public MySiva () {Super ("MySive"); } @ Override Protected Zero to Handle Intent {New My Task ()) carry about (); Log D. ("MyService", "About performing My Task"); } Private class MyTask AsyncTask and lt; String, zero, boolean & gt; {@Override protected boolean doInBackground (string ... strings) {log d. ("MyService", "Calling Iinbackground in My Task"); return false; }}} You need to set a periodic alarm through the alarm mana...

Update linux kernel to > 3.15-rc5 and still use CentOS 6.5 -

I Linux Kernel 2.6.32-358.6.1.el6.x86_64 Get me to your vserver hoster There is a warning that I need to upgrade to a Linux kernel 3.15-RC5 because there is a security violation that will allow me to capture the server. I did a yumupgrade, but it would not upgrade the kernel to a higher version than 2.6.32-358.6.1.el6.x86_64. Currently I'm confused about how to walk. Will someone tell me what is going on and how will he work in my situation? Thanks! This kernel is a development kernel and you will probably need to compile it from the source to install it Kernel upgrades for 2.6 to 3.1 probably will break a set of packages. The upgrade path for 3.1n in CentOS has to be upgraded to CentOS7 and then the kernel must compile itself. CentOS backports security fixes and I certainly have not heard anything about any security bug, and we will ask 150 to 150 Centos servers to specify what a security bug is and 3.15 -Which patches have been implemented in the RC5 kernel, it...

spring xd source moodule does not processing files parallelly -

I'm working on Spring XD M7 version. I have made a steam source. Processor | Sync I have a total of 5 files in my source folder. When my stream is deployed, it is processing sequentially, where I have 3 nodes of Spring XD cluster, which has been configured for radis. My input source is in the local file system xd-admin node, in any way, there is no way to configure Spring XD to process your files in parallel. If I use partition strategy, then I can tell specific files to go to specific files but, I do not need it I have 5 files in my files I want to process files in parallel because I have 3 nodes which are the Spring XD cluster with Radis configured. Please help me. > Thanks, -Signity Calculation 1 for the source module (default) And set the next module (s) for the level of equality you want; Setting it to 0 will deploy all available containers. See.

python - PyQt4 with Cython = Bad Idea? -

In my job somebody has written some python modules I had written that the python module was used to reach the Java bindings of our APIs. An application was written, but I did not know that Jyothon could not use it this way, so the whole application is useless. I'm scrambling to find out how I can expose our APIs to our Python module but a solution. Our API is C and C + + binding (also Java and Pearl) so I'm thinking the best solution is to open only one C / C + + API in its Python module. Instead of doing a C / C + + cover (which I hope very much) for Python using CTPs, SIG, SWIG etc. I thought maybe I could use the statement. What I'm reading from you does not need to do much to make your Python code in Cython, so I can prepare some test examples for how to convert your Python module into Cython and show that you How will we reach C API? But it is also possible to use Sithon and PEATT 4 at the same time. It does not make much sense, QT is C or C ++ and PEXT is ...

cmake - cpack generates RPMs with %files entries that conflict with the RPM spec. How to fix? -

Recently, I need to make sure that using our software by using cpack RHEL 7 and it can be packaged for free reconstruction (such as CentOS 7). Despite this, I have had a problem which was not present for RHEL 6.x and its free rebuilding: RPM, which has its % files cpack System entries such as the following are generated: % dir% attr (0755, root, root) "/"% dir% attr (0755, root, root) "/ usr"% Dir% attr (0755, root, root) "/ usr / bin"% dir% attr (0755, root, root) "/ usr / share"% dir% attr (0755, root, root) "/ usr / share / Applications "% dir% atr (0755, root, root)" / usr / share / doc "% dir% attr (0755, root, root)" / usr / share / icons "% di "/ Usr / share / icons / hicolor" / dir / hicolor "/ usr / users / share / icon / hicolor / scalable"% dir% attr (0755, root, root) Enter the% dir% plus (0755, root, root) "/ scalable / app" code which should not be declared by ...

algorithm - What are the applications of Pancake Sorting? -

I've recently learned about this pancake sorting: And I was wondering why we use it when we compare it to better sorting algorithms. Is this application actually proved beneficial in certain types of scenarios? Although I have no practical experience with this sorting algorithm I have found that these lines are useful in Wikipedia : .. This is a variation of the sorting problem in which only the first approval is to reverse the elements of some prefixes. Unlike traditional sorting algorithm, which probably tries to sort with the lowest comparison, the goal is to sort it as a few reversal as possible. It also states that there are applications in parallel processor networks, in which it can provide an effective path algorithm between processors. I personally encountered many online judge programming competition problems, which require the minimum number of mutations to sort the sequence though the programming competition problem is not the real world problem example. ...

trying to get the value of php into javascript -

$ dateyearange to enter i yearreange : For example, my $ dateyearrange = 2001 then should be yearRange: 'dateyearrange: +0' yearRange: ' 2001: +0 ' but I can not seem to work it Edit: The problem in my code is in the year :(' dateyearrange: +0 ') If I'm the same & lt ;? Php $ dateyear? & Gt; If the code will be executed, then the code will not be executed because if I use the yearRange: dateyearrange , then the output on the exchange is only 2001 that the code is working properly. So the problem in my code is in year: what i need yearrange 2001: +0 P> I I am very embarrassed for my English, I can not really convince myself of it. Edit 2: (Solution): I use yearRange: & lt ;; Php echo $ date year? & Gt ;: + 0 " and deleted var dateyearrange =" I have just made my code more complicated. I do not know why I go in that way Thank you for the answer. It helps me. & lt ;? Php $ date E...

entity framework - Code first with existing database migrations new table creation -

I have an existing database. I am using the code before the existing database. I am able to add a new column to an existing table by using the add-migration and update database command. But when I want to create a new table using a new table, it has not been made. For example, I want to create a new table locale resource. I have created a new class. I have removed the add-migration locale and then update the database command. But is not making any new tables. I am using the unit framework 6.1. Please help me how. To create a migration, you need to add a new table in your reference. Public Virtual DBset & lt; Local Resources & gt; Local Resources (Receive); Set;} Otherwise the migration macro does not know about your new table. If you are not sure where this was built just search for your project for DBST

c++ - Class static method returning struct containing object of this class -

मेरे पास एक वर्ग है: वर्ग SOMECLASS {सार्वजनिक: (... ) स्थैतिक एकत्रीकरण GetInfo (); }; और एक स्ट्रेट: struct कुछ वस्तु {(...) SOMECLASS उदाहरण; }; वे SOUMSTRUCT.h और SOMECLASS.h में घोषित किए गए हैं मैं इसे संकलित करने में सक्षम नहीं हूं, यहां तक ​​कि आगे की घोषणाओं के साथ भी। मैं अब भी मिल रहा हूं: त्रुटि: फ़ील्ड 'इंस्टेंस' का अपूर्ण प्रकार मैं इसे कैसे हल कर सकता हूं? निम्न प्रयास करें SOMECLASS.h #ifndef SOMECLASS_H #DEFINE SOMECLASS_H कक्षा SOMECLASS {सार्वजनिक: (...) स्थैतिक स्ट्रक्चर किसी भी वस्तु GetInfo (); }; #endif // SOMECLASS_H किसी भी वस्तु, एच #ifndef SOMESTRUCT_H #DEFINE SOMESTRUCT_H #include "SOMECLASS.h" संरचना कुछ ({...} SOMECLASS उदाहरण; }; #endif // SOMESTRUCT_H

Django custom tags in textfield -

I do not know that this is the right question for me, but I could not think of telling anyone else to give me some custom tags For example, if I want to write "Article Writer: Which I am" as an input I would like to present this text as it is, but with the difference, when I'll click on it, then I'll direct it for example The wish to have .com / Jo am- I. So if I (srch: some) this example should be on example.com/something how can I do it? Thank you. @ register.filter @stringfilter def bkz (value, autoescape = none): Value = Re.sub (r '(. *) \ (Bkz: (. *) \ B \)', r '\ 1 (bkz: & lt; a href = "/ baslik /" & gt; \ 2 ; / A & gt;), value) return mark_safe (value) bkz.is_safe = true bkz.needs_autoescape = true This templatetag worked fine for me.

AJAX and onClick events for elements of jform in joomla -

I need to populate a child dropdown list based on the selection in the Parents dropdown list for which AJAX It is necessary but I do not understand how can I add an onClick event to jfm where the fields are defined in XML tags. I am using Joomla 2.5.3 for my kind of information. Any help would be appreciated. & lt; Field name = "fkclass" type = "text" label = "class" description = "" class = "inputback" required = "true" & gt; & Lt; Option value = "" & gt; Select a class & lt; / Option & gt; & Lt; / Region & gt; You will need to create your own field after which you will get your input / function You must load your Javascript / AJAX code during For example, I have created my good looking color area that looks: defined ('_JEXEC') or die (); Class JeffFormed Duplicate JFormFieldText {protected $ type = 'Dpcolor'; Public function getInput () {$ document =...

java - Why am i NOT getting null pointer exception in this case while adding null to a list and sorting it -

whenever I change the condition to == 2 or i == 3, I always get NPE but 5 Not in the case? I do not have any more details to add a question. I think the self explanation is import java.util.ArrayList; Import java.util.Collections; Import java.util.list; Import java.util.Random; Public category test {public static zero major (string terms []) exception {list & lt; X & gt; Arr = new arreelist & lt; X & gt; (); For (int i = 0; i This loop only for i 4 So, when you i == 5 , then you do not include anything.

I don't get POST variables sended by an Android app (ssl https related) -

The application works fine before adding a certificate from startSSL.com to my server, the post is empty on the server and somebody Error not found, I get a response from the server This is the code used to call my code in AsyncTasks. // Request HTTP request {// Check method for method if (method == "POST") // // Request method is POST / / default htmlHttpClient DefaultHttpClient httpClient = new DefaultHttpClient (); Http post http post = new HTTP post (url); HttpPost.setEntity (new UrlEncodedFormEntity (params)); HttpResponse httpResponse = httpClient.execute (httpPost); HttpEntity httpEntity = httpResponse.getEntity (); Is = httpEntity.getContent (); } Else if (method == "GET") {// Request method GET DefaultHttpClient httpClient = new DefaultHttpClient (); // String Parameters = URL encoded utility. Format (Params, "UTF-8"); // url + = "?" + Ultimate String; (NameValuePair nameValuePair: Parameters) {// Modificado for usar URIS url + ...

c# - How to keep the original value unchanged in MultiBinding -

मेरे पास मेरे TextBlock & Lt; Multibinding कनवर्टर = "{StaticResource myconv}" & gt; & Lt; बाध्यकारी पथ = "गुण 1" / & gt; & Lt; बाध्यकारी पथ = "गुण 2" / & gt; & Lt; बाध्यकारी पथ = "गुण 3" / & gt; & Lt; / Multibinding & gt; यह मेरा कनवर्टर कोड है सार्वजनिक वर्ग गुणसचिव कनवर्टर: IMultiValueConverter {सार्वजनिक वस्तु कन्वर्ट (ऑब्जेक्ट [] मान, लक्ष्य प्रकार टाइप करें, ऑब्जेक्ट पैरामीटर, System.Globalization कल्चरइन्फ़ो कल्चर) {रिटर्न वैल्यूज। जहां (वी = & gt; वी! = नल) .FirstOrDefault (); } सार्वजनिक वस्तु [] कन्वर्टबैक (वस्तु मूल्य, प्रकार [] लक्ष्य प्रकार, ऑब्जेक्ट पैरामीटर, सिस्टम। Globalization.CultureInfo संस्कृति) {नई NotImplementedException (); }} समस्या अब मैं यहाँ क्या करना चाहूंगा जब सभी Property1 , Property2 और Property3 शून्य हैं, मुझे इसके मूल मान को बनाए रखने के लिए TextBlock चाहिए। आप इसे कैसे पूरा कर सकते हैं? आप विशेष कोड बाइंडिंग (वस्तु [] मान, लक्ष्य प्रक...

python - Access part of a row very quickly in Pandas -

I'm calculating 20 billion, and it has come to know that the slow phase of the two orders of magnitude is only in the relevant panda dataframe Rows % timeit x = query_results.ix [i] 10000 loop, best 3: 155 μs per loop How do we get that speed from one Can leave or two orders of magnitude? 200,000 rows and 11 columns in the Detafrem, to float all the strings strings moving the hard speed reaches a certain length values ​​of different length (which is not feasible in terms of the use ) Will drop about half the pace. Editing for more context: It is almost a matter of full use to use the suggestion of Brainburn: ix instead of IoL note that we Use only two rows at a time Large number of calculations are computed by every second line (200,000 ^ 2/2). test = pd.DataFrame (index = array (200000), columns = array (11)) test.ix [,,:] = 'asdfasdf' i = 0 j = 1% timeit X = set (test.iloc [i]). Intersection (test.iloc [j]) 1000 loops, best 3: 235 μs per loop It wou...

Unix Bash Script - Monitoring User Home Directory Growth -

I am trying to create a script that will increase the value of 100 MB for all non-administrator users home directories / home Under a 20-minute period monitor, and if this happens send an email to the root. The email must contain a list of users who were found to be in violation. I'm new to Unix, and I can easily write pseudo code for it, but translating it into code is a problem I'm thinking this will be something like this: for (under all folders / home) {- Store folder size in one variable - store current timestamp in a variable - when time = 20 minimum, get new folder size and compare (new Size - old size> 100+) - abusive user Send an email notification to route with the name (exit)} Any help would be greatly appreciated! I'm really struggling with it. You need to get an order It was not difficult to find, was it? This can help you know how to deal with

Java 8 generics + exceptions compile time error when using a lambda expression -

A few days ago, I started refactoring some code to use the new Java 8 stream library. Unfortunately, I was running in a compile time error when the stream :: map is shown with a method that is declared to throw the normal e which is further specified as a runtime exception. Sufficient interesting, compile time error away when I switch to using a method reference. Is this a bug, or is not it similar to my Lambda expression? (Also, I know that with the ----- p.execute (foo) parameter :: execute, there are additional parameters for the execute method in my actual code.) Error message Error: (32, 43) java: unreported exception E; code import java.util.ArrayList; Import java.util.list; Public Class JavaBug Test {Interface AbleToThrowException & lt; E expense & gt; {} Interface parameter {public & lt; Exception expands in E & gt; Object execution (AbleToThrowException & lt; E & gt; algo) e throws; } Interface ThrowsRuntimeException AbleToThrowE...

css - Crop and scale an image in SVG -

I have a SVG element in my HTML that contains two external files, another SVG and a bitmap. & lt; Svg xmlns = "http://www.w3.org/2000/svg" xmlns: xlink = "http://www.w3.org/1999/xlink" width = "1024" height = "768" & gt; & Lt; Image xlink: href = "bitmap.png" /> & Lt; Image xlink: href = "outline.svg" /> & Lt; / Svg & gt; My purpose is that I can swap any other (any size) bitmap and get a bitmap: Scale the width down ( Close the bottom part of the bitmap I have interpreted the bitmap image using the view box on the clippath, sub-SVG elements, And I can not nail the problem. I try to do it without javascript Any thoughts? attribute: & lt; svg xmlns = "http://www.w3.org/2000/svg" xmlns: xlink = "http: // www .w3.org / 1999 / xlink "width =" 200 "height =" 45 "> Image ID =" IMG "x =" 0 "y =" 0 "wid...

ios - Google Calendar JSON feed to TableView -

I currently have a JSON feed from a Google calendar that can be found I received it I've done the event title and start date my only problem in a table view is that I can not know how to group events according to date. For example, yesterday I have 3 programs. 10 o'clock - appointment of doctor 3 o'clock - football 9 o'clock - John's party NSString and a NSArray . I currently use the following code to set my object. NSMutableArray * objectArray = [NSMutableArray alloc] init]; I calculate my jsonDictionary [object array add object: [Event Settlement: [JasonDen ObjectForcae: @ "Feeds"] ObjectForchy: @ "Entry"] ObjectAboutEx: IDX] ObjectForrechy: @ "Headline"] Manfurky: @ "$ T"] with Dentator: [JasonDen ObjectForreaky: @ "Feed"] ObjectForreqi: @ "Entry"] ObjectAntindex : IDX] ObjectForreake: @ "Gd $ when"] ObjectOutand: 0]]]; Thanks. If you make your model corr...

html - How to make a double drop down menu -

Hello, I have a navigation bar that has a drop down menu, I want a drop down menu to create a drop down menu, but How do I do this? Here's my code. & lt; Ul id = "navbarr" & gt; & Lt; Li class = "current page" & gt; & Lt; A href = "index.html" & gt; & Lt; I class = "icon-house" & gt; & Lt; / I & gt; & Lt; Br / & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "portfolio.html" & gt; & Lt; I class = "icon-camera" & gt; & Lt; / I & gt; & Lt; Br / & gt; City & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; & Lt; I class = "icon-comments" & gt; & Lt; / I & gt; & Lt; Br / & gt; Blogs & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "services.html"...

How to store instances of the same object in PHP (stateless)? -

I was looking for "Pimple" for PHP, "Simple Service Container" by Fabian Potentier, and with the following comment Was surprised: By default, every time you receive a service, Pimple gives a similar example if you have a different example to return for all calls If you want, wrap your anonymous function with the factory () method. Based on PHP execution, how would it be possible? PHP does not allow me to execute PHP scripts every time a new instance of the object? Edit: Pimple link - Answer this, because in my comments There was no one. Answer - You can not! PHP is stateless on HTTP, and I have taken pamphlet documents from context. If you need to get it, you should see it in the cache system (APC, Memcatch) or Object server (radis). Thanks for the clarification.

Skipping blank lines with strpos in PHP -

I want to read a line and if it is empty, then leave it to work, but I'm studying The text file that starts with three empty lines and it only leaves one of them, how can I leave three blank lines at the beginning of the file and all other blank lines at the beginning of the file? $ handle = fopen ("testlog.log", "r"); If ($ handle) {while (! (Fif ($ handle)) {$ buffer = fgets ($ handle, 4096); $ Pos = strpos ($ buffer, '/ n'); if ($ pos == false) {// do stuff}} Edit Here's the full code I know I'm messing up ... There are several delimiters in the log file, what is a way of harvesting the variable? the log file: & lt ;? Php $ handle = fopen ( "testlog $ ($ (Handle $ ($ (handle $); $ Conn = mysql_connect ("localhost", "user", "pass"); mysql_select_db ("castleot_crawlerlogs", $ Conn); Handle)) {$ buffer = fgets ($ handle, 4096) ); $ Buffer 0 = fast ($ handle, 4096); $ buffer 1 = f...

c++ - Exiting a program without coredump or Segmentation Faults -

I was wondering if a program without any segfault or core dump . I entered ending () and exit () and return 0 . They are not all working in my project. if (it-> board.IC full) () exit () / abortion () and Likewise, functions are not generally the proper way to end C ++ programs as you have seen, they do not run C ++ Destructors, which opens your file stream. If you really want to use exit () , entering a cleanup function with it is a good idea, however, I strongly recommend that you switch to C ++ exceptions instead With exceptions, is called Destroyer and if there is some top level cleaning to be done before the end, then you can catch exceptions like usual on main () And after that wrong Normal return with code This code also prevents the dump. int main () {try methods that can fail and can not be retrieved // // if an error is fatal throwing an exception function (); } Hold (...) {// Return some error code to signal // should end in program form, as...

Using jQuery.getJSON success function to change JSON result -

I am using the JQuery UI widget with one, for example if I type in "ba" So automatically expects an array of stars such as ["bat", "banana", "band", "bar"] However, to get this information, my remote function is very complex, it gives something like this {"Prefix": "ba", "weblog": "gmazza", "tagcounts": {"tag": "bat", "count": 2}, {" Tag ":" banana "," count ": 1}, {" tag ":" band "," count ": 1}, {" tag ":" bar "," count " Mr. ": 1}]} ... I need to go through the array third element" Tagged "string" tag "and return an array of values. Assuming, the most sensible solution would be to convert that function into a format that could work completely completely, but to change the format of the JSON array back to me, I want to learn how to writ...

sql - Is it better to use fewer tables with more columns or vice versa? -

I am trying to figure out how to determine the best balance in organizing databases. I want to be able to store information from various different forms presented by different people, sometimes at times (such as annual updates). I am stuck between having a separate table for each form, or form and combination of element definition and element value table. Example A: There are three types of forms with different types, so each of the four tables, [form A], [formb] and [formaci] has data related to their respective form, in all the FK [customer]. Example B: There are three different types, but at this time there are five different tables [form description] defines the name, type, etc. of the form and it has three entries, one for each form . [Form] uses combination with the date of these submissions to differentiate between [customer] and [form descriptration] and individual submissions from FK. [Form elements] defines all elements from three forms, in which there is an FK and a uniq...

ios - Type 'String' does not conform to protocol 'NSCopying' error when downcast AnyObject to String -

{"Key_1": {"Key_2": "value"}} and then assign "value" to a variable This is my code: var variableShouldBeAssigned: string if x = (json result ["key_1"]? As NSDictionary) {if let's do y = (x ["key_2"] ? String) {variableShouldBeAssigned = y}} However, when I try to downgrade from x ["key_2"] an error occurs? is fine for a string, but it is downgrading to an NSDictionary from jsonResult ["key_1"] . I change x ["key_2"] to change x ["key_2"]? , but I do not know if it is only jsonResult [ "Key_1"] Can anyone tell me the reason? The string does not conform to NSCopying, but definitely NSString does! Besides, going from NSString to string is implicitly contained ... Then I will say Try something like that ... string to NSString O is a sample, suppose you handle jsonResult as an NSDictionary ... func giveDictionary (...

Postorder, preorder, inorder traversals, Binary Search Tree -

निम्न पेड़ संरचना पर विचार करें। ए / \ BC / \ \ DEF नोड्स को पोस्टऑर्डर, एक प्रीडर और एक इनरड्रास्ट्रैव का उपयोग करके किस क्रम में जाना होगा? मुझे लगता है कि यह पोस्टऑर्डर , प्रीडर , और आवर्ती को रिकर्सिव एल्गोरिदम के रूप में सोचने में मदद करता है। पोस्टऑर्डर ट्रवर्सल लगातार, यह बाएं, दाएं, स्वयं है दूसरे शब्दों में, बाएं उप-प्रक्षेपण के लिए ट्रवर्सल करें, फिर दाएं उप-प्रक्षेपण के लिए ट्रवर्सल करें, और उसके बाद ही वर्तमान नोड पर जाएं। उत्तर: डी, ई, बी, एफ, सी, ए इस उदाहरण के लिए: स्पष्टीकरण: नोड ए पर शुरू करें। बाएं उपखंड का मूल्यांकन करें नोड बी पर छोड़ दें उपशीर्षक का मूल्यांकन करें। नोड में डी। कोई बच्चा नहीं -> विज़िट डी । बी पर वापस जाएं। सही उपखंड का मूल्यांकन करें नोड ई में नहीं। -> ई यात्रा । बी पर वापस जाएं। बी जाएं । वापस जाएं ए सही उपखंड का मूल्यांकन करें नोड सी में। कोई बायां उप-प्रक्षेपण नहीं है, इसलिए सही उप-रेखा का मूल्यांकन करें। नोड एफ में कोई बच्चा नहीं -> विज़िट एफ । सी सी जाएं पर जाएं। वापस जाएं ए। A ...

css - Align multiple text label and input label in jQuery mobile -

I have a problem with jQuery mobile I want to align the text labels and input labels in the same line. I tried this CSS: .input-topic {float: left; Display: Inline-block; Padding-right: 10px; Padding-top: 15px; }. Input-content {display: block; Swim left; }. Input {height: 20px; } and when I & lt; For label = "LitNameInput" class = "input-topic" & gt; Name: & lt; / Label & gt; & Lt; Div class = "input-content" & gt; & Lt; Input type = "text" id = "LitNameInput" placeholder = "name alias" class = "input" & gt; & Lt; P style = "margin: 1px;" & Gt; & Lt; / P & gt; & Lt; / Div & gt; This works if the screen is suitable with size, otherwise it shows a terrific result! Here, so you can change the width of the results section to see what is happening. Thanks for all the suggestions and solutions. Do you want the name, telephone and ...

Getting Dynamic Validation on Google Sheets to populate non-adjacent cells -

So I saw how to verify dynamic data in Tarikh's Google Sheet (), but I did not understand how Create a script: a) I specify the value of any other cell by changing the value in a data validation drop-down, and b) how to specify the cell that is holding the new data verification list based on the first time I was selected. Want to Cell Cell S are not adjacent to the original drop-down list. Any help is appreciated! Thanks!