Posts

Showing posts from March, 2015

node.js - Prevent direct access to html page in node js -

I would like to stop the user from typing directly in the URL of the page and going to the page. How do I get this functionality in node? I know that they do not have direct access to web applications in web applications to keep files under file. If you are using, then you can check the referrer in the middleware like this in the middleware, Which you can further customize as necessary for your exact purposes: var Express = requirement ('Express') var app = express () allowed lamp = ['localhost' '127.0.0.1']; // which can link here? App.use (function (req, res, next) {var i = 0, notfound = 1, referer = req.get ('referrer'); if ((req.path === '/') || (req .path === '')) Next (); // pass call '/' always if (referrer) {while ((I and LT; permission lamp lamp) & amp; amp; not; found =) (Notfound = (referer.indexOf permission linker [i]) === - 1); i ++;}} if (notfand) {res.status (403) .seend ('protected area. Enter ...

ajax - How can I run a vb function every minute in jquery -

My question is simple, how can I set a timer to run and execute a function in jquery ? For example, for example, I want a vb function to execute every minute. How do I do it in jquery? The following code executes the function once. How do I want to execute it every minute? $ (window) .load (function () {$ .ajax ({type: "POST", url: "Default.aspx / CheckPending", data: '{}', ContentType : "Application / Jason; Charset = UTF-8", Datatype: "Jason", Success: Alert ("Success"), Error: Warning ("Error")}}}); It runs only once because you run it on the window.load event. To run more frequently than this, use this function. window.setInterval ("JavaScript function", milliseconds); In this case: $ (vs Do) .load (function () {window.setInterval ($ .ajax ({type: "POST", Url: "Default.aspx / CheckPending", data: '{}', contentType: "application / json; charset =...

Why is the "this" keyword final in Java? -

इस सवाल का पहले से ही एक उत्तर है: 6 उत्तर ऐसा लगता है कि लगभग एक बात कोई भी महसूस नहीं किया है, लेकिन जावा में "यह संदर्भ" अंतिम है सामान्य प्रोग्रामिंग दिन में मैंने सोचा था कि मैं इस संदर्भ को अपने वर्ग के अंदर रीफाईफिफ कर पूरे उदाहरण को फिर से परिभाषित कर सकता हूं: सार्वजनिक शून्य विधि () {यह = नया MyObject ("arg1", arg2, arg3); // यह एक कंपाइल त्रुटि फेंकता है} यह संदर्भ जावा में अंतिम क्यों है? समस्या यह नहीं है कि यह एक अंतिम संदर्भ है - यह स्वयं बिल्कुल भी संदर्भ नहीं है यह एक कीवर्ड है जो "उस मान को दर्शाता है जो उस ऑब्जेक्ट का संदर्भ होता है जिसके लिए उदाहरण विधि या डिफ़ॉल्ट पद्धति लागू की जाती है" ()। इसके अलावा, यह समझ में नहीं आता कि इसे एक पुन: सौंपा जा सकता है। याद रखें कि किसी संदर्भ को दोबारा सौंपना केवल उस संदर्भ को बदलता है, और अन्य संदर्भ नहीं जो एक ही ऑब्जेक्ट को इंगित कर सकते हैं। इसलिए यह पुनर्सिंचित करना केवल पागल नहीं बल्कि बेकार भी होगा।

sockets - how to use the ruby analytical receive binary stream from the TCP -

I am going to the device received on data, but these data are binary streams, I keep these data collections, then Read it to display them correctly, is there a better way? requires a 'socket' server = TCPA.org.open (2000) loop {thread.start (server.accept) do. Client | File.open ("tmp", "w") {| File | File.write (client.gets)} file.open ("tmp"). Every do F | | Puts f.unpack ('h *') end client.puts (Time.now.ctime) # Send time to customer customer. Line "connection closed. Bye!" Client.close # Disconnect from the end of the customer} Received data like this: xx ^ q ^ a ^ hb0 @ lt; 90 & gt; 26 2 ^ b ^ @ & lt; 83 & gt; Ev I would like to: 787811010862304020903236202032020001c26c0d0a Sorry for my poor English ?? Using a temporary file with a name will cause a problem if many clients are sending data Are; The temporary file will overwrite. You do not need to use a temporary file. Requires a '...

Java Packages importing .inc file -

As in the case of JSP, do I use the .inc file to import all the necessary sections of any third party There is no way to do libraries in Java class Any concept of adding .nic file to Java classes is not. You can always include project lib directory, external jars or libraries inside JR. You can click on the correct project - & gt; Properties - & gt; Java Build Path - & gt; Library tab And then import imported class from the included jar by using the import details.

apple push notifications - Pushnotfication not wroking with distributed profile -

I follow this link. The Push Notification is fully working with the Development Profile, successfully sending and receiving information Send successfully notification with distributed profiles but do not receive any notifications on the device. And I have seen that in my 2 profile my device token is different. How do you think your device token is different? Push Notification will work if you make sure that you actually make the provision and you make an app with the ADACH version where you had added the UDID of your device.

php - How can i use Salt with a password in codeigniter when retrieving salt from the db -

This is my model, I am querying the database, it needs to be retrieved which I want, then the comparison I am doing Excluding the query is not a column of salt as a column name, but as a string, which is fine, except that it is treating the salt word as a string, there is no data from the database. How can i come function login ($ username, $ password) {$ this- & gt; Db- & gt; Query ("choose firstname, user name, password, salt with table_name WHERE user name = '$ username' AND password = 'sha1 (salt password' '); $ this-> db-> border ( 1); `$ query = $ this- & gt; db- & gt; mill (); if ($ query-> Num_rows () == 1) {return- $ query-> results (); // data is true} and {return false; // data is wrong}} There are some things to play here: First of all, you are adding ' to hash. . does not use the operator. Try the following: Try the following: First name, user name, password, salt from table_name WHERE user name = ...

.net - DLL Programming issue -

I have a DLL that is used to connect to hardware devices and perform various hardware functions. I have decoded the DLL file to DOL file so that it can interact with the device. The function is GetEnrollData1 , but even after a number of research, I'm unable to get the precise definition of that function. It seems that I'm calling myself Net so I am providing link code here for DLL files and also not familiar with it also. Files can be dowload from here:. Function Definition I've found so far: public virtual bool GetEnrollData1 (integer dwMachineNumber, integer dwEnrollNumber, integer dwBackupNumber, referee integer dwMachinePrivilege, referee integer dwEnrollData, referee integer dwPassWord ) {If (this.ocx == faucet) {New AxHost.InvalidActiveXStateException ("GetEnrollData1", AxHost.ActiveXInvokeKind.MethodInvoke) Throw; } Return this.ocx.GetEnrollData1 (dwMachineNumber, dwEnrollNumber, dwBackupNumber, rewim dwMachinePrivilege, referee dwEnrollData,...

node.js - Referencing the App server -

New to node and build an ExpressJS app. An HTTP server and port reference to an ExpressJS route, how can I do this? Cheers. If you create it like var express = expected ( 'Express'), app = express (), server = ('http') is required. Server (app); You can use server IP and port server.address () // {address: '0.0.0.0', family : 'IPv4', Port: 3000}

forms authentication - c# Update Cookie, without forcing the user to login -

I have the 'UI' setting that controls the presence, which can change user settings, though Includes updating. I think that should be able to update, but it forces the user to re-authenticate, how can I update the cookie without attaching the user again? / / We need to update UserType menu option change user = 2 usertoken (schedule minezedmanbubble); HttpCookie Cookie = FormAuthentication GetAuthCookie (usertoken.UserName, Incorrect); Var ticket = formattap.documentation (cookie.Value); Var newticket = New form authenticationTicket (Ticket version, Ticket .name, Ticket .Issadet, Ticket Examination, False, UserTech 2.CalletraRao () Ticket, Cookpath); // Encrypt the ticket and place it in the cookie cookie. Value = formatting Encrypt; System.Web.HttpContext.Current.Response.Cookies.Set (cookie); Why are you saving UI attendance preferences in the certification cookie? Is there anything wrong with saving this as a separate cookie? http cookie cookie = new http c...

ios - ios7 navigation bar : 3 strange dots appearing when back animation with custom button -

I want to use the back navigation animation by using .navigationController PopViewControllerAnimated: Yes] A custom button has been added in the navigation bar. Because I should not see the back button, I made it self. Navigation Itam.Highsback Button = Yes; But during the previous animation, sliding can be seen in ios7 (not ios6) 3 dots navigation bar. They are not appearing with self.navigationItem.hidesBackButton = No;. But definitely the button can be seen Does anyone have any ideas to make them visible? You set self.navigationItem.hidesBackButton = Yes iOS sometimes Inserts three points inside its generic back button. I solved the problem by setting the normal back button empty text and then I made my custom button UIBarButtonItem * backButton2 =: This is the blank I How the set is set [[UIBarButtonItem alloc] initWithTitle: @ "" style: UIBarButtonItemStylePlain target: zero operation: zero]; Self.navigationItem.backBarButtonItem = backBut...

vspackage: how could I make a command in the context menu available for specific file type -

In Solution Explorer, there are projects and files, and I want my custom command to be displayed only when the user is on some file type Click OK, we say ".cs" or ".html" How can I do this? Assume that your package is loaded, you can control the view / active status through In the event handler, you set that the command is supported (ALEMENU COMM. Supported assets) visible state (Olemanu Command.Vidual Property) and the competent state (Oleman Command. Whatever the terms, the type of file chosen in the Solution Explorer such as.

jquery - Primefaces Dialog content not empty after escaping + deleting value -

I have to select a line in the dialog, which occurs when the dataset (Risslet). It shows the metadata of this line and the price comes from the example that has been selected. But when I close this dialog and click on my button, which should show the same dialogue, but without any value (data and amp; has been shown to save), the oldest one. NULL, so there is no value in Autfilds, but still the same public void newMember () {memberInstance = null; // RequestContext.getCurrentInstance () Reset ("memberDllg"); RequestContext requestContext = RequestContext.getCurrentInstance (); RequestContext.execute ("memberDlg.show ()"); } and & lt; H: form id = "memberDllg" & gt; & Lt; P: dialog id = "memberDlg" header = "# {AdminControllBean.memberInstance.name} # {AdminControllBean.memberInstance.vorname}" widgetVar = "memberDlg" provided went = "right" closeOnEscape = "true" style = "wid...

ruby - Remove backslashes and quotes -

I'm trying to remove double quotes and backslashes. My code like & gt; Please Try this: a = "\" bu \ "" print.gc.ub ('' ',' ') # = & Gt; BU

mysql - SQL Updating TImeStamp To Now() -

I am checking the database for members ending their application I I am: update members SET enabled = 0 where now ()> = Time It runs every 30 seconds It was running for the first time in 10 seconds but I did not know that this was an issue, so I made it 30 seconds. This is the only thing that I'm running and my timestamp goes from the time I set up and sets it to execute the SQL command. Is there something that I'm doing wrong? Is not this the expected result? You now check the timestamp compared to () (now always) more than time) and you always update the timestamp Timestamp is also updated, so you get the execution time.

jsf 2 - Why is reloaded every list on a ajax request? -

I have some blocks of code, like the next one, in one form. & lt; A4j: OutputPanel ID = "ListView" & gt; & Lt; A4j: repetitive value = "# {listBean.values}" var = "aValue" & gt; & Lt; A4j: Outputpennel sang = "# {empty .view.value}" & gt; & Lt; H: Selection Beaun Checkbox ID = "Select Record Check" value = "# {listBean.aValueSelectedMap [aValue.value]}" & gt; & Lt; A4j: ajax event = "value change" execution = "@ this" render = "tag value, list value" listener = "# {listBean.listenerValueChange}" /> & Lt; A4j: param name = "id" value = "# {aValue.value}" /> & Lt; A4j: Ultimate name = "value" value = "# {listBean.aValueSelectedMap [aValue.value]}" /> & Lt; / H: selectBooleanCheckbox & gt; & Lt; H: output label value = "# {aValue.label}" /> & Lt; Br / & gt; ...

Unifying Jenkins console logs -

We build one night of our projects and each of them has several downstream jobs, and I send a build log to Jenkins When the main task is finished the problem is that the main console only shows the details of its work, and shows it with downstream jobs: "Project BBB" "BBB" project Waiting for # 41 to complete Is completed. The result was success In any way, can I show details of jobs below it? The upstream project "Project AAA" build number 38 is basically caused by: User initiated "Username" Building in Workspace C: \ WORKSPACE \ Project BBB Reverting C: \ WORKSPACE \ Project BBB \. To include depth with the ignore: The correct update is https://111.111.111.111/svn/Project BBB Revision '2014-10-10T11: 00: 11.785' +0100 'in amendments of 43143 https://111.111.111.111/svn No change for the project / Project BBB has been notified to the upstream projects of job completion since the previous build: Success Or send at leas...

pde - Freefem Fisher's equation -

I'm new to free +++, the problem I am trying to solve is Fisher's equation: du / dt = d ^ 2u / dx ^ 2 + d ^ 2u / dy ^ 2 + k * u * (1-U) du / dn = 0 - condition of limit I have a weak problem The problem is with Futur formula (Uh, VH) = int2d (th) (uh * VH / dt + grad (uh)). * Grad (VH) - Int 2D (Th) (K * UH * VH) + Int 2D (Th) (UH 0 * VH / D T) - Int 2D (Gu) (K * Uh * VH * Uh); Can you please tell me what do I do wrong? There is something wrong with the final conditions. This is a 2D transient diffusion / conduction equation with a temperature-dependent, non-linear generation duration . If you skip the non-linear generation period, the equation 2D should look like a weak form for transient diffusion / conduction equation. How to call free + + non-linear words? How do you plan to handle it? You know, after all, it means that the solution is a very different animal. You have to walk in time to solve this (eg a Newton-Repson Solver). The algorithm becomes ...

C# compare random number to int -

How do I compare a randomly generated number to an int? random i = new random (); Stable Ent Generator Castle (Random I) {Return i.Next (7); } Father's Castle (i); If (i.Equals (0)) MessageBox.Show (vincitore + "Vince!", "GG Easy"); Otherwise if (i.Equals (1)) {{Messagebox.Show (vincitore + "bara ..", "GG Easy"); } And if (i.Equals (2)) {Messagebox.Show (perdente + "sei rincoglionito?", "GG EASY"); } .Equals do not work, while "==" gives me a compilation error if (convert. Double (j) == 0) // does not work much i Do you want to be system.Random as usual and never compare a number of i.Next calls value ? In your code, generaCasuale returns an int, but you are not using that return value; You are calling the method without telling anything. If you type int x = generaCasuale (i); , you can compare x .

develop android multiplayer game -

I try to develop multiplayer games in Android, so far I have developed the game on the client side and it Works fine, but now I know how to develop on the server side. How can people play in the internet? The basis of the game changes, I just need to know what to start with, I have read some articles about this, but I do not understand that I have to promote a server and through the server of the server How to connect. Thanks for the help. You need a server API for multiplayer games, for example , 1 players have moved to position 25. Send a post request with some parameters (like postiation, etc.) On the other hand it can check continuously Make me an API Use PHP MySquel, Slim Frame for I got a tutorial for you

from data textbox to excel vb.net -

I have this code that allows me to export the data contained in two TextBoxs in Excel The spreadsheet, the problem is that the excel file has not been created. The two statements have not worked to save the comments given below, maybe somebody can test it and tell me why this is wrong. As a slow objExcel new Excel.Application exhibits an example of 'Excel Dim' as objWorkbook Excel.Workbook represents a workbook object dim objWorksheet as Excel.Worksheet 'A worksheet object represents objWorkbook = objExcel.Workbooks.Add objWorksheet = CTYPE (objWorkbook.Worksheets.Item (1), Excel.Worksheet)' This form includes two text box, cells A1 and A2 objWorksheet.Cells (1, 1) = TextBox1.Text objWorksheet.Cells (2, 1) = TextBox2.Text objWorkbook.Close (false) 'objWorkbook.Save ()' or 'about objWorkbook's values ​​.SaveAs ("C: \ Temp \ Book1.xls "O) BjExcel.Quit () The code has been tested and tested Your problem may be with something dif...

sql - Un Wrap Oracle Package -

Image
I need to wrap the oracle package created by any other god. I was made in my db, but encrypted In format of. I need this, the original developer has left the organization and now the process defined in the package needs to be redefined with the changes in the DB structure and the logic. Can anyone help me like how to hide the package in Oracle? You can paste the code and open it for you. It will be advised that you will lose all the comments but the variable name will remain. Lets test the logic for the funny. Make the first process: sqlplus test / testtest SQL * plus: Release 11.2.0.3.0 Production on Friday 10 October 08:36:06 2014 Copyright (c) 1982, 2011, Oracle. All rights reserved. Linked to: Oracle Database 11G Enterprise Edition Release 11.2.0.3.0 - Production, OLAP, Data Mining and Real Application Testing Options with 64-bit Partition SQL & gt; Create or process 2 as AA starting 2; 4 / * Comments * / 5 End; 6 / process created Next we will save the p...

Chef cookbook organisation -

पृष्ठभूमि हमारी कंपनी ने हाल ही में निर्णय लिया कि अंततः हमारी तैनाती प्रक्रियाओं को स्वचालित बावर्ची और मुझे यह क्रियान्वित करने के लिए काम सौंपा गया है। एक डेवलपर के अधिक होने के नाते, मैं वर्तमान में दृष्टिकोण और रसोई की किताबों को व्यवस्थित और संरचित करने के बारे में सर्वोत्तम दृष्टिकोण से अलग कर रहा हूं जिससे कि मैं वागांट के साथ हमारे विकास वातावरण में भी इसका उपयोग कर सकता हूं। हम ~ 10 अनुप्रयोग जिनके लिए हमें कई वातावरण (विकास, मंच, स्वीकृति, उत्पादन, डेमो) पर तैनात करने की आवश्यकता है। प्रत्येक एप्लिकेशन एक ही मूल तकनीकी स्टैक और प्लेटफ़ॉर्म पर चल रहा है। इनमें से कुछ अनुप्रयोग वास्तव में अन्य अनुप्रयोगों के सहायक हैं कई ट्यूटोरियल पढ़ने के बाद, सीखना-शेफ के साथ-साथ अंतहीन वीडियो देखने के बाद, मैं बेर्सेशेल्फ (प्रत्येक रसोई की किताब अपने स्वयं के जीआईटी रेपो में) का उपयोग करके कई पाक-किताबें बनाने शुरू कर दिया है: 1 एक्स रसोई की किताबें मूल बुनियादी ढांचे (सेटअप व्यवस्थापक उपयोगकर्ता, बुनियादी सिस्टम उपकरण स्थापित करें, सुडो, एसएसडीडी आदि) सेटअप करने के लिए 1 ...

c - Stream buffer size less than input stream, but no immediate segmentation fault -

Why does the following C code allow an input stream which is greater than the size of the buffer, before it is finally a Partition fault? With a character array of size 1 as the argument of too_bad , will it not allow 1 character of input only? In addition, what is the effect of not starting c as a int and not char ? The statement will be read from getchar () 4 characters while ((c = getchar ()) = '\ N' & amp; c! = EOF) is? Or will the binary representation of the characters be in 4 bytes? Note: This is a text from the class, but not the HW. #include & lt; Stdio.h & gt; Zero too_bad (four * buffer) {int c; / * NB: instead of char int because the system gives the integer value 0xffffffff on the I / O function getchar () end file * / char * dest = buffer; / * As long as the new line or file of end (Control-Z for standard input) * / read as ((c = getchar ()) = '\ n' & amp; c; = EOF * dest + + = C; Store next characters in buffer and poi...

jsf - How to open facebook oauth page as a popup window using socialauth -

I am using socialauth to login through Facebook in my JSF application. it works fine. If I click the Action Method of JSF CommandLink, then I am joining Facebook. Like below Public Zero Social Connect () {Social Athletic Configuration Configuration = Social Efficient Configure Gate (Default); Config.load (New FileInputStream (new file ("auth.properties"))); SocialAuthManager manager = New Social Aththaner (); Manager.setSocialAuthConfig (config); String Authentication URL = manager.getAuthenticationUrl (Provider ID, "http://mudomain.com/page"); FacesContext.getCurrentInstance (). GetExternalContext () .REDirect (authenticationURL); } In the index.xhtml page and command-linked id = "facebook" ajax = "false" value = "Login with Facebook "Verb =" # {userSession.socialConnect} "& gt; & Lt; F: setPropertyActionListener target = "# userSession.providerID}" value = "Facebook" /> & Lt; ...

java - How to add input form (feedback) in DSpace with really long data? -

I can get it this way: select country = form.addItem (). AddSelect ("Country"); UserType.setLabel ("Country"); UserType.addOption ("", "Please select your country"); UserType.addOption ("ABW", "Aruba"); UserType.addOption ("AFG", "Afghanistan"); & Lt; ----- A from Z --- and the rest of the rest of the country; UserType.setOptionSelected (parameters.getParameter ("country", "")); Textaria Country Other = Form.ADITIM (). AddTextArea ("Country Other"); Country Other Set val (parameter japiramator ("country other", "")); I want to tighten the code with a really long list of countries. Is there any alternative for this to keep a list of countries in a different place and to pull this information? Thanks in advance. One simple method is to create a config file: config / modules / Countries.cfg and configuration properties: ABW = A...

oracle - Understanding password profiles settings -

I have a question that relates to Oracle DBA, I've just read about password settings in the profile concept, PASSWORD_REUSE_MAX and PASSWORD_REUSE_TIME are a little confusing, and I think about these two topics, I am updating it, when I was reading about it, tell me if it's right or wrong. 1) PASSWORD_REUSE_MAX: This setting is used to reuse old passwords The functionality of this setting is prohibiting the reuse of old password for a few days. Example: Sql & gt; Profile Default Default PASSWORD_REUSE_MAX 180; To assume that my current password is "abc123", I have just changed it to 'xyz123'. After few days should I change ???? Xyz123a ???? Password is the old password as 'ABC 123', but PASSWORD_REUSE_MAX has a value of 180 days. So now I am able to change a ???? Xyz123a ???? Old password for ABC 123A is not allowed, because only I can use 'ABC 123' only after 180 days as a new password. 2) PASSWORD_REUSE_TIME: It is also used for...

spring mvc - Servlet filter not working properly -

I am using Spring MVC to prevent url, I am using the sublet filter in it. Jsp "is trying to authenticate the user. But when I enter the username and password and submit it. It directs me to "login.jsp" My Servlet filter: @WebFilter (urlPatterns = {"/ *"}) Public category MyFilter filter { Private ServletContext References; Public MyFilter () {// TODO Automatically Generated Creator Stub} Public Null Destroy () {// Tudro Auto-Generated Method Stub} Public Zero DoFilter (ServletResponse Response, FilterChain Series) Throws IOException, ServletException { Response.setContentType ("text / html"); PrintWriter out = response.getWriter (); HttpServletRequest request1 = (HttpServletRequest) request; HttpServletResponse response1 = (HTTPServlet Response) response; Http session session = request1.getSession (wrong); String uri = request1.getRequestURI (); If ((session == blank) session. GetAttribute ("user") == faucet) & amp; Amp; Amp; Am...

asp.net - spreadsheetgear - how to convert thousand separator with decimal and decimal seperator with comma -

I have failed to find numberFormat to convert separator from decimal to thousand separator with decimal. worksheet.Range (number range) .numberformat = "## Please. Thanks The only way to do this is to tell Excel that your decimal and Thousands of separators are different, but this will not only affect the entire application of a specific cell or worksheet / workbook. Code: with application .mailmaster = ",". Thousands support = "." .UseSystemSeparators = with incorrect

java - Use of WorkManagr API in J2EE application is viable? -

J2EEE specification says that it is not appropriate to create or create user-defined thread in application logic. As a reason, I think the resource dispute is to avoid issues of sync and memory leaks. But it also suggests using the ManagedExecutorService or the WorkManager API implementation, both of these implementations also have threads produced under the thread. How is it appropriate to use these APIs and not use threads? First, the Workmanager API is available only for this, so in this way I will address mostly Managed Exposure Service, But whatever I say applies to the work manager too. The difference between using the Managed Accelerator Service / Workmanager and creating your own thread is that the application manages the built-in threads. This means that the threads you used with this API, and generally javax.enterprise.concurrent * Through the classes, whether in the case of asynchronous work, or explicitly with one, the application provided by the application pr...

hibernate - how to set ForeignKey name when I have @ManyToMany -

Image
I am creating a database using JPA classes. If we have many of us relations, we can override the names of foreign names like this: @ManyToOne @JoinColumn ( Foreign = @forganiki (name = "FK_ COUNTRY")) Private country country; In DB, we will have the following result: OK, this is good results! But when I have @ManyToMany, I will not manage to set my own FK name. How can I make it? I try something like this, but it does not work: @ManyToMany (waterfall = CascadeType.PERSIST, fetch = FetchType.LAZY) @JoinTable (name = "NEW_TABLE", ForeignKey = @ForeignKey (name = "FK_TEST")) Or something like this: @JoinTable (name = "NEW_TABLE", joinColumns = @ JoinColumn (name = "ID1", referenced ColumnName = "id", foreignKey = @ForeignKey (name = "FK_DEV_ID")), inverseJoinColumns = id2 ", referenced ColumnName =" id ", foreignKey = @ForeignKey (name =" FK_DEV_ZONE ") )) or t...

javascript - Not found error on browser after sails lift, -

I am creating a new app with the "sails new" command. On the running pall, I get the "Replaced" (404) error on the browser I have a locally installed shed & amp; Here are my nodes; PAL version information vsnag @ like: ~ / sails / node_modules $ sails --version 0.10.5 vsnag @ like: ~ / sails / node_modules $ node - description v0.10.32 Pull lift with verbose options gives me vsnag @ like: ~ / sails / app $ sails lift --verbose info: start application. .. WARNING: Package in existing directory (/ home / vsnag / sails / app). Jason can not be read: Are you sure that this is a sealed app? Warning: Warning: package.json does not list seal as dependency in the current directory ... Warning: Are you sure that `/ home / vsnag / sails / app` is a cell application? Warning: verbose: Setting the node environment ... Verbose: Please run `npm installed coffee-script 'to use copscript (Skipping for now) Verbose: Modulloader hook is successfully loaded. ........

asp.net - make partial text italics -

मेरे पास निम्न नियंत्रण है: & lt; asp: LinkButton आईडी = "vid3" Runat = "server" CssClass = "Hyptext" टेक्स्ट डिक्चरेशन = "कोई नहीं" टेक्स्ट = "भाग 1 - नमूना" OnClick = "LinkButton1_Click" / & gt; पाठ के लिए, जहां यह भाग 1 कहते हैं, मुझे इसे इटैलिक बनाने की ज़रूरत है नमूना एक हो सकता है कि स्टाइल हाइपरटेक्स्ट के रूप में मैंने डालने की कोशिश की लेकिन सफल नहीं था किसी भी विचार। आप एक छद्म-वर्ग का उपयोग कर सकते हैं: .Hypetext: first-letter {} यह आपके लिंक में पहला अक्षर शैली देगा, लेकिन यह उस की सीमा है।

c# - How to execute asynchronously three separate queries in one method using ADO.NET ExecuteScalarAsync() -

So I'm trying to change my synchronous method to asnych set up - I have a method that checks Whether the user uses any company's products or not. I need different queries for each product, so I tried and decided to give a shot for asnych programming because I never waited for Task and , even if it is probably not the right position to do this but still I have changed my method to: Private static async Tasks & Lt; Bool & gt; IsUsingProducts (Intel Client ID) {bool isproduct = false; (Using SqlConnection connection1 = new SqlConnection (connString)) {SqlCommand firstProduct = new SqlCommand (firstQuery, connection1); First product. Comma timeout = 300; FirstProduct.Open (); Work NumberFaxed Product1 = First Product Exclsar sarsink (); // Input numberoffuesaid products = (int) firstproduct. Excl. SLAR (); // if (0 & lt; numberofsaid products) // {// isproduct = true; }}} (Using SQL Connection 2 = New SqlConnection (connString)) {SqlCommand secondProduct = new...

android - Search Token Occurrence count and Row Count Simultaneously in SQLite FTS3/4 -

I am fairly new to Android and SQL and there is a problem counting token frequency and any of the token rows is not. What I got is - COUNT () function and gatecount () function Both do not just return the number of token rows. I need to calculate token frequencies. I. If the token is present in 5 table rows, but if line 3 has a token, 2 times I need to show 6 events instead of 5. Sorry for improper formatting if any! You can get this information with x .

JAVA, Quarterly Interest with for loop -

आयात करें java.io. *; Import java.util। *; सार्वजनिक वर्ग डोनाल्डसन ड्यूएनेमेटरएमएक्टिविटी 3 ए {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {स्कैनर कीबोर्ड = नया स्कैनर (System.in); फ्लोट वार्षिक राइट = 0.0 एफ; फ्लोट त्रैमासिक रेट = 0.0 एफ; डबल प्रिंसिपल = 0.0; डबल ब्याज = 0.0; डबल फाइनलएमाउंट = 0.0; बाइट तिमाही = 0; इंट साल = 0; वार्षिक दर = 0.05 एफ; System.out.print ("वर्ष दर्ज करें:"); वर्ष = पूर्णांक। पैरासेन्ट (कीबोर्ड। एनएक्सटाइन ()); System.out.print ("आरंभिक प्रिंसिपल दर्ज करें:"); प्रिंसिपल = डबल। पीआरएसडबल (कीबोर्ड। एनएक्सटाइन ()); System.out.printf ("% s% .2f% n", "प्रिंसिपल =", प्रिंसिपल); System.out.printf ("% s% .2f% c% n", "ब्याज दर =", वार्षिक दर * 100, '%'); System.out.printf ("% 6s% 8s% 16s% 30s% n", "वर्ष", "क्वार्टर", "ब्याज अर्जित", & gt; "तिमाही के अंत में राशि"); तिमाही दर = वार्षिक दर / 4; तिमाही = 1; ब्याज = मूलधन * त्रैमासिक राइट;...

stop direct access to page php and Jquery -

People need to stop me, that the user can call the webpage directly from the address bar like: www. Site com / page.php , it should not be allowed. I have tried many ways, but I block all the Ajax menus too, basically when I log in directly on the page, I can go back to the entry page. Also, during the session, when working in the menu while calling the jQuery page from the page. How can I decide? This is a link from your menu - the name of the page in the page attribute you are linking to Are: & lt; One page = "page1.php" & gt; Page 1 & lt; / A & gt; Your Client Script: $ ('a'). Click (function () {var page = $ (this) .attr ('page'); SetCookie ('page', page); // & lt; == You need to write a cookie settings function for this location ; Href = page;} Then for the target page in your php, read the cookie and compare it with the page name. If this is correct, then do not redirect to your login page. .

camera - Hide volume HUD in iOS 8 -

In earlier versions of iOS 8, the system was a simple trick to hide the volume overlay. You just create a MPVolumeView and embed it anywhere in your visual hierarchy. It is documented here and many other stack overflow responses. However, I think this trick does not work in iOS 8. I am trying to stretch my hair out. fix this. Does anyone know that there is no way to do this in iOS 8? One thing to note is that the app in which I am doing this is active AVCaptureSession while I am trying to hide the HUD (Volume button shutter on camera) ) Are not sure that there may be some side effects. OK, it misuses a private API but I have found that it works . - (zero) set volume: hide {BOOL} {NSString * str1 = @ "etSystemV"; NSString * str2 = @ "eHUdenabled"; NSString * selector string = [NSString stringWithFormat: @ "s% @ olum% @: forAudio Category:", str1, str2]; SEL selector = NSSelectorFromString (selector string); If ([[UIApplication applicatio...

ios - Having trouble getting UIImage from image NSURL -

Image URL is having trouble getting image, is this the right way? Need help. Thank you in advance - (zero) Image Picture Controller: (UIImagePickerController *) was picker FinishPickingMediaWithInfo: (NSDictionary *) information {UIImage * selectedImage = info [UIImagePickerControllerEditedImage]; NSDRAEL * url = [Info Objective: @ "UIMZ Picture Controller ReFidurum"]; NSDTA * Data Image = [NSDATA DATAVITY CONTENT OFF URL: URL]; Self.image.image = [UIImage imageWithData: dataImage]; [Picker sharpening viewer unnecessary: ​​yes complete: zero]; } - (void) imagePickerControllerDidCancel: (UIImagePickerController *) picker {[picker waste ViewControllerAnimated: Yes Full minus]; } All you need is: Self .image.image = info [UIImagePickerControllerEditedImage]; [Picker sharpening viewer unnecessary: ​​yes complete: zero]; Keep in mind that information does not have an entry for the edited image;

c++ - Bit representation not being printed correctly for long int -

I am trying to represent some of the lengths of a long integer as a bitboard for my chess program of this variable I am using. However, the representation is not printed correctly. I am using the following code zero displayboard () {bitsy The first two rows transform it into a binary presentation using the bitset class and print it However, when I try to do this by using code in the loop, then gives me the following output: 11111111111111110000000000000001111111111111110000000000000001 The right output is : 111111111111111100000000000000000001000000000000001111111111111111 fullBoard is the value that I am using: 0xFFFF00000000FFFF I am compiling using the following command: C ++ 11: G ++ board.cpp -std = c ++11 Why is this code incorrectly outputing? I do not think there is an error in the loop. I think the problem is here: if (fullbirds & amp; (1 ) It can be: if (fullBoard & Amp; (1ULL & lt; & lt ; I)) The reason for t...

javascript - Unable to map routes file with ExpressJS Router -

I am reading an introduction book about ExpressJS and unfortunately they are using Express 3.x. I'm trying to update my code to express example 4.x. Here's an example: route / index.js export.index = function (req, res) {res.send (' Welcome'); }; app.js var express = expected ('express'); Var http = Required ('http'); Var app = express (); // Load the root handlers requires different routes ('./routes'); // router middleware explicitly add app.use (app.router); // roots app.get ('/', routes.index); Http.createServer (app) .listen (3000, function () {console.log ('app start');}); Here, app.router dislikes and the node throws an error about it I updated the code: Var http = Required ('http'); Var Express = Required ('Express'); Var app = express (); Var bodyParser = is required ('body-parser'); Var router = express.routor (); Var routes are required ('./routes'); Router.get ...

oracle - SQL reduce duplicates in union clause -

For example, I have the following questions: select customers, from the country Select the country where the country = 'Germany' select the city from the suppliers, the country where the country = 'Germany' order by the city; As you can see that WHERE country = 'Germany' is repeated in both goals of the union - without query to reduce the query Is there any way to repetitions? I do not like my questions very long. I I am currently working on Oracle. why not WHERE only once SELECT * (Select City, Select Country All Customers from Country, City by City Order by Country Order) Tab WHERE Country = 'Germany' (or) Code> Join as Selection as customer C. Customer, c. Desh, as a customer. Area as Supplier, S. Supplier Country = s.ountry and c.ountry = 'Germany' order c.City;

404 Error when exporting Excel from ActiveReports 8 -

I am struggling with this and for two weeks, most of the time for that time my responses to the support issue. That is what I would expect that will help the next person who is moving forward on this issue. I am going to throw a lot of unnecessary expansion to increase the barriers of the next man. I am working on an MVC 5 site and an ILISIL-bound code-based section report using the ActiveReports 8 HTML 5 viewer. I have enabled PhD, Word and Excel Exports using the available export parameters for the GrapeptectivePortports. The Viewer Javascript function renders properly on the Viewer page, and makes the requisite calls to ActiveReports. ReportSerice.asmx, which provides the information necessary to present the report, from which the URL is included for streaming the data. The report displays in the viewer just fine. So far so good. On my development machine, I can export in PDF, Word and Excel. When the test server is deployed, however, the Excel export stops working, and the ...

sql - Load Hive partition from Hive view -

I have an external hole with 4 divisions. Every week I want to overwrite the split in the outer hive table. I know that I can create a sequence of undivided hive tables like the one shown below choose the table as hive_table * from hive_view; But is there a way to overwrite the partitions with visual data? Yes, there is a way: INSERT overwrite table & lt ; Table_name & gt; Select partition (& lt; partition_clause & gt;) & lt; Select_clause & gt; Before such actions, hive.exec.dynamic.partition must be set to true . See details here:

Multithreading shell for loop with find with filenames containing spaces -

I write a shell script to simulate multithreading like this: #! / Bin / sh PROCESS_NUM = 5 FIFO = / tmp / $$ FIFO Mkfifo $ fifo order 3 & lt; & Gt; $ FIFO for $ i (CEC 1 $ PROCESS_NUM); Echoes $ i & gt; & Amp; & Amp; 3, I read $ ("$ 1" - $ in "-iname" * .jpg ") -u3p {md5sum" $ i "echo $ p & gt; for" start = = start "3 } & Amp; Waiting Executive 3 & gt; & Amp; - Rm $ FIFO echo "= end =" It was fine and was produced like this: = start = 2f6add89a29b1315166255c41899744b ./img. Jpg ... ... ... = end = But when the file path satisfies the free space, then this error and output was like this: = start = md5sum: ./my: No such file or directory md5sum: img.jpg: No such file or directory ... ... ... = end = So I change the loop in such a way: find "$ 1" - "name * * .jpg". I read -o3p {md5sum "$ i" echo $ p & gt; & Amp; 3} & amp; It was o...

session - php page atomicity and consistency? -

Here is a potential scenario: A PHP page reaches a few session variables for session with SSID 1000. On the other tab, the user logs out, which means destroy the current session. I think the worst case scenario is: Code is still going on page 1. What happens in that situation? Code on page 1 still uses SSID 1000 from session wars, which no longer exists? Can I use the "catch hold" block to handle the possible exception? What happens to session session with SSID 1000, which I am using for DB queries on page 1? I know that this question may be weird, but this scenario is important to me because I want to handle exceptions (if this situation raises an exception) and preventing DB from incompatible values. for. In advance thanks Web pages are stateless They "log in" or "log Out "are not in the state if the session is closing, when I see a page, efforts to continue using the session will fail. $ _SESSION will be rebuilt when I try to reach another page...

Rails 4.2 ActiveRecord::SchemaMigration is called 4 times on a refresh / restart -

After the the application is running using 4.2beta2 using nginx / passenger passenger mode in Dev mode (Rail 3.2) ), Rbenv / mri 2.1.3 against a mysql 5.5 server and I see this in logs. ActiveRecord :: SchemaMigration load (0.9ms) schema_migrations` selections` * to `schema_migrations` ActiveRecord :: SchemaMigration load (0.6ms) schema_migrations` selection`. * `Schema_migrations` from ActiveRecord :: SchemaMigration load (2.7ms) schema_migrations` selection`. * Select `schema_migrations` ActiveRecord :: SchemaMigration Load (0.7ms) from` schema_migrations`. * To `schema_migrations` Anyone have any idea why this can be said 4 times? Not minding the server is a terrible hit on you, just wondering if I'm doing something wrong. OK Looking for a solution for someone else, Rail model nameName.exists to mine Have a combination of looking into? Works, how our configatron gem works and fixing configatron initializer bottom line ModelName.exists? There was no cache and m...

Draw a Hankel matrix with R -

I want to create a Hankel matrix with R only matrix () , seq Use () and rep () R of the function till now, I like to attract it in some way: # With packages, required Install.packages ("MatrixCellCase") library (matrixcalci) E1 & lt; - hankel.matrix (5, seq (1, 9)) print (E1) # Usage matrix () Only, E2 efficient and lt; - Matrix C (1,2,3,4,5,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,5,6,7, 8, 9), Nackel = 5) print (E2) # UK Seek (), but E3 and LT; - Matrix (C (1: 5), CEC (2: 6), CEC (3: 7), Seac 4: 8), CEC (5: 9)), Nackel = 5) Print (E3) / Code> E1 used the library to attract Henkel matrix and in E2, I manually numbers to attract one, but if I need a new big matrix It will take a lot of time I tried to use the seq () but it did not work it would come like this: [, 1] [, 2] [, 3] [, 4] [, 5] [1,] 1 1 1 1 [2,] 2 2 2 2 2 [3,] 3 3 3 3 [4,] 4 4 4 4 4 [5,] 5 5 5 5 5 I'm still very new to R. Every idea is welcome. You can: matrix ([(1 : 5,5) + Representa...

asp.net - Access User control Id used in aspx page in the user control code behind -

I have a user control registered and placed in the ASPX page. & lt;% @ Register tagprix = "uc1" tagname = "client" src = "/ PageLayout / Client.ascx"%> & Lt; Uc1: Client id = "id-client1" run = "server" & gt; & Lt; / Uc1: Client & gt; I want to use the id "IdClient1" in my user control client's codebeh can someone tell me how can I use it? Thanks In the code you use in control ID id in VB or this.ID in C #. In VB.NET me.id in C # in this. ID

ruby on rails - Storing unconfirmed email column on the sign up -

I am using Devise with the confirmation module enabled. I realized that the unconfirmed email column is only used when the user already has a confirmed email and has to change it. I have the following problem: User "A" signed with an email that is related to the user "B" "Never get success in verifying your account. After that, the user "B" tries to sign up with his / her own email (the first user "A" was already used). User "B" can not sign up because your email is being used by anyone else. I think the sign-up page should save the email from the unconfirmed email column This is behavior from above. Very interesting question I think is the easiest way to prevent this problem (but it is not certain that this is the best way) only to change email specificity verification and only if it is email only Have to work. To do this, you should reject the valid module in your user model and apply the assumptions ma...

ruby on rails 4 - Simple regex to replace first part of URL -

Image
दिये गए http: // localhost: 3000 / something http://www.domainname.com/something https://domainname.com/some मैं / कुछ से पहले जो कुछ भी चयन करता हूं उसे कैसे चुनें और इसे staticpages से बदलें? इनपुट यूआरएल एक request.referer का परिणाम है, लेकिन जब से आप रेंडर अनुरोध नहीं कर सकते हैं.रेफ़ेरर (और मुझे कोई redirect_to नहीं चाहिए) , मैं मैन्युअल रूप से नियंत्रक / क्रिया का उपयोग करके उपयुक्त टेम्पलेट का निर्माण करने का प्रयास कर रहा हूं जहां क्रिया हमेशा मार्ग होता है, और मुझे डोमेन को नियंत्रक Staticpages । आप इस तरह एक regex का उपयोग कर सकते हैं: (https?: //) (। *?) (/.*) जैसा कि आप प्रतिस्थापन अनुभाग में देख सकते हैं, आप कैप्चरिंग समूह का उपयोग कर सकते हैं और उन स्ट्रिंग्स को जोड़ सकते हैं, जिन्हें आप आवश्यक यूआरएल जेनरेट करना चाहते हैं। regex का विचार डोमेन के पहले और बाद में स्ट्रिंग कैप्चर करें और \ 1 + staticpages + \ 3 का उपयोग करें। यदि आप चाहते हैं प्रोटोकॉल को एफ़टीपी में बदलने के लिए, आप समूह इंडेक्स को कैप्चर कर...

perl - curl not overwriting header fields -

I have to face a problem where overpoint server has sent a '417 Expectation Failed' error to 1024kb Returning I do not believe that the endpoint is sent to the curl before writing it properly. I am writing in Perl using the I-H flag and reading many different threads, to include the curl manpage, in an attempt to understand what I am doing . Here's how I'm setting my headers. My $ curlpath = "/ usr / local / bin / curl"; My $ xml = # - Yes, XML has actually been passed but I pushed it to @ curl_vers, "-h 'content type: text / xml; hope:'"; # - Header Flag Push @ Cirall_vers, "-V"; # - Verbose mode push @curl_vars, "-d"; # - Data Flag Push @curl_vars, $ xml; # - Push Data @ curl_vers, $ endpoint; Eval {# - Command line execution open (file, "-") || Exec $ curlpath, @curl_vars; $ response = join '', & lt; FILE & gt;; close (FILE);}; There is a curl response trim from the log. myhost.co...

Regex matching Python -

I want to write 3 different regular expressions first $ {any collection of characters} Should be detected, the second should find any order of $ {characters (any type of characters) , and the third one is either $ {any sequence of numbers} or $ number of any number Here's what I've tried: Import sys import os import re ncmd = 1 regular = re.compile ('$ {[az] *}') equals = re.compile ('$ {* [=] *}') #st After the triangle, after the string number = re.compile ('$ {(0-9) *} | $ (0-9) *') # $ {ANY_SEQUENCE_OF_DIGITS} or $ ANY_SEQUENCE_OF_DIGITS while (1): # print line Line = raw_input ("(% s) $"% Ncmd) if regular. Match (line): print "regular" print (oggetende (line [1:], '')) is equal to elif. Match (line): Print "Equals" Alif Number Match (line): print "number" and: print (line) ncmd + = 1 The dollar sign, by itself, "end of the line" means the following code: & gt; ...

html - CSS for selecting first span in all td's -

I am having trouble viewing my CSS and I have all the td before the Span with CSS, but whatever I am selecting is the first td what am I doing? CSS .tamstats> Cart & gt; Tr & gt; Th: First child {font-size: 20px; } HTML & lt; Table class = "team status" & gt; & Lt; TR & gt; & Lt; Th & gt; & Lt; Span id = "stats0Name" & gt; & Lt; / Span & gt; & Lt; Br / & gt; & Lt; Span id = "stats0 double" & gt; & Lt; / Span & gt; & Lt; Br / & gt; & Lt; Span id = "stats0Triple" & gt; & Lt; / Span & gt; & Lt; Br / & gt; & Lt; Span id = "stats0Quadra" & gt; & Lt; / Span & gt; & Lt; Br / & gt; & Lt; Span id = "stats0Penta" & gt; & Lt; / Span & gt; & Lt; / Th & gt; & Lt; Th & gt; & Lt; Span id = "stats1Name" & gt; & Lt; / Span & gt; & Lt...

ios - Right view image not appearing -

I think my image should not be able to display next to my UITextField. I want to ask about some ideas why can not it show? Here my code is: var errorImageView = UIImageView (Image: UIImage (named: (when I 'right' with 'left' (which means left Use), then change the image "monster")))) .rightViewMode = UITextFieldViewMode.Always? .rightView = errorImageView Just looks just right on the left side of the text box, but is not working properly for some reason whether something is wrong with the frame or I need to change the inset is? Confused why it will work for the left, but not right. Thanks a lot! I was ending up to add a new UITFfiled and to restart - I'm sure something strange Things got caught and it appeared as if it was not working. There was nothing with its frame, or anything from it. I actually just created a new project, in the form of a test, and after that this code works perfectly, so just a random gramline my code, maybe al...

facebook graph api - VCR is not recording cassettes on successful requests, only on failed ones -

I have a simple test to bring a Facebook object. I am using curl for request. It "Finds an object from Facebook". VCR Usasekat ('Facebook') URL = "https://graph.facebook.com/" & lt; ID & gt; Access_token = # {@ access_token} & amp; # {Query_string} "curl = curl :: is expected to be easy .pars (urls). Eql ('my object & gt;') End of the end My VCR configuration is as follows: Configure VCR.C | C cassette_library_dir = 'spec / fixtures / vcr_cassettes' c.hook_into: webmock end When I run the test, it passes, and the following logs: Start with the option: {: record = & gt ;: one time, match_requests_on => gt; [ : Method ,: Yuri] ,: allow_unused_http_interactions = & gt; true: serialize_with =>: yaml,: persist_with = & gt ;: file_syst Em} [webmask] handling requests: [https://graph.facebook.com/<ID>?access_token=<TOKEN>&fields=%5B%22id%22,% receive 22account_id% 22,% 22name [...