Posts

Showing posts from January, 2012

.net - FitNesse App.Config -

I have a hard time understanding: If my applications and fixtures are in C: \ Projects \ Apes and Fatenas are running from: \ Projects \ Sandbox \ phantens I'm assuming that C: \ mypath \ myapp.exe.config c: \ Projects \ App [MyFixtureAssmbly] will be .config , But I do not know what c: \ myfolder \ mysuite.config.xml is? I have tried to keep it with the .xml in Runner.exe.config, fit.dll.config in the Final SHRP folder, in those name, FitNesse root folder, in the app directory. Can not understand where it puts it, so it will load my app.config? In the example c: \ myfolder \ mysuite.config.xml is a suite configuration file (see). This is optional and provides a way to extract the 'techno' configuration information from the test pages. If you are not using one, you can still use the -a switch.

sql server - T-SQL's equivalent of Oracle's %TYPE operator? -

While writing a process in PL / SQL, I can declare a parameter type as myTable.myColumn% TYPE So that when I say the type of MyColumn varchar2 (20) varchar2 (50) i do not change the parameter type of process i t is something similar in SQL? No, there is no equivalent in T-SQL.

c# - Validate date without using validators? -

Is there a way to see that a date is valid without using valid assumptions? I can not use assumptions in this example and this is a long story that is too much to type, but it has to do with nested controls that can not be found in javascript. But before I put a date, I want to make sure that it is valid before the inclusion. Any ideas? I am using a mask and this date may look like something like this "03 / __ / ____" and this can be an integrated problem. What are you looking for? dated DT; Bool isValid = Date Time Tri ("03 / __ / ____", out DT); // false return

Export MS Access tables through VBA to an excel spreadsheet in same directory -

I have two tables in my access database that I want to be able to export to Excel I am opening the table and then exporting File-> ... and then selecting the file name I can select the format. However, in this way the user has to actually type the name, so there is room to give the wrong name to the file or to incorrect format or to save as a wrong place. Also, two tables are to be exported into two separate workbooks What I want to be able to do is make a button on a form that automatically gets a table In a worksheet and in another worksheet , both of which are the same Excel workbook if it is not possible to put them in the same workbook, is. I want them to be automatically exported in the same directory so that my access database can be saved. If you know how to do this, then an extra money might possibly be to customize the name to include the date. In this way, there will be historical exports in the directory. Any advice? "itemprop =" text &q

Efficient storage/retrieval method for replayable comet style applications (Google Wave, Etherpad) -

I'm thinking of a web application with the same type of multi-user, automatic saving, infinite undo / redo Look at Wave and Etherpad (although on a small scale and on the userbase) Before I went back and before recycling the wheel, something that is already a piece of technology or library, Or even just a design pattern. I do not know that the best stack overflow question is because the "right" answer is not possible, but my Google-Fu has failed me and I just like a reading list! Usually I will be developing under Python / Django but this firms are not just a preference :) The club sandwich looks like a real technological: The web page service and session management server code in the server and server Server control conflict code server control conflict resolution code in OLTP and comet INSTANT Messaging Server In the client REM version control database Internals Version control conflict in the client Resolution code (Inward bytes works

jquery - IE8 breaks Google CDN in Intranet app? -

I am using IE8 with the intranet app in the local intranet zone and have found that this Google cDN hosted jQuery Refuses to load! Do I need to make some changes? Shows a tooltip by rotating my mouse on the lock icon located in the bottom right corner of the window, "No item is being blocked on this page". Help? Thank you Probably, the "local intranet" area does not allow script files outside the area. It may be one of the situations in which it only makes more sense to host jQuery locally - after all, an intranet (hopefully!) A situation in which this host There is a possibility to do this, Google handles it.

c# - string user function -

How can I add a custom function to a string type > string testing = "hello"; Test.userFn ("world"); Public string userFn (strng str) {return "" + str; } namespace extension rule (public Static class) MyExtensions {public static string userFn (this string str) {return "" + str; }}}

datetime - Python fraction of seconds -

What is the best way to handle each other in Python? The Dataim library is excellent, but as far as I can tell it can not handle fewer seconds than any unit. In the datetime module, the smallest resolution of the microscope occurs in day-time, time and timetable sections: & gt; & Gt; & Gt; From date time import date times, timelatta & gt; & Gt; & Gt; Now = datetime.now ()> gt; & Gt; & Gt; Now datetime.datetime (2009, 12, 4, 23, 3, 27, 343000) & gt; & Gt; & Gt; Now. If you want to display a day-long period with partial seconds, then just enter a decimal point and bar the zero behind: < Code> & gt; & Gt; & Gt; Now. Strftime ("% Y-% m-% d% H:% M:% S.% f"). Rstrip ('0') '2009-12-04 23: 03: 27.343' Datetime and time classes only accept integer inputs and the hours, minutes and seconds are from 0 to 59 Must be Between and Microseconds should be between 0 and 99 99 99. However, the Time

.net - Capture a part of a string that does not match another group (C# Regex) -

I am working on a project for which "formatting tags" parsing is required. Using a tag like this: & lt; B & gt; Text & lt; / B & gt; , it modifies the way the text is displayed (that tag makes the text bold). You can have 4 identifiers ( b bold, i for italic, u , and s < / Code> for Strikeout). For example: & lt; Bi & gt; Some & lt; / B & gt; Text & lt; / I & gt; Here some text will be generated. To parse these tags, I'm trying to capture a text before using a regx, capture the first opening tag, and then any tag and its attached text Right now, I have this: & lt; (? & Lt; open & gt; [bius] {1,4}) (? & Lt; text & gt; +?) & Lt; / (? & Lt; close & gt; [bias] {1,4}) This corresponds to a tag, its attached text and a similar completion tag. Right now, I repeat through every single character and try to match the position in the string, like at the end of the string, for

acc - How to use parameterized queries in vb.net? -

How to use parameterized query in vb.net? Because I always wanted to create a program that could read an MS Access database and display results based on your query. "post-text" itemprop = "text"> Make the desired query using question marks instead of your criteria dim sql = " * Where do the names * =? By the students? Then create an OleDbCommand object and set the appropriate value (command text and so on) then add the parameter to the command object. In the end, execute it as to what type of ExecuteReader you need.

Why does my Perl backticks complain "sh: line 1: any: command not found"? -

I have never programmed before but it is necessary to write a very easy webpad for work. I am trying to work this DIG query: dig @ 8.8.8.8 + nocomments + nostats + noquestion + nocmd google.com Any : $ dig = `/ usr / bin / dig \ 8.8.8.8 + nocomments + nostats + noquestion + nocmd $ query Any `; Except that it does not recognize "any" at the end of the excavation and gives me: sh: line1: any: command No What stupid simple thing am I doing wrong? I bet that there is a new line in $ query The shell helps to see any as a new command. Try chomp $ query; Before removing the new line, more than your system call.

vim - Mapping a sequence of keystrokes to command-line commands -

क्या कमांड-लाइन कॉमांड (एक : < / Code> एक्स मोड में) हां, और इसे सहज रूप से कहा जाता है: नक्शा उदाहरण: : नक्शा foo: गूंजती "बार" & lt; CR & gt; नहीं जब सम्मिलित मोड में आप कुंजी दबाएंगे तो foo vim "बार" के साथ प्रतिक्रिया देगा। अधिक जानकारी के लिए : help: map में टाइप करें। आप अपनी .vimrc फ़ाइल में डिफ़ॉल्ट रूप से लोड करने वाले मैपिंग को रख सकते हैं। आप स्वतंत्र रूप से विभिन्न मोडों के लिए कुंजीस्ट्रोक को मैप कर सकते हैं, जैसे कि सम्मिलित मोड (: imap) और विज़ुअल मोड (: vmap)। यदि आप कमान मोड के लिए एक उपनाम का उपयोग करना चाहते हैं (लेकिन यह हो सकता है): अपडेट सम्मिलित मोड के लिए भी किया जाता है), आप संक्षिप्ताक्षर का उपयोग करना चाहेंगे। कमांड मोड के संक्षिप्त नाम को परिभाषित करने के लिए, इसका प्रयोग करें: ca (जो कि: के लिए एक लघुकथा है: cabbrev)। देखिए vim help : help: ca और अधिक जानकारी : help: abbreviations । ध्यान दें कि मानचित्र के विपरीत, संक्षिप्ताक्षर vim कमांड्स द्वारा प्रतिस्थापित नहीं किए जाते हैं लेकिन शाब्द

iphone - how to add a subtext to a table cell? -

I have created a table view that shows database fields. I is going to add sub-labels and subtext to each cell, which I can display in other database fields. Need help. So you want the main text and a subtitle. Like music app? If you want, you want to set the style of the table view to "UITableViewCellStyleSubtitle" and then how to set the main label; cellName.textLabel.text = @ "Label Text" and to set the subtitle; cellName.detailTextLabel.text = @ "subtitle lesson"

php - incremental update with symfony/propel -

I would like to execute a query in Symphony using an option ORM: < Code> ADS set hits = hits + 1 where to update ID = 10; I know that the Propellal API can set me a first set value for a given column of a given record, but I must first set the column value before issuing an update query Do not want to retrieve Thank you. itemprop = "text"> this ad is Symfony 1.3 / 1.4: In AdsPeer is: public static function incrementHits ($ id) {$ con = propel :: getConnection (AdsPeer :: Database_Name); $ Query = 'Update Hit SET Hit + 1WHERE id =' $ Id; SfContext :: getInstance () - & gt; GetLogger () - & gt; Crit ($ query); $ Stmt = $ con- & gt; Ready ($ query); $ $ = $ Stmt-> carry about (); } To use: AdsPeer :: incrementHits ($ id); HH Mike

mask in enum [C++] -

I'm playing with bits this time and I'm looking at Microsoft code for IO states and looking for something like this : enum _Iostate {// stream states for static _Statmask = 0x17}; // what is this mask ??? Constant const_Iostate goodbit = (_Iostate) 0x0; Static const _Iostate eofbit = (_Iostate) 0x1; Static const _Iostate failbit = (_Iostate) 0x2; Static const_Iostate badbit = (_Iostate) 0x4; Constant const _Iostate _Hardfail = (_Iostate) 0x10; I wonder why this is a mask because the code works without this mask and the values ​​remain the same as the mask. Thank you. ensures that the correct size of _Iostate enum is defined later To hold all the bit constant, and their combination.

c# - Programmatically load a LINQ2SQL partial class -

I am working on a project that allows a user to add time to the task. In the Task I have an area for the estimated period, and I think that the time added in the tenure can get me the reality. I have a LINQ2SQL class for work, as well as additional working classes (by partial use). I still have the following for my query: Public IQueryable & lt; Work & gt; GetTasks (Task Controller Criteria) {// set option curious load child object (s) var opts = new System.Data.Linq.DataLoadOptions (); Opts.LoadWith & lt; Work & gt; (Line = & gt; line.product); Opts.LoadWith & lt; Work & gt; (Line = & gt; line.assiditusurizer); Opts.LoadWith & lt; Work & gt; (Line = & gt; line customers); Opts.LoadWith & lt; Work & gt; (Line = & gt; line.stage); Db.LoadOptions = opts; IQueryable & LT; Tasks & gt; Query = db Task; If (criteria. Project ID. (.have) query = query. Where (line = & gt; line.product id == criteria.product id); If

c++ - How can I #include a file whose name is built up from a macro? -

On a cross-platform project, I want to include a # header file named after the platform, There is a #define macro for. For example, #define PLATFORM win32 I want #include For "engine \ win32 \ devices_win32.h" #define PLATFORM linux I want to #include "engine \ linux \ devices_linux.h" I'm going with Richard Pennington's answer, zero to one line code - It works for me! #define PLATFORM Linux #define xstr (x) #x #define str (x) xstr (x) #define sub (x) x #include str (sub (engine / platform / device_ ) PLATFORM.h) #define PLATFORM Linux #define xstr (x ) #x #define str (x) xstr (x) #define sub (x) x #define FILE str (sub / engine / platform / devices_) platforms h) #include FILE I'm not sure if I use it, though. ;-) I had to use linux instead of linux because Linux is defined as 1 in my compiler.

How do I save multiple buffers (of my choosing) at the same time in Emacs? -

जब मैं Cx s ( save-some-buffers दबाएं) या सीएक्स सीसी ( save-buffers-kill-terminal ), एएमएसीएस संशोधित बफ़र्स के नामों को एक-एक करके दिखाता है और पूछता है कि प्रत्येक के साथ क्या करना है (बचाने, अंतर, पास , ...) दबाकर y एक से एक धीमा है ! दबाने से आपको बफ़र्स सहेजे जा रहे हैं, यह नहीं दिखाई देता। मैं पहले सभी संशोधित बफ़रों के नाम कैसे प्राप्त करूं, ताकि मैं उनमें से कुछ को चिह्नित कर सकूं और अन्य सभी को जल्दी से बचाने के लिए? सीएक्स सीबी ( Mx list -बफ़र्स ) सभी बफ़र्स की एक सूची प्रदर्शित करता है संशोधित वाले को उनके पास एक * दिखाया जाएगा। आप s दबाकर बचत के लिए बफर को चिह्नित कर सकते हैं जब आप कर लें, तो आपके द्वारा चिह्नित सभी बफ़र्स को सहेजने के लिए x दबाएं। दुर्भाग्यवश, जहां तक ​​मुझे पता है, केवल सहेजे न गए बफ़र्स दिखाने या सॉर्ट करने का कोई तरीका नहीं है उन्हें तो वे सभी शीर्ष पर हैं। (मैं वास्तव में Mx ibuffer से Mx list-buffers पसंद करता हूं, लेकिन ibuffer समान सुविधा प्रदान करता है।)

iphone - How can I add HTTP request caching to an application using ASIHTTPRequests? -

I use ASIHttpRequests and an ASINetworkQueue in an iPhone app I'm trying to cache requests in the style of the NSURLCache to get some 100k XML files and many thumbnails from a web service. ASI does not appear to support caching, and I look at the code and goes to C to make this request, so it is difficult to put the layer NSURLCache . What is the best way to implement it? ASIHTTPREC now supports caching - ASIDownloadcache check IE [ASIHTPPRQUAQUE SET] Default Cache: [ASID Download Cache Shared Cache]]

c - How to put a final summary message in a yacc program? -

When I redirect the input your yacc program from an input file, and then parse the file I yacc parser Want to print a summary of what this did. I want to do the same thing if I'm entering the input through the keyboard and then I press Ctrl + D . Is there any way to do this? You can call function on grammar function should be third part part grammar {calls the first part %% II to function ();} grammar 2 VARl VAR2 VAR3 {its function 2 ($ 1, $ 2, $ 3);} %% part III function () {} Your function 2 (Int C, four * y, Int z) {} Int main (null) {} void Your (char * s) {fprintf (stderr, "% s \ n", s);} Your function can print anything you want to grammar Because now you call the function of the parameters that you

plsql - How to execute an oracle stored procedure? -

I'm using the oracle 10g Express Edition, it has a good UI for DB developers but I have to run the stored procedures Some problems are facing. Process: create or change process temp_proc starts DBMS_OUTPUT.PUT_LINE ('Test'); End It has been successfully created but when I execute: execute temp_proc; It shows the ORA-00900: invalid SQL statement here needs help < P> execute sql * plus syntax. Try initially wrapping your call. End get started temp_proc; End; (Although Jeffrey has said that it does not work in APEX .. but you are trying to run it in SQLDeveloper. Try the 'Run' menu there.)

python - Traversing FTP listing -

I am trying to get names of all the directories from an FTP server and they have a multidimensional list or terminology < P> For example, a server with the following structure: / www / mysite.com Images png jpg at the end of the script, give me a list > I have tried to use a recursive function such as: DefTrurs (DIR): FTP.dir (dir, traverse) < P> FTP.dir return line in this format: drwxr-xr-x 5 pagesc1 leavesc1 4096 29 November 20:52 mysite.com By doing the line [56:] just give me the directory name (mysite.com) I use it in its recurring function. But I can not get it to work. I've tried many different ways and it can not be found to work as well as lots of FTP errors (or Then the directory can not be found - which is a logical issue, and sometimes unexpected errors are returned by the server, which does not leave a log and I can not debug it) Bottom line question: How to get a hierarchical directory from FTP server? There is a simple and

mod rewrite - Setting a default Apache RewriteRule entry -

I want to set a 'default' rewrite rule to catch anything that does not match the previous rewrite entries. I have tried to do this: Rewrite rule ^ (. *) /? $ Index.php? Url = $ 1 [L] But the output is back: url = index.php Ideally, I want all GET values ​​to be added to 'url' so that they have any suggestions from anybody on my web logs how to solve it? Whenever you can, if you want to exclude "index.php": < / P> rewriterule. Index.php? Url = $ 0 [L] rewrite ^ (?! Index .php). * Index.php? Url = $ 0 [L]

c# - Group objects by equality -

I have a collection of such objects, which I would like to compare to similarity using a method that looks like this Is: bool areEqual (MyObject O1, MyObject O2); What would be the most favorable way to group all equal objects? The clear answer collection will compare everything with all other objects, but it will affect performance (N ^ N, I believe). Edit: Edit: I probably should name my object MyObject because I can not modify its implementation (and it does not apply to Icompowered It means that I would probably use the ICR solution You need to compare each object with each other object, each group with each group (Like the first object in the group) and if there is no new match (or if it is the first item). Something like this might appear: public static IEnumerable & lt; IEnumerable & lt; T & gt; & Gt; Group & lt; T & gt; (IEnumerable & lt; T & gt; Items) where T: IEquatable & lt; T & gt; {IList & lt; IList & l

vb.net - NotifyIcon stays on taskbar when app closes in visual basic 2010 -

The notification stays on the taskbar when the application closes, then when I move the mouseover, it disappears is. I tried to do this on shutdown, Personal Sub MyApplication_Shutdown (ByVal Sender as Object, ByVal E as System.EventArgs) handles. Close Form2.NotifyIcon1.Visible = False Form2.NotifyIcon1.Dispose () End sub Is it still any suggestions on this? Thanks check

c++ - Curving from one point to another -

I have tiles that are in random places, and they make x ', y' (to create a good 2d array) By: X T = ((X and head; -X) / T) * T) + X, / Sub> = (((Y and prime; -Y) / T) * T) + Y It works well, but it is linear for some personnel Seeing a little bit like parabol is actually to take x 'in the straight line. Mean, I would have been looking for an algorithm that will curve in X and ends at X and the amount of curvature is based on a variable. Thanks * Edit I think what I want to do the Bezier Curve, but I'm not sure how to implement it. Can someone please explain the quadratic beers formula? I am also unsure that 'e' - what happens like a symbol, I think it is related to a category, but I am not sure, thank you Whether you are looking for, or some other similar parametric curve, these are programmatically easy to code and manipulating them has the advantage of being simple. I know that the best book is in the classic book, but maybe a basic int

flex: loading mxml component -

I am trying to load an MXML component in my main Flex project, I noticed that many There are related questions but I am also a newbie to understand them. On the left and right side of the page and the other flash file is located in the middle. I want the Volksbox to be placed in separate mxml components on the left and right sides. How can i do Thanks Build mxml component for your side In the following, I did this based on the VBox , because it could be what you are searching for. I've given it an unpleasant background color which we should be easy to spot while driving the app. & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; Mx: VBox xmlns: mx = "http://www.adobe.com/2006/mxml" width = "100" height = "300" background color = "0x990000" & gt; & Lt; / Mx: VBox & gt; In your main MXML application, you can include your custom component by telling the application to see

cocoa - NSView in NSMenu -- how to make "key" for accepting keyboard commands [specifically, return] -

I have a text field and a button alive button inside the menu field submits a string in the text field in a field, And that works fine, however, I have also set the key of the button for "return". The main command is not being raised, probably because the menu is not "key" window. I know how to make a window key window (MacKay and OrderFront) - What is the equivalent of a view to living in a menu? The best way to do this is to ignore the button and tie the NSTextField's underlying return key key. To work: Good work starts.

What .NET framework "shipped" with Windows XP -

Can you tell me whether the NAT framework installed by default on Windows XP system? Because I do not need to install C # which does not require any other thing. If any user There is no way to force the net framework (for example 3.5) to download, but install it? < You can distribute the .NET Framework 3.5 to redistribute it with your app. . pick him up . Depending on your app's setup mechanism, you will be able to set it as the dependency of your app's executable so that it is automatically installed for your users.

c# - Handling being online and offline -

I have an application that calls an online database if I lose connection to the Internet or the database is closed My application will crash if it goes. What is the way to handle this? My own approach is an object, calling the database all the time and if an exception is thrown, then an event is removed which registers all other components and then some functions are disabled. Are there. Is this the right way or better solution? It is difficult to say that what would be best for you to know the bigger picture, but I have 3 ways Think that you can potentially put these situations in hand: 1) Timely handles connectivity issues well and just report them well 2) Like You say, from time to time voting connectivity and disabled functionality if "ping" fails. 3) Work with local copy of BB, then when you have connectivity, make updates synchronously to main DB at one time IMO, I will go 1) or 3) Option 3 best user experience Option 1 potentially involves at least

c# - How to use DLL library file in a C++ project? -

I have a DLL library using the C ++ project and C #. Is it possible to add it to the C ++ project and use its methods? I'm using Visual Studio 2008 You have two options that I know: 1) You can compile the C # DLL with COM support, and then access it via C ++ from C ++. It will include a COM interop which can be slower than the managed-to-managed NET call. To compile the C # DLL with COM support, the properties of the project-> Application-> assembly information-> make assembly COM- Visible you users use regasm to register DLL on the machine We do. It is similar to using regsvr32, regasm for .NET DLLs, besides: I personally use the / CODEBASE switch also with regasm for DLL I want to do that only for COM use. It will still work without the / CODEBASE switch, but the DLL will also be visible in the global assembly cache, which just adds disorder to GAC and nominates you with lots of features, I do not need my COM interop scenarios. / P> You can also set

c++ - What _can_ I use as std::map keys? -

। मेरे पास है: struct coord {int row, col; बूल ऑपरेटर & lt; (कॉन्स्ट कॉर्ड एंड अन्य) const {वापसी पंक्ति & lt; Other.row && col & lt; अन्य.col; }}; मैं एक मानचित्र & lt; Coord, नोड * & gt; बनाने की कोशिश कर रहा हूं, जहां आप नोड * Coord को देख सकते हैं । समस्या यह है, इसमें कीड़े हैं नक्शा & lt; Coord, नोड * & gt; द्वारा Coord के लुकअप में गलत लोगों को वापस कर रहे हैं। मुझे पता लगाना मुश्किल है कि यह क्या है उचित है या नहीं। विकिपीडिया कहते हैं,। क्या मैंने यह गलत किया है? क्या यह काम करने का कोई तरीका है, या क्या मानचित्र के लिए चाबी सरल मूल्यों को "सख्ती से आदेश दिया जा सकता है" हो सकता है? असल में सवाल है कि कस्टम struct मेरे स्टड :: मैप के लिए एक कुंजी के रूप में काम करने के लिए? जी हाँ आप बहुत अच्छी तरह से समस्या कर सकते हैं सख्त-कमजोर आदेश के साथ बाधाओं की तरह काम नहीं कर रहे हैं जैसे आप उम्मीद करेंगे विचार करें: बूल ऑपरेटर & lt; (कॉन्स्ट कॉरोड और अन्य) कॉन्स्ट {रिटर्न पंक्ति & lt; अन्य। एंड

Intelligently launching the default editor from inside a Python CLI program? -

The answer was not found in the heart of the problem. In the CLI-based Python program, I want the user to be able to edit a file and then come back to the program. Before returning, I want them to cancel their edits. Should feel like a committed-note-editing feature in Subversion. What are the current best practices for this type of work? You can try to view sources through Mercurial, which is written in Python. , vi to default then they use ossystem with . When the editor is done, they read the file. If there is any real material in it, the operation continues, otherwise, it is canceled. If you want to see how Mercurial does, details and

jquery each leave early -

I have jQuery for each loop on an array and it is possible to leave the loop early. $ (lines) .each (function (i) {// some code if (condition) {// I want something like a break;}}); break; does not really work for one reason If I type a loop then it looks like that (but I do not want this): I = 0; i In advance thanks: Martin according to: If you want to break each () loop on a particular recurrence, then you can do this by misbehaving your function. Non-false returning is similar to an ongoing statement for a loop, it will immediately skip the next instance.

How do you write to an xml file in win32 C++? -

मैं xmllite में win32 c ++ का उपयोग करके एक सरल XML फ़ाइल लिखना चाहूंगा / कोड>। फाइल हर बार उपयोगकर्ता सहेजे जाने पर सहेज ली जाएगी। मैं यह कैसे करु? मैं इसके लिए किसी भी नए पुस्तकालयों को शामिल नहीं करना चाहूंगा ... प्रलेख पढ़कर प्रारंभ करें: < / P>

html - Why isn't this callback resolving properly in jQuery? -

मेरे पास यह कोड है: $ (document) .ready (function () { $ ("। लिंक")। क्लिक करें (फ़ंक्शन (ई) {var toLoad = "products.html #" + this.id; $ ('# block')। फीडटो ('तेज', 0, लोड कंटेंट); फ़ंक्शन लोड करें () ($ ('# ब्लॉक')। लोड (लोड करने के लिए, '', शोएनई कॉन्टेंट ())} फ़ंक्शन showNewContent () {$ ('# block')। फीडटो ('धीमी', 100);} e.preventDefault ();});}); यह विचार है: ट्रिगर करने के लिए लिंक पर क्लिक करें (चेक करें!) "ब्लॉक" div fades से 0 (चेक करें!) सामग्री को बंद कर दिया गया है (चेक करें!) "ब्लॉक" div फ़ेड्स 100 (वूप्स!) इस पर कोई विचार? मैं देख रहा हूं कि डिव फ़ेड आउट होता है, फिर फ़ेडऑट के पूरा होने पर ही नई सामग्री के साथ वापस आ जाती है। Div> इसे बदलें: फ़ंक्शन लोडसंवाद () {$ ('# block')। लोड करने के लिए (toload, '', showNewContent ())} से फ़ंक्शन लोडसंवाद () {$ ('# block')। लोड (toload, '', शोएनई कॉन्टेंट)} समझाने के लि

asp.net - passing parameters to .aspx page using renderpartial -

In my index.aspx page, I want to render partial by using renderpartial and render it to another module.aspx page. The parameter which is passed from index.aspx (this number is ie 1,2, so to call different .htm files at all times depending on the parameter) 1). Now I want the Index.aspx page module. Render the espx and pass it to the parameter (1,2,3, etc.) [the criteria will be programmatic (hardcod) and 2). Mudule.aspx should capture the parameter and depending on it, it will call the .htm file my index.aspx and <% ViewData ["TemplateId"] = 1; & Gt%; & Lt;% HTML. RenderPortal ("/ view / template / mime.sepx", seeData ["TemplateAdd"]); & Gt%; and include module.aspx & lt;% @ page language = "c #" inheritance = "system.web.mvc.ViewPage "% & Gt; & Lt; Script type = "text / javascript" src = "/ script / jquery-1.3.2.js" & gt; & Lt; / Script & gt; & Lt; Script t

matlab - How to plot 2 graphics in one picture? -

I have the following code to plot a graphic: plot (softmax ( :, 1), Softmax (:, 2), 'B.') And then to plot each other: plot (Softmaxretro (:, 1), softmaxarero (:, 2), 'R.') Now I want to be able to plot both people in one place. How can I complete it? Resolution # 1: Draw both sets of points on the same axis Plot (softmax (:, 1), softmax (:, 2), 'b', softmaxersro (:, 1), softmaxetro (:, 2), 'r.') or you can use the hold command: plot (softmax (:, 1), softmax (:, 2), 'b' Hold the plot (softmaxtero (:, 1), softmaxarero (:, 2), 'R.') Resolution # 2: each on different axes Draw a single figure sub-slot (121), plot (softmax (1), softmax (: 2), 'b') subplot (122) side-by-side Plot (softmaxersro (:, 1), Softmaxarero (:, 2), 'R.')

how to fix this exception in blackberry? -

I am using jxa-1.0, while "java.io.IOException: stream off". Can you please tell me how to fix this ?? Or if you already have experience with Jxa-1.0 pls, how to use your ideas. If you want to avoid this error on simulators, then you should read Intestream one byte at a time, try this code (Do not use this method while working with the actual device, because performance will be affected) : is InputStream = httpConnection.openInputStream (); Int data = -1; Bytereon OutputStream Boss = New Bytereunootstream (); Data is =. Reed (); Bos.write (data); While (Data & gt; = 0) {try is {data = is.read ()}} Hold exception (e) {// Exception with "1". It's supposed to handle odd end-of-stream in OS 5 data. Data = -1; } boss. Write (data); } Byte [] Biteire = Bose. Batteryre ();

asp.net - populating a gridview with a button's click event -

I have a page with two dropdown list (second for location for another department), employee search textbox and a button. On the second page, I have a gridview. Now, what I want to achieve is that when a user types an employee's name in the text box control, the location selects a location from the dropdown list, and the section dropdown From the list, and the button (the search), on the second, the gridview will appear on the page The page should show the required information of a single employee, only one row should be shown. I have created a database for employees I know how to do this with autopostback, but I have not tried using a button click. NB: Gridview should only show one line of selected employee. I am using ASP.NET VB Your help will be appreciated. try it & lt; ASP: Button ID = "srch button" text = "dot data" run = "server" onclic = "dot data" /> & Lt; Asp: GridView id = "GridView1" runat = &q

jquery - javascript scope issue -

कोड स्निपेट निम्नानुसार है: $ (this) .parents ('td: first '।) .next () लगता है (' विकल्प ') customizeMenu (।' myMenu2 '); यह काम करता है, लेकिन: var श्रोता = समारोह () {$ (this) .parents ('td: first')। Next () .find ( 'विकल्प') customizeMenu ( 'myMenu2')। }; श्रोता (); काम नहीं कर रहा है, क्यों और कैसे इसे ठीक करें? 'यह' एक समारोह में डालते समय एक ही ऑब्जेक्ट को इंगित नहीं करता है, यह वर्तमान फ़ंक्शन को इंगित करता है (आपके मामले में 'श्रोता')। इसके बजाय एक पैरामीटर के रूप में इसे ले लें, यदि वह एक विकल्प है (यह आप पर निर्भर करता है कि आप अपने फ़ंक्शन को कैसे कहते हैं)। var listener = function (obj) {$ (obj) .parents ('td : पहले '।।) अगले () लगता है (' विकल्प myMenu2 ');') customizeMenu (। ' }; श्रोता (this);

single quotes and double quotes in mysql insert and update query (java) -

Common-Anonymous 'A'b' C '' Def 'Ltd' I try to add each 'and' before '"but the resultant query that is executed " UPDATE empTable SET empId =' 25 ', comName =' I'b 'c' 'def' jee lv id = 1 " I have not been seen within my '' comanem '' and 'not present in front of each' and ' Here is the code to create the column value columnValue.replaceAll ("\", "\\" + "\ '"); ColumnValue.replaceAll (" \ "", "\\" + "\" "); ColumnValue = (" '"+ column value"' '); How to insert a string of these types? Fix as soon as you are in Apache Commons Lang or equivalent library such as

ms access - SQL query to add column datediff calculated in months -

एमएस एक्सेस डेटाबेस में कॉलम ए की तारीख प्रविष्टियां हैं CollumnA 01/15/08 02/11/08 12/23/08 मैं महीनों के नाम से एक नई कॉलम जोड़ने के लिए एक प्रश्न कैसे लिखूं? जहां महीनों की गणना की जाती है महीने = नहीं। मूल तिथि से 01 दिसम्बर 200 9 के बीच का कैसे के बारे में: चयन दिनांकित ("मी", [कॉलम ए], # 2009/12/01 #) कुछ से कुछ के रूप में और यहां:

javascript - trying to change width on click -

Concerrning, I wanted to get the same effect, then I thought I would just change the width of my div on click. / P> I have a left sidebird and content device, and I have an image with an openclick, which hides the left sidebird and sets the right content width up to 100%. This hides left sidebardev, but this content does not spread to 100%, strange thing happens when I press firebug to open, after the opening of it, the content is spread to 100% Anyone can know that what I am doing wrong? Thanks Here's some HTML: & lt; Div id = "content_holder" & gt; & Lt; Div class = "leftsidebar" id = "sidebar" & gt; .... & lt; / Div & gt; & Lt; Div class = "content" id = "content" & gt; .... & lt; / Div & gt; & Lt; / Div & gt; Here is javascript: var flag = false; Page.toogle = Function (id) {var x = document.getElementById ('content'); If (! Flag) {document.getElementB

WAS 6.1, JPA with JTA, Hibernate, Spring : data retrieval problem -

I am running an application with the following components: Oracle 9i WS and EJB was 6.1.0.23 with 3 features pack JPA with Hibernate 3.3.2g with provider (Hibernation - EntityManager 3.4.0) < Li> Spring Transaction Manager for WAS: UowTransactionManager (Spring 2.5.6) Spring webflow, i.e. institution manager with flow-managed firmness (2.0.8) has been serialized in http session, and Everyone Is restored on request. In every request that goes from the Web Controller to the Service Layer (annotated with the Transaction of Spring), I have seen that for every SQL query that the service within the transaction during the Hibernate service Performs during the launch, unless a new datasource is datasource free of charge and finally hangs out, the connectivity is more than the yolk datasource. Required by Barnett's connection provider. Here are some parts of the configuration: Spring: & lt; Tx: annotation-driven / & gt; & Lt; Reference: component-s

html - ASP.NET MVC: render view to generate PDF: use iTextSharp or better solution? -

I display the receipt in both the HTML and printer versions. The HTML version can be saved as HTML without the jQuery tab, etc., while printer-friendly Zero Script and external dependencies, no master layout, no additional buttons, inline CSS, and problems. Since I use Spark, see the engine, although it is a good idea to make PDF using iTextSharp engine though. But after some paragraphs, I decided that it is very cumbersome because a) I have to rewrite the entire receipt (source spark view is approximately 5 pages long) b) I have problems with iTextSharp from the beginning - for example, The numbered lists were kept in bulleted indentation, and indentationLeft = "20" did not work - possibly due to the lack of documentation, but see (A). Therefore, my expectations for PDF are very simple: I want to keep the same HTML but insert page breaks between individual receipts (yes I have many people in the same document). Is any strange engine? Update: Tried the community

java - JConsole alternative -

Is there any JConsole option that I can bundle with my app? There is no real answer, but maybe assistant, I just stepped up and thought, this is the jaconol / jmx The question is still related to your work on plugin for Hudson CI. It is a thought that there is a button on Hudson UI to launch a gyasinsol or any other management application. Think about this - Hudson's web interface is assuming that you use Hudson from a remote machine and press your JMX console button, I'm sure the console is started on the server, Not on the customer and therefore inaccessible Therefore, using an existing management application (Java application) you can plug in Hudson's single-workstation usage. Or you go in a difficult manner and not only integrate the launch button but also a web interface (based on JMX) which allows your server to manage directly from the Hudson console.

javascript - What in a GreaseMonkey script can cause Firefox to crash? -

I have a relatively large script in GreaseMonkey and it appears that the browser is crashing after a while. It seems that it talks about it, and after some time Firefox just dies I think it is linked to my script. I'm amending the page is google.com and I'm developing the script on Mac . What are the common reasons for the GM script firefox crash? Memory leaks (Do you have any information about an array Make sure that you do not use global variables.) Endless loop (although FF will not crash) Your script and Google There may be an interaction between one, for example, Google Mail will send an excuse request every few seconds to find new mail. If your script is triggered on it, then this could be a problem.

How to set geographical coordinates on pictures for Google Android? -

I am currently developing an application to manage my pictures on an Android phone. I have developed an algorithm for classifying images based on the geographical coordinates of each picture (latitude, longitude). To test my application on Android emulator in Eclipse, manually import a bunch of photos from my computer into the SDCard folder of the emulator. I would like to manually add latitude and latitude data to each picture so that I can test my algorithm. I'm searching for a lot, but there is no way to go through it. Can anyone help me on this? Thanks in advance. Are you just asking about setting up EXIF ​​location data on pictures from desktop Are you There are so many image editors that will let you do this (Google it) or are you asking that Android to retrieve data from the data that already has EXIF ​​location data? It seems that you have an Android side, which you have worked, you only want to dump the GPS data before setting them on the phone. Here

python - Need help understanding how this recursive function is working -

Here is a function (credit to user abot, to provide it in another question) Diff Transgress (FTP): level = {} entry (for path in path) in ftp.nlst () if the path is not ('.', '..')): ftp.cwd (entry) Level [entry] = reverse level This is what I do not understand: When the python enters the function, it creates an empty dictionary ( level ). For loop, it stores a directory name in the dictionary as a key, for the value of that key, the dragon enters the function again and searches for a directory and it becomes the value of that key . But, how do you remember the values ​​within the levels? I mean, it should not be reset / empty every time Pygm enters the function? Each "instance" of the function has its own copy of level and There is no side effect between different codes of level . Take this folder tree: root `-home | - lyrae | | - ftp.py | When you call ftp to Route then : : <<> FTP (root) creates a blank leve

Post a file to a .php page from Oracle -

On my website, I have a .php script for which our customers can post orders $ destname = CreateUniqueOrderFileName (); If (is_uploaded_file ($ _ files ['file'] ['tmp_name'])) {if (move_uploaded_file ($ _ files ['file'] ['tmp_name'], $ destname) 'echo'; Else echo "error: move"; } So for my clients I wrote an app in C # and if I upload an order, then I do something like this: Var client = new WebClient); Byte [] response = client.UploadFile ("http: //mywebsite/order.php", "post", commandfile); But now I have a customer who uses Oracle and wants to post an order to use PL / SQL. I try to tell him that he has to use the file uploaded by HTTP post and multipart / form-data, but I do not understand it. Maybe I am using the wrong terminology or I am not using standards. So one example of how anyone can post files in a .php script in PL / SQL or a suggestion where to upload more information is a file in .ph

cocoa - HTML in textview -

How do I show HTML data in textview You did not say whether you are targeting Mac or iPhone when I tag your question with cocoa, I agree I am It's looking for an overview of how NSTextView works. But at the original level, all the NSTextView s contains an NSTextStorage object (accessible via textStorage method) NSTextStorage Should be a sub class of NSMutableAttributedString . NSAttributedString is an initial name that will parse an HTML string for you. Once you have found it, you will see the resulting string in your NSTextView Code> textStorage . For example: get NSData * htmlData = // html, e.g. The URL used to resolve the NSURL * aBaseURL = // related link from a file eg. '/directory/page.html' NSAttributedString * Formatted HTML = [[NSAttributedString alloc] initWithHTML: htmlData baseURL: aBaseURL Document Attributes: NULL]; [[MyTextView textstuff] Appendabridged string: HTML formatted]; [Formatted html release];

ado.net - Filemaker .Net Driver -

I am not familiar with Filemaker, but I have inherited a Filemaker (I think V3) database. Is there an ADO.net or odbc driver that I can use to extract data? is a client driver

Silverlight 4 Multicast streaming -

Did anyone have the opportunity to do multicast streaming in Silverlight 4? I would like to ask for any information on this topic - links, docs - anything code samples will be rocky! I know that this is only released as a developer version, but I have signed up to a demo before this year ... (Not very smart, I know) I multicast UDP in Silverlight 4 Beta. Currently, there is not much that makes it difficult I I mean to put some things about it but this is my result (These results are for UDP multicast single source): Multicast only works on internal LAN. There is no Silverlight client on the LAN, where there is a multicast host, can not receive the packet sent by the host. There is no Silverlight client on the LAN, where mulitcast is hosted, Unicast UDP can send packets to the host. I really hate these results, I wanted to play games using UDP sockets. However, Silverlight 4 Beta does not support Unicast communication in two ways, I do not understand why? If someone h

mysql - get the next id -

My question is how to get the next ID that uses NHibernate in mysql db for an Auto-Entrance ID column ? Thank you, depending on the details given below (one answer in the form of)? I think that you are actually looking for the NHibernate facility, so that the database can automatically be read back to the ID: This will be determined by the database when the value of the ID is assigned to NHibernate, This value will not be sent as part of its INSERT statement and after the inclusion, the value of the ID column will be read back. But you have to tell the database (in table definition) that it should automatically generate a value for the ID column for each record ...

strong typing - Strongly-typed languages for web programming -

Is there a strong-typing programming language for the Web? I program in PHP, but often I have the desire that when I tried to compare a number for the string, I shouted at him. Functions in the standard library that can either return a boole or an integer, do not make anything easy. I know there is .net, but is this my only option? You can develop Java web-applications See

List as DataSource for DataList -

itemprop = "text"> itemprop = "text"> All types of implementation The IEnumerable interface can be used for DataSource of a DataList, for example the list but items in the item's matlap What will we write for bound expression? list & lt; Int & gt; MyList = new list & lt; Int & gt; (); For (int i = 0; i & lt; 10; i ++) myList.Add (i); MyDataList.DataSource = myList; ... & lt; Item Theme & gt; & Lt; ASP: Textbox ID = "MyTextBox" Runat = "Server" text = '& lt;% # Bind (???)% & gt; / & Gt; & Lt; / ItemTemplate & gt; Try it out: & lt;% # Container.datetime Toasting ()%>

iphone - Y/N: UitableView Question -

Y / N: Is it possible to set the one cell inside a utivite To keep multiple cells at a dynamic height which varies depending on the value of that text? "post-text" itemprop = "text"> Yes. You can specify the height of a cell by implementing tableView: heightForRowAtIndexPath: in its UITableViewDelegate . You can get row height using NSString's sizeWithFont: constrainedToSize: lineBreakMode: method.

c# - Why does CurrentUICulture.DisplayName say "English (United States)" and not "English (United Kingdom)"? -

I am in the UK, and I have a UK-Purchased version of Windows 7, in which all the settings may be possible. Set in (not US) when I run the following code: console WrightLine (Thread.Console.WriteLine (Thread.CurrentThread.CurrentCulture.DisplayName); Output is: English (United States) English (United Kingdom) I did not know why the first said the United States. I was going to include it in the window about myself (to help debug multilingual issues), but this bit confused me Does anyone know why this does not say UK? By default. MII is a scheme by which the language of OS is displayed in a specific language It is different from things like numbers and date formats. Brits do not get their own translation of windows UI ...

Use two joined subclasses in nhibernate -

OK, I'm working on a project which is already fully implementing it. Scenerio: Two classes of subclasses (RoleA and RoleB) of a class (person). What do I need to do that a given person can actually be in both RoleA and RoleB, how, when a person has already been created and given in the role, then I am with RoleA While maintaining relationships, can I make them in roles as well? In this way, you have the following (with students and teachers who take the place of rolls and rollbacks) Is: & lt; Class name = "person" table = "person" & gt; & Lt; Id name = "id" column = "PersonID" & gt; & Lt; Generator class = "parent" /> & Lt; / Id & gt; & Lt; Property name = "name" column = "name" no-null = "true" /> & Lt; Included-sub-class name = "student" table = "student" & gt; & Lt; Major column = "PersonID" /> & Lt

When evaluating Visual Studio 2010, should you install the Ultimate version, or the version you think your company is most likely to purchase? -

I want to install Visual Studio 2010 Beta 2 and I get many editions - seems like they are slightly with editions There are "professionals", "premium" and "ultimate" around this time. When it comes to Visual Studio 2008, we moved along with the Professional Edition. I do not know the logic, but it caters to our needs. On the one hand, I think I should evaluate the commercial version of Visual Studio 2010 because there is a good chance at what time I'll use the thing next year on the ship, on the other side, I wonder if I The version should be evaluated so that I can know if it can be used in any of the features. When evaluating Visual Studio 2010, you should install the final version, or the version you think is most likely to buy your company? If you may like the last features, and you make it a chance to make up-sale , And you do not have bandwidth barriers. I am currently a D / L professional because I fail all the above tests.

iphone - Change the scale factor in UIScrollView -

Is it possible to change the scaling factor of UIScrollView? What do I mean is that I can use the content view to zoom completely to my zoomed-out two-pinches gesture altogether - its maximum value in content view for. For example, the minimum scale of the UIScrollView is 0.32 and the content view will be increased to 0.32 by two pinch gestures. Thank you. There is no direct property for this, but I'm sure you do this by UIScrollViewDelegate protocol and by overriding the viewForZoomingInScrollView: method, then manually UIScrollView 's zoomScale Property changes.

Nested if statements in SQL Server stored procedure SELECT statement -

I'm new here, and relatively new to stored functionality, so please interact with me! I have examined the related questions here and there is no work to do in this example. I am trying to create a stored procedure (MS SQL Server 2005) which takes the number passed in values, actually makes SQL dynamic, as you would with inline SQL. This is where I am unstable. We have some (simple to clarify): @ searchf1 varchar (100), - Search filter 1 @ Search 1 varchar (100), - Search Results 1 @ Search 2 varchar (100), - Search filter 2 @ Search 2 varchar (100), - - Search result 2 @ direction characters (1), - Set the order to set date to date set to date * Select from nocount. Database.dbo.table T WHERE T.deleted = 'Order' Directions by Order 'When' A 'THEN TDID WHEN' D 'THEN TDID DESC End End Set Knockout I Also have tried the lines by ORDER BY: if @direction = 'n' then TDi DESC by ordering from TDID, both Attitudes give me an error o

performance - What are the most efficient idioms for streaming data from disk with constant space usage? -

problem description I need to stream large files from disk. I assume that file memory Being fit in is larger. Also, suppose I am doing some calculation on the data and the result is small enough to fit in memory. As a hypothetical example, suppose I need to compute an MD5 sequence of 200 GB files and guarantee me how much RAM will be used. In summary: < need constant space as much as possible Assume too large files Result in memory question What are the fastest ways to read / read data from a file using a static location? I had ideas if the file was small enough to fit in memory, then mmap would be very fast on the POSIX system, unfortunately This is not the case here is there a performance gain for using mmap with a small buffer size to buffer the buffer of the file? Should the overhead be overwhelmed by any benefits to go down the system MMAP buffer, or should I use a fixed buffer that I have read with fread ? I would not believe that mmap w

Android - AppWidgets, AlarmManager and AsyncTask -

I do not have much luck with updating an app widget AlarmManager Generated broadcast here What to do: AlarmManager alarms = (AlarmManager) to start AppWidgetProvider # onEnabled at alarmmanager Reference. GetSystemService (event .ALARM_SERVICE); Alarms.setRepeating (AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedReautime (), 60000, pendingIntent); I also define the broadcast receiver which just listens for updates removed by the alarm manager . When the update is removed, the code runs AsyncTask that creates a network call when AsyncTask is completed ( onPostExecute ), then To update the widget (s) it uses pre-charged charge of AppWidgetManager . All of this really works well in logs until I get the message "process com.foo.myapp (pid 12345)" , after which alarm manager Never solves any other updates. / P> Do I need to check some types of alarms that will restart? For example, when the user accesses the original app's widget? How

Access DB Ref MongoDB -

What is the best way to access / query a DB referee: Update: User: Name, groupref: {$ ref: "groups", $ id: "ObjectId ..."}} group: name, topic, country, ..., .. The impression is that the user belongs to only one group, how do I get all the users for a group whose country starts with the letter 'A'? Country is a string. In addition to this, how will it change if users bellengadda for more than 1 group? db.users.find ({group ref: {$ ref: "group", $ id: group._id}})

c++ - Pthreads problem and a few questions -

contains # lt; Pthread.h & gt; #to & lt include, stdio.h & gt; #to & lt include, stdlib.h & gt; #to & lt include, time.h> #define NUM_THREADS 8 characters * message [NUM_THREADS]; Straight thread_data {int thread_id; Int sum; Four * messages; }; Straight thread_data thread_data_array [NUM_THREADS]; Zero * Printholdo (Zero * Threadgate) {int taskid, sum; Char * hello_msg; Straight thread_data * my_data; Sleep (1); My_data = (thread thread_data *) threadarg; Tasked = my_data- & gt; Thread_id; Sum = my_data-> Yoga; Hello_msg = my_data-> message; Printf ("thread% d:% s sum =% d \ n", tasked, hello_ms, yoga); Pthread_exit (zero); } Int main (int argc, char * argv []) {pthread_t thread [NUM_THREADS]; // int * tasks [NUM_THREADS]; Int RC, T, Yoga; Yoga = 0; Message [0] = "English: Hello World!"; Message [1] = "French: Bonjour, le Monde!"; Message [2] = "Spanish: Whole al Mundo"; Message [3] = "Klingon: Nook

auto increment - getting the autoincremnt value after inserting record using SQL Server -

I connect to SQL Server databases with VB. I'm developing a project using Net And immediately after recording the database in this project, I need to get the value of the column called "id". thanx Take a look

Image manipulation in ActionScript 3.0 : realistically editing faces -

I am a flash developer who has worked mostly on small action script projects, but I can use my toes I'm dipping in the image manipulation with AS3 I have a project that I am working to develop an app that will allow the user to upload his photo to SDF, and then using the slider , To change the image itself, it may look thin or thick, the situation is that it requires at least user input - therefore, ideally it can be expected from the user that some areas of the face are identified in response to the indicator Some control points will be 'click on the center of the chin' and when the user clicks, the situation will be stored, but to use it the least Mr.'ll need, if at all. So far, I was able to use uploading a file reference class to upload, and I used to use the displacement map filter to edit parts of the uploaded image. I'm having serious problems in implementing this way, which will allow the realistic distortion of facial features in the uploaded image.

What is the best datatype for storing URLs in a MySQL database? -

What is the best datatype for the storage of URLs in a MySQL database? Ideal something that does not take too many places, but they can easily handle variable length URLs. If the "link" means you link to the web page, I guess you can store Want to Because the URL variable length string appears to be a clear choice.

webforms - jQuery .val() not updating on submit -

I have the following values ​​that are used by jQuery in any form .val (): var un0 = $ ("input.e0"). Val (); Var un1 = $ ("input.e1"). Val (); Var un2 = $ ("input.e2"). Val (); Var un3 = $ ("textarea.e3"). Val (); The original values ​​from the elements have already been added by separate scripts that release values ​​from AJAX XML data. The problem is that when I edit the values ​​in the form (i.e. overwrite them) and submit the form to update my DB, the original value , Updated values ​​are sent instead of It looks like new values ​​are being ignored .val () If I'm posting with a warning from the exam (un0); The newly edited value has not been recovered and I can see that the original is being used. Note This is not the case for textarea (un3) which is working correctly, and updates with a new value on editing. Any ideas why jQuery is not using new inventions? Edited with more sources: The values ​​after the XML call

svn - Subversion: is it possible to backup only the delta since the last backup? -

Do anyone know here that it is possible to back up only part of the repository for replacement being replaced since the last backup Is: Delta)? Practically, it can be done full backup every midnight and some hours like Delta. If there was an accident at 11:07 then one will have to use the full midnights full backup and all deltas will be applied on it, thus only seven minutes will be lost. In addition, if this is possible, it can be done in "hot-backup" mode (if it is the correct word for it), this is while other users are operating, especially checking on the repository We do. It is definitely possible that you modify all of (from_rev) To dump changes, you can svnadmin dump -r (from_rev) --incremental (if you modify the - incremental , (from_rev) The contents of it will be completely thrown away). All cuts are atoms, so you can do a hot-backup like this - which are still running, it can not be on this dump but in the next one.

WordPress replace content of a page (plugin) -

I am writing a plugin that adds a page with the tag [deposit_page]; That tag should be replaced with some PHP code. I have it, but it does not work. Am I missing something or wrong? function_p_p_p_p_p_p_p_p_p_page_set ($ content) {$ deposit_page_content = "here will be content that should be replaced by tags"; // variable_acc_page_content end $ content = str_ireplace ('[deposit_page]', $ deposit_page_content, $ content); Return $ content; } Add_filter ("the_content", "deposit_page_content"); I just saw that I have given the same name as the variable name that should be replaced by the tag and the function. Can this be the problem? There is support for [square_bracket_shortcodes] in WordPress < P> View: This is your simple example: function deposit_page_shortcode ($ atts) {$ deposit_page_content = "Content must be changed here," tags should be changed "; Return $ deposit_page_content;} Add_shortcode (

metaprogramming - How to create a method like ".find_by_something_and_something_else" using Ruby? -

By using Ruby I know that you can be very creative with the names of your methods, for example, Pass .find_by_this_and_that . How can I do this? Example: def get_persons_with_5_things res = [] Individuals Unit | Person If person.number_of_things ==% coincident number 5 function NAME% Res & lt; & Lt; The person end-end return ridge and I'm also not sure how you call such things, so any signal will be appreciated. I'm a bit confused with your example. If you define the method with the hardcoded 5 in the name of the method, then you do not need to understand magically in the body of the method. If you want to do something dynamic with the method, then something like this will happen: def method_missing (name, * args) if name.to_s = ~ / get_persons_with _ (\ d +) _ things / Number_of_things = $ 1.to_i res = [] Individuals.Each | Person If person.number_of_things == number_of_things res & lt; & Lt; (Android) End and return super (name, * AGR)