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) 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> You do not need a cursor to type this type of verification. These are three questions that do this: No unused projects: Choose p. * Tbl_projects p fr...

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 Host [header]: Sets the domain name for the client value, which is the requested object is associated with. Possibly, all you need to do is to have header forwarding enabled in the default cache behavior settings:

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 : 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 to the server. any suggestion ?? I have suggested that there is a separate exhaust prefix here and here You / Remove Edit: Your source fi...

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 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 -

рдЗрд╕ рд╕рд╡ाрд▓ рдХा рдкрд╣рд▓े рд╕े рд╣ी рдПрдХ рдЙрдд्рддрд░ рд╣ै: 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 , 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., jukeul-compass) doe...

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: $ 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 build ( $ a , $ b and $ c should be required) and without too much copy and pasting XYZ ( $ x , $ y , $ z ). Option 1 Class ABC {Private $ a, $ b, $ c; Function __ con...

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"] : 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-> this->...

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 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 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 it was done: window.p...

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 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 -

рдЗрд╕ рд╕рд╡ाрд▓ рдХा рдкрд╣рд▓े рд╕े рд╣ी рдПрдХ рдЙрдд्рддрд░ рд╣ै: 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 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 рдмрдиाрдпा рдЧрдпा рд╣ै рдФрд░ рдкूрд░ी рддрд░рд╣ рд╕े рдХॉрди्рдл़िрдЧрд░ рдХिрдпा рдЧрдпा рд╣ै। рдФрд░ рдоैं рдЖрдИрдмी рдХे рд╕ाрде рдЫрд╡िрдпों рдХो рдПрдирдЖрдИрдмी рдоें рдЬोрдб़ рд╕рдХрддे рд╣ैं рдФрд░ рджेрдЦ рд╕рдХрддे рд╣ैं рдХि рдЬрдм рдРрдк рдЪрд▓ рд░рд╣ा рд╣ै рддрдм рд╡े рджिрдЦाрдИ рджेрддे рд╣ैं। рдЗрд╕рдХा рдЕрд░्рде рд╣ै рдХि рдиीрдм рднрд░ी рд╣ुрдИ рд╣ै। рд▓ेрдХिрди рдоैं рдЕрднी рднी рдХोрдб рдХे рд╕ाрде рдиिрдм рдкрд░ рдХिрд╕ी рдЖрдЙрдЯрд▓ेрдЯ (рд▓ेрдмрд▓्рд╕, рдмрдЯрди) рдХो рдирд╣ीं рдмрджрд▓ рд╕рдХрддा рд╣ै? рдмिрдЯ рд╕рдорд╕्рдпा рдХो рд╣рд▓ рдХрд░рдиे рдХे рд▓िрдП рдоुрдЭे рдХ्рдпा рдХрд░рдиा рдЪाрд╣िрдП? рдоैं рдиिрдо्рдирд▓िрдЦिрдд рдХोрдб рдХा рдЙрдкрдпोрдЧ рдХрд░рддा рд╣ूं: - (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...

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 рдХो рдПрдХ्рд╕ेрд╕ рдХрд░рдиे рдХा рдк्рд░рдпाрд╕ рдХрд░ें рдХ्рдпा рдпрд╣ рдХाрдо рдХрд░рддा рд╣ै? рдПрдПрд╕ी рдл़ाрдЗрд▓ рдбाрдЙрдирд▓ोрдб рдХрд░ें рдФрд░ рдЗрд╕े рд╕्рдеाрдиीрдп рд╕्рддрд░ рдкрд░ рд╕ंрдЧ्рд░рд╣ीрдд рдХрд░ें рдпрджि рдЖрдк рдл़ाрдЗрд▓ рдХो рд╕्рдеाрдиीрдп рдбिрд╕्рдХ рд╕े рд▓ोрдб рдХрд░рддे рд╣ैं, рддो рдХ्рдпा рдЖрдкрдХो рдЙрд╕ी рдд्рд░ुрдЯि рдоिрд▓рддी рд╣ै। рдЕрдЧрд░ рдЖрдкрдХो рд▓рдЧрддा рд╣ै рдХि рдпрд╣ рдПрдХ рдмрдЧ рд╣ै, рддो рдХृрдкрдпा рдпрд╣ां рд╕рдорд╕्рдпा рджрд░्рдЬ рдХрд░ें: