Posts

Showing posts from May, 2014

java - bidirectional hibernate relationship -

to hibernate with me and use the following institutions have a web application I'm doing wrong? ... @Entity implements public class registration BaseEntity {... @OneToMany (cascade = {} CascadeType.PERSIST, mappedBy = "registration", bringing = FetchType. Aajiaar) Private List & the lift; Product & gt; Ordered products = new array list & lieutenant; Ordered Products & gt; (); ... public list & lt; Ordered product & gt; GetOrderedProducts () {Product ordered back; } Public Zero Set-up Products (List; Ordering Products & gt; Products ordered) {this.orderedProducts = orderedProducts; } ... ... @Entity implements public square OrderedProduct BaseEntity {... @ManyToOne @JoinColumn (name = "registration_id", null = true ) Private Registration Registration; ... public registration getRegistration () {return registration; } Public Zero Set Registration (Registration Registration) {this.registration = Registration; } ... When I

sql - Problem with QSqlTableModel -- no automatic updates -

After setting up the table model in QT 4.4: QSqlTableModel * sqlmodel = new QSqlTableModel (); Sqlmodel- & gt; Settable ("name"); Sqlmodel- & gt; SetEditStrategy (QSqlTableModel :: OnFieldChange); Sqlmodel- & gt; Selection (); Sqlmodel- & gt; RemoveColumn (0); TableView-> SetModel (sqlmodel); TableView-> Show (); The content is displayed properly, but editing is not possible, error: QSqlQuery :: value: is not located on a valid record I can confirm that the bug is actually ok as you report it to 4.5.1 Documentation, such as, still gives an incorrect example (i.e., deleted columns calls). Around the one hand I before the update sign, which is incorrect with QSqlRecord, which can be updated in DB and possibly fixing the idea of ​​fixing it. Along, but I can not get it to work - a call for the methods of that record parameter is crashing my toy-app with a BusError. So I left that idea and there is no doubt what is the correct way

vim - vi search copy paste search copy -

I was just thinking that anyone could help how to do the following using vi. I is a text file and it can be in some way beginning of the text file: --something1.something2-- --anotherThing1.something2--text End of file: If I want to take this line and it matches any of the first occurrence of [a-za-z0-9] If you try to change it through search of the thing, then copy the buffer and add it first on the same line before the first row - start of the text file: --something1.something2. Something1- --- anotherThing1.something2.anotherThing1-- End of the text file: Is there a sixth order to do this? Cheers Ben :% s / - \ ([a] -zA-Z0- 9] * \). \. (. * \) - / - \ 1. \ 2 \ / P> :% s / - \ ([a-zA-Z0- 9] * \). \ (. * \) - / - \ 1. \ 2. \ 1 - / g will be generated: - something1.something2.something1 From ------ > This is when you want to copy the first word after 'till first'. 'Add more'. ' Re-comments: Someone has mentioned that th

java - Artifactory: Auto-generate archetype catalog? -

क्या कृत्रिम अंग स्वयं को एक कोड के लिए archetype-catalog.xml फ़ाइल उत्पन्न करने का एक तरीका है ? इस समय, मैं इसे हाथ से बनाए रखता हूं और इसे HTTP PUT द्वारा प्रकाशित करता हूं। हालांकि यह हमारे छोटे आंतरिक भंडार के लिए संभव है, यह स्वचालित रूप से करने के लिए अच्छा होगा, और मुझे आश्चर्य होता है कि यह बॉक्स के बाहर नहीं होता है। कोई भी विचार? धन्यवाद! टिप्पणी के अनुसार संपादित क्या आप उपयोग कर रहे हैं कृत्रिम संस्करण का संस्करण? इसके अनुसार, संस्करण 1.3 में इसे HTTP PUT का उपयोग किया जाता है, जबकि 2.0 में यह सूची प्रॉक्सोडेड रिपॉजिटरीज को लेता है। मैंने सुझाव दिया था कि आप कलात्मक के लिए एक टिकट खोलें- यह एक ओपन सोर्स प्रोजेक्ट है आखिरकार ...

ssms - Printing SQL Server Diagrams (from SQL Server Management Studio Express) -

I have trouble printing my pictures, I think blocking part of the diagram, etc. I have tried many different computers, printers, and databases, so there seems to be a problem with SSMS Express. Is this just this way? Is there a good success, or does a third party use the product (preferably free or inexpensive) that can integrate with SQL Server integrally? Within the diagram, make a clip diagram on the clipboard from the Edit menu , And then paste a new Microsoft Word document from there, you want to scale the image. If you have the ability to print printer 11 x 17 paper, then it works well. I am able to print schema on the same page with 30 tables, and table objects are very real size.

html - How can I make <li> elements flow left-to-right instead of top-to-bottom? -

Here's my & lt; Li & gt; I want them to appear from left to right rather than from top to bottom. & lt; Div class = "nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "test" & gt; Trial & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "test" & gt; Trial & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "test" & gt; Trial & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "test" & gt; Trial & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "test" & gt; Trial & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; How can I do this? Edit : The difference between the color of each Li element and its Bach color and an element and the limitation of

c# - ASP .NET - How to refresh a databound DataList? -

I have a datalist that is bound to a SQLDataSource. The SQLDataSource table contains a stored procedure value containing the maximum Indentation value in the table. On the same page as the datelast I have a description view that is used to add new records to the table. The problem is that after adding a new record to the table, the Datalist value shows the previous indentity value. How can I update the data list automatically? Call calllist call for example: Load information as info (view sender, see details, unlinked eventArgs e) {//}. Refresh the DataList control after inserting a new record in the Detail View Control. YourDataList.DataBind (); } and in markup: & lt; Asp: DetailsView id = "YourDetailsView" runat = "server" DataSourceID = "YourSQLDataSourceID" OnItemInserted = "YourDetailsView_ItemInserted" />

perl - Parsing comma separated lines and calculating sum -

So my problem can basically be written in pseudo-code: Split = Using the first value =, give this value to the next line = check the values ​​after it, if not, then loop up to the end of the file, collect all the values, that match the line numbers and Use, get the last 2 column value sum, for the set given with equal key = value pair I have a dataset as follows: 3 = 5002, 0 = 10002, 5 = 1, 4 = 1, 7 = 1, 8 = 1, 9 = 0, 1 = 14002, 6 = 5, 200, 100 3 = 5002, 0 = 10002, 5 = 0, 4 = 1, 7 = 0, 8 = 0, 9 = 1, 1 = 14002, 6 = 5, 300, 10 = 3, 5, 0 = 10001, 5 = 0, 4 = 0, 7 = 0, 8 = 0, 9 = 0, 1 = 14001, 6 = 3, 1000, 80 3 = 5001, 0 = 10004, 5 = 1, 4 = 1, 7 = 2, 8 = 2, 9 = 1, 1 = 14001, 6 = 3, 10000, 1200 3 = 5003, 0 = 10004, 5 = 2, 4 = 0, 7 = 2, 8 = 2, 9 = 1, 1 = 14003, 6 = 8, 5000, 500 3 = 5003, 0 = 10004, 5 = 3, 4 = 1, 7 = 2, 8 = 1, 9 = 0 , 1 = 14003, 6 = 8, 1000, 7 What do I need to do, say all for 3, which are equal and the sum of the last 2 columns and the value of that value For

c# - Stored Procedure that handles 1 or 2 or 3 value -

I am using a stored procedure to run some queries in my database. The value is taken from a query string, which was then passed to the stored procedure. The thing is, the user can select more than 1 option which generates 3 or more query strings. For example, I know how to take value from the query, but I do that, stored procedures overload the values ​​1 or 2 or 3, like the way it accepts Like set value {this.value = val; } SetValue (double val) {this.value = (int) val} setValue (String val) {try {this.value = Integer.parseInt (val)} catch (Exception e) {println (e.getMessage ()); Return 0; }} This is a copy of the stored procedure .. Go to the ALTER process [dbo]. [GetSealRecordID] as set ANSI_NULLS QUOTED_IDENTIFIER set (@TRANSFER_ID integer) - Select declare variables specific "FGFSTRANSFERS" "consider", "FGFSTRANSFERS" "AMOUNT_TRANSFER", "FGFSTRANSFERS" "DATE", "FGFSTRANSFERS" "TRANSFER_I

python - DJANGO - How do you access the current model instance from inside a form -

वर्ग EditAdminForm (forms.ModelForm): password = username.CharField (विजेट = forms.TextInput ()) पासवर्ड = Forms.CharField (विजेट = forms.PasswordInput ()) password_confirm = forms.CharField (विजेट = forms.PasswordInput (), प्रारंभिक = ???) आप देख सकते हैं कि मैं क्या ' यहाँ करने की कोशिश कर रहा हूँ मैं कैसे pasword_confirm फ़ील्ड (जो कि मॉडल का हिस्सा नहीं है) के पूर्व-पॉपुलेट करने के बारे में कैसे जाना होगा मैं बहुत उलझन में हूं। आप इस उदाहरण को प्रपत्र घोषणा में नहीं देख सकते, क्योंकि वहाँ नहीं है हालांकि, यदि आप जो करना चाहते हैं, तो डायनामिक प्रारंभिक डेटा सेट किया जाता है, तो इस पर initial पैरामीटर के साथ ऐसा करें: < प्री> form = EditAdminForm (initial = {'password': 'abcdef'})

.net - Sort XML with C# Before Write -

I have an XML document that I am composed below from loop and XML author to C #. It works fine in the present, but I wanted to implement the solution where XML is written every time, it automatically attempts to use the Drive Start area. I know people say that you should do it in XSLT, but there is a hard time finding a good example for me to follow, is there any experience of any person using it? Any help is very appreciative. XmlDocument doc = New XmlDocument (); XML Element RN = Dock Crelet Element ("drive layout"); XML Element DN = Faucet; XmlAttribute xa, xa1, xa2, xa3, xa4, xa5, xa6; Doc.AppendChild (RN); Foreign (grid item item in it. File systemgrid.items) {dn = doc.CreateElement ("drive"); Xa = doc.CreateAttribute ("drivetime"); Xa.Value = item ["DriveTime"]. ToString (); Xa1 = doc.CreateAttribute ("DriveStart"); Xa1.Value = Item ["Drive Start"]. Toasting (); Xa2 = doc.CreateAttribute ("drive-end"); X

objective c - iPhone: Weird space at the top of UINavigationController -

I have a strange problem in connecting a UI controller in my iPhone application. I add the controller as follows: myViewController * viewController = [[myViewController alloc] initWithNibName: @ "myView" bundle: zero]; MyNavigationViewController * Navigation Controller = [[myNavigationViewController alloc] initWithRootViewController: viewController]; UIView * Final View = myNavigationViewController.view; [Self.view addSubview: finalView]; Everyone seems to work as a plan, I get a strange white space at the top of my idea between the status bar and the UIAV Control Controller title bar. I searched online but do not really know what to find. Has anyone else had this problem? Can you direct me towards some assistance? Thanks in advance. View the answer in this question:

perl - How can I import global variables from a base module? -

I created a module Foo :: prototype with the global variable $ A and $ B. I want the package Foo :: Bar which uses the Foo :: prototype as a base to import global variables $ A and $ B I do not understand how to do this. I understand that using global variables is not a good practice in general, but in this situation I want to use them. The code looks like this: Package Foo: prototype; My ($ A, $ B); Our @EXPORT = qw ($ A $ B); Sub New {[...] $ A = 1; $ B = 2; } 1; Package Fu: Bar; Use Base Fu: Prototype QW ($ A $ B); Sub-trial {print $ A, "\ n"; Print $ B, "\ n"; } 1; # Test.pl Foo: Bar- & gt; new (); Foo: Bar-> testing (); Edit: I want to write Compact Foo :: Prototype sub class as possible for other people. Instead of writing $ self-> {A} -> foo (), I want to let people write $ a-> foo (). T.pm: Package T; Strict use; Use warnings; Use base 'exporter'; Our ($ A, $ B); Our @EXPORT = qw ($ A $ B); Sub new {$ A = 1

windows explorer - How to add a shortcut to the 'SendTo' menu that will be available to all users -

You can add a new item to the 'Send To' Windows Explorer menu by creating an application shortcut in the SendTo folder sent in. User's profile folder eg: \ documents and settings \ user name \ sender \ but how can you add a 'send-to' menu item which can be added to all users without adding it to the profile folder of every user Will be available for? I found a page that suggested that you can create a SendTo folder in C: \ Documents and Settings \ All Users but this article was targeted in Windows 2000 and does not work in Windows XP. I do not think AllUsers works for SendTo but you This default user can be added to the SendTo folder, then any new user will receive a copy of the shortcut in their SendTo folder. If you want to add existing users to it, you can send shortcuts to individual users' SendTo folders

Objective-C newbie: Does anyone know of diagrams that explain class, objects and methods? -

As you have guessed from the question - I OK at the beginning Obj- I am hoping that a person is aware of some pictures depicting the relationship between classes, objects and methods - and they are ready to share. The problem is that I do not fully understand this by looking at the code in a textbook - at least for me Thanks for reading! Regards, Spencer. Squares are similar to classes in any language, they description . Objects are like nouns, they are example of a square. That is, if you had a description of a generic book and you did that If a thesaurus is created based on the details, then the thesaurus object will be. Ways are less or less work if things are nouns, then the messages are verbs . << p> [ScienceBook getTableOfContents]; // It would like to return a table of contents Here, a getTableOfContents message is being sent to the object ScienceBook . So now, the science book will theoretically search, format and return a tabl

database design for capturing trending keyword -

I need some help on capturing the keyword transging and creating a database design for scoring. What I have so far: keyword_id int auto_increment Keywords varchar Description tinytext date_trade_started date time mention_count int ranking int < Strong> day_a_tap from day to day day_a_top int and what needs to be considered I do not think this design can take data on loyalty you want Are. Note (keyword ID, referrer source, date time) This will be more beneficial to keep the data historically You can use it to compile summary summaries for the query, such as ranking per day, where there is a record per day and presents the summation of calculation, ranking, movement from the previous day. Date | Keyword ID | Rank | Movement "25/6/08" | 576426 | 17 | -3 "26/6/08" | 576426 | 15 | 2 This gives you enough to calculate other things, as if the trend starts or between any two time period, the day at the top None of t

iphone - Is there a better way to put a bunch of stuff in NSUserDefaults? -

I'm confused about the NSUserDefaults on the iPhone. C / ASM has a learning experience from background and objective content. I am currently using NSUserDefaults to store some strings (for the name in the highest table). I want to start implementing a "save game" feature so that the user gets a call or he can get it out of the game for a moment, then they can come back. To recover the game, they have received some BOOL flag, some int s to store some required variables, but I'm stuck in an array that needs to be stored. I have a 50 element array of unsigned char s, I can move it to int s if it makes things easier, but I'm not looking at this setBool (already doing) to work with setBool , setFloat (again, before To work with), go to setInteger , and setObject . Obviously, I can declare the key to every element of the array and they have setInteger but this is actually the best way to deal with this. Instead of an array of unsigned

dotnetopenauth - Why DotnetOpenID have not implemented the logout from Openid Provider? -

संभव डुप्लिकेट: डॉटनेट ओपनआईड ने ओपनिड प्रदाता से लॉगआउट को लागू क्यों नहीं किया है? वहां वर्तमान संस्करण DotNetOpenId-2.5.5.9153 और DotNetOpenAuth-3.1.0.9122 है क्या वे अगले संस्करण में लॉगआउट को लागू करने की योजना बना रहे हैं ? मैं कहूंगा कि यह आपके या उससे कम एक डुप्लिकेट है मैंने वहां एक जवाब पोस्ट किया है संक्षेप में, DotNetOpenId एकल साइन आउट को लागू नहीं करता है क्योंकि ओपनआईडी स्पेक यह नहीं समझाता कि यह कैसे किया जाएगा। कोई ओपनआईडी लाइब्रेरी एकल-साइन आउट प्रदान करता है क्योंकि यह अस्तित्व में नहीं है। उदाहरण के लिए, एक उपयोगकर्ता शायद आरपी, ओपी, और अन्य सभी आरपी से साइन आउट करना चाहता है जो उसके दौरान हस्ताक्षर किए गए थे सत्र जब वह कंप्यूटर से दूर कदम रखता है लेकिन एक ही उपयोगकर्ता के संकेत से एक बार में इतनी सारी वेब साइटों के साथ इंटरैक्ट कैसे किया जाए, अभी तक पूरी तरह से पता नहीं चला है।

How to copy multiple files from server to local hard disk in one http request using C++? -

How to copy a group of local hard disk files from a server machine through a C + + web application in a request Are you It's like downloading large files from your local machine to a server, I think in java that you can do it via zip inputstream and ggip intestream. Is it possible to get it completely through server side code? Or will the client running on the local machine need to make a bulk copy of files? Say you have a Java servlet / ISAPI extension that accepts form requests On receipt of such request, using server-side code, zlib, all files include a zip file and zip file, content-type, content-length, last-modified, etc. Send set as HTTP response. And note: If you are using ISAPI on IIS6 and above, you add this content to the IIS kernel mode response cache.

c# - Throttling MSMQ messages / prioritising messages -

I'm not sure how to describe it best, or the best title, so bear with me! I will stop HTTP requests for many websites and APIs, which are using MSMQ to queue a large number of commands. To stop these services (and to stay within some pre-defined request limits) I need to make sure that the work to kill the same domain is executed only after the last request. I was using a database to queue functions, and could do a query to do this, but we quickly switched that number of work (how many tables on the table Deadlock). Do anyone have any suggestions on which approach we can take? I have considered moving objects from Qi, unless you can not be executed - but I am aware that there is nothing to stop the order in the queue which means that we will find different You can take thousands for the same domain before. Domain. Thank you! You can change the 'outgrew' relational database to MSMQ? It is like 'publicity' from the college's kindergarten! There is

math - How do you calculate the height of a triangle given only the hypotenuse and the ratio of the other two sides? -

There are two types of TV: Traditional aspect ratio of 4: 3 and 16: 9 with wide screen. I am trying to write a function which diagonals of 4: 3 TV with equal height of 16: 9 TV diagonal. I know that I can use Pythagoras' theorem if I know two sides, but I only know diagonals and ratios. I have written a work that works by guessing, but I was wondering if there is a better way. My attempt is yet to be: // C # public static void Main () {/ * * h = height * w = width * d = diagonal * / Const double maxguess = 40.0; Const Double Double Accuracy = 0.0001; Const Double Target = 21.5; Double ratio 4by 3 = 4.0 / 3.0; Double ratio 16by 9 = 16.0 / 9.0; For (double H = 1; H & LT; magus; H + = accuracy) {double W = H * ratio 16B 9; Double D = Math.Sqrt (Math.Pow (H, 2.0) + Math.Pow (w, 2.0)); If (D> = Target) {Double H1 = H; Double w1 = h1 * ratio 4by3; Double D1 = monastery Class R (Math Pow (h1, 2.0) + Math Po (w1, 2.0)); Console.light line ("4: 3 width: {0: 0.00} heig

gcc - GNU C++ error messages -

Is there a comprehensive list of error / warning messages for the G ++ compiler available online? Seeing something similar to the MSDN documentation which tells what each message means and maybe there is some sample code that shows a situation that causes such error. I have seen, but I do not even see a simple calculation of all possible messages. Unfortunately, there is no such list, only GCC source code defines the message. Unfortunately, there is no such list, only the GCC source code defines the message. Some of those messages are used by GCC testuites, so you can find some examples there, if you download the GCC source code, of course, they are functional and regression testing for GCC , Not as a documentation for the user.

c# - ODP.net Oracle Decimal Number precision problem when filling a dataset. Exception: Arithmetic operation resulted in an overflow -

I am working in c # .2 (Visual Studio 2005 SP1) Filling a dataset < / Strong> With the result from a table * from an Oracle10g database, the .net frame, IDE and database no can be changed on this client site. I'm connecting to the ODP.net Provider DLL version 2.102.2.20 When I fill orders I get an exception: An overflow as a result of arithmetic operation In addition, if I use Visual Studio Designer Show) If I try to view the offending column in the table, then I'll call for each row in this table get. This code works perfectly if my query selects other columns with the integer to leave other columns in this column. When I look at it from TED in the database, the column looks ok, the data looks like: < 919.742866695572 me Exact is required because it is necessary for a Monte Carlo simulation. If the adapter uses a detarder to fill the datagram instead of using the data and calls the DataRender.Gate value, I get the same error, but if I

What is the simplest way to get all the parents of a record using the id / parent_id model in mysql/php? -

I find the easiest way to recover all parental elements from the database using the closest list / single table inheritance. I'm model ( id, parent_id ). My selection currently looks like this: $ sql = "SELECT e.id, TIME_FORMAT (E.start_time, '% H:% i') AS Start_time, $ title AS title, $ description AS description, $ type AS type, $ place_name AS place_name, p.parent_id as place_parent_id, p.city AS photosBC, p.country AS Place_country as the event EE LEFT JOIN place P Leave p.id = e.place_id in the form event_type as et at et.id = e.event_type_id WHERE e.day_id = '$ day_id' and e.private_flag = 0 order by start_time "; Each event is linked to location , and each location can be a child of another Is location (up to 5 levels) Is it possible to do the same selection with mysql? At the moment, I am thinking that this can be a different function, returning place_parent_X elements to $ events ending through the array, but Not sure h

c# - "Nested foreach" vs "lambda/linq query" performance(LINQ-to-Objects) -

Why should you use "nested forehack" or "lambda / linux query" in the display point? You can type clear code, and then find the benchmark and profile any performance issues If you have performance problems in do , you can experiment with a different code to decide whether it is fast or not (measuring all the time as possible as realistic data ) And then make a decision call whether the performance improves the readability hit. Is necessary. A direct foreach approach will be faster than LINQ in many cases. For example, consider: var query = From the element in the list where element.x> 2 where element.Y & lt; Select 2 elements. X + element why; Foreach (var value in query) {Console.WriteLine (value); } Now there are two where section and a select section, so every last object has to go through three walks . (Apparently where two cases can be added in this case, but I am making a general point.) Now compare it directly to the code:

php - To use sleep() or cron job -

I have this mail script which I have to run a few times, to start the script I will use the cron, but the script Run 2 or 3 times (separated with one hour). What is the best way to do this? To use the sleep command at the end of the script, or for an hour, put some code, so that the script creates a new cron job to run automatically after one hour? Thanks Unless the script runs in memory, there is no cost savings By that time, you can do better by adding it to the cron. Hours, as required 0 0-2 * * * /usr/local/bin/mail-script.php You - Syntax You can select several hours by using, or comma syntax: 0,2,3,3 * * * /usr/local/bin/mail-script.php < / Pre> If it needs to maintain some type of state, use a temporary file to keep a saved state. Do: & gt; Man 5 Crontab To see if your * nicks handles the above cases. Finally, as long as you do not know the script only 2-3 times, you're doing better that it argues that PHP script "to run Or

Good design and good user interface ASP.NET Ajax applications? -

I like to get inspiration from using web applications that make good use of new applications. At this time I have a ASP.NET based I would like to check web applications which make heavy use of Ajax & amp; Ajax Toolkit for business apps (data-bound controls like grid) I saw some apps in CodePlax, but did not see anything good. Any recommendations? An app with primary source I do not think your search is easily being done. AJAX Toolkit lacks the javascript plugins and other popular frameworks clever. If you are looking to be affected, you may want to look elsewhere than Toolkit. I'm not sure what form it is made on, but recently I have been very impressed by the UI. They cut it, it's easy to use and elegant.

Java: Can (new Random()).nextInt(5) always return the same number? -

Sometimes this piece of code always gives the same number (and sometimes it works fine): < / P> (new random ()). NextInt (5) I doubt where the problem is - it probably always creates a new rand with the same seed, then what would be the best solution: < Li> Use Math.random () * 5 (It seems that it is used internally by using a static version) to create a fixed war for random (Random) and instead use it Does Or something else? I do not need some fantasy, which seems random. In addition to this it would be useful if someone can tell why the original code sometimes works and sometimes it does not happen. Thank you. javadoc.util.Random for Java is obvious: If two instances of random are created with the same seed, and if the same order of call method is done for each, they will generate and return the same series of numbers. The default constructor is also clear: creates a new random number generator. This creator has set the value of the rando

mxml - Importing a SWC for a Flex Project in Flash Develop -

I have just started using FlashPep for Flex app (I was using it for pure projects before ). I can not understand how to import files and in this way I have usually included them in the library. In this case I have included Flexible SVC and FlexMDISYC. Both are in my libral folder and both have been right clicked and added to the library. Auto does not work completely, so I think I'm missing a step. This is my code: ` ` I also & lt; Mx: script & gt; & Lt ;! [CDATA [import flexmdi.containers.MDICanvas; Import flexmdi.containers.MDIWindow; ]] & Gt; & Lt; / Mx: script & gt; I also get a strange error that Flexmidi says: MDICanvas are not bound. I can be away from here because we are talking about Flash developer, but I Be sure that you need to add a namespace to MDICNews in your MXML root tag, such as: Import statements only apply to .as files or & lt; Mx: script & gt; Sections of your MXL code Duplication of death, b

android - Understanding a DDMS Log -

Can someone please explain the understanding of Lockat from the Android Force shutdown. This accident occurs when thanks The exception is SuperNotCalledException . This happens when, in different callbacks, you do not chain upwards in Superclass. onPause () is one of those callbacks. Therefore, if your looks like onPause () : @ override public wide on pause () {finish}; } that this will increase the exception. It should look like this: Prevent Public Zero on @Override () {super.onPause (); End(); }

