Search Results

Search found 5124 results on 205 pages for 'clean up'.

Page 10/205 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • php - clean URL

    - by tibin mathew
    Hai I want to create a web site with pure php. I want to hide the url parameters. I.e. I want to make my web site with clean urls. Is there is any way to do this with out using any framework? Is it curl help full to do this? Does any one give me a solution.

    Read the article

  • A simple, clean web layout

    - by Shaun_web
    Ok, so I hate CSS/HTML graphic design... What do you guys recommend as a sample template or website that you think has great CSS and html layout? From my past experience it's best to get a page that has a white background and little dependency on graphics -- that's clean, and easy to modify ;-).

    Read the article

  • fast, clean, C, timsort implementation?

    - by Drew Wagner
    Does anyone know of a clean implementation of timsort? The Python sources contain a description and code for the original timsort, but it is understandably full of python-specific calls. I have a smoothly varying 2D array of double floats that I would like to sort as quickly as possible. It ought to contain a lot of monotonically increasing and decreasing runs. I'd like to try timsorting the rows individually, and then merging the sorted rows. If you know of a better sort technique, I'm open to suggestions. Thanks!

    Read the article

  • VS2010 Clean Web.configs - not updating

    - by cw
    Hello, I'm messing around with MVC 2.0 on VS2010 and am having an issue getting the clean web config feature working. Basically in my Web.debug.config I have <connectionStrings xdt:Transform="Replace"> <add name="ApplicationServices" connectionString="Server=localhost;Database=SITE_DB;User ID=dbuser;Password=P@ssw0rd;Trusted_Connection=False;" /> </connectionStrings> and in my Web.config I have <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> When I run the site in debug mode, I'd expect that xdt:Transform="Replace" would replace the entire connectionStrings section with what is in the Web.debug.config. Am I assuming wrong? Or am I doing something else incorrect. Not much info posted around this and I'd figure I'd ask you guys.

    Read the article

  • Wordpress TinyMCE keeps it clean, how?

    - by Frankie
    I've noticed that the latest version of TinyMCE on Wordpress manages text in a very 'clean' way. Pasting from MS-Word it strips out all html text blocks, like <p>'s, and shows the text cleared of any odd formatting preserving only links, bolds and underlines. On top of that the source code format is very clear. No <br />'s everywhere. You only see \n's and the expected <strong><u><i> tags. I've been messing up with TinyMCE configuration files for some time with little success. I did manage to get all formatting removed. I can't, however, put TinyMCE to display the \n's as <br />'s lie Wordpress does it. Tried preformatted : true with no success whatsoever. Has anyone here been able to do it? Thank you in advance, Francisco

    Read the article

  • Clean Up Controller, Update Item Quantity within Cart

    - by Karl Entwistle
    Hi guys I was wondering if anyone could help me out, I need to clean up this controller as the resulting code to simply update an items quantity if it already exists seems way too complex. class LineItemsController < ApplicationController def create @product = Product.find(params[:product_id]) if LineItem.exists?(:cart_id => current_cart.id) item = LineItem.find(:first, :conditions => [ "cart_id = #{@current_cart.id}"]) LineItem.update(item.id, :quantity => item.quantity + 1) else @line_item = LineItem.create!(:cart => current_cart, :product => @product, :quantity => 1, :unit_price => @product.price) flash[:notice] = "Added #{@product.name} to cart." end redirect_to root_url end end ` As always any help is much appreciated, the code should be fairly self explanatory, thanks :) PS posted it here as well as it looks a bit funny on here http://pastie.org/994059

    Read the article

  • grails clean having issues

    - by hvgotcodes
    Im running grails 1.2 on win7. when i try to do grails clean it fails to remove some jars in my acegi plugin. after that failure, it complains about not finding the plugin descriptor. I am forced to remove all plugins from the disk manually and then run the app again to download them again. the particular jar in acegi is ant-contrib-xx.jar. has anyone seen this? as a further note, if i just delete the acegi directory after the initial failure it fails on a jar in another plugin. I dont know if Im having some sort of windows filesystem issue (I am coming from linux, forced to use win7 because intellij sucks on linux), or intellij is doing something, or what...

    Read the article

  • Clean Microsoft Word Pasted Text using JavaScript

    - by OneNerd
    I am using a 'contenteditable' div and enabling PASTE. It is amazing the amount of markup code that gets pasted in from a clipboard copy from Microsoft Word. I am battling this, and have gotten about 1/2 way there using Prototypes' stripTags() function (which unfortunately does not seem to enable me to keep some tags). However, even after that, I wind up with a mind-blowing amount of unneeded markup code. So my question is, is there some function (using JavaScript), or approach I can use that will clean up the majority of this unneeded markup? Thanks -

    Read the article

  • clean method for validation

    - by apoorva
    hi.. i have the following form class with corresponding clean methods... class SOFIATMUserLogin(forms.Form): Username=forms.CharField(label='Username') Password=forms.CharField(label='Password', widget=forms.PasswordInput) def clean_Username(self): user=self.cleaned_data['Username'] try: SOFIALogin.objects.get(UserName=user) except Exception: raise forms.ValidationError('Username invalid...') def clean_Password(self): upass=self.cleaned_data['Password'] In the clean_Password method i wish to check if the password entered for the valid username is correct... So i need to get the Username value... How can i access this in clean_Password method... Please assist!!!!

    Read the article

  • How can i use clean url only i a subfolder of my website

    - by tibin mathew
    Hi, I have a web site http://www.mydomain.com Here i have created a sub folder http://www.mydomain.com/products. I want to change all the page inside the product folder as clean url. I know htaccess should be inside product folder. If it's enabled, will it affect all the parent directories and files of my site i mean http://www.mydomain.com/ here, will it affect the pages here also. i have one more doubt about .htaccess file, is there a way i can enable mod_rewrite through any code code without directly editing httpd.conf file please help me Thasnks

    Read the article

  • Overwrite clean method in Django Custom Forms

    - by John
    Hi I have wrote a custom widget class AutoCompleteWidget(widgets.TextInput): """ widget to show an autocomplete box which returns a list on nodes available to be tagged """ def render(self, name, value, attrs=None): final_attrs = self.build_attrs(attrs, name=name) if not self.attrs.has_key('id'): final_attrs['id'] = 'id_%s' % name if not value: value = '[]' jquery = u""" <script type="text/javascript"> $("#%s").tokenInput('%s', { hintText: "Enter the word", noResultsText: "No results", prePopulate: %s, searchingText: "Searching..." }); $("body").focus(); </script> """ % (final_attrs['id'], reverse('ajax_autocomplete'), value) output = super(AutoTagWidget, self).render(name, "", attrs) return output + mark_safe(jquery) class MyForm(forms.Form): AutoComplete = forms.CharField(widget=AutoCompleteWidget) this widget uses a jquery function which autocompletes a word based on entries from the database. You can preset its initial values by setting prePopulate to a json string in the form ['name': 'some name', 'id': 'some id'] I do this by setting the inital value of the form field to this json string jquery_string = ['name': 'some name', 'id': 'some id'] form = MyForm(initial={'AutoComplete':jquery_string}) When submitting the form the the value of AutoComplete is returned as a comma seperated list of the selected ids e.g. 12,45,43,66 which if what I want. However if there is an error in the form, for example a required field has not been entered the value of the AutoComplete field is now 12,45,43,66 and not the json string which it requires. What is the best way to solve this. I was thinking about overwriting the clean method in the form class but I'm not sure how to find out if any other element has returned an error. e.g. if forms.errors form.cleaned_date['autocomplete'] = json string return form.cleaned_data Thanks

    Read the article

  • Drupal with clean urls turned on is putting question marks in URL

    - by aussiegeek
    I have a drupal site with clean urls, the pages load correctly, but then the URL is rewritten, which I really don't to happen. My .htaccess is: <IfModule mod_rewrite.c> RewriteEngine on # If your site can be accessed both with and without the 'www.' prefix, you # can use one of the following settings to redirect users to your preferred # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: # # To redirect all users to access the site WITH the 'www.' prefix, # (http://example.com/... will be redirected to http://www.example.com/...) # adapt and uncomment the following: # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] # # To redirect all users to access the site WITHOUT the 'www.' prefix, # (http://www.example.com/... will be redirected to http://example.com/...) # uncomment and adapt the following: # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] # Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: # RewriteBase /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: RewriteBase / # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_URI} !(connect|administration) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </IfModule>

    Read the article

  • how to use git rebase to clean up a convoluted history

    - by lsiden
    After working for several weeks with a half dozen different branches and merges, on both my laptop and work and my desktop at home, my history has gotten a bit convoluted. For example, I just did a fetch, then merged master with origin/master. Now, when I do git show-branches, the output looks like this: ! [login] Changed domain name. ! [master] Merge remote branch 'origin/master' ! [migrate-1.9] Migrating to 1.9.1 on Heroku ! [rebase-master] Merge remote branch 'origin/master' ---- - - [master] Merge remote branch 'origin/master' + + [master^2] A bit of re-arranging and cleanup. - - [master^2^] Merge branch 'rpx-login' + + [master^2^^2] Commented out some debug logging. + + [master^2^^2^] Monkey-patched Rack::Request#ip + + [master^2^^2~2] dump each request to log .... I would like to clean this up with a git rebase. I created a new branch, rebase-master, for this purpose, and on this branch tried git rebase <common-ancestor>. However, I have to resolve many conflicts, and the end result on branch rebase-master no longer matches the corresponding version on master, which has already been tested and works! I thought I saw a solution to this somewhere but can't find it anymore. Does anyone know how to do this? Or will these convoluted ref names go away when I start deleting un-needed branches that I have already merged with? I am the sole developer on this project, so there is no one else who will be affected.

    Read the article

  • How to clean completly select2 control?

    - by Candil
    I'm working with the awesome select2 control. I'm trying to clean and disable the select2 with the content too so I do this: $("#select2id").empty(); $("#select2id").select2("disable"); Ok, it works, but if i had a value selected all the items are removed, the control is disabled, but the selected value is still displayed. I want to clear all content so the placeholder would be showed. Here is a example I did where you can see the issue: http://jsfiddle.net/BSEXM/ HTML: <select id="sel" data-placeholder="This is my placeholder"> <option></option> <option value="a">hello</option> <option value="b">all</option> <option value="c">stack</option> <option value="c">overflow</option> </select> <br> <button id="pres">Disable and clear</button> <button id="ena">Enable</button> Code: $(document).ready(function () { $("#sel").select2(); $("#pres").click(function () { $("#sel").empty(); $("#sel").select2("disable"); }); $("#ena").click(function () { $("#sel").select2("enable"); }); }); CSS: #sel { margin: 20px; } Do you have any idea or advice to this?

    Read the article

  • Delphi - Clean TListBox Items

    - by Brad
    I want to clean a list box by checking it against two other list boxes. Listbox1 would have the big list of items Listbox2 would have words I want removed from listbox1 Listbox3 would have mandatory words that have to exist for it to remain in listbox1 Below is the code I've got so far for this, it's VERY slow with large lists. // not very efficient Function checknegative ( instring : String; ListBox : TListBox ) : Boolean; Var i : Integer; Begin For I := listbox.Items.Count - 1 Downto 0 Do Begin If ExistWordInString ( instring, listbox.Items.Strings [i], [soWholeWord, soDown] ) = True Then Begin result := True; //True if in list, False if not. break; End Else Begin result := False; End; End; result:=false; End; Function ExistWordInString ( aString, aSearchString : String; aSearchOptions : TStringSearchOptions ) : Boolean; Var Size : Integer; Begin Size := Length ( aString ); If SearchBuf ( Pchar ( aString ), Size, 0, 0, aSearchString, aSearchOptions ) <> Nil Then Begin result := True; End Else Begin result := False; End; End;

    Read the article

  • Clean solution to this ruby iterator trickiness?

    - by mstksg
    k = [1,2,3,4,5] for n in k puts n if n == 2 k.delete(n) end end puts k.join(",") # Result: # 1 # 2 # 4 # 5 # [1,3,4,5] # Desired: # 1 # 2 # 3 # 4 # 5 # [1,3,4,5] This same effect happens with the other array iterator, k.each: k = [1,2,3,4,5] k.each do |n| puts n if n == 2 k.delete(n) end end puts k.join(",") has the same output. The reason this is happening is pretty clear...Ruby doesn't actually iterate through the objects stored in the array, but rather just turns it into a pretty array index iterator, starting at index 0 and each time increasing the index until it's over. But when you delete an item, it still increments the index, so it doesn't evaluate the same index twice, which I want it to. This might not be what's happening, but it's the best I can think of. Is there a clean way to do this? Is there already a built-in iterator that can do this? Or will I have to dirty it up and do an array index iterator, and not increment when the item is deleted?

    Read the article

  • need to clean malformed tags using regular expression

    - by Brian
    Looking to find the appropriate regular expression for the following conditions: I need to clean certain tags within free flowing text. For example, within the text I have two important tags: <2004:04:12 and . Unfortunately some of tags have missing "<" or "" delimiter. For example, some are as follows: 1) <2004:04:12 , I need this to be <2004:04:12> 2) 2004:04:12>, I need this to be <2004:04:12> 3) <John Doe , I need this to be <John Doe> I attempted to use the following for situation 1: String regex = "<\\d{4}-\\d{2}-\\d{2}\\w*{2}[^>]"; String output = content.replaceAll(regex,"$0>"); This did find all instances of "<2004:04:12" and the result was "<2004:04:12 ". However, I need to eliminate the space prior to the ending tag. Not sure this is the best way. Any suggestions. Thanks

    Read the article

  • Yeoman 'grunt test' fails on clean project with 'port already in use'

    - by XMLilley
    With: Mac OS 10.8.4 Node 0.10.12 npm 1.3.1 grunt-cli 0.1.9 yo 1.0.0-rc.1 bower 0.9.2 [email protected] I encounter the following error with a clean yo angular project, followed by grunt server then grunt test: Running "connect:test" (connect) task Fatal error: Port 9000 is already in use by another process. I'm new to Yeoman and am stumped. I've deleted my original project and created a new one in a fresh folder just to make sure I wasn't overlooking any invisible configs. I restarted the machine to make sure I wasn't running any temporary server processes I had forgotten about. After all attempts, the basic server starts fine, attaches to Chrome, and the watcher updates the browser on any changes. (Notably, the server is running on 9000, which seems odd for the test-runner to also be trying to use 9000.) But I get that same error on attempting to start the test runner. Is this something I can fix, or an issue I should report to the Yeoman team? Thanks.

    Read the article

  • php clean up regex

    - by David
    hey can i clean up a preg_match in php from this: preg_match_all("/(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?/",$value,$match); to look like this: preg_match_all("/ (".$this->reg['wat'].")? (".$this->reg['wat'].")? (".$this->reg['wat'].")? (".$this->reg['wat'].")? (".$this->reg['wat'].")? (".$this->reg['wat'].")? (".$this->reg['wat'].")? /",$value,$match); right now each space, it counts as a ling break so it wont return any finds when searching. but it just looks cleaner and easier to read is why i ask you know. i was looking for one of those letters to add after the closing "/" in the regex. thanks

    Read the article

  • Cleaning up code - flatten a nested hash structure

    - by knorv
    The following Perl sub flattens a nested hash structure: sub flatten { my $hashref = shift; my %hash; my %i = %{$hashref}; foreach my $ii (keys(%i)) { my %j = %{$i{$ii}}; foreach my $jj (keys(%j)) { my %k = %{$j{$jj}}; foreach my $kk (keys(%k)) { my $value = $k{$kk}; $hash{$kk} = $value; } } } return %hash; } While the code works it is not very readable or clean. My question is two-fold: In what ways does it not correspond to modern Perl best practices? How would you clean it up?

    Read the article

  • How can I view the all inherited url-resolution rules affecting a given directory?

    - by john.designop.us
    I work on two sites hosted on the same server, using the same CMS configurations and identical .htaccess files in their respective document roots. One site is letting me use the CMS's clean-url mode, and the other isn't. Site #2 functions fine in ?=messy-url mode, but when I turn clean urls on in the admin panel, and request a rewritten URL, I get a 404 error served before the CMS sees the request. I've contacted the server administrator, but he isn't inclined to provide support and the site owners are beholden to this hosting provider. I have shell access to the Linux-based server, and I can verify that mod_php and mod_rewrite are active, but I don't know what more I can do to troubleshoot this issue. Is there any way to identify directives upstream that may be differentiating the way http requests are handled by the two sites? Thanks!

    Read the article

  • How to publish multiple jar files to maven on a clean install

    - by Abhijit Hukkeri
    I have a used the maven assembly plugin to create multiple jar from one jar now the problem is that I have to publish these jar to the local repo, just like other maven jars publish by them self when they are built maven clean install how will I be able to do this here is my pom file <project> <parent> <groupId>parent.common.bundles</groupId> <version>1.0</version> <artifactId>child-bundle</artifactId> </parent> <modelVersion>4.0.0</modelVersion> <groupId>common.dataobject</groupId> <artifactId>common-dataobject</artifactId> <packaging>jar</packaging> <name>common-dataobject</name> <version>1.0</version> <dependencies> </dependencies> <build> <plugins> <plugin> <groupId>org.jibx</groupId> <artifactId>maven-jibx-plugin</artifactId> <version>1.2.1</version> <configuration> <directory>src/main/resources/jibx_mapping</directory> <includes> <includes>binding.xml</includes> </includes> <verbose>false</verbose> </configuration> <executions> <execution> <goals> <goal>bind</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>make-business-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <finalName>flight-dto</finalName> <descriptors> <descriptor>src/main/assembly/car-assembly.xml</descriptor> </descriptors> <attach>true</attach> </configuration> </execution> <execution> <id>make-gui-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <appendAssemblyId>false</appendAssemblyId> <finalName>app_gui</finalName> <descriptors> <descriptor>src/main/assembly/bike-assembly.xml</descriptor> </descriptors> <attach>true</attach> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> Here is my assembly file <assembly> <id>app_business</id> <formats> <format>jar</format> </formats> <baseDirectory>target</baseDirectory> <includeBaseDirectory>false</includeBaseDirectory> <fileSets> <fileSet> <directory>${project.build.outputDirectory}</directory> <outputDirectory></outputDirectory> <includes> <include>com/dataobjects/**</include> </includes> </fileSet> </fileSets> </assembly>

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >