Search Results

Search found 5637 results on 226 pages for 'triple slash comments'.

Page 39/226 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • php and mysql site design question

    - by Jacksta
    I am trying to build a website with mysql and php. This is the first site I have attempted so I want to write a little plan and get some feedback. The site allows users to add some text in a text field as a “comment”. Once the comment has been entered into the site it is added to the database where it can be voted for by other users. When a new comment has been added to the database it needs to create a new page, e.g. www.xxxxx.com/commentname or www.xxxxxx.com/?id=99981. There will be a list of "Comments" in the database along with the number of votes for each comment. The home page will have two functions. 1) Allow users to add a "comment" 2) Display two tables, each with 20 rows containing most "popular comments" and "recent comments" Each comment will generate its one page where the comment will be displayed. Here users can read the comment and Vote for the comment if they wish. Please help me out by explaining how to do the following. -Generate a new page whenever a comment is added to the database -Add a vote to the vote count in the comment database. -Display the top 20 most popular comments as per number of votes.

    Read the article

  • Syntax for documenting JSON structure

    - by Roman A. Taycher
    So I'm trying to document the format of the json returned by an api I am writing against and I'd like to know if there is any popular format for the documentation of json structure. Note I'm not trying to to test or validate anything, I'm just using this for documentation. Also some ways to add comments to non-constants(items always returned w/ the same value) would be nice. This the not totally thought out scheme I'm currently using: Plain names refer to identifiers or types. Some types have type-comment Strings that appear to be constant(always returned for that type of request) strings are "str" Constant Numbers would be just the number Constant null is null Booleans are true/false for constant booleans or Boolean otherwise [a,b,c] are lists with 3 items a,b,c [... ...] is a list of repeating elements of some types/constants/patterns {a:A,b:B,c:c} and {... ...} is the same for a dictionary. example: story := [header,footer] header := {"data":realHeader,"kind":"Listing"} realHeader := {"after": null, "before": null, "children": [{"data": realRealHeader, "kind": "t3"}], "modhash": ""} footer := {"data":AlmostComments,"kind":"Listing"} AlmostComments := {"data": {"after": null, "before": null, "children": comments, "modhash": ""}, "kind": "t1"} comments := [...{"data":comment, "kind":"t1"}...] realRealHeader := {"author": string, "clicked": boolean, "created": int, "created_utc": int, "domain": "code.reddit.com", "downs": int, "hidden": boolean, "id": string-id, "is_self": boolean, "levenshtein": null, "likes": null, "media": null, "media_embed": { }, "name": string-id, "num_comments": int, "over_18": false, "permalink": string-urlLinkToStoryStartingFrom/r, "saved": false, "score": int, "selftext": string, "selftext_html": string-html, "subreddit": string-subredditname, "subreddit_id": string-id, "thumbnail": "", "title": string, "ups": int, "url": "http://code.reddit.com/" } comments := { "author": string, "body": string-body_html-wout-html, "body_html": string-html-formated, "created": int, "created_utc": int, "downs": int, "id": string-id, "levenshtein": null, "likes": null, "link_id": string-id, "name": string-id", "parent_id": string-id, "replies": AlmostComments or null, "subreddit": string-subredditname, "subreddit_id": string-id, "ups": int }

    Read the article

  • How to add additional condition to the JOIN generated by include?

    - by KandadaBoggu
    I want to add additional criteria to the LEFT OUTER JOIN generated by the :include option in ActiveRecord finder. class Post has_many :comments end class Comment belongs_to :post has_many :comment_votes end class CommentVote belongs_to :comment end Now lets say I want to find last 10 posts with their associated comments and the up comment votes. Post.find.all(:limit => 10, :order => "created_at DESC", :include => [{:comments => :comment_votes]) I cant add the condition to check for up votes as it will ignore the posts without the up votes. So the condition has to go the ON clause of the JOIN generated for the comment_votes. I am wishing for a syntax such as: Post.find.all(:limit => 10, :order => "created_at DESC", :include => [{:comments => [:comment_votes, :on => "comment_votes.vote > 0"]) Have you faced such problems before? Did you managed to solve the problem using the current finder? I hope to hear some interesting ideas from the community. PS: I can write a join SQL to get the expected result and stitch the results together. I want to make sure there is no other alternative before going down that path.

    Read the article

  • Why is only 2 of my querys working? (PHP/Mysql)

    - by ggfan
    When I remove a posting, I want it to remove the posting itself, any comments related to it, and like/dislike of the comments, and favorites that people added. So there are 4 queries that do this, but somehow only 2 of the 4 are working. When I switch say query 2 for query 3, then query 2 works and query 3 doesn't... The table names are correct and it is getting the data via $_GET. // Grab the data from the GET $posting_id = $_GET['posting_id']; // Delete the posting from the database $query = "DELETE FROM posting WHERE posting_id=$posting_id LIMIT 1"; mysqli_query($dbc, $query) or die(mysql_error()); // Delete the comments $query2 = "DELETE FROM comments WHERE posting_id=$posting_id "; mysqli_query($dbc, $query2) or die(mysql_error()); // Delete the like/dislike $query3 = "DELETE FROM comment_likedislike WHERE posting_id=$posting_id "; mysqli_query($dbc, $query3) or die(mysql_error()); // Delete the favorites $query4 = "DELETE FROM favorite WHERE posting_id=$posting_id "; mysqli_query($dbc, $query4) or die(mysql_error());

    Read the article

  • EF Code First, how can I achieve two foreign keys from one table to other table?

    - by Yoo Matsuo
    I've recently downloaded Entity Framework Code First CTP5, and have a trouble with this scenario. I have two tables as follows: Members table ID Name Comments table ID Comment CommentedMemberID CommentMemberID And, the data should be like the following: Members ID Name 1 Mike 2 John 3 Tom Comments ID Comment CommentedMemberID CommentMemberID 1 Good 1 2 2 Good 1 3 3 Bad 2 1 Then, I coded as shown below: public class Member { public int ID {get; set; } public string Name { get; set;} public virtual ICollection Comments { get; set;} } public class Comment { public int ID { get; set; } public string Comment { get; set; } public int CommentedMemberID { get; set; } public int CommentMemberID{ get; set; } public virtual Member CommentedMember { get; set; } public virtual Member CommentMember { get; set; } } public class TestContext : DbContext { public DbSet Members { get; set; } public DbSet Comments { get; set; } } But when I run these models on my cshtml, it gives me errors saying "Cannot create CommentMember instance" or something like that (Sorry, I already changed my models to proceed the EF Code First evaluation, so can't reproduce the same error). I've also tried to use OnModelCreating on the TestContext, but can't find any good instructions and don't know what to do. I saw a blog post of the EF Code First CTP3, and it seems there was a RelatedTo attribute in that version, but now it has gone. Could anyone know how to get it work properly? Or is this a totally wrong way to go with this scenario? Thanks, Yoo

    Read the article

  • Export to csv, string w/ comma in it, splits it up

    - by Brad
    This code exports data into a csv file, which is opened within Excel. When a string has a comma within it, it messes up the order of the data. I need help modifying my code below to resolve any data that contains a comma within it, to not to create a new column. I am assuming it will pass each string within double quotes, so any comma within those quotes, then it will make an exception. Any help is appreciated. $result = mysql_query("select lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010"); $csv_output .= "Last Name,First Name,Email,Telephone (Day),Telephone (Evening),Contact When,Comments,Thursday,Friday,Saturday,Sunday,Monday,Comments\n"; $i = 0; if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $csv_output .= $row['Field'].", "; $i++; } } $csv_output .= "\n"; $values = mysql_query("SELECT lname, fname, email, dtelephone, etelephone, contactwhen, comments, thursday, friday, saturday, sunday, monday FROM volunteers_2010 WHERE venue_id = $venue_id"); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$j<$i;$j++) { $csv_output .= $rowr[$j].", "; } $csv_output .= "\n"; }

    Read the article

  • Temporarily disable vim plugin without relaunching

    - by simont
    I'm using c-support in Vim. One of it's features is the automatic comment expansion. When I'm pasting code into Vim from an external editor, the comments are expanded (which gives me double-comments and messes up the paste - see below for example). I'd like to be able to disable the plugin, paste, then re-enable it, without relaunching Vim. I'm not sure if this is possible. The SO questions here, here and here all describe methods to disable plugins, but they all require me to close Vim, mess with my .vimrc or similar, and relaunch; if I have to close Vim, I might as well cat file1 >> myfile; vim myfile, then shift the lines internally, which will be just as quick. Is it possible to disable a plugin while running vim without relaunching, preferably in a way which allows me to map a hot-key toggle-plugin (so re-sourcing ~/.vimrc is alright; that's mappable to a hotkey [I imagine, haven't tried it yet])? Messed up comments: /* * * Authors: * * A Name * * * * Copyright: * * A Name, 2012 * */ EDIT: It turns out you can :set paste, :set nopaste (which, to quote :help paste, will "avoid unexpected effects [while pasting]". (See the comments). However, I'm still curious whether you can disable/enable a plugin as per the original question, so I shall leave the question open.

    Read the article

  • Yii 'limit' on related model's scope

    - by pethee
    I have a model called Guesses that has_many Comments. I'm making eager queries to this to then pass on as JSON as response to an API call. The relations are obviously set between the two models and they are correct(one2many <= belongs2) I added a scope to Comments called 'api' like this: public function scopes() { return array( 'api' => array( 'select' => 'id, comment, date', 'limit'=>3, 'order'=>'date DESC', 'together'=>true, ), ); } And I'm running the following one-liner query: $data = Guesses::model()->with('comments:api')->findAll(); The issue here is that when calling the 'api' scope using a with('relation'), the limit property simply doesn't apply. I added the 'together'=true there for another type of scope, plus I hear it might help. It doesn't make a difference. I don't need all the comments of all Guesses. I want the top 3 (or 5). I am also trying to keep the one-liner call intact and simple, manage everything through scopes, relations and parameterized functions so that the API call itself is clean and simple. Any advice?

    Read the article

  • Vim: how to undo a regex with a new regex?

    - by Victor Tihomirov
    my I have here a text that has been encrypted in Vi this way: 1,$s/\(.\)\1/&&/g 1,$s/\(.\)\(.\)\2\2\2/\2\2\2\1\2/g 1,$s/\(.\)\(.\)\(.\)\(.\)/\3\1\4\2/g 1,$s/\(...\)\(...\)/\2\1/g The task is to write a new regex for each regex in order to undo the the changes, so-called decrypting of the text. I figured out how to undo the last 2 changes: :1,$s/\(...\)\(...\)/\2\1/g :1,$s/\(.\)\(.\)\(.\)\(.\)/\2\4\1\3/g I'd like you to explain me what do the first two regex do. What does \1 or \2\2\2 mean before the forward slash? I assume that after the slash they change place (but wouldn't it be enough to just write \2\1 instead of \2\2\2\1\2(what does it mean?)? I just don't get it). And what does & or && mean? Thank you

    Read the article

  • SSRS 2005 tabs/newline characters display in table

    - by Paul Creasey
    Hi, How can i get a column in an SSRS 2005 report to render control chars like new lines and tabs? For example: SELECT VW.System_name + CHAR(13) + CHAR(9) + ' > ' + VW.PTS_NAME + CHAR(13) + CHAR(9) + CHAR(9) + ' > ' + VW.FEED_NAME as Name In SSRS (and SSMS Results to Grid Mode) table will render as: TRIPLE > HYBRIDS > HYBRID_CASHFLOWS But i would like (as rendered in SSMS Results to Text Mode): TRIPLE > HYBRIDS > HYBRID_CASHFLOWS How can this be done in SSRS 2005?

    Read the article

  • Use a subdirectory as root with htaccess in Apache 1.3

    - by Andrew
    I'm trying to deploy a site generated with Jekyll and would like to keep the site in its own subfolder on my server to keep everything more organized. Essentially, I'd like to use the contents of /jekyll as the root unless a file similarly named exists in the actual web root. So something like /jekyll/sample-page/ would show as http://www.example.com/sample-page/, while something like /other-folder/ would display as http://www.example.com/other-folder. My test server runs Apache 2.2 and the following .htaccess (adapted from http://gist.github.com/97822) works flawlessly: RewriteEngine On # Map http://www.example.com to /jekyll. RewriteRule ^$ /jekyll/ [L] # Map http://www.example.com/x to /jekyll/x unless there is a x in the web root. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/jekyll/ RewriteRule ^(.*)$ /jekyll/$1 # Add trailing slash to directories without them so DirectoryIndex works. # This does not expose the internal URL. RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} !/$ RewriteRule ^(.*)$ $1/ # Disable auto-adding slashes to directories without them, since this happens # after mod_rewrite and exposes the rewritten internal URL, e.g. turning # http://www.example.com/about into http://www.example.com/jekyll/about. DirectorySlash off However, my production server runs Apache 1.3, which doesn't allow DirectorySlash. If I disable it, the server gives a 500 error because of internal redirect overload. If I comment out the last section of ReWriteConds and rules: RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} !/$ RewriteRule ^(.*)$ $1/ …everything mostly works: http://www.example.com/sample-page/ displays the correct content. However, if I omit the trailing slash, the URL in the address bar exposes the real internal URL structure: http://www.example.com/jekyll/sample-page/ What is the best way to account for directory slashes in Apache 1.3, where useful tools like DirectorySlash don't exist? How can I use the /jekyll/ directory as the site root without revealing the actual URL structure? Edit: After a ton of research into Apache 1.3, I've found that this problem is essentially a combination of two different issues listed at the Apache 1.3 URL Rewriting Guide. I have a (partially) moved DocumentRoot, which in theory would be taken care of with something like this: RewriteRule ^/$ /e/www/ [R] I also have the infamous "Trailing Slash Problem," which is solved by setting the RewriteBase (as was suggested in one of the responses below): RewriteBase /~quux/ RewriteRule ^foo$ foo/ [R] The problem is combining the two. Moving the document root doesn't (can't?) use RewriteBase—fixing trailing slashes requires(?) it… Hmm…

    Read the article

  • PHP HttpRequest Cookie Issue

    - by Daaron
    I have a chunk of code to login to test a web site login: $r = new HttpRequest($newlocation, HttpRequest::METH_GET); $r-addCookies($cookieArray); $r-send(); The content of $cookieArray is from a redirect, but I don't modify it in any way. The really baked part is that if the value of the cookie (an authentication token string) contains a slash, it doesn't login properly. If it doesn't have a slash, everything works. Any ideas are appreciated.

    Read the article

  • Apache rewriteBase in .htaccess for development subdomains

    - by Das123
    I think I'm missing something and don't think I really understand how rewriteBase works. The problem I have is that I have a production site where the site is in the root directory yet I have my development site in a localhost subdirectory. Eg http://www.sitename.com/ vs http://localhost/sitename/ If I have for example an images folder I want to reference the images from the site root by using the initial slash in the href. Eg Using a relative href (without the initial slash) is not an option. This will work on the production site but the development site is looking for http://localhost/images/imagename.jpg instead of http://localhost/sitename/images/imagename.jpg So I thought all I needed to do was setup the following in my .htaccess file to force the site root to my subdomain within the development environment: Options +FollowSymLinks RewriteEngine On RewriteBase /sitename But this still uses localhost as the site root instead of localhost/sitename. Can anyone please give me some pointers?

    Read the article

  • Using a Filter to serve a specific page?

    - by user246114
    Hi, I am using a class which implements Filter for my jsp stuff. It looks like this: public class MyFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.getRequestDispatcher("mypage.jsp").forward(request, response); } } So the target, "mypage.jsp", is just sitting in my top-level directory. The filter works fine if I'm entering urls like: http://www.mysite.com/foo http://www.mysite.com/boo but if I enter a trailing slash, I'll get a 404: http://www.mysite.com/foo/ http://www.mysite.com/boo/ HTTP ERROR: 404 /foo/mypage.jsp RequestURI=/foo/mypage.jsp it seems if I enter the trailing slash, then the filter thinks I want it to look for mypage.jsp in subfolder foo or boo, but I really always want it to just find it at: http://www.mysite.com/mypage.jsp how can I do that? Thank you

    Read the article

  • OWL inferencing question

    - by user439170
    I am using the Jena semantic web framework version 2.6.3. I have code that creates a model with owl inferencing and then adds the following triples: [:bnode-3 rdf:type owl:Restriction] [:bnode-3 owl:onProperty :offspringOf] [:bnode-3 owl:someValuesFrom :Person] [:bnode-3 rdfs:subClassOf :Person] bnode-3 is supposed to be a restriction class which, for example, would contain :joe if :bob is a :Person and the following triple were asserted: [:joe :offspringOf :bob]. Then, since the restriction class is a subclass of Person, :joe would also be a person. And, in fact, this works. Whats confusing to me is that after I assert just the 4 triples at the top of this post, the inferencer creates a blank node which is a Person. In other words, the following triple is now in the model: [_:b0 rdf:type :Person] I don't understand why it would do this. Any help in understanding this would be greatly appreciated. Thanks. Kent.

    Read the article

  • Correct way to write /* and */

    - by billpg
    Hi everyone. I'd like to know, please, the correct way to write the symbols that the C family of languages use to begin and end comments. Before you all respond "a slash followed by an asterisk", I mean what's the correct way to write them on paper. (IE, How many points should the asterisk have? What angle should the slash be? etc) Everything I need so I can sit down and draw correct comment start and end symbols. Please note, I'm looking for the correct standard way. If there is no industry standard, please respond with "there is no standard" and I will accept that answer.

    Read the article

  • How can two threads access a common array of buffers with minimal blocking ? (c#)

    - by Jelly Amma
    Hello, I'm working on an image processing application where I have two threads on top of my main thread: 1 - CameraThread that captures images from the webcam and writes them into a buffer 2 - ImageProcessingThread that takes the latest image from that buffer for filtering. The reason why this is multithreaded is because speed is critical and I need to have CameraThread to keep grabbing pictures and making the latest capture ready to pick up by ImageProcessingThread while it's still processing the previous image. My problem is about finding a fast and thread-safe way to access that common buffer and I've figured that, ideally, it should be a triple buffer (image[3]) so that if ImageProcessingThread is slow, then CameraThread can keep on writing on the two other images and vice versa. What sort of locking mechanism would be the most appropriate for this to be thread-safe ? I looked at the lock statement but it seems like it would make a thread block-waiting for another one to be finished and that would be against the point of triple buffering. Thanks in advance for any idea or advice. J.

    Read the article

  • The case of the sneaky backslash - Regex

    - by Shane Cusson
    I'm missing something very obvious here, but I just cant see it. I've got: string input = @"999\abc.txt"; string pattern = @"\\(.*)"; string output = Regex.Match(input,pattern).ToString(); Console.WriteLine(output); My result is: \abc.txt I don't want the slash and cant figure out why it's sneaking into the output. I tried flipping the pattern, and the slash winds up in the output again: string pattern = @"^(.*)\\"; and get: 999\ Strange. The result is fine in Osherove's Regulator. Any thoughts? Thanks.

    Read the article

  • removing contents of div using Jquery "empty" doesn't work

    - by Andrew
    I'm trying to remove contents of particular div which are basically list items and a heading by using jquery empty so that I could replace with new contents. What happens when I run the code is, the whole div element blinked and flash the replaced content and then the old one reappear. Can anyone tell me what am I doing wrong? Here's an excerpt of my code - <pre> $("#msg_tab").bind("click",function(){ $("#sidebar1").remove(); var html="<ul><li><h2>test</h2><ul><li><a href='#'>Compose New Message</a></li><li><a href='#'>Inbox</a></li><li><a href='#'>Outbox</a></li><li><a href='#'>Unread</a></li><li><a href='#'>Archive</a></li></ul></li></ul>"; $("#sidebar1").append(html); }); <div id="sidebar1" class="sidebar"> <ul> <li> <h2>Messages</h2> <ul> <li><a href="#">Compose New Message</a></li> <li><a href="#">Inbox</a></li> <li><a href="#">Outbox</a></li> <li><a href="#">Unread</a></li> <li><a href="#">Archive</a></li> </ul> </li> </ul> </div> Another question is, how do I write multiple line html code string in javascript so that java would recognize as a string value? Placing forward slash at the end is ok when the string is not a html code but, in html code, I can't figure out how to escape forward slash from ending tags.I've tried escaping it with backward slash but doesn't work. I would be appreciated if anyone could shed a light on this matter as well.

    Read the article

  • How do you encode an apostrophe so that it's searchable in mysql?

    - by Yegor
    I don't think that was the most clear question, but an example should make it a little clearer. I have a table filled with movie names, some of which contain apostrophes. I have a search box which is used to find movies. If I perform searches via mov_title = '$search_keywords' it all works, but this method will not yield any results for partial searches, so I have to use this mov_title LIKE '%$search_keywords%' This method works fine for titles that are A-Za-z0-9, but if a title has an apostrophe, it's not able to find the movie, even if I do an exact match. Before the titles are stored in the DB, I put them through this: $search_keywords = htmlspecialchars(mysql_escape_string($_GET["search_keywords"])); So in the DB, there is a forward slash before every single apostrophe. The only way to match a movie title with an apostrophe is to physically put a forward slash in front of the apostrophe, in the search box. This seems so trivial, and I'm sure the solution is painfully obvious, but I'm just not seeing it.

    Read the article

  • What's the RegEx to make sure that delimiters are escaped?

    - by Kuyenda
    I'm looking for a regular expression that will check whether or not delimiters in a string are escaped with a backward slash. The delimiters I am concerned about are comma (\,), colon (\:), semicolon (\;) and of course the backward slash itself has to be escaped (\). For example, the string "test" should return a match because there are no delimiters in it, and no escaping is necessary. The string "te\;st" would return a match because the semicolon delimiter is escaped. "te;st" and "t\;s:t" would both fail because the both contain at least one delimiter that is not escaped. I know that I need a conditional and a positive look behind, and this is what I have so far, but it is not giving me the expected answer. ^(?<delimiter>[:;,\\])?(?(delimiter)\(?<=(?:\\\\)*\\)k<delimiter>|.)$ Any suggestions on how I can make this work? Thanks.

    Read the article

  • Create a graph image (png, jpg ..) from an XML file with Java

    - by alibm
    Hello, I have an XML file and I want to create a graph with some entities, then store this graph in an image, JPG or PNG. So is there a library in Java do like this?? Or is there some tricks by parsing XML files and ... ??? Here an example XML file: <?xml version="1.0"?> <process> <p n=1>Tove</p> <p n=2>Jani</p> <p n=2>Bill</p> <p n=4>John</p> </process> And the output will be like this. http://i.imgur.com [slash] YevGX.png Please change [slash] by / to see the image. Thanks in advance. Best Regards, AliBM

    Read the article

  • template function error..

    - by sil3nt
    Hi there, I have function which takes in an parameter of a class called "Triple", and am returning the averge of 3 values of type float. template <typename ElemT> float average(Triple ElemT<float> &arg){ float pos1 = arg.getElem(1); float pos2 = arg.getElem(2); float pos3 = arg.getElem(3); return ( (pos1+pos2+po3) /3 ); } when i try compiling this i get q2b.cpp:32: error: template declaration of `float average' q2b.cpp:32: error: missing template arguments before "ElemT" not quite sure what this means.

    Read the article

  • TCP Scanner Python MultiThreaded

    - by user1473508
    I'm trying to build a small tcp scanner for a netmask. The code is as follow: import socket,sys,re,struct from socket import * host = sys.argv[1] def RunScanner(host): s = socket(AF_INET, SOCK_STREAM) s.connect((host,80)) s.settimeout(0.1) String = "GET / HTTP/1.0" s.send(String) data = s.recv(1024) if data: print "host: %s have port 80 open"%(host) Slash = re.search("/", str(host)) if Slash : netR,_,Wholemask = host.partition('/') Wholemask = int(Wholemask) netR = struct.unpack("!L",inet_aton(netR))[0] for host in (inet_ntoa(struct.pack("!L", netR+n)) for n in range(0, 1<<32-Wholemask)): try: print "Doing host",host RunScanner(host) except: pass else: RunScanner(host) To launch : python script.py 10.50.23.0/24 The problem I'm having is that even with a ridiculous low settimeout value set, it takes ages to cover the 255 ip addresses since most of them are not assigned to a machine. How can i make a way faster scanner that wont get stuck if the port is close.MultiThreading ? Thanks !

    Read the article

  • RegExp to match fraction

    - by user3627265
    I'm trying to perform regex to match a fraction. The user will input a fraction eg., 1/4, 1 1/2 10/2 so on. I have tested this regex and it works, but the problem is when I type in 10, 20, 30, 40 so on It does not recognized these values. This is my regex As you can see, it first sorted out the integer and then the slash and lastly the integer after the slash. var check_zero_value = str1.match(/[1-9]\/[1-9]/g); if(!check_zero_value1) { return false; } Any idea on this?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >