Search Results

Search found 56 results on 3 pages for 'lk'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • How can I search for the dot character using the search command?

    - by lk
    I'm trying to use the Search command in Vim: :Rs/F/T/X R = range F = text to find T = text to replace with X = options But, when I want to search for the "." (dot character) I'm getting some problems. The task: Replace all occurences of " ." (space dot) for "" (greater-than) So, first I tried this: :%s/ ./>/g But this changed me all the " ." (space ANY-CHARACTER) to the "" character. Then I remembered that the dot character is a special one, so I tried this: :%s/ \./>/g But vim threw me an error: E486 Can't find pattern " \." And finally I tried this crazy thing: :%s/" ."/>/g and this :%s/" \."/>/g But I got the same result: E486 Can't find pattern... So, how can I search for the dot character using the search command? PS: Sorry for my poor Enlish.

    Read the article

  • Web hosting a setup where both Windows and Linux are required

    - by lk
    I have a system where a website needs to be hosted on a Linux machine while a backend application that the site talks to needs to reside on Windows. Is there any "common practice" for such hosting? Note - both of the systems are mine so there is the dilemma of whether to have the machines physically located together to avoid delay for calls over the net.

    Read the article

  • AS3 - Can I know if a class implements an interface (or is a subclass of another class) ?

    - by lk
    With this code function someFunction(classParam:Class):Boolean { // how to know if classParam implements some interface? } i.e. Comparing classParam with IEventDispatcher interface: someFunction(EventDispatcher) // returns true someFunction(Object) // returns false I know it can't be done with is operator. But, is there a way to do it? Is there a way to know if a class implements some interface? (or is a subclass of another class?)

    Read the article

  • AS3 - Can I have access to the object (or function) who call me?

    - by lk
    I've asked this same question with Python. Now I like to know if this can be done in AS3. If I have something like this: package { public class SomeClass { private function A():void { C() } private function B():void { C() } private function C():void { // who is the caller, A or B ??? } public function SomeClass() { A() B() } } } Despite the design or other issues, this is only a question of an inquiring mind. Note: This has to be done without changing C signature Note 2: I like to have an access to an instance of the caller function so I can call that caller function (if I want to)

    Read the article

  • Boost timed_wait leap seconds problem

    - by Isac
    Hi, I am using the timed_wait from boost C++ library and I am getting a problem with leap seconds. Here is a quick example from boosts documentation: boost::system_time const timeout=boost::get_system_time() + boost::posix_time::milliseconds(500); extern bool done; extern boost::mutex m; extern boost::condition_variable cond; boost::unique_lock<boost::mutex> lk(m); while(!done) { if(!cond.timed_wait(lk,timeout)) { throw "timed out"; } } The timed_wait function is returning 24 seconds earlier than it should. 24 seconds is the current amount of leap seconds in UTC. So, boost is widely used but I could not find any info about this particular problem. Has anyone else experienced this problem? What are the possible causes and solutions? Notes: I am using boost 1.38 on a linux system. I've heard that this problem doesn't happen on MacOS.

    Read the article

  • boost::this_thread::disable_interruption usage confusion

    - by Evgenii
    boost/thread/pthread/shared_mutex.hpp contains this code: ... #include <boost/thread/detail/thread_interruption.hpp> ... class shared_mutex { ... void lock_shared() { boost::this_thread::disable_interruption do_not_disturb; boost::mutex::scoped_lock lk(state_change); while(state.exclusive || state.exclusive_waiting_blocked) { shared_cond.wait(lk); } ++state.shared_count; } ... }; but boost/thread/detail/thread_interruption.hpp does not contain implementation of disable_interruption, only the prototype. in boost_1_42_0/libs/thread/src/pthread we don't have the implementation too how does it work!???

    Read the article

  • Pass values from MasterPage UserControl to child ASPX Page

    - by Leekey
    Hi, Senario: Masterpage with a UserControl and a child ASPX page In the past when using this senario I've used an Interface as a way to pass a value from the UserControl (embedded in a master page) to the masterpage code behind then consume that value in the child aspx page. My question is now that asp.net 4 have arrived is this still a good way to achieve this or is there another or perhaps better way to do it? I've read somewhere that perhaps "delegates" is perhaps another route to take. Any help much appreciated Lk

    Read the article

  • Jquery Plugins/Autocomplete Special Char problem

    - by Yetkin EREN
    Hi; i use that plugin for autocomplate; docs.jquery.com/Plugins/Autocomplete but i have a problem with spacial chars. if a special char first char of a word, this char has being ignored and if its not first char, chars before that has being ignored. for example: "slk" cant found but if i type "lk" "slk" found and if i type öd "aöd" found. i made a test page; http://www.yetkineren.com/Autocomplete/oto.html and tahts the code thanks.. <html> <head> <meta http-equiv="Content-Language" content="tr"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9"> <script src="http://code.jquery.com/jquery-latest.js"></script> <link rel="stylesheet" href="jquery.autocomplete.css" type="text/css" /> <script type="text/javascript" src="encoder.js"></script> <script type="text/javascript" src="Scripts/jquery.bgiframe.min.js"></script> <script type="text/javascript" src="Scripts/jquery.autocomplete.js"></script> <script> $(document).ready(function(){ var gata=[ {"text": '21.png resmi aöd', "value": '21.png'}, {"text": '21.png resmi cöd', "value": '21.png'}, {"text": '21.png resmi acd', "value": '21.png'}, {"text": '21.png resmi aéd', "value": '21.png'}, {"text": '42.png resmi ésd', "value": '42.png'}, {"text": '63.png resmi aId', "value": '63.png'}, {"text": '34.png resmi Çsd', "value": '34.png'}, {"text": '65.png resmi jkl', "value": '65.png'}, {"text": '65.png resmi Gkl', "value": '65.png'}, {"text": '65.png resmi ökl', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '65.png resmi lsk', "value": '65.png'}, {"text": '65.png resmi slk', "value": '65.png'}, {"text": '36.png resmi &#351;lk', "value": '36.png'} ]; $('#eksampil').autocomplete(gata, { width: 300, scroll: true, scrollHeight: 300, matchContains: "word", mustMatch: true, formatItem: function(row, i) { return i+". result <img src='images/" + row.value + "'/> " + row.text }, formatMatch: function(row) { //Encoder.EncodeType="entity"; return row.text //Encoder.EncodeType="entity"; //Encoder.htmlDecode( //Encoder.htmlEncode(i); }, formatResult: function(row) { return row.text } }); }); </script> </head> <body> <br> type "re" for see all: <input id="eksampil" /><br> </body> </html>

    Read the article

  • Perl: Compare and edit underlying structure in hash

    - by Mahfuzur Rahman Pallab
    I have a hash of complex structure and I want to perform a search and replace. The first hash is like the following: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"], 456 => ["as", "sd", "df"] }, mno => { 987 => ["lk", "dm", "sd"] }, } and I want to iteratively search for all '123'/'456' elements, and if a match is found, I need to do a comparison of the sublayer, i.e. of ['ab','cd','ef'] and ['as','sd','df'] and in this case, keep only the one with ['ab','cd','ef']. So the output will be as follows: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"] }, mno => { 987 => ["lk", "dm", "sd"] }, } So the deletion is based on the substructure, and not index. How can it be done? Thanks for the help!! Lets assume that I will declare the values to be kept, i.e. I will keep 456 = ["ab", "cd", "ef"] based on a predeclared value of ["ab", "cd", "ef"] and delete any other instance of 456 anywhere else. The search has to be for every key. so the code will go through the hash, first taking 123 = ["xx", "yy", "zy"] and compare it against itself throughout the rest of the hash, if no match is found, do nothing. If a match is found, like in the case of 456 = ["ab", "cd", "ef"], it will compare the two, and as I have said that in case of a match the one with ["ab", "cd", "ef"] would be kept, it will keep 456 = ["ab", "cd", "ef"] and discard any other instances of 456 anywhere else in the hash, i.e. it will delete 456 = ["as", "sd", "df"] in this case.

    Read the article

  • Laptop Function Key Dysfunctional

    - by Kanini
    My laptop has Windows Vista installed in it. Everytime, I switch on the computer, the function key seems to be enabled automatically. So, when I press i, 5 is displayed and so on and so forth. Now, I have checked and ensured that Function is key is not locked due to a faulty keyboard or coke spilling on it and suchlike. I am able to get out of it with the following key combination Fn + Ctrl + Ins (Num Lk) However, the next time I switch on my PC, the Function key is automatically enabled. Also, if my computer goes to sleep mode and comes back, it is enabled again. Anything that I can do to change this behaviour?

    Read the article

  • What's the difference between these Asus socket 1155 motherboards?

    - by Johnny W
    I've looked on Asus's website, but they don't make it easy to understand what the differences are, and there's so many models to choose from! It's all spiel, and endless specs. How is anybody supposed to rifle through so much detail in order to make note of minor differences? If anyone already has this knowledge, I'd love to know what the major differences between these Z77 models are: P8Z77-V P8Z77-V DELUXE P8Z77-V LE P8Z77-V LE PLUS P8Z77-V LK P8Z77-V LX P8Z77-V PREMIUM P8Z77-V PRO P8Z77-V PRO/THUNDERBOLT Asus are famous for offering lots of solutions, but if there's no easy way to see the differences, how can you even consider what to buy? Their website does include a Comparison tool, but it's broken: I'm primarily interested in 1, 3, 4, 5 and 6, if that makes the task any easier. I'm sure there are people who have this knowledge. Thanks for any help.

    Read the article

  • About Web Server

    - by Chathura JAyanath
    I develop web sites. and i'm hope host my web site on my own web server. then i have ms win server 2008 computer with apache and IIS. i host my web site on iis. then it visible in local area network. now i want to open it to world. i have my own web url (www.myurl.lk). domain name provider ask about name server 1 and name server 2. i don't know how can i find my name server. can any one help me to do this? i already try this using upload web site to iis. but it's not work. it can see only local area network.

    Read the article

  • How do I change the .NET Framework version of a virtual directory without the ASP.NET tab?

    - by Brandon
    I have a website running v2.0 but I want the virtual directory running under it to use v4.0. I've already set the virtual directory as an application and gave it it's own application pool. The server is running Windows Server 2003 SP2 (64-bit). However it has the Enable32BitAppOnWin64 flag enabled which means the ASP.NET tabs on the properties dialog of the websites/virtual directories are missing. .NET 4.0 is installed, aspnet_regiis -lv lists the 32-bit and 64-bit versions of .NET 2.0 and .NET 4.0 and the Web Server Extensions are enabled. I can't disable the Enable32BitAppOnWin64 flag to get the ASP.NET tab back, so is there a way to do this from the command line without potentially breaking something? I ran aspnet_regiis -lk to find the paths so I could try aspnet_regiis -sn, but it only returns one record W3SVC/ 2.0.50727.0 (There are 3 separate websites and a virtual directory running on the server though) How can I change the framework version of the virtual directory without the ASP.NET tab?

    Read the article

  • top tweets SOA Partner Community – June 2013

    - by JuergenKress
    Send your tweets @soacommunity #soacommunity and follow us at http://twitter.com/soacommunity Oracle SOA Learn how Business Rules are used in Oracle SOA Suite. New free self-study course - Oracle Univ. #soa #oraclesoa http://pub.vitrue.com/ll9B OPITZ CONSULTING ?Wie #BPM und #SOA zusammengehören? Watch 100-Seconds-Video-Lesson by @Rolfbaer - http://ow.ly/luSjK @soacommunity Andrejus Baranovskis ?Customized BPM 11g PS6 Workspace Application http://fb.me/2ukaSBXKs Mark Nelson ?Case Management Samples Released http://wp.me/pgVeO-Lv Mark Nelson Instance Patching Demo for BPM 11.1.1.7 http://wp.me/pgVeO-Lx Simone Geib Antony Reynolds: Target Verification #oraclesoa https://blogs.oracle.com/reynolds/ OPITZ CONSULTING ?"It's all about Integration - Developing with Oracle #Cloud Services" @t_winterberg files: http://ow.ly/ljtEY #cloudworld @soacommunity Arun Pareek ?Functional Testing Business Processes In Oracle BPM Suite 11g http://wp.me/pkPu1-pc via @arrunpareek SOA Proactive Want to get started with Human Workflow? Check out the introductory video on OTN, http://pub.vitrue.com/enIL C2B2 Consulting Free tech workshop,London 6th of Jun Diagnosing Performance & Scalability Problems in Oracle SOASuite http://www.c2b2.co.uk/oracle_fusion_middleware_performance_seminar … @soacommunity Oracle BPM Must have technologies for delivering effective #CX : #BPM #Social #Mobile > #OracleBPM Whitepaper http://pub.vitrue.com/6pF6 OracleBlogs ?Introduction to Web Forms -Basic Tutorial http://ow.ly/2wQLTE OTNArchBeat ?Complete State of SOA podcast now available w/ @soacommunity @hajonormann @gschmutz @t_winterberg #industrialsoa http://pub.vitrue.com/PZFw Ronald Luttikhuizen VENNSTER Blog | Article published - Fault Handling and Prevention - Part 2 | http://blog.vennster.nl/2013/05/article-published-fault-handling-and.html … Mark Nelson ?Getting to know Maven http://wp.me/pgVeO-Lk gschmutz ?Cool! Our 2nd article has just been published: "Fault Handling and Prevention for Services in Oracle Service Bus" http://pub.vitrue.com/jMOy David Shaffer Interesting SOA Development and Delivery post on A-Team Redstack site - http://bit.ly/18oqrAI . Would be great to get others to contribute! Mark Nelson BPM PS6 video showing process lifecycle in more detail (30min) http://wp.me/pgVeO-Ko SOA Proactive ?Webcast: 'Introduction and Troubleshooting of the SOA 11g Database Adapter', May 9th. Register now at http://pub.vitrue.com/8In7 Mark Nelson ?SOA Development and Delivery http://wp.me/pgVeO-Kd Oracle BPM Manoj Das, VP Product Mangement talks about new #OracleBPM release #BPM #processmanagement http://pub.vitrue.com/FV3R OTNArchBeat Podcast: The State of SOA w/ @soacommunity @hajonormann @gschmutz @t_winterberg #industrialsoa http://pub.vitrue.com/OK2M gschmutz New article series on Industrial SOA started on OTN and Service Technology Magazine: http://guidoschmutz.wordpress.com/2013/04/22/first-two-chapters-of-industrial-soa-articles-series-have-been-published-both-on-otn-and-service-technology-magazine/ … #industrialSOA Danilo Schmiedel ?Article series #industrialSOA published on OTN and Service Technology Magazine http://inside-bpm-and-soa.blogspot.de/2013/04/industrial-soa_22.html … @soacommunity @OC_WIRE SOA & BPM Partner Community For regular information on Oracle SOA Suite become a member in the SOA & BPM Partner Community for registration please visit www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Facebook Wiki Mix Forum Technorati Tags: twitter,SOA Community,Oracle SOA,Oracle BPM,Community,OPN,Jürgen Kress

    Read the article

  • Why doesn't Ubuntu detect my second hard drive?

    - by user93179
    I am new to Linux and to Ubuntu, I was wondering, I have two hard drives setup in SATA ports (non-raid, at least I don't think they are). I installed ubuntu unto the drives fresh without any previous versions or windows at all. However when I got the Ubuntu 12.04 LTS working, all I see is 1 x 120 gigabyte harddrive. Also, not sure if this is important or not, my hard drives are SSD. My computer specs are Asus P9Z77-V-LK Nvidia Geforce GTX 660 TI Intel i5 3570k 3.4 /proc/partitions shows: major minor #blocks name 8 0 117220824 sda 8 1 117219328 sda1 8 16 117220824 sdb 8 17 96256 sdb1 8 18 108780544 sdb2 8 19 8342528 sdb3 11 0 1048575 sr0 and ls -l /sys/block/ | grep -v /virtual/: lrwxrwxrwx 1 root root 0 Sep 27 17:26 sda - ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda lrwxrwxrwx 1 root root 0 Sep 27 17:26 sdb - ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb lrwxrwxrwx 1 root root 0 Sep 27 22:26 sdc - ../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host6/target6:0:0/6:0:0:0/block/sdc lrwxrwxrwx 1 root root 0 Sep 27 22:04 sr0 - ../devices/pci0000:00/0000:00:1f.2/host3/target3:0:0/3:0:0:0/block/sr0 sudo file -s /dev/sd*: /dev/sda: x86 boot sector; partition 1: ID=0x7, starthead 32, startsector 2048, 234438656 sectors, code offset 0xc0, OEM-ID " ?", Bytes/sector 190, sectors/cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes 32 MB) , physical drive 0x7e, dos 32 MB) , FAT (32 bit), sectors/FAT 749, reserved3 0x800000, serial number 0x35361a2b, unlabeled /dev/sdb2: Linux rev 1.0 ext4 filesystem data, UUID=387761ac-5eba-4d0f-93ba-746a82fb541d (needs journal recovery) (extents) (large files) (huge files) /dev/sdb3: data /dev/sdc: x86 boot sector; partition 1: ID=0xc, active, starthead 0, startsector 8064, 30473088 sectors, code offset 0xc0 /dev/sdc1: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 64, reserved sectors 944, Media descriptor 0xf8, heads 128, hidden sectors 8064, sectors 30473088 (volumes 32 MB) , FAT (32 bit), sectors/FAT 3720, Backup boot sector 8, serial number 0xf90c12e9, label: "KINGSTON " /dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 2048, dos 32 MB) , FAT (32 bit), sectors/FAT 749, reserved3 0x800000, serial number 0x35361a2b, unlabeled Any help would be greatly appreciated! Thanks Another thing I noticed is, when i use gparted to locate my drives, it seems that sda1 is my second drive that I am not detecting when I boot up and my ubuntu + FAT Boot files are installed in sdb1

    Read the article

  • NGINX MIME TYPE

    - by justanotherprogrammer
    I have my nginx conf file so that when ever a mobile device visits my site the url gets rewritten to m.mysite.com I did it by adding the following set $mobile_rewrite do_not_perform; if ($http_user_agent ~* "android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino") { set $mobile_rewrite perform; } if ($http_user_agent ~* "^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-)") { set $mobile_rewrite perform; } if ($mobile_rewrite = perform) { rewrite ^ http://m.mywebsite.com redirect; break; } I got it from http://detectmobilebrowsers.com/ IT WORKS.But none of my images/js/css files load only the HTML. And I know its the chunk of code I mentioned above because when I remove it and visit m.mywebsite.com from my mobile device everything loads up.So this bit of code does SOMETHING to my css/img/js MIME TYPES. I found this out through the the console error messages from safari with the user agent set to iphone. text.cssResource interpreted as stylesheet but transferred with MIME type text/html. 960_16_col.cssResource interpreted as stylesheet but transferred with MIME type text/html. design.cssResource interpreted as stylesheet but transferred with MIME type text/html. navigation_menu.cssResource interpreted as stylesheet but transferred with MIME type text/html. reset.cssResource interpreted as stylesheet but transferred with MIME type text/html. slide_down_panel.cssResource interpreted as stylesheet but transferred with MIME type text/html. myrealtorpage_view.cssResource interpreted as stylesheet but transferred with MIME type text/html. head.jsResource interpreted as script but transferred with MIME type text/html. head.js:1SyntaxError: Parse error isaac:208ReferenceError: Can't find variable: head mrp_home_icon.pngResource interpreted as image but transferred with MIME type text/html. M_1_L_289_I_499_default_thumb.jpgResource interpreted as image but transferred with MIME type text/html. M_1_L_290_I_500_default_thumb.jpgResource interpreted as image but transferred with MIME type text/html. M_1_default.jpgResource interpreted as image but transferred with MIME type text/html. default_listing_image.pngResource interpreted as image but transferred with MIME type text/html. here is my whole nginx conf file just incase... worker_processes 1; events { worker_connections 1024; } http { include mime.types; include /etc/nginx/conf/fastcgi.conf; default_type application/octet-stream; sendfile on; keepalive_timeout 65; #server1 server { listen 80; server_name mywebsite.com www.mywebsite.com ; index index.html index.htm index.php; root /srv/http/mywebsite.com/public; access_log /srv/http/mywebsite.com/logs/access.log; error_log /srv/http/mywebsite.com/logs/error.log; #---------------- For CodeIgniter ----------------# # canonicalize codeigniter url end points # if your default controller is something other than "welcome" you should change the following if ($request_uri ~* ^(/main(/index)?|/index(.php)?)/?$) { rewrite ^(.*)$ / permanent; } # removes trailing "index" from all controllers if ($request_uri ~* index/?$) { rewrite ^/(.*)/index/?$ /$1 permanent; } # removes trailing slashes (prevents SEO duplicate content issues) if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; } # unless the request is for a valid file (image, js, css, etc.), send to bootstrap if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?/$1 last; break; } #---------------------------------------------------# #--------------- For Mobile Devices ----------------# set $mobile_rewrite do_not_perform; if ($http_user_agent ~* "android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino") { set $mobile_rewrite perform; } if ($http_user_agent ~* "^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-)") { set $mobile_rewrite perform; } if ($mobile_rewrite = perform) { rewrite ^ http://m.mywebsite.com redirect; #rewrite ^(.*)$ $scheme://mywebsite.com/mobile/$1; #return 301 http://m.mywebsite.com; #break; } #---------------------------------------------------# location / { index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include /etc/nginx/conf/fastcgi_params; } }#sever1 #server 2 server { listen 80; server_name m.mywebsite.com; index index.html index.htm index.php; root /srv/http/mywebsite.com/public; access_log /srv/http/mywebsite.com/logs/access.log; error_log /srv/http/mywebsite.com/logs/error.log; #---------------- For CodeIgniter ----------------# # canonicalize codeigniter url end points # if your default controller is something other than "welcome" you should change the following if ($request_uri ~* ^(/main(/index)?|/index(.php)?)/?$) { rewrite ^(.*)$ / permanent; } # removes trailing "index" from all controllers if ($request_uri ~* index/?$) { rewrite ^/(.*)/index/?$ /$1 permanent; } # removes trailing slashes (prevents SEO duplicate content issues) if (!-d $request_filename) { rewrite ^/(.+)/$ /$1 permanent; } # unless the request is for a valid file (image, js, css, etc.), send to bootstrap if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?/$1 last; break; } #---------------------------------------------------# location / { index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include /etc/nginx/conf/fastcgi_params; } }#sever2 }#http I could just detect the mobile browsers with php or javascript but i need to make the detection at the server level so that i can use the 'm' in m.mywebsite.com as a flag in my controllers (codeigniter) to serve up the right view. I hope someone can help me! Thank you!

    Read the article

  • Encryption puzzle / How to create a ProxyStub for a Remote Assistance ticket

    - by Jon Clegg
    I am trying to create a ticket for Remote Assistance. Part of that requires creating a PassStub parameter. As of the documenation: http://msdn.microsoft.com/en-us/library/cc240115(PROT.10).aspx PassStub: The encrypted novice computer's password string. When the Remote Assistance Connection String is sent as a file over e-mail, to provide additional security, a password is used.<16 In part 16 they detail how to create as PassStub. In Windows XP and Windows Server 2003, when a password is used, it is encrypted using PROV_RSA_FULL predefined Cryptographic provider with MD5 hashing and CALG_RC4, the RC4 stream encryption algorithm. As PassStub looks like this in the file: PassStub="LK#6Lh*gCmNDpj" If you want to generate one yourself run msra.exe in Vista or run the Remote Assistance tool in WinXP. The documentation says this stub is the result of the function CryptEncrypt with the key derived from the password and encrypted with the session id (Those are also in the ticket file). The problem is that CryptEncrypt produces a binary output way larger then the 15 byte PassStub. Also the PassStub isn't encoding in any way I've seen before. Some interesting things about the PassStub encoding. After doing statistical analysis the 3rd char is always a one of: !#$&()+-=@^. Only symbols seen everywhere are: *_ . Otherwise the valid characters are 0-9 a-z A-Z. There are a total of 75 valid characters and they are always 15 bytes. Running msra.exe with the same password always generates a different PassStub, indicating that it is not a direct hash but includes the rasessionid as they say. Some other ideas I've had is that it is not the direct result of CryptEncrypt, but a result of the rasessionid in the MD5 hash. In MS-RA (http://msdn.microsoft.com/en-us/library/cc240013(PROT.10).aspx). The "PassStub Novice" is simply hex encoded, and looks to be the right length. The problem is I have no idea how to go from any hash to way the ProxyStub looks like.

    Read the article

  • Encryption puzzle / How to create a PassStub for a Remote Assistance ticket

    - by Jon Clegg
    I am trying to create a ticket for Remote Assistance. Part of that requires creating a PassStub parameter. As of the documentation: http://msdn.microsoft.com/en-us/library/cc240115(PROT.10).aspx PassStub: The encrypted novice computer's password string. When the Remote Assistance Connection String is sent as a file over e-mail, to provide additional security, a password is used.<16 In part 16 they detail how to create as PassStub. In Windows XP and Windows Server 2003, when a password is used, it is encrypted using PROV_RSA_FULL predefined Cryptographic provider with MD5 hashing and CALG_RC4, the RC4 stream encryption algorithm. As PassStub looks like this in the file: PassStub="LK#6Lh*gCmNDpj" If you want to generate one yourself run msra.exe in Vista or run the Remote Assistance tool in WinXP. The documentation says this stub is the result of the function CryptEncrypt with the key derived from the password and encrypted with the session id (Those are also in the ticket file). The problem is that CryptEncrypt produces a binary output way larger then the 15 byte PassStub. Also the PassStub isn't encoding in any way I've seen before. Some interesting things about the PassStub encoding. After doing statistical analysis the 3rd char is always a one of: !#$&()+-=@^. Only symbols seen everywhere are: *_ . Otherwise the valid characters are 0-9 a-z A-Z. There are a total of 75 valid characters and they are always 15 bytes. Running msra.exe with the same password always generates a different PassStub, indicating that it is not a direct hash but includes the rasessionid as they say. Some other ideas I've had is that it is not the direct result of CryptEncrypt, but a result of the rasessionid in the MD5 hash. In MS-RA (http://msdn.microsoft.com/en-us/library/cc240013(PROT.10).aspx). The "PassStub Novice" is simply hex encoded, and looks to be the right length. The problem is I have no idea how to go from any hash to way the PassStub looks like.

    Read the article

  • Do you know a date picker to quickly pick one day of the current week?

    - by Murmelschlurmel
    Most date pickers allow you to pick the date from a tine calendar or enter the date by hand. For example http://jqueryui.com/demos/datepicker/ This requires - two clicks (one to display the calendar and one to select the correct date) - good eyesight (usually the pop-up calendar is very small) - and good hand-eye coordination to pick the correct date in the tiny calendar with your mouse. That's no problem for power users, but a hassle for older people and computer beginners. I found a website with a different approach. It seems like their users mostly select dates of the current week. So they listed all the days of the week in a bar together with the weekday. The current day is marked in another color. There is a tiny calender icon on the right hand that opens up a regular date picker. That gives you access to all regular date picker functionality. Here is a screenshot: http://mite.yo.lk/assets/img/tour/de/zeiten-erfassen.png Do you know of any jquery plugin which has a similar feature? If not, do you any other plugin or widget which would help me speed up development ? Thank you!

    Read the article

  • please help me to solve problem

    - by davit-datuashvili
    first of all this is not homework and nobody tag it as homewrok i did not understand this porblem can anybody explain me?this is not english problem it is just misunderstanding what problem say Consider the problem of neatly printing a paragraph on a printer. The input text is a sequence of n words of lengths l1 , l2 , . . . , ln , measured in characters. We want to print this paragraph neatly on a number of lines that hold a maximum of M characters each. Our criterion of “neatness” is as follows. If a given line contains words i through j , where i = j , and we leave exactly one space between words, the number of extra space characters at the end of the line is M - j + i -(k=i,k< j,k++) lk , which must be nonnegative so that the words fit on the line. We wish to minimize the sum, over all lines except the last, of the cubes of the numbers of extra space characters at the ends of lines. Give a dynamic-programming algorithm to print a paragraph of n words neatly on a printer. Analyze the running time and space requirements of your algorithm.

    Read the article

  • Equvalent c++0x program withought using boost threads..

    - by Eternal Learner
    I have the below simple program using boost threads, what would be the changes needed to do the same in c++0X #include<iostream> #include<boost/thread/thread.hpp> boost::mutex mutex; struct count { count(int i): id(i){} void operator()() { boost::mutex::scoped_lock lk(mutex); for(int i = 0 ; i < 10000 ; i++) { std::cout<<"Thread "<<id<<"has been called "<<i<<" Times"<<std::endl; } } private: int id; }; int main() { boost::thread thr1(count(1)); boost::thread thr2(count(2)); boost::thread thr3(count(3)); thr1.join(); thr2.join(); thr3.join(); return 0; }

    Read the article

  • Enable Proxy Authentication for normal windows application.

    - by Lalit
    my company's internet works on proxy server with Authentication(i.e. Browser prompts with window for username/password everytime i tried to access any web page). Now i have some windows application which tries to access internet(like WebPI/Visual Studio 2008 for rss feeds), but as they are unable to popup the the authentication window, they are unable to connect with internet with error: (407) Proxy Authentication Required . Here the exception is VS2008, first time it always fails to load rss feeds on startup page, but when i click on the link, it shows authentication window and everything works fine after that. my question is: How can i configure normal windows application(through app.config/app.manifest file) accessing web to able to show the authentication window or provide default credentials. For explore this furthor, i have created one console application on VS2008 which tries to serach something on google and display the result on console. Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; namespace WebAccess.Test { class Program { static void Main(string[] args) { Console.WriteLine("Enter Serach Criteria:"); string criteria = Console.ReadLine(); string baseAddress = "http://www.google.com/search?q="; string output = ""; try { // Create the web request HttpWebRequest request = WebRequest.Create(baseAddress + criteria) as HttpWebRequest; // Get response using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { // Get the response stream StreamReader reader = new StreamReader(response.GetResponseStream()); // Console application output output = reader.ReadToEnd(); } Console.WriteLine("\nResponse : \n\n{0}", output); } catch (Exception ex) { Console.WriteLine("\nError : \n\n{0}", ex.ToString()); } } } } When running this, It gives error Enter Serach Criteria: Lalit Error : System.Net.WebException: The remote server returned an error: (407) Proxy Authen tication Required. at System.Net.HttpWebRequest.GetResponse() at WebAccess.Test.Program.Main(String[] args) in D:\LK\Docs\VS.NET\WebAccess. Test\WebAccess.Test\Program.cs:line 26 Press any key to continue . . .

    Read the article

  • Convert this curl to multi PHP

    - by user1642423
    I have this code and I want made 10 curl connections like this with multi but I don't know how to that with this specific code: What the code does? Make a curl requiest to an .asp page Uses the result to send some data in a form ($ciudad) then the page get this submit and make an internal request and show an result. Output the final result of that. function curl($header,$encoded,$cookie){ $options = array( CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'], CURLOPT_TIMEOUT => 120, //CURLOPT_REFERER => '', //CURLOPT_HTTPHEADER => $header, CURLOPT_COOKIE => $cookie, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $encoded, CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_FOLLOWLOCATION => true, ); $ch = curl_init("http://procesos.ramajudicial.gov.co/consultaprocesos/consultap.aspx"); curl_setopt_array( $ch, $options ); $output = curl_exec($ch); curl_close($ch); return $output; } $cookie = ""; foreach($_COOKIE as $k => $v) $cookie .= $k."=".$v.";"; $cookie = substr($cookie,0,strlen($cookie)-1); $encoded = ''; foreach($_POST as $name => $value) { $encoded .= urlencode($name).'='.urlencode($value).'&'; } $lk = "http://procesos.ramajudicial.gov.co/consultaprocesos/"; $header[] = 'User-Agent: '.$_SERVER['HTTP_USER_AGENT']; $header[] = 'Accept: text/xml,application/xml,application/xhtml+xml,text /html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'; $header[] = 'Accept-Language: en-us,en;q=0.5'; $header[] = 'Accept-Encoding: gzip,deflate'; $header[] = 'Connection: keep-alive'; $header[] = 'Cookie : '.$cookie; $header[] = 'Content-Type: application/x-www-form-urlencoded'; $output = curl($header,$encoded,$cookie); $CIUDAD = urlencode("Medellin"); // to change $CORPORACION = urlencode("JUZGADOS CIVILES MUNICIPALES DE MEDELLIN"); // to change $DIGITOS = $numsus; // BEGIN STEP 1 $__VIEWSTATE = 'id="__VIEWSTATE" value="'; $i = stripos($output,$__VIEWSTATE) + strlen($__VIEWSTATE); $j = stripos($output,'"',$i); $__VIEWSTATE = substr($output,$i,$j-$i); $__EVENTVALIDATION = 'id="__EVENTVALIDATION" value="'; $i = stripos($output,$__EVENTVALIDATION) + strlen($__EVENTVALIDATION); $j = stripos($output,'"',$i); $__EVENTVALIDATION = substr($output,$i,$j-$i); $encoded = '__EVENTTARGET=DropDownList1&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE='.urlencode($__VIEWSTATE).'&__EVENTVALIDATION='.urlencode($__EVENTVALIDATION).'&DropDownList1='.$CIUDAD.'&TextBox13='; $output = curl($header,$encoded,$cookie);

    Read the article

< Previous Page | 1 2 3  | Next Page >