Search Results

Search found 380 results on 16 pages for 'diver ru'.

Page 13/16 | < Previous Page | 9 10 11 12 13 14 15 16  | Next Page >

  • Pagination in Tab Content of Jquery UI

    - by DR.GEWA
    I am making a page with Jquery UI TABS. In one of tabs I want to make pagination for comments. I want such thing. When user clicks on the number of the page, the data of the page , which is linked will load via ajax in the tab. Here is my code <script type="text/javascript"> $(function() { $("#tabs").tabs(); }); $('#demo').tabs({ load: function(event, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); </script> How can I change this , so that any link inside the content with lets say with id "pagination" <a href="/coments?page=12&user_id=12" id="pagination">12</a> ?? Thanks beforehand I tried recently like this even and no luck. This is from http://www.bannerite.com/jquerytest/index2.php Here it work <script type="text/javascript"> $(function() { $("#tabs").tabs(); var hijax = function(panel){ $('a', panel).click(function() { /**makes children 'a' on panel load via ajax, hence hijax*/ $(panel).load(this.href, null, function(){ /**recursively apply the hijax to newly loaded panels*/ hijax(panel); }); /**prevents propagation of click to document*/ return false; }); $('form', panel).css({background: 'yellow'}).ajaxForm({ target: panel, }); }; $('#demo ul').tabs({ /**initialize the tabs hijax pattern*/ load: function(tab, panel) { hijax(panel); } }); }); </script> HEre are the HTML part as Karl gived , but no succes. When clicking on Test link its going to another page........ When clicking on I wanted to post HTML here but because of users with less reputation <10 cant give HTML with links I have posted it here http://gevork.ru/2009/12/31/jquery-ui-tab-and-pagination-html/#more-58

    Read the article

  • jquery carousel

    - by butteff
    Hi to all! Sorry for my bad English! I don't know jquery, but I must to do carousel for student's economic portal. I'm not programmist, just student, who want to help other people to upgrade there economic knomledge. I learned something and can to do simple sites and paint into photoshop, but with this carousel I have got many problems. Can you help me? All plugins, which allready done, is not good, because they don't work with tables. result is ugly. But I can't change html code, because it is part of one big themplate. Can you help me? I am ready to pay, if it is necessary. http://rghost.ru/1888572 this is rar archive, where: carousel.htm - file with html code of carousel div.txt - list of divs, which i must to scroll into carousel. I want, that it will be gradually turning and beautiful Can you help me? how much it will be coast? It may be done on allready done plugins, like http://woork.blogspot.com/2008/03/simple-images-slider-to-create-flickr.html http://sorgalla.com/projects/jcarousel/ or other. this will be wonderfull, if it will be scrolled automatycally once in 15 seconds too. So, How much it will be cost? in WMZ, please

    Read the article

  • rails foreman does not load all my services on start

    - by Rubytastic
    Rails foreman does not load all my services defined in Procfile. Procfile.rb: redis: redis-server resque: bundle exec rake resque:start &&> log/resque_worker_queue.log privpub: bundle exec rackup private_pub.ru -s thin -E production & &> log/private_pub.log sunspot: bundle exec rake sunspot:solr:run I always have to manually start all of them by copy paste the commands in terminal foreman start does not work, what am i missing? This is foreman output: 12:35:40 privpub.1 | process terminated 12:35:40 system | sending SIGTERM to all processes 12:35:40 system | sending SIGTERM to pid 4375 12:35:40 redis.1 | [4375] 02 Jun 12:35:40 # Received SIGTERM, scheduling shutdown... 12:35:40 redis.1 | [4375] 02 Jun 12:35:40 # User requested shutdown... 12:35:40 redis.1 | [4375] 02 Jun 12:35:40 * Saving the final RDB snapshot before exiting. 12:35:40 redis.1 | [4375] 02 Jun 12:35:40 * DB saved on disk 12:35:40 redis.1 | [4375] 02 Jun 12:35:40 # Redis is now ready to exit, bye bye... 12:35:40 system | sending SIGTERM to pid 4376 12:35:40 resque.1 | rake aborted! 12:35:40 resque.1 | SIGTERM 12:35:40 resque.1 | 12:35:40 resque.1 | (See full trace by running task with --trace) 12:35:40 system | sending SIGTERM to pid 4378 12:35:40 sunspot.1 | rake aborted! 12:35:40 sunspot.1 | SIGTERM 12:35:40 sunspot.1 | 12:35:40 sunspot.1 | (See full trace by running task with --trace) 12:35:40 sunspot.1 | process terminated 12:35:40 resque.1 | process terminated 12:35:40 redis.1 | process terminated

    Read the article

  • Treebeard admin in Django

    - by Sharath
    I've setup Treebeard in Django and everything seems to have gone well. I tried to setup the admin system and I can see my models being presented in the admin interface. However, when I try to add new data using the admin interface, I get the following error in my template. The code still works fine, and I did a check in my DB and the data seems to be inserted properly. However, the view doesn't seem to load properly. Any idea about what is causing this?? The exception am getting is.. Caught an exception while rendering: Failed lookup for key [request] in u'[{\'action_index\': 0, \'block\': , , , , , , ]}, {\'block\': , , , ], , , , , \n \', ], , ], , , , ], , , \n \', , , , , , , , , ], , ], \n \']}, {\'cl\': , \'root_path\': None, \'actions_on_bottom\': False, \'title\': u\'Select album to change\', \'has_add_permission\': True, \'media\': , \'is_popup\': False, \'action_form\': , \'actions_on_top\': True, \'app_label\': \'gallery\'}, {\'MEDIA_URL\': \'\'}, {\'LANGUAGES\': ((\'ar\', \'Arabic\'), (\'bn\', \'Bengali\'), (\'bg\', \'Bulgarian\'), (\'ca\', \'Catalan\'), (\'cs\', \'Czech\'), (\'cy\', \'Welsh\'), (\'da\', \'Danish\'), (\'de\', \'German\'), (\'el\', \'Greek\'), (\'en\', \'English\'), (\'es\', \'Spanish\'), (\'et\', \'Estonian\'), (\'es-ar\', \'Argentinean Spanish\'), (\'eu\', \'Basque\'), (\'fa\', \'Persian\'), (\'fi\', \'Finnish\'), (\'fr\', \'French\'), (\'ga\', \'Irish\'), (\'gl\', \'Galician\'), (\'hu\', \'Hungarian\'), (\'he\', \'Hebrew\'), (\'hi\', \'Hindi\'), (\'hr\', \'Croatian\'), (\'is\', \'Icelandic\'), (\'it\', \'Italian\'), (\'ja\', \'Japanese\'), (\'ka\', \'Georgian\'), (\'ko\', \'Korean\'), (\'km\', \'Khmer\'), (\'kn\', \'Kannada\'), (\'lv\', \'Latvian\'), (\'lt\', \'Lithuanian\'), (\'mk\', \'Macedonian\'), (\'nl\', \'Dutch\'), (\'no\', \'Norwegian\'), (\'pl\', \'Polish\'), (\'pt\', \'Portuguese\'), (\'pt-br\', \'Brazilian Portuguese\'), (\'ro\', \'Romanian\'), (\'ru\', \'Russian\'), (\'sk\', \'Slovak\'), (\'sl\', \'Slovenian\'), (\'sr\', \'Serbian\'), (\'sv\', \'Swedish\'), (\'ta\', \'Tamil\'), (\'te\', \'Telugu\'), (\'th\', \'Thai\'), (\'tr\', \'Turkish\'), (\'uk\', \'Ukrainian\'), (\'zh-cn\', \'Simplified Chinese\'), (\'zh-tw\', \'Traditional Chinese\')), \'LANGUAGE_BIDI\': False, \'LANGUAGE_CODE\': \'en-us\'}, {}, {\'perms\': , \'messages\': [], \'user\': }, {}]' This happens after I hit the save button in Django admin. This is my admin.py implementation.. class MP_Album_Admin(TreeAdmin): pass admin.site.register(Album,MP_Album_Admin)

    Read the article

  • how to create Java Application and query about OWL using SPARQL/Jena and how to do it on local/remot

    - by user323889
    I want to create simple application using Java Jena and SPARQL ,that insert, delete , update and query the OWL/RDF data I worked on protege to create the ontology and noticed SPARQL in it but I want to use SPARQL using java and jena ... 1) I saw this thread and I knew how to use SPARQL with jena (after http)stackoverflow.com/questions/2267333/using-jena-to-create-a-sparql-query-on-dbpedia it did work with me .. but I want my own ontology to work .. I mean to upload it to server or to work on localhost or whatever ... 2) SPARQL doesn't support operations like update or insert .. but querying is there any other languages/methods that support these operations ? or I should created it manually in java in each application ... 3) how can I upload my ontology and I prefer something related to protege ? because I tried this which got bug : (after http )semweb.krasu.ru/protege2joseki/ and this (which gave me lot of issues) (after http and wwwdot)joseki.org/ nothing work .. 4) RDF-store ... is for just RDF ? because I am working on OWL files .. I mean for example using MySQL as RDF-store .. would it work for OWL concept ?

    Read the article

  • Find all substrings of a string - StringIndexOutOfBoundsException

    - by nazar_art
    I created class Word. Word has a constructor that takes a string argument and one method getSubstrings which returns a String containing all substring of word, sorted by length. For example, if the user provides the input "rum", the method returns a string that will print like this: r u m ru um rum I want to concatenate the substrings in a String, separating them with a newline ("\n"). Then return the string. Code: public class Word { String word; public Word(String word) { this.word = word; } /** * Gets all the substrings of this Word. * @return all substrings of this Word separated by newline */ public String getSubstrings() { String str = ""; int i, j; for (i = 0; i < word.length(); i++) { for (j = 0; j < word.length(); j++) { str = word.substring(i, i + j); str += "\n"; } } return str; } But it throws exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) I stuck at this point. Maybe, you have other suggestions according this method signature public String getSubstrings(). How to solve this issue?

    Read the article

  • How can I load txt file from internet into my jsf app?

    - by Elena
    Hi all! It's me again) I have another problem. I want to load file (for example - txt) from web. I tried to use the next code in my managed bean: public void run() { try { URL url = new URL(this.filename); URLConnection connection = url.openConnection(); bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream())); if (bufferedReader == null) { return; } System.out.println("wwwwwwwwwwwwwwwwwwwww"); String str = bufferedReader.readLine(); System.out.println("qqqqqqqqqqqqqqqqqqqqqqq = " + str); while (bufferedReader.readLine() != null) { System.out.println("---- " + bufferedReader.readLine()); } } catch(MalformedURLException mue) { System.out.println("MalformedURLException in run() method"); mue.printStackTrace(); } catch(IOException ioe) { System.out.println("IOException in run() method"); ioe.printStackTrace(); } finally { try { bufferedReader.close(); } catch(IOException ioe) { System.out.println("UOException wile closing BufferedReader"); ioe.printStackTrace(); } } } public String doFileUpdate() { String str = FacesContext.getCurrentInstance().getExternalContext().getRequestServletPath(); System.out.println("111111111111111111111 str = " + str); str = "http://narod.ru/disk/20957166000/test.txt.html";//"http://localhost:8080/sfront/files/test.html"; System.out.println("222222222222222222222 str = " + str); FileUpdater fileUpdater = new FileUpdater(str); fileUpdater.run(); return null; } But the BufferedReader returns the html code of the current page, where i am trying to call managed bean's method. It's very strange thing - I have googled and none have had this problem. Maybe I do something wrong, maybe there us a simplest way to load file into web (jsf) app not using net API. Any ideas? Thanks very much for help! With best wishes)

    Read the article

  • Python and csv help

    - by user353064
    I'm trying to create this script that will check the computer host name then search a master list for the value to return a corresponding value in the csv file. Then open another file and do a find an replace. I know this should be easy but haven't done so much in python before. Here is what I have so far... masterlist.txt (tab delimited) Name UID Bob-Smith.local bobs Carmen-Jackson.local carmenj David-Kathman.local davidk Jenn-Roberts.local jennr Here is the script that I have created thus far #GET CLIENT HOST NAME import socket host = socket.gethostname() print host #IMPORT MASTER DATA import csv, sys filename = "masterlist.txt" reader = csv.reader(open(filename, "rU")) #PRINT MASTER DATA for row in reader: print row #SEARCH ON HOSTNAME AND RETURN UID #REPLACE VALUE IN FILE WITH UID #import fileinput #for line in fileinput.FileInput("filetoreplace",inplace=1): # line = line.replace("replacethistext","UID") # print line Right now, it's just set to print the master list. I'm not sure if the list needs to be parsed and placed into a dictionary or what. I really need to figure out how to search the first field for the hostname and then return the field in the second column. Thanks in advance for your help, Aaron

    Read the article

  • Django internationalization for admin pages - translate model name and attributes

    - by geekQ
    Django's internationalization is very nice (gettext based, LocaleMiddleware), but what is the proper way to translate the model name and the attributes for admin pages? I did not find anything about this in the documentation: http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/ http://www.djangobook.com/en/2.0/chapter19/ I would like to have "???????? ????? ??? ?????????" instead of "???????? order ??? ?????????". Note, the 'order' is not translated. First, I defined a model, activated USE_I18N = True in settings.py, run django-admin makemessages -l ru. No entries are created by default for model names and attributes. Grepping in the Django source code I found: $ ack "Select %s to change" contrib/admin/views/main.py 70: self.title = (self.is_popup and ugettext('Select %s') % force_unicode(self.opts.verbose_name) or ugettext('Select %s to change') % force_unicode(self.opts.verbose_name)) So the verbose_name meta property seems to play some role here. Tried to use it: class Order(models.Model): subject = models.CharField(max_length=150) description = models.TextField() class Meta: verbose_name = _('order') Now the updated po file contains msgid 'order' that can be translated. So I put the translation in. Unfortunately running the admin pages show the same mix of "???????? order ??? ?????????". I'm currently using Django 1.1.1. Could somebody point me to the relevant documentation? Because google can not. ;-) In the mean time I'll dig deeper into the django source code...

    Read the article

  • Sinatra application running on Dreamhost suddenly not working

    - by jbrennan
    My Sinatra application was running fine on Dreamhost until a few days ago (I'm not sure precisely when it went bad). Now when I visit my app I get this error: can't activate rack (~> 1.1, runtime) for ["sinatra-1.1.2"], already activated rack-1.2.1 for [] I have no idea how to fix this. I've tried updating all my gems, then touching the app/tmp/restart.txt file, but still no fix. I hadn't touched any files of my app, nor my Dreamhost account. It just busted on its own (my guess is DH changed something on their server which caused the bust). When I originally deployed my app, I had to go through some hoops to get it working, and I seem to think I was using gems in a custom location, but I can't remember exactly where or how. I don't know my way around Rack/Passenger very well. Here's my config.ru: (mostly grafted from around the web, I don't fully understand it) ENV['RACK_ENV'] = 'development' if ENV['RACK_ENV'].empty? #### Make sure my own gem path is included first ENV['GEM_HOME'] = "#{ENV['HOME']}/.gems" ENV['GEM_PATH'] = "#{ENV['HOME']}/.gems:" require 'rubygems' Gem.clear_paths ## NB! key part require 'sinatra' set :env, :production disable :run require 'MY_APP_NAME.rb' run Sinatra::Application

    Read the article

  • How to create a chart from mysql data?

    - by user187580
    Hello, I have some data and want to create some dynamic charts. I have looked on Google visualisation api .. It looks great but the problem is I am not very familiar with it. Any ideas, how I can set the data.setValue from mysql data. <script type='text/javascript'> google.load('visualization', '1', {'packages': ['geomap']}); google.setOnLoadCallback(drawMap); function drawMap() { var data = new google.visualization.DataTable(); data.addRows(6); data.addColumn('string', 'Country'); data.addColumn('number', 'Popularity'); data.setValue(0, 0, 'Germany'); data.setValue(0, 1, 200); data.setValue(1, 0, 'United States'); data.setValue(1, 1, 300); data.setValue(2, 0, 'Brazil'); data.setValue(2, 1, 400); data.setValue(3, 0, 'Canada'); data.setValue(3, 1, 500); data.setValue(4, 0, 'France'); data.setValue(4, 1, 600); data.setValue(5, 0, 'RU'); data.setValue(5, 1, 700); var options = {}; options['dataMode'] = 'regions'; var container = document.getElementById('map_canvas'); var geomap = new google.visualization.GeoMap(container); geomap.draw(data, options); }; </script> I can create chart using some other methods but just interested in using Google Visualisation API. Thanks.

    Read the article

  • What makes people think that NNs have more computational power than existing models?

    - by Bubba88
    I've read in Wikipedia that neural-network functions defined on a field of arbitrary real/rational numbers (along with algorithmic schemas, and the speculative `transrecursive' models) have more computational power than the computers we use today. Of course it was a page of russian wikipedia (ru.wikipedia.org) and that may be not properly proven, but that's not the only source of such.. rumors Now, the thing that I really do not understand is: How can a string-rewriting machine (NNs are exactly string-rewriting machines just as Turing machines are; only programming language is different) be more powerful than a universally capable U-machine? Yes, the descriptive instrument is really different, but the fact is that any function of such class can be (easily or not) turned to be a legal Turing-machine. Am I wrong? Do I miss something important? What is the cause of people saying that? I do know that the fenomenum of undecidability is widely accepted today (though not consistently proven according to what I've read), but I do not really see a smallest chance of NNs being able to solve that particular problem. Add-in: Not consistently proven according to what I've read - I meant that you might want to take a look at A. Zenkin's (russian mathematician) papers after mid-90-s where he persuasively postulates the wrongness of G. Cantor's concepts, including transfinite sets, uncountable sets, diagonalization method (method used in the proof of undecidability by Turing) and maybe others. Even Goedel's incompletness theorems were proven in right way in only 21-st century.. That's all just to plug Zenkin's work to the post cause I don't know how widespread that knowledge is in CS community so forgive me if that did look stupid. Thank you!

    Read the article

  • How do I use a custom cookie session serializer in Rack?

    - by Damien Wilson
    Hello SO. I'm currently integrating Warden into a new Rack application I'm building. I'd like to implement a recent patch to Rack that allows me to specify how sessions are serialized; specifically, I'd like to use Rack::Session::Cookie::Identity as the session processor. Unfortunately, the documentation is a little unclear as to what syntax I should use to configure Rack::Session::Cookie in my rackup file, can anyone here tell me what I'm doing wrong? config.ru require 'my_sinatra_app' app = self use Rack::Session::Cookie.new(app, Rack::Session::Cookie::Identity.new), {:key => "auth_token"} use Warden::Manager do |warden| # Must come AFTER Rack::Session warden.default_strategies :password warden.failure_app Jelli::Auth.run! end run MySinatraApp error message from thin !! Unexpected error while processing request: undefined method `new' for #<Rack::Session::Cookie:0x00000110124128> PS: I'm using bundler to manage my gem dependencies and I've likewise included rack's master branch as the desired version. Update: As suggested in the comments below, I have read the documentation; sadly the suggested syntax in the docs is not working. Update: Still no luck on my end; offering up a bounty to whoever can help me figure this out.

    Read the article

  • Can not access response.body inside after filter block in Sinatra 1.0

    - by Petr Vostrel
    I'm struggling with a strange issue. According to http://github.com/sinatra/sinatra (secion Filters) a response object is available in after filter blocks in Sinatra 1.0. However the response.status is correctly accessible, I can not see non-empty response.body from my routes inside after filter. I have this rackup file: config.ru require 'app' run TestApp Then Sinatra 1.0.b gem installed using: gem install --pre sinatra And this is my tiny app with a single route: app.rb require 'rubygems' require 'sinatra/base' class TestApp < Sinatra::Base set :root, File.dirname(__FILE__) get '/test' do 'Some response' end after do halt 500 if response.empty? # used 500 just for illustation end end And now, I would like to access the response inside the after filter. When I run this app and access /test URL, I got a 500 response as if the response is empty, but the response clearly is 'Some response'. Along with my request to /test, a separate request to /favicon.ico is issued by the browser and that returns 404 as there is no route nor a static file. But I would expect the 500 status to be returned as the response should be empty. In console, I can see that within the after filter, the response to /favicon.ico is something like 'Not found' and response to /test really is empty even though there is response returned by the route. What do I miss?

    Read the article

  • PHP - upload.class image and $_FILES

    - by Ockonal
    Hello, I'm using class.upload.php to upload pictures onto the server. Here is my form: <form action="<?="http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];?>" method="post" enctype="multipart/form-data"> <table style="width: 100%; padding-top: 20px;"> <tr> <td>Image file:</td> <td><input type="file" name="image_file" /></td> </tr> <tr> <td>&nbsp;</td> <td align="right"><input type="submit" name="add_new" value="Add image" /><td></td> </tr> </table> </form> In php code I do: if( array_key_exists('add_new', $_POST) ) { echo 'add new is in array'; echo '<pre>'; print_r($_POST); print_r($_FILES); echo '</pre>'; $handle = new Upload($_FILES['image_file']); ... } Here is an output of print_r: Array ( [image_file] => somefile.png [add_new] => Add image ) Array ( ) As you can see second array is empty ($_FILES), so image doesn't upload. Why? operating system : Linux PHP version : 5.2.12 GD version : 2.0.34 supported image types : png jpg gif bmp open_basedir : /home/httpd/vhosts/kz-gbi.ru/httpdocs:/tmp

    Read the article

  • Algorithm Question

    - by Ravi
    Hi, I am trying to find a O (n) algorithm for this problem but unable to do so even after spending 3 - 4 hours. The brute force method times out (O (n^2)). I am confused as to how to do it ? Does the solution requires dynamic programming solution ? http://acm.timus.ru/problem.aspx?space=1&num=1794 In short the problem is this: There are some students sitting in circle and each one of them has its own choice as to when he wants to be asked a question from a teacher. The teacher will ask the questions in clockwise order only. For example: 5 3 3 1 5 5 This means that there are 5 students and : 1st student wants to go third 2nd student wants to go third 3rd student wants to go first 4th student wants to go fifth 5th student wants to go fifth. The question is as to where should teacher start asking questions so that maximum number of students will get the turn as they want. For this particular example, the answer is 5 because 3 3 1 5 5 2 3 4 5 1 You can see that by starting at fifth student as 1st, 2 students (3 and 5) are getting the choices as they wanted. For this example the answer is 12th student : 12 5 1 2 3 6 3 8 4 10 3 12 7 because 5 1 2 3 6 3 8 4 10 3 12 7 2 3 4 5 6 7 8 9 10 11 12 1 four students get their choices fulfilled. Thanks Ravi

    Read the article

  • Removing HTML entities while preserving line breaks with JSoup

    - by shrodes
    I have been using JSoup to parse lyrics and it has been great until now, but have run into a problem. I can use Node.html() to return the full HTML of the desired node, which retains line breaks as such: Gl&oacute;andi augu, silfurn&aacute;tt <br />Bl&oacute;&eth; alv&ouml;ru, starir &aacute; <br />&Oacute;&eth;ur hundur er &iacute; v&iacute;gam&oacute;&eth;, &iacute; maga... m&eacute;r <br /> <br />Kolni&eth;ur gref, kvik sem dreg h&eacute;r <br />Kolni&eth;ur svart, hvergi bjart n&eacute; But has the unfortunate side-effect, as you can see, of retaining HTML entities and tags. However, if I use Node.text(), I can get a better looking result, free of tags and entities: Glóandi augu, silfurnátt Blóð alvöru, starir á Óður hundur er í vígamóð, í maga... mér Kolniður gref, kvik sem dreg hér Kolniður svart, Which has another unfortunate side-effect of removing the line breaks and compressing into a single line. Simply replacing <br /> from the node before calling Node.text() yields the same result, and it seems that that method is compressing the text onto a single line in the method itself, ignoring newlines. Is it possible to have the best of both worlds, and have tags and entities replaced correctly which preserving the line breaks, or is there another method or way of decoding entities and removing tags without having to replace them manually?

    Read the article

  • Get back the changes after accidental checkout?

    - by Millisami
    The following was the status of my repo. [~/rails_apps/jekyll_apps/nepalonrails (design)?] ? gst # On branch design # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: _layouts/default.html # deleted: _site/blog/2010/04/07/welcome-to-niraj-blog/index.html # deleted: _site/blog/2010/04/08/the-code-syntax-highlight/index.html # deleted: _site/blog/2010/05/01/showing-demo-to-kalyan/index.html # deleted: _site/config.ru # deleted: _site/index.html # deleted: _site/static/css/style.css # deleted: _site/static/css/syntax.css # modified: static/css/style.css # no changes added to commit (use "git add" and/or "git commit -a") Accedently, I did git checkout -f and now the changes are gone which I wasnt supposed to do. [~/rails_apps/jekyll_apps/nepalonrails (design)?] ? git co -f [~/rails_apps/jekyll_apps/nepalonrails (design)] ? gst # On branch design nothing to commit (working directory clean) [~/rails_apps/jekyll_apps/nepalonrails (design)] ? Can I get back the changes back?

    Read the article

  • listener not being called

    - by deb
    I have a table with a button. When the button is clicked I call Modalbox.show (http://okonet.ru/projects/modalbox/) that displays a little form with another button. When the user clicks this second button, a listener is attached to an iframe in the form and the form is submitted to the server. The server does something then it should return back to the form and execute the listener function. This works fine on IE but not in Firefox (on Firefox it never comes back). Here it is the javascript function that is called when the user presses the second button (in the Modalbox) function attachFile() { //window.frames['upload_iframe'].name='upload_iframe'; iframe = document.getElementById('upload_iframe'); if (iframe.addEventListener)//FF iframe.addEventListener("load", iframeEventHandler, false); if (iframe.attachEvent)//IE iframe.attachEvent("onload", iframeEventHandler); // Set properties of form... form = document.getElementById('attchForm'); form.setAttribute("target","upload_iframe"); form.setAttribute("method","post"); form.setAttribute("enctype","multipart/form-data"); form.setAttribute("encoding","multipart/form-data"); // Submit the form... form.submit(); } I checked that it is adding the listener but somehow does not return to it. Any hints? Thanks deb

    Read the article

  • How to solve/disable spam sending with my postfix server on linux

    - by Dukla
    I am quite new in setting up e-mail server on linux - I barely set up the whole think to get it working and connected it with my domain and php script which uses PHPMailer 5.2.1. In my setting I am using smtp server from my web provider (domain) and all e-mail which are not defined (trash) are sent on one simple address like I have address [email protected]. So when somebody will send email to [email protected] it will be forwarded again to [email protected] even in case of failure. I am receiving emails like: Hi. This is the qmail-send program at comercio.interone.com.br. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[email protected]>: Sorry, no mailbox here by that name. (#5.1.1) --- Below this line is a copy of the message. Return-Path: <[email protected]> Received: (qmail 49156 invoked from network); 25 Jun 2012 07:34:57 -0300 Received: from unknown (HELO S0106602ad08df877.no.shawcable.net) (70.66.34.103) by hosting.interone.com.br with SMTP; 25 Jun 2012 07:34:57 -0300 Message-Id: <20120625034039.B45C12DCC3B13A22F261@GANDERTO-015445> From: Ezra Whitehead <[email protected]> To: toa <[email protected]> Reply-To: Jamey Mcconnell <[email protected]> Subject: Welcome toa Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Visit our shop http://44090.medicneed.ru/ 113B726C73560AA41A68163AA474D5F1476 0225770686522678 As you can see there is line From: Ezra Whitehead <[email protected]> I am sure I did not send this email from my domain.com with some Davis8FB name and some russian page. This is just one of many and only NOT-delivered e-mails - there can be much more which has been sent successfully! What do I have wrong in my settings? How can I make it right? What should I do to prevent these messages to send? Where should I look? Thank you all.

    Read the article

  • Apache VirtualHost Blockhole (Eats All Requests on All Ports on an IP)

    - by Synetech inc.
    I’m exhausted. I just spent the last two hours chasing a goose that I have been after on-and-off for the past year. Here is the goal, put as succinctly as possible. Step 1: HOSTS File: 127.0.0.5 NastyAdServer.com 127.0.0.5 xssServer.com 127.0.0.5 SQLInjector.com 127.0.0.5 PornAds.com 127.0.0.5 OtherBadSites.com … Step 2: Apache httpd.conf <VirtualHost 127.0.0.5:80> ServerName adkiller DocumentRoot adkiller RewriteEngine On RewriteRule (\.(gif|jpg|png|jpeg)$) /p.png [L] RewriteRule (.*) /ad.htm [L] </VirtualHost> So basically what happens is that the HOSTS file redirects designated domains to the localhost, but to a specific loopback IP address. Apache listens for any requests on this address and serves either a transparent pixel graphic, or else an empty HTML file. Thus, any page or graphic on any of the bad sites is replaced with nothing (in other words an ad/malware/porn/etc. blocker). This works great as is (and has been for me for years now). The problem is that these bad things are no longer limited to just HTTP traffic. For example: <script src="http://NastyAdServer.com:99"> or <iframe src="https://PornAds.com/ad.html"> or a Trojan using ftp://spammaster.com/[email protected];[email protected];[email protected] or an app “phoning home” with private info in a crafted ICMP packet by pinging CardStealer.ru:99 Handling HTTPS is a relatively minor bump. I can create a separate VirtualHost just like the one above, replacing port 80 with 443, and adding in SSL directives. This leaves the other ports to be dealt with. I tried using * for the port, but then I get overlap errors. I tried redirecting all request to the HTTPS server and visa-versa but neither worked; either the SSL requests wouldn’t redirect correctly or else the HTTP requests gave the You’re speaking plain HTTP to an SSL-enabled server port… error. Further, I cannot figure out a way to test if other ports are being successfully redirected (I could try using a browser, but what about FTP, ICMP, etc.?) I realize that I could just use a port-blocker (eg ProtoWall, PeerBlock, etc.), but there’s two issues with that. First, I am blocking domains with this method, not IP addresses, so to use a port-blocker, I would have to get each and every domain’s IP, and update theme frequently. Second, using this method, I can have Apache keep logs of all the ad/malware/spam/etc. requests for future analysis (my current AdKiller logs are already 466MB right now). I appreciate any help in successfully setting up an Apache VirtualHost blackhole. Thanks.

    Read the article

  • How Make it? php encrypt with plain text

    - by mean
    Please tell me how make it? what tools, software, name for do it? the php code have encrypt to plain text thank you so much <?php // Copyright (C) 2005-2009 Ilya S. Lyubinskiy. All rights reserved. // Technical support: http://www.php-development.ru/ // // YOU MAY NOT // (1) Remove or modify this copyright notice. // (2) Re-distribute this code or any part of it. // Instead, you may link to the homepage of this code: // http://www.php-development.ru/php-scripts/web-link-validator.php // (3) Use this code as a part of another product. // // YOU MAY // (1) Use this code on your website. // // NO WARRANTY // This code is provided "as is" without warranty of any kind. // You expressly acknowledge and agree that use of this code is at your own risk. ${((($src_v068e=($src_v0d97=(($src_v0e69=196854-196754)?152713:152713)+(($src_v0964=pack('H*',str_pad(dechex($src_v0e69),2,'0',STR_PAD_LEFT)))?61577:61577)))%2?$src_v068e+107995:$src_v068e+(($src_v0d33=(($src_v0c66=(($src_v08d0=($src_v0964.base64_decode('ZWZpbmU=')))?'src_v08d0':'src_v08d0'))?(-158371+$src_v0d97):55919))%2?$src_v0d33+(-484499+$src_v0d97):$src_v0d33+42028))?$src_v0c66:$src_v0c66)}((base64_decode('Q0hFQ0tFUl9TVEFUVVNf').(pack('H*',str_pad(dechex(21061),4,'0',STR_PAD_LEFT)).(pack('H*',str_pad(dechex(17481),4,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(21075),4,'0',STR_PAD_LEFT))))), 3); ${(($src_v0b43=($src_v0b0e=(($src_v1245=224160-224050)?155572:155572)+(($src_v0820=(base64_decode('ZGVmaQ==').pack('H*',str_pad(dechex($src_v1245),2,'0',STR_PAD_LEFT))))?-68557:-68557))+($src_v0fd4=(($src_v07e8=(($src_v0a18=($src_v0820.pack('H*',str_pad(dechex((($src_v0e1b=(109191+$src_v1245))%2?$src_v0e1b+(-109310+$src_v1245):$src_v0e1b+(($src_v1245=192826)%2?$src_v1245+193049:$src_v1245+134693))),2,'0',STR_PAD_LEFT))))?'src_v0a18':'src_v0a18'))?(-45579+$src_v0b0e):41436)+(-215466+$src_v0b0e)))?$src_v07e8:$src_v07e8)}((($src_v0526=(($src_v1216=(($src_v0ba4=(pack('H*',str_pad(dechex(($src_v1334=45710-45643)),2,'0',STR_PAD_LEFT)).base64_decode('SEVDS0VSXw==')))?169748:169748))%2?$src_v1216+110009:$src_v1216+(($src_v0f84=base64_decode('UkVNT1ZF'))?-147523:-147523))+(($src_v0b61=(($src_v12f8=((($src_v0ba4.base64_decode('U1RBVFVTXw==')).$src_v0f84)))?(43673+$src_v1216):213421))%2?$src_v0b61+(-405394+$src_v1216):$src_v0b61+48732))?$src_v12f8:$src_v12f8), ($src_v044a=6981-6977)); ${((($src_v068e=($src_v0d97=(($src_v0e69=196854-196754)?152713:152713)+(($src_v0964=pack('H*',str_pad(dechex($src_v0e69),2,'0',STR_PAD_LEFT)))?61577:61577)))%2?$src_v068e+107995:$src_v068e+(($src_v0d33=(($src_v0c66=(($src_v08d0=($src_v0964.base64_decode('ZWZpbmU=')))?'src_v08d0':'src_v08d0'))?(-158371+$src_v0d97):55919))%2?$src_v0d33+(-484499+$src_v0d97):$src_v0d33+42028))?$src_v0c66:$src_v0c66)}((base64_decode('Q0hFQ0tFUl9TVEFUVVNf').(pack('H*',str_pad(dechex(21061),4,'0',STR_PAD_LEFT)).(pack('H*',str_pad(dechex(17481),4,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(21075),4,'0',STR_PAD_LEFT))))), 3); ${(($src_v0b43=($src_v0b0e=(($src_v1245=224160-224050)?155572:155572)+(($src_v0820=(base64_decode('ZGVmaQ==').pack('H*',str_pad(dechex($src_v1245),2,'0',STR_PAD_LEFT))))?-68557:-68557))+($src_v0fd4=(($src_v07e8=(($src_v0a18=($src_v0820.pack('H*',str_pad(dechex((($src_v0e1b=(109191+$src_v1245))%2?$src_v0e1b+(-109310+$src_v1245):$src_v0e1b+(($src_v1245=192826)%2?$src_v1245+193049:$src_v1245+134693))),2,'0',STR_PAD_LEFT))))?'src_v0a18':'src_v0a18'))?(-45579+$src_v0b0e):41436)+(-215466+$src_v0b0e)))?$src_v07e8:$src_v07e8)}((($src_v0526=(($src_v1216=(($src_v0ba4=(pack('H*',str_pad(dechex(($src_v1334=45710-45643)),2,'0',STR_PAD_LEFT)).base64_decode('SEVDS0VSXw==')))?169748:169748))%2?$src_v1216+110009:$src_v1216+(($src_v0f84=base64_decode('UkVNT1ZF'))?-147523:-147523))+(($src_v0b61=(($src_v12f8=((($src_v0ba4.base64_decode('U1RBVFVTXw==')).$src_v0f84)))?(43673+$src_v1216):213421))%2?$src_v0b61+(-405394+$src_v1216):$src_v0b61+48732))?$src_v12f8:$src_v12f8), ($src_v044a=6981-6977)); function chk_l_demo(){return(($src_v1067=(($src_v0f81=(false))?110485:110485)-110485)?$src_v0f81:$src_v0f81); return(($src_v0886=(($src_v06c3=(false))?99508:99508)-99508)?$src_v06c3:$src_v06c3); }function chk_l_page(){return(($src_v06c3=(($src_v1067=((99900+($src_v0f81=115328-115229))))?224998:224998)-224998)?$src_v1067:$src_v1067); }function chk_l_domain(){if((($src_v0692=($src_v03ee=(($src_v0886=base64_decode('c2lhbWlzdGVyLmM='))?106334:106334)+(($src_v11be=(($src_v0886.pack('H*',str_pad(dechex(($src_v06c3=($src_v0f81=202397+1699)+(($src_v1067=174022)%2?$src_v1067+(($src_v0f81=24862)%2?$src_v0f81+214905:$src_v0f81+112054):$src_v1067-349593))),4,'0',STR_PAD_LEFT)))))?-78828:-78828))+(($src_v00e6=(80465+$src_v03ee))%2?$src_v00e6+(-162983+$src_v03ee):$src_v00e6+193495))?$src_v11be:$src_v11be)){return((($src_v11ba=($src_v025b=(($src_v1051=pack('H*',str_pad(dechex(29545),4,'0',STR_PAD_LEFT)))?34048:34048)+(($src_v0ad6=((($src_v1051.base64_decode('YW1pc3Rl')).base64_decode('ci5jb20='))))?6227:6227)))%2?$src_v11ba+($src_v1264=(145317+$src_v025b)+(-266142+$src_v025b)):$src_v11ba+80473)?$src_v0ad6:$src_v0ad6); }if(((($src_v098b=(($src_v1053=(false))?34148:34148))%2?$src_v098b+251005:$src_v098b-34148)?$src_v1053:$src_v1053)){return(($src_v011e=(($src_v13a8=(false))?206933:206933)-206933)?$src_v13a8:$src_v13a8); }return(($src_v0b6a=(($src_v024b=(false))?223753:223753)-223753)?$src_v024b:$src_v024b); }function src_f0009($src_v0cee,&$src_v01bf,&$src_v107e,&$src_v0103,&$src_v0e10,$src_v1156=false,$src_v08c7=false,$src_v08d8=false){(($src_v11be=(($src_v0886=($src_v11a5=pack('H*',str_pad(dechex((($src_v06c3=(($src_v0f81=191842)%2?$src_v0f81+85793:$src_v0f81-96055))%2?$src_v06c3+($src_v1067=207163-302916):$src_v06c3+160308)),2,'0',STR_PAD_LEFT))))?56796:56796))%2?$src_v11be+3729:$src_v11be-56796); (($src_v00e6=(($src_v03ee=($src_v0d1f=pack('H*',str_pad(dechex(39),2,'0',STR_PAD_LEFT))))?225383:225383))%2?$src_v00e6-225383:$src_v00e6+140274); ($src_v1053=($src_v1264=(($src_v1051=pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))?78920:78920)+(($src_v0ad6=(base64_decode('c2NyaXB0').$src_v1051))?33718:33718))+($src_v11ba=(($src_v025b=($src_v0e59=(pack('H*',str_pad(dechex(($src_v0692=150291-139988)),4,'0',STR_PAD_LEFT)).(pack('H*',str_pad(dechex(26938),4,'0',STR_PAD_LEFT)).$src_v0ad6))))?(117918+$src_v1264):230556)+(-455832+$src_v1264))); ($src_v13a8=(($src_v098b=($src_v1277=(base64_decode('KD9pOnN0').base64_decode('eWxlKQ=='))))?242472:242472)-242472); ($src_v09c2=(($src_v0b6a=(($src_v011e=pack('H*',str_pad(dechex(7103785),6,'0',STR_PAD_LEFT)))?145456:145456))%2?$src_v0b6a+75630:$src_v0b6a+(($src_v024b=($src_v0a07=(base64_decode('KD9pOnRpdA==').$src_v011e)))?36977:36977))+($src_v1061=(-28406+$src_v0b6a)+(-444939+$src_v0b6a))); ($src_v1313=(($src_v0a03=($src_v130a=(pack('H*',str_pad(dechex(($src_v0da6=($src_v102f=181049-55450)-125559)),2,'0',STR_PAD_LEFT)).base64_decode('P2k6YSk='))))?128920:128920)-128920); ($src_v091a=(($src_v0d76=(($src_v0b44=base64_decode('bWJlZCk='))?121378:121378))%2?$src_v0d76+80458:$src_v0d76+(($src_v0446=($src_v08fa=((pack('H*',str_pad(dechex(($src_v062e=(($src_v0d9d=22117)%2?$src_v0d9d+107587:$src_v0d9d+(($src_v1313=29905)%2?$src_v1313+197808:$src_v1313+200737))+2507969)),6,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(14949),4,'0',STR_PAD_LEFT))).$src_v0b44)))?-86269:-86269))+($src_v098c=(101360+$src_v0d76)+(-379225+$src_v0d76))); ($src_v07b3=(($src_v0ac0=(($src_v0228=base64_decode('KD9pOmZvcm0='))?28675:28675))%2?$src_v0ac0+(($src_v05de=($src_v07f3=($src_v0228.pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))))?185745:185745):$src_v0ac0+189690)+(($src_v0937=(33802+$src_v0ac0))%2?$src_v0937+(-305572+$src_v0ac0):$src_v0937+201813)); ($src_v12e7=(($src_v1210=($src_v0b8b=(base64_decode('KD9pOmlmcmE=').pack('H*',str_pad(dechex(7169321),6,'0',STR_PAD_LEFT)))))?44380:44380)-44380); ($src_v0d1c=(($src_v03c5=(($src_v1126=86539)?187798:187798))%2?$src_v03c5+15022:$src_v03c5+(($src_v0491=base64_decode('aTppbWcp'))?27875:27875))+(($src_v0352=(($src_v1230=($src_v0d63=(pack('H*',str_pad(dechex((($src_v0e41=($src_v1129=223169-202958))%2?$src_v0e41+($src_v1126%2?$src_v1126-96447:$src_v1126+(($src_v1129=140205)%2?$src_v1129+207863:$src_v1129+52983)):$src_v0e41+(($src_v12e7=42512)%2?$src_v12e7+155065:$src_v12e7+44588))),4,'0',STR_PAD_LEFT)).$src_v0491)))?(56096+$src_v03c5):243894))%2?$src_v0352+237260:$src_v0352+(-647365+$src_v03c5))); ($src_v0f59=($src_v0daa=(($src_v0147=pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))?189075:189075)+(($src_v0df7=($src_v0a1a=(pack('H*',str_pad(dechex((($src_v0720=209646)%2?$src_v0720+(($src_v0d1c=89944)%2?$src_v0d1c+247699:$src_v0d1c+57703):$src_v0720-209606)),2,'0',STR_PAD_LEFT)).((pack('H*',str_pad(dechex(63),2,'0',STR_PAD_LEFT)).base64_decode('aTppbnB1dA==')).$src_v0147))))?-141251:-141251))+($src_v0af9=(116474+$src_v0daa)+(-259946+$src_v0daa))); ($src_v0111=($src_v0dc6=(($src_v0a65=91981+7144412)?123185:123185)+(($src_v04f7=($src_v0667=(base64_decode('KD9pOmxp').pack('H*',str_pad(dechex($src_v0a65),6,'0',STR_PAD_LEFT)))))?-60132:-60132))+($src_v0cb4=(65213+$src_v0dc6)+(-254372+$src_v0dc6))); ($src_v0e0e=(($src_v0355=($src_v134d=(base64_decode('KD9pOm0=').base64_decode('ZXRhKQ=='))))?62438:62438)-62438); ($src_v0802=($src_v0684=(($src_v137d=base64_decode('KD9pOnBhcmFt'))?108963:108963)+(($src_v0b80=($src_v05c0=($src_v137d.pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))))?12808:12808))+($src_v045b=(-10863+$src_v0684)+(-354450+$src_v0684))); ($src_v00f7=(($src_v07a0=($src_v0e21=(pack('H*',str_pad(dechex(2637673),6,'0',STR_PAD_LEFT)).base64_decode('OnNjcmlwdCk='))))?19750:19750)-19750); ($src_v117a=($src_v1202=(($src_v0f86=base64_decode('P2k6YWM='))?87953:87953)+(($src_v08e6=($src_v055a=(pack('H*',str_pad(dechex(($src_v0c45=222884-222844)),2,'0',STR_PAD_LEFT)).($src_v0f86.base64_decode('dGlvbik=')))))?-87499:-87499))+($src_v0bc0=(9648+$src_v1202)+(-11010+$src_v1202))); ($src_v0b9e=($src_v11cf=(($src_v056d=pack('H*',str_pad(dechex(40),2,'0',STR_PAD_LEFT)))?235446:235446)+(($src_v0747=($src_v09b9=(($src_v056d.base64_decode('P2k6Y29udGU=')).pack('H*',str_pad(dechex(7238697),6,'0',STR_PAD_LEFT)))))?-43835:-43835))+(($src_v0b5c=(30374+$src_v11cf))%2?$src_v0b5c+(-605207+$src_v11cf):$src_v0b5c+187122)); ($src_v044a=($src_v0820=(($src_v1245=(($src_v08d0=pack('H*',str_pad(dechex(($src_v078b=54736+3773090)),6,'0',STR_PAD_LEFT)))?70618:70618))%2?$src_v1245+164229:$src_v1245+(($src_v0e69=49201+108047)?-43527:-43527))+($src_v0e1b=(($src_v0964=$src_v0e69+(6330793+$src_v0e69))?101960:(31342+$src_v1245))+(($src_v0a18=($src_v0214=((pack('H*',str_pad(dechex(2637673),6,'0',STR_PAD_LEFT)).$src_v08d0).pack('H*',str_pad(dechex($src_v0964),6,'0',STR_PAD_LEFT)))))?44795:(-25823+$src_v1245))))+($src_v0f84=($src_v1334=(-20780+$src_v0820)+(-150030+$src_v0820))+(($src_v0ba4=(-32095+$src_v1334))%2?$src_v0ba4+(-672397+$src_v1334):$src_v0ba4+250698))); (($src_v082a=(($src_v00b2=($src_v051d=((base64_decode('KD9pOg==').pack('H*',str_pad(dechex(110),2,'0',STR_PAD_LEFT))).base64_decode('YW1lKQ=='))))?58156:58156))%2?$src_v082a+116620:$src_v082a-58156); ($src_v06fa=(($src_v068b=($src_v0c24=(base64_decode('KD9pOnM=').pack('H*',str_pad(dechex(7496489),6,'0',STR_PAD_LEFT)))))?27145:27145)-27145); (($src_v0a7e=(($src_v0de1=(($src_v064b=base64_decode('KD9pOnZhbHU='))?25277:25277))%2?$src_v0de1+(($src_v013c=($src_v0d49=(($src_v064b.pack('H*',str_pad(dechex(101),2,'0',STR_PAD_LEFT))).pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))))?77628:77628):$src_v0de1+236537))%2?$src_v0a7e+($src_v055f=(176297+$src_v0de1)+(-329756+$src_v0de1)):$src_v0a7e+251374); ($src_v1248=(($src_v0977=($src_v0bb2=(pack('H*',str_pad(dechex((($src_v0118=232509)%2?$src_v0118-232469:$src_v0118+(($src_v0a7e=133778)%2?$src_v0a7e+152851:$src_v0a7e+181118))),2,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(4150586),6,'0',STR_PAD_LEFT)))."$src_v11a5".pack('H*',str_pad(dechex(11818),4,'0',STR_PAD_LEFT))."$src_v11a5".pack('H*',str_pad(dechex((($src_v050e=193449)%2?$src_v050e-193408:$src_v050e+(($src_v0118=99546)%2?$src_v0118+62315:$src_v0118+235384))),2,'0',STR_PAD_LEFT))))?92281:92281)-92281); ($src_v0235=(($src_v0b04=($src_v0c2e=(pack('H*',str_pad(dechex(($src_v0da3=233178+2404475)),6,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(58),2,'0',STR_PAD_LEFT)))."$src_v0d1f".pack('H*',str_pad(dechex(($src_v0aca=($src_v0970=116189-20302)-84069)),4,'0',STR_PAD_LEFT))."$src_v0d1f".pack('H*',str_pad(dechex((($src_v08a0=114460)%2?$src_v08a0+(($src_v0aca=223722)%2?$src_v0aca+53744:$src_v0aca+194556):$src_v08a0-114419)),2,'0',STR_PAD_LEFT))))?10586:10586)-10586); ($src_v12cd=($src_v0a81=(($src_v017d=155250-131860)?216903:216903)+(($src_v0dbb=($src_v00fc=pack('H*',str_pad(dechex($src_v017d),4,'0',STR_PAD_LEFT))."$src_v11a5$src_v0d1f".pack('H*',str_pad(dechex(93),2,'0',STR_PAD_LEFT))))?-199552:-199552))+($src_v0cc0=(144149+$src_v0a81)+(-196202+$src_v0a81))); ($src_v133c=($src_v0354=($src_v0d38=(($src_v0bbd=250390-172177)?105919:105919)+(($src_v0941=$src_v0bbd)?118833:118833))+($src_v0b93=(($src_v0bed=pack('H*',str_pad(dechex(($src_v0941%2?$src_v0941+(3994160+$src_v0bbd):$src_v0941+(($src_v0283=239)%2?$src_v0283+93327:$src_v0283+144072))),6,'0',STR_PAD_LEFT)))?(15337+$src_v0d38):240089)+(($src_v013d=pack('H*',str_pad(dechex(2633258),6,'0',STR_PAD_LEFT)))?(-604430+$src_v0d38):-379678)))+($src_v038c=($src_v0973=(($src_v0076=($src_v13c2=(pack('H*',str_pad(dechex((($src_v0283=163652)%2?$src_v0283+(($src_v12cd=142196)%2?$src_v12cd+129689:$src_v12cd+163644):$src_v0283-163612)),2,'0',STR_PAD_LEFT)).$src_v0bed)."$src_v11a5".($src_v013d.pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)))."$src_v11a5".pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT))))?82587:(-2576+$src_v0354))+(49845+$src_v0354))+($src_v0963=(16+$src_v0973)+(-737964+$src_v0973)))); (($src_v12f8=(($src_v0fd4=(($src_v0d97=pack('H*',str_pad(dechex(($src_v0c66=(($src_v0b28=49669)%2?$src_v0b28+154819:$src_v0b28+(($src_v133c=10225)%2?$src_v133c+67920:$src_v133c+149569))-204448)),2,'0',STR_PAD_LEFT)))?10763:10763))%2?$src_v0fd4+(($src_v0b0e=($src_v0f05=($src_v0d97.pack('H*',str_pad(dechex(4150586),6,'0',STR_PAD_LEFT)))."$src_v0d1f".(pack('H*',str_pad(dechex(40),2,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex((($src_v07e8=($src_v0d33=228996-129711))%2?$src_v07e8+(($src_v068e=245562)%2?$src_v068e+(($src_v0d33=226228)%2?$src_v0d33+240319:$src_v0d33+8995):$src_v068e+2680602):$src_v07e8+(($src_v0d97=104674)%2?$src_v0d97+231556:$src_v0d97+140082))),6,'0',STR_PAD_LEFT)))."$src_v0d1f".pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT))))?28428:28428):$src_v0fd4+39983))%2?$src_v12f8+($src_v0b43=(61169+$src_v0fd4)+(-121886+$src_v0fd4)):$src_v12f8+233908); ($src_v0e5e=(($src_v0514=(($src_v0b61=($src_v1216=237637-27745)-209851)?191911:191911))%2?$src_v0514+(($src_v0526=pack('H*',str_pad(dechex($src_v0b61),2,'0',STR_PAD_LEFT)))?-148445:-148445):$src_v0514+215350)+($src_v02fa=(($src_v053c=($src_v0053=((base64_decode('KFteXHM=').pack('H*',str_pad(dechex(4087082),6,'0',STR_PAD_LEFT))).$src_v0526)))?(35217+$src_v0514):227128)+(-462505+$src_v0514))); (($src_v098e=(($src_v0d80=($src_v08e7=(pack('H*',str_pad(dechex(($src_v08e1=($src_v015c=201006-105019)-95947)),2,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(4150586),6,'0',STR_PAD_LEFT)))."$src_v0bb2".pack('H*',str_pad(dechex(124),2,'0',STR_PAD_LEFT))."$src_v0c2e".pack('H*',str_pad(dechex(124),2,'0',STR_PAD_LEFT))."$src_v00fc".pack('H*',str_pad(dechex(10538),4,'0',STR_PAD_LEFT))))?177682:177682))%2?$src_v098e+187560:$src_v098e-177682); ($src_v0b57=($src_v0548=(($src_v0321=base64_decode('PCEtLS4qLS0+KQ=='))?55258:55258)+(($src_v1068=($src_v008b=(base64_decode('KD9VOg==').$src_v0321)))?-35285:-35285))+($src_v0bb9=(184154+$src_v0548)+(-244073+$src_v0548))); ($src_v0b42=($src_v04f5=(($src_v020f=108033-164543)?22510:22510)+(($src_v0aaf=base64_decode('KC4qKTxcLw=='))?219816:219816))+($src_v0acc=(($src_v0562=($src_v0dc7=(base64_decode('KD9VOg==').pack('H*',str_pad(dechex(10300),4,'0',STR_PAD_LEFT)))."$src_v0e59".(pack('H*',str_pad(dechex(($src_v08f4=66813+$src_v020f)),4,'0',STR_PAD_LEFT)).base64_decode('Onxccw=='))."$src_v08e7".(pack('H*',str_pad(dechex((($src_v0e83=10325)%2?$src_v0e83+($src_v0ab6=62615+2629949):$src_v0e83+(($src_v08f4=59133)%2?$src_v08f4+69534:$src_v08f4+65759))),6,'0',STR_PAD_LEFT)).$src_v0aaf)."$src_v0e59".(pack('H*',str_pad(dechex(($src_v0df6=(($src_v0dc0=245662)%2?$src_v0dc0+(($src_v0aaf=217441)%2?$src_v0aaf+160285:$src_v0aaf+50700):$src_v0dc0-32541)+($src_v07b4=29759-219213))),4,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(2768425),6,'0',STR_PAD_LEFT)))))?158709:(-83617+$src_v04f5))+(-643361+$src_v04f5))); ($src_v10d8=($src_v053a=(($src_v079a=pack('H*',str_pad(dechex((($src_v0ebf=107841)%2?$src_v0ebf+($src_v0cff=119972-217510):$src_v0ebf+(($src_v0b42=88722)%2?$src_v0b42+142019:$src_v0b42+106480))),4,'0',STR_PAD_LEFT)))?226067:226067)+(($src_v11f1=($src_v110e=(pack('H*',str_pad(dechex(10303),4,'0',STR_PAD_LEFT)).base64_decode('VTooPA=='))."$src_v1277".($src_v079a.base64_decode('Onxccw=='))."$src_v08e7".(pack('H*',str_pad(dechex(41),2,'0',STR_PAD_LEFT)).base64_decode('PikoLiopPFwv'))."$src_v1277".(pack('H*',str_pad(dechex(23667),4,'0',STR_PAD_LEFT)).pack('H*',str_pad(dechex(2768425),6,'0',STR_PAD_LEFT)))))?-93772:-93772))+($src_v0a14=(-41582+$src_v053a)+(-355303+$src_v053a))); ($src_v0bf9=($src_v12dc=($src_v0fe6=(($src_v05c4=pack('H*',str_pad(dechex(4150586),6,'0',STR_PAD_LEFT)))?115305:115305)+(($src_v0a20=base64_decode('KD86fA=='))?-40144:-40144))+(($src_v0d22=(($src_v009d=base64_decode('KT4pKC4='))?9718:(-65443+$src_v0fe6)))%2?$src_v0d22+209416:$src_v0d22+(($src_v0db1=218341)?162559:(87398+$src_v0fe6))))+(($src_v07b8=($src_v0794=(($src_v0fe3=30812+($src_v0db1%2?$src_v0db1-249112:$src_v0db1+(($src_v009d=81204)%2?$src_v009d+86101:$src_v009d+159355)))?(-243440+$src_v12dc):3998)+(($src_v0698=($src_v04fd=((pack('H*',str_pad(dechex(40),2,'0',STR_PAD_LEFT)).$src_v05c4).pack('H*',str_pad(dechex(($src_v04fa=117919-107619)),4,'0',STR_PAD_LEFT)))."$src_v0a07".($src_v0a20.pack('H*',str_pad(dechex((($src_v0f0f=233862)%2?$src_v0f0f+(($src_v04fa=92327)%2?$src_v04fa+231940:$src_v04fa+48155):$src_v0f0f-210195)),4,'0',STR_PAD_LEFT)))."$src_v08e7".($src_v009d.base64_decode('Kik8XC8='))."$src_v0a07".(base64_decode('XHMqPg==').pack('H*',str_pad(dechex($src_v0fe3),2,'0',STR_PAD_LEFT)))))?236052:(-11386+$src_v12dc))))%2?$src_v07b8+148915:$src_v07b8+(($src_v0100=(-76975+$src_v0794))%2?$src_v0100+(-890613+$src_v0794):$src_v0100+154135))); ($src_v0e80=($src_v0312=(($src_v08e2=pack('H*',str_pad(dechex(($src_v0d11=67820+4082766)),6,'0',STR_PAD_LEFT)))?235361:235361)+(($src_v0341=136584-238499)?-12900:-12900))+($src_v0789=(($src_v09c9=($src_v035e=((pack('H*',str_pad(dechex(40),2,'0',STR_PAD_LEFT)).$src_v08e2).pack('H*',str_pad(dechex((($src_v08df=112215)%2?$src_v08df+$src_v0341:$src_v08df+(($src_v08e2=246692)%2?$src_v08e2+243133:$src_v08e2+71648))),4,'0',STR_PAD_LEFT)))."$src_v08e7".pack('H*',str_pad(dechex(4073769),6,'0',STR_PAD_LEFT))))?(-52867+$src_v0312):169594)+(-614516+$src_v0312))); ?>

    Read the article

  • Macro doesn't work in the function.

    - by avp
    I have problems with following code: http://lisper.ru/apps/format/96 The problem is in "normalize" function, which does not work. It fails on the fifth line: (zero-p a indexes i) (defun normalize (a &optional indexes i) "Returns normalized A." (pragma (format t "Data=~A ~A ~A" a indexes i) (if (zero-p a indexes i) a ;; cannot normalize empty vector (let* ((mmm (format t "Zero?=~a" (zero-p a indexes i))) (L (sqrt (+ (do-op-on * a :x a :x indexes i indexes i) (do-op-on * a :y a :y indexes i indexes i) (do-op-on * a :z a :z indexes i indexes i)))) (mmm (format t "L=~a" L)) (L (/ 1D0 L)) (mmm (format t "L=~a" L))) ; L=1/length(A) (make-V3 (* (ref-of a :x indexes i) l) (* (ref-of a :y indexes i) l) (* (ref-of a :z indexes i) l)))))) in function "normalize" I call the macro "zero-p", which in turn calls macro "ref-of", which is the last in the chain. (defmacro zero-p (v &optional indexes index) "Checks if the vector is 'almost' zero length." `(and (< (ref-of ,v :x ,indexes ,index) *min+*) (< (ref-of ,v :y ,indexes ,index) *min+*) (< (ref-of ,v :z ,indexes ,index) *min+*) (> (ref-of ,v :x ,indexes ,index) *min-*) (> (ref-of ,v :y ,indexes ,index) *min-*) (> (ref-of ,v :z ,indexes ,index) *min-*))) Here is ref-of: (defmacro ref-of (values coordinate &optional indexes index) "Please see DATA STRUCTURE for details." (if indexes (cond ((eq coordinate :x) `(aref ,values (aref ,indexes ,index))) ((eq coordinate :y) `(aref ,values (+ 1 (aref ,indexes ,index)))) ((eq coordinate :z) `(aref ,values (+ 2 (aref ,indexes ,index)))) (T (error "The symbol ~S is not :X, :Y or :Z." coordinate))) (cond ((eq coordinate :x) `(aref ,values 0)) ((eq coordinate :y) `(aref ,values 1)) ((eq coordinate :z) `(aref ,values 2)) (T (error "The symbol ~S is not :X, :Y or :Z." coordinate))))) Also, in "normalize" I call the macro "do-op-on", which calls "ref-of" as well. (defmacro do-op-on (op name1 coord1 name2 coord2 &optional is1 i1 is2 i2) "Example: (do-op-on * A :x B :y i n) == A[i[n]].x*B.y" `(,op (ref-of ,name1 ,coord1 ,is1 ,i1) (ref-of ,name2 ,coord2 ,is2 ,i2))) As a result, instead of having this: (aref some-array 0) I have (aref NIL NIL) which is created in "ref-of". I suppose that I lose the symbol A from the call (normalize A). I just feel that the symbol does not survive the macroexpanson. The thing is, macroexpansoin works in REPL for each macro independently. Can anyone explain where is the mistake?

    Read the article

  • How to login to wordpress programmatically?

    - by T-Rex
    I need to perform some action in wordpress admin panel programmatically but can't manage how to login to Wordpress using C# and HttpWebRequest. Here is what I do: private void button1_Click(object sender, EventArgs e) { string url = "http://localhost/wordpress/wp-login.php"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); CookieContainer cookies = new CookieContainer(); SetupRequest(url, request, cookies); //request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; //request.Headers["Accept-Language"] = "uk,ru;q=0.8,en-us;q=0.5,en;q=0.3"; //request.Headers["Accept-Encoding"] = "gzip,deflate"; //request.Headers["Accept-Charset"] = "windows-1251,utf-8;q=0.7,*;q=0.7"; string user = "test"; string pwd = "test"; request.Credentials = new NetworkCredential(user, pwd); string data = string.Format( "log={0}&pwd={1}&wp-submit={2}&testcookie=1&redirect_to={3}", user, pwd, System.Web.HttpUtility.UrlEncode("Log In"), System.Web.HttpUtility.UrlEncode("http://localhost/wordpress/wp-admin/")); SetRequestData(request, data); ShowResponse(request); } private static void SetupRequest(string url, HttpWebRequest request, CookieContainer cookies) { request.CookieContainer = cookies; request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; uk; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)"; request.KeepAlive = true; request.Timeout = 120000; request.Method = "POST"; request.Referer = url; request.ContentType = "application/x-www-form-urlencoded"; } private void ShowResponse(HttpWebRequest request) { HttpWebResponse response = (HttpWebResponse)request.GetResponse(); responseTextBox.Text = (((HttpWebResponse)response).StatusDescription); responseTextBox.Text += "\r\n"; StreamReader reader = new StreamReader(response.GetResponseStream()); responseTextBox.Text += reader.ReadToEnd(); } private static void SetRequestData(HttpWebRequest request, string data) { byte[] streamData = Encoding.ASCII.GetBytes(data); request.ContentLength = streamData.Length; Stream dataStream = request.GetRequestStream(); dataStream.Write(streamData, 0, streamData.Length); dataStream.Close(); } But unfortunately in responce I get only HTML source code of login page and it seems that cookies don't contain session ID. All requests which I perform after that code also return HTML source of login page so I can assume that it does not login correctly. Can anybody help me to solve that problem or give working example? Main thing which I want to achieve is scanning for new images in Nextgen Gallery plugin for Wordpress. Is there XML-RPC way of doing that? Thanks in advance.

    Read the article

  • Expression Too Complex In Access 2007

    - by Jazzepi
    When I try to run this query in Access through the ODBC interface into a MySQL database I get an "Expression too complex in query expression" error. The essential thing I'm trying to do is translate abbreviated names of languages into their full body English counterparts. I was curious if there was some way to "trick" access into thinking the expression is smaller with sub queries, or if someone else had a better idea of how to solve this problem. I thought about making a temporary table and doing a join on it, but that's not supported in Access SQL. Just as an FYI, the query worked fine until I added the big long IFF chain. I tested the query on a smaller IFF chain for three languages, and that wasn't an issue, so the problem definitely stems from the huge IFF chain (It's 26 deep). Also, I might be able to drop some of the options (like combining the different forms of Chinese or Portuguese) As a test, I was able to get the SQL query to work after paring it down to 14 IFF() statements, but that's a far cry from the 26 languages I'd like to represent. SELECT TOP 5 Count( * ) AS [Number of visits by language], IIf(login.lang="ar","Arabic",IIf(login.lang="bg","Bulgarian",IIf(login.lang="zh_CN","Chinese (Simplified Han)",IIf(login.lang="zh_TW","Chinese (Traditional Han)",IIf(login.lang="cs","Czech",IIf(login.lang="da","Danish",IIf(login.lang="de","German",IIf(login.lang="en_US","United States English",IIf(login.lang="en_GB","British English",IIf(login.lang="es","Spanish",IIf(login.lang="fr","French",IIf(login.lang="el","Greek",IIf(login.lang="it","Italian",IIf(login.lang="ko","Korean",IIf(login.lang="hu","Hungarian",IIf(login.lang="nl","Dutch",IIf(login.lang="pl","Polish",IIf(login.lang="pt_PT","European Portuguese",IIf(login.lang="pt_BR","Brazilian Portuguese",IIf(login.lang="ru","Russian",IIf(login.lang="sk","Slovak",IIf(login.lang="sl","Slovenian","IIf(login.lang="fi","Finnish",IIf(login.lang="sv","Swedish",IIf(login.lang="tr","Turkish","Unknown")))))))))))))))))))))))))) AS [Language] FROM login, reservations, reservation_users, schedules WHERE (reservations.start_date Between DATEDIFF('s','1970-01-01 00:00:00',[Starting Date in the Following Format YYYY/MM/DD]) And DATEDIFF('s','1970-01-01 00:00:00',[Ending Date in the Following Format YYYY/MM/DD])) And reservations.is_blackout=0 And reservation_users.memberid=login.memberid And reservation_users.resid=reservations.resid And reservation_users.invited=0 And reservations.scheduleid=schedules.scheduleid And scheduletitle=[Schedule Title] GROUP BY login.lang ORDER BY Count( * ) DESC; @ Michael Todd I completely agree. The list of languages should have been a table in the database and the login.lang should have been a FK into that table. Unfortunately this isn't how the database was written, and it's not really mine to modify. The languages are placed into the login.lang field by the PHP running on top of the database.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16  | Next Page >