Posts

Showing posts from July, 2012

excel - Using bold cells to pull data in the same row onto another page -

I have a large workbook that adds new pages. These pages are all names such as Week (X). I have a cycle through macros and the data is gathered to display on the summary page. However, I have to be a page where I can show some data. This macro is going through all the "WEEK ()" pages and columns in bold C. Looking for Once it sees that I want to copy it to cell C: e and convert it to D cells: F on the new page. I have a great experience but I need some help on this. I can also include the code, this is my first posting, so I will post it below. Sub Front_Page () In the form of a short while, for each of the worksheets, I name & lt; & Gt; "Summary" and ws.Name Option Clear sub Front_Page () long lasting longer, I work as long as lastrow = ActiveSheet.Range ("D1000"). End (xlUp). Line 1 worksheets for every 1 if ws.Name & lt; & Gt; "Summary" and ws.Name

Converting variable in javascript to a CSV file -

Basically I have a string variable that is composed of two other variables separated by commas: code> items = "pencil"; Zodiac = 5; Entry = item + "," + amount; * Export entry in CSV Then the "entry" variable should be in the correct format to save as a separate file from a comma. Is there any such command that will take this variable and save it as a CSV or any other format which can be opened easily for use later? The entry variables will change and new information will need to be added to the CSV file if it already exists. So we say that if we also had: items = "paper"; Zodiac = 25; Entry = item + "," + amount; Export Entry for CSV should be the resultant CSV file: pencil, 5 paper, 25 I have other questions There is a bit of searching through, but most people are trying to do more complex things (eg, dealing with server vs. client-side issues), while I'm trying to explain how I get data I am on my own compu...

asp.net mvc - ASP Web API method access from regular MVC controllers -

I have no such complex solution, which I have applied among others using ASP Web API. I have 3 projects that are important for my solution. One is a WebAPI that has only API methods. The other two are backend and frontend for my application. I use the backend SPA approach which is loading most of the blank shells for the scene and uses AGAC to fill everything with AJAX. Because of the concerns of SEO, the decision of the front was applied in more traditional ways on the other hand, most of the goods have been presented to the server side. My question is, is it possible that web API methods should be forwarded to the front end controllers and to see the results? There are no samples on this? I do not see a point repeating most code in regular controllers. I am searching but I can not find much. If you have to call the web API service, the C # code (MVC controller or elsewhere), the HTTP client Or webclient can be used to call on HTTP. If you just need to reuse the code, it ...

c# - Set background image of app by a button click event -

When a button is pressed, the background image of the app can be changed to an image in the project. I have tried to set the background image by modifying the visibility of an XAML image control, whose source points to the image in the project. But the problem in this case is that the image hides some XML controls. At the visibility set = right, I tried to set the "back to" and opacity options, but they have no advantage. Please indicate that if this problem is resolved or help me get the right image XAML property to get my solution. You can set VisualBrush to set your image as background You can use your basic element (in this case grid) in your code, press the button BackgroundImage set the property to your image path and if you have some kind of change notification for this property then The image will be replaced. & lt; Grid.Background & gt; & Lt; Visualbrush Tile Mode = "None" Opacity = "{Bounding Background Opacity}" ...

hibernate - Adding Envers to an existing database -

I have a hibernate-based app in production with large databases. I want to add auditing to this app in two entities (two tables) Is required, and I have decided to go with the anchors. Each INSERT adds a new record to the auditor's audit, to update or delete the table. If I supported the launch of the anchors from the beginning of the application, then the population of the audit tables will be populated at the time of INSERT. The Envers documentation is very slim, and does not mention anything about adding an existing application to Envers. If I only make Envers support and related audit tables, that will start empty, so when I update an existing unit, a record to record new values ​​in the Audit Tables But I'll lose the previous values. How do I add Envers support in an application with an existing database? There is currently no built-in solution in it. A "Script" script (or manually created), with a combined audit record to force a "0...

c# - Linq most efficient method -

I need to use the Linq statement as the following var data = Db.tbl1 Ou (w = & gt; client eids == client end and source = source == source); I have a dropdown from which I get the source dropdown values ​​as follows: All NewsPage web The thing is that there are valid values ​​for newsletters and web sources. Not everyone does all mean that a record can be newspapper or web If they select all, then how do I modify whitesource such as newspapers or web of all the tools I mentioned below I can do 2 different questions, but not: if (source == "all") {var data = db.tbl1. Where (w = & gt; Customer ID == clientid); } And {var data = db.tbl1. Where (w = & gt; Customer ID == Client end and source == source); } I like doing this in 1 query because I have a query that is more complex than the ones shown above. Thank you in advance @mattammo reply is acceptable, but I like I broke them out a bit IMO is a little more readable. var data = db.tb...

mysql - PHP Show/hide link -

