Posts

Showing posts from May, 2011

WAS 6.1, Hibernate, Spring and transaction managmement configuration -

I am using websphere application server express v6.1 and I am writing an application that is a spring 2.0.7 Uses, Hibernate 3.5 My dataset is Oracle 10G. I have 2 questions Which is the best transaction manager? Is Websphere or Hibernate? If IBM is answering then how do I configure it in spring configuration XML? This is my current declaration for hibernate & lt; Bean id = "transaction manager" category = "org.springframework.orm.hibernate3.HibernateTransactionManager" & gt; & Lt; Property Name = "sessionFactory" ref = "rmsSessionFactory" /> & Lt; / Bean & gt; What does this look like for Websphere? You should pip your transaction through JTA, even if you have a different implementation behind the scenario Using (Hibernate, webpage, weblogic, etc.) Ideally, it should look like this: & lt; Bean id = "transactionImpl" class = "org.springframework.transaction.jta.WebSphereTransact...

regex - Using map() to get number of times list elements exist in a string in Python -

How often am I trying to get every item in a string in Python in a list: / Code> returns [2, 0, 0] What I have to do but extend it, so I can feed the paragraph value in the map ( ) Function. Now, the tester () function has a hard paragraph, is there any way to do this (maybe make an en-long list of paragraph values)? Any other ideas here? Keep in mind that at any given time in the future, one of the array values ​​will be weighing - so instead of keeping the prices in the list, all need to keep together. / P> Update: Article will often be 20K and the list will often have 200+ members. My thinking is that the map runs in parallel - so it will be more efficient than any serial methods. There is a reaction to the movement of targets ("I probably need reazes because I have a near future Word delimiter will be required "): This method parses text to get a list of all times" word ". Each word is seen in a dictionary of the target words, and if it...

filter - Best data structure for search? -

I have a list with items where each has the number of properties (A, B, C, D) Filter (A, B, C, D) using the template with the same feature I want when I use a template I would like to filter all items that match this template. The match is assumed that if the item is equal to the template or after the smaller (matches 0 items). Example Data ABCD 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Example templates [2 0] will filter {0 0], [2 0]} [2 0 2] will filter {[0], [2] 0], [2 0 2]} [2 0 2] will filter {{0], [2 2 2 1]} [3 4 5 6] filter will [0]} [0 0] filter {[0], [0], [2 0 2], [02 0]} The problem is that the number of comparisons easily reach 300k And sometimes it can be slow, what can I use to make things quicker? Any ideas? Keep all items in 16 buckets, assuming 4 properties. The first bucket, where there is no zero-value for the properties. Selecting from here - General Lookup based on Key ABCD The second bucket is where property A == 0. Selecting from here is a lo...

windows - OpenCV videos across platform -

I am writing a video on Linux machine using OpenCV . I want to read the same video on Windows machine using OpenCV I am not able to use the standard codec provided in openCV . Can someone suggest how can I read / write videos in two platforms? OpenCV wiki directly addresses this issue. Unfortunately, only codec 'DIB' supported on all three platforms (Linux, Windows and OSX) are 'I420' and 'IUUUV', which are all uncompressed video codecs and thus really create large file sizes. Also lists some codecs in the wiki which can work on any two platforms, but not all three. If you decide to use uncompressed video files, you can convert them to something with a small file, like they are on your windows machine just like the program. Edit: FYI, I have given OpenCV output in Motion-JPEG, and then I would like to correct a bug with the movie's index Use virtualdube to retrieve directstream copy mode. These M-JPEG video files then play on Mac and W...

rails renaming associations -

मेरे पास दो मॉडल, ट्रीएनोड और यूज़र हैं I प्रत्येक उपयोगकर्ता has_one TreeNode, जो कि पेड़ की जड़ है। वर्ग ट्रीएनोड कृत्यों_स_ट्री संबंधित_तो: उपयोगकर्ता के अंत वर्ग उपयोगकर्ता has_one: tree_node end मैं यह सेटअप करना चाहूंगा ताकि रेल संघ को बनाये, ताकि मैं कुछ ऐसा कर सकूं user.first.tree के बजाय एक ऐसा करने के बारे में क्या होगा? है_one: पेड़,: class_name = & gt; "ट्रीएनोड" ध्यान रखें, यह user_id नामक एक विदेशी कुंजी को tree_nodes तालिका में मानता है। संपादित करें : यदि वह काम नहीं कर रहा है, तो आप शायद को विदेशी कुंजी ( : foreign_key = & gt ;: user_id ) निर्दिष्ट करने की आवश्यकता हो, लेकिन मुझे ऐसा नहीं लगता।

c# - Pass Additional ViewData to a Strongly-Typed Partial View -

I have a firmly typed partial view that takes the product image and when it is provided I I would like to provide additional extravagance which I've dynamically created in the page I created. In partial view with RenderPartial call, how can I easily pass both my typed object and my custom watchdata? var index = 0; Forchcha (images in the model, picture .orderbie (p = & gt; p. Oder)) {html.renderpartial ("product image", image); // & lt; Pass the 'index' from the partial index ++; Renderpartal takes another parameter that is only a ViewDataDictionary. You are almost there, just call it like this: HTML. Renderparty ("Product Image", Image, New ViewDataTine {{"Index", Index}}); Note that this will override the default view, which is by default all your other views. If you are adding ViewData to something, it will not be in this new dictionary that you are going through your partial view.

How to initialize a ASP.NET User Control With parameter? -

For example, I have a labeled user control (SSCX), I will use the user control in my aspx. Page. How do I cross a string value on the Essex page, so that in the beginning it can be displayed in the Essex page label? add it ... whatever the public string (Return label.text;} set {label.Text = value}}} Then from the page you are putting it for your esx control, you will ... usercontrol.Whatever = "Text to display"; Or anyway, the ASPX and a property of the page.

Linear Regression and group by in R -

I want to make a linear regression in R by using the lm () function. My data is an annual series for the year (22 years) and an annual series for other states (50 states). I want to fit in regression towards each state so that I finally have a Vector of LM reactions. I can visualize the loop for each state, then I am retrograting inside the loop and connecting the results of each regression in the vector. It does not quite like R, however, I do a 'statement' in SAS and will be done by a 'group' in SQL. What is the way to do this? This is a method of lme4 package. & gt; Library (lme4) & gt; D & LT; - data.fr (state = representative (c ('ny', 'ca'), c (10, 10)), + year = delegate (1:10, 2), + reaction = c (rnorm (10) Ranormum (10))) & gt; Explode (reaction ~ year, group = state, data = D, type = 'l') & gt; Fits & lt; - lmList (reaction ~ year | state, data = d) & gt; Call fits: LMList (formula = response ...

c# - Building a language switcher - 2 languages only - ASP.NET MVC -

ASP.NET MVC app is close to completion, it was decided that it requires language switcher. There will be only two languages: English and Japanese should be able to switch between them, but if none is selected, choose the default language of the browser. I am thinking that what would be the best solution in this matter. / P> First thought , route! That's why I change the paths for / {l} at the end of each path, and default l = "" . After that, in my base controller (it has been turned off by each controller), I see the l variable in the path. Each action gives a view based on the language. I just wanted to be able to hook / ja-jp at the end of the URL, and it would show a scene in Japanese. It did not seem right correctly after that, I had real bad in my thoughts and hands, coded the links ... I was not able to output the helpful link first ... and the bad of the hand I used to codify them in habit, so, I have to re-code every link again - to hack the langu...

c# - How to change application settings (Settings) while app is open? -

I wrote a class that I should easily read and write values ​​in app settings: Public Fixed Category SettingsManager {Public Static String Complement ValidationsString {get {return (string) Properties.Settings.Default ["ComplexValidations"]; } Set {properties.Settings.Default ["ComplexValidations"] = Value; Properties.Settings.Default.Save (); }} The problem is that the value is not actually saved, I mean that when I exit the application and run it again it does not change. You should check properties.Settings.Default.Properties [" ComplexValidations "]. IsReadOnly This is probably true, that Rowland means "app scope". Save will be silently project | Properties | Take a look at the settings, the third column.

VI/VIM file handling -

Now I am working with a ViI editor with a positive attitude that you can work most by using it - Contrary to other editors. I have come into a problem: Suppose i vi Then it opens the folder in V and lists the files in that folder. I select a file and read the content, then I would like to go back to the previous view in which the file name is listed. That's why choosing another file is easy. Itemprop = "text"> G'day, If you enter cntl-shift-6 , the file must go back to its list. Edit: If you have opened some files, you can open all files by entering the list: : ls And you will see something like this: 1 # "ap22_build.sh.log" line 10 2% a "ccc_apache2" line 34 3 "local_package 22 "Row 12 Then you can log in using the number on the left by going to that file: : 3b Enter it in the split screen and enter: : 3 sb HH Cheers,

c# - How to send the value from javascript part of code to the ascx.cs code file -

There were some javascript functions in my .ascx page. To execute a method I want to send value to the codebehind file from this java script function. I tried to try, but these errors were taking place. About this problem I have found that Google can not be used with PageMethods .ascx control pages, it can only be used with .aspx pages. Please give me some suggestions on how I can do my job .. It seems that the simplest way is that you want to run in the ASPX page, as you can use PageMedias and call it using Javascript.

PHP automatic list creation from a textfile to (X)HTML -

I am creating a CMS as you already know, and now I have a problem with Lil. We say: I have a text file: [b] some bold text [/ b] [i] italic [/ i] - list item 1 - List item 2 - list item 3 # list item 1 # list item 2 # list item 3 and I want to change it to: & Lt; B & gt; Some bold text & lt; / P & gt; & Lt; I & gt; Italic & lt; / I & gt; & Lt; Ul & gt; & Lt; Li & gt; List item 1 & lt; / Li & gt; & Lt; Li & gt; List item 2 & lt; / Li & gt; & Lt; Li & gt; List item 3 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; Ol & gt; & Lt; Li & gt; List item 1 & lt; / Li & gt; & Lt; Li & gt; List item 2 & lt; / Li & gt; & Lt; Li & gt; List item 3 & lt; / Li & gt; & Lt; / Ol & gt; Bold and italic work (with Reggae), but how do I list? '-' The list should be changed > pre & lt; & Lt; Li & gt; List item 1 ...

apache - 'Memcache' not found in command line PHP script -

I have MacCheck installed and work for PHP applications running through Apache (v2.2), but When I try to run .php, I get this error in the command line: Fatal Error: Class 'Meashee' / 94 / on line / usr / local / matters / app / Not found in issues-common / connection.php Line is 94: $ memcache = new memcache; Other information: CentOS 5.2 - PHP 5.2.5 (CLI) (Created: February 20, 2008 21:13: 12) Jade Engine v2.2.0, Copyright (c) 1998-2007 Z Technologies - Apache v2.2.8 Probably you have different php.ini files set for Apache and Command Line (CLI). If so, then you need to add the following to your cli php.ini file: extension = memcache.so /etc/php5/cli/php.ini On Ubuntu If this is working, if you run php -m on the command line, then list the memcache module Should look in Alternatively, you can make a file / etc / php5 / cond .d / memcache.ini with the same content.

How do you convert a HttpPostedFileBase to an Image? -

I am using ASP.NET MVC and I have any action to upload the file. I will upload the file properly is being done. But I want the width and height of the image. I think I need to convert from HttpPostedFileBase to image and then proceed how do I do this? And please tell me if there is a better way of achieving the width and height of the image. Post text "itemprop =" text "> I use something like this: Image.FromStream (httpPostedFileBase.InputStream, true, true) Note that return image is IDisposable . to you System.Drawing.dll Reference will be required to do this and the image is in the System.Drawing namespace. Resizing the image I'm not sure what you are trying to do, but if you make thumbnails or something similar, then you do something Can be interested ... try {var bitmap = new bitmap (newWidth), newHeight;) (Graphics G = Graphics .framesize (bitmap)) {g.SmoothingMode = SmoothingMode.HighQuality; G.PixelOffsetMode = PixelOff...

php - OOP design approach for two interacting classes -

Relative advantages / disadvantages by using classes (or rather; Are compared to nesting classes? I am trying to reconstitute my user / authentication system and I am surprised; MyAuthClass should act as a utility and if log-in is successful, just create a new myUserClass object or myAuthClass should internally create myUserClass ( I.e. $ the-> user = new myUserClass) Or even if myUserClass should only call myAuthClass when needed (i.e. when a user tries to log in) and its Updates internal structure (new email, favorites, cart, etc.) as needed. As you can tell that I am able to make a case for each method of appropriately of an OOP N & SB, so I'm about the different ways + I am interested in hearing from others. Cheers. With an extraordinary perspective, all 3 options are incorrect because they are programmed against solid implementation And not an abstract interface. As they gather together in a joint together, who reuse the reusable limit - whether you...

php - Don't show this if the url contains the following -

I have a simple div that I do not want to load if the visitor loads a certain url. Looks like: & lt ;? Php if (stristr ($ _ server ['PHP_SELF'], 'blog') == incorrect) {echo " ;); }? & Gt; There is a problem ... it does not work ... # I still know when I load www.url.com/blog. Am I lacking sleep or should I work above? If the URL is included in the blog then what will you do to not display the device? Try instead: if (substr ($ _ Server ['REQUEST_URI'], 0, 5)! == '/ blog') {echo '& lt; Div id = "stuff" & gt; & Lt; / Div & gt; '; } REQUEST_URI contains the requested URI path and query, not the existing editing script, such as the file PHP_SELF .

Going from COM to DCOM -

I have comp server (ATL based) and a Java app that instantiates objects from this COM server. What is the need for DCOM? What is the requirement only on COM server or server and client? Usually you only need proxy interface on the client side (as well as on server-side) If all of your ATL objects are based on IDispatch, and how do you call them (not through custom interface) then a default proxy is already registered on the Windows machine at that point You only need to specify the machine name of the server where the fact That objects remain. With any DCOM remoting you may have problems with the DCOM permissions from the client on the server, which can usually be resolved by using on the server side (possibly even on the client, if using the callback is being done). And of course, potential firewall problems - you may need to allow an exception for Port 135 (used by DCOM by RPM Mapper).

c# - ASP .NET - Save copy of existing data before updating in GridView -

I want to ensure that websites do not disturb the user's primary data table so that each updated unauthorized data is updated. History should be stored in the table. I am thinking of using 'ROWUpdating' event on GridView to do this. Gridview feeds 1 field 2 test 1234 shows: User GridView value field 1 field 2 test 3333 3A User selects the 'Update' button 3b Selects the system records that the data was tested, 1234 You can set triggers on the primary data table that tells updates of different history tables. As long as the UI is not being very busy and rests on the table like a madman, a trigger may be appropriate.

keypress - How can I get rid of character repeat delay in C#? -

- There is an option in Windows to install repeat delay. This means that the delay between the first keystroke and others keeps one key pressed and I'm making a type of game and I need to get rid of this "feature". So far I have The method has been able to find: [DllImport ("user32.dll")] Use stable extern GetAsyncKeyState (int vKey); Public static bool IsKeyPushedDown (key data) {return 0! = (GetAsyncKeyState (int) key data) and 0x8000); } But the method IsKeyPushedDown finds that the key is pressed at the speed of calling the function - so I need a loop to check if the key is down The problem is that it is now Also does not catch all keystrokes - I have a very slow loop. The second option is overriding the ProcessMDK: Protected Override Bull ProcessCMK (Ref Message Message, Keyage Data) {// Processing Keys (If Key Data == Key.lift || keydata == key.wright || key data == key.upa || key data == key.down) {return true; } Else {return base.Process...

ruby - What is the recommended way of vendoring rails for a production application? -

Instead of using the latest rail gem for my application, I have to put the local code in my own GIT repository The meaning is to put it in the seller / rail . There are a few ways to do this: To download the source of the special branch / tag, I want to run it and add it to my repository or use git submodules. Submodules seem like a natural way to go, but it is not that whenever you clone the repository, you will have to manually check that branch you want to use for that subdue (Otherwise you just get master )? And is there any effect on the capiterno deployment that uses this method? I recommend a freezing release: Rak Rail: Freeze: edge relay = 2.3.3 There is a git branch for 2-3-stabilized, but I use an awesome time. The subprint is a bit of pain, the equipment is very good, but I like the rail freezing with resolution. Capitrain is deploying your code a little bit sluggish (the whole rail is in the codebase), but only Castastrano and your production setup ...

Can't Insert new record from WPF Datagrid via LINQ-to-SQL -

OK, what I'm doing (I think) is rather simple I have a LINQ-to-SQL data reference set and one of the users in the designer, in the designer, it shows the source as "dbo.Users" as "user". This access is public, and I can just access the database to get it properly and update. The problem comes when I try to add a new record. I have AutoGenerateColumns set to set datagrid = "true" CanUserAddRows "correct" The RowEditEnding event is set to a method . When I add a record (SubmitChanges ()) in the context of data, nothing happens. It just does not include I have checked local objects in breakpoint and all the signs are that it is actually there and it has a correct record that it should be added. But wait, there's even more. If I execute Users.InsertOnSubmit () and pass the currentItem of datagrid (user casted), it is telling me, but I think the record is actually inserted "is a unit That can not already exist "...

How do I change authorization of a site on my Google Appspot OpenID? -

When I tried to log in to stack overflow, I initially found my Google OpenID (which looks like this) But I accidentally clicked on the decline, now I can not log in at all with this openID. In any way, can I change the authorization in an account in the future? Thank you! openid-provider.appspot.com is intended as a demo app only! Do not trust it as a real open-end account. As the page itself says: Note: This is just an App Engine demo, not Endpoint.

Are there any WCF Configuration Tools out there that will make the job easier -

Are there any tools that go beyond the requirement of deep and intimate knowledge of every configuration option and ultra difference? Application minimal input like a simple wizard that produces XML configuration based on some simple input. I do not care about security. I need service for the service. Ideally this device with IIS 6 or at least Options I will be able to set up a set with the set. I The Microsoft Service Configuration Editor is not better than direct editing of XMl. I found a web site that is correct The idea is but it was not able to solve my simple setup. (). Is there something that plays some conference on the configuration of this mountain? WCF configuration may seem very challenging, first indeed! I like this configuration wizard - why was not it enough for you? I do not know any device yet, which will solve your problem and help you find the right configuration - it really is boiling to learn the ropes and get information about it. Goes, I'm afra...

Can i gzip-compress all my html content(pages) -

I'm trying to figure out whether there are any principles in defining pages to be GPS-compressed Should Send Simple HTML Content If you can take any part of your project in gauge-compression, then it will be helpful. A good idea is benchmark, how fast data is coming down v.s. How well is it compressed, if sending something like this takes 5 seconds, which ran from 200K to 160K, then possibly it is not worth it, the cost of compression on the server side and if the server is busy then it can not be worth it. is. For the most part, if your server is below load 0.8, then I do not give anything, it is not binary like JPEG, PNG and Zip files. Here's a good write up:

c++ - Run .exe outside IDE but use break points inside IDE -

Using VSNet 2003. Out of the IDE Exe would like to run (i.e. command prompt or double click.exe However, still need break points to hit IDE. How do I set it? (Outside IDE Thank you. On the debug menu, select" Option to attach the debugger to your externally run application " Attach a.

asp.net - Should I use a composite key for a map table, which is also used for a foreign key? -

I am using ASP.NET and entity framework to create a website. There is currently a map table for many relationships between me ... let's say that the user and the soccer team are: Users Teams Username Part 1 : Is it the best practice to use a composite key for the primary key in the map table? In other words: User Ton table PK UserId PK TeamId PreferenceId Part 2 : The warning is that there is my second table too. Let's call it "UserTeamPredictions", which stores user's predictions for a team for each year. In that table there is a foreign key that points back to the map table. So something looks like: UserTeamPredictions table PK UserTeamPredictionId FK UserId FK TeamId Predictive Forecast Year This unit works fine in the framework, however, there are some problems when I refer to relationships under third party control Telerik Even if this ideal data is not setup, should I change the table structure / relationships so that i...

delphi - Resetting comm event mask -

I recently overlap serial port communications in Delphi and I have a problem, I'm not sure how to solve To do. / P> I communicate with a modem I write a request frame (AT command) in the COM port of the modem and then wait for the modem to respond. The port's event mask is set to EV_RXCHAR, so when I write a request, I call WaitCommEvent () and wait for the data to appear in the input queue. When the event is awaiting to finish, I immediately start reading data from the queue and reads all that the device sends at one time: 1) Write a request 2) WaitCommEvent () Call and Wait Waiting 3) Read all the data that the device sends (Not only the data is in the input queue at that time) 4) Do something and then geto 1. Waiting for the event to end after the first byte is visible in the input queue. During my reading work, however, more bytes appear in queue and each one has to set an internal event flag. This means that when I read all data from the queue and call Wait...

design - Python classes for simple GTD app -

I'm trying to code a very basic GTD app for myself not only to get organized but on coding Better to get better and better on Python though I'm having some difficulty with classes Even I have classes: class project: def __init __ (self, name, verb = []): self.name = name self.actions = verb deff addition (self, verb): self. Actions.append class action: def __init __ (self, do = '', context = ''): self.do = do self.context = context in each project Action is taken for this, although I want to make it so that the projects can be of other projects. Say daily that I wanted to print a list of all I have to face about how I will build a list that will look like this & gt; Project A & gt; Project A & gt; Actions for Project B & gt; Sub Project A & gt; Sub Project A & gt; Sub Project B & gt; Actions for Sub Project B & gt; Sub Project C & gt; Sub sub project A & gt; Sub sub project A & gt; Sub-Sub Project B ...

Is there a way to convert a PDF to HTML / CSS using PHP? -

I know that solutions are available to bring HTML / CSS to PDF, but is there anybody who, in the opposite way Works? I want to be able to take the automatically uploaded PDFs, and want to convert them to HTML / CSS to display on the website between a header and footer etc. Thanks is a command line tool, that you can perform PHP () can use exec () or system (). Not sure if this will be right for you?

firefox - how to insert special fav icon bar on the web -

Is it possible to insert a special icon bar on the web (Show icon in front of address bar from Firefox 3.0) How to do it thanks eBattulga if you are talking About the Security ID button in the address bar: This is shown when the site is valid through a valid SSL / TLS (HTTPS) To implement the signed certificate, you need a v Wsniy will buy certificates from certificate authorities must configure your server to use the certificate.

sql server - SQL to determine minimum sequential days of access? -

निम्न उपयोगकर्ता इतिहास तालिका में प्रत्येक दिन के लिए एक रिकॉर्ड एक उपयोगकर्ता को एक वेबसाइट तक पहुंचा है ( 24 घंटे की यूटीसी अवधि में) इसमें कई हजारों अभिलेख हैं, लेकिन प्रति उपयोगकर्ता प्रतिदिन केवल एक रिकॉर्ड है। अगर उपयोगकर्ता ने उस दिन के लिए वेबसाइट तक नहीं पहुंचाया है, तो कोई रिकॉर्ड नहीं होगा। आईडी प्रयोक्ता आयडी निर्माण डेट ------ ------ ---------- - 750997 12 2009-07-07 18: 42: 20.723 750 998 15 2009-07-07 18: 42: 20.927 751000 19 2009-07-07 18: 42: 22.283 मैं क्या देख रहा हूं अनुक्रमिक (दिन-पहले या दिन-बाद) तिथियों के साथ इस तालिका में कितने उपयोगकर्ताओं (n) रिकॉर्ड हैं ? अगर अनुक्रम से कोई दिन गायब हो रहा है, तो क्रम टूट गया है और इसे 1 पर पुनः आरंभ करना चाहिए; हम उन प्रयोक्ताओं की तलाश कर रहे हैं जिन्होंने लगातार अंतराल हासिल कर ली है। इस प्रश्न के बीच कोई समानता है और बिल्कुल संयोग है ..:) इस सवाल का जवाब स्पष्ट रूप से है: का चयन करें DISTINCT UserId UserHistory uh1 से जहां (COUNT (* का चयन करें) से UserHistory uh2 कहां uh1.CreationDate और...

Convert string to Python class object? -

Looking at a string as user input for a python function, if I want to get a square object from there I am in the name hall with the name that is currently defined in the namespace. Essentially, I want to implement a function that produces such results: square fu: pass str_to_log ("foo") ==> & Lt; On class __main__.Foo 0x69ba0 & gt; Is this possible? It seems simple. & gt; & Gt; & Gt; Square Fu (object): ... pass ... pass & gt; & Gt; & Gt; Evil ("foo") & lt; Class' __main __. Foo '& gt;

c# - Need Help building Custom Html Helper for Asp.net MVC -

I was playing with some custom HTML assistants and now I am trying to create one which i jquery ajax UI Tabs. To do this Ajax tab, you must have this format in your HTML code & lt; Div id = "example" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "ahah_1.html" & gt; & Lt; Period & gt; Content 1 & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "ahah_2.html" & gt; & Lt; Period & gt; Content 2 & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "ahah_3.html" & gt; & Lt; Period & gt; Content 3 & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; So I can not use ActionLink because I do not think I can add any tag to the appellanlink. So I want to make my own HTML h...

capistrano - CruiseControl.rb: running cruise rake task with current revision as parameter -

when cruise control. If RB wants to do an integration test then it looks and executes it for a rake function called "cruise" within the project. Is there any way to hand over the present amendment number to that task? I am deploying an app using CaptchaRino on a remote machine after the App Testament. Because no special revision has been passed, because Cassistrano will deploy a major modification, I would like to use the last check amendment of cc.rb ... Any ideas? If you need a CCR modification then you can: "Edit Amendment # {ENV ['CC_BUILD_REVISION'] from desc 'cruises' function: Curise does #" file.dirname (__ FILE__)} "end ]} Does

utf 8 - PHP: How to remove all non printable characters in a string? -

I think I need to delete 0-31 and 127 characters, Function or piece is the code to do efficiently. 7 bit ASCII? If your Tardis landed in 1963 only, and you want only 7-bit printable ASCII characters, you can rip from 0-31 and 127-255 in this way: $ string = preg_replace ('/ [\ X00- \ x1F \ x7F- \ xFF] /', '', $ string); This range matches anything between 0-31, 127-255 and removes it. 8 bit Extended ASCII? You have fallen into the hot tub time machine, and you are back in the eighties. If you find some form of 8 bit ASCII, then you want to keep the characters in the range 128-255. A simple adjustment - just look for the 0-31 and 127 $ string = preg_replace ( '/ [\ x00- \ x1F \ x7F] /', '', $ string); UTF-8? Ah, welcome to the 21st century. If you have UTF -8 encoded string, then / u can be used to regex $ string = preg_replace ( '/ [\ x00- \ X1F \ X7F] / u ',' ', $ string); This only removes 0-31 and...

iphone - MPMoviePlayerController will play once, then throw an error -

I realized that a similar question has been posted before, but I can not really find a solution that Works . I have a movie player class that keeps a collection of MPMoviePlayerController, and I have the following method in class: - (zero) playmovie: (NSString *) movieName {NSDream * movieURL; NSBindal * bundle = [NSBindal Main Bundle]; If (bundle) {NSString * moviePath = [Bundle Pathforesource: Type the name of the movie: @ "M4V"]; If (moviepath) {movieURL = [nsur file URLWithPath: moviepath]; }} MPMovieController * mp = [[MPMoviePlayerController alloc] initWithContentURL: movieURL]; If (mp3) {self.moviePlayer = mp; [MP Release]; [Self. Play Movie Player]; } [Movie url release]; } When I play the movie well once, but when I call it again on a different (or similar) movie file, I get the following error stack when playing the movie Is: _class_is Initial _class_lookupMethodAndLoadCache objc_msgSend - [Movie Player Setmovie Player] - [Movie Player PLAMAVY] I...

NVARCHAR sizes in SQL Server 2005 -

In SQL Server 2005 (not 7.0), there is no need to use NVHAR (255) instead of 256 or any other number reason ? Is there an optimum shape, and is there any reason to use the powers of two? (I will store unicode data, so I must use N VARCHAR) In SQL Server (2000 and earlier IIRC), the optimal (possibly and maximum) size columns are simultaneously dependent on the size of all columns, (n) except text and image content. I believe 8K is the 'natural' size of records in a table, so your column size should be less than 8000 bytes. This is no problem, more than SQL Server 2005, I believe.

Creating/importing mysql database when host doesn't allow creation of databases from script (php) -

I asked first and got some good code, but I am concerned with a comment I asked that the sql file in php on the shared host How to create and import mysql databases from One of the commentators said that some hosts can not allow me to do this with php. After doing some excavation at other places, somebody suggested that I can create a database from the host control panel but can execute SQL scripts by executing tables through SQL queries like this: 'my name' ('name' here) ('id' int (25) no zero default '0', 'CLMN name here' varchar (250) matching Latin 1_general_ci default cord, `CLMN ​​name here 'int (10) default zero , Primary key (`d Di`)) engine = Maisam default charset = latin1 COLLATE = latin1_general_ci; "); Insert mysql_query ("here", 'here here,' 'VALUE here');); can any comment on that? What can I do if I have a host with PHP in the database in PHP? (I'm not sure that it is advisable to...

asp classic - redirecting postdata -

I have recently upgraded the page from classic ASP to asp.net on our server The page receives the post data and saves it in a file. The page is used by many of our customers and the URL (on the ASP page) is hard work in their software. This means that I can not just swap the old page for the new page I am trying to find a way to redirect clients from a new URL to a new one. I know that you can do a simple redirect using IIS, but this is not the reason for redirecting postdata. I tried to set the file to temporarily redirect 307, it works when data is in formdata, but other post requests such as msxml do not work by using the library. Actually to forward me to each other's request from one post to another without losing any body in the way IIS. Two pages are within the same application, you can use the server. Converts processing from page to new, and keeps all request data.

spring - org/springframework/metadata/Attributes not found in spring3.0? -

Do I know where this class is located in java.lang.NoClassDefFoundError: org / springframework / metadata / attributes? I can not find it inside org.springframework.aop-3.0.0.M1.jar. But in the earlier version of spring, this spring 2.0 is present. The reason I need this file is because I'm trying the Cacheable tutorial for Spring Module 0.9. The metadata package is not present in Spring 3.0. I suspect that the spring module is currently not compatible with 3.0, you need to use 2.5.x instead. Edit : This project is dead, if anything, there is no sign of it.

class - Actionscript 3.0 Setter - Getter -

I want to pass value from constructor to another class in my main square. Main category: public function main () {Snap.locationX = 350; } Other class: get the public function to the location X (): number {return_value; } Set public function Location X (x: number): zero {_value = x; } It returns 1061: Call the location X possibly to the undefined method through the context of a fixed type square. What am I doing? The setter and geaster methods you have defined above are the methods of Instance. Calling Snap.locationX and not on an example of snap class. Try (under Main ()): var snap oz: snap = new snap (); SnapObj.locationX = ...

c# - .Net security Unrestricted permission issue -

I am confused about the unrestricted property of net security, as explained here, Or non-complete My confusion is to allow us to understand directly, only two states should be given and should not be approved, which is complete and non-complete? My confusion is the word "unrestricted", I think that when unrestricted are false, this means limited / partial permission (partial / limited in contrast to absolute). George, I think the key to understanding this property is the following line Is: Correct if the protected resource has been declared full; Otherwise, wrong. As I have seen it, there is a resource and unrestricted property, which is a boolean, just tells you whether you have full permission or not. Imagine that unrestricted is actually given the name. I am not sure why he did this for complete submission. -p

regex - PHP preg_match question -

How can I get three words in the following string with Perl compatible regular expression? word1 # $ Word2 # $ word3 I do not know the actual word "word1, word2 and word3" in advance, I know only the separator, which is # $. And I can not use the word limit because I have a multibiotic encoding, which means that the string can have non-ASCII characters like umlauts, which are not recognized by the \ w control character . Try this regular expression: / (\ w +) # \ $ (\ W +) # \ $ (\ w +) / Edit to give us more information After (see comments for this answer): / ((?: [^ #] + | [^ $]) *) # \ $ ((: [^ #] | # [^ $]) *) # \ $ ((: [^ #] | # [^ $]) *) /

Django and Serving Static Files -

I'm hosting a site on WebFaction using Django / mod_python / Python2.5. I have recently run the concept of static files (during the installation of my Django administrator). What I think is that the idea of ​​serving stable files is only to be told to the server, instead of routing the request through the directory, first apache, then mod_python, then the degego, and finally the user back . This is particularly helpful in webfication because there are two Apache servers that should go through your request (your app's server and main public server). Why is it that when I set up the static files of the Django, only / contrib / admin / media folder is required? Is it just that the static content of all the dexgo is connected to the admin panel? When I want to serve my own stable content (images, CSS, etc.), then I should include it in the same / media folder or another for my own content (/ my_media) Set nickname? Yes, static files used by Django are related to beau...

sql - Formatting varchar data into a certain format -

I need to format data in an SQL column that is currently recorded as: Z04000002003.7 Its desired output will be: Z04 / 000/002 / 003.7 Each time a user data is Z04000002003.7 Like data enters. The next time the user opens the record, he automatically formats it to display Z04 / 000/002 / 003.7. If you insert slash on INSERT or UPDATE (when the string is received in the database) or selection If you want, you can do this in TSQL with some strange string expressions: SUBSTRING (Thestring, 1, 3) + '/' + SUBSTRING (thestring, 4, 6) + '/' + ... And similarly, but I agree with other respondents that it may be a better architecture to make such a change "close to the user" (UI In, or perhaps business The Numeric logic layer that those slash are actually part of the business case, but the UI looks).

conditional - Strange php if statement problem -

अगर ($ देश == 224 || $ देश == 223 || $ देश == 39 & amp; & Amp; $ zip == '') {$ _SESSION ['sess_msg'] = "कृपया एक मान्य ज़िपकोड दर्ज करें"; हैडर ("स्थान: $ SITE_PATH? P = account.profile.name"); बाहर जाएं; } चर मान -------- ----- $ देश 224 $ ज़िप 11111 मुझे पता है कि $ zip रिक्त नहीं है, लेकिन कोड कार्यान्वित करता है जैसे कि यह है। मैं इसे डीबगिंग स्टेटमेंट में ब्राउजर के रूप में प्रिंट भी प्रिंट करता हूं ताकि यह सत्यापित हो सके कि उसका मान है। मेरे प्रोग्राम को ऐसा करने का क्या कारण है जैसा कि $ zip का मान नहीं है ? और amp; amp; ऑपरेटर ऑपरेटर तो आपकी अभिव्यक्ति के बराबर है: $ देश == 224 || $ देश == 223 || ($ देश == 39 & amp; $ ज़िप == '') समाधान: ($ देश == 224 || $ देश == 223 || $ देश == 39) & amp; amp; $ ज़िप == ''

Function vs. Stored Procedure in SQL Server -

I have been learning functions and stored procedures for a long time but I do not know why and when I should use the function or a Archived procedures they are looking for me the same way, probably because I am new to that. Can anyone tell me? The functions are calculated values ​​and can not make permanent environmental changes in SQL Server (i.e. INSERT or UPDATE statements are not allowed). If this returns, then the function can be used in inline in the SQL statement. The value of a scalar can be included on it or if it returns the result group.

javascript - How would you code this: The SO highlighted button outline effect -

I am a person who learns best from the example. Currently, I am diving in the field of web development after the development of desktop developers. I am still being used for all web technologies used for the development of modern web sites and everywhere I see, I see very few UI elements and they do not know how they apply. So I thought I'd like to ask you, the web experts ... Leopard :) To some extent forward or constructively you coded the Highlight Button Framework Effect (shown below) You can ... Feel free to provide example code or high level explanation, which includes various techniques (HTML, CSS, Javascript, etc.). How will CSS play a role in this? Can you use JQuery to implement it easily? GWT? Thank you very much for all your help! If you are talking about when you change the tabs when you rotate the mouse over them , Then it is done entirely with CSS. Using: To rotate the pseudo-square, the site sets the background to white, and turns the color of...

jquery - Consistent grid headers with Flexigrid ? -

So I'm trying to use the flexigrid plugin It seems that it works great differently from this fact It seems that you have to set the column width manually, otherwise the column headers do not match the body column. Is there a way to automatically match these columns, while the length of the column's content (column) is the normal table behavior). I am still working on it, too. What have I come up with in which to add an onsus headler and find out what is the maximum size of each column between the headers and the body, then determine the width of both the maximum for that column. grid.flexigrid ({... other setup ... onSuccess: function () {format ();}); }}); Function Format () {var gridContainer = this.Grid.closest ('flexigrid'); Var header = Grid container.fund ('div.hDiv table tr: first th: no (hidden)'); Var drags = gridContainer.find ('div.cDrag div'); Var Offset = 0; Var firstDataRow = this.Grid.find ('tr: first td: no (: hidden)...

How to create user profiles with PHP and MySQL -

I need some help on creating a user profile system I want to be like Facebook or where the user only after its address For example, www.mysite.com/username . I have all the registers, logging scripts etc. all done, but how do I give profiles using the example URL above? " You will need to create a mod rewrite that takes the first directory and it's in the form of $ _GET parameter Try it: RewriteEngine RewriteBase / RewriteCond% {REQUEST_FILENAME} -f [OR] RewriteCond% {REQUEST_FILENAME} -d Records Rules ^ (. * ) / $ Index.php? User = $ 1 It should rewrite anything after the '/' index.php? User = directory

php - emulating LiveHTTPheader in server side script or javascript? -

I went to this problem when it was to disclose the data to scraps sites with heavy usage of JavaScript. "a href =" javascript: zero (0) "onClick =" grab data (23) "> view details this href attribute , Does not reveal any information about the actual URL. You are manually opened manually to open the live HTTP header. OR Firefox And monitor the post-dimension, which is posted to the real URL. So I'm thinking, a server side script Is there a way to capture post parameters in javascript, as the live HTTP header enables it to easily scrape most JavaScript obfuscated web pages for outgoing and incoming post parameters. Thank you. I'm not sure I understand this question but ... The Incom Post parameter in PHP is stored in the $ _ POST array It is, you print_r ($ _ POST); .

bittorrent - How does a DHT in a Bittorent client get "bootstrapped"? -

If I have a tracker, then there is a tracker in it, and I have just started a bittern client, so my Do not have any partner yet ... How do I know that to associate with DHT first? It seems that I have to know about starting at least one node in DTH .... When a bitterant client connects to the DHT, there is an initial space that goes to find associates with the original bitterant client, there was a URL on bitorrent.com which would help in starting things. I tried to see the context, but I could not find it. Once you establish a connection with other clients, you can do a announce on the DHT network to find a colleague for that torrent. Here is a link that discusses DHT. There is no "declaration" key in a trackrollless edge dictionary, instead, there is a "nodes" key in a trackless torrent, this key must be set to the closest nodes of the buyer's client's routing table. Alternatively, the key can be set to a known good node, as if a person is ...

.net - Trouble with changing text on a textbox in vb -

Hi, I'm having trouble changing the text color of the text box in VB I know that changing is like this Textbox.ForeColor = Color.Red When I do this it does not change anything, even then gives me a single black color, it can also be because it is read only Or something in the visual studio or my project is wrong Edit: I use VB 9 or VB 2008 W / VS 2008 Express C-Am Unfortunately, I do not think that you can only change the color to read text box. There are but they are a bit hakki.

Interfaces in a relational UML diagram inspired by SO -

संभव डुप्लिकेट: मैंने अपने होमवर्क को विकसित किया है। समस्या: इसी तरह एसओ में पोस्ट करने के लिए ताकि पहला पोस्ट सवाल और अन्य पद प्रश्न के उत्तर दिए हैं। प्रश्न: आप इंटरफेस कैसे सुधारेंगे? क्या कुछ सरल डेटा संरचना चीज़ें आसान बनाती हैं? आपका पहला प्रश्न मुझे भ्रमित करता है यूएमएल मुझे वस्तुओं के बारे में सोचता है और "डाक-तालिका" मुझे संबंधपरक डेटाबेस के बारे में सोचता है। आप किसकी बात कर रहे हैं? मुझे लगता है कि आप ऑब्जेक्ट्स चाहते हैं। आपको इंटरफ़ेस या अमूर्त की आवश्यकता है जो प्रश्न और उत्तर दोनों का प्रतिनिधित्व करता है - शायद यह पोस्ट इंटरफ़ेस है इसके बाद पाठ और लेखक और एक टाइमस्टैम्प जैसे विशेषताओं को पोस्ट किया जाएगा। चूंकि प्रश्न उत्तर से पहले कभी नहीं आएगा, अगर आपके पास पोस्ट के उदाहरण हैं तो यह उचित क्रम में होगा यदि आप इसे टाइमस्टैम्प द्वारा सॉर्ट करते हैं। अद्यतनः यूएमएल का मतलब ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग है पायथन एक वस्तु-उन्मुख और एक कार्यात्मक भाषा दोनों है। तो इसका मतलब है कि आप वस्तुओं के मामले में समस्या के बारे में पहले सोच...

python - cx_Oracle MemoryError when reading lob -

I'm getting "exceptions.memoryError" when trying to read data from a lob field using cx_Oralce. This code is working, this one lob field looks very big. Try example: xml_cursor = ora_connection.cursor () xml_cursor.arraysize = 2000: xml_cursor.execute ("from xml_data select xml_cursor.fetchall () in xmlTable for data_data where id = 1" ): Str_xml = str (row_data [0]) #this throws "exception error." . You have to piece it and get it into chunks ( select dbms_lob.substr (xml_data, ... repeatedly) and feed it in an incremental XML parser (or it must be written in a file ), Or whatever you are trying to do with that multi-GB LOB). DBMS_LOB is a well-documented Oracle-supplied package, and you can find your document in many places, e.g.

c++ - link error when using boost library on MacOSX -

I have created an XCode project and I have added the header search path to "/ opt / local / include / boost" and referenced from " boost :: system :: get_generic_category ()": __static_initialization_and_destruction_0 ( Main.o in main.o __static_initialization_and_destruction_0 (int, int) in main.o __static_initialization_and_destruction_0 (int, int) in main.o and in my / opt / local / lib, I know this (I think Boost.System Library): -rw-r - r-- Root Administrator 80600 23 Jul 16:31 libboost_system-mt.a -rwxr-xr-x 2 root administrator 30988 23 Jul 16: 30 libboost_system-mt.dylib * Can you please tell me What am I missing? The library is not enough to add the path. It ensures that whenever you ask it to link it to a library, it will search for that library as the specified path, as well as all the default paths. So you actually get the compiler to flag Need to link to the library with -lboost_system-mt on Windows, boost default Supports auto-linking...

Excel Conditional Content/Formatting for Print vs. Screen and Page Breaks -

I have a VBA publication macro in Excel which creates a published workbook based on the master configuration worksheet and many worksheets. The published version is directly data, still formatted, but with no formulas and fixed notes and background information has not been suppressed Basically, a list of worksheet names and categories is published in master configuration. To make the published version printable, some worksheets need to insert page breaks. I know that I can include them on the basis of the same configuration, and I can put them in my master sheet Adding more columns can also change the print orientation and margins of a specific worksheet. Hard bits here If some of these page cats are inserted during a publication process in a table, I would like an informative line to insert before the page break, which indicates that the table continues on the next page. But I only want to show it in the printed version, not displayed in on-screen display. Is there any way to ...

css - Web Pages Borders & Screen Resolution Problems -

When I change my screen resolution, the main navigation of my web page bottom border magically half length of my web pages Reduces web page flow How do I fix this problem? CSS is below. #in-nav {width: 100%; Background: black; font-weight: bold; Border bottom: 5px solid blue; float right; Margin: 0 px; Padding: 0 pixels; } #mood-nyu ul {width: 1024px; Margin: 0 px auto; Text align: right; Padding: 0 pixels; List-style-type: none; } #national-nav li {float: right; Margin-left: 1px; Padding: 0 pixels; } # Main-nav is a {text-align: center; Color: #fff; Text-decoration: None; Padding: 10px 15px; Background: blue; Swim left; } #major-nav a. Active # Head-nav A: Hover {background-color: # 467 AFE; Color: #fff; } Here's HTML: & lt; Div id = "main-nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" headline = "" & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A h...

iphone - Getting a reference to the UIApplication delegate -

I am writing my first iPhone application and I am having trouble changing the scenes. I have 2 ideas and a reference to each in the AppDelegate ( UIApplicationDelegate ) I make examples of both in applicationDidFinishLaunching and Immediately show the scene first. It works fine The problem is in reference to AppDelegate and I do not know how it gets referenced, so I can switch to another view. Itemprop = "text"> Yes, UIApication is a singleton, and uses the normal singleton pattern for the objective-c: [UIApplication sharedApplication]; You can get your delegate class directly: MyAppDelegate * delegate = (MyAppDelegate *) [[UIApplication sharedApplication] delegate];

linux - svn post-commit hook doesn't have permissions to create file in working copy directory -

I'm stuck with that work. I wrote the committed hook after the SVN, that it should do so to update the copy of the work on the server, if something was changed. But it seems that there is no permission on that folder, but I have set them to allow all to write and read there. So here's the test script: # / bin / sh REPOS = "$ 1" REV = "$ 2" dir = "/ root / root / trunk" $ DIR touch / work I've got the output: committed revision 51. Warning: 'committed to post-hook' with error output failed: touch: can not touch `/ root / root / trunk / work ': permission denied and permissions for the target folder: [root @ ovz6022 trunk] #LS-LA total 24 drawks RAWoxDEX5 Apache Apache 4096 July 26 07:08. drwxrwxrwx 6 Apache Apache 4096 Jul 24 02:14 .. -rwxrwxrwx 1 Apache Apache 1367 Jul 24 02:45 pom.xml drwxrwxrwx 4 Apache Apache 4096 Jul 24 02:23 src drwxrwxrwx 6 Apache Apache 4096 Jul 24 13:31 .svn drwxrwxrwx 7 Apache Apache ...

SQL Server 2005 Query Help -

I have a table and I want to get the line from the previous one. Eg Keyboard ID keyboard name 1 Choose "keyboard" from the keyboard -> "Dell" 2 "HP" 3 "Vicious" 4 "Samsung" > More from SELECT *, ROW_NUMBER (), from the RN as ORDER BY KeyboardId DESC) AS WHERE rn = 2; With CTA (Selection *, ROW_NUMBER ()) with (from RN as the order table by keyboard IDE) SELECT * FROM Cte WHERE rn = 2; or SELECT TOP (2) * SELECT TOP (2) * TABLE ORDERS BY KEYBOARD IDE DESC) Keyboard ID;

How would I log searches on my PHP/MySQL website? -

Whenever I search for my website using the Quick Search feature, I want to login it to my database Obviously I want to see what my users are searching for I can make a 'tag cloud' based on these searches I have the table the searcher with two fields: id and words , I was thinking that to log in this information Was the best way Terms however little is becoming unnecessary. Any clues or links for related scripts? Thanks guys I have not tried but Google Analyst users have their search Provides the option to enter in the box. There is a developer API to display. Warning All this will be JavaScript, the advantage of this is that it will reduce the load on the server. It may be that you were worth what you were looking for but not worth mentioning.

introspection - In C# what is the equivalent of "is" keyword but using Type objects -

I think that's a simple question, but in the type class document, they only talk about the interface on the GetInterfaces method. i.e. Typeof (ChildClass) .XXX (ParentClass) This is your Depending on what needs; IsAssignableFrom, probably: bool stringIsObj = typeof (object) .IsAssignableFrom (typeof (string)); or IsSubclassOf : bool stringIsObj = typeof (string) .isSubclassOf (typeof (object));

php - What means a class name in constructor of other class? -

I've read some scripts and I do not understand why they named the class in the second class constructor : Public Function __Composition (AclassName $ foo) {$ this- & gt; Foo = $ foo; } Because they want that $ foo is an example There is only one instance of the aclassName , not an example of a number, string, or class that is not AclassName and neither does it enter AclassName . Called in PHP, although they are not actually indicative, but enforcement Function foo (array $ bar) {// $ bar should be an array, otherwise an E_RECOVERABLE_ERROR is thrown} function falcon (class name $ bar) {// $ time classname} For example (new classname); // work fine baz (new stdClass); // Error Category ExtendsFromClassName classname {} baz (new ExtendsFromClassName) extends; // The job is OK The signal can also be done on the interface or intangible sections: interface some interface {} function baz (some inter $ object ) {// $ object should be an example of some client ...