Wait for connections to close before restoring SQL Server database -

I have a web application that uses two databases. DB1 users can create, read, update, delete their CRUD ) Operate. Database DB2 is a readable database on a separate server that I use for reporting purposes. Every hour I save my DB1 transaction logs and I have a job on DB2 which keeps them on DB2 so that it can keep it up-to-date. The problem I am facing is that if users run reports on DB2 (often happens) they are disconnected from SQL Server because I use exclusive access to the database get. Time required to restore every log categories between 1-4 minutes How do I implement it, it is called wait-n-restore functionality where my job is waiting for user queries Doing the database before entering specific log and restore the log? Both run SQL Server 2008 64 bit Standard Edition The bulk of my problem was using the pool connection In this case even when no reports were executed the connections were kept alive. I have modified my connection string to set the connection poolin

linux - Java JComboBox Custom Renderer and GTK -

I have a list of customer objects, for which I have to choose from jesimbobox. What I read is that I want to apply a custom renderer to the fields I want to display in the list I want to make a formatted entry like my JComboBox: + ---------------------------------------------- + | Customer Name - Contact - City, State V. + =============================================== | Customer # 2 Name - Contact - City, State | | Customer # 3 Name - Contact - City, State | | Customer # 4 Name - Contact - City, State | | Customer # 5 Name - Contact - City, State | + ---------------------------------------------- + I used this code: public class CustomerListCellRenderer extends DefaultListCellRenderer { @Override public component getListCellRendererComponent (JList list, object value , Int index, boolean isSelected, boolean cellHasFocus) {super.getListCellRendererComponent (list, value, index, isSelected, cellHasFocus); If (value example customers) {customer C = (customer) value; S

