Posts

Showing posts from July, 2013

Loop efficiency - C++ -

Initial question, on loop efficiency. I have started programming in C ++ (my first language) and using 'principles and practice using C ++' by Bjern Straffrup. I am making my way through the first chapters and have just introduced the concept of loops. The first practice about the loop asks me the following questions: The character 'B' is four ('A' + 1), 'C' is four ('A' + 2), etc. To write a table of letters with their corresponding integer values: A 97, B98, ..., z 122 However, I used uppercase, I created the following: integer number = 64; // For the integer value @ sign, the letter letter = number before one letter; // converts an integer alphabet to int i = 0; While (i & lt; = 25) {cout & lt; & Lt; ++ letter & lt; & Lt; "\ T" & lt; & Lt; ++ number & lt; & Lt; Endl; ++ i; } Should I have the goal to be present only in a 'loop' or what kind of change is not possible in betwe

javascript - Jquery UI slider, setting values bug -

मेरे पास 3 div है & lt; div id = "slider-range1" class = "स्लाइडर दूरी" & gt; & lt; / div & gt; & Lt; div id = "slider-range2" class = "slider-range" & gt; & lt; / div & gt; & Lt; div id = "slider-range3" class = "slider-range" & gt; & lt; / div & gt; मैंने स्लाइडर को इन डिवेल में क्लास संदर्भ का उपयोग करने के लिए जोड़ा है $ (function () {$ ("। स्लाइडर-रेंज")। स्लाइडर ( {सीमा: सच, न्यूनतम: 0, अधिकतम: 100, स्लाइड: फ़ंक्शन (इवेंट, यूआई) {}});}); प्रत्येक स्लाइडर्स की श्रेणियां अलग हैं मैं उस गतिशील रूप से जोड़ना चाहता हूं मैंने कोशिश की $ ("# slider-range1")। स्लाइडर ('विकल्प', 'मान', [1, 100] ); लेकिन यह काम नहीं कर रहा है: ( आपने कोशिश की है $ ('selector')। स्लाइडर ('मान', सूचकांक, मान); // सूचकांक स्लाइडर में वर्ग होगा स्लाइडर ('मान', 0, 50); $ ("# slider-range1")। स्लाइडर (&

java - How much session data is too much? -

We are running unusually high memory usage issues. And I saw that in many places in our code we are pulling 100 records from DB, packing it into custom data objects, adding it to array list and storing it in session. I want to know what is the upper limit of recommended data in the session. Just like a good practice bad practice I am using JRokit 1.5 and 1.6 GB RAM. I documented with Jeprobe and found that there are heavy memory footprint in parts of the app. Most of this data is in the later sessions used. It relies entirely on how many sessions are usually present (which is how many users you have , How long they stay on the site, and depends on the session timeout) and how much is the RAM of your server But first of all: have you actually used a memory profiler that you Indicates that your "high memory usage" session is due to data, or do you have a Put Uman? If you have only one problem that is "high memory usage" on the production machine (i.e. t

C++ Inheritance, calling a derived function from the base class -

How do I call a derivative function from a base class? I mean, able to change a function from a base-derived class. East. {public: void f1 (); Zero f2 (); }; Zero A :: F1 () {it-> F2 (); } / * Here a :: F2 () definition, etc. * / class B: public one {public: zero f2 (); }; / * Here B: F2 () Definition, etc. * / Zero Lala (int s) {a * o; // I want to be square 'A' in this specific example switch (squares) {case 0: // type b o = new b (); break; Case 1: // Type Si = New C (); // You know, ... break; } O-> F1 (); // I want it to make F1 call F1 on the derived class) Maybe I'm taking a wrong view, any comments about the different designs will be appreciated. Declare f2 () virtual in the base class. class one {public: zero F1 (); Virtual zeros f2 (); }; Then whenever the class derives the class from f2 () from the most derived class, depending on the type of the object, depending on the type of object The call will be made, not the type of pointer.

scanf - Escape the dot in PHP sscanf? -

यह काम नहीं करता है: सूची ($ value) = sscanf ('foo .bar ','% s.bar '); प्रतिध्वनि $ मान; //foo.bar ऐसा करता है: सूची ($ value) = sscanf ('foo बार', '% s बार'); प्रतिध्वनि $ मान; // foo किसी भी सुझाव वास्तव में सराहना करते हैं धन्यवाद आप s इस प्रकार: सूची ($ मान) = sscanf ('foo.bar', '% [^।]। बार'); प्रतिध्वनि $ मान; // foo

.net - Stop/Run windows service and building a solution -

I have a script that closes a certain window service, creates a build or a rebuild, and renders the service The construction process is finished after running. Should I use MSBILD for this? Or is there any other way? You can use the service that will stop, then the solution will build service start: < / P> net stop "service name" & msbuild & gt; \ Msbuild.exe & lt; Path & gt; Net Start "Service Name" How to get to the command line, and MSBILD. Your other choice, as mentioned, is to use. There are many of them - the service controller is specific to your needs.

memory - Python deep getsizeof list with contents? -

मुझे आश्चर्य था कि sys.getsizeof (10000 * [x]) 40036 है चाहे x : 0, "a", 1000 * "a", {}। क्या कोई deep_getsizeof है जो ठीक से तत्वों को मानता है जो स्मृति को साझा करता है? (सवाल में इन- मेमोरी डेटाबेस तालिकाओं जैसे सीमा (1000000) -> प्रांत के नाम: सूची या dict?) (मैथ पीपीसी पर पायथन 2.6.4 है।) जोड़ा गया: 10000 * ["मिसिसिपी"] है 10000 पॉइंटर्स को एक "मिसिसिपी" के रूप में, जैसा कि कई लोगों ने बताया है। यह प्रयास करें: nstates = [एक्सरेन्ज (एन)] में जम्मू के लिए [अलबामाटो वाईोमिंग ()] जहां अल्बामाटोवियोंग () -> एक स्ट्रिंग "अलाबामा" "वायोमिंग" एक उचित गहराई के आकार: मुश्किल, ~ जीसी ट्रेसर कुल वीएम से अनुमान Li> अजगर कार्यान्वयन के ज्ञान के अंदर अनुमान करें। 25jan जोड़ा गया: देखिए; मैं इसके साथ बहुत अधिक नहीं खेला है, लेकिन मेरे कुछ सहकर्मियों ने इसे अच्छे परिणामों के साथ मेमोरी प्रोफाइल के लिए उपयोग किया है। दस्तावेज़ीकरण बेहतर हो सकता है, लेकिन बुनियादी अवधारणाओं को समझाने का एक अच्छा

sharepoint 2007 - DNS and Http HOST header issue -

I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise and I am using the Publishing Portal template I am I have a physical server with the same IP address, and I have set up two server domains (server 1.mycorp.com and server2.mycorp.com) to map to the same server / IP address in DNS. My question is how to set up two SharePoint Web sites with the same IP address to serve two domain names separately (with the same port number 80)? My current idea is for two web sites for two web sites with the same port number 80, but with different host headers (setup HTTP host header server1.mycorp.com and server2.mycorp.com) for two SharePoint individually Make web application). Not sure my idea is possible? I suppose it is in ServerFault / P> And you also describe a shared host header concept, when you create your webpage in the SharePoint Central Administrator, you will define a host header, IIS will respond to it or not on the same IP Personally, so i

mysql - SQL Associative Entity question -

I have a SQL question I am working with the following set of table: < There are 5 dishes in the recipe table, there are many ingredients in the ingredient (52), and the ingredient list is a collaborative unit, whose implementation is between many recipes and ingredient RecipeID and IngredientID essential form. From the auto increment ID number is I am trying to write a question that displays all vegetarian dishes (which are recipes '% beef%', '% Pork%' , '% Chicken%', '% lamb%% in any related constituent). The issue I am raising is that the result set is a line instead of one per line, one recipe per line. The query that generated this result set (note that the name of the ingredient table is the content here): select recipe.name AS dish, ingredients.name FROM ( Ingredientlist recipe on recipe mix. Recipe = ingredientlist.recipeid ing ingredientlist contains ingredients. Ingredientid = ingredients.ingredientid) where the ingredients The

PHP: Define function with variable parameter count? -

Is there a way to define a function in PHP, so that you can define a variable amount of parameters? In the language I am more familiar with this: function my function (... left) {/ * left == Paragraph array / return rest. Long; } Myfunction ("foo", "bar"); // returns2; Thanks! Yes to get the argument func_num_args () and func_get_arg () Use: & lt; Php function dynamic_args () {echo "Number arguments:". Func_num_args () "& lt; br / & gt;"; ($ I = 0; $ i & lt; func_num_args (); $ i ++) {echo "argument $ i =" Func_get_arg ($ i) " "; }} Dynamic_arriage ("a", "b", "c", "d", "e"); ? & Gt; You can now use PHP 5.6+: "; Forex Currency ($ ARG $ AG) {echo $ arg " "; }} Dynamic_arriage ("a", "b", "c", "d", "e"); ? & Gt;

Unit Testing ASP.Net MVC Action result with call to Server.UrlDecode -

We are trying to write unit tests in our ASP.NET MVC project. Server.UrlDecode to call in some methods controller This unit is called from the test when a redundant reference fails with the exception. Does anyone have a solution for this? Use the static HttpUtility class and its UrlDecode method. HttpUtility.UrlDecode (mystring);

Apache RequestHeaders for Software-As-a-Service under Rails -

Multiple client examples under one application, under the same application. What do I want to connect to my Apache web server, like the user passing by different URLs like: customer1.myhost.com company1.myhost.com company2.myhost.com etc. What do I want to do to my Apache server Request DirectHeader to identify the requested host on current requests (like trac.myhost.com and), did not direct to a specific list of my Rail applications Pass all requests made to: RequestHeader "INSTANCE_NAME" = customer1 # for customer1.myhost.com Thank you for your help! P: The end goal is to provide software slices as a service, but all of them are managed under client 1 application running. There is no 1 app per customer. By using standard virtualhost configuration, you can: Partitioning Host *: 80 & lt; VirtualHost *: 80 & gt; ServerName app.example.com ServerAlias ​​* .example.com DocumentRoot /web/app.example.com/public & lt; / VirtualHost & gt; This wil

javascript - Optimal pixel drawing speed? -

I am using a canvas object with javascript. Just to do some tests to see how fast I can set the pixel in the Dre loop. On Mac, it works very well in FF, Safari, Chrome. On the windows, I get the effect of flicker on FF and chrome. It seems that the canvas implementation on windows is different from Mac for different browsers? (Make sure if this is not true). This is the original code I am using for drawing (taken from the article below - I have customized the bottom to tighten the draw loop, it looks beautiful now it is sleek) : var canvas = document.getElementById ('myCanvasElt'); Var ctx = canvas.getContext ('2d'); Var canvas data = ctx.getImageData (0, 0, canvas.wind, canvas.height); (Var x = 0; x & lt; canvasData.width; x ++) {for (var y = 0; y & lt; canvasData.height; y ++) {// array var idx = (x + y Pixel index) * canvas Wide) * 4; CanvasData.data [idx + 0] = 0; Canvas data data [IDX + 1] = 255; Canvas data data [IDX + 2] = 0; Canvas data data [

NHibernate Session DI from StructureMap in components -

I know this is part of a horse, but I can not find a satisfactory answer. First let me know, I am not working with a web app, otherwise managing the NH session is quite simple. I have some components of the enterprise, those components have their own service layer which will work on many repositories. For example: Component of Claim Claim Processing Service Claim Collection Billing component Billing service Billing repository Policy element Policy lock service Policy repository I want to write the services for injection with their required treasure (di) in the repositories should be an ihes or similar, to be injected I can under a Issn / Aitiaransakshn this operation. I know of the unit of work patterns and many samples, but none of these DI was displayed. I too have the streak of [threadstatic] because this material can also be used from WCF and I have described enough posts how to do it. I've read about professional conversations, but som

c - Confusing errors with opencv cvLoadImage and netbeans -

I found that opencv library and tried to program a simple imadamdfire with it with the help of c. When I started compiling my code, some errors were found, which are a bit annoying because they do not seem to understand. This is my first time when programming with Netbeing and for the first time I tried to do something else with those basic calculator programs I am here. Below are codes and errors, which the compiler gives: int iscolor = -1; / * Is used to load the image because * / IplImage * image = 0; / * Load Image * / image = cvLoadImage (Const char * 'test.jpg', iscolor); / * Line 34 * / / * Modify image * / ... / * Save image * / int cvSaveImage (Const Charl * 'Modified.jpg', const CvArr * image); / * Line 43 * / / * * end * / compiler errors main.c: function 'main': Main.c: 34: Error: Expected expression before 'const' main.c: 34: 37: Warning: Characters for its type are too long main. C: 34: Error: Very little logic to perform

c# - Check if types are castable / subclasses -

I have two members in the form of wire - and not as a typed example. How can I check that there are two types of characters? Let's say a string is "System.Windows.Forms.Label" and the other is "System.Windows.Forms.Control". How can I check that there is a subclass (or underlying castable) of a second class first? Is it possible to use reflection? Thank you! It may seem that you should use, true if c and Current [example] type represent the same type, or if the current [example] type is inherited in the c hierarchy, or if Current [example] type an interface Is the one which applies c , or if c is a normal type parameter and current [example] type c Indicates one of the obstacles. false If none of these conditions are true , or if c is a null reference ( Nothing < class base {} clause notabase {public stable vendor operator base (NotABase o) {/ console.wrightline (typef.org) .IsAssignableFrom (typeof (NotABase) );;

tsql - SQL help: find rows in one table which don't exist in second table based on values in two columns -

I have two tables I'm trying to find rows in a table that, based on values ​​in two columns, The table does not exist. (I have simplified the table to include only two columns). There is no primary / foreign key between the two tables. Looks simple enough, but now I have a brain block! DDL: Make Table [DBO]. [Table_1] ([first name] [ench] (10) zero, [last name] [nchar] [10] tap) [table]] [table 2] ([first name] [nchar] (10) tap, Last name] [nchar] (10) null) - - Create sample data INSERT [dbo]. [Table_1] (Select [first name], [last name]) N'John, N'Doe 'UNION ALL SELECT N'John', N'Smith 'INSERT IN [DBO] [Table-2] ([First name ], [Last name]) SELECT N'John, N'Doe '- - My unsuccessful attempt is to expect John Smith's return SELECT t * Select from where Table_1 is not available (Select from T2. * Table 2 to T2 WHERE t.firstname & lt;> gt; t2.firstname and t .lastname & lt; & gt; t2.lastname) * T2 on T. Fast

html - Missing top and bottom border in IE7 -

I have a problem with IE7 limits. For some reason the limit is displayed only on left and right side: IE7, incorectly renders: FF renders correctly: < / P> Use of this CSS: . Tags {background: #fff; Border: 1 px solid # D8 DFE; Padding: 5px; Margin-left: 5px; Color: # 3B5998; Font-size: 14px; } What am I doing? Most likely limits are cut from the height of the container to .tags CSS looks ok for .tags a . Note that since and gt; is an inline element, you can not set it to high altitude (unless you set it to display: block ). Due to the different fonts provided by different browsers, the difference in height is most likely. Also see for Safari which gives fonts thick render (more pixels) compared to all other browsers.

vb.net - webservice problem -

Hey all I have a problem in the webservice that I am the consumer takes a string parameter which if I send blank then Does not return anything, but if I remove this string parameter and check the output in the soap UI then it returns precisely. Can anyone help me how I can do it in vb.net that I do not send either this parameter or if I send it, give it the Return Records from the website Thanks < You should be able to exclude outrageous assets by adding [non-activated ()] // # Syntax is VB. Net :-) is not sure about. The web service that you are calling should ignore anything that it does not understand, but if it is not happening, you have given a given property to your class Avoid being serialized, and therefore by using that attribute to be part of the SOAP message

java - Character to String representation -

I need to find special escape java characters (\ n, \ t, \ b, etc.) in the groove of strings and Then what are the special characters in the printed strings, so, when I want to print, I would like to change the character value for "\ n", "\ t" and "\ n" for the string like "\ n" . I did this with a switch statement for all the characters of this type. I wonder if there is a solution in which every one does not include the investigation. A library is not found, but on the other hand, my quick implementation does not look too horrible - I like it on a RegExp too;) public string unscape (strings) {stringbilder result = new Stringbuilder (); For (four c: s.toCharArray ()) {result.append (toLiteral (c)); } Return Results. } Private string tooltail (four c) {switch (c) {case '\ n': return "\\ n"; Case '\ t': return "\\ t"; Case '\ r': return "\\ r"; Case '\ f': return "\\ f&

javascript - InDesign Scripting: Need to export INDD file as INX (INDX) -

I am working with InDesign CS4 and CS3. Both need to export my files to CS2 I want to use an .jsx code snippet to export to INDX, but I can not seem to - so with ExportFormat. "FormatName" JS code It does not seem that Adobe supports exporting javascript from indexes - possibly using a plugin (but it has a lot of overhead for a simple export). In addition, I have to edit the .indx file (which is just XML) to change the file version node, so CS2 could read the exported file. These layouts are very simple, minimal layers, no effects, so I'm not really worried about Downshaw. Am I really getting spoiled is this: How can I export from Indad (CS3 / CS4) using JavaScript scripting? & lt; Doc object & gt; .exportFile (ExportFormat.indesignInterchange, & lt; fileObject & gt;)

What things can make css development faster? -

जिस चीज का मैं उपयोग करता हूं * स्टाइलशीट्स o project.css o o.c.c ओ प्रिंट सीएसएस ओ reset.css उपयोगी सीएसएस वर्गों के रेडीमेड संग्रह क्योंकि यह लाइव पूर्वावलोकन दिखाता है < शैलियों का परीक्षण करने के लिए कोई अन्य युक्तियां?

excel - Sum or Count until? -

Image
I am trying to make my compliance worksheet more efficient. I have a list of controls in sections (and subclasses), and I use the value as a placeholder for control per section (or sub-section) as well as the copy number of exceptions. I use the value "1" if there is valid control, and submit it in the cost per section or sub-section. I often have to add rows under one section, and it throws me yoga formula, these formulas are required to manually update. I have to use a formula to do "up to date" or "up to the count" in the next section. I have attached an example. Is there a way to sum (or calculate) the next formula or non-"1" value? Will it be easy to insert "end" values ​​at the bottom of each of these sections, and count to "end"? This would not be an ideal way of doing such a task (as there would be a good number of unnecessary "ends" between classes), but if there is no better way, then maybe I will

hyperlink - Creating Link with Ruby on Rails -

Obviously, I'm new to this Link me to some models via rail Have to use. I have this code. This is probably not the right syntax: & lt; Li id = "nav_home" & gt; & Lt;% = link_to 'SOMETHING', {: controller = & gt; 'Inventory',: Action => 'Home'}%> & Lt; / Li & gt; This code is the default for creating a text link, but I want to link the link element ideally it will be output: Gt; & Lt; A href = "goes away" & gt; & Lt; / A & gt; & Lt; / Li & gt; Thanks! the full digit of link_to is that it Helps create link for application resources If you want all the & lt; Li & gt; & Lt; A href = "#" & gt; & Lt; / A & gt; & Lt; / Li & gt; , then only & lt; Li & gt; & Lt; A href = "#" & gt; & Lt; / A & gt; & Lt; / Li & gt; There is no need to include --- link_to.

python - Why does this code have the "ball" seem to slide along the edge -

My son asked me if I could write a small program to bounce a ball around the screen, So I have been explained this. Opening the opportunity of a clean father-son, I said, "Yes, there is no problem", so I dug my dragon skills and wrote it. #! / Usr / bin / python # # We have to tell Python what are we going to use? We do this by asking for import # import that we import # import shirms to import random import time # # We are using a screen handling # package called "Curses", so we started the screen # Stdscr = Curses.initscr () # We need to make sure that the type of # key that we type will not be able to spoil the # displayed in #, which we call # curbs.nooecho () Spoiling Are there. # We need to curse that we do not want # when we ask the keys from the # user to wait, if not there, then # we want curses to continue stdscr.nodelay (True) # Something difficult to explain is difficult. Actually this keyboard puts in # mode which allows the curse to do # things

shell - Regex in KornShell -

I'm trying to check if a variable is a number or not, but I can not find it. How do you check regular expressions (rex) in Corniche (KS)? I have tried: if [[$ month = ~ "[0-9] {2}"]] if [[$ month = _ [0] -9] {2} _]] I can not find any documents on that. Any insights? in matter of $ [0-9] [0- 9]) "ok" Echo ;; *) "No";; should work. If you need a full regexp search, you can use egrep in this way: if resonates $ month Do Egrep -q '^ [0- 9] {2} $' then 'echo' is okay "second" no "file

asp.net - How can I make a validation icon appear beside a asp:textbox? -

Using this code, I can get a very cool red written message. & lt; Form id = "frmValidator" verb = "required.aspx" method = "post" runat = "server" & gt; Enter your name: & lt; Asp: text box id = "txtName" runat = "server" /> & Lt; Asp: RequiredFieldValidator id = "valTxtName" ControlToValidate = "txtName" error message = "Please enter your name!" Runat = "server" /> & Lt; Br / & gt; & Lt; ASP: Button ID = "BTN submit" text = "run" = "server" /> & Lt; / Form & gt; Do I have a way for a green icon (I have that picture, so I imagine that I have to give it a reference) fade in existence next to the control? Thanks a bunch :) You can do this & lt;% @page language = "c #" autoinwarewireUP = "true" codefile = "default.aspx.cs" inherits = "_default"%> &

My Grails App Server keeps restarting over and over -

I was making many small changes to my app and at some point the grails app server decides to restart it Need more Somebody saw this crazy behavior. I can not really upload my entire app as an example. I do not know what I did. I was not making any configuration changes or plugin changes. I am using grails 1.2. - As I wrote this email, I tried to do it again and I got a little different behavior. This goes to restart the app and gives the message that it is compiling 1 source file and compiling a message again. Not sure that this is your problem, but I have seen something like when your class names or packages There is a slight disturbance with one of them, that is, you have a package org.grails.plugin in the Org.grails.foo directory. Reasons to be reprocessed for some reasons. To capture some of these errors, I have modified it by printing files that compile my GRAILS_HOME \ scripts_grailsCompile.groovy. To modify: Search ant.groovyc and add list files: "Yes

static libraries - What is the relationship of .lib and .obj to each other and my project in c++? -

How do .lib and .obj files relate to each other? What is their purpose? Is a .lib just a collection of .obj files? If so, then .obj is stored inside .lib to make unnecessary .obj? Typically, .obj files object files . This is a source file in its compiled form, for example, from a main.cpp and foo.cpp to main.obj and Foo.obj will be generated. Then it is the work of linkers to link them together, so that in the main.obj the function can be defined in the foo.obj And vice versa. The linker will produce your binary file, which will be .lib (or .a , or .exe , or .dll``, etc., etc.) Will happen. ). Then in a loose sense, yes, the binary output ( .lib in your case) is linked to .obj once the collection of files If you want to finish the compilation, and use the library, then you only need other programs to link to .lib . .obj is considered intermediate files, and after linking it is not needed.

c - compiling with c89 and c99 does gcc 4.4.2 default to c99? -

I'm using GCC 4.4.2 on Linux I'm thinking that GCC automated Is the default to compile as the latest standard in CMT form? How can I specify if I want to compile with c89 or c99? Many thanks for any advice, C99 not used by default There is a reason to do this because this standard is not yet fully implemented in the compiler, however, I believe that you can set the default mode when compiling GCC, so if the choice of standards is really important to you, then the option Passing is always better. Option -std = gradually c99 and -std = c89 .

Java sockets with thread execution -

I have coded a socket listener, which should listen on ports 80 and 81 and when the data reaches these ports, I advise this listener to concurrently codify these two ports and havas in the following manner. Import java.net. *; Import java.io * *; Import java.text.DateFormat; Import java.text.SimpleDateFormat; Public class Multiple Socket Surveyor executes Runnable {Private Int a; Private server connection; Private string timestamp; Private Ent ID; Public static zero main (string [] args) {// System.out.print ("ip"); // string gh = "12345"; //System.out.println(gh.substring (1,3)); Int port = 80; Int port 1 = 81; Int count = 0; Double A = 234.52121; //System.out.println (bf3.toString ()); {ServerSocket Socket 1 = Try New Server Socket (Port); Server Socket Socket 2 = New Serverset (Port 1); System.out.println ("Start multiple socket server"); Runnable runner = new multiple socket surfer (socket 1, ++ count); Runnable run = new multiple socket surfer (s

Android Run application from last Activity -

I have an application with many actions: One of my activities has the manifest intent filter parameter: Action. Mn and category After the loader loads it, I call Activity B and Finnish (A) since I do not use it. When I run my application, go to Activity A to B and press the Home button, when I launch again from the Applications menu or from the Market app for the past. (Do not press on the Home button for a long time), it starts with an activity and does not save its last activity B. I certainly know that it is possible to relaunch an application from its previous activity (some apps support it from the market) and I think it should be determined by the manifest parameters. But I do not know which one is the one. Does anybody know how to implement it, can my application relaunch my previous activity from B? Thank you Aiyar Although I know that this is an old question, I This issue was struggling with and therefore the answer was not found. So, here's my (very newbi

asp.net mvc - MVCSitemap - maintaining the ID parameter in sub-pages -

I found the following structure on the site: / product / / description / {id} / Description / edit / {ID} This is slightly different from general / products / editing and / products / descriptions, most of the sites are in contact because the edit link is available only on the details page. My problem does not keep the keys in the sitemap, so when I am on the edit page, a Crumble occurs: & lt; A href = "/ product" & gt; Product & lt; / a & gt; & Lt; A href = "/ product / {ID} / description" & gt; Details & lt; / A & gt; & Lt; A href = "/ product / description / editing / {id}" & gt; Edit & lt; / A & gt; Note that there is no key in that 2 link, is this an easy way to fix this? I found that this is an issue with the current version (1.0.1) - as the example The cranterrel does not present properly for the original link with the project ID. More details.

java - Domain Driven Design - How to use value object on the UI -

I was wondering how you use your DDD model within a web application. Eric Evan cargo includes value item within the app. Within the travel itinerary, there is again a collection of value objects. All price objects have to hide the rental ID for the outside world. So while using this domain model, how do I create a web app, where you can click on the cargo travel program, list all the legs and then redirecting to a new "Legs detail" page, Can show details. Generally I will pass LegId to the query field and read it again on the detail page. But since you do not have any ID, how will you do this? The collection is sorted when the index of a leg can change? Passing all the values ​​within the query field, because this value is an object identity? I feel like a step backwards. If there is no ID, then you mention it through the cargo, which has an identity, and therefore it can be linked to the URI / URL, to refer to the specific foot, you have only the index, which

c# - about refresh UI ! -

I have a form that has a tab contrast with 3 tabs. How can I refresh only one tab page in a form with a background worker thread and not refresh the other tabs? Here's how to update the specific tab page in a tab tab: Personal Representative Zero RefreshTabPageDelegate (Int tabpage); Public Static Zero RefreshTabPageThreadSafe (Internet Tabpage) {if (TabControl.InvokerAir) {tabControl.Invoke (New RefreshTabPage Delegate (RefreshTabPaththread), New Object [] {Tab Page}); } Else {if (tabControl.TabPages.Count> tab page) {tabControl.TabPages [tabPage] Refresh (); }}} Call it like this: // // thread-safe equivalent // tab control. Tap page [1]. Refresh (); RefreshTabPageThreadSafe (1);

python - What's the best solution for OpenID with Django? -

कृपया ध्यान दें : यह प्राचीन उत्तर के साथ एक प्राचीन प्रश्न है। लिंक किए गए ऐप्स के अधिकांश अब अनुपयुक्त हैं इन दिनों, ज्यादातर लोगों का उपयोग करने लगते हैं या मैं भावी पीढ़ी के लिए नीचे मूल प्रश्न को नीचे छोड़ दूँगा। कम से कम आधा दर्जन Django ऐप हैं जो कि डीजेन्ग के लिए ओपनआईड प्रमाणीकरण प्रदान करते हैं: < (जो कि ट्विटर और फेसबुक अकाउंट्स के साथ प्रमाणीकरण भी प्रदान करता है) Li> (फेसबुक और ट्विटर प्रमाणीकरण भी है), , साइमन विलिस के मूल डीजेँगो-ओपनआईड का एक कांटा। मैं उनमें से कुछ के साथ चारों ओर खेला है, एक पूर्ण पंजीकरण कार्यप्रवाह से सरल ब्लॉग टिप्पणियों के लिए और अधिक उपयुक्त लगता है साइमन विलिसन ने एक अच्छा प्रभाव बना लिया है, लेकिन जैसा कि वह Djangoland में ट्रेन्डसेटिंग के मामले में सबसे आगे है, मुझे कभी-कभी कठिनाइयों का सामना करना पड़ता है मेरे सिर को उसके रुझान (जैसे डीजेंगो-ओपनआईड में संपूर्ण गतिशील यूआरएलपाटन सिस्टम) के आसपास लपेटते हैं। क्या अधिक है, मैं Google के साथ काम करने के लिए लॉगिन नहीं कर सका। एक अच्छा प्रभाव बना दिया, और इसके स

python - Error setting up Mercurial on Windows Server 2008 -

I want to establish a Mercurial SC server and follow the instructions given here: http / / stackoverflow.com / Questions / 818571 / How-to-setup-merge-end-hg-id-IIS ​​ I have checked all my settings multiple times and after passing the configuration, this error does not pass Can Any advice useful would be helpful "default web site / hg" in Internet application service 7.5 error summary HTTP error 502.2 server error - Bad gateway specified CGI application is not completely misused by the set of HTTP headers C: Headers made this return "File Traceback (most recent last call)"; Module & gt; \ Inetpub \ hgcgi \ hgwebdir.cgi ", line 12 & faster than imports demandimport in lt; demandimport.enable () ImportError: No module detailed InformationModule CgiModule notification called Mrkuriyl" error ExecuteRequestHandler handler Python 2.5 ** error code 0x00000001 ** Requested URL http: // localhost: 80 / Hg / hgwebdir.cgi physical path C: \ Inetpub

css - DIVs after a float left element on explorer appears after that element (not underneath) -

Both boxes are in the side in IE 7, while "B" is below "a" on other browsers (where it should be there)? & lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; .a {float: left; Width: 100px; Height: 50px; Background color: #CCC; } .b {width: 75px; Height: 75px; Background color: # F00; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "a" & gt; A & lt; / Div & gt; & Lt; Div square = "b" & gt; B & lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; Use Try-it Editor for a Live Preview (copy-paste my code): Edit: I want to fix on IE I do so, things like FF, Chrome, Safari, etc. thanks

jquery - Prepend a DIV already hidden so I can animate a slide in -

I use an AJAX call to recover a div, which I want to include in my result DIV . I do not want to add a style display: before it returns, because I use that code somewhere else and I do not want to attach that style. None It is being said that how I am already hidden element so that I can use the Fideine or SlideOf Function. Even I still have: $ ('#come'). ; There is a div with result in singlechart Before I release it alone, before filling it, I can use a fancy automation function to show it ? Add a class to this div and make it CSS . MyPrependDiv {display: none;} or just .ajaxDivHolder div {display: none} After that the jquery fadein or slidein function will overwrite it.

git - Merge an independent project into a greater one without losing history -

I have an independent project, CPAN modules are also generally, a makemaker will be released and Pearl will be in that repository Will integrate that turbal. But sometimes Pearl will change its copy of the makemaker and this change will go to the CPAN repository. Apart from this, the history of Makemaker in Pearl is spread even before the makemaker in Gitob. Instead of having two repositories, I want to be one there. For intelligence, just perl5.git / cpan / extUtils-MakeMaker is committed to direct. This fixes the release integration problem. Problem history is preserved, Code Archaeological importance is very important for makemaker. The MakeMaker has its own history of Perl5.git, which has many history of MakeMaker in the Gitub repository, which is unique and interesting. Two history overlap. The problem is: How do I still merge the Gitb MakeMaker repository in the Perili repository while preserving history for archaeological use? Preferably a solution which is not included

c# - Using Code From Google Code -

Members have come to work on a C # project that has been posted on Google code, The solution provides the project. What are the implications / restrictions in their own project for using those ideas (or in some cases code snippets)? I must say that my colleagues are not trying to snatch someone else's code and call it itself, but the way Google project is structured and resolves a specific problem . I believe they are trying to re-apply their code to the same architecture and use one or two code snippets from the source code. The code itself has not come up with any licenses or conditions. I have not done this before, but do not want to include this work, if I am responsible for the return. I have suggested that some forms of recognition will be added to code pages using any snippet. Thank you If there are no licenses or conditions, Can not use code snippets too Ask the manufacturer of the original work to allow it to be used in your preferred way.

single layer dojo build results in "undefined./resources/blank.gif" for dijit.Menu -

It appears that the DIGIT is dependent on menu dojo / resources / blank.gif When we create dojo and leave it in the release directory we are creating a single layer - our build profile is as follows: Our problem occurs when we try to rename dojo.js and when we do something else, dojo now dojo / resources The directory can not find here is an example: & lt; Html> & lt; Head> & lt; Script type = "text / javascript" src = "dojo_release_140_src / release / dojo / dojo / full-build.js"> & lt; / Script> & lt; Link rel = "stylesheet" type = "text / css" href = "dojo_release_140_src / dijit / themes / dijit.css" /> & lt; Link rel = "stylesheet" type = "text / css" Href = "dojo_release_140_src / dijit / themes / tundra / menu.css" /> & lt; Script type = "text / javascript"> dojo.require ("dijit.menu"); Dojo.ready (function () {pMe

Wordpress, two URLs for the same post -

Is it possible to have two URLs for wordpress.com in the same post? There will be a short URL like http://mydomain.com/28 and another SEO will be friendly: http: //mydomain.com/28-this-is-the-post-about ... thanks In WordPress, all post URLs are on mywordpresshome.com/?p=xx where xx is the post id number. Some others include mod_rewrite WordPress will rewrite a type in the admin section for you - so that you can select either short version or a long time given above. In the admin interface, it will not let you do both. But you can edit mod_rewrite yourself and work effectively to get both patterns - small and long - can get. Here is information about mod_rewrite:

Accessing sequence created in oracle database from php script -

I have created the sequence in the database, such as creating sequential limits from 1; How can I specify an existing value of sec in $ t; & lt ;? Php $ t =? ? & Gt; If you want the next value from the sequence, then you will run the SQL statement below and the Myseq column Undo the results of Choose seq.nextval myseq from dual;

CSS file only loads in IE when fetched via an ASP.NET MVC Controler + Action -

I am serving a site's CSS content through an ASP.NET MVC controller + action. CSS appears to be correctly distributed under "File" wire, but IE will ignore other browsers (Firefox, Opera, Chrome) CSS file and present the page without style. IE8 works perfectly. This is a mandatory code that I am using to return the CSS via the controller and verb: public zero css (string version) {string CssFile = Server.MapPath ("/ site.css"); String cssContents = System.IO.File.ReadAllText (cssFile); Response.Write (cssContents); } Note that the version can be any string. I have tried with stars such as "myversion.css", "1.css", "1234", "arbitrary" etc. All the work in IE8 but not any ideas in any other browser? You must send the appropriate content-type: text / CSS header. Firefox will otherwise ignore the style sheet, and its error console will produce a warning in the console. Probably hard for other Gecko / Web

jquery - Are virtual servers quirky with Windows Server 2003, IIS 6, ASP.NET MVC? -

For several months I used to work on the creation of a web site using ASP.NET MVC with CS #, SQL Server I am here. 2005, ADO Net Entity Framework, JOCAR and some ESRI Web APIs and Geodadabs. The test server is running IIS6 on Windows Server 2003. During this time I have seen some strange things that do a lot of work: Javascript files on the client's server will not be commonly identified as relative paths for scripts or URLs: '/ Instead of installing a jqGrid with the URL of 'Reports.mvc / GridData', I would like to start it in & lt;% = ResolveUrl ("~ / reports.mvc / GridData")%> a scene or application path & lt; Head & gt; The tag of the main page: // Declare a variable to go to the jQuery function which does not look like the // handle URL in the IIS6 at top of top-level pages on MVC. Var _applicationPath = new string (''); // Reset the variable after the loading of the jQuery document / ensure that // sees every jQuery libra

What is the advantage of Themes versus CSS in ASP.NET? -

Since themes in ASP.NET are used for the style elements of your site, I was thinking that instead of themes Why use CSS, or is it common practice to use both of them? If so, when will you choose one against the other and why? I think themes like are unnecessary, so I'm just looking at the explanation if there really is a good reason to use them, or it's an alternative (unnecessary) phase form for styling your site Is a part of the structure. Imagine that you have a site which, for any reason, dozens of asp's of ASP Uses: Calendar Controls To make them style with CSS, you have to set the weight of properties on each one: Destyle and Title Style NextPrevStyle and after that and on ... Any topic By using it you can set all of those properties once, and apply it to each ASP: calendar on site There is only one CSS in the subject, but also how to implement CSS in server control, it is something you can not easily do otherwise. Of course, as Brian Hayden has already sa

debian - How can I see how long statements take to execute on the mysql command line? -

When I execute a statement on the mysql command line, there should always be a way to demonstrate how long the command Started running? It shows that information is executed for every command: mysql> Select MD5 ('dkejde'); + ---------------------------------- + | MD5 ('dkejde') | + ---------------------------------- + | 3960c3b0aa4acc97ca277cdea69775fd | + ---------------------------------- + 1 line set (0.04 seconds) mysql & gt; Show database; ... 38 rows in the set (0.29 seconds) Do not you see this?

what is the Flash event listener when flash is exiting? -

Does anybody know how to become an event listener for a flash? Meaning is done when a tag holder is removed from the flash object so you can not see the flash anymore ... thanks If you mean an incident that is causing flash destruction (web page closure, navigating away from user page, out of browser Get out of the way, or things like that), then there is no help. Flash does not know that he is going to kill, its Can not give a signal about it, and definitely can not do anything to stop / prevent the situation. If you have a problem then your server does not know that the only solution, as far as I know, is a session with the server, when your flash app is flipped / exits And have to wait for the flash to die to finish it. If you need better control over it, then you can include a 'heartbeat' in your app (calling the flash server at regular intervals so that server flash instances can still be known). As far as the elegant / easy solution, I have not seen anybo

javascript - onComplete for Ajax.Request buggy with cached content -

I have an Ajax. The request is in which I show and hide a load animation gif to load and use. The problem is that every 10 clicks fails to hide the load animation, and it just keeps animating there although the AJAX request has returned successfully. I have several element elements, each with its own related load animation and an onclick with Ajax. This request looks like: & lt; Div id = "word_block_ <% = word_obj word% & gt;" class = "word_block" & gt; & Lt;% = image_tag ("ajax-loader_word_block.gif" ,: id = & gt; "load_action_only # {word_obj.word}" ,: style = & gt; 'display: none')% & gt; & Lt; A href = "#" onclick = "request ('/ test / ajax_load', {asynchronous: true, empty: true, onloading: function) (element. Show ('load_animation_ & lt;% = word_obj.word % & Gt; ')}, interactive: function () {Element.hide (' load_animation_ ;)}}}); return; "&am

ruby on rails - Is it possible to have ActiveRecord and DataMapper use the same database in the same app? -

I'm in the process of replacing ActiveRecord with one of my apps with DataMapper, since there is no authentication solution, Compatible with, I'm thinking that I can only use ActiveRecord for user authentication, and then use DataMapper everywhere I want to talk both ORMs with the same database. Is such a thing possible? I appreciate any help. Yes, it is possible to use both on the same database, and even one On the table However, when you use them on the same table, you should know that the caching mechanism used to load the recording can be broken if you want the user to access the datamap , And then access it again with ActiveRecord. For example, you might get a cache record instead of an updated record with a new password. You can control this by using the "force reload" option, or disable caching completely for the activation order. Finally, I request you to submit the Bug Report / Feature Requests for the Certification Solution, which you want to us

ruby on rails - how to omit something from an rspec controller test? -

In my RSPEC controller test, I am trying to investigate a specific action which calls a subfunction. But I do not want to include that subfunction in the exam. (This will increase an error which can not be fixed in my Dev environment) What is the best way to leave this subfunction call with this controller action while I am running a test on it? Thank you. You can assume that the subfunction call before your block calls for RSPC testing such as < / P> "test for main_action" before (: each) controller. Stub! Describe (Sub_action). Return (right) End End Then any examples of your testing will not actually call this sub-auction. Just for words, APC does not always go into development in the testing environment, but I collect what you say.

winapi - How can I get HINSTANCE from a DLL? -

I have created a DLL in the VC ++ as a Windows project DLLMAIN function BOOL APIENTRY DllMain (HMODULE H module, DWORD ul_reason_for_call, LPVOID lpReserved) {Return TRUE; } Now I need DLL's histories, which must be passed in Win32 functions. Is HMODULE and Histin the same? How does a quote from C / C ++ [1] book through windows? > note as it turns , HMODULE s and Hannenshin s are exactly the same thing. If the document indicates that a HMODULE is required for the function, you can pass HINSTANCE and vice versa. There are two data types because 16-bit Windows HMODULE s and Hunstens have identified different things [1] Ritter

c++ - Smallest number that is evenly divisible by all of the numbers from 1 to 20? -

I had this problem [], but very poor programming method, looking at code in C ++, # include & lt; Iostream & gt; using namespace std; // lowest divisble number up to 20 int () {int number = 20, flag = 0; While (flag == 0) {if ((2%) == 0 & amp; amp; & amp; amp; & amp; amp; & amp; amp; amp; amp; amp; amp; amp ; And amp; (number% 4) == 0 & amp; amp; amp; amp; amp;) == 0 & amp; (Number% 6) == 0 & amp; Amp; Amp; (Amp; 7%) == 0 & amp; Amp; Amp; (Number% 8) == 0 & amp; Amp; Amp; Amp; Amp; Amp; Amp; Amp; = 0 & amp; Amp; (Num% 10) == 0 & amp; Amp; Amp; Amp; Amp; (Amp; number% 11) == 0 & amp; (Number% 12) == 0 & amp; Amp; Amp; Amp; Amp; Amp; Amp; Amp; Amp; & Amp;; & Amp; Amp; Amp; Amp; (Number% 14) == 0 & amp; Amp; Amp; Amp; Amp; Amp; (Amp; %% 15) == 0 & amp; (Number% 16) == 0 & amp; (Number% 17) == 0 & amp; & Amp; (Number% 18) == 0 & amp; Amp; Amp; (Number% 19) == 0 & amp; Amp; Amp; Amp; Amp;

c# - Is there hard limit to the number of threads that can exist in a .NET process? -

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

How would I port this delphi 7 prog to .net (C#)? -

The source works like a ton of stuff, such as Uh TBX and some other things < / P> I do not know the language, but I hope I can compile it from Delphi 2009 / 2010.net and then see about porting your IL. (I think for C #) For this reason the argument is that PAINSTUDIO is crashing but the program (Layout, Syntax highlighting, the fact that works with the work from intellisense (clamsense) functions, In the file, etc.) is really easy to use. Can anyone help? This is actually, really bad thoughts first stable , Then the port (if necessary). Porting introduces problems, and this is not good when you can not tell the bug current or new. [edit] I downloaded the source. It is not that I call the modern, well reprinted Delphi code. Long work, no object-orientation is visible, all code in form event handlers. TBX can be found on

java - Running jar, setting classpath -

I have a project that I have created with Maven, I compile a jar with "MVN package", and Now I want to run it without setting some mad squares, because it depends on the spring and half the internet or something is there any way I can run smoothly? Something like "MVN Run" would be very good, or there would be an option to throw all the dependencies in the jar so that I can "java -jar". It would also be fantastic. How do you handle it, and what do you recommend to do? Because exporting a CLASSPATH based on ~ / .m2 would hardly be harmful; -) Cheers Nick - It will automatically create a jar with all your dependencies, and you can set the main square parameter to make it just executable. The document can be confusing, so this is an example of what your POM would look like: & lt; Build & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; ArtifactId & gt; Maven-Assembly-Plugin & lt; / ArtifactId> & L

c++ - cout << order of call to functions it prints? -

निम्न कोड: myQueue.enqueue ('a'); myQueue.enqueue ( 'बी'); Cout & lt; & lt; MyQueue.dequeue () & lt; & lt; myQueue.dequeue (); कंसोल पर "बीए" प्रिंट करता है जबकि: myQueue.enqueue ('a'); myQueue.enqueue ( 'बी'); Cout & lt; & lt; myQueue.dequeue (); Cout & lt; & lt; myQueue.dequeue (); प्रिंट करता है "अब" ऐसा क्यों है? ऐसा लगता है जैसे cout सबसे पहले (सबसे निकटतम;) फ़ंक्शन को सबसे पहले बुला रहा है और इसके रास्ते में काम कर रहा है & lt; & lt; ऑपरेटर, ताकि संकलक पहले dequeue फ़ंक्शन का मूल्यांकन करने के लिए स्वतंत्र है इसकी गारंटी क्या है कि दूसरा dequeue कॉल का परिणाम (जिस क्रम में यह अभिव्यक्ति में प्रकट होता है और यह जरूरी नहीं कि जिस क्रम का मूल्यांकन किया गया है) ' & lt; ' के परिणाम के लिए एड 'पहले (यदि आपको लगता है कि मैं क्या कह रहा हूं)। तो कंपाइलर आपका अनुवाद करने के लिए स्वतंत्र है इनमें से किसी भी तरह के कोड (छद्म मध्यवर्ती सी ++) में को

Greasemonkey Javascript Key Press Help -

That's why I'm currently trying to create a grayscopy script that will allow the user to press the left or right on their keyboard. who are on the go or the next bar on the last comic strip I currently have some code, but it does not give me any results. function keycheck () {var keyID = event.keyCode; Warning (keyid); } Document.onKeyDown = KeyCheck (); This code is for debugging only to see that it is actually being executed, but when I press a key, nothing on the page will be there. I am also testing in Firefox. Then after googling for a good 30 minutes, I do not support onkeydown outside the GreaseMonkey box . I had to use a function called "addEventListener", my last code returns the key pressed on the key on the site: function keycheck (e) {alert (e.keycode); } Window.addEventListener ('keydown', key checking, true);

asp.net mvc - Set new Default Folder / Controller -

Is there a way to set up a new controller other than the home when a condition is met? I want to be able to specify a default controller other than the home when a user is logged in. Before doing this, the user logs in, I want to use the default home controller but once I log in, I want to use the user controller to say. Better yet there is a way that I can use the following; www.mysite.com/home/index was not signed and while logged in, www.mysite.com/griegs < / P> www.mysite.com/griegs Then the route user controller for me, where 'pain' id / username is. You can add global to initial functions ... you can check whether the request has been requested (including the request URL) and redirect to take a different action or as needed.

jquery - UI Dialog Tooltip -

I am looking for a tooltips that work in the UI dialog, but after searching and testing several tooltips (like cluetip ) I did not get any success ..: -s I tested jquery cluetip this tooltip shows when I provide link / IMG to mouseover, but Tooltip showed it behind the UI dialogue. . ??? I think I have searched for a z-index problem, but I could not find the clue. Can anyone tell me that when I take a mouse or a mouse inside a UI dialog, I need to show the tooltip? Thank you! When you apply the KlipTip code, do you specify z-index Cluetip's Are the options? For example, $ ('a.link'). Cluetip ({cluezIndex: '1010'}); JQuery UI dialogue uses a z-index of 1001 by default. So stay Cluetip slightly higher. Hope that works for you.

php - CakePHP fills in the password field on create new user failure -

Image
I'm behaving strangely with CakePHP, new user form in my register. This is a pretty original username, email and password form < / P> "Http://imgur.com/fcpS5.png"> The creation of a new user definitely fails because the password and email fields are empty When form errors are shown, it looks like this: I'm not sure why the password field has magically filled the text, it is not empty Should Ona? Do not name the input field 'password' in the scene, but for example 'new password' . This gives you an opportunity to verify the non-hashed password (length, strength, ..) using callback and it is manually closed later: Save before the ceremony () {Parents :: BeforeSave (); If (isset ($ this-> data [$ this- & gt; name] ['newpassword']) & amp; amp; blank ($ this-> data [$ this- & gt; name] ['Newpassword']) [$ this-> data] ['-' 'password'] = security: hash, true); Back true; }

javascript - How to put a date value as a number in a jscript array instead of using new Date(2008, 1 ,1)? -

I have an array of dates that I can add dates to create types and add their constructor like this Want to: New Date (2008, 1, 1) I was thinking that there is a better way to do this? I'm guessing that I can use the numerical representation of the date and I can put it in the array on that server side and send this array to the customer. I think the array will get smaller with numbers and the result of a fast running JScript on the client I would like to know how is this possible and if it performs better? I am quite new to jscript You can use dateObject .gettime () 1970 To get the number of milliseconds since 1. Use dateObject.setTime (time) for reverse operation. Or no, you need this profile. I think there is no difference.

language agnostic - Any reason to use hex notation for null pointers? -

I am currently improving one part of our COM component which logs all the external calls in one file for points We write (IInterface *) 0x12345678 with the value of the actual code. There is currently no difference for zero pointers - they do not have any problem changing the behavior of 0x0 which is the iMO sub-symmetrical and incompatible. But first I want to know - is there any real advantage in representing the Null Pointer in Hex? Personally, I could print 0x0 in the log file [*] For some days when a person comes to parse the file automatically, then more equality is better than data. I do not find the 0x0 to read, so this is a special case in the author code, and there is a special case in the reader code, which I can think of without being silly. For Grepping the log for NULLs / P> 0x0 is also better for 0 : You have to find out that you're grepping for Should be 0 or something strange. I will not write 0x0 for a pointless pointers constant in

web services - Online JSONP converter/wrapper -

I want to get the source of the file and wrap it inside. For example, I want to retrieve it from a host as a text, I'm not myself, I want to do this by using nothing but client-side javascript. I am looking for an online service which can convert to JSONP. YQL is one of them. http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D "Http://elv1s.ru /x/pets.txt "& amp; Format = json & amp; Callback = hold This works if the URL is not blocked by robots.txt is YQL I can not get it because it was blocked. http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url% 3D "http://userscripts.org /scripts/source/62706.user.js "& amp; Format = JSON and callback = hold "denied": "Robots do not allow crawling for .txt url for domain:" So I'm looking for another solution. I made this shaky and comparisons of YQL Slow in, but it does not care about robot

c# - Find all code that is not protected by a Try Catch -

इस सवाल का पहले से ही एक उत्तर है: < / P> 13 उत्तर मैं एक कोड की समीक्षा कर रहा हूं एक बड़े शेयरपॉइंट प्रोजेक्ट का। एक बात जिसकी मुझे जांच करने की ज़रूरत है वह है कि कोई अनियंत्रित अपवाद नहीं हैं। हम अपवाद "बबल अप" करने की अनुमति देते हैं, इसलिए कई मामलों में यूआई परत (वेब ​​पार्ट) से पहले पकड़ा नहीं जा सकता। क्या सभी विधियों की एक सूची प्राप्त करने का कोई तरीका है जो एक प्रयास पकड़ ब्लॉक के बाहर कोड है? इस SO पोस्ट के उत्तर देखें:

jsp - Call Servlet and invoke Java code from JavaScript along with parameters -

I have a session key that is a JavaScript variable that I received from a REST API call. I have to call my Java code in servlet and pass that key as a parameter In many ways: Use window.location to set a GET request. The warning is that it is synchronous (hence the customer current page Will see changing). window.location = "http://example.com/servlet?key=" + encodeurIComponent before requesting the parameter to the request parameter Note the importance of the built-in encodeurIComponent () function to convert into words. Use form.submit () to fire the GET or POST request. The warning is also that it is synchronous. document.formname .key.value = key; Document.formname.submit (); & lt; Form name = "formname" action = "servlet" method = "post" & gt; & Lt; Input type = "hidden" name = "key" & gt; & Lt; / Form & gt; Alternatively, you can also just set the hidden ar

oracle - Error while shutting down 'Admin Server' from weblogic enterprise management console -

Image
I am using the Weblogic Server em console to restart a webserver, the URL looks like this: I click the server in the EM console, : (Weblogic Server> Control> Shutdown ..) I get this error: 'No machine affiliate with server Is admin server please associate a machine using this weblogic server by using the Weblogic Console. ' It is not able to understand its meaning .... What am I missing here? represents the machine ... well, a physical machine (and you can) associate server i.e. weblogic examples In). This is not a fundamental concept when using node managers. In general, you have machine (s) , server (vs) and domain creation time relationship with their configuration wizard Make them. It is possible to add machine to the console ( environment> machines> new ): But you can not add a running server to the console For the machine , which would be a problem for the administrator the server , I would like to extend my existing domain