Posts

Showing posts from April, 2012

stored procedures - SQL - Check for consistency between the table data without using Cursors -

I am using SQL and I have 4 tables. tbl_project (project_id is the primary key tbl_task (Task_id as the primary key and project_ID included as a foreign key) < li> tbl_assignment (Includes assignment_id as primary key function_id as foreign key) One project may have one or more functions One assignment can be one or more assignments > In an assignment One or more documents may be Now I have to write a stored procedure that will validate a project and return the verification result, where the form of project id parameter The project needs to check at least one task. All the tasks under this project have at least 1 assignment At least 1 document for this project / work INMENT I have a floating table where I need it Is there any way to implement this argument without using the cursor / div> < p> You do not need a cursor to type this type of verification. These are three questions that do this: No unused projects: Choose p

amazon web services - How does one find real Host when using Cloudfront? -

Image
seems a very strange option, CloudFront sets the host header to the original server host that you specify when specifying request. Why is that so? More importantly, when using the wildcard subdomain, how do I know which subdomain is requested, when they all go forward for the same root

sql server 2008 - Sql Query to Get Nearest Value -

कल्पना कीजिए मेरे पास निम्न तालिका है: --------- ----------------- आईडी - नो ओफ़रर्स 1 - 1 2 - 3 3 - 5 मुझे पैरामीटर पर निकटतम मान प्राप्त करने की आवश्यकता है । उदाहरण के लिए मैं "4" पैरामीटर के रूप में भेजता हूं जिसके परिणामस्वरूप मुझे आईडी 2 की आवश्यकता है I तालिका से चयन आईडी जहां नो ऑफ़रर्स & lt; = param ORDER BY NoOfOrders DESC LIMIT 1 < कोड>

elasticsearch - 'CURL' is not recognized as an internal or external command? -

Image
I use the curl command in the elastic search in windows I'm trying ex: localhost: 9200 / playground / equipment / 1? Beautiful I'm having an error saying that curl is not an internal or external command Please understand me about this problem Help please If you have already installed curl Add where it is installed in the Windows Path: Windows Vista and Windows 7 users 1- From the Desktop, right-click on My Computer And click Properties . 2 - Click the Advanced System Settings link in the left column. 3 - Click the Environment Variables button in the System Properties window. 4 - Select Path and click Edit . 5 - ; Click c: \ Add path to the curl directory . 5 - Click OK . 6 - Close and Reopen Command Prompt

ruby - Why does the reduce implementation return undefined method + for nil:NilClass once a boolean check returns true -

I need to find the sum of all the digits which are equal to the sum of the factors of their digits. I have an algorithm: def equal_to_sum_of_factorial_digits? (N) n == n.to_s.scan (/ \ d /). Map {| S | s.to_i} .reduce {| ACC, Jay. (J == 0 || J == 1)? 1: ACC + (1.j). Injection (: *)} and start = time Now Answer = (10..145) .readuce {| ACC, Jay. ACC + J. if equals_to_soom_off_factorial_diggs? (J)} says "the answer is # {answer} and it has got # {(time.now-start) * 1000} milliseconds." here equal_to_sum_of_factorial_digits? creates a number in separate digits, then adds value to 1 if it is 1 or 0 (1 or 0) The originator of is 1) or if it is 2 above 9 , then its actual value is. The answer then sums up all the values ​​in that property. As long as I do not go beyond 145, the code works (145) The first value is the property, which is its factual number: 145 = 1! + 4! + 5!) This error returns undefined method for zero '+': NilClass . I do not know

c# - Adding Payout to User using TextFile -