I have a function that prints articles from my database and edit, add, show / hide shows / In the Hide Link I want to be able to hide / show that particular article. How can I do it? Edit: I need to be able to hide / show in my backend page and it needs to be hidden in front page function displaynews () {$ data = mysql_query ("SELECT * FROM News ") // query or die (mysql_error ()); While ($ info = mysql_fetch_array ($ data)) {$ id = $ info ['id']; Look & lt; Br> & Lt; A href = edit.php? Id = $ id & gt; Edit & lt; / A & gt; & Lt; / A & gt; & Lt; A href = 'addnews.php' & gt; Add & lt; / A & gt; & Lt; A href = '#' & gt; Show / Hide & lt; / A & gt; & Lt; Br> & Lt; Strong & gt; ". $ Info ['date']" & lt; / Strong> & Lt; Br> ". $ Info ['news_content']" & lt; Hour & gt; & Lt; Br> "; // print article and date...

scala - Connection pooling in slick? -

Is there an easy way to use DB connection pool with Scala? I use Apache Commons DBCP for this, in fact, you Only create a DataSource , which encompasses the pooling details, and pass DataSource to Slick: import org. Apache Commons.dbcp.BasicDataSource val datasource: datasource = {val ds = new basic data source ds.setDriverClassName ("org.hsqldb.jdbc.JDBCDriver") ds.setUsername ("SA") ds.setPassword ("") ds.setMaxActive (20); Ds.setMaxIdle (10); Ds.setInitialSize (10); Ds.setValidationQuery ("Information from SCHAMA CEETEM_USERS" by selection 1) New java.io.file ("target"). Mkdirs // Make sure that the folder exists for ds.setUrl ("jdbc: hsqldb: file: target / db / db") ds} // test data source validity data source .getConnection (). Get the close database () // Get a database that combines the pooled connection val database = Database.forDataSource (dataSource) This example uses HSQLda, but it is easy to us...

javascript - New Slider for images -

I can create static web pages through CSS and HTML and now I would like to add an image slider to my page, I mean the images that slide on their own horizontally, I have no understanding of JQuery or Javascript or Ajax. So at this time I have an image folder uploaded to the server, in the main section I have referenced the javascript file: Now IM stuck I tags on my HTML page to reference javascript to upload images, etc? Ill learns coding bit, but just do not know how it all links together. Any help would be great. & lt; Script type = "text / javascript" src = "javascript / slider.js" & gt; Function someFunc (domObj) {domObj.innerHtml + = "& lt; div id = \" div2 \ "& gt; & lt; / div & gt;"; Document.getElementById ("div1"). InnerHtml + = "& lt; h1> Hello World World! "; } & Lt; / Script & gt; & Lt; Body onload = "some funk (this)" & gt; & ...

ios - Using storyboard unwinds, how do I take data from the view controller I'm returning from and use it in the view controller I returned to? -

I have everything applicable, and the following method comes back to the controller viewing source: - returned (IBAction): (UIStoryboardSegue *) segue {...} I want to take the value from UITextField into the footage I'm returning from, and so on. (Or idea that this method calls) is a value in my source view that is set to the value of UITextField I have tried: - (IBAction) returned: (UIStoryboardSegue *) from {AddTextViewController * returnFromViewController = segue.destinationViewController; NSString * inputtedText = returnFromViewController.textField.text; Self.foo = inputtedText; } but I get this error: [RootViewController textfield]: Unexpected selector returned due to exception not found Example 0x8dc0250 *** Finished The application sent to 'NSInvalidArgumentException', Reason: '- [RootViewController textfield]: Unrecognized selector example sent to 0x8dc0250' Am I doing the wrong thing in that code? There is hardly any document on this...

java - Add projection to morphia query -

Questioning with Morphia Is it possible to limit the returned areas? (Specify the launch)? On the command line like this: db.Institution.find ({name: / ^ Berlin}}, {slug: 1}) or with Java driver: BasicDBObject launch = new BasicDBObject ("Slug", 1); Collection.find (new BasicDBObject (), projection); thanks you do, see Pattern regex = Pattern.compile ("^ Berlin"); Query & lt; InsitutionEntity & gt; Query = mongoDataStore.find (InsactionEntity.class) .field ("name") equals (regex). Removed field (true, "slug"). AsList (); (this did not test, but it should work like this)

shell - gnome terminal tabs open multiple ssh connections -

मेरे पास सर्वर की एक सूची वाला एक फ़ाइल है: SERVERS.TXT: 192.168.0.100 192.168.0.101 192.168.0.102 एक गनोम टर्मिनल स्क्रिप्ट से, मैं प्रत्येक सर्वर के लिए एक टैब के साथ एक नया टर्मिनल खोलना चाहता हूं। यहां मैंने जो कोशिश की है: ग्नोम टर्मिनल --प्रफ़ाइल = टैबप्रोफाइल `सर्वर पढ़ें; Do echo "--tab -e 'ssh usr @ $ server'"; किया & lt; SERVERS.TXT` यहां त्रुटि है: तर्कों को पार्स करने में विफल: "--command / -e" का तर्क मान्य आदेश नहीं है : मिलान करने से पहले मिलान समाप्त होने वाला पाठ 'के लिए मिला था' (पाठ '' एसएसएच '' था) -e के बाद स्थान को हटाने की कोशिश की, टर्मिनल --प्रफ़ाइल = टैबप्रोफाइल `सर्वर पढ़ें; Do echo "--tab -e'ssh usr @ $ server '"; किया & lt; SERVERS.TXT` और मुझे एक समान त्रुटि मिलती है: तर्कों को पार्स करने में विफल: "--command / -e" का तर्क नहीं है मान्य कमांड: 'मिलान करने के लिए मिलान करने से पहले पाठ समाप्त' के लिए मिला था ' (पाठ 'usr@...

opengl - GLSL calculating color vector from multiple lights -

I am using my own self This is my piece program: # version Vec4 vertexPosition in 330; Normal in Vec3 surface; Coordination in Vec2 texture; Vec3 normal in the eye; Out vec4 output color; Uniform Sampler 2D Texture_Defuse; Uniform Bull Specular; Uniform float shinness; Structure Light {vec4 status; Vec4 ambient collar; Vec4 diffuseColor; Vec4 specularColor; }; Uniform Light Light [8]; Zero main () {outputColor = texture2D (texture_diffuse, textureCoordinate); {Vec3 lightDirection = normalize (Lights [L] .position.xyz - vertexPosition.xyz) for (Int L = 0; L & L; 8; L ++); Float diffilite intensity = maximum (0, dot (surface normal, light direction)); OutputColor.rgb + = lights [l] .ambientColor.rgb * Lights [l] .ambientColor.a; OutputColor.rgb + = Illumination [l] .diffusecolor.rgb * Lights [l] .diffusecolor.a * diffuseLightIntensity; If (specular) {vec3 reflection direction = normal (reflect (light direction, surface normal)); Float Specular = Max (0.0, Dot (IVEE Normal, Ref...

javascript - CSS3 Animations trigger others dom elements -

I currently have some CSS3 animations that play in infinite loops on page load. By the way, to trigger them manually - for example if I had to hover over the Other DOM element without the need for JavaScript / junkie? i.e. - & gt; Hover on element A - & gt; You can call it class and then you can use javascript to add / remove. $ ('# element1'). Hover (function () ($ ('# Element2'). AddClass ('animate');}, function () {$ ('# element2'). RemoveClass ('Chetan');}); To hook up in events, you will need JavaScript. Another method is that you can use the pseudo squared by using pure CSS : hover , but only when a child of # element2 Is # element1 . # element1: hover # element 2 {/ * your animation} /

How to use regex in PHP to get int after slash in string -

I tried to make a code in PHP which gets the subject id after a forward slash in a given string. Although the problem is that its return is nothing, how can I return it? echo preg_match ('/ ([^ /] +' / ',' english / 478 ', $ discussion_id); sampling $ discussion_id; This is for an online forum, thanks for your help; It is highly appreciated if you need more information, please do not hesitate to leave a comment. preg_match ("# / (\ d +) $ #", 'learn-english / 478', $ discussion_id); This will work for you. ID (match number) to print; Need to resonate $ discussion_id [1] . This is a job. For the new string, you will not need String expiration match ( $ ). Thus, regex will be: preg_match ("# / (\ d +) #", 'pen-palms to explore / 1161 & amp; t = visual debate, $ discussion_id); Sampling $ discussion_id [1];

php - Multi Language Support for a website -

I am using HTML / PHP / jQuery for a web site developed for a company. He requested to add multi-language support to his web site. I am trying to find out what will be the best way to achieve it (or best practice method) because I believe there are many different ways you can do this. I have found a site with a tutorial; It uses PHP with sessions. Would it be a good way to do this or what would be better ways? Just to add, there are 30 pages on the company's website and approximately 200-300 words per page. I will not use a url querystring parameter individually, as part of the URL I Cleaner like, for example: or Then on top of this I get unix gettext translation style that I think supports PHP - When you go to the javascript side of things, it is a bit more of a pain, but there are similar adaptations for it.

PHP - Handle POST Form using select options as array -

I have the following formats that have 3 dropdown boxes, each one for each and each has a different 'amount' Which will be selected (i.e. 0-1, 0-2, 0-3). The name for each selection is the same, but I have passed the ID of each of them to create an array. How can I get results from a posted form? I should be able to tell which extras is selected with the value of more than 0. So I should be able to tell how many extra [1] have been chosen, how many additional [2]] and so on ... & Lt; TD & gt; & Amp; Pound; 9. 9 9 & lt; / Td> & Lt; TD & gt; & Lt; Select name = "spare [1]" & gt; Option value = "0" & ​​gt; 0 & lt; / Options & gt; Option value = "1" & gt; 1 & lt; / Option & gt; & Lt; Option value = "2" & gt; 2 & lt; / Options & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; Op...

Google Maps for Android Apps Crash -

I have created an app and tested it in the Android device. Now, when I try to test in an emulator, I get errors. I tried, and they are identical, in fact my logcat is your very thanks a lot. You can get an action from & lt; Fragment & gt; are not trying to support pieces. The most likely case is that you are trying to use SupportMapFragment with any activity that is FragmentActivity does not come from .

Populate select menu from PHP/MySQL using javascript array -

मेरे पास यह कोड है: & lt; script & gt; Var मान = & lt;? Php $ sql = "SELECT * बिलिंग_साज़नामिनलकोड आदेश से कोड एएससी"; $ Rs = mysql_query ($ sql, $ conn) या मर (mysql_error ()); $ नाममात्रिकोड = सरणी (); जबकि ($ परिणाम = mysql_fetch_assoc ($ rs)) {$ नाममात्रकोड [] = $ परिणाम ['कोड']; } गूंज json_encode ($ नाममात्रकोड); ? & Gt ;; & Lt; / स्क्रिप्ट & gt; & Lt; चयन करें नाम = "sagenominalcode" id = "sagenominalcode" & gt; & Lt; script & gt; addOptions (document.getElementById ('sagenominalcode'), मान); & lt; / script & gt; & Lt; / चयन & gt; यह वास्तव में कैसे काम करता है मुझे इसकी ज़रूरत है, लेकिन मैं सोच रहा हूं कि क्या चयन के साथ ही कोड में कॉलम के नाम "नाम" को प्रदर्शित करना संभव है? 123 123 123 123 - नाम > आप अपने php और अपने जेएस को सख्ती से अलग करना चाहते हैं जिस तरह से कोड लिखा जाता है, वह काम करेगा, लेकिन यह बहुत ही भंगुर है, और भयावहता को तोड...

jquery - Problems with Ant to minimize JS files -

I am using ant to reduce all JS files in my project. It compiles my different JS files (i.e.: file1.js, file2.js, file3.js) in a file (i.e.: file.min.js) and then this minimum version is a build with my html source files Creates a copy in the folder. This works great, but the HTML source files that are copied to the build folder, still reference the old non-minimized versions (file1.js, file2.js, etc ...) So my question is, when I run an ant, there is a function / feature to convert any related file reference to HTML source code? The easiest way is to use only the minimum JS. It works great until you need to run your JS through a debugger or you do not need to get a recognizable bacterium. A technique called "source map" resolves this problem. If you use source maps, then you can always use the minimum version, and when you need to debug it, The debugger loads the non-minimized version on-demand. Unfortunately, as of this article (March 2013) the source maps ar...

r - Plotting with gWidgetstcltk -

I have created a Guine with a button, whose operator executes the plot method of the class created by me, Adding Ggplot2 and Grid / Grid Extra to conspiracy in a normal R session. It works fine using the plot () function in the console. My button / handler is below: PlotButton Why is this happening to anyone? This is the reason that it works with R-Console and is not a function that does not have R- The console will automatically invoke print () and nothing has been said. R does not do this within the function, so if you want to print a graph, then you must explicitly state print (graph) Print (plot, analysis, lineplot = silva (linecheck), lineplot.liz = silver (linelick), basonate = silver (bpc one), bpfrack = ed. Anemeric (silver (bpsin)), mosaic bars = silay (mosaiccheck) Mosaic Scale = Edge Nomeric (Silve (Mosaicpin), Alliance. Plots = Silvieu (conglomerate), condom. Mosaic = Sylve (Condescheck), LabForcisz = Edge. Eneric (Sylvie) (fontpin 1)), LeftFortesize =...

Html page getting weird with doctype -

I wrote an html page, wrote some CSS in a separate file and it worked fine. Then I realized that I should give a Dictip announcement for my HTML. I did this and my page completely messed up! I tried all kinds of announcements, but everyone ended it! This is my html (currently only working with Chrome, and without any work): & lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "style.css" & gt; & Lt; Title & gt; Luka Road - Home & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body background = "images \ background.jpg" & gt; & Lt; Div id = "header" & gt; & Lt; Div id = "header-back" & gt; & Lt; / Div & gt; & Lt; Div id = "top-spacing" & gt; & Lt; / Div & gt; & Lt; D...

xml serialization - Rails 2: #to_xml(:methods => :method_name) when #method_name returns an Array -

Is this override possible how a #to_xml provides a method result if it is an array? # is not a field, but a method and @ object.numbers # = & gt; [0,1,2,3,4,5] Currently it happens: @ object.to_xml (: methods = & gt; numbers) = & Gt; "& Lt; Object & gt; & lt; Number & gt; 012345 & lt; / number & gt; & lt; / object & gt;" Is it possible to override this behavior by which it returns: @ object.to_xml (: methods =>: numbers ) = & Gt; "LT; Object & gt; & lt; Number & gt; & lt; Number & gt; 0 & lt; / number & gt; & lt; Number & gt; 1 & lt; / number & gt; & lt; Number & gt; 2 & lt; / Numbers & gt; & lt; Number & gt; 3 & lt; / Numbers & gt; & lt; Number & gt; 4 From & lt; / Numbers & gt; & lt; Number 5> (this is easy to read formatted) Thank you in advance for your suggestions! You have two options: Ra...

cordova - PhoneGap camera not able to confirm after capturing an image -

I'm making an app to test the capabilities of PhoneGrap so that I can use it later for larger projects Could I prepare a simple test app and try to work in the camera API that captures and displays only a picture. The strange thing is that when I press my capture button that triggers navigate.camera.getPicture () , then I can take a picture, but can not confirm the picture, so that the process is mine Returned to the app and captured me Image. All other buttons are working relatively hard, so I can cancel for example and return it to my app properly and pass the second parameter as navigate.camera.getPicture () is done. Headler). Navigator here. Camera.getPicture (function (Yury) {/ P> Code for handling success}} code {/ code} for handling error} {quality: 100, destination type: camera.order type.FILE_URI, encoding type: camera encoding type PNG TargetVind: 2000, TargetHyight: 2000, Correct Orientation: True, Cefofoto Album: False}}; I left destination type The ...

javascript - How do you use twitter bootstrap button with jquery? -

What do I want to do, when a user clicks the submit button in the forum, then send it to collect data Php script and ideal, stay on the same page. Currently, I have a form (I have other tags, but these are two things that I need to pay attention to) However, I have a simple jquery I would like to create a script, where you click on the button that send the data using AJAX. I see Twitter works differently with Bootstrap Buttons and I'm not sure how to use your buttons with jquery Any help with this will be great. So, I should know how to use the Twitter Bootstrap button with jquery, in particular, I have to figure out how to use the submit button To do. How can I send data using AJAX? I have to find out that twitter bootstrap button with jquery How To Use Specially, I need to figure out how to use the submit button. How to do jQuery & amp; The bootstrap is still the same together How is the data sent using ajax? First we have inserted the event...

xcode - Dismiss or end UIScrollView -

I have a code that I wrote that whenever a button is pressed, the UISCroll calls the scene. The problem is that the screen remains on the screen, even if the second button is pressed. (IBAction) onClickSize: (ID) sender { viewSizePrint.hidden = yes; ScrewviewQuantities = CGSizeMake (1500, 214); (Int i = 0; i [scrlView removeFromSuperview]; ScrlView = Zero;

authentication - SugarCRM, Getting Current Logged in User Details through AJAX Call -

I have written a custom PHP file, which will be called by the AJAX request for SugarCRM. However, when I try to print global $ current_user; Print_r ($ current_user); This prints an empty value with all the fields listed in the array below. User object ([name] = & gt; [full_name] = & gt [date] => [user_name] => [user_hash] => [salutary] = & Gt; [first_name] = & gt; [last_name] = & gt; [date_entered] => [date_modified] => [[Phone_mobile] => [phone_work] => [phone_thation] = & Gt; [created_by] = & gt; [built_by_name] = & gt; [modified_by_name] => [description] => [phone_home] => = & gt; [phone_fax] = & gt; [Email2] = & gt; [address_street] => [address_city] = & gt; [address_state] => [address_postalcode] => [address_country] = & gt [condition] => [ Title] = & gt; [portal_only] = & gt; 0 [section] = & gt; [authenticated] => [error_string] => [is_admin] => 0 [employ...

Check for duplicate entries in a PHP array -

Is there a tool that I can run PHP code, so I will be typed in something like this? $ myarray = array ('foo' = & gt; 'hello', 'bar' = & gt;'byeby ',' afoo '=>' hello again '// & Lt; = Duplicate key on this line is required; EDIT: I want something other than ownership You are overwriting your array keys, so PHP only pickup on last entry for 'af' $ Arr = array ('foo' = & gt; 'hello', 'bar' = & gt; goodbye ',' foo '=>' hello again '/ / & Lt; = Requires duplicate key on this line); Print_r ($ arrivals); Blockquote> $ arr = array ('foo' = & gt; 'hello', 'bar' = & gt;'byeby ',' foo3 '=>' hello again '/ / / & Lt; = Required duplicate key on this line); Print_r ($ arrivals); Array ([fu] => Hello [Bar] = & gt; Bye [foo3] => Hello again) Returns: Also move through a...

php - Filter outgoing html files -

Image
I have all the *. Html files contain custom syntax before filter.php I can assume that it can be done with .htaccess . Note, I *. Html does not want to parse as a PHP In your htaccess, reverse raul (. *. Html) filter.php? Htmlfile = $ 1 Now, in filter.php, you can $ html = file_get_contents ($ _GET ['htmlfile']) ; // and whatever needs to be done, then $ html;

Glass of water to show progress CSS JQuery -

I am working on an app and recently started making some major changes for it. Actually, the app enables the user to keep track of water and that they apply the target set in the registration. One of these features will be a visual representation of the current progress, but not to understand the way I want to do it. I want a glass of water, which fills the current situation. (The glass reaches 75%, if the user targets 75%, etc.). Any thoughts? Ive seen it up and down again, but no fate. Due to closed votes: Question - & gt; How do I use a glass of water as a progress bar? It should be quite clear now, but if not, just tell me. Here is a fiddle which I have described by you. You can see what is happening! Basically, just one div inside the div.glass. Water the nest, keep the position of water under the glass, and animate its height by query! $ (function () {$ ('.water'). Animate ({height: '75% '}, 1000}})

wso2esb - Increasing WSO2 WSAS active for longer period -

Once I login to my wso2 WASA server if I often work inside the server If not, next time I click on any service or button, it will show the main login page again. How can I keep it? Active server every time without entering the login time > You can use AS_HOME / lib / core / WEB-INF / web.xml & lt; Management console session session increase in session-config & gt & lt; Session-timeout & gt; 15 & lt; / Session-timeout & gt; & lt; / Session-config & gt;

javascript - jQuery object in JSON value -

Here's my first question! I'm calling through AJAX through AJAX in the client side The verification library library tells me to specify that, for the current rule, I want to insert the error message. For my valid verification rules, I can write an object: {'errorlocation': jQuery ('[name = "foo"]'). The nearest ('. Bar')} My accreditation library allows me to inject after the first init and the rules, so when I submit my model by REST, then I I can get server response with errors I am currently developing that server response I would like that the error response will be an array of validation rules so that I can later inject those rules into the same verification object which has already been created on my page. Therefore, in response to Jason's, I would need a definition like that in the code snippet above. It seems that backbone and jargon pars can not evaluate Jason algorithms jQuery () , although the value of the object i...

parsing - Why does Nutch think it has already parsed all segments when it hasn't? -

I am using the Nutch 1.6 to crawl a few forums and lists them with Solr 1.6.2 I am I ran a test question on Solar and was surprised that there were only a few results, I was worried that there was either a problem that was with parsing of pages of nach or indexing of solar. After around snooping I discovered that Nutch pages it has parsed a lot has been taken: bin / Nutch readseg -List -dir crawl mothering2 / Regions / Names Generated Paras 20130228001531 23 27 9 20130228003940 1430 1434 661 20130228001829 202 206 105 20130228061337 1068 1090 475 20130228091009 1 2 20130228085956 34 34 25 20130228090348 44 45 34 20130228090851 7 7 6 20130228080438 364 374 192 20130228030933 1774 1795 903 20130228084205 168 169 63 168 169 63 But when I try to parse the fields, I get this: bin / nutch cross Crawl-mothering2 / regions / * ParseSegment: Starting 2013-03-21 00:20: 43 parasaggements: Segment: Crawl-Miting 2 / Segment / 20130228001531 "Exception" main in the thread ...

Prevent finishing activity when back button pressed if keyboard is open in android -

यह प्रश्न एक सटीक डुप्लिकेट है: 1 उत्तर मेरे पास एक गतिविधि। जब उपयोगकर्ता उस एडिटेक्ट पर छूता है, कीबोर्ड खुला है। लेकिन सभी एचटीसी डिवाइस में, कुंजीपटल खोलने के बाद, और जब उपयोगकर्ता केवल कीबोर्ड को छिपाने के बजाय वापस बटन दबाए, मेरी वर्तमान गतिविधि समाप्त हो जाती है और पहले की गतिविधि दिखाती है इस समस्या को हल करने के लिए कैसे? सभी अन्य सैमसंग मोबाइल में, यह ठीक काम करता है लेकिन एचटीसी उपकरणों में नहीं। अच्छा यह सिर्फ आपके लिए काम करेगा आप जांच सकते हैं कि कीबोर्ड ऑन ऑन बैकड्यूड इवेंट की तरह है: सार्वजनिक रिक्त पर ब्लैकप्रेस () {अंतिम देखें गतिविधि RootView = findViewById (R.id.activityRoot); ActivityRootView.getViewTreeObserver ()। AddOnGlobalLayoutListener (नया ऑन ग्लोबललेआउट लिस्टनर) {@Override सार्वजनिक शून्य पर ग्लोबल लेआउट () {int heightDiff = activityRootView.getRootView ()। GetHeight () - activityRootView.getHeight (); यदि (heightDiff & gt; 100) {// अगर 100 से अधिक पिक्सल, इसकी शायद एक कुंजीपटल ... InputMethodManager imm = (InputMethodManager) getS...

sql - Is there a way to query mysql for all records that are not in a set, even when its empty? -

So I know mysql says: In general, the tables in which the tap value and Blank tables are the case of edge. While writing subclasses, always think that you have kept these two possibilities in mind. But that does not make sense. If I say: Download in YouTube (null) Choose from users who do not return all users ? Even those who say in their logic: not in & lt; & Gt; All. Thus, these two statements are the same: To tell me, return all the records where the id is not equal to the tap, which are all records. So the question is, I am not in a specific set, how can you choose all the records, even if that set is empty . Obviously, in my application code (a Rail app), I can check that the set is empty and modify my query, but it sounds ridiculous. Is there any way to do this in SQL? You are making a common mistake to think that is NULL or value - In this case you are assuming that NULL = empty set . NULL is undefined - therefore, all RDMS has NU...

perl - FedEx Soap v10 - Scheme/XML Issue -

It is currently available when trying to submit your XML to FedEx servers: 'errorcode' = & gt; '5', 'cause' = & gt; 'Schema verification failed for request.', 'Description' = & gt; {'ValidationFileer Delay' = & gt; {'Xml locale' = & gt; {'Number of paces' = & gt; ''}, {'Units' = & gt; ''}, {'Value' = & gt; ''}, 'Message' = & gt; {'Invalid decimal value: expected at least one digit', 'string value' 'is not valid calculation value for weightlifting in nomination http://fedex.com/ws/ship/v10', 'invalid decimal Value: expect at least one digit '} Do you have any suggestions from people? It appears that FedEx is not receiving the 'commodities' array, but everything is being set (this includes numberoffices, 'unit', and 'value'). Any suggestions are appreciated. Without seein...

clojure - how to check if a nested key exists in a map -

I want to see that each vector [: e [: a: b] is given in:: c Are: D]] is present in a map {: E2: a {: b3}: c {: d 5}} I can write to check the following - (def kvs {: e 2: a {: b 3}: c {: d 5}}) (each ? # (Includes? Kvs%) [[e] [: a: B] [: c: d]]) However due to failure in the above Like the update does not check the deeper key level. An improvement on the basic view of idol worship, which works during the map, also works. zero (or not - has been found) (not-any? (For [Ks keyseqs] (found in MKs not found)))))) Users & gt; (Each? {: E2: A {: B3}: C {: D5}} [[E: E] [: A: B] [: C: D]]) True User & gt; (Each? {: E2: A}: C {: D5}} [[E: E] [: A: B] [: C: D: E]]) Wrong

django models - NameError: name 'u1' is not defined -

I'm trying to follow the django tutorial but by my own work. The Models.py file appears from imported model class user (models.Model) from Django.db: alias = model. CHAfild (max_land = 30) password = model.ccarfield (max_long = 30) email = model.mailfield ( ) Reg_date = models.DateField () class questions (models.Model): head = model. Carfield (max_long = 50) content = model. TextField () Writer = Model. Fergenky (user) date = model.defild () Category Answer (Models.Model): Content = Model Textfield () Question = Model Foreign (Question) Author = Model. Date of Fenarki (user) = Model DataField () Validity = Model Booleanfield () I created "python manage.py shell" and wrote something like this: & gt; & Gt; & Gt; U1 = User (alias = 'Alex', password = '123', email = 'xx_mail.ru', reg_date = '2013-01-07')> gt; & Gt; & Gt; U1.save ()> gt; & Gt; & Gt; U2 = User (alias = 'kate', password = ...

oracle - sql query getting ID wise balance -

मेरे पास निम्न एसक्यूएल क्वेरी है: ( ओरेकल 10 ) SELECT एआईडी, एसएम (एएएमडीसीआर) - एसयूएम (एएएमडीडीआर) एएस बाल्मेट, पी। एनएमआई से टैब्यू 1 ए, टैब्यू पी पीएचईआरई पीआईआईडी 'सी 10100' और 'सी 0 200' और पीआईआईडी = ए .आईडी और ए। TRANS_DATE & lt; '01 -FEB-2013 'ग्रुप बाय एआईडी, पी.एन.आई. नाम ORIDER एआईडी उपरोक्त क्वेरी अच्छी तरह से लागू होती है, लेकिन इस प्रश्न में एक शर्त और A.TRANS_DATE है & LT; '01 -FEB 2013 ' । यह शर्त balAmt से पहले TRANS_DATE प्राप्त करने के लिए है। लेकिन इस प्रश्न के साथ यह मुद्दा यह है कि यह केवल आईडी के संदर्भ में और A.TRANS_DATE & lt; '01 -FEB-2013 ' हालत अगर आईडी में TRANS_DATE से कम '01 -FEB-2013 ' नहीं है, तो यह उस आईडी । तो मुझे डेटाबेस से सभी आईडी प्राप्त करना है लेकिन मुझे balAmt के संबंध में और A.TRANS_DATE & lt; किसी भी सुझाव की सराहना की जाएगी। अग्रिम धन्यवाद। SELECT एआईडी, एसयूएम (मामले जब A.TRANS_DATE & lt; '01 -FEB-2013 'तो nvl (एएएमडीसी...

java Facebook integration -

Integrate in Java using restfb. Somewhere written that the restfb is deprecated.then what to use in that case. I do not want to use third parties. There is no guide to using the Facebook Open Graph in the Java application. itemprop = "text"> Add it to your pom.xml, it's easy to integrate with Facebook and others: & lt ;! - Spring Social - & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.social & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-social-core & lt; / ArtifactId> & Lt; Version & gt; $ {Spring-social.version} & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Org.springframework.social & lt; / Group & gt; & Lt; ArtifactId & gt; Spring-social-web & lt; / ArtifactId> & Lt; Version & gt; $ {Spring-social.version} & lt; / Edition & gt; & Lt; / Dependencies & gt; ...

c - Explain the working of a program that prints the GCD and LCD of two numbers -

I know that this is very easy, but I do not know that for variable t What is int main () {int a, b, x, y, t, gcd, lcm; Printf ("Enter two integers \ n"); Scanf ("% d% d", & amp; x, & amp; y); A = x; B = Y; While (B! = 0) {t = b; B = A% B; A = T; } GCD = A; LCM = (x * y) / gcd; Printf ("% d and% d =% d \ n", the largest general separator for X, Y, GCD); Printf ("% d and% d =% d \ n", at least normal multiple of x, y, LCM); Return 0; } If I remove the variable t , then the input must be given in order to reduce (i.e. the input first). If t is used then everything works fine. I am very new to programming so please help. This is Euclid's algorithm for calculating GCD. function gcd (a, b) {while (bce? 0) {t: = b; B: = A modern T; A: = t; } Return} This argument reduces the value of A and B. T is a dummy variable that captures the value of B, while the next new value of B is being calculated. The amount which will ...

iphone - Convert NSString to NSDate returns (null) value -

I have a date in the string format " 2013-03-19T19: 00: 50 " I am trying to convert it to NSDate in NSDateFormatter NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init] ; [DateFormatter setDateFormat: @ "yyyy-MM-ddThh: mm: SS"]; NSDate * startDate = [dateFormatter dateFromString: date]; NSLog (@ "date format date:% @", start-up); but it is giving me a redundant date Date in date format: (empty) is what The issue? Use: [dateFormatter setDateFormat: @ "yyyy - MM-dd'T'HH: mm: ss "]; You have time in 24 hour format, so HH is required There is an added text on it.

ruby on rails 3.2 - Why can't I add an object to the relationship? -

बस रेल सीखना ... मेरे पास निम्न मॉडल हैं: वर्ग टाइमस्लॉट & lt; ActiveRecord :: बेस has_and_belongs_to_many: प्रयोक्ता एंड क्लास उपयोगकर्ता & lt; ActiveRecord :: has_and_belongs_to_many: time_slots अंत मैं भी दो में शामिल होने के लिए एक मॉडल है: वर्ग TimeSlotsUsers & LT; ActiveRecord :: बेस attr_accessible: time_slot_id,: user_id end कंसोल में, मैं एक उपयोगकर्ता ऑब्जेक्ट बनाऊँ और मैं इसे TimeSlot से संबद्ध करना चाहता हूं। मेरे पास एक वेरिएबल ts है जो एक टाइमस्लोट ऑब्जेक्ट है, और u यह एक उपयोगकर्ता ऑब्जेक्ट है दोनों डेटाबेस में मौजूद हैं। जब मैं ts.users & lt; & lt; यू , मैं कह एक त्रुटि मिलती है "ActiveRecord :: StatementInvalid: SQLite3 :: ConstraintException: time_slots_users.created_at शून्य नहीं हो सकता: में डालने" time_slots_users "(" time_slot_id "," user_id ") मान (1, 1) । क्यों अशक्त हो created_at हैं? नहीं यह स्वचालित रूप से जब TimeSlotsUsers में रिकॉर्ड बनाया जाता है बनाया जा रहा है? मैं बजाय रिश्त...

backbone.js - Iterating through multi-nested objects in Javascript with Underscore -

I am using backcon and underscore. My object looks like this: TopObject: {name: ", middleObjects: []} Middle Object: {name:" ", Object below: []} Object below: {name : '', Some other terms: ''} So if you have a top object, then it will have several middle objects in the form of a property, and one near the middle object There will be a property as the only place I am not sure how I can display these areas in a table. It has been using underscores so far. var has some data in someTopObject = new TopObject (); // (some toobogs.get ('medium objects'), function (midobase) ) {// do something with midobage.name // do not make sure how to get the middle object.} Botam object}); Right now I know that in the below object There can be only 2 items, so I think I have the following objects in the first and second ob Getting Jack could hardly be coded, but I was not sure if there was any more great way. Thanks! nestes loop? _. Each (s...

asp.net - Can i trust the value that is returned from ServerVariables["REMOTE_ADDR"] -

मेरे पास IIS होस्ट किया गया ASP.NET WebAPI ऐप और ServerVariables ["REMOTE_ADDR"] ग्राहक का पता प्राप्त करने के लिए और उपयोगकर्ता की पहचान करने के लिए: क्लाइंट लॉग इन करें और मैं उस कुकी को जनरेट करूँगा जिसमें ग्राहक आईपी शामिल है बाद में कॉल में मुझे कुकी से आईपी मिल जाएगी, और यह मान्य है कि यह सही है। क्या मैं इस पते पर भरोसा कर सकता हूँ, या कोई ऐसा तरीका है जिस पर सर्वरवॅरिएबल्स ["REMOTE_ADDR"] उदाहरण देता है 161.121.222.223 और ग्राहक वास्तव में कहीं और है? हां, यह सुरक्षित है यह टीसीपी कनेक्शन का स्रोत आईपी है और एक HTTP शीर्षलेख को बदलकर प्रतिस्थापित नहीं किया जा सकता है। एक मामले में आप चिंता करना चाहते हैं, यदि आप रिवर्स प्रॉक्सी के पीछे हैं, तो इस मामले में REMOTE_ADDR हमेशा प्रॉक्सी सर्वर का आईपी होगा और यूजर आईपी एक HTTP हेडर (जैसे एक्स-फॉरवर्डेड-फ़ॉर) में प्रदान किया जाएगा। लेकिन REMOTE_ADDR पढ़ने के सामान्य उपयोग केस के लिए ठीक है। से लिया गया:

C function argument char * vs char [] -

I think this question is of an extension. Say I have the following code: #include & lt; Stdio.h & gt; #include & lt; String.h & gt; Zero func (char * str) {strcpy (str, "test"); } Int main () {char testStr [20] = "original"; Function (testStr); Printf ("% s \ n", testStr); / * After a print "test" a new line * / return 0; } From my understanding, do not expect func to be an indicator as an argument for a read-only literally needed? Whereas, what is being taught is copy on literal word piles only for reading Although this yield is the right result, is it doing 100% right? Will the readability of the code improve if func () are accepted char [] instead of char * ? Your understanding is right that the code is okay. The following, on the other hand, are not: void func (char * str) {strcpy (str, "test"); } Int main () {char * testStr = "original"; Function (testStr); } This attemp...

ruby - Why is rails not picking up a function defined in .js.erb? -

The rail is not identifying my .js.erb file and just ignoring anything in it. The relevant snippet advanced_search.html. ARB & lt;% = "advanced_search_orders_form"%> in the render I have another file _advanced_search_orders_form.html. ARB, which is displayed properly with a small problem. _advanced_search_orders_form.html .erb & lt; Form id = "advancedSearchOrder" name = "advanced searchform" value = "advanced search" action = "" class = "search-line" method = "receive" onsubmit = "valid valid advanced searchform ()" & Gt; This valid Advanced Search () is defined in _advanced_search_orders_form.js.erb , but the rail works such as functions are not defined. Apart from this, if I just write a warning ("check") in _advanced_search_orders_form.js.erb, then it does not render. Even the editor (Ruby Manny) says that it did not validate the definition of this function...

android - AssertionError in Gson EnumTypeAdapter when using Proguard Obfuscation -

मेरी परियोजना के लिए serialization / deserialization के दौरान एक TypeAdapter में Gson लागू करता है वस्तु के बहुरूपता राज्य को संरक्षित करना किसी भी तरह, यह परियोजना विकास परीक्षणों के दौरान ठीक काम करती है, लेकिन जब यह छद्म अस्पष्टता के साथ जारी हो जाता है और परीक्षण किया जाता है, तो यह केवल क्रैश होता है। 03-21 10: 06: 53.632 : ई / AndroidRuntime (12441): गंभीर अपवाद: मुख्य अक्टूबर 03-21: 06: 53.632: ई / AndroidRuntime (12441): java.lang.AssertionError 03-21 अक्टूबर: 06: 53.632: ई / AndroidRuntime (12441): में com.google.gson.internal.bind.TypeAdapters $ EnumTypeAdapter & LT; init & gt; (sourcefile: 724)। अक्टूबर 03-21: 06: 53.632: ई / AndroidRuntime (12441): com.google.gson.internal.bind पर। TypeAdapters $ 26.create (SourceFile: 753) 03-21 10: 06: 53.632: E / AndroidRuntime (12441): com.google.gson.Gson.getAdapter पर (स्रोतफ़ाइल: 353) 03-21 10: 06: 53.632: ई / AndroidRuntime (12441): com.google.gson.internal.bind.ReflectiveTypeAdapterFactory $ 1. करें & lt पर...

iphone - IOS:Can I get a object by restoration id in xcode? -

मैंने स्टोरीबोर्ड में कई पाठ फ़ील्ड बनाई हैं और ऑब्जेक्ट को ViewController.h @ प्रॉपर्टी (कमजोर, नॉनैटोमिक) आईबीओटलेट यूआईटीडफ़ेल्ड फिल्ड * a0; @ प्रॉपर्टी (कमजोर, नॉनैटोमिक) आईबीओलेट UITextField * a1; @ प्रॉपर्टी (कमजोर, नॉनैटोमिक) आईबीओटलेट यूआईटीफ़ेस्टफिल्ड * ए 2; @ प्रॉपर्टी (कमजोर, नॉनैटोमिक) आईबीओटलेट यूआईटीडफ़ेल्ड फिल्ड * ए 3; ... मैं टेक्स्ट फ़ील्ड के बीच कुछ जोड़ना चाहता हूं जैसे पाठ फ़ील्ड के मान के लिए जांच अगर यह 0 है। वर्तमान में मुझे कई-दूसरे बयानों को लिखना है। यदि (self.a1.text == 0) {// कुछ करना} और अगर (आत्म। ए 2.टेक्स्ट == 0) {// कुछ करना} ... मैं यह काम करने के लिए एक पाश का उपयोग करना चाहता हूं क्या मैं टेक्स्ट फ़ील्ड का ऑब्जेक्ट प्राप्त करने के लिए बहाली आईडी का उपयोग कर सकता हूं? मान लीजिए मैंने क्रमबद्ध अनुक्रम (यानी a0, a1, a2 ...) के लिए (इंट i = 0; i & lt; 10; i ++) के लिए एक बहाली आईडी निर्दिष्ट की है (यदि (findViewById (" एक "+ i) .text == 0) {// कुछ करना}} क्या मैं ऐसा कर सकता हूँ? आप टैग का उपयोग कर सकते हैं, य...

mysql - Handling regional currency variations in PHP - e.g. different uses of full stops versus commas -

I'm pretty sure this should be as easy as I am making it. I have a customer who provides loans to businesses and people to the site. This problem comes with people's entry. I have to break the currency symbols, after losing all the units, nothing has to be lost (in most cases a sterling - so lose pence) and convert the final number into a format that can be repeated in a database table in a third party. Most of the above were working- so far, we are meeting the users of mixing thousand separators and decimal separator so that one intends to complete the work if there is a thousand SEP or a decimal set-up. Anyone got a clever solution? What is the Rijks Way? Thanks, Steve I will do this ( It is ok to handle your input, do not have any illegal input like "$ 6,00,00" or "777.7.98, $ 8938" or "hi mama"): Find currency sign and It can be a bar, it can be at the beginning or end and can be more than one character, like "USD",...

java - Thread sleeps after few iterations while reading response of socket -

I am developing the application in which I am writing / reading socket. However, it is only working 11 times, then it sleeps. PollThread.java public class PollThread {static string result; Private Static Timer myTimer; Fixed string IP = "192.168.1.19"; Public Stable Zero Main (String [] Elggs) {// Todo Auto-Generated Method Stub System. Outprint ("Polothrade"); MyTimer = New Timer (); MyTimer.schedule (New TimerTask) {@Override Public Zero Run (ClientThread cThread = New ClientThread (IP); String position = cThread.readStatus (); System.out.println ("Stoss ::" + status); }}, 0, 2000); }} ClientThread.java public class ClientThread {string byte_to_hex, swap_status, result, ipadder; Public socket s; Public inputstream; Public OutputStream O; Integer position; Public ClientTrade (String IP) {// To-O Auto-Generated Constructor Stub this.ipAddr = ip; } Public int read stats (try {s = new socket (IPadder, 502); I = s.getInputStream (); O = s.g...

Updating multiple columns with data from subquery in MySQL -

I am trying to update more than one column in a row, which contains data for several columns of a subquery . The following methods have not worked for me, and I can not find different people who meet their needs: Update beer, (AJG ( Select), AVG (palatus) AS palatus, AVG (taste) as taste, avg (fragrance) as fragrance, aggregate (total) as review, review_total set beers.appearance = Review_total.appearance, beers.palate = review_total.palate, beers.taste = beer_id review_total.taste, beers.aroma = review_total.aroma, beers.overall = review_total.overall ou review_total .beer_id = beers.id and beers.id = 43 I do not get an error for this one, but 5 warnings and rows have not been updated: query is OK, affects 0 rows, 5 warnings (0.01 seconds) Show warnings me: + - ----- + ------ + -------------------- ----------------- --------------- + | Level | Code | Message | + ------- + ------ + ---------------------------------- ------------------ + | Note | 1265 | Data trimmed ...

android - How garbage collector release AsyncTask allocated memory -

In main activity, I am creating a new asynchronous x and I with new RTask (this) I execute Executed (the ultimate); To send data to a server incomparably, I think creating a new task can often lead to memory leaks. So when the garbage collector releases memory and how can I set up the work reference to allow it to be collected? I have tried to use this.cancel (true); inside onPostExecute () but I've read that, due to a bug in the Android Framework, OPtest is never called. Actually, there should not be any reference from param Or doInBackground () . Then, you might think that if you are building many long-running AsyncTasks, then take it on some memory issues. Will go Actually this is not true (at least on the latest Android version) AsyncTask shows that This uses the Singleton Bound Executor: Private Stable FINAL INC. CORE_POOL_SIZE = 5; Private static final integer MAXIMUM_POOL_SIZE = 128; Private stable final end KEEP_ALIVE = 1; Public stable final...