sql - Incorrect syntax near the keyword 'table' -

I'm getting this error what I'm doing is trying to get data from a table and a db and Keep it in another DB and table. The tables are not exactly the same, I am using a FETCH cursor, so I get the first line from the DB1 table and then keep each column value in the declared variable. Then I run an assembly statement in db2 table and get the next value. All of these are working properly because it runs properly, but in the end I get this error, Wrong syntax near the keyword 'table'. In the entire transaction details, an attempt / catch with the error of expression in the Cat block, apart from this, I do not know what is the reason for it. Here is the code added to prevent additional result set at SET NOCOUNT - Interfering with the SELECT statement. Set nosenate on; TRY begin transaction sets ITENDITY column off --TURN identity_insert [dB] start [dbo] [TEST] all CONSTRAINTS table --TURN [dB] change [dbo] [TEST] NOCHECK barrier All -.... Insert statement here @

asp.net mvc - Where do I put common Methods in MVC application -

I used the static methods in the App_Code folder, this folder is no longer available in the MVC template. I use these static methods on the whole site. How is this done in MVC, what is the best practice? How do you call common ways? Usually I have one or more class library projects which organize supportive classes in the same solution. Are there. Create your classes in the class library project, then refer to the project's DLL in your MVC web application. The exception will be any model, real or only-view. These models can be put in the folder.

osx - How does one build an x64 assembly program in OS X? -

I'm trying to make Hello World in my x64 assembly on Leopard MacBook Pro. It's ok, but I get this error when I try to link it: ld: symbol dyld_stub_binding_helper is not defined (usually in crt1.o/dylib1.o/bundle1.o) inferred architecture x86_64 I have loaded it with ld -o hello64 ​​hello64.o -lc My Ensemble is Yasm. Edit: As far as I can tell, unlike 32-bit code, you have to supply the stub assistant yourself, and because I do not know how to get 64-bit stub helper Works as I would like, Bastian said and linked to GCC because it includes its own stub assistant. Doh! If my assembly entry entry _main instead of _start -Text "itemprop =" text "> Just handle the linker invitation to the GCC. Something like this: GCC Hello 64.O-o Hello 64 < / Pre> Your assembly code probably needs to define a main sign, or perhaps start . [edit] The reason is that I am suggesting that various platforms Linking the binker in different w

java - Would one have to know the machine architecture to write code? -

Assume I'm doing Java or Python or C ++ programming for a simple problem, a TCP / UDP echo Can the creation of the server or the fabric of the calculation have to disturb me about the architecture details, that is, if it is 32 or 64-bit? IMHO, Unless I am doing some programming with very low-level content, then I do not want to bother if 32 or 64 bit is going to mistake me? Or am i right Correct for most situations Runtime / The language / compiler will be an abstract of those details, unless you are working directly with the word size or binary at a lower level. Even the byteorder is explained by the NIC / Network Stack in the kernel. This is translated for you. When programming sockets in C, you sometimes have to deal with the byte sequence for the network while sending data ... but it is not related to 32 or 64 bit differences. When dealing with the blobs of binary data, they can create problems from one architecture to another (for example, form an overlay in

c# - Datalist line break when records with same ID detected -

It is difficult to clarify, but I will try, I have a philanthropist who is populated by a call in a stored procedure . The thing is, when the lines with identical identities came to know that I want to break it first and add it under the first record .... Picture -> Stack [23,45,566,676,787,878 , 23, 23] (these represent ID records) 23 23 23 45 and so on. Currently adding a line to a different data item as shown below. 23 Thank you in advance There will be an idea line during the database, check the current value, the value of the previous, and the next value. If you have a match between the current and the last, then you have a group, then check the next line to come (from your original data source) and if it is different, then enter your empty line.

php - Doctrine Named Queries: Specifing limit on query call -

चलिए इस तरह से कुछ सोचें: class MyTable Doctrine_Table {सार्वजनिक फ़ंक्शन निर्माण () {$ Q = Doctrine_Query :: create () -> ('MyTable t') - & gt; आदेश बाय ('t.creationDate DESC') - & gt; सीमा (5); $ This- & gt; जोड़ें नोमेडिकल ('top5', $ q); }} बाद में मैं इस तरह से कुछ कर सकता हूँ: $ top5 = सिद्धांत :: getTable ('MyTable') - & gt; खोजें ('top5 '); क्या कोई तरीका है जब मैं नामित क्वेरी का इस्तेमाल करते समय सीमा निर्धारित कर सकता हूं, और तब परिभाषित करते समय नहीं? मुझे वास्तव में ऐसा कुछ करना अच्छा लगेगा: $ top5 = सिद्धांत :: मिलते-टाइम ('मैटेबल') - & gt; खोजें ('टॉपएक्स', 5); या $ top5 = सिद्धांत :: getTable ('MyTable') - & gt; खोजें ('topX', सरणी ('सीमा' = & gt ; 5)); अग्रिम में thx! : -) कुछ भी आपको अपनी पद्धति या फ़ंक्शन लिखने से रोकता है जो नामित असीमित क्वेरी को क्लोन करता है क्लोन पर एक सीमा और फिर परिणाम निकालते हैं।

iis - ASP.NET site move to IIS7 results in gibberish characters in page output -

I have an asp.net site that was running fine on Windows Server 2003 / IIS6. I transferred it to Windows Server 2008 / IIS 7 and ASPX page output now includes Gibbertext Text. For example: p Most pages display properly, but here and there it is very easy I checked the event log and some Not even there. Any thoughts that are going on here? How can I fix this? I have noticed that when I add multiple servers, then this problem appears. Enter the statement in the aspx code: The above .inc files contain only html, it appears that files should have a significant length to cause error. Here is the sample HTML I'm testing: & lt; Div class = "logo" & gt; & Lt; A href = "/" & gt; & Lt; Img src = "/ logo.png" alt = "logo" width = "31" height = "29" square = "logo" /> & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "logo" & gt; & Lt; A

Eclipse metrics plugin suggestion -

I am looking for a tool to give me some code metrics (total LOOS, LOC / class, external reference / square, And so on ...). Does anyone know the good Eclipse plugin that can provide me some code metrics? is called a matrix edit: I put a small program for this screenshot 3.3.1.1 to take: Edit 2 Thanks

web applications - Cross Domain Authentication -

How am I curious about cross domain certification? for example. If you need to sign in to Google.com to sign in to Orkut.com, then the authentication is done on Google.com and when this cookie sets, my question is how can Orkut.com read this cookie or Does not give any other information? What could possibly be wrong? This link may be useful. Keep in mind, orkut is one of Google's services. OpenID is another solution that is actually used in the SO.

Connecting to a webserver with android -

I have to connect to a webserver from android and I have to use a webpage from webservice and webserver. Can anybody help me? Please step by step with some code snippets because I'm new to Android and I do not know anything in connecting to the webserver. You can use it: http client httpclient = New DefaultHttpClient (); HttpGet httpGet = New HTTPAgreement (Yuri); HttpResponse httpResponse = httpClient.execute (httpGet); BufferedReader Reader = New BufferedReader (New InputStreamReader (httpResponse.getEntity (.). GetContent ())); // User Reader to read the response. Close (); The response is clearly dependent on the format (e.g., etc.)

unit testing - What can be alternative metrics to code coverage? -

Code coverage is probably the most controversial code metric. Some say that you have to go to 80% code coverage, others say it Is superficial and does not say anything about the quality of your test (see.) People measure everything, they need comparisons, benchmarks, etc. Project teams require an indicator, how good they are to test. So what are the options for code coverage? What would be better metrics than "I touched this code of this code"? What are the alternatives? If you are looking for some useful metrics that give you the quality (or lack thereof) of your code, , You should look at the following metrics: Chakrabarti complexity This is a complex method of method Generally 10 And less good, 11-25 is bad, high is terrible. The nesting depth This one is Generally 4 and less good, 5-8 is bad, the high is terrible. Relational suction This is a measurement of how to relate to a package or assembly. Relational integration is a part of a relative met

sqlite - Write Insert Query in SQLite3 in iPhone -

Hi, the table contains data to be inserted if the record does not already exist Ex: IF does not exist (table Select the WHERE id from ID = _Id) then - enter TBL (.....) This can be easily done using the procedure stored in MySQL but I have a single query statement I want to do the same thing in SQLite. Please include help in category masters (class ID, category text) % D, '% @' where it does not exist (range 1 to class masters where range id =% d) Its work is for me :)

Am I stupid for not using custom packages in Flex 3 (flash)? -

When I create a new class file in Flex 3, I am warned that I should not use the default package . I personally did not use the package before, but I think the package would not be easy because I was able to use all my classes without importing all kinds of packages. I want to be remembered, I have to remember names and their purpose. My question is, will my problems cause future problems due to my behavior. And if so, why? Are not you alone here? If you do not like making too many packages, then just create one and you have default now The package is in. Why might you need a package? How to organize your code Just like you are in your "wild" classes, When they are out of the package and then make them "domestic" and they can not harm anyone. If you do not want to share your code, there is still a reason for using the package, because in time your code becomes more complex and you want some means to organize it into some logical structure.

compiler construction - Using ML in "Real-World" Applications -

I like to learn mL in college. I find functional programming often a fresh, great way to write some algorithms. I've heard about F # and played something with it. However, I have written some interesting works in ML and I would like to integrate as libraries which I can use in other applications. Normally I paste my tasks in the SMLNG interpreter. Is there any way I can compile them? You have to use something. It compiles Java byte code or you can use the compiler to compile .NET IL.

.net - Where does Subversion save to? -

I am learning to work with SVN using Visual Studio.NET. Everything is fine and all works but I could not understand: I have the original source code c: \ source I made a repository c: \ repo (svn : // localhost) I have my solution on svn: // localhost / myProject / trunk VS. I have been added to the repository using the net I checked a copy of the work from the repository / trunk C: \ work copy I used to copy my work to myfile.cs Has made some changes and committed no error. I updated on the latest, check out etc. And it's all good. However, I checked the same file from c: \ source \ myfile.cs from Windows Explorer and this is an older version. No modifications were made in this. I thought the original trunk version would change from working? Am I missing something here? Or do I consider source code management all wrong? Your working copy, of course, C: \ work copy ; Any changes you make to the copy of the work will appear in those files. When you commit , yo

sql server - T-SQL 1=1 Performance Hit -

For my SQL queries, I usually do the following for the selection statement: < Code> SELECT. .. from table where 1 = 1 and T. [Column1] = @tur1 and t. [Column2] = @ the ultimate 2 If I need to add / delete it will make it easier Additional information: Additional information: / Strong> Examples for sheep communicators and others who do not use. Suppose that the above query, I need to change Perpet 1 which can not be included in the query: with 1 = 1: ... WHERE 1 = 1 & lt; - No change - and T. [Column1] = @ param1 & lt; - changed and t [Column2] = @ Ultimate 2 & lt; - No changes ... without 1 = 1: ... WHERE and lieutenant; - No change - [column1] = @ param1 & lt; - changed {and removed} t. [Column2] = @ Ultimate 2 & lt; - Change ... It seems that if you use the profiler And look, you will end by seeing that the Optimizer will ignore that time otherwise, in the grand scheme of things, there will probably not be much in t

ruby on rails - How do I collect and combine multiple arrays for calculation? -

मैं names_scope से विशिष्ट कॉलम के लिए मानों को जमा कर रहा हूं: a = Survey_job.survey_responses.collect (और: base_pay) यह मुझे उदाहरण के लिए एक संख्यात्मक सरणी देता है (1,2,3,4,5)। तब मैं इस सरणी को विभिन्न कार्यों में पारित कर सकता हूं, जो मैंने सेट, सेट की औसत, मध्य, मानक विचलन को प्राप्त करने के लिए बनाई है। यह सब ठीक काम करता है, लेकिन अब मुझे समान प्रकार की गणना करने के लिए डेटा के कई स्तंभों को जोड़ना शुरू करना होगा। मुझे निम्नानुसार तीन फ़ील्ड का विवरण एकत्र करना होगा: survey_job.survey_responses.collect (& amp;: base_pay) survey_job.survey_responses.collect (& amp;: bonus_pay) survey_job.survey_responses.collect (& amp;: overtime_pay) यह इच्छा मुझे 3 एरे दें मुझे तब इन्हें एक ही सरणी में जोड़कर जोड़ना होगा - प्रत्येक एकरे सरणी से पहला परिणाम जोड़ने के लिए, प्रत्येक सरणी से पहला परिणाम जोड़ने के लिए, प्रत्येक सरणी से दूसरा परिणाम और इसी तरह मेरे पास योग की एक सरणी है। मैं एक ऐसी विधि कैसे बनाऊं जो इस सभी डेटा को एक साथ एकत्रित करेगी और मैं इसे कैस

Getting the component tree from UIViewRoot with Facelets as view -

I have an application that was coded with JSP and now we are in the process of migrating facelets to pages Are there. One component of our Phage Leistner is manipulating the tree because it needs to find some components in the tree and remove some of its values. But with Facelt, UIViewRoot does not return any child. How do I get the same type of functionality with Facet? The elements are trying to manipulate the tree. () In the first step, the request page has to retrieve the scene, that is, the component tree. Therefore, after the completion of this phase you can find only the component tree. Use phaseEvent.getPhaseId () to see which phase you are working in.

Combine Directory and File Name in PHP ( equivalent of Path.Combine in .Net) -

This should be a simple question, but I just can not remember the related API. A search on Google with the word "does not produce any results". So I think I am doing a service by asking myself and the programming community by asking this question. How to combine directories and file names to create full file paths in PHP? Assume that the directory name is " D: \ setup program ", and the file name is " mj.txt ". Method should be returned to me, Windows " D: \ Setup program \ mj.txt ". Definitely the method should return the correct file path to Linux or other OS. The related function in the net, but in PHP, I did not remember it, even if I had already seen it. $ filepath = $ path DIRECTORY_SEPARATOR $ file; Although it does not matter in new versions of PHP how slash is, so it is OK to always use forward slash. By using the perfect full path, you will remove things like this extra unnecessary slash and solve references like

css - Fade out div over the whole site to (simulate) do a preloader with (Mootools) Jquery -

I have created a page, 3 columns, tableless and CSS (as it should be). Sometimes the browser does not do anything at its place. So I created a fake preloader in a DIV id = "preloader" and created a material wrapper in another div id = "container". First I made the entire outer constellation (not there, as opposed to visibility, which only "hides"). css #container {display: none} #preloader {display: block} Again, with Mittul, I Changed its values ​​when the entire document was loaded, so when the container was visible (block) it is fully prepared to be skinned by CSS (images and everything included). <$$ ('div # preloader') setstyle ('display', 'none'); $$ ('Div # container'). SetStyle ('Display', 'Block');}); So good yet, but as I could not feel happy there, I wanted to add some spices to the solution. I decided to use a fade out effect for the preloader div, or fade in effect for the co

c# - DataGridView selected cell style -

मैं एक DataGridView (winforms) पर "चयन शैली" कैसे बदल सकता हूँ? आप आसानी से ग्रिड के डिफ़ॉल्टसेल स्टाइल के चयनित बक्सेर और चयनित फ़ोरवे के मान निर्दिष्ट करके सेल्क्टेड सेल के फ़ॉयरक्लोर और बैककलर को बदल सकते हैं। यदि आपको और स्टाइल करने की ज़रूरत है तो आपको चयन चैंज इवेंट संभाल करने की आवश्यकता है: संपादित करें: (अन्य कोड नमूने में त्रुटियाँ थीं, कई चयनित कक्षों के लिए समायोजन [पूर्णोवा चयन में]) System.Drawing.Font का उपयोग कर; निजी शून्य डेटाग्रिडवॉइस_सॉइंट चेंजेड (ऑब्जेक्ट प्रेषक, इवेंटएआरजीएस ई) {foreach (डेटाग्रिड दृश्य सेल में ((डेटाग्रीड दृश्य) प्रेषक)। चयनित सेल) {cell.Style = new DataGridViewCellStyle () {BackColor = Color.White, फ़ॉन्ट = नया फ़ॉन्ट ("Tahoma", 8F), ForeColor = SystemColors.WindowText, SelectionBackColor = Color.Red, SelectionForeColor = SystemColors.HighlightText}; }}

.net - Resize an Image and keeping Metadata/property item -

.NET libraries work excellent in resizing images that look great: Bitmap NewImage = New Bitmap (Nudity, NewHead); Using (graphics gr = graphics.frame image (new image)) {gr.InterolationMode = InterpolationMode.HighQualityBilinear; Gr.DrawImage (srcImage, new rectangle (0, 0, NewWind, NewHead)); } An issue that is running with the solutions I have seen online erases embedded metadata within these images. Is there a way to move this data into a new image? Or use the original image and continue this data? Ideally I would like to maintain this solution only in Microsoft's NIT libraries if possible. Replace all through the image. Property items and add them to the new image How you can copy metadata using this method, get sample.

Programmatically Enable Smart Tag in Outlook 2007 -

Outlook has a "global label" label, labeled "Smart Tags with", which enables the full list of smart tags to be enabled / Under the identifier, device / option / mail format / editor option / proofing / auto correction option / smart tag I can enable individual identifiers in the program, but the question of million dollar is that the programmatic form Area "How to Enable / be disabled globally" box? I have not taken any benefit from Registry and Group Policy. Any help is appreciated thanks! John. If the value in the registry should be stored, then I do the following: Unfortunately (or good luck) ; ;-)) I do not have Outlook 2007, so I can not test it on my own, but I want to know whether the registry value is, SysInternals Suite when you check / save that global option Thus, you can get reasonable prices for change.

Can I change the context of javascript "this"? -

var यूआई $ अनुबंध $ ddlForm_change = function () {// 'यह' वर्तमान में ड्रॉप डाउन है कि आग इवेंट // मेरा प्रश्न यह है कि मैं संदर्भ को बदल सकता हूं, इसलिए "यह" किसी अन्य वस्तु का प्रतिनिधित्व करता है? यह = कुछ ऑब्जेक्ट; // फिर नए "यह" this.someMethod (someParam) पर तरीकों को कॉल करें; }; क्या यह संभव है? धन्यवाद, ~ सैन डिएगो में सीके नहीं, यह संभव नहीं है। आप यह ( method.apply () / method.call () का उपयोग करके एक विधि को कॉल कर सकते हैं ) लेकिन आप कीवर्ड, यह । पुनः नहीं दे सकते हैं।

client side xslt with javascript in firefox -

I am using client-side xslt to convert to xml file. There are some obstacles but I have been able to pass it all but leaving it. The problem is that when I have a simple XML file & lt; ? XML version = "1.0" encoding = "ISO-8859-1"? & Gt; & Lt ;? Xml-stylesheet type = "text / xsl" href = ". JsInFf.xsl"? & Gt; & Lt; Root & gt; Hello & lt; / Root & gt; And replace it with XHTML as a simple XSL The first warning will pop up with Firefox instead of "[Object]" as "[Object XMLDocument]", which means the IE and Safari I collect That's the JavaScript HTML document (or not the HTML domain) in Firefox, not sure what the word is). The second warning in Firefox would be "undefined" but in IE and Safari it is "[object]. So there is no document in Firefox format or document, etc. Tincture etc. I know that some javascript still Work, such as document.getElementById, but I&

c++ - Why do I get a "member function not present" error when evaluting expressions on the VC++ debugger? -

मेरे पास एक स्थिर विधि है, MyClass :: myMethod () पर अन्य डीएलएल < कोड> MyDll.dll । मेरे कोड में, मैं इस पद्धति को कॉल करता हूं, और यह संकलन करता है और ठीक चलता है। लेकिन जब मैं MyClass :: myMethod () की कोशिश करता हूँ तत्काल विंडो में (या घड़ी खिड़की) , मुझे हमेशा मिलता है: MyClass :: myMethod () CXX0052: त्रुटि: सदस्या फ़ंक्शन मौजूद नहीं है ऐसा क्यों है? अपडेट : मुझे पता चला है कि जब मैं इसका उपयोग करता हूं: {, MyDLL} MyClass :: myMethod () मुझे वाकई यकीन नहीं है कि इसकी आवश्यकता क्यों है, हालांकि, इसलिए मैं थोड़ा इंतजार करने जा रहा हूं कि क्या कोई अच्छा स्पष्टीकरण है। अपडेट 2 : मुझे अधिक जानकारी देने के लिए कहा गया था। दुर्भाग्य से, जो मैंने वर्णित किया है लगभग सभी मेरे पास हैं यह तीसरे पक्ष के कोड में है। विधि, जो एक अलग डीएलएल पर मौजूद है, को इस तरह घोषित किया जाता है: वर्ग MyClass {public: // ... _declspec (dllimport) स्थैतिक const char * getDirectory (शून्य); } और इसे इस तरह लागू किया जाता है: MyClass :: getDirectory () मेरे पास नहीं

css - How do I update the text of a div inside of a table/form in Jquery inside of a dialog box? -

I have a device inside the table which is inside a form that I would like to update & lt; Form id = "login_form" method = "post" action = "#" onsubmit = "return false;" & Gt; & Lt; Table & gt; & Lt; Tr & gt; & Lt; Td> Username & lt; / Td> & Lt; Td> & Lt; Input type = "text" name = "name" id = "login_name" & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; Tr & gt; & Lt; Td> Password & lt; / Td> & Lt; Td> & Lt; Input type = "password" name = "password" id = "login_password" & gt; & Lt; / Td> & Lt; / Tr & gt; & Lt; Tr & gt; & Lt; Td> & Lt; Input type = "checkbox" name = "keep_logged" id = "login_keep" checked & gt; & Lt; / Td> & Lt; Td> Keep me logged in on this computer & lt; / Td> & Lt; / TR &

iphone - How can you search in a UIWebView -

I have UIWebView in which HTML data is loaded? Is it possible to use javascript to search text in this view? Thanks for any answers You can use javascript to search the text. To run Javascript, you will use it: [webView stringByEvaluatingJavaScriptFromString: @ "/ * script here * /"]; I would then use the JavaScript scroll because it is difficult to calculate how the "pixel" position inside the webview is out of the pixel space. The following link can be useful to help you write Javascript: and try the code of the prototype (I'm new to that Do not link here: www.prototypejs.org/api/element/scroll)

php - Can a SHA-1 hash be purely numeric? -

Is there any chance that the SHA-1 hash may be completely numeric, or the algorithm ensures that at least Less character of an alphabet? Edit: I represent it in 16 bases, as is the string given by PHP's sha1 () function. The constraints of a hex are numbers with a number of 160-bit numbers (10/16) 40 or 6.84227766 × 10 -9

php - Unix timestamp to days, hours, minutes -

तो, मेरे पास एक उपयोगकर्ता नाम है जो कि last_active नामक उपयोगकर्ता तालिका में है, जो हर बार एक उपयोगकर्ता को पुनः लोड करता है एक पृष्ठ। यह यूनिक्स टाइमस्टैम्प में संग्रहीत है मैं इसे इस तरह से आउटपुट करना चाहूंगा: अंतिम ऑनलाइन: 4 घ 18 घंटे 1 9 पहले ऐसा कैसे होगा? क्या आप इसे पीएचपी की तारीख () के साथ कर सकते हैं? धन्यवाद। आप यदि आप चाहें तो इसे सीधे MySQL में प्राप्त कर सकते हैं: select date_format (from_unixtime (current_timestamp - last_timestamp), 'अंतिम ऑनलाइन:% ई दिन,% k घंटे,% i मिनट,% s सेकंड्स पहले । '); ( current_timestamp को unix_timestamp (अब ()) से बदला जा सकता है अगर आप चाहते हैं कि यह गणना की जगह पर है) आपको एक विशिष्ट तिथि के आधार पर कस्टम स्ट्रिंग की अनुमति देता है। यदि आप दो तारीखों के बीच अंतर के साथ अपनी तारीख को पॉप्युलेट करते हैं, तो यह आपके काम के लिए काम करेगा। उपरोक्त समाधान केवल एक महीने के भीतर काम करेगा; यदि आप वर्ष के दिन चाहते हैं, तो% j का उपयोग करें फ़ंक्शन के लिए दस्तावेज़ अधिक दिखाता है।

python - Can you access a subbed-classed model from within the super-class model in the Django ORM? -

Say that I inherited the model's legacy as defined below. ArticleBase (Models.Model): title = models.CharField () Author = models.CharField () Category Review: Rating = models.IntegerField () Class News (ArticleBase) : Source = models.CharField () If I need a list of all the articles, even if (in this case the order has been ordered in both the review and the news), I ArticleBase Once I can run a query, I have a paragraph base record to determine whether it asks both questions of a model. Received related to a review or news records, foreign keys which have recorded? I am assuming that all paragraph examples are examples of article subsection subclasses. A solution is to collect subclass names in ArticleBase and some methods that return the subclass or subclass objects based on that information. Since multi-table succession defines an asset at the original frequency to reach a child's example, it is all very straight forward. Paragraph Base (models.Model) from the