I am having trouble adding a payout amount to a user in a text file. Here is my current code: public string payout = 1; Public Static Zero AddPayout (Int Tapeout, String Nichex) {if (UserIsSub (NickX)) {tPayout = payout * 2; File Select all lines ("Loyalty.T.TT"), File ReedLealines ("LoyaltyTTT"). Select (x = & gt; {(XX with Stars) Nick + + "+ + + + + +" \ n \ r return "; return x;});} and {tPayout = payment + 1; file merge all the lines (" loyalty.TTT ", file.readlines (" loyaltyTTT "). (x = & Gt; {(x with stars (nickक्स) nick + + "+ + + +" \ n \ r return "; return x;})); }} Public Static Blog User Isabs (String Value) {if (File.ReadAllLines ("subscribers.txt") includes (value.ToLower ()) {true; } Other {return false; }} So far it connects only one person, and keeps the number equal. I think you are using the wrong newline code, Try to use \ r \ n instead of \ n \ r (By the

automated tests - Jenkins 0 files published after build -

Image
Text after "div class =" itemprop = "text"> I set up a Jenkins server with two jobs The first job selection branch to develop and build the project On Jenkins's server again I have another job that chooses the production branch, it creates this branch on another Junkies slave which is a staging server. This work is configured so that on a successful creation it is on the production server Publishing artwork on SSH Hey there. All SSH keys are setup and the scaffold connects to the server production server, but 0 files are transferred <89874cc01a9f669df69817b1049b1ab98ecb19d3 (original / output) SSH credentials Bitbucket Using GIT_SSH to install credentials using repo .gitcredentials> : Connecting to host [nginx-php-FastCGI] SSH: Connect with configuration [AmazonAWS] ... SSH: Disconnecting configuration [AmazonAWS] ... SSH: Locations 0 file (s) finished: success I checked scaffold workspace and files are being created, just do not send prod

database - Variables in SQL script -

I am trying to create a script that accepts different values ​​from a user and incorporates them into the database. For values, HN names and surnames, I want to use these to search the database for my corisponding code, and then insert the data into the DB. I got this to work in a different script when I did it with a variable but I can not get it to work with two, I get the following error: Enter a line number: Enter a description for 1 item: Enter an amount for 5 lbs items: Enter a prominent category for 30.49 items: Old Old 13: WHERE name = '& amp; HName '; New 13: WHERE name = 'grocery'; Old 22: WHERE name = 'and sub-name' new 22: WHERE name = 'meat' old 28: value (and expanm, and linenum, 'and dccr, amt, encode, SCODA); New 28: Price (1, 1, '5 lbs', 30.49, HSID, SOCD); Acceptable surname Prompt 'Enter a sub-key category for the item:'; * Error 17 in line: ORA-0650: Line 17, Column 9: PLS-00103: Expected one of the foll

How to trigger an action for the calendar events start time in android? -

Actually I need to trigger an event for the calendar events start time. I used the calendar database to read the event's title, start time and end time. By starting the alarm manager for the first time, I was able to trigger my action only once. My main problem is that the alarm manager has to continue the process of going through different time intervals. Or what is the better way to inform the verb (intent)? Thanks in advance It appears that one < p> You can credit credit on the same question.

javascript - Difference between MEAN.js and MEAN.io -

I wanted to use the MEAN javascript stack, but I noticed that two different stacks have their own website and their installation The methods are: mean.js and mean.io. That's why I am asking myself this question: "What do I use?" So to answer this question, I ask the community if you can tell what the differences between the two are? And if possible pros and cons? Because they look like me They are essentially the same ... they both use swig for templating, they Both tests, karma and motcha are used for passport integration, nodes, etc. Why so? Mean.js is an artisan of Mean.io and both were initiated by the initiative ... Mean.io is now under the umbrella of the company looks like Lenovo and Man (Amos Haaveev) with his company Stopped and began to mean. Js You can read more about the reasons. Now ... main (or small) differences that you can see now: CFFolding and boilerplate affair Mean.io uses a custom clear tool called 'mean'. Mean.js use

MySQL: COUNTS with more WHERE`s in 1 query -

Is it possible to do this: as user from user name SELECT COUNT (user name) WHERE user name = 'Piet'; Choose as email in the form of email (email) from where email = 'piet@google.nl'; Select COUNT (ip_registed) IP from users where IP = '127.0.0.1'; In a question (hence without subqueries)? Yes you can use SUM () You should do, using yoga with expression will result in a boolean 1 or 0, so when your expression evaluates the truth, then you will get it count accordingly, whenever the gross working group is used without As a result they will be on one line, and consider the entire table as a group SELECT SUM (username = 'Piet') as the user name, in the form of SUM (email = 'piet @ google.nl'), as SUM (ip = '127.0.0.1') IP to users

JAVA - Converting from byte[] to hex representation -

इस सवाल का पहले से ही एक उत्तर है: < / p> 17 उत्तरों क्या कोई भी रूपांतरित करने का कोई तरीका है बाइट [] से हेक्स प्रतिनिधित्व करने के लिए? मैंने हर जगह खोज की है लेकिन मुझे कुछ भी नहीं मिला! क्या कोई मेरी मदद कर सकता है? इसे आज़माएं: निजी स्थिर स्ट्रिंग अंक = "0123456789abcdef"; सार्वजनिक स्थैतिक स्ट्रिंग टूहेक्स (बाइट [] डेटा) {स्ट्रिंगबफर बफ़ = नया स्ट्रिंगबफर (); के लिए (इंट आई = 0; आई! डेटा = लैंप; आई ++) {इंट वी = डाटा [आई] & amp; 0xff; buf.append (अंक। चाट (v & gt; & gt; 4)); buf.append (अंक। चाट (v & amp; 0xf)); } वापसी buf.toString (); }

javascript - set the curser to the beginning of textarea using jquery -

MyEvent.prototype.sendMessage_ = फ़ंक्शन (इनपुट) {// इनपुट है this.find ('# mytextarea' ); अगर (इनपुट.वल ()। ट्रिम ()! = '') {Input.val (''); $ ( '# Mytextarea') ध्यान केंद्रित ()।; }}; //... एचटीएमएल .... // & lt; textarea type = "text" प्लेसहोल्डर = "यहाँ इनपुट" id = "mytextarea" & gt; & lt; / textarea & gt; Jquery के साथ खाली textarea के बाद, कर्सर अभी भी इनपुट के अंत में है, कैसे textarea की शुरुआत में कर्सर को स्थानांतरित कर सकता है? और दृश्य में मेरे पास है: $ ('# mytextarea') का उपयोग करने की कोशिश करें। )

python - Detect and exclude outliers in Pandas dataframe -

I have a panda dataframe with some columns. Now I know that there are outline layers based on some lines, a fixed column value. For example the column - 'Volume' has all the values ​​12.xx and one value is 4000 Now I would like to exclude those rows which are the columns in this way. Therefore, I have to put a filter inevitably that we select all the rows which are called 3 standard deviations from the values ​​of a given column. boolean Use code> indexing as you would in numpy.array df = pd.DataFrame ({'data': np.random.normal (size = 200)}) #example Datasets of data normally distributed. df [np.abs (df.Data-df.Data.mean ()) and lt; = (3 * df.Data.std ()) # Keep only those whose +3 to -3 standard deviation is in the column 'data' df [~ (np.abs (df.Data-df.Data.mean ()) gt; (3 * df.Data.std ())]] # or if you prefer other methods This is similar to a series: S = pd.Series (np.random.normal (size = 200)) [~ ((SS.mean ()) .abs ()&

CSS file not found when pushing a Jekyll project to gh-pages remote branch and using jekyll-compass -

I was building my site with CSS and everything was working properly, both locally and remotely Then I wanted to switch to SAS I installed the Jquil-compass and now my SAS files are being output in my _site / css folder as CD files. Everything works well on the local level, but when I push them into Github, so my Ali does not apply and I get 404 on the CSS file. What is my mistake? The output of your rendered SASS files is / _site / css < / Code>, just set output to / css (site root level) . What's happening is that local SASS is running correctly and is output to your / _ site / directory as you want but on GitHub pages In production (where jackul-compass gem is not supported) Your CSS output is not exactly at / _ site because the plugin is not being killed there It does not matter if it works locally from there Because Geitheb page pushes jekyll build once again and generates the command / _ site / . Therefore, whatever does not support it (i.e., juke

Highchart graph customization not performing well -

I am using a high chart graph to display data in this article from the current month. I want to display four weeks in a month Want to show data for X-axis and the entire month? I am giving my job to JS Bellal: ** http: //jsfiddle.net/Rw69Y/2/** Everything works fine Except, I want to show on the four Monday of this month. I.e. (2014-04-07,2014-04-14,2014-04-21,2014-04-28). Any ideas about this? I'm stuck there .... just set tick interval Please Please Bela- ** http: //jsfiddle.net/Rw69Y/ See 21 / **

How do you model many-to-many relationships in MongoDB without using an intermediate table? -

I am trying to create many-to-many relationships with the added requirement in Mongodi, which is "meta School Model {_id: & lt; ObjectID123 & gt ;, Name: "Student" Cityville High School ", Location:" Cityville, Statueville "} Now, I have many relationships with them, so students can be a part of many schools, and there are many students in the school. Usually, mangodibi You could have placed an array of other models in each model, for example: Student Model {_id: , Name: "Foo Bar", School: [ , & lt; SchoolID2 & gt;, ...]} School Model [[Litter; StudentID1 & gt;, & lt; StudentID2 & gt ;, ...]} But what if I have to keep the data on that relationship? For example, when the student entered the school and got out, on that date: "enter_date" and "exit_date" In SQL, you have a This table will look like this: Student School: {studentId: 123, schoolId: 456, enter_date: 12-12-2014, exit_date: 12

Is it possible to creare a counting function for html pages? -

I am making a quiz with several html pages (question 1, question 2, etc.), in which every 4 options radio With a button, a check can be done what I want to do is such a function, if you have chosen the correct answer, then 1 point adds to the counter, but if you check the wrong answer, then take 0.25 points . Finally, I have a question that will be with the final grade of the quiz, this will be the sum of points for each question. Any thoughts or suggestions? Use JavaScript or PHP to create a variable and add or subtract each page. Then show it on the last page. Most of the HTML books cover this topic, try to borrow some books about Javascript, as HTML is not a dynamic language. You can use the Post method or the GAT method to send the number to php and javascript on the next page. W3school.com HTML php provides free and detailed tutorials about Javascript and a lot more languages.

html - how to apply vertical-align: middle at div -

I have searched it online and found some solution but nothing works on my project, in most solutions, I have found: & lt; div class = "a" & gt; & Lt; div class = "b" & gt; Unknown stuff should be focused & lt; / Div & gt; & Lt; / Div & gt; .a {display: table; Width: 100%; }. b {display: table-cell; Text align: center; Vertical-row: middle; } By implementing this technique, I have tried to create something like this: The text in the left column is only required to stand in the middle Was there. But, it is not working with that technology: & lt; Div class = "row" & gt; & Lt; Div class = "left" & gt; & Lt; P & gt; Sample text & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "right" & gt; & Lt; P & gt; Text & lt; / P & gt; & Lt; P & gt; Input element & lt; / P & gt; & Lt; P & gt; Table & lt; / P &

How to calculate a value from a user input? (Java) -

I am trying to write a program that will take an input from the user and calculate the total input. For example, if the user input "5 + 30 * 2" would be output "65" I have still spent hours on it and are unable to get the correct solution. Does anybody know how I do this? With JDK1.6, you have built-in reply engine. This is testing and working. import java.io. *; Import javax.script.ScriptEngineManager; Import javax.script.ScriptEngine; Import java.util.Scanner; Import javax.script.ScriptException; Public class MathExpress {public static zero main (string [] args throws scriptException {scanner console = new scanner (System.in); System.out.println ("Enter your Artificial Operation"); String math = console.nextLine (); ScriptEngineManager mgr = New ScriptEngineManager (); Script engine engine = mgr.jetenginebinem ("javascript"); Println (engine.eval (Mathex)); }}

ios - mutating method sent to immutable object - error -

NSUserDefaults * defaultDefects = [NSUserDefaults मानक यूज़र डीफॉल्ट]; एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीटीपीएशनएक्स, सेल्फ। डीपीटीपीटीएजी); NSMutableArray * loadDefects = [defaultDefects objectForKey: @ "डिफॉल्ट डिफेक्ट्स"]; एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीटीपीएशनएक्स, सेल्फ। डीपीटीपीटीएजी); यदि (लोड डीइक्ट्स == शून्य) {loadDefects = [NSMutableArray सरणी]; } एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीपीपीएक्सएक्स, सेल्फ। डीपीटीपीशनवाई); // समस्या यहाँ [loadDefects addObject: [एनएसएन नंबर संख्या दोहरा: self.defectPositionX]]; [लोडडईफूट्स एडऑबैक्ट: [एनएसएनम्बर संख्यावादात्मक दोहराएं: स्वयं। डीपीईटीपीटीएजी]]; एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीटीपीएशनएक्स, सेल्फ। डीपीटीपीटीएजी); [डीफॉल्ट डिएक्टिव सेट ऑब्जेक्ट: लोड डीफेक्ट्स के लिए की: @ "डिफॉल्ट डिफेक्ट्स"]; एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीटीपीएशनएक्स, सेल्फ। डीपीटीपीटीएजी); [डिफ़ॉल्टडिफ़िगर सिंक्रनाइज़]; एनएसएलॉग (@ "% एफ% एफ", स्वयं। डीपीटीपीएशनएक्स, से

asp.net mvc - How to switch between test and production databases with Entity Framework 5 -

I have separate testing and production databases for my ASP.NET MVC 4 app. How can the ANTI framework switch between programming between these two databases, using unit framework 5? This application knows what time database should be used, so I need an application to be able to change the Entity Framework so that it can use the right database at the right time. Does anyone know how to accomplish this and / or a good example is available? EDIT: Because of my app's arrangement, I need to answer GVM's answer. The last remaining thing is that I do not know how to send logic to the base class. Here's what I mean: Public category YourContext: DbContext {public YourContext (): Base ("yourNameOrConnectionString") {}} The problem is The code does not work: string dbConnectionString = "MyDBTest"; How to send an argument to a base class, in this case your contact (): to use base (var db = new YourContext (dbConnectionString)) {// db Code} ()

c++ - How can I pass long and/or unsigned integers to MPI arguments? -

Let's say I have a very large array that I want to send or receive with MPI (v1). To index this array, I use an unsigned long integer. Now, all MPI function calls I have seen use of the int type for my "count" arguments, such as in this example: MPI_Recv (void * buf, int count, MPI_Datatpe datatype, int source, int tag, MPI_Comm comm, MPI_Status * status) However, in my implementation, I would send / receive an array more than the maximum number of arrays Can the capacity be needed? The compiler, naturally, gives me the "invalid conversion" error, when I try to feed an unsigned integer for the "count" argument. I thought of an artist, but then I worry that it will reduce my variable, so I am in some kind of loss. An artist does not have a solution to do because it will only reduce the long count to match here There are two obstacles - easy and hard one. The easy hurdle count type is the int for argument. You can easily find it by mak

c# - sending two strings , but receiving one over tcp -

हाय दोस्तों, यह मेरा ग्राहक और सर्वर कोड कैसे दिखता है: ग्राहक: TcpClient क्लाइंट = नया TcpClient (); क्लाइंट। कनेक्ट (आईपीएड्रेस। पर्सी ("1 9 82। 11.12"), 5004); NetworkStream स्ट्रीम = client.GetStream (); स्ट्रिंग उपयोगकर्ता नाम = लॉगिननाम_टाइट। पाठ; बाइट [] संदेश = एन्कोडिंग.ASCII.GetBytes (उपयोगकर्ता नाम); स्ट्रीम। लिखें (संदेश, 0, संदेश। लांघ); loginName_txt.Clear (); स्ट्रिंग पासवर्ड = password_txt.Text; बाइट [] message1 = एन्कोडिंग.ASCII.GetBytes (पासवर्ड); स्ट्रीम। लिखें (संदेश 1, 0, संदेश 1। लैंग); password_txt.Clear (); stream.Close (); client.Close (); सर्वर: TcpClient mClient = (TcpClient) क्लाइंट; NetworkStream स्ट्रीम = mClient.GetStream (); बाइट [] संदेश = नया बाइट [1024]; Int recv = stream.Read (संदेश, 0, संदेश। लैंग); उपयोगकर्ता नाम = एन्कोडिंग.ASCII.GetString (संदेश, 0, recv); UpdateUI ("उपयोगकर्ता नाम:" + एन्कोडिंग। ASCII.GetString (संदेश, 0, recv)); बाइट [] संदेश 1 = नया बाइट [1024]; Int recv1 = stream.Read (message1, 0, messa

sql - Bulk Insert with Limited Disk Space -

I have a strange situation, and I'm wondering if anyone has any ideas for how to proceed. I am attempting to load bulk 48 gig pipe-delimited files using a very simple bulk input statement in the table in SQL Server 2008. Bulk INSERT ItemMovement FROM with 'E: \ SQLexp \ itemmove.csv' (DATAFILETYPE = 'char', FIELDTERMINATOR = '|', ROWTERMINATOR = '\ n') Originally, I was trying to load directly into the itemsmovelation table but unfortunately, there is a primary key violation somewhere in this huge file. I have created a temporary table to load this file instead, and I plan to select different rows from the temporary table and merge them into the permanent table. However, I am running in issues of space, the drive with which I am working, it is a total of 200 gigs, and 89 gigs already devoted to both my CSV file and other database information I have every time I try to do my convergence, even after setting my recovery model to "si

Convert UNICODE to RGB color in C# -

I want to write code to write in C # which converts every Unicode code to RGB color value. I use UTF-16, this table has three columns for four or one mark or number, the second column of its unicode code and the last column of one of 16 million colors, one can recommend an easy way to do this ??? If you ignore the combination of letters, then each unicode code point is 16 bits. RGB is a 24-bit space that uses a byte for red, one byte for green and one byte for blue. Obviously if you can not do this with 16-bit code, what do you do, for example 5 bits for red, 5 bits for green, and 6 bits for blue is one way to do this. Say you have given a string: const string foo = "hello, world."; // rrrr rggg gggbbbbb console int redmask = 0xF8; const int greenmask = 0xF8; const int BlueMask = 0xFC; Const int RedShift = 8; Const int GreenShift = 3; const int BlueShift = 2; Forrest (Veer Si Fu) {int val = c; Int R = (Well & G; RedShift) & amp; RedMask; Int g = (val>

javascript - Content script & jQuery. Download/get DOM from different web page -

I am trying to modify the img src attribute by getting the URL from a different page. I need to find it by inspecting DOM because it is not static data; I'm looking through classes and IDs. My knowledge of Chrome Extensions is very limited over time. Basically I started just look at the "PSEUDO CODE" section of Background.js manifest.json {"manifest_version": 2, "name": "# "####", "version": "1.0", "description": "#####", "browser_action": {"name": "#####", "icon": ["icon "[[jquery.min.js']," background.js "]," match ": [" http: //png "]," default_icon ":" icon_script "}," content_script " //www.youtube.com/watch?v=AzHzqqqqqqqqz) var l = document.getElementsByTagName ("div"); {var obj = l [i] for (var i = 0; i & lt; l.length; i ++) parentNode; If (l [i

Instantiating multiple PHP objects from a single PDO array (without boilerplate) -

If you want to get an object from the database, the PDO is very useful: $ Obj = $ handle-> Obtain all (PDO :: FETCH_CLASS, $ obj_name); If you expect to return more than one square type in a row (such as: when doing JOINS), the PDO is less helpful: < Code> $ handle-> FetchAll (PDO :: FETCH_ASSOC); Okay - I'm feeling terribly awesome except for every kind of method. My question is : How can I instantize many objects from a single array in a beautiful, strong way when the content of that array can show everyone, none Some or more than necessary for classes? Example: Given an array that comes back from the PDO database $ vars = ('a' = & gt; 1, 'b' = & gt; ; 2, 'c' = & gt; 3, 'x' => 7, 'y' = 8, 'z' => 9) , objects ABC < / Code> build ( $ a , $ b and $ c should be required) and without too much copy and pasting XYZ ( $ x , $ y , $ z ). Option 1 Class ABC {Private $

css - Padding of Title is outside of the div -

I have created a jsfiddle where you can see the problem padding the heading out of the div: & lt ;! - HTML - & gt; & Lt; Div & gt; & Lt; H2 & gt; & Lt; A href = "#" & gt; This is a test lesson & lt; / A & gt; & Lt; / H2 & gt; & Lt; / Div & gt; / * Css * / div {status: relative; Swim left; Width: 500px; Height: 300px; Background: Red; } Div h2 {status: absolute; Bottom: 0; Left: 0; Margin: 0; } Div h2 a {padding: 10px 20px; Background: green; } Do anyone know how to fix it? add display: block , follow the following pre> div h2 a {padding: 10px 20px; Background: green; Display area; / * Added rule * /}

how to create continues executing script in php with no execution limit -

I have created a script to listen to continuously with SMSC to capture the delivered SMS I script looks okay, but want to make sure it never stops. It states that the server can interfere with continuous execution and prevent execution, but to disable it, in httpd.conf No option could get the limit of execution Second, the script below is going to use 100% CPU ? As some other applications are running on the same server. What is the better third medium? Browser or php CLI ? 2 set_time_limit (0); Do {// read incoming SMS $ sms = $ tx-> readSMS (); // Check SMS data ($ SMS & amp ;! Empty ($ SMS ['source_addr']) & amp; blank ($ sms ['destination_addr']) & amp; FREE! ($ Sms ['Short_message']) ) {// send SMS for processing in smsadv $ = $ sms ['source_addr']; $ = $ Sms ['destination_addr']; $ Message = $ sms ['short_message']; // Insert into database ...} // Check continuous SMS} while (1

jpa - TypedQuery returns vector of Object[] instead of list of x-type object -

Image
मेरे पास एक विधि है: सार्वजनिक सूची & gt; समय सारिणी & gt; getTimetableTableForRegion (स्ट्रिंग आईडी) {सूची & gt; समय सारिणी & gt; समयसीमा; TypedQuery & LT; सारिणी & gt; query = em_read.createQuery ("SELECT ..stuff .. जहां R.id =: id", समय सारिणी। क्लास) .setParameter ("id", लांग। पार्सलॉन्ग (id)); समय सारिणी = query.getResultList (); वापसी समय सारिणी; } जो यह देता है: पोस्ट-पाठ "आइटमप्रॉप =" टेक्स्ट "> ठीक है, इसलिए, .. सामान .. मेरी जेपीक्यूएल के एक हिस्से में अन्य तालिका में आंतरिक प्रवेश होता है। यहां तक ​​कि SELECT में भी एक तालिका से चयनित फ़ील्ड थीं, जो कि प्रकार के रूप में इस्तेमाल किया गया था - समय सारिणी , एक्लिप्सलिंक यह निर्धारित करने में असमर्थ था कि क्या ये फ़ील्ड उस इकाई का हिस्सा हैं और वापस की गई इकाई की सूची लौटने के बजाय तो वस्तु [] । । की सूची। तो अपने JPQL में एक तालिका के लिए @OneToMany / @ ManyToOne मैपिंग (या फ्लैट तालिका डिज़ाइन) का प्रयोग करें लौटाए गए संस्थाओं को टाइप करें

java - how recursion code works for boolean function? -

I believe this code will return at least one truth and maybe it lies something else so that the function ends Return to N = 15 for recursive and how it works I know how to find a recursion method, but to use OR OR OR, public stable Boolean PrimeRec (int n) {if (n == 1) true return; And return the primer (N, N-1); } Public Static Boolean Primer (Int N, Int D) {if (D == 1) Returns Correct; Otherwise if (n% d == 0) wrong return; And return the primer (N, D-1); } If you want to see "how it works" Code> Primer This is similar to your post, but some extra output in which I am hoping will help you understand. Public stable boolean primer (int n, int d) {System.out.println ("Primer is called with N =" + n + "d =" + d) "; If (D == 1) {System.out.println ("d = 1, true back"); Back true; } And if (n% d == 0) {System.out.println ("d, partition, false return"); return false; } Else {System.out.println ("Calling Primer Rec

mysql - Grouping quantities by price -

मेरे पास ऐसा एक mysql तालिका है id | code | price | quantity 1 | 0001 | 10.00 | 1 2 | 0001 | 10:00 | 1 3 | 0001 | 15.00 | 3 4 | 0001 | 15.00 | 1 5 0002 | 5.00 | 2 6 | 0002 | 5.00 | 1 फ़ंक्शन concat और group_concat का उपयोग करके मुझे यह परिणाम मिला: SELECT code, group_concat (CONCAT (मात्रा, 'एक्स', FORMAT (मूल्य, 2)) SEPARATOR '+') एएस बिक्री से detalle_sales ग्रुप द्वारा कोड कोड | बिक्री 0001 | 1x10,00 + 1x10,00 + 3x15.00 + 1x15 00 0002 | 2x5.00 + 1x5.00 मैं mysql का उपयोग करके मूल्य की मात्रा कैसे समूहित करूं? कोड | बिक्री 0001 | 2x10 00 + 4x15.00 0002 | 3x5.00 मैंने इसे php द्वारा किया है, लेकिन जब बिक्री का क्षेत्र बहुत लंबा है, परिणाम काट दिया जाता है और एक गलत मान देता है। आपको एक subquery की जरूरत है जो एक ही कीमत के साथ सभी पंक्तियों को एक साथ मिलती है, फिर एक मुख्य क्वेरी जो GROUP_CONCAT द्वारा कोड । SELECT code, group_concat (CONCAT (संख्या, 'x', FORMAT (मूल्य, 2)) SEPARATOR '+' ) के रूप में बिक्री से (कोड क

python - appending dictionary to master list -

For some reason it is not allowing me to add a string item to a key in a dictionary This is my code: Example splitUserList (line) : gt; & Gt; & Gt; Code: def createUserList (): userList = [] Total User List = [] F = Open ("u.user.txt") For user, userDict = {} single user list = spit user list (line) userdict ["age"] = single user list [1] userdict ["gender"] = single user list [2] userdict ["business" ] = Single user list [3] single user ["zip"] = single user list [4] userList.append (userDict) returns userList Why is not it working? Traceback (most recent call final): file "/ applications / wingideapp / content / macus / src / debug / teas / server / _ sandbox", line 1, & lt; Module & gt; # Error file in the "File / Applications / WingIDAP / Content / MacS / SRC / debug / post / server / _ sandbox_jap", line 20, internally used for debug sandbox under external interpreter file

php - Search in multidimensional array -

On my website I have a list of products generated through a foreach and a multi-dimensional Array creates this is the array: (small) I need to search within this multi-dimensional array if the ["model"] repeats In short, I do not want to define the array of 2 products the same ["model"] : < code> foreach ($ result as a result result) {$ this- & gt; Data ['product'] [] = array ('product_id' = & gt; $ result ['product_id'], 'model' = & gt; $ corto, 'thumb' => $ image, 'Disponibilidad' = & gt; $ rstock, 'name' = & gt; $ nombre, 'description' => utf8_substr (strip_tags (html_entity_decode ($ result ['description'], ENT_QUOTES, '' UTF-8 ')), 0, $ '[' $ ',' Special '=> $ special,' tax '=> $ tax,' rating '= & gt; $ result [' rating ' ], 'Review' = & gt; sprintf ($ -> get-&

How to add together an array of numbers in javascript? -

I have to take an array of 12 numbers and call them together by joining together a function and get the average of the numbers and the second To get the total number of numbers. My array looks like this: monthly sales [0] = 30000; Monthly sales [1] = 10000; Monthly sales [2] = 15000; Monthly sales [3] = 20000; Monthly sales [4] = 20000; Monthly sales [5] = 25000; Monthly sales [6] = 22000; Monthly sales [7] = 80000; Monthly sales [8] = 20000; Monthly sales [9] = 20000; Monthly sales [10] = 40000; Monthly sales [11] = 60000; I have to use it in some way to get array values: seenUpMonthlySales = selectedIndex monthlySales [selectedIndex] > I am not sure how to get the values ​​of arrays in my other two functions from the array and how to get them together and get their average. According to the comment request ... it explains how to ask in the question. To get a function and average to add elements, a function is assumed that the array provided is in the form of

javascript - Getting "The operation is insecure" error when adding tinymce via tinyMCE.EditorManager.execCommand( 'mceAddControl',false, newId); -

Edit: See my issue for search issues and solutions Even if this is the same domain, the iframe calling reference Was due to I did not know why this error was occurring. I am going through these steps: Remove the TMEEECE editor Change the id of texture < / li> Code / / Remove the tinyMCE editor for this text area ("true" TinyMCE.EditorManager.execCommand ('mceRemoveControl', false, myTextArea.id);) // id myTextArea.id = replace newId; // Add a small MES editor (does not help in changing "true") tinyMCE.EditorManager.execCommand ('mceAddControl', false, newID); The last error is the error operation is unsafe why does it? For anyone facing this type of problem, what was the issue and how it was resolved: topic < p> I was submitting a form to the iframe of a domain (because its file was in the input, I could not use AJAX) Ifframe then called a method in the parent window so that it was realized that

javascript - Bootstrap Tabs without allowing click -

Image
I am using Bootstrap 3 tab to create wizards of the steps seen in the picture below. I click on the tab I'm trying to control it by not allowing it directly but only allows you to use the next / previous button The issue is to issue an IA program to control tabs through tabs, Each link above requires a href value even if you consider the index; You can not leave empty. $ ('# myTab li: eq (2) a'). Tab ('show') // Select the third tab (0-indexed) How can I still control navigation using my button but to click on the tab Can not you allow? $ ('# myTab li: eq (2) a'). Click (function (e) {e.preventDefault ();}); Create your link & lt; A href = "#" & gt; & Lt; / A & gt; In fact, it is not sure why you want to use an unreliable link at this point $ ('# myTab li a' ). Click (function (e) {e.preventDefault ();}); Take a note from Martin, we can kill all incidents and publicity. $ ('# myTa

OpenDaylight Rest API with Java -

Before posting this question, I'm sure how to ask. I am trying to connect to the Open Daylight Controller with Java, I am trying to connect by consuming the rest of the services provided by the controller. My problem is, when I send an HTTP request, I can not get more than the entry, I'm not sure that this is possible. Instead of getting topology or other answers from the controller, I'm getting the HTML of the entry form. Besides, I'm not sure that I should be connected in this way. Any help / guidance is highly appreciated :) My code is for making connections: public string getContent (string url) IOException throws {String cont = ""; CloseableHttpClient httpclient = HttpClients.createDefault (); Http post http post = new HTTP post (url); List & lt; NameValuePair & gt; Nvps = new arreelist & lt; NamevaluePair & gt; (); Nvps.add (new binarynamewallpayer ("j_username", "username")); nvps.add (new binarynamewal

PIC Assembly: ISR for Timer1 -

To do ISR on timer 0, we use the 0x04 address, or in the code < Code> ORG 0x04 GOTO tmr0_ISR If I am using timer1 or ISR, what address should I use which require different approach? On PIC16F877A, all interrupt triggers stored the same ISR on 0x04 / code>. Therefore, you need something on the following: ORG 0x04 GOTO ISR Somewhere else: ISR: BTFSC waiton, TMR 0F Goto TMR 0_ISR BTFSC PIR1, TMR 1 IF GOTO TMR 1_ISR My syntax can not be correct, it's been a while Is when i pic 16 Assembly

css - How can I make my image-border appear outside of background-color -

इस सवाल का पहले से ही एक उत्तर है: < / p> 4 जवाब मैं एक शीर्ष छवि सीमा के साथ एक पाद लेख बनाने का प्रयास कर रहा हूं, और एक पृष्ठभूमि का रंग। हालांकि, छवि में पारदर्शिता है जो किनारों से परे पृष्ठभूमि का रंग दिखाती है। पाद लेख की ऊंचाई ईएमएस में है, जबकि सीमा-छवि की ऊंचाई 46 पिक्सल है। मैं अपने लचीलेपन (एएमएस) को बनाए रखने के दौरान पृष्ठभूमि रंग के बाहर प्रकट होने के लिए सीमा को कैसे प्राप्त करूं? & Lt; br & gt; & Lt; p & gt; कॉपीराइट (c) 2008 & lt; / p & gt; & Lt; br & gt; शरीर {पृष्ठभूमि रंग: काला; } #footer {सीमा-शैली: ठोस; सीमा चौड़ाई: 46px 0px 0px; -मोझ-सीमा-छवि: url ("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 दोहराएँ; -webkit-border-image: url ("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 दोहराएँ; -ओ-सीमा-छवि: url ("http://i272.photobucket.com/albums/jj180/niahcx/web/smalllace_zpscffc6b3e.png") 46 1 0 दो

java - Processing 2.0 Movie cannot open movie file when running from jar -

I am trying to run a film using the processing 2.0 movie class. If I run my code everything works well with my code editor (in my case) and runs the code without any delay: It searches for the movie and starts. However, when I export my program in a jar and start it from my terminal, it detects the file, but it crashes when trying to open it. I am currently using this code to find my movie path string. Instead of public string, Movie (String Moviepath) {string movie = movie player. Class. Tag Classloader (). getResource (moviepath) .getPath (); If (movie == faucet) {System.out.println ("wrong error --- movie file not found: '" + moviepath + "' ');} return movie;} As you can see that I'm using Classloader to locate the file for me because when I want to export it in a .jar file and do not want to change the path itself .getPath () File: / path / to / my / file in 'file:' as it removes unnecessary faults in the above manner There i

sql - How can I use GETDATE() to get month and year from the past month? -

How can I get a statement that can get me last month and this year? I enter one INSERT and one column report_date in [datetime] table_A (report_data) values ​​(??); I want to show this last month and year, for example today is 4/21/2014, so it will show 3/2014 in the column if today was May 1, 2014, Show 4 / 2014? Is it possible or should it be his day? You are looking for function: SELECT DATEPART ( Month, DATEADD (month, -1, GETDATE ()), DATEPART (year, DATEADD (month, -1, GETDATE ())

java - What isn't comparable by the Comparable class? -

I know that this class compares two objects in a class (for example two strings), but its use How are the comparisons not class? Basically, you can compare everything in Java. For example, you have a class X , which is incomparable, you can create this attribute on another class C and < Code> C , it can override its compare () method. For example, it does not make sense to compare the colors This is correct though it does not make sense, you can Are there. Here is the answer to the question: Which color is bright? Public class ComparableColor implements Comparable & lt; ComparableColor & gt; {Color color; Public Comparison Color (Color Color) {this.color = color; } Compare @ Override Public Int (Comparative Caller C) {return c.color.getAlpha () - this.color.getAlpha (); }}

c++ - Initialising data structure at compile time -

I'm writing to create some initial data structures for an embedded application, but still in the design phase, Thinking how to start different data structures In the examples given below, the size of the arrays will never change, but the content will be in the order of from the data structures One such is: int id; Int type; Unsigned four data [x] for example (in C Notation) {4,1, {1,2,3,4,5 , 6,7,8}} {2,0, {4,2,1}} {3,2, {9,1,2 9, 2}} etc .. (about 20 other lines) The length of the above arrays will never change during the application, but the content will be so I thought of a templated class: template & Lt; Int N & gt; Class DS {Public: // Total Element for Easy Preliminary IID; Int type; Unsigned four elements [N]; Fixed integer size () {return n; }}; Then you can do just that: DS & lt; 8 & gt; V1 = {4,1, {1,2,3,4,5,6,7,8}} Problem: It is not easy to pass through methods without those methods. The template is being made, and it ma

Read a Javascript cookie with PHP -

I have some JavaScript code that sets cookies and when I try to read that cookie with PHP It says that it is undefined. notice: undefined index: score: c: \ xampp \ htdocs \ Contest \ score.php on line 44 I use xamp to run Doing and testing PHP on my computer, can it be the reason why he is not reading the cookie? This is my code & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; PHP written test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body style = "background-color: # ADD8E6; margin-left: 25%;" & Gt; & Lt ;? Php included 'variables.php' ;? & Gt; & Lt ;? Php included 'functions.php';; & Gt; & Lt ;? Php session_start (); $ X = 1; $ Y = 0; $ Score = 0; While ($ x & lt; = 20) {$ a = $ _POST ["question" $ X]; $ B = $ _SESSION ['true'] [$ y]; $ C = $ _SESSION ['question'] [$ y]; If (trim ($ a) == trim ($ b) {$ scor

ios - Attaching Nib to existed UITableViewCell -

मेरे पास एक UITableViewCell है जो कि प्रोग्रामेटिक रूप से बचाव करता है। मैं इसे एक साधारण निब फाइल के साथ संलग्न करने का प्रयास कर रहा हूं। Nib बनाया गया है और पूरी तरह से कॉन्फ़िगर किया गया है। और मैं आईबी के साथ छवियों को एनआईबी में जोड़ सकते हैं और देख सकते हैं कि जब ऐप चल रहा है तब वे दिखाई देते हैं। इसका अर्थ है कि नीब भरी हुई है। लेकिन मैं अभी भी कोड के साथ निब पर किसी आउटलेट (लेबल्स, बटन) को नहीं बदल सकता है? बिट समस्या को हल करने के लिए मुझे क्या करना चाहिए? < / Li> मैं निम्नलिखित कोड का उपयोग करता हूं: - (UIView *) viewFromNib {क्लास कक्षा = [स्व वर्ग]; NSString * nibName = NSStringFromClass (कक्षा); NSArray * nibViews = [[NSBundle mainBundle] loadNib नामांकित: nibName मालिक: स्वयं विकल्प: शून्य]; UIView * दृश्य = [nibViews ऑब्जेक्टऐटइंडएक्स: 0]; वापसी दृश्य; } - (शून्य) addSubviewFromNib {UIView * दृश्य = [स्वयं देखें FROMNib]; self.bounds = view.bounds; self.frame = view.frame; Self.viewNib = दृश्य; [आत्म जोड़ जोड़ें] दृश्य:; [स्वयं। बटन सेटटिटल: @

r - Extract element from object of class "cpt" changepoint package -

पैकेज changepoint मैं निम्न अभिव्यक्ति स्लॉट "cpts" से निकालना चाहूंगा: cpt 36 40 और ये समझ में नहीं आता कि यह कैसे करना है x & lt; -c (1,2,3,4,5,1,2,3,4,4,5,6,7,8,9,1,2,3 , 4,5,6,7,8,2,1,1,2,3,4,5,3,2,3,5,4,3,2,1,1,1) सीपीटीएममेवर (एक्स वर्ग "सीटीटी" स्लॉट "data.set" का एक ऑब्जेक्ट: टाइम सीरीज़: स्टार्ट = स्टार्स = "एसआईसी", कलम = "एसआईसी", पेन। वेल्यू = 0, मेथड = "एएमओसी", क्यू = 5, टेस्ट.स्टैट = "सामान्य" 1 अंत = 40 आवृत्ति = 1 [1] 1 2 3 4 5 1 2 3 4 4 5 6 7 8 9 1 2 3 4 5 6 7 8 2 1 1 2 3 4 5 3 2 3 5 4 3 2 1 1 1 स्लॉट "cpttype": [1] "मतलब और भिन्नता" स्लॉट "विधि": [1] "एएमओसी" स्लॉट "test.stat": [1] "सामान्य" स्लॉट "पेन। टाइप": [1] "एसआईसी" स्लॉट "pen.value": [1] 7.377759 स्लॉट "cpts": सीपीटी 36 40 स्लॉट "ncpts.max": [1] 1 स्लॉट "param.est": $ मतलब [1] 3.833333 1.250000 $ विचरण [1] 4.6

javascript - Date from string yields different dates in different browsers -

var डी = "2014-04-22"; var t = "00:00"; Var ओ = नई तिथि (डी + "टी" + टी); फ़ायरफ़ॉक्स सही तिथि उत्पन्न करती है: मंगल अप्रैल 22 2014 00:00:00 GMT + 0200 (सीईएसटी) क्रोम पर अन्य हाथ की पैदावार: मंगल अप्रैल 22 2014 02:00:00 GMT + 0200 (सीईएसटी) अगर मैं एक स्थान के साथ T की जगह, Chromes < कोड> ओ में सही तारीख है लेकिन यह फ़ायरफ़ॉक्स में एक अमान्य दिनांक है। मैं कैसे दोनों ब्राउज़रों को सही तारीख का उपयोग कर सकता हूं? संपादित करें: t = "00: 00: 00.000Z" परिणाम में मंगल अप्रैल 22 2014 00:00:00 GMT + 0200 (सीईएसटी) दोनों ब्राउज़रों में, लेकिन वह गलत तारीख है। संपादित करें: टी = "00: 00: 00 + 02: 00" परिणाम सही में बार, लेकिन समयरेखा उस मशीन से स्वचालित रूप से नहीं लिया जा सकता जो ब्राउजर चलता है? देखें दस्तावेज़ और डॉक्स के लिए। क्रोम और फ़ायरफ़ॉक्स टाइमज़ोन से भिन्न तरीके से निपटने लगते हैं। मेरे परीक्षण में, यदि आप एक स्पष्ट समयक्षेत्र डिज़ाइनर जोड़ते हैं, तो वे अच्छी तरह से व्यवहार करते हैं

xml - How to use groovy XMLbuilder for attributes that have hyphens in the name -

I am using groovy and groovy.xml.MarkupBuilder to write a library that I use to create an API file Will do I am writing a function that can be used to generate the container.xml file and I found that my id gives me an error when I try to use an attribute name that contains a hyphen, when that There is no resistance to the name of its opposition, a hyphen def author = new stringwriter (); Def xml = new markup builder (author); Def fullPath = "full-path" def mediaType = "media-type" def generator container () {xml.xmlDeclaration () xml.container (version: '1.0', xmlns: 'color: oasis: name: tc: opendocument: xmlns : Container ') {root files {rootfile (it's complete:' OEBPS / content.opf ', this.mediaType:' application / oebps-package + xml ')}}} when I try to use full path I have given an error when I full path I try to use then it does not give me any errors. Why does this happen and how can I do it right?

hibernate - What is the best way to map data of junction table in Java entity? -

I have three tables that present my very simple project. make table company (id INT) not original primary key AUTO_INCREMENT, name VARCHAR (250)) Faucet; Create table worker (id INT not original primary key AUTO_INCREMENT, name VARCHAR tap (250)); Make Table Company (Employee) (Company_ID not INT, Employee_ID not INT, Rent_Data Date, Error Zero, Regina_Data DATE DEFUILT Faucet, Foreign Key (company_id) Reference Company (ID), Foreign Key (employee_id) Reference Person (ID); and I have Java rendering @ entity @Table (name = "employee") public class employee serialjob {@Id @GeneratedValue (strategy = generation) Type AOTO) integer ID; @column (name = "name") string name; @ManyToMany (mapped = "employee") private list & lt; Company & gt; Companies; @Entity @Table (name = "company") operates a public class company serializable {@Id @GeneratedValue (strategy = GenerationType.AUTO) private integer ID; @column (name = "name&quo

design patterns - Data structure to represent menu/taxonomy -

Is there a specific formal data structure that should be used when creating a navigation similar to a website? Or, are there any specific design patterns that are most suitable for creating such structures? For data structure you can use some variation of a graph (guided / unrestricted) and as such As far as Design pattern, you need to describe the general behavior of the application to get better answers, but for fun, I will throw singleton for you.

java - Playing aac file with javafx -

javafx के साथ एक एएसी फ़ाइल चलाने का प्रयास त्रुटि त्रुटि MediaException : अज्ञात: com.sun.media.jfxmedia.MediaException: प्लेयर नहीं बना सका! : Com.sun.media.jfxmedia.MediaException: प्लेयर नहीं बना सका! संस्करण: 8.0.5-बी 13 कोड दुर्भाग्य से, मुझे पता नहीं समस्या है, लेकिन मैं आपको कुछ सुझाव दे सकता हूं: किसी अन्य मौजूदा प्लेयर के साथ उस URL को एक्सेस करने का प्रयास करें क्या यह काम करता है? एएसी फ़ाइल डाउनलोड करें और इसे स्थानीय स्तर पर संग्रहीत करें यदि आप फ़ाइल को स्थानीय डिस्क से लोड करते हैं, तो क्या आपको उसी त्रुटि मिलती है। अगर आपको लगता है कि यह एक बग है, तो कृपया यहां समस्या दर्ज करें: