Posts

Showing posts from September, 2010

nhibernate - DetachedCriteria with 3 OR conditions -

How can I get this query using different queries: MyTable Choose from * (conditionA = true) or (conditionB = true) or (conditionC = true) or (conditionD = true) You can use clutter class like this: isolated diplomacy. For & lt; MyTable & gt; (). Add (restriction .Decision). Add (restrictions. AEC (true "candyshad A")). Add (restrictions. AC ("conditionB", true)). Add (restriction. Ac ("conditionC", true)). Add (ban.ac ("condition", true)));

javascript - Draw a cross at the mouses location on a canvas, non persistently -

I am obliged to this mausumov event of my canvas: function (e) {Var contDiv = $ ('# current_system_map'); Var offset = contDiv.offset (); X = e.clientX-offset.left; Y = e.clientY-offset.top; Context.beginPath (); Context.moveTo (0, y); Context.lineTo (595, y); Context.moveTo (x, 0); Context.lineTo (x, 595); Context.strokeStyle = "RGB (255255255)"; Context.stroke (); } And it works fine at one point. The drawn cross is constant, so when the mouse moves a new cross, the old one lives. I have tried to redraw the canvas inevitably, but it can get a cross and is quite far behind the mouse. So I should know how to draw a cross and without having to be displayed it on the canvas again to attract everything. Usually if you draw something on the canvas, then you can redraw the canvas material to erase it. I suggest that you use an image element as a cursor and place it at the top of or you can try the old tricks and With the globalcomposite operator = ...

javascript - storing tree element in jQuery -

I have developed a tree menu using the jQuery API. But the elements of all my trees are hard coded. I want to store the tree elements in a data structure and make the tree dynamically. Does jQuery have any data structure such as a list of links or STHs or do I need to code my data structure? You can use javascript methods, do not forget that jQuery is just a JS extension. Here are the manuals on JavaScript data structures: var cat = {color: "gray ", Name:" spot ", size: 46}; Cat.form = 47; Show (cat.size); Delete Cat.size; Show (cat.size); Show (cat);

html - multilingual websites and rtl direction - best practices -

Can you share any suggestions for supporting RTL directions in multilingual websites? In addition to the text direction, for example, can there be any change in the menu marks? RTL CSS should be included in a separate file (such as "layout-RTLSS") or "RTL" class should be added to body tag? I would like to know about that kind of content. I have got some suggestions, but I appreciate the advice of a person in the first hand (someone who has already started a website in an RTL language). What we do is declare some parameters like php: Side: Right OPOSIDE: Left DIR: RTL OPODIR: Lit for each site languages ​​ and we can only upload a CSS file and a template with Devan We handle CSS or template file replace place holder. Like: Float: {side} ... and we have PHP (replacement which all With the need to change), and the site takes the CSS file that it owns. Now you can do this with the CSS framework: low, blueprints,

php - how to find out if csv file fields are tab delimited or comma delimited -

How to find out if the CSV file field tabs are delimited or are delimited with a comma, I need PHP validation. Can anyone help plz thanks in advance? It is too late to answer this question, but hopefully it will help someone This is a simple task that will return the delimiter of a file. function getFileDelimiter ($ file, $ checkLines = 2) {$ file = new SplFileObject ($ file); $ Delimiter = array (',', '\ t', ';', '|', ':'); $ Result = array (); $ I = 0; While ($ file-> Valid () & amp; $ i & lt; = $ checkLines) {$ line = $ file-> Fgets (); Forex currency ($ delimiter $ as delimiter) {$ regExp = '/['.$delimiter.']/'; $ Fields = preg_split ($ regExp, $ line); If (count ($ field) & gt; 1) {if (empty! ($ Result [$ delimiter])) {$ result [$ delimiter] ++; } And {$ result [$ delimiter] = 1; }}} $ I ++; } $ Result = array_keys ($ result, maximum ($ result)); Returns $ result [0]; } Use this function as ...

python - In Django, searching and filter by searchbox and categories in one go? -

I wonder if you can help me. I have a list of data that will be displayed on a page A simple search box is a list of categories and a list of tags that can be used to filter the list of all data. I'm trying to prepare it from the ground (so it does not require javascript) but eventually it will submit the search criteria and will return a new list with the help of Ajax. So I have a list of categories in my database ('big', 'small', etc.), and I have a list of tags in my database ('wood', 'bronze'). Tags are used to filter for more than the categories. I have a search box. Ideally, I want the user to effectively mark the categories they want, what tags they want and possibly search for keywords, and then submit all those data. So that it can be inquired and returned a new list of filtered data. I'm not a Django expert, and I'm stuck on how to do this ... and how to get the categories out of categories as a checkbox list, what's t...

c# - my site show error -

My site shows this error You can also check that only 4 to 5 pages System.Data.OleDb.OleDbException: The system resource exceeded. Source Error: Line 267: Audubbed Adapter DTT = New AudiDiadata Adapter (Original); Line 268: Dataset DSTT = New Dataset (); Line 26 9: DTT Fill (DSTT); Line 270: Line 271: This Totalview.Text = dstt.Tables [0 Can anyone tell how to solve it? Are you turning off your data adapter? You need to explicitly call dtt.close () or by using the blocks (they are idisposable): DataSet dstt = new Datasets (); (OleDbDataAdapter dtt = new OleDbDataAdapter (tot)) {dtt.Fill (dstt); Dtt.Close (); } etc. Closed () here is unnecessary because using by calling block dtt.Dispose () , but I like to leave it in any way. Most ADO .NET objects are IDisposable; While I doubt some of these things whether you shut down or settle them or not (like command) I expect data adapters, connections, etc.

c++ - Can I map lists in QT? -

It's already quite a bit, but it would be great if I could map the list of La Rouby. Say I have a Castrestrialist, Mystlist List, in which there are things like "12.3", "-213.0", "9.24". I just want to map everything without duplicating. Does QT have any way to do this? // e. The following Nob Qt Advantage QList & lt; Double & gt; MyDoubleList; FurHeach (Qestring S, Mystigilist) {myDoubleList.append (s.toDouble ()); } As far as I can tell, an interface with standard in QT containers Container, then you should be able to use standard algorithms on them. In this case, std :: convergence (myStringList.begin (), myStringList.end (), std :: back_inserter (myDoubleList), std :: mem_fun (& amp; QString:: to double));

How to count number of non-derived files in an Eclipse project -

Then, how to calculate the number of files in the Elypes project, with the specific requirement that the derivative The resources should not be counted. (Otherwise it can easily use Unix command line tools) Linked and virtual resources can not be considered, although bonus points if you do. Ah, found a proper way to do this: Open the file search dialog, "Text containing text:" Delete all the text in the field, you want to choose "File Name Pattern" (for all files that will be " "), and then you want the scope (workspace, selected resource, etc.) to be selected . Perform a search and then see the match's count in search view. Here is the key "text containing:" field. If it is " ", then it just matches the lines instead of the file. I originally tried to use a regexp which only once per file, such as "\ A (. | \ R) )? " , Which works to a certain extent (all corresponds to non-empty, non-binary files), but only empt...

SQL Server 2008 Backup fails: BACKUP DATABASE is terminating abnormally -

मेरे पास एक विशिष्ट डेटाबेस के लिए एक संग्रहीत कार्यविधि है, जो एक डाटाबेस बैकअप करता है समस्या यह है, यह एक सर्वर पर काम करता है और दूसरे सर्वर पर काम नहीं करता है (सर्वर विभिन्न मशीनों पर हैं)। बैकअप ड्राइव सर्वर का स्थानीय ड्राइव है I दूसरे सर्वर पर मुझे अपवाद मिलता है " बैकअप डाटाबेस असामान्य रूप से समाप्त हो रहा है। " लॉग फ़ाइल में निम्नलिखित सूचनाएं हैं: ... त्रुटि: 18204, गंभीरता: 16, राज्य: 1. ... बैकअपडाइस्कफ़ाइल :: बनाएँमीडिया: बैकअप डिवाइस 'डी: \ XXX.bak' बनाने में विफल। ऑपरेटिंग सिस्टम त्रुटि 5 (इस त्रुटि के लिए पाठ प्राप्त करने में विफल रहा है। कारण: 15105)। ... त्रुटि: 3041, गंभीरता: 16, राज्य: 1. ... बैकअप अपग्रेड बैकअप डेटाबेस XXX को पूरा करने में विफल रहा। विस्तृत संदेशों के लिए बैकअप अनुप्रयोग लॉग की जांच करें। इसके लिए कारण क्या हो सकता है और मुझे बताए गए बैकअप अनुप्रयोग लॉग को कहां मिल सकता है? "कॉलर के रूप में निष्पादित करें" के साथ फिर से सपा को संकलित करने का प्रयास करें और इसे फिर से चलाएं।

URL redirect for user profile in .htaccess -

Can you please tell me how do I get the URL to www.santaraj.com/steve A new file in my profile.php ? In fact I want to display the User Profile with profile.php but the URL will be created as the domain Name / Username ( Www.santaraj.com/steve ). A good example is www.twiiter.com/kk . Put the following rules in .htaccess in your document root: Rev. [A-z0- 9] +) $ /profile.php?user=$1 [L] (Below is a 'rewriteign on' in the same file) When someone If the user goes to www.santaraj.com/steve, your profile.php script will be running with the user = Steve's query string. Note how regular expressions in the rule assume that the user name is made up of numbers and lowercase letters. You can change it, which definitely makes sense for you.

Silverlight Order form - use DataForm? -

I need to design an order form where a line represents and add items for order line and customer order You can. I then want to display a new line to add another line for the customer. I think I should use a dataform, but how do I display all the rows instead of paging rather than once? Line Items? Why can I always get the answer after posting to StackOverflow! So, I like it, thank you. Basically, use a datagroup to list line items and simply. Add a lineitim

java - Need Help Moving An Object -

I need ideas about moving an object (a circle that represents robots in my application) . The surface going forward will include the tile of the labyrinthine image of 3 rows and 3 columns (shown in the array). All tiles are the same in sizes (160 x 160). The third row and the third column are the track rail on which the object should move forward. This means that the object (robot) can move horizontally (front and back) and vertical (top and bottom) in this situation tile [2] [2] (Please count on the top so that the top line is 1 and its The later version will be 1.) A crossing that will use the robot to change the vertical track rail or for the horizontal track rail. My problem now is how to move the object to a specific tile after crossing. For example, in the robot tile the situation will be at [2] [1] and after the crossing is started, [1] [2] you want to go to the tile and then proceed further. Or it may be at [1] [2] and after crossing, want to move [2] [1] and then want ...

c# - Basic/Simple Data Access Object (DAO) with Entity Framework 4.0 -

I try to collect a simple POC for an en-layer application using EF4 in the data layer I am here. I have seen many examples on the web and it is a common practice to use a DAO or repository as an ORM cover. I understand that the main difference between the two is that a repository is more common and takes the IQueryable for example for parameters. I would like to paste it with simple DAO objects at this point, which is called GetPersonByFirstName (string name) Just like the specific methods will be included, similarly the ADO Net-based accessories have also been done earlier. He said, I still need many "cross cutting" attributes for my DAO. How would I have to go about sharing the reference between the DAO? Preferably this would be a way where the DAO would not have the knowledge of the business object EF to start. Initially I was thinking that BO will pass the session to the DAO, but it will violate my requirement of freedom of BO (unless I am thinking nothing). Maybe ...

cruisecontrol.net - How to handle Class Library/Solution/WebProject in MSBuild 2.0 and CrusiseControl.Net -

I have a CI tool cruise control. I am working on Net and MSBild. I have many .csproj, .sln files and web projects (more than 30). We have 30 developers and they work on several projects at any time. As of now, the developers do not release. For SLN and .csproj file builds Now my question is how to handle the build file: 1. Since the developer does not release. How do I obtain the newly added files that CCPRG and I need to compile? And how do I get new attach reference both Net Framework and third party DLL? In some cases the developer opens WebProject independently and makes changes and releases in this case, how do I compile it? 3. How do I manage the order of project dependencies? I have .Net 2.0 /. . Someone can suggest me and guide me here. Thank you, sandalwood There are several ways to automate one way that I Also worked for you, that is to use NAnt instead of MSBuild. There is a CSC task in Nant that you can use. (CSC.exe is automatically csharp compiler) ...

lisp - Easy way to merge plists? -

Is there a simple way for common Lisp to merge two plasters? Or from any other point: Is there any way to remove a duplicate from Plast? I know that I can just add plists (and GETF searches will take one first), but I do not want to keep unused keys as my app runs. I'm thinking of something like (for my 'pl' # cddr ... loop for p ...), but my first thoughts There is often an easy way! (defun merge-plist (p1 p2) (notfound = '# With loop: for notfound (Indicator value) # 'when CDDR (not eq (Px P2 indicator absence)) (Prague (Push Price P2) (Push Pointer P2)) P2) CL-User 104 (Merge-plist '(1b2c3)' (one 2b4)) (c3a2b4)

Filter a product collection by two categories in Magento -

I'm trying to find the products include two categories I've got an example to obtain such products Which are in category 1 or category 2. I need products that are in CATEGORY1 and CATEGORY2 In the blog example is:. class ModuleName_Catalog_Model_Resource_Eav_Mysql4_Product_Collection extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection {public function addCategoriesFilter ($ categories) {$ alias = 'cat_index'; $ CategoryCondition = $ this- & gt; GetConnection () - & gt; QuoteInto (....? Store_id = & '$ alias'. Product_id = e.entity_id and' $ alias, $ this- & gt; getStoreId ()); $ Category Condition. = $ Alias Category_id IN ('. $ Categories.') '; $ This- & gt; GetSelect () - & gt; JoinInner (array ($ alias = & gt; $ this- & gt; receivable (list / category_product_index ')), $ categoryCondition, array (' status' = & gt; 'status')); $ This- & gt; _categoryIndexJoined ...

Can I gain some efficiency by declaring appropriate members "static" in Android Activity -

If any action is singleton in practice, I think that appropriate members can achieve some efficiency by declaring "stable" Are risks with zero Yes? - There is more than one example "single task" Or "single instance" activity, so that all new intents are expected to handle. It means you can use a static member . In addition, require a thread-safe static member only in a standard or one click . Let's assume that the current activity stack is A-B-C-D if the intent to arrive is for an activity of Type B, which is in "Standard" or "Single Top" mode. A new example of B will be launched (since B is not at the top of the heap), so the resulting stack will be A-B-C-D-B.

perl - Good IDE or syntax highlighting editor for Mason? -

Can some good IDEs or editors be recommended for Mason? At this time I am using VIM only but it would be good for an editor who supports Syntax highlighting and supports general syntax checks. There are so many who certainly support Pearl, but when it comes to files with Mason and Pearl, editors are in the habit of confusing and incorrectly highlighting. (see 4 to 6) is Mason-Support and can handle Mason and HTML in the same document. . If there is also this in the Commodo-Edit, then I would not be surprised. : What's new in Commodo 4.0.3: New languages: Template-Toolkit, HTML-Mason Support rbo

find c++ execution time -

I'm curious if there is a construct function in C ++ to measure execution time? I am using Windows at this time in linux very easy ... best on Windows The way, as far as I know, is to use QueryPerformanceCounter and QueryPerformanceFrequency QueryPerformanceCounter (LARGE_INTEGER *) LARGE_INTEGER passed in the value spots of the display counter. QueryPerformanceFrequency (LARGE_INTEGER *) Places Frequency display counter is incremented in LARGE_INTEGER passed. You can then achieve execution time by recording as execution time counter, the execution starts, and then the execution ends while counting the record. Decrease starting from the end, get the change of the counter, then get the time in seconds to split by frequency LARGE_INTEGER start, finish, freq. QueryPerformanceFrequency (& amp; freq); QueryPerformanceCounter (& amp; Beginning); // Combine some query (and end) presentation; Std :: cout & lt; & Lt; "Execution" & lt; ...

php - How to get order output after using group in the sql query? -

I have my SQL table with the customer's name and order they are kept on time. The table column is the name id, the customer's name, the order value, the status, and the made and modified. I am able to group the number of customers and the number of orders. Using a SQL query like this .. customer selection, counting) by customer order group Works fine but I want the output to be ordered according to the number of orders. Thank you. Posted by "itemprop =" text ">

java - How do you choose the filename of an uploaded file in ICEfaces? -

How do I choose the file name of an uploaded file with an ice in the ICEfaces: inputFile? The reason for this is that users can upload many files with the same name, without overwriting the server or generating errors. I have tried to set the submitOnUpload feature of the tag to create "pre endpost upload" and to create an uploaded action listener for that tag which changes the file name of FileInfo of InputFile for an Unicode string is. If this file name tries to change pre-uploads, then it is ignored and the file is uploaded with the file name provided by the user. If this file-name tries to change the post-upload, I get a useless NullPointerException JSF 1.2, IceFaces 1.8.2 Oh, I got it. Instead of calling FileInfo.setFileName, you want to call FileInfo.getFile (). Renameto ().

How can I list all cookies for the current page with Javascript? -

Is there a list of all the cookies associated with the current page, with the help of JavaScript? That is, if I do not know the name of the cookies, but they want to get all the information. You can list cookies for the existing domain: Function list cookies () {var thecookies = document.cookie.split (';'); Var aString = ''; (Var i = 1; i & lt; = the.cookies.length; i ++) {aString + = i + "+ thecookies [i-1] +" \ n ";} back aString;} But you can not list cookies for other domains for security reasons

iphone - UILocalNotification Or EventKIt -

Is there any way to trigger any kind of work based on a date type. My problem is that I want to play sound (alarm) on a specific date, it works fine using UILLocal notifications, but it plays a little sound, and I want to play an infinite sound instead. How can I achieve this goal .. Waiting for your initial reaction. Thanks This property indicates that this property only plays for maximum 30 seconds. It seems that is ignored for more than 30 seconds and instead the default sound is played. When adding custom sound, be sure that the sound is in the right format (linear PCM or IMA 4) You can convert it to wav and mp3 using : afconvert -f caff -d LEI16 @ 44100-c 1 in.wav out.caf If you were wondering what is afcomvert .. it is nothing but The command line program is the CAF container format. Sometimes the emulator will not play custom sound, but the device does.

android - Preserve newlines when parsing xml -

I am using a SAX xml parser to parse some XML data that contains Newline. When using Attributes # getValue, how can newline data be lost, keep Newline? You can use this code when the string is parsed: IISOC control (CH [I)) for content public void letters (four cr [], int start, int lang) {for (int i = start; i & lt; tall; i ++) .append (ch [ I]); }

python - Decorating a method -

In my Python app, I am using events to communicate between different plugins. Now, instead of manually recording the methods of events, I thought I could use the decorator to do this for me. I want to look like this: @ Events.listento ('event.name') def myClassMethod (auto, incident): ... I have tried to do the following: When I call myEventManger.listen ('event', self.method) Inside the example, everything is going fine. However, if I use decorator approach, then self is never passed. After searching for a solution on the Internet, use whatever other effort I have made, use a class as a decorator: listen to the class (object ): Def __init __ (self, method): myEventManager.listen ('frontend.route.register', self) self._method method = ._name = method .__ name___self_self = any deff DD ___ race (___ Self, example, owner): self._self = examples itself back self-def __call __ (self, * args, ** kwargs): return self The problem with this appr...

pep8 - python: how should I write very long lines of code? -

If I have a long line of code, is it possible to continue it on the next line: / P> url = 'http: //chart.apis.google.com/chart? Chxl = 1: | 0 | 10 | 100 | 1,000 | 10,000 | ' + '100,000 | 1,000,000 and CXP = 1,0 and CXR = 0,0, '+ Maximum (Freak) +' 300 | 1,0,3 and Caxs = 0,676767,13.5,0, L, 676767. 1, 676767,13.5,0, L, 676767 & amp; Chxt = y, x & amp; Chbh = a, 1,0 and chs = 640x465 and cht = BVS & amp; Chco = A2C180 & amp; Chds = 0,300 & amp; I will write it like this Code> url = ('http: //chart.apis.google.com/chart?chxl=1: | 0 | 10 | 100 | 1,000 | 10,000 |' '100,000 | 1,000,000 & amp; chxp = 1,0 & amp; ; Chxr = 0,0,% (Max_freq) s300 | 1,0,3 and chxs = 0,676767 '', 13.5,0, L, 676767 | 1,676767,13.5,0, L, 676767, and chakk = y , X and PHH = A, 1, 0 & amp; chs = 640x465 '' and amp; cht = BVS & amp; chco = A2C180 & amp; chds = 0,300 & chd = t: '% {' max_freq ':' ...

sql server - How to use PHP's odbc_connect() to connect to an ODBC DSN on another host on the same LAN? -

मैंने सफलतापूर्वक PHP के odbc_connect () के द्वारा एक SQL Server 2005 एक्सप्रेस डेटाबेस के माध्यम से एक Windows Vista बॉक्स पर कनेक्शन का परीक्षण किया है निम्न कोड: $ कनेक्ट = odbc_connect ("mssqllocal2", "", ""); // पहले आरजी सिस्टम DSN है जो कि मैंने विंडोज पर कॉन्फ़िगर किया है यह कनेक्शन ठीक काम करता है जब उसी विंडोज बॉक्स पर WAMPserver के उदाहरण से निष्पादित किया जाता है हालांकि, मैं एक ही ओएनबीसी DSN से उसी लैन पर एक अन्य मशीन से कनेक्ट करने में सक्षम होना चाहता हूं- इस विशेष मामले में, एक आईमैक चल रहे एमएएमपी और ओएस एक्स 10.5। अंत में, मैं एक दूरस्थ सर्वर से एक ही DSN से कनेक्ट करने में सक्षम होना चाहता हूं, लेकिन बाद में इस परियोजना में। क्या इस तरह से कुछ सिंटैक्स हैं जो मैं कर सकता हूं का प्रयोग करें: $ कनेक्ट = odbc_connect ("192.168.0.55:mssqllocal2", "", ""); ... या क्या मैं ओडीबीसी डेटा स्रोतों के कुछ बुनियादी सिद्धांतों को गलत समझता हूं? इस तरह से किसी अन्य मशीन पर सीधा कनेक्शन करने का को...

c# - Enumerating Linq.Xelement -

RESPONSE is no more string, but how to adjust this code to work on Linq.Xelement? string response = "any XML data"; XmlDocument xmlDocument = Load XML Document (feedback); XmlNodeList nodelist = xmlDocument.GetElementsByTagName ("fql_query_response"); If (node ​​list! = Null and node list, calculation & gt;) (if (node ​​list [0]. Childnodes) {XmlNodeList result = xmlDocument.GetElementsByTagName ("event_member"); dictionary & lt; string, eventUser & gt; EventUserDict = New Dictionary & lt; String, EventUser & gt; (); Forresh (XML in Consequence node) {myuids.Add (Int64.Parse (node. First Child.Intext))}} You can use XElement.ToString () XElement to create an XML string that you can write in your XmlDocument Can load: XmlDocument xmlDocument = LoadXMLDocument (yourXElement.ToString ());

mvvm - Binding a save command WPF -

I have 3 text boxes in a grid - this is my view - and I have a Save button In my user list with datas from the text box, I want to use a relay command to do this on my view-model class, but I'm quite confused about how to bind. I hope it is quite clear that any thoughts or examples can be useful thanks in advance. You should have something like the following: class UserViewModel {public string name {get; Set; } Public string password {get; Set; } Public String Email {get; Set; } Public Relations AddUserCommand {get; Set; } Public User Review () {AddUserCommand = New Relay Commands (AddUser); } Zero AddUser (object parameter) {// code to add user here. }} And you can use it like this: & lt; StackPainel & gt; & Lt; Text box text = "{binding name}" & gt; & Lt; / Textbox & gt; & Lt; Text box text = "{binding password}" & gt; & Lt; / Textbox & gt; & Lt; Text box text = "{binding email}" & gt;...

"ffmpeg": java.io.IOException: error=24, Too many open files -

I am working with ffmpeg to create a preview, but I get this error in the middle of the execution of my program : "ffmpeg": java.io.IOException: error = 24, many open files Does anyone know how to solve or how to avoid it ?? For piece code where I use ffmpeg: for (int j = 0; j & lt; temp.length; j ++) {if (j == 2 ) {String preview = temp2 [i] + temp [j] + ".jpg"; Process p = runtime.gettimetime (). Exec ("ffmpeg -i anotados /" + temp2 [i] + "-r1-s 00:00:" + temporary [j] + "-t1-s 158x116 spec" "+ preview); TextOut.write (preview + "\ n"); }} view your ulimit -n output See how many open files are generated from that shell, there were 20 files of the historical Unix system, but there are default 1024 open files on my Ubuntu Desktop. You may need to increase the number of open files allowed in / etc / security /limits.conf file or, you have to shut down your application more aggressively The open f...

android - Setting zoom controls for Image View -

I'm new to Android, I need to zoom in selected selected image views in the array defined in my code. How do I get it? Like I said: image view has no built-in zoom control. Please use the search option before asking a question, you will get your answer: There is no way that is mentioned, though there is no implicit in it.

django string format -

यदि मैं इस में एक चर% s को सम्मिलित करना चाहता हूं & lt; p & gt; & lt ; आईएमजी src =% s alt = "tetris" / & gt; & lt; / p & gt; मुझे समस्या है कि अगर मैं "% s" का उपयोग करता हूं, तो उसे इसे प्लेचिल्डर के रूप में पहचान नहीं किया जाएगा लेकिन अगर सिर्फ % s का उपयोग करें तो यह मेरी छवि से लिंक नहीं होगा क्या इस के आस पास कोई रास्ता है? मैंने उस यूआरएल को सम्मिलित करने की कोशिश की जिसमे इस तरह से डेटाबेस '' / url / '' में डाला गया है। लेकिन ये तो चाल भी नहीं करते हैं किसी भी सुझाव? @ थॉमस: gt; & lt; / p & gt; & Lt; / body & gt; शायद आपको टेम्पलेट्स में देखना चाहिए जो डीजेंगो के साथ शामिल हैं I वे अधिक आसानी से बनाए रखा कोड के लिए बनाते हैं। Django.shortcuts आयात से आयात render_to_response django.template आयात RequestContext def दृश्य (अनुरोध): उपयोगकर्ता = request.user वापसी render_to_response ('template.html' , और फिर अपने template.html फ़ाइल में आपके टेम्पलेट्स निर्देशिका: ...

mootools - Increasing value of Javascript Variables? -

IM processing links to mootools with click events. I have this pattern ID in my HTML: eg toggle_NUMBER Toggle_1 Now I get an ID with this peace of code $ id ($) (this.get ('id'). Replace (togglePrefix, emptyPrefix)); My problem starts now: I remove the prefix like this var TogglePrint = 'toggle_', boxfix = 'page_', Emptyprint = ''; So what should be a simple number like 1, 2 or 3 should be. Now I have tried to increase this number by one var id_new = parseInt (id) +1; But that did not work and I do not have any clue how to change it! The variable "id" is an object, because mootools (and jquery) returns the value of $ function in a The object is. Try it: var id_new = $ (This) .get ('id'). Replacement (toggle profiles, emptyprints) + 1;

windows - Requesting Administrator privileges during runtime -

How can I request administrator privileges during the runtime so that the user is prompted to allow or deny it? This information is written in the exe file manifest, for the requested execution level field Should be used (but not sure about it - try setting it to highest available and see what you want). For example, here for more information (somewhat older articles but still valid): There are tools in Visual Studio that allow you to embed your own manifest or even edit it. Can also do Apart from this, there is also a tool written in Pearl (). Edit: See this article for more information:

wordpress - WP: writing an admin plugin for managing custom content -

One of my clients have a site in WordPress, a directory of a section agent that has separate text and video Are connected with them Customers want to be able to easily add / delete / change these administrators from within the WordPress Admin Interface. These agencies will be anywhere from 50-75, so each page is not very attractive manually. We have 3 agents currently posted, and I think we can store additional information inside the post, so there is no problem. What we want to create is a simple way to manage those pages where the content can not be changed by the guardian, and additional fields on the post are hard-coded so there will be no room for user error. What am I interested in if someone has done such a thing in the past and can share his attitude and experience, or if someone can tell me in the right direction how can I complete it and What do I need thanks Yes, custom post types are the perfect fit for your needs. Here are some of the links to the articles...

php - regex int or float -

मेरा regex एकल अंक नंबर पर काम नहीं करेगा / ^ [0-9 ] {1,7} \। [0- 9] {1,2} $ / मुझे अहस्ताक्षरित संख्याओं पर काम करने की आवश्यकता है: 1 (एक अंक संख्या, बिना भिन्न अंश) - वर्तमान में यह 1.0 पर विफल रहता है; 0.31 (फ़्लोटिंग पॉइंट नंबर) अंश से पहले 1-7 अंक हो सकते हैं; अंश 1-2 अंकों के बाद। धन्यवाद! आप निर्दिष्ट कर रहे हैं कि 1-7 अंक होने चाहिए, फिर एक वैकल्पिक दशमलव बिंदु, फिर 1-2 और अंक। कोशिश करें: / ^ [0-9] {1,7} (?: [[0- 9] {1,2})? $ / ध्यान दें कि यह दशमलव दशमलव स्थानों (यानी "1.") की अनुमति नहीं देता है। यदि आप इसे अनुमति देना चाहते हैं, तो यह काम करना चाहिए: / ^ [0-9] {1,7} (?: \। [0- 9] {0,2})? $ /

zooming - Android: Can I use a zoom control in an imageview? -

क्या मैं छवि दृश्य में जूम नियंत्रण लागू कर सकता हूँ छवि दृश्य में एक अंतर्निहित ज़ूम नियंत्रण नहीं है। कृपया प्रश्न पूछने से पहले खोज विकल्प का उपयोग करें, आपको अपना जवाब मिलेगा: जिसमें उल्लेख किया गया है कि कोई रास्ता नहीं है, हालांकि इसमें कोई अंतर्निहित नहीं है। उदाहरण के लिए, खोज के लिए इसे आसान बनाने के लिए कृपया अपना शीर्षक सुधारें: एंड्रॉइड में एक छवि दृश्य को ज़ूम करने का एक तरीका है

configuration - Zend Framework - Loading View Helpers from Modules -

I want to get to load a modular application and module-specific view helpers in an'm putting with Zend Framework I'm struggling. My directory structure is ... application --- configuration --- controllers --- forms --- layout --- model --- of module Is like --- --- User --------- Controller --------- form --------- Module --------- View - ----- ------ Filter ------------ Helpers --------------- currentUser.php ------- ----- Script --------- Bootstrap.php --- Thoughts --- Bootstrap.php Basically I think that in currentUser.php I want to use Visual Assistant but when I put I get an error stating that the file was not found. Do I need to load these assistants to add to my config file? My config this ... is something like Autoloadernamespaces [] = "Zend_" Autoloadernamespaces [] = "Default_" Autoloadernamespaces [] = "user_" phpSettings. display_startup_errors = 1 phpSettings.display_errors = 1 includePaths.library = APPLICATIO...

Problem in updating page wise total in JSF datatable when using RichFaces datascroller -

"postprint" itemprop = "text"> I'm creating a datatable column in my JSF page which reveals each column footer with a total of values ​​in column page wise . I am using richfaces to datascroller paging. When I click on the next page in Richfaces datascroller I need to update your footer with a total of column values ​​in the page, which is now a problem for me I have been able to prepare the code to calculate paged total by following this discussion When the page with the dataset load, I managed to see the total columns correctly. When I click the dataset on the next page, the same value remains. For example, when the first page column is a total of 5 and the second page is 3. I have been able to show 5 correctly, when I need it on the next page, click to update to 3, but 5 remains unchanged. It appears that when I click on the next button in the datascroller, then only the idle is removed. Is there a way in RichfAS or JSF to update the footer...

java - how get the Geographic location values of Preference panel of IBM Sametime -

itemprop = "text"> I am using IBM Sametime 8.0.2. The geographical location link in the preference panel of the file menu contains some fields, such as a personal address, city, postal code, etc. I can use values ​​of these fields in Java program or without Sametime SDK (without using any plug-ins). is an article which is to create a space awareness plugin for Sametime. Get the location information to display weather information since the plugin is enabled, I think it might be what you want.

iphone - Convert date string to required date string format -

I have parsed the .ics file and getting the start date as a string, values ​​in the string are 20100803T130451Z (It is a date dated string), I want to convert this string to my required string format .... My date is the required format of string (Tuesday - May 25, 2010 (by this way) ) Can anyone help me? Thanks in advance ..... Ole well, here's some sample code. This: NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [DateFormatter setDateFormat: @ "yyyyMMD'T'HHmmss'Z '"]; NSDate * date = [dateFormatter dateFromString: dateString]; should convert to NSDTing's NSDT. You can change NSDateFormatters dateFormat to get your desired date format. Like this: [dateFormatter setDateFormat: @ "dddd - MMMM dd, yyy"]; NSString * myNiceLookingDate = [dateFormatter stringFromDate: date]; [DateFormatter release]; This should work, although I have not tested it, but it will get the result of the least result. Fun, ...

c# - How to capture file upload data from web page external to an ASP.NET site using .NET -

I know how to get the file from the client using standard ASP.NET techniques, however, I Data needs to be retrieved from a third party web page written in basic HTML and ASP.Net can process file data in web application. So if the original HTML looks like this ... & Lt; Input type = "submit" value = "click" /> & Lt; / Form & gt; How do I obtain file data in the page referring to the action attribute of the form? So far, I have tried the following code, which allows me to use the filename - but there is no byte stream of the file. Secure Zero Page_load (Object Sender, EventArgs E) {string fileName = Request.form ["fileUpload1"]; // no files appear in the request. The collection of files in the code below. Forward (string file files in request) {HttpPostedFile HPF = Request. Files [File] as HTML posted file; If (hpf.ContentLength == 0) continues; String savedFileName = Path.Combine (AppDomain.CurrentDomain.Base directory, path.g...

c# - Reflection and attributes -- removal? modification? OR windows service in full trust? -

I want to remove security permissions from a class for which I do not have access to the source. Is it possible, through reflection, to remove or modify the attribute? [... Permission Permission (ProtectionActionExpressionDemand, name = "Full Trust"), PermissionsSat (SecurityAction.LinkDiamond, name = "Fullstrost")] Something After the idea, it has happened to me that perhaps this approach is wrong for the problem. Is there a way to run a windows service on a trust so that its permissions can meet the above demands? No - The .NET reflection is read-only. If you want to edit an existing assembly, see, however, remove an attribute & amp;

python - Implementing workflows in Django Admin - Django -

I have a good admin panel setup so that users can manage the data within the site. There is a problem As the question The model is just one, I am trying to integrate a boolean 'accepted_for_blurbing' field and the 'Totmaney Fields' star of a lot of' interrupts within this Admin panel. If there is some opinion on a topic that would be really amazing =) A few times ago I did the same functionality. Here's what you have to do: Create an acceptance status model, and there are different forms of approval, that is, each model object shows different acceptance steps. Apart from this, you must have a Statisticsist model that indicates that the current situation is according to your article (for example). class articles (model. Model) title = model.heldfield (max_language = 32) body = model. Textfield () class acceptance status (model.model): name = model.carfield (max_lamp = 32) alias = model.carfield (maximum_language = 32, pk = true) stat...

ROWDEPENDENCIES Overhead in Oracle -

I am using a change capture architecture for ETL processing which is based on ora_rowscn, and source with ROWDEPENDENCIES The tables are reproduced separately to modify only those rows of SCN (unlike block-level tagging). I have an extra 6 bytes / space overhead information, but I am not sure what the other effect will be on it. My question: What will the RDBMS engine be able to do with the hard work for duties and rollback? For my source tables with 100 to 500 rows / blocks, I realized that I would have to write the number of SCNs 100-500x (for our typical commets), but do not I have any other side effects? As part of a set of changes in optimization replication, Oracle introduced Rovedependencees. It does not seem that if they make an impact on the performance, then moving forward. Surely I have not read anything. Unknowingly, Tom Kitta, without any warning or warnings (beyond mentioning six bytes), if others meet, I'm sure he says so.

arrays - php var_dump() vs print_r() -

What's the difference between var_dump () and print_r () In the case of excluding an array in the form of a string? var_dump function displays type and Structured information about variables / expressions including value Sorted values ​​are detected with the values ​​indented to show the structure. It also shows which array values ​​and object properties are references. print_r () displays information about a variable that is readable by humans. The array values ​​will be presented in a format that represents keys and elements . Similar notation is used for the object. Example: $ obj = (object) array ('Quality point', 'technique', 'India'); var_dump ($ obj) will display the output below the screen. object (stdClass) # 1 (3) {[0] = & gt; String (12) "Quality Point" [1] = & gt; String (12) "Techniques" [2] = & gt; The string will be displayed below the output in the string (5) "Indi...

java - Android sdk & timers (Chronometer vs. Thread) -

There are a few ways to open a timer using the Android stack, a good example. I would like to integrate the timer applying the timer (a thread) by using the sleep-method method I plan to serve and communicate with a pouch I am making It depends whether it is sensitive to lifecycle if your activity or service If you will be stopped, then consider that your timer will be stopped. There are so many examples on this site.

language agnostic - Interesting algorithm problem -

I have an interesting algorithm problem related to the problem of simulation of electronic designs. Say for example, I have a gate in which there are some gates. A 3-Input and Gate say, out of these 8 inputs, if I only feed in two inputs ( 000) and (111) , both of me Potential output i.e., 0 and 1 is available. So the minimum set of these input vectors, which produces both '0' and '1' on production, are {000, 111}. The problem has been given a design, some gates arrangement, to find the minimum set of algorithm input vectors which produces both states (i.e. 0 and 1) on the final output. is equivalent to solving your problem. That's why NP-is complete. To get an input, you can select an arbitrary input and see if it will say 0 or 1. For the input that gives the second output, you get the SAT Solver. Wikipedia has some suggestions that can be used: etc ... If you do not want to apply it, then there are tools that are ready-using S...

Displaying Flowcharts in Asp.net -

I have a ASP.NET I want to display some data relationships as flowcharts (from an XML, for that matter) It is not necessary that a freeware should be (though it would be good). Do you recommend that I use it? Edit: According to the relationship, arranging nodes locations automatically will be a big advantage. I do not claim to be an expert on this, but I want to search the Web I spend a reasonable time around. Finally, I found an awesome javascript engine to do this: jsPlumb This will do some work from you, but the examples are very good . Should be able to do whatever you want.

sql server 2005 - Copy autoincremented datatable -

मेरे पास मेरे टेस्ट डेटाबेस डेटाबेस वाले टैग हैं। ID int autoincrement नाम nvarchar (255 ) मैं इस तालिका को अपने प्रोडक्शन डाटाबेस में स्थानांतरित करना चाहता हूं। अगर मैं एक ही आईडी वस्तु को प्राथमिकता देना चाहता हूं > समस्या यह है कि testdatable पर मेरा प्रारंभ सूचकांक 15 है, और कुछ आईडी मौजूद नहीं हैं क्योंकि मैंने उनका हटा दिया है। ऐसा: स्थिति में टेस्ट स्थिति 15 खेल 18 पैसे 30 होमवर्क उत्पादन डेटासेट पर वांछित स्थिति 15 खेल 18 पैसे 30 होमवर्क शुरुआती उत्पादन डाटालेट खाली है, और यहां तक ​​कि autoincrement भी है। पर identity_inert सुविधा का उपयोग करें नई तालिका में डेटा डालने से पहले गंतव्य तालिका। SET IDENTITY_INSERT आपकी न्यूवेबल (आईडी, नाम) का चयन करें आईडी पर नाम दर्ज करें, आपकी ओल्डटेबल SET IDENTITY_INSERT से नाम आपका न्यूलाइट बंद

java - Is it possible to forward or redirect from a servlet filter after the response has been committed? -

The argument is that the filter gets hit, the position is not correct, so it goes through the filter chain. After the reaction, the filter gets hit, and the situation is now true (request feature was set). It goes into forwarding, but the page never goes forward. I know that something like this is being done with this reaction because I have tested various arguments, from where it first goes ahead before killing the chain, and it comes forward successfully. public void doFilter ServletRequest request, ServletResponse response, FilterChain series) IOException throws, ServletException {HttpServletRequest httpServletRequest = (HttpServletRequest) request; If (some condition is equal to true) {httpServletRequest.getRequestDispatcher ("/ home.jsp"). Forwarded (request, response); Return; } And {chain.doFilter (request, response); }} Example of my deployment statement: a HttpServletResponse is actually One way to say that feedback headers are written in the under...

user interface - Is there any framework that allows me to develop applications for Qt and GTK? -

I'm thinking of something that would allow the GUI to develop applications independent of the library, but Qt and GTK is required to plug plug in as plug-in. I use QT only, it includes a GTK style, copying the GTK standard dialog And the GOT file uses dialog, if it runs under the genome, basically it integrates itself into GTK (except for GTK), or at least it improves itself in GTK in GTK Q Does.

osx - Rsync bash script and hard linking files -

I am creating a Bash script for backup with my files rsync Backup all one I just want to back up new or modified files that come from the directory. Currently, I'm asking rsync to backup, and to check the files in comparison to the last backup. The way I am doing this THE_TIME = 'date' +% Y-% m-% dT% H:% M:% S "` rsync -ap - link-dest = / backup / current / usr / home / user / backup / backup / backup- $ THE_TIME rm -f / backup / current LN-S / backup / backup- $ THE_TIME / backup / current I believe that the syntax for this is correct. Every backup will check against the "current" folder, and upload it only as upload, it will then remove the current folder and the symlink to the new The minimum will recreate the backup. I get an error when I run the script: rsync: link "/ backup / backup-2010-08 -04-12: 21: 15 / dgs1200series_manual_310.pdf " => / backup / current / dgs1200series_manual_310.pdf failed: operation not supp...

eval - clojure resolving function from string name -

In Closer 1.2 RC1, I want to get the function based on string name and evaluate it. Function definition (ns my-ns) (defar mycar [x] (first x)) : ( ((ns-resolution * ns * (symbol "maakar")) '(3 4)) ((trainee * ns * (symbol "mikekar"))' (3 4) ) ((Ackell (symbol "MAKER")) '(3 4)) But are they looking ugly any better way? If not, who is the most idiotic? It worked for me without using eval: User & gt; (Defar mycar [x] (first x)) # 'User / MICR user & gt; [1 2 3]) 1 This works because the resolver finds the maker var in the current namespace and forces the var function. This is a small version of your first example. I will only use it so that I can not use eval.

PHP - LaTeX rendering -

I am in the design phase of a new project which will take a data set and load it into a document, then a template The surrounding document can be a data set of CSV, a PDF marketing letter, an email, ... provided file. Data math equation will not be there, I'm looking at a great way to add multiple data sources to many documents and output in multiple templates I'm totally in the dark here, Is there something like that? Instead of allowing decisions between PDFs, CSVs, raw text etc., most of the ways of finding a plugins are focused on converting the latex equation into a PNG ... Alternatively, Can I do something else with this? Post-text "itemprop =" text "> I have applied the years of such an approach (2002) with the preparation of Smarty templates and PDFs first, CSV, HTML, XML (there will be no problem via a smart template) ...... so with the same data .... maybe you can see an FPDFIR ... Edit: Can you take a look at this (maybe there is a PHP pe...

upgrade - Upgrading from Eclipse Galileo to Helios -

What's the best way to upgrade from Galileo to Helias, while preserving my settings and plugins? Thanks The definite way to upgrade is to perform a "parallel" installation : A Helios Eclipse beside Galileo you already have. Regarding your settings, you need to refer to the same workspace. In your own, tell what your work place is, and you will get back all your projects, workplaces and perspectives, you have left them. Plugins are trickier, and I would recommend: Adding to your eclipse.ini Gallery's installations share one of the dropins. View In your shared dropin path, you will have: my-eclipse-galileo-plugins Eclipse Features Plugins And you will be added after all additional plugins and features. Establishment of your Eclipse Galileo instance: to / galileo eclipse utility plugins

c# - how to override ListView Items Property without creating new control? -

How to override the list view item property with no new control? You should probably set the list weave. Instead of overwriting the property, if necessary, if you are updating it many times, check ListView.BegginUpdate and ListView.EndUpdate. Edit : After all, set ListView. Along with this, ListView.Text changes, and vice versa. Apart from this there is also other harmony.

How to raise only 1 Timer event in C#? -

How do I get a timer event to set fire to a bar? For example, I have a timer that increases the event every 10 minutes takes 10 or more minutes to execute the event to be raised. I have to reset the timer after the event has ended. In other words, I do not want to extend more than 1 incident of incident at any one time. What I usually do, my event raises the timer when it wakes up and then the event Restart the timer when the process is complete: Private zero timer handler (object sender, timer AppleAut ARGS E) {Timer timer = (timer) this; Timer.Stop (); RunProcess (); Timer.start (); } Public Zero Run Process () {/ * Content that takes longer than my timer interval * /} Now my timer will resume when the process is completed

c# - Autofac - resolving component with parameters dynamically -

I have a class that takes the interface as constructor logic. There are two implementations of this interface and I have to decide which implementation to use based on a variable runtime. The problem is that the above class is deep in any object succession which is solved by autofak I can not pass in logic. Something like lowering down what I'm trying to achieve. Public Interface IInterface1 {} Public Interface IInterface2 {} Public Class Class1: IInterface2 {Public Class1 (IInterface1 interface1) {}} Public Class Class2 {Public Class2 (IInterface2 interface2) {}} Public Category Class3 {Pure Zero GetClass2Instance (String interface1ImplementationToChoose) {// IInterface1 which is resolved based on the implementation is resolved Interface 1 Implementation Tutorial Variable var class2 = Container. Resolute & Lt; Class 2 & gt; (); Any ideas? Update: To clarify, this is an existing object hierarchy that is used by existing applications that work fine. In addition, ...

c++ - Is it more efficient to use boost::asio::basic_stream_socket::async_read_some instead of boost::asio::async_read? -

Better to promote: asio :: basic_stream_socket :: instead of promoting async_read_some :: asio :: async_read When it comes to high performance data throughput? Promotion :: asio :: async_read is a compact operation, / P> This action is implemented in the async_read_some function of the stream as zero or more calls, and it is known as a coordinated operation. Ensure that any other readable operation (such as async_read, stream, until the completion of this operation of the stream Async_read_some function, or any other processed work that reads). Any performance findings should be based on empirical data based on your application.

How to access a FDF through a java HTTP request -

I have a PDF form with the submit button, submit submit button to send the FDF to the deposit field with the url. She goes. A Java class is run when this URL is accessed. A PDF in PND is a field when I use the HTTP request object to get the field, how FN can I get FDF data in my Java class. I have included the JFDFTKZ file in my class path. If you are testing on Windows, HTTP traffic address between your PDF and server-side code Try something like applying. Then you should be able to see if the value is actually sent by the PDF you expected. If you are sending the field, then post your Java code so that we can see how you are handling HTTP requests.

javascript - node.js multi room chat example -

I'm looking for a websocket / node.js chat implementation that supports multiple rooms. I'm going to write an app that requires many rooms or servers, and I'm just looking for some code samples that how people do it. Thank you. I know a service that provides this service, but I am looking for an open source example. I realized that you have not yet solved your problem, to see this question Suggestion where I replied:

jquery active menu -

I have a question, I have a menu and I want to add some jquery so that a separate layout in the active menu tab Compared to the rest, here is my code: & lt; Div id = "menu" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; Div id = "start" & gt; & Lt; Span & gt; Start & lt; / Span & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li & gt; Div id = "menuhome" & gt; & Lt; A href = "index.php? Page = home" & lt; Span & gt; Home & lt; / Span & lt; / A & lt; / Div & lt; / Li & gt; & Lt; Li & gt; & Lt; Div id = "menuvoorstellingen" & gt; & Lt; A & gt; & Lt; Span & gt; Voorstellingen & lt; / Span & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li & gt; Div id = "menuwinkelwagentje" & gt; & Lt; A & gt; & Lt; Span & gt; Winkleva...

android - How to to store http-cookies between sessions -

I'm developing an app that logs on to the web site. To do this, I use the HTTP client object. I saw that I can get all the cookies from the post requests with the HttClient.getCookieStore method, but the question is how do I save these cookies so that the next time the app has started, There is no need to log in. I should also mention that when the login post was requested, the rest of the site receives most of the requests? Thank you.

android wake-up action -

Does anybody know that it is possible to force an app to start automatically when applying external power - that is the following scenario: App is running (with permanent external power supply, this will not be a 'mobile' app); - For some reason the external supply fails; - The battery runs low, so the device stops; - Starting external supply; - The app must start automatically, without pressing the Home button or touching the screen, the device will be accessed without access. Will this action be different on the basis of manufacturer's hardware? From your description, your application is always running, so when you apply external power Why do you want to start? If your Android device actually stops, then I think you want to start your application on boot. In that case, you will need to type an Android BroadcastReceiver which gets the effect android.intent.action.BOOT_COMPLETED . When your receiver is called, you can start the application that you want in the...

linux - Scaling a Ruby on Rails site -

I am developing a Ruby on Rail application and want to deploy in a production environment. I have many equally configured Ubuntu web servers that I can use but I do not know how to scale ROR app and DB data in many hosts. I would like to have both a web server and a DB server on each host. On the Web server / Ruby middleware side, I want to control the sessions. A master web server that balances the load on the web server / ruby ​​middleware layers should shut the new session for free hosts I need to load the load on the web server / ruby ​​middleware. I should have web / middleware sessions atom (I am not interested in copying them in many hosts) Mu Sector transactions that keep transaction data which is intermediate re-log-in to run again in case of failure-recovery. In the DB layer: I want to duplicate DB data on one host 2 for other hosts (3 DB hosts in each DB set) I do not have to replicate duplicated DB data in all hosts because it takes a very long time. I l...

javascript - Finding start and end tags in string using regex -

I am trying to parse an HTML file (non strict one) using javascript My output should be the same HTML file, but I have any & lt; Script & gt; & Lt; / Script & gt; The internal contents of the tag need to be processed I think any & lt; Script / & gt; will not tag I is a method processScript (script) . I have a very clear idea of ​​how this is using only split () , but I wonder if I can improve it using regex ? Parsing the HTML with Regex is not usually the best way to do this. getElementsByName ('script') and see in DOM parsing, I also suggest looking at instances of w3schools to start you in the right direction. There are so many reasons that this is a better way, some of them are 1) Javascript is already DOM object support, and it is much easier than Reggae and 2) Open / close Tags matching language (similar to matching feet / brackets / etc) is not a regular language.

javascript - Buggy Behavior using Canvas? -

I'm making a game using the html canvas This is my progress: (Use WASD and left / right arrow key) to help zoom. My questions are: > Why is the shading shadows in Google Chrome when the tank is changing? Why is the turret's flicker in Safari when the turret is closed? Why does this work properly in Firefox? The image of the tank and the turret image are plain old PNG using those pictures, the shadows are dynamically created, the shadow image is not objects, but canvas elements are there. The only hassle occurs when I am changing the rotation of the image. When I say flicker, I mean that the image shrinks and looks increasing very fast, when the flicker turns off rotating, then it gets slipped. What's going on here? Is this a problem at my end? Regarding playful issues, you do not think your canvas double buffering, so this is possible because the tank Before the ground or shadow is drawn and a screen is refreshed before pulling the tanks and t...

multithreading - How does a computer use just a few registers? -

I have a bit of information about the assembly, and that 4 or 8 are general purpose registers in all the computer programs Work with that amount of registers, especially with multithreading and everything? Multi-threading does not affect the number of registers in use. When a thread is swapped, its registers are usually saved in memory and those registers are loaded with their previous save to run the next thread. Example System TCB with a thread control block structure). In this structure (when thread was not running), saved instruction pointer, stack pointer, general purpose registers, floating point registers, thread data and so on. In essence, it is necessary to completely restore the thread in that position when it used to run another thread. And whatever goes on in the computer, this is not done in the registers. Modern compiler can optimize the code so that the data items used in the data are kept in the registers, but most of the data is stored in the memory and on...

windows - Access a COM interface from a service (apache) with PHP -

I am trying to create a PHP script that will run on a locally hosted web server, and access it I will be able to do various programs on my computer through COM I have achieved mixed success and failure, and I am capable of reducing the problem. If I run a php script using php.exe, then it works. If I run PHP, it uses a script that runs an ePATH from the command line, it works. If I run PHP scripts using the APH service, it fails. I am running Windows 7 Pro x64, apache 2.2, PHP 5.3, and the special program I am trying to use is MediaMonkey, my music player. Any thoughts? If I have to do then I can run the server without service, but I want to explain it. There is not a Windows 7 box in hand, (I'm actually seeing an XP box), But there is a possibility of something like this: Administrator Tools Right click on your Apache web server service and select Properties. To log on as a local system account, here should be an option (possibly on the logon tab) and ...

c# - hybrid algorithms in energy efficiency for wireless lan -

I am looking for a hybrid algorithm in energy efficiency for wireless LAN. I see an example of this code in C, CPP, Matlab or any other language which I can easily use. I am already writing RSA and ECC algorithms, but I have no idea how hybrid algorithms will help me in this problem? RSA = Rivest Shamir Adelman ECC = Elliptic Curve Cryptography